/* カスタムアプリケーションスタイル */

/* レイアウト */
body {
    background-color: white;
}

.page-header {
    background: white;
    color: #333;
    padding: 40px 0;
    margin-bottom: 30px;
}

.page-header h1 {
    margin: 0;
    font-weight: 300;
    font-size: 2.5rem;
}

.page-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 10px;
}
.page-title{
    display: flex;
    align-items: center;
    gap: 4px;
}
.section-title{
    display: flex;
    align-items: center;
    gap: 4px;
}

/* カード */
.dashboard-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dashboard-card .card-content {
    text-align: center;
    padding: 30px 20px;
}

.dashboard-card .card-icon {
    font-size: 3rem;
    color: #1976d2;
    margin-bottom: 15px;
}

.dashboard-card .card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.dashboard-card .card-description {
    color: #666;
    font-size: 0.9rem;
}

/* 統計カード */
.stats-card {
    background: white;
    color: #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.stats-card .stats-number {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 5px;
}

.stats-card .stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.stats-card.warning {
    background: white;
    color: #ff9800;
}

.stats-card.danger {
    background: white;
    color: #f44336;
}

.stats-card.info {
    background: white;
    color: #2196f3;
}

/* フォーム */
.form-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.form-section h5 {
    color: #1976d2;
    margin-bottom: 20px;
    font-weight: 500;
}

.form-row {
    margin-bottom: 20px;
}

.form-actions {
    text-align: right;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 30px;
}

/* テーブル */
.data-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.data-table table {
    margin: 0;
}

.data-table th {
    background-color: white;
    color: #333;
    font-weight: 500;
    padding: 15px 10px;
}

.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e0e0e0;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

/* チャート */
.chart-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.chart-title {
    color: #1976d2;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
}

/* ファイルアップロード */
.file-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background-color: white;
    transition: border-color 0.3s ease;
}

.file-upload-area:hover {
    border-color: #1976d2;
}

.file-upload-area.dragover {
    border-color: #1976d2;
    background-color: #e3f2fd;
}

.file-upload-icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 15px;
}

.file-upload-text {
    color: #666;
    font-size: 1.1rem;
}

/* プログレス */
.progress-container {
    margin: 20px 0;
}

.progress {
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress .determinate {
    background-color: #1976d2;
}

/* パンくずリスト */
.breadcrumb-container {
    background: white;
    padding: 15px 0;
    margin-bottom: 20px;
    border-radius: 8px;
}

.breadcrumb-container .breadcrumb {
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb-container .breadcrumb:before {
    color: #ccc;
}

.breadcrumb-container .breadcrumb:last-child {
    color: #1976d2;
}

/* ログインページ */
.login-container {
    min-height: 100vh;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.login-header {
    text-align: center;
    padding: 30px 30px 20px;
    background: white;
    color: #333;
    border-radius: 8px 8px 0 0;
}

/* ログインページ: パスワード変更ボタンのコンテナを下方向へ30px移動する */
/* 目的: UI間隔の調整とインラインCSS排除、スタイル一元化のため */
#changePasswordBtnWrapper {
    margin-top: 20px; /* 元々10pxだったため+30pxして40pxに設定 */
}

/* ログインページ: パスワード変更ボタンの高さを+10pxし、幅は100%に統一 */
/* 目的: ユーザー指定の高さ調整とインラインCSS排除によるスタイル一元化 */
#changePasswordBtn {
    width: 100%;
    height: 40px; /* .btnのデフォルト36pxに+10px */
    line-height: 40px; /* アイコンとテキストの縦位置を中央に揃える */
}

/* ログインページ: ボタン内アイコンの位置調整（右へ10px移動＋垂直中央揃え） */
/* 目的: ユーザー指定の10px右移動を反映し、視認性を向上するため */
#changePasswordBtn i.material-icons.left {
    margin-left: 15px; /* アイコンを右へ10px移動 */
    line-height: inherit; /* ボタンのline-heightに合わせる（縦中央揃え） */
    vertical-align: middle; /* アイコンの縦位置を中央へ */
}

.login-header h4 {
    margin: 0;
    font-weight: 300;
}

.login-header .subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

.login-content {
    padding: 30px;
}

.login-footer {
    text-align: center;
    padding: 20px 30px;
    background-color: white;
    border-radius: 0 0 8px 8px;
    font-size: 0.8rem;
    color: #666;
}

/* 連絡先情報 */
.contact-info {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.contact-info h6 {
    color: #333;
    margin-bottom: 10px;
}

.contact-info p {
    color: #666;
    margin: 5px 0;
    font-size: 0.9rem;
}

/* レスポンシブ */
@media only screen and (max-width: 992px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .dashboard-card .card-icon {
        font-size: 2.5rem;
    }
    
    .stats-card .stats-number {
        font-size: 2rem;
    }
}

@media only screen and (max-width: 600px) {
    .form-section {
        padding: 20px;
    }
    
    .page-header {
        padding: 30px 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .login-card {
        margin: 10px;
    }
    
    .login-header,
    .login-content {
        padding: 20px;
    }
}

/* メインページ用CSS変数 */
:root {
    --primary-color: #009688;
    --primary-dark: #00695c;
    --primary-light: #4db6ac;
    --accent-color: #ff4081;
    --background-color: #f5f5f5;
    --surface-color: #ffffff;
    --text-primary: #212121;
    --text-secondary: #757575;
    --divider-color: #e0e0e0;
    --shadow-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-2: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    --shadow-3: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

/* メインページ用グローバルスタイル */
* {
    box-sizing: border-box;
}

html {
    height: 100%;
    margin: 0;
}

/* メインページ用ボディスタイル（ログインページと区別するため） */
body.main-page {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Noto Sans JP', 'メイリオ', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ヘッダー */
#header {
    background: linear-gradient(135deg, #009688 0%, #00695c 100%);
    color: white;
    padding: 0 16px;
    box-shadow: var(--shadow-2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    gap: 16px;
}

.header-welcome {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 0;
    opacity: 0.9;
    line-height: 60px;
}

.header-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    line-height: 60px;
}

.header-logout {
    display: flex;
    align-items: center;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.logout-btn:active {
    transform: translateY(0);
}

.logout-btn .material-icons {
    font-size: 18px;
}

/* フッター */
#footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--divider-color);
    color: var(--text-secondary);
    font-size: 14px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* メインコンテナ */
#main-container {
    display: flex;
    flex: 1;
    margin-top: 60px;
    height: calc(100vh - 100px);
    box-sizing: border-box;
}

#left_frame {
    width: 320px;
    background: white;
    padding: 24px 16px;
    overflow-y: auto;
}

#right_frame {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background-color: var(--background-color);
}

/* メニューセクションタイトル */
.menu-section-title {
    color: #009688;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 24px 0 12px 0;
    padding-left: 16px;
}

/* メニューボタン */
.menu-button {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: #009688;
    border: 1px solid #009688;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: white;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    min-height: 60px;
}

.menu-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.menu-button:hover {
    background: #00695c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.menu-button:hover::before {
    opacity: 0.1;
}

.menu-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.menu-button .material-icons {
    color: white;
    font-size: 24px;
    z-index: 1;
    flex-shrink: 0;
}

.menu-button-text {
    z-index: 1;
    line-height: 1.4;
    color: white;
    flex: 1;
    white-space: normal;
    word-wrap: break-word;
}

.logout-button {
    background: linear-gradient(135deg, var(--accent-color) 0%, #e91e63 100%);
    color: white;
    margin-top: 24px;
    border: none;
}

.logout-button .material-icons {
    color: white;
}

.logout-button:hover::before {
    background-color: white;
    opacity: 0.1;
}

/* コンテンツカード */
.content-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-1);
    margin-bottom: 24px;
}

.welcome-message {
    font-size: 28px;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 24px;
    text-align: center;
}

.notice-section {
    margin-top: 24px;
}

.notice-title {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice-content {
    width: 50%;
    min-width:500px;
    height: 300px;
    overflow: auto;
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.notice-content-item {
    display:flex;
    padding:10px 0;
    position:relative;
}

.notice-content-item-time{
    margin-right:20px;
}

.notice-content-item-new{
  position:absolute;
  top:15px;
  right:20px;
}

.notice-content h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 12px 0;
}

.notice-content ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.notice-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.notice-content p {
    margin: 0 0 16px 0;
    color: var(--text-secondary);
}

/* ローディング関連 */
.loading-container {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 16px;
}

.content-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.content-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
}

.content-body {
    color: var(--text-secondary);
    font-size: 16px;
}

/* レスポンシブデザイン（メインページ用） */
@media (max-width: 768px) {
    #main-container {
        flex-direction: column;
    }
    
    #left_frame {
        width: 100%;
        order: 2;
    }
    
    #right_frame {
        order: 1;
    }
    
    .menu-button {
        font-size: 14px;
        padding: 12px 16px;
        min-height: 56px;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: forwards;
    opacity: 0; /* アニメーション前の初期状態 */
}

/* ユーティリティクラス */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-10 {
    margin-bottom: 10px !important;
}

.mb-20 {
    margin-bottom: 20px !important;
}

.mb-30 {
    margin-bottom: 30px !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-10 {
    margin-top: 10px !important;
}

.mt-20 {
    margin-top: 20px !important;
}

.mt-30 {
    margin-top: 30px !important;
}

/* 病院検索ページ用カスタムスタイル */
/* 検索条件の入力フィールドを狭くする */
.search-group .input-field input[type="number"] {
    width: 80px !important;
    max-width: 80px !important;
}

.search-group .input-field select,
.search-group .input-field .select-dropdown {
    width: 150px !important;
    max-width: 150px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 検索条件を一行に配置するためのフレックスレイアウト */
.search-conditions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.search-conditions-row .search-group {
    flex: 0 0 auto;
    min-width: 200px;
    margin-bottom: 0;
}

.search-conditions-row .search-group h6 {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
}

/* 数値入力フィールドのペア（下限・上限）を横並びにする */
.search-group .search-options .row {
    margin-bottom: 0;
}

.search-group .search-options .row .input-field {
    margin-bottom: 0;
}

/* インライン表示のためのスタイル */
.inline-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.inline-option label {
    margin-bottom: 0 !important;
}

.inline-option .input-field {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 全ての入力要素の垂直対齐を統一 */
.search-group .input-field {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.search-group .input-field input,
.search-group .input-field select,
.search-group .input-field .select-dropdown {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    vertical-align: top;
}

/* 地域検索の県名とグループ名を同一行に表示 */
.search-group .search-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

/* 範囲入力のスタイル */
.range-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-input-container .input-field {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    flex: 1;
}

.range-separator {
    font-size: 1.2rem;
    font-weight: bold;
    color: #666;
    margin: 0 5px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .search-conditions-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-conditions-row .search-group {
        min-width: 100%;
    }
    
    .search-group .input-field input[type="number"] {
        width: 100px !important;
    }
    
    .search-group .input-field select,
    .search-group .input-field .select-dropdown {
        width: 200px !important;
    }
    
    /* 小屏幕上地域検索选项保持水平排列 */
    .search-group .search-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .inline-option {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-bottom: 5px;
    }
    
    .range-input-container {
        flex-direction: column;
        gap: 5px;
    }
}

/* Toast消息水平居中样式 */
#toast-container {
    left: 50% !important;
    right: auto !important;
    top: 10% !important;
    transform: translateX(-50%);
    max-width: 400px !important;
    width: auto !important;
}

/* 响应式设计 - 移动端 */
@media only screen and (max-width: 600px) {
    #toast-container {
        left: 50% !important;
        right: auto !important;
        bottom: 10% !important;
        top: auto !important;
        transform: translateX(-50%);
        max-width: 90% !important;
        width: auto !important;
    }
}

/* 响应式设计 - 平板端 */
@media only screen and (min-width: 601px) and (max-width: 992px) {
    #toast-container {
        left: 50% !important;
        right: auto !important;
        top: 10% !important;
        bottom: auto !important;
        transform: translateX(-50%);
        max-width: 80% !important;
        width: auto !important;
    }
}
/* 病院機能選択の幅調整（長文を完全表示するため） */
.hospital-search-page .hosp-func-field .select-wrapper input.select-dropdown {
  /* 目的：可視入力の幅を広げ「国立ハンセン病療養所」を折り返しなしで表示する */
  min-width: 200px;
}

.hospital-search-page .hosp-func-field .dropdown-content.select-dropdown {
  /* 目的：ドロップダウンメニューの幅も一致させる */
  min-width: 200px;
}

/* AJAXローディングオーバーレイ（共通） */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.loading-overlay.active {
  display: flex;
}

.loading-overlay .loading-content {
  background-color: white;
  padding: 30px 40px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.loading-overlay .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #26a69a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay .loading-content p {
  color: #666;
  margin: 0;
  font-size: 14px;
}   