@charset "UTF-8";
@import url("yf-ui-custom.css");
/* ==========================================================================
   yf-ui.css — 預約系統統一風格樣式（Design System / Component Layer）
   --------------------------------------------------------------------------
   ● 本檔是「全站唯一的風格來源」：卡片、標題、表單欄位、按鈕、標籤、提示、
     徽章、表格等的顏色、圓角、陰影、字級、間距一律由這裡定義。
   ● 頁面中的 Tailwind 只用於「排版」（grid / flex / 寬度 / 間距位置），
     不要再用 Tailwind 的 bg-*、border-*、rounded-*、shadow-*、text-xs… 去
     描述元件的「外觀」，避免各頁漂移。
   ● 選擇器一律加 `body` 前綴（specificity 0,1,1），確保穩定勝過 Tailwind
     的單一 class 工具類（0,1,0），因此不需要 !important。
   ● 修改後請調整引入頁面的 ?v= 版本（自動取 filemtime，無需手動）。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 設計權杖 (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
    /* 文字色 */
    --yf-ink: #0f172a;          /* slate-900：標題、主要文字 */
    --yf-ink-2: #334155;        /* slate-700：內文 */
    --yf-ink-3: #4b5563;        /* gray-600：次要說明 */
    --yf-muted: #6b7280;        /* gray-500：輔助文字 */
    --yf-faint: #9ca3af;        /* gray-400：提示、placeholder */

    /* 表面色 */
    --yf-surface: #ffffff;      /* 卡片/欄位底色 */
    --yf-surface-soft: #f9fafb; /* gray-50：輸入框預設底、hover 底 */
    --yf-surface-mute: #f3f4f6; /* gray-100：頁面底、停用底 */
    --yf-line: #f3f4f6;         /* gray-100：卡片外框、分隔線 */
    --yf-line-strong: #e5e7eb;  /* gray-200：輸入框外框 */

    /* 主色 / 狀態色 */
    --yf-primary: #0f172a;
    --yf-primary-hover: #1e293b;
    --yf-primary-soft: #f1f5f9;
    --yf-focus: #0f172a;
    --yf-danger: #e11d48;       /* rose-600 */
    --yf-danger-soft: #FFF5F5;   /* blush：刪除／停用按鈕底 */
    --yf-success: #059669;      /* emerald-600 */
    --yf-success-soft: #ecfdf5;
    --yf-warning: #b45309;      /* amber-700 */
    --yf-warning-soft: #fffbeb;
    --yf-info: #2563eb;
    --yf-info-soft: #eff6ff;

    /* 圓角 */
    --yf-radius-sm: 0.625rem;   /* 10px：小徽章、小按鈕 */
    --yf-radius: 0.75rem;       /* 12px：輸入框、一般按鈕 (rounded-xl) */
    --yf-radius-lg: 1rem;       /* 16px：提示框、次要卡片 (rounded-2xl) */
    --yf-radius-xl: 1.5rem;     /* 24px：主要卡片 (rounded-3xl) */
    --yf-radius-pill: 999px;

    /* 陰影 */
    --yf-shadow-none: none;
    --yf-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --yf-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
    --yf-shadow-lg: 0 12px 32px -12px rgba(15, 23, 42, 0.28);

    /* 元件尺寸 */
    --yf-field-pad-y: 0.625rem;  /* 輸入框上下內距 */
    --yf-field-pad-x: 0.8125rem; /* 輸入框左右內距 */
    --yf-field-font: 0.8125rem;  /* 13px */
    --yf-btn-h: 2.5rem;
    --yf-btn-h-sm: 2rem;
    --yf-btn-h-lg: 3rem;
    --yf-btn-font: 0.75rem;
    --yf-btn-font-sm: 0.6875rem;
    --yf-btn-font-lg: 0.8125rem;
    --yf-btn-radius: var(--yf-radius);

    /* 按鈕顏色（與 --yf-primary 分開，避免改按鈕時連帶影響側邊欄與選取狀態） */
    --yf-btn-primary-bg: var(--yf-primary);
    --yf-btn-primary-bg-hover: var(--yf-primary-hover);
    --yf-btn-primary-text: #ffffff;
    --yf-btn-secondary-text: var(--yf-ink-2);
    --yf-btn-secondary-border: var(--yf-line-strong);
    --yf-btn-secondary-hover-bg: var(--yf-surface-soft);

    /* 側邊欄 */
    --yf-sidebar-w: 16rem;       /* 桌面側邊欄寬度 */
    --yf-sidebar-w-rail: 4.5rem; /* 桌面收合（圖示列）寬度 */
    --yf-nav-h: 2.375rem;        /* 導覽項目最小高度 */
    --yf-nav-icon: 1.125rem;     /* 導覽圖示尺寸（18px） */
    --yf-nav-font: 0.8125rem;    /* 桌面導覽字級（13px） */
    --yf-nav-font-mobile: 0.9375rem; /* 手機導覽字級（15px） */

    /* 過場 */
    --yf-transition: background-color 0.18s ease, color 0.18s ease,
        border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

@media (min-width: 768px) {
    :root {
        --yf-field-font: 0.875rem; /* 桌機 14px，維持原本 text-sm 觀感 */
    }
}

/* --------------------------------------------------------------------------
   2. 基礎文字與表單元素
   -------------------------------------------------------------------------- */
body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Noto Sans TC",
        "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body input[type="checkbox"],
body input[type="radio"] {
    accent-color: var(--yf-primary);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

body ::placeholder {
    color: var(--yf-faint);
    opacity: 1;
}

body ::selection {
    background: var(--yf-primary);
    color: #fff;
}

/* --------------------------------------------------------------------------
   3. 頁面標題 / 區塊標題
   -------------------------------------------------------------------------- */
body .yf-page-head {
    margin-bottom: 0.5rem;
}

body .yf-eyebrow {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--yf-faint);
}

body .yf-page-title {
    margin: 0.25rem 0 0;
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--yf-ink);
}

@media (min-width: 768px) {
    body .yf-page-title {
        font-size: 1.875rem;
    }
}

body .yf-page-sub {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--yf-muted);
}

/* 卡片內的分段標題（原：text-base font-bold + 底部細線） */
body .yf-section-title {
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--yf-line);
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--yf-ink);
}

/* 小標（原：text-xs uppercase tracking-wide） */
body .yf-sub-title {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--yf-ink-2);
}

/* --------------------------------------------------------------------------
   4. 卡片 (Card)
   -------------------------------------------------------------------------- */
body .yf-card {
    background: var(--yf-surface);
    border: 1px solid var(--yf-line);
    border-radius: var(--yf-radius-xl);
    box-shadow: var(--yf-shadow-sm);
    padding: 1.25rem;
}

@media (min-width: 768px) {
    body .yf-card {
        padding: 2rem;
    }
}

body .yf-card--soft {
    border-color: var(--yf-line-strong);
    box-shadow: var(--yf-shadow-none);
}

body .yf-card--flat {
    box-shadow: var(--yf-shadow-none);
}

body .yf-card--pop {
    box-shadow: var(--yf-shadow-lg);
    border-color: var(--yf-line-strong);
}

/* 有標題列＋內容區的卡片：自身不留內距，由 header/body 各自控制 */
body .yf-card--flush {
    padding: 0;
    overflow: hidden;
}

/* 固定高度的統計小卡（h-36 之類）：使用較精簡的內距 */
body .yf-card--tight {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    body .yf-card--tight {
        padding: 1.5rem;
    }
}

body .yf-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--yf-surface);
    border-bottom: 1px solid var(--yf-line);
}

@media (min-width: 768px) {
    body .yf-card__header {
        padding: 1.5rem 2rem;
    }
}

body .yf-card__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--yf-ink);
}

@media (min-width: 768px) {
    body .yf-card__title {
        font-size: 1.125rem;
    }
}

body .yf-card__body {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    body .yf-card__body {
        padding: 1.75rem 2rem;
    }
}

body .yf-card__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem;
    border-top: 1px solid var(--yf-line);
    background: var(--yf-surface-soft);
}

/* 卡片內的小卡（原本常見的 bg-gray-50 區塊） */
body .yf-subcard {
    background: var(--yf-surface-soft);
    border: 1px solid var(--yf-line);
    border-radius: var(--yf-radius);
    padding: 1rem;
}

/* --------------------------------------------------------------------------
   5. 表單欄位 (Form)
   -------------------------------------------------------------------------- */
body .yf-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.6875rem;
    line-height: 1.35;
    font-weight: 600;
    color: var(--yf-ink-3);
}

body .yf-label--lg {
    font-size: 0.75rem;
}

body .yf-hint {
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    line-height: 1.5;
    color: var(--yf-faint);
}

body .yf-required::after {
    content: " *";
    color: var(--yf-danger);
}

body .yf-input,
body .yf-select,
body .yf-textarea {
    display: block;
    padding: var(--yf-field-pad-y) var(--yf-field-pad-x);
    font-size: var(--yf-field-font);
    line-height: 1.45;
    color: var(--yf-ink);
    background-color: var(--yf-surface-soft);
    border: 1px solid var(--yf-line-strong);
    border-radius: var(--yf-radius);
    transition: var(--yf-transition);
    outline: none;
    box-sizing: border-box;
}

body .yf-textarea {
    min-height: 5.5rem;
    resize: vertical;
}

body .yf-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 1rem 1rem;
    cursor: pointer;
}

body .yf-input:hover:not(:disabled),
body .yf-select:hover:not(:disabled),
body .yf-textarea:hover:not(:disabled) {
    border-color: #d1d5db; /* gray-300 */
}

body .yf-input:focus,
body .yf-select:focus,
body .yf-textarea:focus {
    background-color: var(--yf-surface);
    border-color: var(--yf-focus);
    box-shadow: 0 0 0 1px var(--yf-focus);
}

body .yf-input:disabled,
body .yf-select:disabled,
body .yf-textarea:disabled,
body .yf-input[readonly] {
    background-color: var(--yf-surface-mute);
    color: var(--yf-muted);
    cursor: not-allowed;
}

body .yf-input--white {
    background-color: var(--yf-surface);
}

/* 膠囊型欄位（原本 rounded-full 的搜尋框等） */
body .yf-input--pill,
body .yf-select--pill,
body .yf-textarea--pill {
    border-radius: var(--yf-radius-pill);
}

/* 檔案上傳 */
body .yf-file {
    display: block;
    width: 100%;
    font-size: 0.75rem;
    color: var(--yf-muted);
}

body .yf-file::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--yf-primary);
    border: 0;
    border-radius: var(--yf-radius);
    cursor: pointer;
    transition: var(--yf-transition);
}

body .yf-file::file-selector-button:hover {
    background-color: var(--yf-primary-hover);
}

body .yf-field-error {
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--yf-danger);
}

/* --------------------------------------------------------------------------
   6. 按鈕 (Button)
   -------------------------------------------------------------------------- */
body .yf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: var(--yf-btn-h);
    padding: 0 1.25rem;
    font-size: var(--yf-btn-font);
    font-weight: 600;
    line-height: 1;
    color: var(--yf-ink-2);
    background-color: var(--yf-surface);
    border: 1px solid transparent;
    border-radius: var(--yf-btn-radius);
    box-shadow: var(--yf-shadow-none);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--yf-transition);
}

body .yf-btn:disabled,
body .yf-btn[disabled],
body .yf-btn.is-disabled {
    opacity: 0.72; /* keep blush colors readable; still clearly non-interactive */
    cursor: not-allowed;
    box-shadow: none;
}

/* danger-soft／outline：停用時唔好再叠 Tailwind opacity-*，避免同啟用「移除／刪除」色差 */
body .yf-btn.yf-btn--danger-soft:disabled,
body .yf-btn.yf-btn--danger-soft[disabled],
body .yf-btn.yf-btn--danger-outline:disabled,
body .yf-btn.yf-btn--danger-outline[disabled] {
    opacity: 1;
    filter: none;
    color: #BE123C !important;
    background-color: #FFF5F5 !important;
    border: 1px solid #E8A8AE !important;
}

body .yf-btn--sm {
    height: var(--yf-btn-h-sm);
    padding: 0 0.9rem;
    font-size: var(--yf-btn-font-sm);
}

body .yf-btn--lg {
    height: var(--yf-btn-h-lg);
    padding: 0 2rem;
    font-size: var(--yf-btn-font-lg);
}

body .yf-btn--pill {
    border-radius: var(--yf-radius-pill);
}

/* 原本以 block 排版的按鈕／導覽項目：維持區塊級（滿版）而非縮成內容寬度 */
body .yf-btn--block {
    display: flex;
}

body .yf-btn--primary {
    color: var(--yf-btn-primary-text);
    background-color: var(--yf-btn-primary-bg);
    box-shadow: var(--yf-shadow-sm);
}

body .yf-btn--primary:hover {
    background-color: var(--yf-btn-primary-bg-hover);
}

body .yf-btn--secondary {
    color: var(--yf-btn-secondary-text);
    background-color: var(--yf-surface);
    border-color: var(--yf-btn-secondary-border);
    box-shadow: var(--yf-shadow-sm);
}

body .yf-btn--secondary:hover {
    background-color: var(--yf-btn-secondary-hover-bg);
    border-color: var(--yf-btn-secondary-border);
}

body .yf-btn--quiet {
    color: var(--yf-ink-3);
    background-color: var(--yf-surface-mute);
    border-color: transparent;
}

body .yf-btn--quiet:hover {
    background-color: var(--yf-line-strong);
    color: var(--yf-ink);
}

body .yf-btn--ghost {
    color: var(--yf-muted);
    background-color: transparent;
    border-color: transparent;
    box-shadow: var(--yf-shadow-none);
}

body .yf-btn--ghost:hover {
    color: var(--yf-ink);
    background-color: var(--yf-surface-soft);
}

body .yf-btn--danger {
    color: #fff;
    background-color: var(--yf-danger);
    box-shadow: var(--yf-shadow-sm);
}

body .yf-btn--danger:hover {
    background-color: #be123c; /* rose-700 */
}

/* 粉紅危險按鈕：刪除／移除／停用 — 淺玫瑰（對齊參考圖，唔用濃紅 #e11d48） */
body .yf-btn.yf-btn--danger-soft,
body a.yf-btn.yf-btn--danger-soft,
body button.yf-btn.yf-btn--danger-soft {
    color: #BE123C !important; /* deep rose text — like PDF */
    background-color: #FFF5F5 !important; /* pale blush */
    border: 1px solid #E8A8AE !important; /* soft rose border */
    border-radius: var(--yf-btn-radius, 12px) !important;
    box-shadow: var(--yf-shadow-sm);
}

body .yf-btn.yf-btn--danger-soft:hover,
body a.yf-btn.yf-btn--danger-soft:hover,
body button.yf-btn.yf-btn--danger-soft:hover {
    background-color: #FFECEE !important;
    border-color: #E8A8AE !important;
    color: #9F1239 !important;
}

/* 與 danger-soft 同款（停用／刪除帳戶等） */
body .yf-btn.yf-btn--danger-outline,
body a.yf-btn.yf-btn--danger-outline,
body button.yf-btn.yf-btn--danger-outline {
    color: #BE123C !important;
    background-color: #FFF5F5 !important;
    border: 1px solid #E8A8AE !important;
    border-radius: var(--yf-btn-radius, 12px) !important;
    box-shadow: var(--yf-shadow-sm);
}

body .yf-btn.yf-btn--danger-outline:hover,
body a.yf-btn.yf-btn--danger-outline:hover,
body button.yf-btn.yf-btn--danger-outline:hover {
    background-color: #FFECEE !important;
    border-color: #E8A8AE !important;
    color: #9F1239 !important;
}

body .yf-btn--success {
    color: #fff;
    background-color: var(--yf-success);
    box-shadow: var(--yf-shadow-sm);
}

body .yf-btn--success:hover {
    background-color: #047857; /* emerald-700 */
}

/* --------------------------------------------------------------------------
   7. 徽章 / 狀態標籤 (Badge)
   -------------------------------------------------------------------------- */
body .yf-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.3;
    border-radius: var(--yf-radius-pill);
    background-color: var(--yf-surface-mute);
    color: var(--yf-ink-3);
    white-space: nowrap;
}

body .yf-badge--success {
    background-color: var(--yf-success-soft);
    color: var(--yf-success);
}

body .yf-badge--danger {
    background-color: var(--yf-danger-soft);
    color: var(--yf-danger);
}

body .yf-badge--warning {
    background-color: var(--yf-warning-soft);
    color: var(--yf-warning);
}

body .yf-badge--info {
    background-color: var(--yf-info-soft);
    color: var(--yf-info);
}

body .yf-badge--solid {
    background-color: var(--yf-primary);
    color: #fff;
}

/* --------------------------------------------------------------------------
   8. 提示訊息 (Alert)
   -------------------------------------------------------------------------- */
body .yf-alert {
    display: block;
    padding: 0.875rem 1.125rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.6;
    border: 1px solid var(--yf-line-strong);
    border-radius: var(--yf-radius-lg);
    background-color: var(--yf-surface-soft);
    color: var(--yf-ink-2);
    word-break: break-word;
}

/* hidden must beat display:block (Tailwind .hidden loses to body .yf-alert) */
body .yf-alert.hidden,
body .yf-alert[hidden] {
    display: none !important;
    padding: 0;
    margin: 0;
    border: 0;
}

body .yf-alert--success {
    border-color: #a7f3d0;
    background-color: var(--yf-success-soft);
    color: #047857;
}

body .yf-alert--danger {
    border-color: #fecdd3;
    background-color: var(--yf-danger-soft);
    color: #be123c;
}

body .yf-alert--warning {
    border-color: #fde68a;
    background-color: var(--yf-warning-soft);
    color: var(--yf-warning);
}

body .yf-alert--info {
    border-color: #bfdbfe;
    background-color: var(--yf-info-soft);
    color: #1d4ed8;
}

/* --------------------------------------------------------------------------
   9. 表格 (Table)
   -------------------------------------------------------------------------- */
body .yf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

body .yf-table th {
    padding: 0.75rem 0.875rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--yf-muted);
    background-color: var(--yf-surface-soft);
    border-bottom: 1px solid var(--yf-line-strong);
    white-space: nowrap;
}

body .yf-table td {
    padding: 0.75rem 0.875rem;
    color: var(--yf-ink-2);
    border-bottom: 1px solid var(--yf-line);
    vertical-align: middle;
}

body .yf-table tbody tr:hover {
    background-color: var(--yf-surface-soft);
}

/* --------------------------------------------------------------------------
   10. 其他共用元件
   -------------------------------------------------------------------------- */
/* 空狀態 */
body .yf-empty {
    padding: 2.5rem 1.25rem;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.7;
    color: var(--yf-faint);
    background-color: var(--yf-surface-soft);
    border-radius: var(--yf-radius-lg);
}

/* 分隔線 */
body .yf-divider {
    height: 1px;
    background-color: var(--yf-line);
    border: 0;
    margin: 0;
}

/* 工具列（搜尋/篩選列） */
body .yf-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

/* 資訊列 (label / value) */
body .yf-kv-label {
    font-size: 0.6875rem;
    color: var(--yf-faint);
}

body .yf-kv-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--yf-ink);
}

/* 開合卡片按鈕（沿用 admin_operations.php 樣式） */
body .yf-collapse-btn {
    height: auto;
    padding: 0.375rem 1.25rem;
}

/* 對話框（modal）內容卡 */
body .yf-modal-card {
    background: var(--yf-surface);
    border: 1px solid var(--yf-line);
    border-radius: var(--yf-radius-xl);
    box-shadow: var(--yf-shadow-lg);
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   11. 側邊欄（Sidebar）／側邊導覽項目／圖示按鈕
   --------------------------------------------------------------------------
   三段式結構：品牌（固定）／導覽（可捲）／底部使用者區（固定）。
   桌面可收合成 --yf-sidebar-w-rail（圖示列）；手機為滑出抽屜，
   開合由頁面 JS 切換 `-translate-x-full`／`hidden` 與 `yf-scroll-lock`。
   選中樣式＝淡底 + 左側 3px 指示條（`.is-active`）。
   -------------------------------------------------------------------------- */
body .yf-sidebar {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 20rem;
}

/* 平台主控台：以靛藍為主色（只覆寫選中的區域權杖，其他樣式共用） */
body .yf-sidebar--platform {
    --yf-primary: #4f46e5;
    --yf-primary-soft: #eef2ff;
}

/* 品牌區（不隨導覽捲動；與下方使用者區共用同一條分隔線） */
body .yf-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 1rem 0.625rem;
}

/* 使用者區（Logo／品牌下方，不隨導覽捲動） */
body .yf-sidebar__user {
    padding: 0 1rem 1rem;
    border-bottom: 1px solid var(--yf-line);
}

body .yf-sidebar__user .yf-user-chip {
    margin: 0;
}

/* 導覽區（唯一可捲動的區塊） */
body .yf-sidebar__nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.75rem;
}

/* 底部使用者區（不隨導覽捲動） */
body .yf-sidebar__foot {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    border-top: 1px solid var(--yf-line);
}

/* 機構標記：有 Logo 放 <img>，沒有時放名稱首字 */
body .yf-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--yf-radius-sm);
    overflow: hidden;
    background: var(--yf-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

body .yf-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body .yf-brand-text {
    min-width: 0;
}

body .yf-brand-name {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--yf-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body .yf-brand-sub {
    margin: 0.125rem 0 0;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--yf-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body .yf-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    min-height: var(--yf-nav-h);
    padding: 0.5rem 0.75rem;
    font-size: var(--yf-nav-font-mobile);
    font-weight: 500;
    line-height: 1.25;
    color: var(--yf-ink-3);
    border-radius: var(--yf-radius-sm);
    text-decoration: none;
    transition: var(--yf-transition);
}

body .yf-nav-item + .yf-nav-item {
    margin-top: 0.125rem;
}

body .yf-nav-item:hover {
    background-color: var(--yf-surface-soft);
    color: var(--yf-ink);
}

body .yf-nav-item:focus-visible {
    outline: 2px solid var(--yf-focus);
    outline-offset: 2px;
}

/* 選中樣式（方案 A）：淡底 + 左側 3px 指示條 */
body .yf-nav-item.is-active {
    background-color: var(--yf-primary-soft);
    color: var(--yf-ink);
    font-weight: 600;
}

body .yf-nav-item.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 1.125rem;
    transform: translateY(-50%);
    border-radius: 0 3px 3px 0;
    background: var(--yf-primary);
}

body .yf-nav-item__icon {
    display: inline-flex;
    flex-shrink: 0;
    width: var(--yf-nav-icon);
    height: var(--yf-nav-icon);
    color: var(--yf-faint);
    transition: var(--yf-transition);
}

body .yf-nav-item__icon svg {
    width: 100%;
    height: 100%;
}

body .yf-nav-item:hover .yf-nav-item__icon,
body .yf-nav-item.is-active .yf-nav-item__icon {
    color: currentColor;
}

body .yf-nav-item__label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

body .yf-nav-item__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 1.25rem;
    height: 1.125rem;
    margin-left: auto;
    padding: 0 0.375rem;
    border-radius: var(--yf-radius-pill);
    background: var(--yf-surface-mute);
    color: var(--yf-ink-2);
    font-size: 0.625rem;
    font-weight: 700;
}

body .yf-nav-item.is-active .yf-nav-item__badge {
    background: var(--yf-surface);
    color: var(--yf-ink);
}

body .yf-nav-item--danger {
    color: var(--yf-danger);
}

body .yf-nav-item--danger:hover {
    background-color: var(--yf-danger-soft);
    color: #be123c;
}

body .yf-nav-item--sub {
    min-height: 2rem;
    font-size: 0.75rem;
    color: var(--yf-muted);
}

/* 分組標籤（組內沒有可見項目時，PHP 端不會輸出整組） */
body .yf-nav-group + .yf-nav-group {
    margin-top: 0.875rem;
}

body .yf-nav-group__label,
body .yf-sidebar__label {
    margin: 0 0 0.375rem;
    padding: 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--yf-faint);
}

/* 底部使用者卡 */
body .yf-user-chip {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0.25rem 0 0.375rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--yf-radius-sm);
    background: var(--yf-surface-soft);
}

body .yf-user-chip__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--yf-radius-pill);
    background: var(--yf-primary);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
}

body .yf-user-chip__meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

body .yf-user-chip__name {
    align-self: stretch;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--yf-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body .yf-user-chip__role {
    font-size: 0.625rem;
    color: var(--yf-faint);
}

/* 平台代理登入提示 */
body .yf-impersonate-chip {
    display: inline-block;
    align-self: flex-start;
    margin: 0 0 0.375rem;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--yf-radius-pill);
    background: var(--yf-warning-soft);
    color: var(--yf-warning);
    font-size: 0.625rem;
    font-weight: 600;
}

/* 手機版頂部橫條（品牌 + 選單鈕）：只在 <1024px 顯示，見檔尾 §12 */
body .yf-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--yf-line);
}

body .yf-topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

body .yf-topbar .yf-brand-mark {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    font-size: 0.625rem;
}

body .yf-topbar__name {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--yf-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 抽屜遮罩 */
body .yf-sidebar-backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

/* 抽屜開啟時鎖住背景捲動（由頁面 JS 切換 class） */
body.yf-scroll-lock {
    overflow: hidden;
}

/* 桌面收合鈕：浮在側欄右緣 */
body .yf-sidebar__collapse {
    position: absolute;
    top: 1.375rem;
    right: -0.75rem;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid var(--yf-line-strong);
    border-radius: var(--yf-radius-pill);
    background: var(--yf-surface);
    color: var(--yf-muted);
    box-shadow: var(--yf-shadow-sm);
    cursor: pointer;
    transition: var(--yf-transition);
}

body .yf-sidebar__collapse svg {
    width: 0.875rem;
    height: 0.875rem;
    transition: transform 0.2s ease;
}

body .yf-sidebar__collapse:hover {
    color: var(--yf-ink);
    border-color: var(--yf-faint);
}

/* 桌面（>=1024px）：固定寬度 + 可收合成圖示列 */
@media (min-width: 1024px) {
    body .yf-sidebar {
        position: sticky;
        top: 0;
        bottom: auto;
        align-self: flex-start;
        width: var(--yf-sidebar-w);
        max-width: none;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
    }

    body .yf-sidebar__collapse {
        display: inline-flex;
    }

    body .yf-nav-item {
        font-size: var(--yf-nav-font);
    }

    body .yf-sidebar.is-collapsed {
        width: var(--yf-sidebar-w-rail);
    }

    body .yf-sidebar.is-collapsed .yf-sidebar__collapse svg {
        transform: rotate(180deg);
    }

    body .yf-sidebar.is-collapsed .yf-brand-text,
    body .yf-sidebar.is-collapsed .yf-user-chip__meta,
    body .yf-sidebar.is-collapsed .yf-nav-item__label {
        display: none;
    }

    body .yf-sidebar.is-collapsed .yf-sidebar__brand {
        justify-content: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    body .yf-sidebar.is-collapsed .yf-sidebar__nav,
    body .yf-sidebar.is-collapsed .yf-sidebar__user,
    body .yf-sidebar.is-collapsed .yf-sidebar__foot {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    body .yf-sidebar.is-collapsed .yf-nav-group__label,
    body .yf-sidebar.is-collapsed .yf-sidebar__label {
        height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        font-size: 0;
    }

    body .yf-sidebar.is-collapsed .yf-nav-group + .yf-nav-group {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--yf-line);
    }

    body .yf-sidebar.is-collapsed .yf-nav-item {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    body .yf-sidebar.is-collapsed .yf-nav-item__badge {
        position: absolute;
        top: 0.1875rem;
        right: 0.5rem;
        margin: 0;
        min-width: 1rem;
        height: 1rem;
        padding: 0 0.25rem;
        font-size: 0.5625rem;
    }

    body .yf-sidebar.is-collapsed .yf-user-chip {
        justify-content: center;
        padding: 0.375rem 0;
        background: transparent;
    }

    body .yf-sidebar.is-collapsed .yf-nav-item.is-active::before {
        height: 1.375rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .yf-sidebar,
    body .yf-nav-item,
    body .yf-sidebar__collapse svg {
        transition: none;
    }
}

body .yf-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: var(--yf-ink-3);
    background: transparent;
    border: 0;
    border-radius: var(--yf-radius);
    cursor: pointer;
    transition: var(--yf-transition);
}

body .yf-icon-btn:hover {
    background-color: var(--yf-surface-mute);
    color: var(--yf-ink);
}

body .yf-icon-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}


/* --------------------------------------------------------------------------
   11b. 保存／載入忙碌狀態（yf-busy）
   -------------------------------------------------------------------------- */
html.yf-busy-lock,
body.yf-busy-lock {
    overflow: hidden !important;
}
body.yf-busy-lock {
    pointer-events: none !important;
}
body.yf-busy-lock .yf-busy-overlay {
    pointer-events: auto !important;
}

body .yf-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

body .yf-busy-overlay:not([hidden]) {
    display: flex !important;
}

body .yf-busy-overlay[hidden] {
    display: none !important;
}

body .yf-busy-card {
    min-width: min(18rem, 100%);
    max-width: 22rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    background: var(--yf-surface);
    border: 1px solid #e5e7eb;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
    text-align: center;
}

body .yf-busy-spinner {
    width: 2rem;
    height: 2rem;
    margin: 0 auto 0.85rem;
    border-radius: 9999px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--yf-btn-primary-bg, #0f172a);
    animation: yf-busy-spin 0.75s linear infinite;
}

@keyframes yf-busy-spin {
    to { transform: rotate(360deg); }
}

body .yf-busy-text {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--yf-ink);
    letter-spacing: 0.01em;
}

body .yf-busy-sub {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--yf-muted);
}

body .yf-busy-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 100000;
    transform: translateX(-50%) translateY(0.75rem);
    padding: 0.7rem 1.1rem;
    border-radius: 9999px;
    background: #065f46;
    color: #ecfdf5;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 12px 28px rgba(6, 95, 70, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body .yf-busy-toast[hidden] {
    display: none;
}

body .yf-busy-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   12. 響應式顯示（斷點與側邊欄一致：1024px）
   --------------------------------------------------------------------------
   本檔元件的選擇器一律寫成 `body .yf-xxx`（權重 0,1,1），比 Tailwind 的
   `lg:hidden`（0,1,0）高，所以「只在手機顯示」的元件若只靠 Tailwind 的
   `lg:` 變體，會被本檔的 `display: flex` / `inline-flex` 蓋掉而在桌機外露
   （topbar、抽屜關閉鈕都會卡在版面中間）。因此：
     - 行動版專用元件請加 `yf-mobile-only`，並由本區塊負責在 >=1024px 隱藏；
     - Tailwind 的 `lg:hidden` 對這些元件無效，不要依賴它。
   本區塊刻意放在檔案最後，確保同權重時後者勝出。
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
    body .yf-mobile-only,
    body .yf-topbar,
    body .yf-sidebar-backdrop {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   t203: 總覽當日課堂／場地卡片、管理員代預約彈卡、多身分顯示
   marker:yf-t203-today
   -------------------------------------------------------------------------- */
.yf-identity-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    font-size: 11px;
    line-height: 1.4;
    color: #4f46e5;
    font-weight: 600;
}
.yf-identity-status--sidebar {
    margin-top: 0.15rem;
    color: #4338ca;
    flex-direction: column;
    align-items: flex-start;
}
.yf-identity-status--page,
.yf-identity-status--home {
    margin-top: 0.25rem;
}
.yf-identity-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
    font-size: 0.75rem; /* text-xs，對齊「展開」按鈕 */
    line-height: 1rem;
    font-weight: 500;
    color: #fff;
    background-color: #0f172a; /* slate-900 */
    padding: 0.5rem 1.25rem; /* py-2 px-5 */
    border-radius: 0.75rem; /* rounded-xl */
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.yf-identity-switch:hover,
.yf-identity-switch:focus {
    background-color: #1e293b; /* slate-800 */
    color: #fff;
    text-decoration: none;
}
.yf-identity-switch:focus-visible {
    outline: 2px solid #64748b;
    outline-offset: 2px;
}
.yf-identity-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    background: #fff;
}
.yf-identity-choice:hover,
.yf-identity-choice:has(input:checked),
.yf-identity-choice.is-current {
    border-color: #c7d2fe;
    background: #eef2ff;
}
.yf-identity-choice input {
    margin-top: 0.2rem;
}
.yf-identity-choice__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.yf-identity-choice__role {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.yf-identity-choice__name,
.yf-identity-choice__email {
    font-size: 11px;
    color: #64748b;
}
.yf-proxy-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
}
.yf-proxy-modal-backdrop.hidden {
    display: none;
}
.yf-proxy-modal {
    width: 100%;
    max-width: 28rem;
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}
.yf-proxy-member-list {
    max-height: 14rem;
    overflow-y: auto;
    border: 1px solid #f3f4f6;
    border-radius: 0.9rem;
    background: #fafafa;
}
.yf-proxy-member {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.8rem;
    border: 0;
    border-bottom: 1px solid #f3f4f6;
    background: transparent;
    cursor: pointer;
}
.yf-proxy-member:last-child {
    border-bottom: 0;
}
.yf-proxy-member:hover {
    background: #eef2ff;
}
.yf-proxy-member.is-selected {
    background: #e0e7ff;
}
.yf-proxy-member__name {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
}
.yf-proxy-member__sub {
    font-size: 10px;
    color: #64748b;
}
.yf-proxy-member-empty {
    padding: 1.25rem 0.75rem;
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
}
.yf-today-slot {
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.45rem 0.7rem;
}
.yf-today-slot.is-rest {
    background: #f8fafc;
}
.yf-today-slot__top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
}
.yf-today-slot__time {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}
.yf-today-slot__title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0;
    line-height: 1.35;
}
.yf-today-slot__meta {
    margin-top: 0.1rem;
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
}
.yf-today-slot__students {
    margin-top: 0.55rem;
    font-size: 11px;
    color: #334155;
}
.yf-today-badge-rest {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
}


/* --------------------------------------------------------------------------
   t204: 總覽系統摘要「當日課堂」彈卡、課堂顯示設定、已隱藏標記
   marker:yf-t204-summary
   marker:yf-t204-hide
   -------------------------------------------------------------------------- */
.yf-t204-summary-modal {
    /* 與現有後台彈卡一致：半透明遮罩置中 */
}
.yf-t204-summary-card {
    background: var(--yf-surface, #fff);
}
.yf-t204-summary-body {
    min-height: 4rem;
}
.yf-t204-summary-trigger {
    cursor: pointer;
    appearance: none;
    font: inherit;
    color: inherit;
}
.yf-today-badge-hidden {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #6d28d9;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
}
.yf-today-slot.is-hidden-from-booking {
    border-color: #ede9fe;
}
.yf-t204-hide {
    /* 課堂顯示設定欄位容器，供 HTTP 抽查識別 */
}


/* --------------------------------------------------------------------------
   t205: 系統摘要各格不同色調、當日課堂彈卡取消／代預約操作
   t206: 摘要格改為同營運財務卡同一套設計語言
         （圓角淡底滿色、淺色邊、無左側色條、左上英文／右上中文標、中間大數字、下方細項）
         色調仍用紫菫／天藍／青綠／琥珀／青藍，不複用收入綠／支出紅
   marker:yf-t205-summary
   marker:yf-t206-summary
   -------------------------------------------------------------------------- */
.yf-t205-summary,
.yf-t206-summary {
    /* 系統摘要色塊網格標記 */
}
.yf-t205-summary-tile,
.yf-t206-summary-tile {
    position: relative;
    display: block;
    box-sizing: border-box;
    border-radius: 1rem; /* 與財務卡 rounded-2xl 一致 */
    padding: 1.25rem; /* 與財務卡 p-5 一致 */
    text-align: left;
    overflow: hidden;
    transition: border-color .15s ease, background-color .15s ease;
    text-decoration: none;
    font: inherit;
    color: inherit;
    appearance: none;
    cursor: pointer;
    box-shadow: none;
}
.yf-t205-summary-tile::before,
.yf-t206-summary-tile::before {
    content: none; /* t206：取消 t205 左側 4px 色條 */
    display: none;
}
.yf-t206-summary-tile__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.yf-t206-summary-tile__en {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    min-width: 0;
}
.yf-t206-summary-tile__zh {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.7; /* 與財務卡 text-*-700/70 層次一致 */
    flex-shrink: 0;
}
.yf-t205-summary-tile__value,
.yf-t206-summary-tile__value {
    margin-top: 0.5rem; /* mt-2 */
    margin-bottom: 0;
    font-size: 1.5rem; /* text-2xl */
    line-height: 1.2;
    font-weight: 700;
    color: #0f172a; /* slate-900，與財務卡大數字一致 */
}
@media (min-width: 640px) {
    .yf-t205-summary-tile__value,
    .yf-t206-summary-tile__value {
        font-size: 1.875rem; /* sm:text-3xl */
    }
}
.yf-t206-summary-tile__hint {
    margin-top: 0.75rem; /* mt-3 */
    margin-bottom: 0;
    font-size: 11px;
    line-height: 1.5;
    color: #6b7280; /* gray-500 */
}
/* 當日課堂：紫菫（有別於收入綠／支出紅）／violet-100 邊 + violet-50/50 底 */
.yf-t205-summary-tile--today,
.yf-t206-summary-tile--today {
    border: 1px solid #ede9fe;
    background: rgba(245, 243, 255, 0.5);
}
.yf-t206-summary-tile--today .yf-t206-summary-tile__en,
.yf-t206-summary-tile--today .yf-t206-summary-tile__zh {
    color: #6d28d9; /* violet-700 */
}
.yf-t206-summary-tile--today:hover {
    border-color: #ddd6fe;
    background: rgba(245, 243, 255, 0.85);
}
/* 會員總數：天藍／sky-100 邊 + sky-50/50 底 */
.yf-t205-summary-tile--members,
.yf-t206-summary-tile--members {
    border: 1px solid #e0f2fe;
    background: rgba(240, 249, 255, 0.5);
}
.yf-t206-summary-tile--members .yf-t206-summary-tile__en,
.yf-t206-summary-tile--members .yf-t206-summary-tile__zh {
    color: #0369a1; /* sky-700 */
}
.yf-t206-summary-tile--members:hover {
    border-color: #bae6fd;
    background: rgba(240, 249, 255, 0.85);
}
/* 導師總數：青綠／teal-100 邊 + teal-50/50 底 */
.yf-t205-summary-tile--instructors,
.yf-t206-summary-tile--instructors {
    border: 1px solid #ccfbf1;
    background: rgba(240, 253, 250, 0.5);
}
.yf-t206-summary-tile--instructors .yf-t206-summary-tile__en,
.yf-t206-summary-tile--instructors .yf-t206-summary-tile__zh {
    color: #0f766e; /* teal-700 */
}
.yf-t206-summary-tile--instructors:hover {
    border-color: #99f6e4;
    background: rgba(240, 253, 250, 0.85);
}
/* 即將開始課堂：琥珀／amber-100 邊 + amber-50/50 底 */
.yf-t205-summary-tile--upcoming,
.yf-t206-summary-tile--upcoming {
    border: 1px solid #fef3c7;
    background: rgba(255, 251, 235, 0.5);
}
.yf-t206-summary-tile--upcoming .yf-t206-summary-tile__en,
.yf-t206-summary-tile--upcoming .yf-t206-summary-tile__zh {
    color: #b45309; /* amber-700 */
}
.yf-t206-summary-tile--upcoming:hover {
    border-color: #fde68a;
    background: rgba(255, 251, 235, 0.85);
}
/* 有效預約：青藍／cyan-100 邊 + cyan-50/50 底 */
.yf-t205-summary-tile--bookings,
.yf-t206-summary-tile--bookings {
    border: 1px solid #cffafe;
    background: rgba(236, 254, 255, 0.5);
}
.yf-t206-summary-tile--bookings .yf-t206-summary-tile__en,
.yf-t206-summary-tile--bookings .yf-t206-summary-tile__zh {
    color: #0e7490; /* cyan-700 */
}
.yf-t206-summary-tile--bookings:hover {
    border-color: #a5f3fc;
    background: rgba(236, 254, 255, 0.85);
}

.yf-today-slot__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
    margin-top: 0;
}
.yf-today-slot.is-cancelled {
    opacity: .62;
}
.yf-today-modal-notice {
    font-size: 12px;
    line-height: 1.5;
    border-radius: .75rem;
    padding: .55rem .75rem;
}
.yf-today-modal-notice.hidden {
    display: none;
}
.yf-today-modal-notice.is-ok {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.yf-today-modal-notice.is-error {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}
.yf-t205-summary-body {
    /* 彈卡內容區標記，與 t204 共用 overflow */
}


/* t207: gap between low-credit alert and package credit cards */
body .yf-alert.yf-app-low-credit-legacy.yf-t207-gap,
body .yf-t207-gap.yf-app-low-credit-legacy {
    margin-bottom: 24px;
}
body .yf-t207-gap + .yf-app-credits-row {
    margin-top: 0;
}


/* marker:yf-t208-fix */
/* Net Profit 卡跟隨系統摘要「會員總數／Total Members」天藍色 */
.yf-t208-net-profit {
    border-color: #e0f2fe; /* sky-100，同 Total Members */
    background: rgba(240, 249, 255, 0.5); /* #f0f9ff / sky-50 */
}
.yf-t208-net-profit__en,
.yf-t208-net-profit__zh {
    color: #0369a1; /* sky-700，同 Total Members 標籤 */
}
.yf-t208-net-profit__zh {
    color: #0284c7; /* sky-600，略淺一點的中文標 */
}
.yf-t208-net-profit__value {
    color: #0f172a; /* slate-900，同摘要大數字 */
}

/* 套票餘額偏低：購買套票靠右；保留 t207 的 24px 空隙 */
body .yf-alert.yf-app-low-credit-legacy.yf-t208-low-credit,
body .yf-t208-low-credit.yf-app-low-credit-legacy {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}
body .yf-t208-low-credit__text {
    flex: 1 1 220px;
    min-width: 0;
}
body .yf-t208-low-credit__btn {
    margin-left: auto;
    flex: 0 0 auto;
    align-self: center;
}


/* --------------------------------------------------------------------------
   t209: 已建立時段「已預約人數」可點彈卡、學員名單與取消預約
   marker:yf-t209
   -------------------------------------------------------------------------- */
.yf-t209-slot-count {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    text-align: inherit;
}
.yf-t209-slot-count:hover,
.yf-t209-slot-count:focus-visible {
    color: #4f46e5;
    text-decoration-style: solid;
    outline: none;
}
.yf-t209-attendees-modal {
    /* 與總覽彈卡同一套遮罩與置中 */
}
.yf-t209-attendees-body {
    min-height: 4rem;
}
.yf-t209-attendees-notice {
    font-size: 12px;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}
.yf-t209-attendees-notice.is-ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.yf-t209-attendees-notice.is-error {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}
.yf-t209-attendees-empty {
    /* 無人預約時的空狀態 */
}


/* --------------------------------------------------------------------------
   t212: 後台「系統更新」列表
   marker:yf-t212
   -------------------------------------------------------------------------- */
.yf-t212-updates {
    padding: 1.25rem 1.25rem 0.5rem;
}
.yf-t212-empty {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: #64748b;
}
.yf-t212-day {
    margin: 0 0 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.yf-t212-day:last-child {
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 0;
}
.yf-t212-day__date {
    margin: 0 0 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #475569;
}
.yf-t212-day__list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.yf-t212-entry {
    padding: 0.9rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #fff;
}
.yf-t212-entry__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    margin-bottom: 0.4rem;
}
.yf-t212-type {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.4;
}
.yf-t212-type--update {
    background: #eef2ff;
    color: #4338ca;
}
.yf-t212-type--fix {
    background: #fff7ed;
    color: #c2410c;
}
.yf-t212-scope {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
}
.yf-t212-entry__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.45;
}
.yf-t212-entry__items {
    margin: 0.5rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.8125rem;
    line-height: 1.65;
    color: #334155;
}
.yf-t212-entry__items li + li {
    margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   t213: 總覽「最新通知」有待處理時，卡片框顏色跟隨「即將開始課堂」
   marker:yf-t213
   -------------------------------------------------------------------------- */
.yf-t213-notice-card.yf-t213-notice-card--attention {
    border-color: #fef3c7; /* amber-100，同即將開始課堂 */
    background: rgba(255, 251, 235, 0.5); /* amber-50 / 50% */
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    --tw-shadow-color: initial;
    --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
}
.yf-t213-notice-card--attention .yf-t213-notice-card__head {
    background: transparent;
    border-bottom-color: #fef3c7;
}
.yf-t213-notice-card--attention .yf-t213-notice-card__title {
    color: #b45309; /* amber-700，同即將開始課堂標籤 */
}
.yf-t213-notice-card--attention .yf-t213-notice-pending {
    border-color: #fef3c7;
    background: rgba(255, 251, 235, 0.5);
}
.yf-t213-notice-card--attention .yf-t213-notice-item--unread {
    border-color: #fef3c7;
    background: rgba(255, 251, 235, 0.5);
}


/* 會員列表「編輯列」彈卡（欄顯示／排序） */
body .yf-col-editor {
    width: 100%;
    max-width: 28rem;
}
body .yf-col-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: grab;
    width: 1.25rem;
    flex-shrink: 0;
}
body .yf-col-handle:active {
    cursor: grabbing;
}
body .yf-col-sort-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    font-size: 0.8125rem;
    color: #0f172a;
}
body .yf-col-sort-item.is-dragging {
    opacity: 0.55;
}
body .yf-col-sort-item__label {
    flex: 1 1 auto;
    min-width: 0;
}
body .yf-col-sort-item__remove {
    color: #94a3b8;
    background: transparent;
    border: 0;
    padding: 0.15rem;
    line-height: 1;
    cursor: pointer;
    font-size: 1.1rem;
}
body .yf-col-sort-item__remove:hover {
    color: #475569;
}
body .yf-col-sort-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* 會員列表：可調欄寬、置頂表頭、凍結名稱欄（t266） */
body .yf-member-list-scroll {
    overflow: auto;
    max-height: min(70vh, calc(100dvh - 13.5rem));
    min-height: 10rem;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    background: #fff;
}
@media (min-width: 1024px) {
    body .yf-member-list-scroll {
        max-height: min(70vh, calc(100dvh - 11rem));
    }
}
body .yf-member-list-table,
body .yf-member-list-table col,
body .yf-member-list-table th,
body .yf-member-list-table td {
    box-sizing: border-box;
}
body .yf-member-list-table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 100%;
    background: #fff;
}
body .yf-member-list-table thead th.yf-member-list-th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #f8fafc;
    background-clip: padding-box;
    box-shadow: inset 0 -1px 0 0 #e2e8f0;
    padding: 0.625rem 0.75rem;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
    color: #64748b;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    vertical-align: middle;
}
body .yf-member-list-table thead th.yf-member-list-th.is-sticky-name {
    left: 0;
    z-index: 8;
    isolation: isolate;
    background: #f8fafc;
    background-clip: padding-box;
}
body .yf-member-list-table tbody td {
    overflow: hidden;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    background-clip: padding-box;
}
body .yf-member-list-table tbody td.is-sticky-name {
    position: sticky;
    left: 0;
    z-index: 3;
    isolation: isolate;
    background: #fff;
    background-clip: padding-box;
}
body .yf-member-list-table tbody tr.is-inactive-row td.is-sticky-name {
    background: #FFF5F5;
}
body .yf-member-list-table tbody tr:hover td.is-sticky-name {
    background: #f8fafc;
}
body .yf-member-list-table tbody tr.is-inactive-row:hover td.is-sticky-name {
    background: #fff1f2;
}
body .yf-member-list-scroll.is-scrolled-x tbody td.is-sticky-name {
    box-shadow: 6px 0 8px -6px rgba(15, 23, 42, 0.18);
}
body .yf-member-list-scroll.is-scrolled-x thead th.is-sticky-name {
    box-shadow: 6px 0 8px -6px rgba(15, 23, 42, 0.18), inset 0 -1px 0 0 #e2e8f0;
}
body .yf-col-header-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 0.65rem;
    min-width: 0;
}
body .yf-col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
    z-index: 2;
}
body .yf-col-resizer::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 3px;
    width: 2px;
    height: 60%;
    border-radius: 1px;
    background: transparent;
}
body .yf-member-list-th:hover .yf-col-resizer::after,
body .yf-col-resizer.is-active::after {
    background: #94a3b8;
}
body .yf-member-list-table.yf-is-resizing,
body .yf-member-list-table.yf-is-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}
body .yf-member-name-cell {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.25rem;
}
body .yf-member-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1 1 auto;
}
body .yf-member-name-badge {
    flex: 0 0 auto;
}
body .yf-member-list-table tbody td.is-actions-col {
    overflow: visible;
}

/* t269 / t270: 當日課堂獨立頁 — 加厚日期分組、緊湊課堂卡、操作按鈕同組 */
body .yf-today-slots-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
body .yf-today-day-slots {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 0.45rem;
}
body .yf-today-day-heading {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0.85rem 1rem;
    min-height: 2.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.01em;
}
body .yf-today-day-heading[data-is-today="1"] {
    background: #eef2ff;
    border-color: #c7d2fe;
    padding: 1.1rem 1.15rem;
    min-height: 3.4rem;
    font-size: 1.0625rem;
    box-shadow: inset 4px 0 0 #6366f1;
}
body .yf-today-slot__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
}
body .yf-today-slot__info {
    flex: 1 1 12.5rem;
    min-width: 0;
}
body .yf-today-slot__headline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.55rem;
}
body .yf-today-slot__title .yf-today-badge-rest,
body .yf-today-slot__title .yf-today-badge-hidden {
    margin-left: 0.25rem;
    vertical-align: middle;
}
body .yf-today-slot__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    flex: 0 1 auto;
}
body .yf-today-slot__top-end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    min-width: 0;
}
body .yf-today-slot__cancel-form {
    margin: 0;
    display: inline-flex;
}
body .yf-today-slot__tools .yf-btn,
body .yf-today-slot__tools .yf-t209-slot-count--today {
    min-height: 2rem;
}
body .yf-t209-slot-count--today {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    line-height: 1.3;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}
body .yf-t209-slot-count--today.is-rest {
    color: #b45309;
}
body .yf-t209-slot-count--today:hover,
body .yf-t209-slot-count--today:focus-visible {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
body .yf-today-range-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}
body .yf-today-range-bar label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}
body .yf-today-range-bar input[type="date"] {
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 12px;
    padding: 0.35rem 0.7rem;
    background: #fff;
    color: #0f172a;
}
body .yf-today-range-bar input[type="date"]:disabled {
    opacity: 0.65;
}


/* --------------------------------------------------------------------------
   t271–t275: 已建立時段「按日子」手機星期選日列（t275：單列對齊工具列）
   -------------------------------------------------------------------------- */
.yf-byday-weekbar {
    display: block;
    margin: 0 0 0.65rem;
    padding: 0.1rem 0.05rem 0.3rem;
    background: #fff;
    position: sticky;
    top: var(--yf-byday-sticky-top, 5.5rem);
    z-index: 20;
    pointer-events: auto;
}
.yf-byday-weekbar__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.1rem 0.1rem 0.4rem;
    position: relative;
    z-index: 1;
    flex-wrap: nowrap;
}
.yf-byday-weekbar__month {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    color: #0f172a;
    line-height: 1.2;
}
.yf-byday-weekbar__month-btn {
    appearance: none;
    font: inherit;
    border: 0;
    background: transparent;
    padding: 0.1rem 0.1rem 0.1rem 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    min-width: 0;
    max-width: 100%;
    text-align: left;
    cursor: pointer;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.yf-byday-weekbar__month-label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.yf-byday-weekbar__controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.yf-byday-weekbar__month-hint {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.01em;
    line-height: 1;
    flex-shrink: 0;
    pointer-events: none; /* clicks go to the label / the visible date input */
    position: relative;
    z-index: 1;
}
.yf-byday-weekbar__pick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    color: #334155;
    flex-shrink: 0;
    pointer-events: none;
    position: relative;
    z-index: 1;
}
.yf-byday-weekbar__pick-icon svg {
    display: block;
}
.yf-byday-weekbar__pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    margin: 0;
    height: 2.25rem;
    min-height: 2.25rem;
    max-width: 100%;
    padding: 0 0.65rem;
    box-sizing: border-box;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 3;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}
.yf-byday-weekbar__pick:hover,
.yf-byday-weekbar__pick:focus-within {
    border-color: #cbd5e1;
    background: #f8fafc;
}
/* Visible, full-size, opaque date input filling the 「選擇日期」 chip.
   Native typography is made transparent so the chip stays tidy, but the
   input itself stays opacity: 1 with real dimensions (iOS will not open a
   near-invisible overlay). */
.yf-byday-weekbar__date-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    line-height: 2.25rem;
    color: transparent;
    -webkit-text-fill-color: transparent;
    caret-color: transparent;
    cursor: pointer;
    opacity: 1;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
}
.yf-byday-weekbar__date-input::-webkit-datetime-edit,
.yf-byday-weekbar__date-input::-webkit-datetime-edit-fields-wrapper,
.yf-byday-weekbar__date-input::-webkit-datetime-edit-text,
.yf-byday-weekbar__date-input::-webkit-datetime-edit-year-field,
.yf-byday-weekbar__date-input::-webkit-datetime-edit-month-field,
.yf-byday-weekbar__date-input::-webkit-datetime-edit-day-field,
.yf-byday-weekbar__date-input::-webkit-date-and-time-value {
    color: transparent;
    -webkit-text-fill-color: transparent;
    padding: 0;
}
.yf-byday-weekbar__date-input::-webkit-inner-spin-button,
.yf-byday-weekbar__date-input::-webkit-clear-button {
    display: none;
    -webkit-appearance: none;
}
.yf-byday-weekbar__date-input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    color: transparent;
    cursor: pointer;
    /* Indicator fills the visible chip for desktop click-to-open.
       Opacity 0 is only on this pseudo-element; the input itself stays opacity: 1. */
    opacity: 0;
}
.yf-byday-weekbar__nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}
.yf-byday-weekbar__chev,
.yf-byday-weekbar__today {
    appearance: none;
    font: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #0f172a;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(15, 23, 42, 0.12);
    pointer-events: auto;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}
.yf-byday-weekbar__chev {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 1.35rem;
    line-height: 1;
    color: #334155;
}
.yf-byday-weekbar__chev:hover,
.yf-byday-weekbar__chev:focus-visible,
.yf-byday-weekbar__chev:active {
    background: #f1f5f9;
}
.yf-byday-weekbar__today {
    height: 2.25rem;
    min-height: 2.25rem;
    padding: 0 0.7rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.yf-byday-weekbar__today:hover,
.yf-byday-weekbar__today:focus-visible {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.yf-byday-weekbar__today.is-current {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}
.yf-byday-weekbar__strip {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    padding: 0.05rem 0 0;
}
.yf-byday-weekbar__day {
    appearance: none;
    font: inherit;
    border: 0;
    background: transparent;
    flex: 1 1 0;
    width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.12rem;
    padding: 0.1rem 0 0.05rem;
    min-width: 0;
    cursor: pointer;
    color: #0f172a;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
}
.yf-byday-weekbar__dow {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.02em;
    line-height: 1.2;
    width: 100%;
    text-align: center;
}
.yf-byday-weekbar__num {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    color: #0f172a;
}
.yf-byday-weekbar__day.is-today:not(.is-selected) .yf-byday-weekbar__num {
    box-shadow: inset 0 0 0 1.5px #cbd5e1;
}
.yf-byday-weekbar__day.is-selected .yf-byday-weekbar__num {
    background: #0f172a;
    color: #fff;
    box-shadow: none;
}
.yf-byday-weekbar__day.is-selected .yf-byday-weekbar__dow {
    color: #0f172a;
    font-weight: 700;
}
.yf-byday-weekbar__dot {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: transparent;
    flex-shrink: 0;
}
.yf-byday-weekbar__day.has-slots .yf-byday-weekbar__dot {
    background: #94a3b8;
}
.yf-byday-weekbar__day.is-selected.has-slots .yf-byday-weekbar__dot {
    background: #0f172a;
}
.yf-byday-empty {
    margin: 0;
    padding: 1.75rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #94a3b8;
    border: 1px dashed #e2e8f0;
    border-radius: 1rem;
    background: #f8fafc;
}
.yf-byday-day-list.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

@media (min-width: 768px) {
    .yf-byday-weekbar {
        display: none !important;
    }
    #slot-view-byday .yf-byday-empty[data-byday-empty-for] {
        display: none !important;
    }
}
@media (max-width: 767px) {
    #slot-view-byday[data-byday-mode="all"] section[data-byday-date]:not(.is-byday-selected) {
        display: none;
    }
}

/* t277: 按日子 7 日窗口分頁列（桌面顯示；手機沿用週覽，隱藏此列以免與週條重疊） */
/* t278: 課堂框與翻頁欄之間加清楚空隙 */
.yf-byday-pagebar {
    padding: 0.15rem 0 0.45rem;
}
.yf-byday-pagebar + #yf-byday-day-list {
    margin-top: 1.25rem;
}
#yf-byday-day-list + .yf-byday-pagebar {
    margin-top: 1.75rem;
    padding-top: 0.35rem;
}
@media (max-width: 767px) {
    .yf-byday-pagebar {
        display: none !important;
    }
}

/* t278: 當日課堂「列印點名紙」選堂彈卡 */
.yf-today-print-modal[hidden] {
    display: none !important;
}
.yf-today-print-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.yf-today-print-day__h {
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    margin: 0 0 0.35rem;
}
.yf-today-print-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.6rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #0f172a;
}
.yf-today-print-item:hover {
    background: #f8fafc;
}
.yf-today-print-item input {
    margin-top: 0.15rem;
    flex-shrink: 0;
}
.yf-today-print-item__meta {
    font-size: 0.6875rem;
    color: #64748b;
    margin-top: 0.1rem;
}
.yf-today-print-hint {
    font-size: 0.75rem;
    color: #b45309;
    min-height: 1.1em;
}
.yf-today-print-hint:empty {
    display: none;
}
.yf-today-print-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
}


/* t279: 自訂發票項目列（類型、關聯項目、名稱、金額） */
.yf-inv-item-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.yf-inv-item-row {
    display: grid;
    grid-template-columns: minmax(7.5rem, 0.9fr) minmax(9rem, 1.1fr) minmax(10rem, 1.4fr) minmax(6.5rem, 0.7fr) auto;
    gap: 0.5rem 0.6rem;
    align-items: end;
    padding: 0.65rem 0.7rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
}
.yf-inv-item-row .yf-label {
    margin-bottom: 0.2rem;
}
.yf-inv-related-wrap.is-hidden,
.yf-inv-related-wrap[hidden] {
    display: none !important;
}
.yf-inv-item-remove {
    height: 2.35rem;
    white-space: nowrap;
}
.yf-inv-item-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.15rem;
}
.yf-inv-item-total {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
}
@media (max-width: 767px) {
    .yf-inv-item-row {
        grid-template-columns: 1fr 1fr;
    }
    .yf-inv-item-row [data-inv-title-wrap],
    .yf-inv-item-row [data-inv-amount-wrap] {
        grid-column: 1 / -1;
    }
    .yf-inv-item-remove {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
