:root {
    /* カラーパレット: 和モダン（相撲） */
    --primary-color: #0f2350; /* 鉄紺: サイドバー、ヘッダー */
    --accent-color: #c9171e;  /* 朱色: アクションボタン、強調 */
    --bg-color: #f4f6f9;      /* 背景色 */
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-sub: #666666;
    --border-color: #e0e0e0;
    
    /* ステータスカラー */
    --status-sales-bg: #e0f2f1;
    --status-sales-text: #00695c;
    --status-provisional-bg: #eceff1;
    --status-provisional-text: #455a64;
    --status-cancelled-bg: #ffebee;
    --status-cancelled-text: #c62828;
    --status-direct-bg: #e8f5e9;
    --status-direct-text: #2e7d32;
    --status-agent-bg: #e3f2fd;
    --status-agent-text: #1565c0;
}

body {
    margin: 0;
    font-family: 'Noto Sans JP', 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    height: 100vh;
    overflow-x: hidden; /* 横はコンテナ内でスクロールさせる */
}

/* レイアウト */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    height: 100%;
}

/* サイドバー */
.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;

    position: fixed;  /* 画面に対して絶対固定 */
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;     /* 他の要素より手前に表示 */
    overflow-y: auto; /* サイドバー内スクロール許可 */
}

.logo-area {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.tanaka-logo {
    width: 100%;
    height: 60px;
    background-image: url("/tanaka/image/logo2.png"); /* 既存パス */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1); /* ロゴを白くする */
    margin-bottom: 10px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    flex-grow: 1;
}
.nav-links li a {
    display: block;
    padding: 15px 25px;
    color: #aeb9cc;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-links li.active a, .nav-links li a:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    border-left: 4px solid var(--accent-color);
}

.user-info {
    padding: 20px;
    background-color: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-info .avatar {
    font-size: 24px;
}
.user-info .user-name {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
}
.user-info .user-role {
    font-size: 10px;
    opacity: 0.7;
    border: 1px solid #fff;
    padding: 1px 4px;
    border-radius: 3px;
}

/* メインエリア */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;

    margin-left: 250px; /* サイドバーの分空ける */
    width: auto;
    max-width: calc(100vw - 250px);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.top-bar h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
}

/* 検索パネル（カードデザイン） */
.search-panel {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    width: 100%;
    max-width: 100%;

    box-sizing: border-box; /* パディングを含めて幅計算 */
}
.search-header {
    padding: 15px 20px;
    background: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bg-color);
}
.search-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--primary-color);
}
.search-body {
    padding: 20px;
    display: none; /* JSでトグル */
}
.search-body.open {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-sub);
    margin-bottom: 5px;
}
.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}
.flex-row {
    display: flex;
    gap: 10px;
}

.search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* ボタン類 */
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
.btn-primary:hover {
    background-color: #1a3a7a;
}
.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
}
.btn-reset {
    background: #f0f0f0;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    color: var(--text-main);
    cursor: pointer;
}
.btn-icon {
    background: none;
    border: none;
    color: var(--text-sub);
    cursor: pointer;
    font-size: 16px;
}
.btn-icon:hover {
    color: var(--accent-color);
}

/* 集計・ページネーション */
.list-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.stats-card {
    display: flex;
    gap: 20px;
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-item .label {
    font-size: 11px;
    color: var(--text-sub);
}
.stat-item .value {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    font-family: 'Roboto', sans-serif;
}
.stat-item .value.price {
    color: var(--accent-color);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-btn {
    border: 1px solid var(--border-color);
    background: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* テーブル */
.table-responsive {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
    overflow-y: auto;

    width: 100%;
    -webkit-overflow-scrolling: touch; /* スマホでの慣性スクロール */
    border: 1px solid var(--border-color); /* 境界をわかりやすく */
}
.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    white-space: nowrap;
}
.modern-table th {
    background-color: #fafafa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-sub);
    border-bottom: 2px solid var(--border-color);
}
.modern-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.modern-table tr:hover {
    background-color: #f9f9f9;
}

/* バッジ、タグ */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block; /* 念のため追加（崩れ防止） */
    line-height: 1;        /* 上下の余白バランス調整 */
}
.status-badge.sales {
    background-color: var(--status-sales-bg);
    color: var(--status-sales-text);
}
.status-badge.provisional {
    background-color: var(--status-provisional-bg);
    color: var(--status-provisional-text);
}
.status-badge.cancelled {
    background-color: var(--status-cancelled-bg);
    color: var(--status-cancelled-text);
}
.status-badge.direct {
    background-color: var(--status-direct-bg);
    color: var(--status-direct-text);
}
.status-badge.agent {
    background-color: var(--status-agent-bg);
    color: var(--status-agent-text);
}
.tag-reserve {
    background-color: var(--accent-color);
    color: #fff;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 2px;
    margin-left: 5px;
}
.id-link {
    font-family: 'Roboto', sans-serif;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}
.id-link:hover {
    text-decoration: underline;
}
.text-right { text-align: right; }
.text-muted { color: #999; font-size: 0.85em; }
.date-cell { font-family: 'Roboto', sans-serif; }
.time { font-weight: bold; margin-left: 5px; }

/* --- スマホ・タブレット用レスポンシブ設定 --- */

/* デフォルトではモバイルヘッダーとオーバーレイを隠す */
.mobile-header, .sidebar-overlay {
    display: none;
}

@media screen and (max-width: 768px) {
    body {
	overflow: auto;       /* スクロールを許可 */
	height: auto;         /* 高さをコンテンツに合わせる */
	-webkit-overflow-scrolling: touch; /* iOSでのスクロールを滑らかに */
    }
    /* 1. モバイルヘッダーの表示 */
    .mobile-header {
        display: flex;
        align-items: center;
        background-color: var(--primary-color); /* 鉄紺 */
        color: #fff;
        height: 60px;
        padding: 0 20px;
        position: fixed; /* 上部に固定 */
        top: 0;
        left: 0;
        width: 100%;
        z-index: 100;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        box-sizing: border-box;
    }

    .hamburger-btn {
        background: none;
        border: none;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
        padding: 5px;
        margin-right: 15px;
    }

    .mobile-logo-small {
        font-weight: bold;
        font-size: 18px;
        letter-spacing: 1px;
    }

    /* 2. サイドバーをスライド式に変更 */
    .dashboard-container {
        display: block; /* Flexを解除 */
        padding-top: 60px; /* ヘッダーの分だけ下げる */
        height: auto; /* 高さを自動に */
	overflow: visible;
    }

    .sidebar {
        display: flex; /* 非表示にせずFlexのまま */
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px; /* 少し幅広に */
        z-index: 1001; /* ヘッダーより上 */
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateX(-100%); /* 画面外（左）へ飛ばす */
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }

    /* サイドバーが開いた時のクラス */
    .sidebar.active {
        transform: translateX(0); /* 画面内に戻す */
    }
    
    /* スマホでサイドバー内のナビゲーションを表示させる修正 */
    .nav-links, .user-info {
        display: block !important; /* 前回noneにしたのを強制表示 */
    }
    .nav-links {
        margin-top: 0;
    }
    .sidebar .logo-area {
        /* サイドバー内のロゴは少し小さく調整 */
        padding: 15px;
        background-color: rgba(0,0,0,0.1);
    }

    /* 3. オーバーレイ（背景暗転） */
    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000; /* ヘッダーより上、サイドバーより下 */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* メインコンテンツの調整 */
    .main-content {
        padding: 10px 0 50px 0;
        height: auto;
	width: 100%;
	max-width: 100%;
        overflow-x: hidden;
	margin-left: 0; /* PC用マージンをリセット */
    }
}

/* --- ダッシュボード用スタイル --- */

/* グリッドレイアウト */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* カード共通 */
.dash-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--primary-color); /* 鉄紺のアクセント */
    transition: transform 0.2s;
}
.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* ホール管理を目立たせる */
.dash-card.highlight {
    border-top-color: var(--accent-color); /* 朱色 */
}

/* ログなどの横長カード */
.dash-card.full-width {
    grid-column: 1 / -1; /* 全幅表示 */
    border-top-color: #999;
}

.card-header {
    padding: 15px 20px;
    background: #fcfcfc;
    border-bottom: 1px solid var(--border-color);
}
.card-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-header h3 i {
    color: var(--text-sub);
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

/* カード内レイアウトバリエーション */
.card-body.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.card-body.flex-row {
    flex-direction: row;
    flex-wrap: wrap;
}

/* ダッシュボードボタン */
.dash-btn {
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-main);
    padding: 15px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
    width: 100%;
}
.dash-btn i {
    font-size: 1.2em;
    color: var(--primary-color);
}
.dash-btn:hover {
    background: #f4f6f9;
    border-color: var(--primary-color);
}

/* ボタンバリエーション */
.dash-btn.primary {
    background: var(--primary-color); /* 鉄紺 */
    color: #fff;
    border: none;
    font-size: 1.1em;
    padding: 20px;
}
.dash-btn.primary i { color: #fff; }
.dash-btn.primary:hover { background: #1a3a7a; }

.dash-btn.secondary {
    background: #fff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.dash-btn.secondary:hover { background: #edf2f7; }

.dash-btn.accent {
    background: var(--accent-color); /* 朱色 */
    color: #fff;
    border: none;
}
.dash-btn.accent i { color: #fff; }
.dash-btn.accent:hover { background: #a81218; }

.dash-btn.sm {
    padding: 10px;
    font-size: 13px;
    flex-direction: column; /* アイコン上、文字下 */
    gap: 5px;
    text-align: center;
}
.dash-btn.sm i { font-size: 1.5em; margin-bottom: 2px; }

.dash-btn.xs {
    width: auto;
    padding: 8px 15px;
    font-size: 12px;
}

.dash-btn.logout:hover {
    background: #ffeeee;
    color: var(--accent-color);
    border-color: var(--accent-color);
}
.dash-btn.logout i { color: var(--accent-color); }

/* フッター */
.dash-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-sub);
    margin-top: auto;
    padding-top: 20px;
}

/* スマホ対応 */
@media screen and (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr; /* 1カラム */
    }
    .dash-card.full-width {
        grid-column: auto;
    }
    .card-body.flex-row {
        flex-direction: column;
    }
    .dash-btn.xs {
        width: 100%;
    }
}

/* --- ログイン画面専用スタイル --- */

.login-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #fff;
    overflow: hidden; /* スクロール防止 */
}

.login-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* 左側：ブランドヒーローエリア */
.login-hero {
    flex: 1.2; /* 右側より少し広く */
    background-color: var(--primary-color, #0f2350); /* 鉄紺 */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 和柄パターン（青海波イメージのCSSグラデーション） */
.hero-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 50% 120%, rgba(255,255,255,0.1) 20%, transparent 21%),
        radial-gradient(circle at 50% 120%, rgba(255,255,255,0.1) 30%, transparent 31%);
    opacity: 0.6;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 40px;
}

.hero-logo {
    width: 200px;
    height: 88px;
    background-image: url("/tanaka/image/logo2.png"); /* 白ロゴ推奨。なければfilterで白くする */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 auto 20px;
    filter: brightness(0) invert(1); /* ロゴを白くする */
}

.login-hero h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 32px;
    margin: 0 0 10px;
    letter-spacing: 2px;
}
.login-hero p {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.6;
}


/* 右側：フォームエリア */
.login-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    padding: 40px;
}

.form-content {
    width: 100%;
    max-width: 400px; /* 入力欄が広がりすぎないように */
}

.mobile-logo {
    display: none; /* PCでは非表示 */
}

.form-title {
    font-size: 24px;
    color: var(--primary-color, #0f2350);
    margin: 0 0 10px;
    font-weight: bold;
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-sub, #666);
    margin: 0 0 40px;
}

/* モダン入力フィールド (Floating Label) */
.input-group {
    position: relative;
    margin-bottom: 30px;
}

.modern-input {
    width: 100%;
    padding: 12px 10px 12px 35px; /* アイコン分の左パディング */
    font-size: 16px;
    border: none;
    border-bottom: 2px solid #ddd;
    background: transparent;
    outline: none;
    border-radius: 0;
    color: #333;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.3s;
}

.modern-input:focus {
    border-bottom-color: var(--primary-color, #0f2350);
}

/* プレースホルダーとして機能するラベル */
.floating-label {
    position: absolute;
    top: 12px;
    left: 35px;
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: 0.3s ease all;
}

.input-icon {
    position: absolute;
    top: 15px;
    left: 5px;
    color: #999;
    font-size: 16px;
    transition: 0.3s;
}

/* 入力がある時、またはフォーカス時にラベルを上に移動 */
.modern-input:focus ~ .floating-label,
.modern-input:not(:placeholder-shown) ~ .floating-label {
    top: -20px;
    left: 0;
    font-size: 12px;
    color: var(--primary-color, #0f2350);
    font-weight: bold;
}

.modern-input:focus ~ .input-icon {
    color: var(--primary-color, #0f2350);
}

/* ログインボタン */
.btn-login {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color, #c9171e); /* 朱色 */
    color: #fff;
    border: none;
    border-radius: 50px; /* 丸みのあるボタン */
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(201, 23, 30, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-login:hover {
    background-color: #a81218;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(201, 23, 30, 0.4);
}

.login-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 11px;
    color: #aaa;
}

/* スマホ対応 */
@media screen and (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    .login-hero {
        display: none; /* スマホではヒーローエリアを非表示、または小さくする */
    }
    .login-form-wrapper {
        padding: 20px;
    }
    .mobile-logo {
        display: block;
        width: 150px;
        height: 60px;
        background-image: url("/tanaka/image/logo2.png");
        background-size: contain;
        background-repeat: no-repeat;
        background-position: left center;
        margin-bottom: 20px;
    }
    .form-title {
        font-size: 20px;
    }
}

/* --- ホール管理 (予約確認) ページ専用スタイル --- */

/* 1. コントロールパネル (日付・時間切替) */
.control-panel {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-wrap: wrap;
    gap: 15px;
}

.date-navigator {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f4f6f9;
    padding: 5px 15px;
    border-radius: 50px;
}
.current-date-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    color: var(--primary-color);
}
.current-date-display .year { font-size: 12px; opacity: 0.7; }
.current-date-display .date { font-size: 20px; }
.nav-btn {
    color: var(--text-sub);
    font-size: 18px;
    cursor: pointer;
}
.nav-btn:hover { color: var(--accent-color); }

.time-tabs {
    display: flex;
    gap: 5px;
}
.time-tab {
    padding: 10px 25px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-sub);
}
.time-tab.active {
    background: var(--primary-color); /* 鉄紺 */
    color: #fff;
    border-color: var(--primary-color);
}
.time-tab:hover:not(.active) {
    background: #eee;
}

/* 2. ホール管理テーブル */
.hall-table th {
    text-align: center;
    background: #eef2f6; /* 少し濃いグレー */
}
.hall-table td {
    vertical-align: middle;
    padding: 12px 8px;
}

/* 卓番カラム (Sticky) */
.table-no {
    font-size: 20px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    background: #fff;
    color: var(--primary-color);
    border-right: 2px solid var(--border-color);
    
    /* スクロール時に左端に固定 */
    position: sticky;
    left: 0;
    z-index: 10;
}
/* 来店済み行の固定カラムの色調整 */
.arrived-row .table-no {
    background: #e8f5e9; /* 緑っぽく */
}

/* 予約タイプバッジ */
.type-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 3px;
    color: #fff;
}
.type-badge.private { background: #5c6bc0; } /* Indigo */
.type-badge.share { background: #ef6c00; }   /* Orange */

/* 人数バッジ */
.pax-badge {
    display: inline-block;
    font-weight: bold;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
}
.pax-badge.empty {
    color: #ccc;
    font-size: 14px;
}
.th-pax { width: 50px; }

/* アラート表示 (食事制限など) */
.alert-cell {
    max-width: 200px;
    white-space: normal; /* 折り返し許可 */
}
.alert-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.alert-label {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
    padding: 2px 5px;
    font-size: 11px;
    border-radius: 3px;
}
.alert-label.high-alert {
    background: #ffebee;
    color: #c62828;
    border-color: #ffcdd2;
    font-weight: bold;
}

/* 3. 行のステータス色分け */
/* 来店済み (Arrived) */
.arrived-row {
    background-color: #e8f5e9; /* 薄い緑 */
}
.arrived-row td {
    color: #2e7d32;
}

/* 空席/無効 (Muted) */
.muted-row {
    background-color: #f9f9f9;
    color: #aaa;
}
.text-muted { color: #aaa; font-size: 12px; }

/* 4. アクションボタン */
.btn-checkin {
    background-color: var(--success, #2e7d32); /* 緑 */
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.btn-checkin:hover { background-color: #1b5e20; }

.btn-checkin.attention {
    background-color: #f57f17; /* オレンジ */
}
.btn-checkin.attention:hover { background-color: #e65100; }

.btn-cancel-checkin {
    background-color: #fff;
    border: 1px solid #999;
    color: #555;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.btn-cancel-checkin:hover { background-color: #eee; }

/* フッターアクション */
.footer-actions {
    margin-top: 30px;
    text-align: center;
}
.back-btn {
    padding: 10px 20px;
}

/* スマホ対応（コントロールパネル調整） */
@media screen and (max-width: 600px) {
    .control-panel {
        flex-direction: column;
        align-items: stretch;
    }
    .date-navigator {
        justify-content: space-between;
    }
    .time-tabs {
        width: 100%;
    }
    .time-tab {
        flex: 1;
        text-align: center;
    }
}

/* --- 予約詳細ページ専用スタイル --- */

.detail-body {
    background-color: #f0f2f5;
    min-height: 100vh;
    padding: 20px 0;
}

.detail-container {
    width: 100%;
    max-width: 600px; /* 読みやすい幅に制限 */
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* ヘッダー */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 20px;
    gap: 10px;
}
.header-logo {
    width: 120px;
    height: 50px;
    background-image: url("/tanaka/image/logo2.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.detail-header h2 {
    font-size: 18px;
    color: var(--primary-color);
    margin: 0;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

/* メインカード */
.detail-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    border-top: 5px solid var(--primary-color);
}

/* ヒーローエリア (テーブル番号など) */
.detail-hero {
    background: #f8f9fa;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.table-badge {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 80px;
}
.table-badge .label {
    display: block;
    font-size: 10px;
    opacity: 0.8;
    letter-spacing: 1px;
}
.table-badge .number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    line-height: 1;
}

.datetime-info {
    text-align: right;
    color: var(--text-main);
}
.datetime-info .date {
    font-size: 14px;
    font-weight: bold;
}
.datetime-info .time {
    font-size: 24px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    color: var(--primary-color);
}

/* 各セクション共通 */
.detail-section {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.detail-section:last-child {
    border-bottom: none;
}

.section-title {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: var(--text-sub);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 基本情報 */
.basic-info .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 15px;
}
.basic-info .info-row:last-child { margin-bottom: 0; }
.info-label { color: #888; }
.info-value { font-weight: bold; color: #333; }
.id-text { font-family: 'Roboto', sans-serif; }
.pax-text { font-size: 18px; }

/* アラートエリア (アレルギー) */
.alert-section {
    background-color: #fff8e1; /* 薄い黄色背景で注意喚起 */
}
.alert-section .section-title {
    color: #f57f17; /* オレンジ文字 */
}

.guest-request-item {
    background: #fff;
    border: 1px solid #ffe0b2;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
}
.guest-request-item:last-child { margin-bottom: 0; }

.guest-label {
    display: block;
    font-size: 12px;
    color: #e65100;
    font-weight: bold;
    margin-bottom: 5px;
    border-bottom: 1px dashed #ffe0b2;
    padding-bottom: 3px;
}

.allergy-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.allergy-list li {
    color: #d32f2f; /* 赤文字 */
    font-weight: bold;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 備考エリア */
.note-content {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    white-space: pre-wrap; /* 改行を反映 */
}

/* アクションボタン */
.detail-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-bottom: 40px;
}

.btn-confirm {
    flex: 2; /* 確認ボタンを大きく */
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 35, 80, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}
.btn-confirm:hover {
    background: #1a3a7a;
    transform: translateY(-2px);
}

.btn-back {
    flex: 1;
    background: #fff;
    color: #666;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-back:hover {
    background: #f0f0f0;
}

/* スマホ微調整 */
@media screen and (max-width: 480px) {
    .detail-hero {
        flex-direction: row; /* 横並び維持 */
    }
    .table-badge .number { font-size: 24px; }
    .datetime-info .time { font-size: 20px; }
}

/* --- エラー画面専用スタイル --- */

.error-body {
    background-color: var(--bg-color); /* 管理画面と同じ背景色 */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.error-container {
    width: 100%;
    max-width: 400px; /* カードが広がりすぎないように */
}

.error-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    /* 上部に朱色のアクセントライン */
    border-top: 5px solid var(--accent-color); 
}

.error-icon {
    font-size: 60px;
    color: var(--accent-color); /* 朱色で強調 */
    margin-bottom: 20px;
    animation: pulse 2s infinite; /* ゆっくり点滅させるアニメーション */
}

.error-title {
    font-family: 'Roboto', sans-serif;
    font-size: 28px;
    color: var(--primary-color); /* 鉄紺 */
    margin: 0 0 15px 0;
    letter-spacing: 1px;
}

.error-message {
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 30px;
    /* 以前のデザインにあったアンダーラインの代わりに、薄い背景で強調 */
    background-color: #fff5f5;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
    text-align: left; /* メッセージは左寄せで読みやすく */
}
.error-message p {
    margin: 0;
}

.error-actions {
    display: flex;
    justify-content: center;
}

/* 戻るボタン（ログインボタンのスタイルを踏襲） */
.btn-error-back {
    background-color: var(--primary-color); /* 鉄紺 */
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(15, 35, 80, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn-error-back:hover {
    background-color: #1a3a7a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(15, 35, 80, 0.3);
}

/* アイコンの簡単なアニメーション定義 */
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- 予約詳細情報 (Admin Info Page) 専用 --- */

/* 1. カードレイアウト */
.info-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
    border-top: 4px solid var(--primary-color);
}

/* 2. 情報グリッド (基本情報) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px 30px; /* 縦横の間隔 */
}

.info-group {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}
/* 全幅要素 */
.info-group.full-width {
    grid-column: 1 / -1;
}

.info-group label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
    font-weight: normal;
}

.info-group .value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    word-break: break-all; /* 長いメアドなどで崩れないように */
}

/* 特定項目の装飾 */
.highlight-box {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
}

.price-text {
    font-size: 20px;
    color: var(--accent-color);
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
}

.note-text {
    background: #fff8e1; /* 薄い黄色 */
    padding: 10px;
    border-radius: 4px;
    color: #5d4037;
    line-height: 1.5;
}

.link-text {
    color: #1976d2;
    text-decoration: none;
}
.link-text:hover {
    text-decoration: underline;
}

/* 3. トランザクションテーブル */
.transaction-table-wrapper {
    max-height: 400px; /* 長すぎる場合はスクロール */
    overflow-y: auto;
}

.transaction-table th {
    width: 30%;
    background-color: #f5f5f5;
    font-size: 13px;
    color: #555;
}
.transaction-table td {
    font-size: 14px;
    color: #333;
}

/* IDなどを等幅フォントで表示 */
.mono-font {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    letter-spacing: -0.5px;
    font-size: 13px;
    color: #444;
}

/* 4. アクションボタンエリア */
.footer-actions-row {
    display: flex;
    align-items: center;
    padding-bottom: 40px;
}

.spacer {
    flex-grow: 1; /* 間を空ける */
}

/* 危険なボタン */
.btn-danger {
    background-color: #fff;
    color: var(--status-cancelled-text); /* 赤文字 */
    border: 1px solid var(--status-cancelled-text);
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-danger:hover {
    background-color: var(--status-cancelled-text);
    color: #fff;
}

/* 5. モーダル内のスタイル */
.modal-title-danger {
    color: #c62828;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 2px solid #c62828;
    display: inline-block;
}
.alert-message {
    text-align: left;
    background: #ffebee;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}
.text-danger {
    color: #c62828;
    font-weight: bold;
}
.confirm-id {
    font-size: 16px;
    text-align: center;
    margin-top: 10px;
}
/* モーダルの実行ボタンを赤くする */
.btn-modal-danger {
    background-color: #c62828 !important;
    color: #fff !important;
    border: none !important;
}
.btn-modal-danger:hover {
    background-color: #b71c1c !important;
}

/* スマホ対応 */
@media screen and (max-width: 600px) {
    .info-grid {
        grid-template-columns: 1fr; /* 1列にする */
    }
    .footer-actions-row {
        flex-direction: column-reverse; /* 戻るボタンを下に */
        gap: 20px;
    }
    .btn-secondary, .btn-danger {
        width: 100%;
        justify-content: center;
    }
    .spacer { display: none; }
}

/* --- 金額変更ページ専用スタイル --- */

.edit-container {
    width: 100%;
    max-width: 600px; /* 入力フォームなので幅を制限して集中させる */
    margin: 0 auto;
}

.edit-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
    border-top: 4px solid var(--accent-color); /* お金に関わるので注意色の赤系 */
}

/* ターゲットIDの強調 */
.target-id {
    font-family: 'Roboto', sans-serif;
    background-color: #eee;
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--primary-color);
}

/* 注意書き */
.warning-box {
    background-color: #e3f2fd;
    color: #0d47a1;
    padding: 15px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 30px;
    border-left: 4px solid #2196f3;
}

/* 入力グリッド */
.input-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* 金額入力フィールドの装飾 */
.money-group .modern-input {
    padding-left: 30px; /* \マークの分空ける */
    font-size: 20px;    /* 数字を大きく */
    font-weight: bold;
    text-align: right;  /* 金額は右寄せ */
    font-family: 'Roboto', sans-serif;
}

.currency-symbol {
    position: absolute;
    bottom: 12px; /* modern-inputのpaddingと合わせる */
    left: 5px;
    font-size: 20px;
    color: #999;
    font-weight: bold;
}

/* modern-inputにフォーカスした時の\マークの色 */
.modern-input:focus ~ .currency-symbol {
    color: var(--primary-color);
}

/* モーダル内のテーブルスタイル (JSで生成されるHTML用) */
.modern-confirm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}
.modern-confirm-table th {
    background: #f5f5f5;
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    color: #555;
    width: 40%;
}
.modern-confirm-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    text-align: right;
}
.text-price {
    font-size: 16px;
    color: var(--accent-color);
    font-family: 'Roboto', sans-serif;
}
.confirm-message {
    text-align: left;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* スマホ対応 */
@media screen and (max-width: 600px) {
    .input-grid-row {
        grid-template-columns: 1fr; /* 縦並び */
        gap: 15px;
    }
}

/* --- アカウント管理ページ専用スタイル --- */

/* 1. アカウントテーブル調整 */
.account-table th {
    white-space: nowrap;
}

/* ID列を目立たせる */
.id-cell {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    color: var(--primary-color);
}

.uid-cell {
    font-family: 'Roboto', sans-serif;
    color: #666;
    font-size: 13px;
}

/* --- 権限バッジ (Role Badge) 10種対応版 --- */
.role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    min-width: 70px; /* 文字数が増えても揃うように少し広げる */
    text-align: center;
    line-height: 1.2;
}

/* 1. 利用停止 (Suspended) - ダークグレー */
.role-badge.lv0 {
    background-color: #424242; /* Dark Grey */
    color: #e0e0e0;
}

/* 2. ホール担当 (Hall) - シアン/水色 */
.role-badge.lv1 {
    background-color: #00acc1; /* Cyan 600 */
}

/* 3. 予約担当 (Reservation) - 緑 */
.role-badge.lv2 {
    background-color: #43a047; /* Green 600 */
}

.role-badge.lv3 {
    background-color: #bdbdbd; /* Grey 400 */
    color: #424242; /* 文字は見やすく濃い色で */
}

.role-badge.lv4 {
    background-color: #bdbdbd; /* Grey 400 */
    color: #424242; /* 文字は見やすく濃い色で */
}

.role-badge.lv5 {
    background-color: #bdbdbd; /* Grey 400 */
    color: #424242; /* 文字は見やすく濃い色で */
}

.role-badge.lv6 {
    background-color: #bdbdbd; /* Grey 400 */
    color: #424242; /* 文字は見やすく濃い色で */
}

.role-badge.lv7 {
    background-color: #bdbdbd; /* Grey 400 */
    color: #424242; /* 文字は見やすく濃い色で */
}

/* 4. 管理者 (Admin) - 青 */
.role-badge.lv8 {
    background-color: #1e88e5; /* Blue 600 */
}

/* 5. スーパーユーザ (Super) - 紫 */
.role-badge.lv9 {
    background-color: #8e24aa; /* Purple 600 */
    border: 1px solid #ab47bc; /* 少しリッチに */
}

/* 3. アクションカラム */
.th-action {
    width: 50px;
    text-align: center;
}

.account-table .btn-icon {
    font-size: 14px;
    padding: 8px;
    color: #555;
    border-radius: 50%;
    transition: background 0.2s;
}
.account-table .btn-icon:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

/* ページネーション周りの微調整 */
.pagination {
    background: #fff;
    padding: 5px 10px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}
.current-page {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 12px;
}
.page-btn {
    border: none;
    background: none;
    color: var(--text-sub);
    font-size: 16px;
    cursor: pointer;
    padding: 0 5px;
}
.page-btn:hover {
    color: var(--accent-color);
}
.page-btn.disabled {
    color: #ccc;
    cursor: default;
}

/* スマホ対応 */
@media screen and (max-width: 600px) {
    .list-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .pagination {
        width: 100%;
        justify-content: center;
    }
}

/* --- アカウント追加・編集ページ専用スタイル --- */

/* フォームセクション区切り */
.form-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.form-section.no-border {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-label {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: bold;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-label::before {
    content: '';
    display: block;
    width: 4px;
    height: 16px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* 必須バッジ */
.required-badge {
    background-color: #ffebee;
    color: #c62828;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
    border: 1px solid #ffcdd2;
}

/* ヘルパーテキスト（入力欄の下の注釈） */
.helper-text {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
    margin-left: 5px;
}

/* セレクトボックスのカスタムスタイル */
.select-group {
    position: relative;
    margin-bottom: 20px;
}

.static-label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-sub);
    margin-bottom: 8px;
}

.select-wrapper {
    position: relative;
}

.modern-select {
    width: 100%;
    padding: 12px 35px 12px 15px; /* 右側に矢印分の余白 */
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    appearance: none; /* デフォルトの矢印を消す */
    -webkit-appearance: none;
    cursor: pointer;
    font-family: 'Roboto', 'Noto Sans JP', sans-serif;
    color: #333;
}
.modern-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 35, 80, 0.1);
}

input.modern-input {
    padding-right: 40px; /* 右側に40pxの余白を強制確保 */
    width: 100%;
    box-sizing: border-box; /* パディングを含めて幅100%にする */
}

/* セレクトボックスの矢印アイコン */
.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none; /* クリックを通過させる */
    font-size: 12px;
}

/* フローティングラベル（既存流用）の調整 */
/* ラベルの位置をアイコンとバッジに合わせて微調整 */
.input-group .floating-label {
    z-index: 1; /* 入力欄より上に */
}

/* --- アカウント削除ボタン --- */
.btn-delete {
    /* 戻るボタン(btn-back)をベースにしたスタイル */
    flex: 1; /* 幅を均等に割り振る */
    background: #fff;
    color: #d32f2f; /* 赤文字 */
    border: 1px solid #d32f2f; /* 赤枠 */
    padding: 15px;
    border-radius: 50px; /* 丸角 */
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
}

/* ホバー時は赤く塗りつぶす */
.btn-delete:hover {
    background: #d32f2f;
    color: #fff;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
    transform: translateY(-2px);
}

/* スマホ表示時の調整（縦並びになったときの間隔など） */
@media screen and (max-width: 600px) {
    .btn-delete {
        width: 100%;
        order: 3; /* スマホでは一番下に配置して誤操作防止（お好みで） */
        margin-top: 10px;
    }
}

/* スマホ対応 */
@media screen and (max-width: 600px) {
    .input-grid-row {
        grid-template-columns: 1fr; /* 縦積み */
        gap: 20px;
    }
    .form-section {
        margin-bottom: 20px;
    }
}

/* --- 人数集計・内訳表示用スタイル --- */

/* 1. 画面上部の集計パネル */
.summary-panel {
    background: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    border-left: 5px solid var(--accent-color); /* 朱色のアクセント */
}

.summary-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-sub);
    margin-right: 10px;
}

.summary-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.summary-label {
    font-size: 12px;
    color: #666;
}

.summary-value {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.summary-value.total {
    font-size: 22px; /* 総数は大きく */
    color: #333;
}

.divider {
    width: 1px;
    height: 20px;
    background-color: #eee;
    margin: 0 5px;
}

/* 2. テーブル内の内訳表示 */
.pax-cell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pax-breakdown {
    margin-top: 4px;
    font-size: 10px;
    color: #666;
    line-height: 1.3;
    white-space: nowrap;
    text-align: left; /* 数字の桁を揃えたい場合はleft, 中央ならcenter */
    background: rgba(0,0,0,0.03);
    padding: 2px 4px;
    border-radius: 3px;
}

.breakdown-row {
    display: block;
}

/* スマホ対応 */
@media screen and (max-width: 600px) {
    .summary-panel {
        gap: 10px;
        justify-content: space-between;
    }
    .summary-title {
        width: 100%; /* タイトルは改行 */
        margin-bottom: 5px;
    }
}

/* --- スケジュール管理 (イベント設定) 専用スタイル --- */

/* 1. 年月選択エリア */
.select-row {
    display: flex;
    gap: 15px;
    align-items: center;
}
.year-select { width: 120px; margin: 0; }
.month-select { width: 100px; margin: 0; }


/* 2. 一括入力エリア (Bulk Section) */
.bulk-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.bulk-header {
    background: #f4f6f9;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
}
.bulk-header h3 {
    margin: 0;
    font-size: 14px;
    color: var(--text-sub);
}

.bulk-body {
    padding: 20px;
}

.bulk-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
}

.bulk-item label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-sub);
    margin-bottom: 8px;
}

/* 曜日トグルボタン */
.day-toggles {
    display: flex;
    gap: 5px;
}

.day-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}
.day-toggle:hover {
    background: #f0f0f0;
}
.day-toggle.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* 土日の色 */
.day-toggle.sat.active { background: #1976d2; border-color: #1976d2; }
.day-toggle.sun.active { background: #d32f2f; border-color: #d32f2f; }

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fafafa;
    padding: 15px;
    border-radius: 6px;
}
.no-check-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}
.bulk-note {
    font-size: 11px;
    color: #888;
    margin-top: 10px;
}


/* 3. スケジュールテーブル */
.schedule-table-wrapper {
    margin-bottom: 80px; /* 下部固定バーのために余白確保 */
}

.schedule-table .th-date {
    width: 100px;
}
.date-cell {
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    text-align: center;
}

.schedule-input {
    width: 100%;
    max-width: 300px;
    font-size: 16px;
    letter-spacing: 1px;
}

/* ロック（予約済み）バッジ */
.lock-area {
    margin-top: 5px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.lock-badge {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 土日の行スタイル */
.row-sat {
    background-color: #e3f2fd; /* 薄い青 */
}
.row-sat .date-cell { color: #1565c0; }

.row-sun {
    background-color: #ffebee; /* 薄い赤 */
}
.row-sun .date-cell { color: #c62828; }


/* 4. 下部固定アクションバー */
.bottom-action-bar {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 250px; /* サイドバーの幅 */
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #ccc;
    padding: 15px 40px;
    display: flex;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    backdrop-filter: blur(5px);
}
.btn-save {
    min-width: 200px;
    padding: 12px;
    font-size: 16px;
}

/* スマホ対応 */
@media screen and (max-width: 768px) {
    .select-row {
        flex-wrap: wrap;
    }
    .bulk-row {
        flex-direction: column;
        gap: 15px;
    }
    .bulk-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .bottom-action-bar {
        left: 0;
        padding: 15px 20px;
        justify-content: space-between;
    }
    .btn-save {
        min-width: auto;
        flex-grow: 1;
        margin-left: 10px;
    }
}
