* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans JP', sans-serif;
}

body {
    background-color: #f4f6f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === ヘッダーコンテナ === */
.header-container {
    display: none;
    /* position: fixed; */
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    height: 40px;
}

.header-logo img {
    height: 100%;
    width: auto;
}

/* === ハンバーガーメニュー === */
.hamburger-button {
    background: #0D7685;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.hamburger-button i {
    font-size: 20px;
}

/* === サイドバー === */
.sidebar {
    width: 260px;
    background: #0D7685;
    padding: 20px;
    color: white;
    position: fixed;
    height: 100vh;
    box-shadow: 0 0 45px 0 rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    margin-bottom: 30px;
    text-align: center;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
}

.menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-items li {
    margin: 0;
}

.menu-items a,
.menu-items form {
    width: 100%;
}

.menu-items a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.menu-items a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-items i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.disabled-link {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coming-soon {
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* === メインエリア === */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.header {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
}

.header h1 {
    color: #344767;
    font-size: 24px;
    font-weight: 500;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.card-title {
    color: #344767;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
}

.url-copy {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.url-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 0.875rem;
    background-color: #f8f9fa;
}

/* ボタンの共通スタイル */
button {
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
}

.copy-button {
    background: #0D7685;
    color: white;
}

.copy-button:hover {
    background: #0a5a65;
}

.copy-button i {
    font-size: 0.875rem;
}

.logout-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 100%;
    text-align: left;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.logout-button i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}


/* メインボタン色 */
.btn-teal {
  background-color: #3a9a9e;
  color: #fff;
  border: none;
}
.btn-teal:hover, .btn-teal:focus {
  background-color: #338b8e;
  color: #fff;
}

.btn-lightgreen {
  background-color: #e6fff5;
  color: #3a9a9e;
  border: 2px solid #3a9a9e;
}
.btn-lightgreen:hover, .btn-lightgreen:focus {
  background-color: #d0f5e9;
  color: #338b8e;
}

/* 紫ボタン */
.btn-outline-purple {
  color: #a020a0;
  border: 2px solid #a020a0;
  background: #fff;
}
.btn-outline-purple:hover, .btn-outline-purple:focus {
  background: #f7e6f7;
  color: #7a167a;
  border-color: #7a167a;
}

/* 薄紫ボタン */
.btn-outline-purple-light {
  color: #a060a0;
  border: 2px solid #a060a0;
  background: #faf6fa;
}
.btn-outline-purple-light:hover, .btn-outline-purple-light:focus {
  background: #f3e6f3;
  color: #7a167a;
  border-color: #7a167a;
}

/* 赤ボタン */
.btn-outline-danger {
  color: #d00000;
  border: 2px solid #d00000;
  background: #fff;
}
.btn-outline-danger:hover, .btn-outline-danger:focus {
  background: #ffecec;
  color: #a00000;
  border-color: #a00000;
}

/* 薄赤ボタン */
.btn-outline-danger-light {
  color: #d06060;
  border: 2px solid #d06060;
  background: #fff6f6;
}
.btn-outline-danger-light:hover, .btn-outline-danger-light:focus {
  background: #ffecec;
  color: #a00000;
  border-color: #a00000;
}

/* 選択された日の背景色を目立たせる */
.fc-selected-date {
    background: #ffecb3 !important;
    color: #d35400 !important;
    border: 2px solid #ff9800 !important;
}

.w-90 {
    width: 90% !important;
}
.w-80 {
    width: 80% !important;
}

/* === フッター === */
.footer {
    background-color: white;
    border-top: 1px solid #ddd;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    margin-left: 260px; /* サイドバーの幅に合わせる */
    position: relative;
    z-index: 10; /* サイドバーより前面に表示 */
    width: calc(100% - 260px); /* サイドバーの幅を考慮した幅に設定 */
    color: #6b7280;
    margin-top: auto;
}

.footer a {
    color: #6b7280;
    margin: 0 0.5rem;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
    color: #0D7685;
}

/* カードヘッダー */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.add-button {
    background: #28a745;
    color: white;
}

.add-button:hover {
    background: #218838;
}

.add-button i {
    font-size: 0.875rem;
}

/* フォームスタイル */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #344767;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #f8f9fa;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.submit-button {
    background: #28a745;
    color: white;
}

.submit-button:hover {
    background: #218838;
}

.password-change-link {
    color: #0D7685;
    text-decoration: none;
    font-size: 0.875rem;
}

.password-change-link:hover {
    text-decoration: underline;
}

/* テーブルスタイル */
.qualification-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.qualification-table th,
.qualification-table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

.qualification-table th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: #344767;
}

.qualification-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.action-button {
    background: #0D7685;
    color: white;
}

.action-button:hover {
    background: #0a5a65;
}

.action-button.delete {
    background: #dc3545;
}

.action-button.delete:hover {
    background: #c82333;
}

/* ユーザー情報グリッド */
.user-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.info-value {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #374151;
}

/* 編集ボタン */
.edit-button {
    background: #0D7685;
    color: white;
}

.edit-button:hover {
    background: #0a5a65;
}

.edit-button i {
    font-size: 0.875rem;
}

/* 空の値のスタイル */
.empty-value {
    color: #9ca3af;
    font-style: italic;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #344767;
    font-size: 1.25rem;
}

.close-button {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.25rem;
}

.close-button:hover {
    color: #374151;
}

.modal-form {
    padding: 1.5rem;
}

.modal-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.cancel-button {
    background: #6c757d;
    color: white;
}

.cancel-button:hover {
    background: #5a6268;
}

/* テキストエリア */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* === レスポンシブ対応 === */
@media screen and (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
    }

    .main-content.no-sidebar {
        margin-left: 0;
    }
    
    /* フッターのスタイルも調整 */
    .footer {
        margin-left: 220px;
        width: calc(100% - 220px);
    }
}

@media screen and (max-width: 768px) {
    .header-container {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        top: 60px;
        height: calc(100vh - 60px);
        transition: transform 0.3s ease;
        padding: 15px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        /* padding-top: 80px; */
    }
    
    /* フッターのスタイルも調整 */
    .footer {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-logo {
        display: none;
    }

    .menu-items {
        gap: 5px;
    }

    .menu-items a,
    .logout-button {
        padding: 10px 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .card {
        padding: 15px;
    }

    .card-title {
        font-size: 16px;
    }

    .url-copy {
        flex-direction: column;
        gap: 10px;
    }

    .url-input {
        width: 100%;
    }

    .user-info-grid {
        grid-template-columns: 1fr;
    }

    .info-item {
        margin-bottom: 10px;
    }

    .qualification-table {
        display: block;
        overflow-x: auto;
    }
}

@media screen and (max-width: 480px) {
    .header {
        padding: 15px;
    }

    .card {
        padding: 12px;
    }

    button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .menu-items li {
        margin: 0;
    }

    .modal-content {
        width: 95%;
        margin: 10px auto;
    }

    .sidebar {
        width: 100%;
        padding: 20px;
        background: linear-gradient(to bottom, #0D7685, #0a5a65);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .menu-items {
        gap: 6px;
    }

    .menu-items a,
    .logout-button {
        padding: 12px 16px;
        font-size: 16px;
        letter-spacing: 0.5px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .menu-items a:hover,
    .logout-button:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .menu-items i,
    .logout-button i {
        margin-right: 12px;
        font-size: 18px;
    }

    .coming-soon {
        font-size: 12px;
        padding: 4px 8px;
        background-color: rgba(255, 255, 255, 0.15);
        border-radius: 6px;
        margin-left: 12px;
    }

    .disabled-link {
        opacity: 0.7;
    }

    /* アニメーションの追加 */
    .menu-items a,
    .logout-button {
        transition: all 0.2s ease;
    }

    /* アクティブ状態のスタイル */
    .menu-items a:active,
    .logout-button:active {
        transform: translateY(1px);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .hamburger-button {
        width: 35px;
        height: 35px;
    }

    .hamburger-button i {
        font-size: 18px;
    }
}

/* タブレット向けの調整 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        padding: 20px;
    }

    .no-sidebar {
        margin-left: 0 !important;
    }

    .card {
        padding: 15px;
    }
}

/* 服薬リストのスタイル */
.medicine-list,
.supplement-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 服薬時間チェックボックス */
.timing-checkbox-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 0.75rem 0 1.25rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 5px;
}

/* モバイル画面では2列表示に */
@media (max-width: 576px) {
    .timing-checkbox-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-wrapper:hover {
    background-color: #e9ecef;
}

.checkbox-wrapper label {
    margin-left: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
}

.timing-checkbox {
    cursor: pointer;
    width: 1.2rem;
    height: 1.2rem;
}

/* 服薬期間表示 */
.medicine-period,
.supplement-period {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.medicine-item,
.supplement-item,
.medical-history-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    padding: 0.75rem;
    background-color: #f9f9f9;
    margin-bottom: 0.5rem;
}

.medicine-item:last-child,
.supplement-item:last-child,
.medical-history-item:last-child {
    margin-bottom: 0;
}

.medicine-details,
.supplement-details,
.medical-history-details {
    flex-grow: 1;
}

.medicine-name,
.supplement-name,
.medical-history-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: #333;
    font-size: 1.1rem;
}

.medicine-info,
.supplement-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.medicine-timing,
.supplement-timing {
    background-color: #e3f2fd;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.9rem;
    color: #1565c0;
}

.medicine-dosage,
.supplement-dosage {
    color: #555;
    font-size: 0.95rem;
}

.medical-history-date {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.medical-history-list {
    margin-top: 1rem;
}

.medicine-memo,
.supplement-memo,
.medical-history-memo {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.medicine-actions,
.supplement-actions,
.medical-history-actions {
    display: flex;
    align-items: center;
}


/* 赤ベースの削除ボタン */
.delete-button-red {
    background-color: #e74c3c;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    border-radius: 4px;
}

.delete-button-red:hover {
    background-color: #c0392b;
    color: white;
}


.action-form {
    margin: 0;
    display: flex;
    align-items: center;
}

.action-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    margin-right: 0.25rem;
}

.end-today-button {
    color: #27ae60;
}

.end-today-button:hover {
    color: #219653;
    background: none;
}

.clear-date-button {
    color: #f39c12;
}

.clear-date-button:hover {
    color: #d35400;
    background: none;
}

.clear-date-button[disabled] {
    color: #bdc3c7;
    cursor: not-allowed;
}
