/* =========================================================
   共通レイアウト・ベース設定 (スタイリッシュ・モダンUI)
========================================================= */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #475569;
    --success: #059669;
    --success-hover: #047857;
    --warning: #d97706;
    --warning-hover: #b45309;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --dark: #0f172a;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --bg-main: #f8fafc;
    --border-color: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    padding-left: 240px;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1240px;
    margin: 32px auto;
    background: #ffffff;
    padding: 32px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

h2.page-title {
    color: var(--dark);
    border-bottom: 2px solid var(--dark);
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* =========================================================
   ナビゲーションメニュー (左サイドバー)
========================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    box-sizing: border-box;
    overflow-y: auto;
}

.nav-brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 20px 16px;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 16px;
}

.nav-brand {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.nav-store-badge {
    background-color: #1e293b;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #334155;
}

.btn-nav-logout {
    background-color: transparent;
    color: #94a3b8;
    border: 1px solid #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-nav-logout:hover {
    background-color: #1e293b;
    color: #ffffff;
    border-color: #475569;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0 12px;
}

.nav-links li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 11px 16px;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-links li a:hover {
    background-color: var(--sidebar-hover);
    color: #f8fafc;
}

.nav-links li a.active {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
}

.nav-links li.nav-item-bottom {
    margin-top: 20px;
}

.nav-links li.nav-item-bottom a:not(.active) {
    background-color: #1e293b;
}

.nav-unread-badge {
    background-color: var(--danger);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    display: none;
}

/* =========================================================
   テーブル (表) 共通スタイル
========================================================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    margin-bottom: 10px;
}

th, td {
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}

th {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.03em;
}

tr:nth-child(even) {
    background-color: #fafaf9;
}

/* =========================================================
   ボタン 共通スタイル
========================================================= */
.btn {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    color: white;
    transition: all 0.15s;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.btn-add { background-color: var(--primary); font-size: 14px; padding: 9px 18px; }
.btn-add:hover { background-color: var(--primary-hover); }

.btn-edit { background-color: #475569; }
.btn-edit:hover { background-color: #334155; }

.btn-delete { background-color: var(--danger); }
.btn-delete:hover { background-color: var(--danger-hover); }

.btn-detail { background-color: #0284c7; }
.btn-detail:hover { background-color: #0369a1; }

.btn-reserve { background-color: var(--success); }
.btn-reserve:hover { background-color: var(--success-hover); }

.btn-register { background-color: var(--primary); }
.btn-register:hover { background-color: var(--primary-hover); }

.btn-close { background-color: #64748b; }
.btn-close:hover { background-color: #475569; }

.btn-sms { background-color: #0d9488; }
.btn-sms:hover { background-color: #0f766e; }

.btn-small-add {
    background-color: #f8fafc;
    color: var(--primary);
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    margin-top: 6px;
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
    font-size: 13px;
}
.btn-small-add:hover { background-color: #f1f5f9; }

/* =========================================================
   日付操作・タブ 共通スタイル
========================================================= */
.date-controller {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.date-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.date-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

.date-btns button {
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid #cbd5e1;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: 0.15s;
}

.date-btns button:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.date-btns button.today-btn {
    background-color: var(--dark);
    color: #ffffff;
    border-color: var(--dark);
}

.date-btns button.today-btn:hover {
    background-color: #334155;
}

.date-btns input[type="date"] {
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    background: #ffffff;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 16px;
    padding-bottom: 6px;
}

.area-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.area-tab-btn {
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    background: #f1f5f9;
    color: var(--text-muted);
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.15s;
    outline: none;
}

.area-tab-btn:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.area-tab-btn.active {
    background: var(--dark);
    color: white;
}

.view-mode-toggle {
    display: flex;
    background: #e2e8f0;
    border-radius: 6px;
    padding: 3px;
    margin-bottom: 4px;
    width: fit-content;
}

.mode-btn {
    background: transparent;
    border: none;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: 0.15s;
    outline: none;
}

.mode-btn.active {
    background: white;
    color: var(--dark);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    gap: 6px;
}

.tab-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.15s;
}

.tab-btn:hover { background-color: #e2e8f0; }
.tab-btn.active { background-color: var(--dark); color: white; border-color: var(--dark); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* =========================================================
   モーダル (ポップアップ) 共通スタイル
========================================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
    /* 左のメニューバー(9999)より手前に出して、どの画面幅でもポップアップが隠れないようにする */
    z-index: 10001;
}

.modal-content {
    background-color: white;
    padding: 28px;
    border-radius: 10px;
    width: 90%;
    max-width: 520px;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.modal-scroll-area {
    overflow-y: auto;
    flex: 1;
    padding-right: 8px;
    margin-top: 12px;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 22px;
    cursor: pointer;
    color: #94a3b8;
    background: none;
    border: none;
    padding: 0;
    z-index: 10;
    line-height: 1;
}
.close-btn:hover { color: var(--text-main); }

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: #334155;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    background-color: #ffffff;
    font-family: inherit;
    color: var(--text-main);
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    height: 96px;
    resize: vertical;
}

.modal-save-btn, .save-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 13px;
    width: 100%;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.15s;
}

.modal-save-btn:hover, .save-btn:hover {
    background-color: var(--primary-hover);
}

/* =========================================================
   バッジ・装飾 共通スタイル
========================================================= */
.tag-badge {
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 4px;
    margin-bottom: 4px;
    display: inline-block;
}

.banned-badge {
    background-color: var(--danger);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.ng-cast-badge, .ng-customer-badge {
    background-color: #fef2f2;
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #fecaca;
}

.ng-cast-badge button, .ng-customer-badge button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    padding: 0;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--danger);
    background: #fef2f2;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    margin-bottom: 10px;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.tag-checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.tag-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #334155;
}

.tag-label input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

/* =========================================================
   各ページ専用スタイル
========================================================= */
/* 着信モニター (index.html) */
.monitor-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 90px);
    text-align: center;
}

.status-ring {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #cbd5e1;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.status-waiting {
    background-color: #0f172a;
    border: 3px solid #334155;
    animation: pulse 2.2s infinite;
}

.monitor-text {
    font-size: 20px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.call-card {
    display: none;
    background: #ffffff;
    border-radius: 12px;
    padding: 36px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    width: 90%;
    max-width: 520px;
    text-align: center;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

.call-card.active {
    display: block;
    animation: slideDown 0.35s ease-out;
}

.call-card.banned {
    border: 3px solid var(--danger);
    background-color: #fef2f2;
}

.caller-number {
    font-size: 22px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.caller-tags {
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.caller-name {
    font-size: 34px;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
    line-height: 1.25;
}

.banned-name { color: var(--danger); }

.customer-memo {
    margin-top: 20px;
    padding: 14px;
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    text-align: left;
    font-size: 14px;
    color: #334155;
    display: none;
}

.banned-memo {
    background: #fee2e2;
    border-left-color: var(--danger);
    color: #991b1b;
}

.action-btns {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    justify-content: center;
    flex-wrap: wrap;
}

.history-panel {
    margin-top: 32px;
    width: 90%;
    max-width: 800px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 10px;
    display: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.history-panel h3 {
    margin-top: 0;
    font-size: 15px;
    color: var(--dark);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    text-align: left;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
    color: var(--text-main);
}

.history-table th, .history-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

@keyframes pulse {
    0% { transform: scale(0.97); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3); }
    70% { transform: scale(1); box-shadow: 0 0 0 16px rgba(37, 99, 235, 0); }
    100% { transform: scale(0.97); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 顧客一覧・履歴 (customers.html / history.html) */
.search-box {
    margin-bottom: 18px;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: 0.15s;
}

.search-box input:focus { border-color: var(--primary); }
.banned-row { background-color: #fef2f2 !important; }

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #334155;
}

.history-list li {
    border-bottom: 1px dashed var(--border-color);
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-list li:last-child { border-bottom: none; }

.history-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-top: 22px;
    margin-bottom: 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.btn-page {
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: 0.15s;
}

.btn-page:hover { background-color: #f1f5f9; }
.btn-page:disabled { background-color: #f8fafc; color: #cbd5e1; border-color: #e2e8f0; cursor: not-allowed; }
.page-info { font-weight: 600; color: #475569; font-size: 14px; }

/* タイムテーブル (timetable.html) */
#tt-head th, #tt-body td {
    border: 1px solid var(--border-color);
    padding: 0;
    text-align: center;
    font-size: 13px;
    height: 36px;
}

#tt-head th {
    background-color: #f8fafc;
    color: #334155;
    font-weight: 600;
    padding: 10px 6px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    vertical-align: top;
}

.cast-header-name { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.cast-header-shift { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; line-height: 1.4; }
.cast-header-room { font-size: 11px; font-weight: 600; color: #0369a1; background-color: #e0f2fe; padding: 3px 6px; border-radius: 4px; display: inline-block; word-break: break-all; line-height: 1.3; }

.hour-start td { border-top: 2px solid #94a3b8; }
.time-col { width: 76px; font-weight: 600; background-color: #f8fafc; color: #475569; vertical-align: middle; font-variant-numeric: tabular-nums; }
.cell-free { background-color: #ffffff; cursor: pointer; transition: background-color 0.1s; position: relative; }
.cell-free:hover { background-color: #eff6ff; }
.cell-disabled { background-color: #f1f5f9; color: #cbd5e1; cursor: not-allowed; }
.cell-reserved { cursor: pointer; vertical-align: middle; position: relative; transition: opacity 0.1s; }
.cell-reserved:hover { opacity: 0.88; }
.bg-watermark { display: flex; justify-content: center; align-items: center; height: 100%; color: #cbd5e1; font-size: 11px; font-weight: 600; pointer-events: none; user-select: none; }

.detail-info-box { background: #f8fafc; padding: 16px; border-radius: 8px; margin-bottom: 18px; border: 1px solid var(--border-color); }
.detail-heading { font-size: 13px; color: #475569; margin-bottom: 8px; border-bottom: 1px solid var(--border-color); padding-bottom: 5px; font-weight: 700; }
.detail-history-list { list-style: none; padding: 0; margin: 0; font-size: 13px; color: #334155; max-height: 150px; overflow-y: auto; margin-bottom: 10px; }
.detail-history-list li { margin-bottom: 8px; border-bottom: 1px dashed var(--border-color); padding-bottom: 4px; }

button.cancel-btn { background-color: #64748b; flex: 1; padding: 11px; }
button.edit-btn { background-color: #475569; flex: 1; padding: 11px; }
button.edit-btn:hover { background-color: #334155; }
button.delete-btn { background-color: var(--danger); flex: 1; padding: 11px; }
button.delete-btn:hover { background-color: var(--danger-hover); }

/* 出勤管理 (shifts.html) */
.row-container { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--border-color); }
.row-container:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.btn-add-row { background: transparent; color: var(--primary); border: 1px solid var(--primary); padding: 5px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600; display: inline-block; margin-top: 5px; transition: 0.15s; }
.btn-add-row:hover { background: #eff6ff; }
.btn-remove-row { background: transparent; color: var(--danger); border: none; cursor: pointer; font-size: 15px; font-weight: bold; padding: 0 6px; }
.room-table-wrapper { overflow-x: auto; max-height: 600px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 8px; }
.room-table th, .room-table td { text-align: center; padding: 8px 4px; min-width: 140px; vertical-align: middle; }
.room-table th:first-child, .room-table td:first-child { min-width: 70px; position: sticky; left: 0; background: #f8fafc; z-index: 2; font-weight: 600; }
.room-table thead th { position: sticky; top: 0; z-index: 3; }
.room-table thead th:first-child { z-index: 4; }
.cell-assigned { background-color: #0f172a; color: white; cursor: pointer; font-size: 13px; transition: 0.1s; padding: 10px 5px !important; }
.cell-assigned:hover { background-color: #1e293b; }
.status-box { background: #f8fafc; padding: 4px 8px; border-radius: 4px; display: inline-block; margin-bottom: 4px; font-size: 12px; border: 1px solid #cbd5e1; }
.status-vacant { color: var(--success); font-weight: 600; }

/* 売上・日報 (sales.html) */
.summary-cards { display: flex; gap: 16px; margin-bottom: 32px; }
.card { flex: 1; background: #ffffff; padding: 22px 18px; border-radius: 8px; border: 1px solid var(--border-color); text-align: center; }
.card-title { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }
.card-value { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.val-sales { color: var(--primary); }
.val-back { color: var(--danger); }
.val-profit { color: var(--success); }
.val-count { color: var(--dark); }
.section-title { font-size: 16px; color: var(--dark); border-bottom: 2px solid var(--border-color); padding-bottom: 8px; margin-bottom: 14px; margin-top: 28px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.opt-badge { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; display: inline-block; margin-top: 4px; }

/* 給与・成績 (salary.html) */
.accordion-row { cursor: pointer; transition: background-color 0.15s; }
.accordion-row:hover { background-color: #f1f5f9 !important; }
.detail-row { display: none; background-color: #f8fafc; }
.detail-content { padding: 12px 18px; text-align: left; font-size: 13px; color: #334155; border-left: 3px solid var(--dark); margin: 6px 14px 14px 14px; border-radius: 4px; background: white; border: 1px solid var(--border-color); line-height: 1.6; }
.toggle-icon { font-size: 10px; color: #94a3b8; transition: transform 0.2s; display: inline-block; margin-left: 6px; vertical-align: middle; }
.accordion-row.open .toggle-icon { transform: rotate(180deg); }
.click-hint { font-size: 11px; color: var(--text-muted); font-weight: normal; margin-top: 2px; }

/* 設定 (settings.html) */
.settings-layout { display: flex; gap: 24px; align-items: flex-start; }
.sidebar { width: 210px; flex-shrink: 0; background: #ffffff; border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; }
.sidebar-title { font-size: 12px; color: #94a3b8; font-weight: 700; margin-bottom: 8px; padding-left: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { margin-bottom: 4px; }
.sidebar a { display: flex; align-items: center; padding: 10px 12px; border-radius: 6px; color: #475569; text-decoration: none; font-weight: 600; font-size: 14px; transition: 0.15s; cursor: pointer; }
.sidebar a:hover { background: #f1f5f9; color: var(--dark); }
.sidebar a.active { background: var(--dark); color: white; }
.main-content { flex: 1; background: #ffffff; border: 1px solid var(--border-color); border-radius: 8px; padding: 28px; min-height: 500px; }
.tab-pane { display: none; animation: fadeIn 0.2s; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.sortable-row { cursor: grab; }
.sortable-row:active { cursor: grabbing; background-color: #f1f5f9; }
.drag-handle { cursor: grab; color: #94a3b8; font-size: 16px; padding-right: 10px; font-weight: bold; }
.input-card { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.input-card-title { font-size: 13px; color: #475569; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; }
.form-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.form-row .input-group { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 5px; }
.form-row label { font-size: 12px; color: #475569; font-weight: 600; }
.form-row input, .form-row select { padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; outline: none; transition: 0.15s; background: #ffffff; }
.form-row input[type="color"] { padding: 2px; height: 40px; cursor: pointer; }
.form-row input:focus, .form-row select:focus { border-color: var(--primary); }
.btn-save { background-color: var(--primary); padding: 10px 20px; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; color: white; transition: 0.15s; font-size: 14px; }
.btn-save:hover { background-color: var(--primary-hover); }

/* 問い合わせ・ファイルアップロード */
.file-upload-wrapper { border: 2px dashed #cbd5e1; padding: 28px 20px; text-align: center; border-radius: 8px; background: #f8fafc; cursor: pointer; transition: 0.15s; position: relative; }
.file-upload-wrapper:hover { border-color: var(--primary); background: #f1f5f9; }
.file-upload-wrapper input[type="file"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#image-preview { max-width: 100%; max-height: 300px; margin-top: 14px; border-radius: 6px; display: none; border: 1px solid var(--border-color); }
.btn-submit { background-color: var(--primary); color: white; border: none; padding: 14px 28px; border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; transition: 0.15s; margin-top: 10px; }
.btn-submit:hover { background-color: var(--primary-hover); }
.btn-submit:disabled { background-color: #94a3b8; cursor: not-allowed; }
.message-area { margin-top: 18px; font-weight: 600; text-align: center; font-size: 14px; padding: 14px; border-radius: 6px; display: none; }
.message-area.success { background-color: #ecfdf5; color: var(--success); display: block; border: 1px solid #a7f3d0; }
.message-area.error { background-color: #fef2f2; color: var(--danger); display: block; border: 1px solid #fecaca; }

/* =========================================================
   WEB仮予約お知らせバナー (全画面共通)
========================================================= */
.global-tentative-banner {
    display: none;
    background-color: #fffbeb;
    color: #b45309;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #fde68a;
    cursor: pointer;
    text-decoration: none;
    position: sticky;
    top: 0;
    z-index: 9998;
    transition: background-color 0.15s;
}
.global-tentative-banner:hover {
    background-color: #fef3c7;
}

/* =========================================================
   スマホ版（レスポンシブ）対応 CSS
========================================================= */
.mobile-header { display: none; }

@media (max-width: 768px) {
    body { padding-left: 0; padding-top: 56px; }
    .container { margin: 12px auto; padding: 16px; width: 95%; max-width: 100%; box-sizing: border-box; }
    h2.page-title { font-size: 17px; flex-direction: column; align-items: flex-start; gap: 10px; }

    .mobile-header {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 14px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 56px;
        background-color: var(--sidebar-bg);
        color: white;
        padding: 0 18px;
        box-sizing: border-box;
        z-index: 10000;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    }
    .mobile-header { padding: 0 14px; }
    .mobile-brand { font-size: 18px; font-weight: 800; letter-spacing: 0.06em; }

    /* メニューボタン（左上・押すと左からメニューが出る） */
    .hamburger-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 38px;
        min-width: 100px;
        padding: 0 12px 0 10px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 8px;
        color: #ffffff;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        transition: background-color 0.15s;
    }
    .hamburger-btn:active, .hamburger-btn.is-open { background: rgba(255, 255, 255, 0.18); }
    /* ボタンの中の部品を押しても「ボタンを押した」扱いにする */
    .hamburger-btn * { pointer-events: none; }
    .hamburger-icon {
        position: relative;
        display: inline-block;
        width: 18px;
        height: 14px;
    }
    .hamburger-icon span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: #ffffff;
        transition: transform 0.2s, opacity 0.2s, top 0.2s;
    }
    .hamburger-icon span:nth-child(1) { top: 0; }
    .hamburger-icon span:nth-child(2) { top: 6px; }
    .hamburger-icon span:nth-child(3) { top: 12px; }
    /* 開いているときは ✕ の形にする */
    .hamburger-btn.is-open .hamburger-icon span:nth-child(1) { top: 6px; transform: rotate(45deg); }
    .hamburger-btn.is-open .hamburger-icon span:nth-child(2) { opacity: 0; }
    .hamburger-btn.is-open .hamburger-icon span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

    /* 上のバーに名前が出ているので、メニューの中の名前は隠す */
    .navbar .nav-brand { display: none; }
    .navbar { padding-top: 16px; }

    .navbar {
        transform: translateX(-100%);
        transition: transform 0.25s ease-in-out;
        z-index: 9999;
        top: 56px;
        height: calc(100vh - 56px);
        width: 240px;
    }
    .navbar.show { transform: translateX(0); }

    .global-tentative-banner { top: 56px; }

    .date-controller, .toolbar, .form-row { flex-direction: column; align-items: stretch; gap: 10px; }
    .date-btns { flex-wrap: wrap; justify-content: space-between; }
    .date-btns button, .date-btns input { flex: 1; text-align: center; font-size: 13px; padding: 8px; }
    .summary-cards { flex-direction: column; gap: 10px; }
    .settings-layout { flex-direction: column; }
    .sidebar { width: 100%; margin-bottom: 16px; box-sizing: border-box; }

    table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    th, td { font-size: 13px; padding: 9px; }

    .modal-overlay { z-index: 10001; }
    .modal-content {
        width: 95%;
        padding: 24px 16px 16px 16px;
        margin-top: 10px;
        max-height: 90vh;
        box-sizing: border-box;
    }
    .form-group { margin-bottom: 14px; }

    .close-btn {
        top: 10px;
        right: 12px;
        font-size: 24px;
        width: 38px;
        height: 38px;
        background-color: #f1f5f9;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 20;
    }
}