/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: #e9f0f7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    color: #2b4056;
    -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }

/* ===== 無障礙工具類 ===== */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 16px; top: -80px; z-index: 5000;
    background: #0b2a4a; color: #fff; padding: 12px 22px; border-radius: 0 0 12px 12px;
    font-weight: 600; text-decoration: none; transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
    border-radius: 6px;
}
.app-container { width: 100%; max-width: 1300px; } /* 稍微加寬最大寬度 */

/* ===== 頂部橫列 ===== */
.header-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; background: #fff; border-radius: 60px; padding: 8px 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); margin-bottom: 28px; border: 1px solid #d9e2ec; }
.logo-area { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.3rem; color: #0b2a4a; letter-spacing: 0.5px; }
.logo-icon { background: #0b2a4a; color: #fff; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.callsign-badge { background: #0066cc; color: #fff; padding: 4px 14px; border-radius: 40px; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.5px; }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; list-style: none; }
.nav-links a { text-decoration: none; color: #2c3e50; font-weight: 500; padding: 10px 18px; border-radius: 40px; transition: 0.2s; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { background: #e6f0ff; color: #0066cc; }

/* ===== 四國語言滑動開關 ===== */
.lang-switch {
    position: relative;
    display: flex;
    align-items: center;
    background: #e0e9f2;
    border-radius: 40px;
    padding: 4px;
    cursor: pointer;
    width: max-content;
    height: 38px;
    user-select: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.lang-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 42px;
    height: calc(100% - 8px);
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.lang-switch[data-active="cn"] .lang-slider { transform: translateX(42px); }
.lang-switch[data-active="en"] .lang-slider { transform: translateX(84px); }
.lang-switch[data-active="ja"] .lang-slider { transform: translateX(126px); }

.lang-option {
    width: 42px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #55697f;
    z-index: 2;
    transition: color 0.3s;
}

.lang-switch[data-active="zh"] .lang-option[data-lang="zh"],
.lang-switch[data-active="cn"] .lang-option[data-lang="cn"],
.lang-switch[data-active="en"] .lang-option[data-lang="en"],
.lang-switch[data-active="ja"] .lang-option[data-lang="ja"] {
    color: #0b2a4a;
}

/* ===== 卡片 ===== */
.card { background: #fff; border-radius: 32px; padding: 28px 30px; box-shadow: 0 8px 24px rgba(0,0,0,0.04); border: 1px solid #e0e9f2; margin-bottom: 28px; }
.card h2 { font-size: 1.5rem; font-weight: 600; color: #0b2a4a; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.card-sub { color: #5a6e85; font-size: 0.95rem; margin-bottom: 22px; }

/* ===== 按鈕 ===== */
.btn { padding: 14px 28px; border-radius: 40px; border: none; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; background: #eef3f9; color: #1f3a5f; }
.btn-primary { background: #0b2a4a; color: #fff; }
.btn-primary:hover { background: #123a63; }
.btn-outline { background: transparent; border: 1px solid #b8cee4; }
.btn-outline:hover { background: #eef6ff; border-color: #7aa9d9; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== 角色標籤 ===== */
.role-badge { padding: 6px 16px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; background: #e3efff; color: #0066cc; display: inline-block; }
.role-badge.admin { background: #fff3e0; color: #b45f06; }

/* ===== 表格 ===== */
.table-wrapper { overflow-x: auto; margin-top: 16px; border-radius: 20px; border: 1px solid #e1eaf2; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: #f4f9ff; text-align: left; padding: 16px 12px; font-weight: 600; color: #1a3a5c; border-bottom: 1px solid #dae5f0; white-space: nowrap; }
td { padding: 14px 12px; border-bottom: 1px solid #edf2f8; color: #2b4056; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafdff; }

/* 🌟 針對管理後台表格的特製優化，讓它不用左右滑動 */
#adminPanel table { min-width: 100% !important; }
#adminPanel th, #adminPanel td { padding: 10px 8px; font-size: 0.85rem; }

/* ===== 狀態徽章 ===== */
.status-badge { padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; background: #e0e9f2; color: #5a6e85; }
.status-badge.applied { background: #f3e5ff; color: #7b3fa0; }
.status-cell { text-align: center; }
.badge-none { background: #e0e9f2; color: #5a6e85; padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.badge-not-needed { background: #f3e5ff; color: #7b3fa0; padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.badge-pending { background: #fff0d9; color: #b45f06; padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.badge-received { background: #d9f0e0; color: #0e6b3e; padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.badge-sent { background: #e0e7ff; color: #3b4e9e; padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.badge-requested { background: #f3e5ff; color: #7b3fa0; padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.badge-completed { background: #d9f0e0; color: #0e6b3e; padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.badge-completed-dark { background: #0f5132; color: #ffffff; padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.badge-approved { background: #d9f0e0; color: #0e6b3e; padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.badge-rejected { background: #fde8e8; color: #b03030; padding: 4px 12px; border-radius: 40px; font-size: 0.8rem; font-weight: 600; display: inline-block; white-space: nowrap; }

/* ===== 搜尋框 ===== */
.search-box { flex: 1; max-width: 300px; min-width: 200px; }
.search-box input { width: 100%; padding: 10px 16px; border-radius: 40px; border: 1.5px solid #cbdae8; font-size: 0.9rem; background: #f8fbfe; outline: none; transition: 0.25s; font-family: inherit; }
.search-box input:focus { border-color: #0066cc; background: #ffffff; box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15); }

/* ===== 篩選下拉選單 ===== */
.filter-select {
    padding: 10px 16px;
    border-radius: 40px;
    border: 1.5px solid #cbdae8;
    font-size: 0.9rem;
    background: #ffffff;
    color: #1f3a5f;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: 0.25s;
}
.filter-select:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15);
}

/* ===== 管理員登入與表單 ===== */
.admin-login-box { background: #f8fbfe; padding: 24px 28px; border-radius: 24px; border: 1px solid #dbe7f3; display: flex; flex-direction: column; gap: 16px; max-width: 400px; margin: 0 auto; }
.admin-login-box input { width: 100%; height: 50px; padding: 10px 20px; border-radius: 12px; border: 1px solid #cbdae8; font-size: 1rem; outline: none; background: #fff; }
.admin-login-box input:focus { border-color: #0066cc; box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }
.admin-login-box .btn { width: 100%; padding: 14px; border-radius: 12px; }

.admin-upload-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 24px; }
.admin-upload-grid > div { flex: 1; min-width: 250px; }
.manual-form { display: flex; flex-direction: column; gap: 10px; }
.manual-form input, .manual-form select { padding: 12px 18px; border-radius: 12px; border: 1.5px solid #cbdae8; outline: none; font-family: inherit; font-size: 1rem; background: #f8fbfe; color: #2b4056; }
.manual-form input:focus, .manual-form select:focus { border-color: #0066cc; background: #fff; box-shadow: 0 0 0 4px rgba(0,102,204,0.15); }

/* ===== 上傳區與縮圖 ===== */
.upload-zone { border: 2px dashed #b8cee4; border-radius: 24px; padding: 32px 24px; text-align: center; background: #fbfdff; transition: 0.2s; }
.upload-zone:hover { border-color: #0066cc; background: #f4faff; }
.upload-label { display: inline-block; background: #0b2a4a; color: #fff; padding: 12px 32px; border-radius: 40px; cursor: pointer; font-weight: 500; transition: 0.2s; margin-bottom: 8px; }
.upload-label:hover { background: #123a63; }
.file-hint { color: #6b8199; font-size: 0.85rem; margin-top: 8px; }
.file-name { margin-top: 12px; font-size: 0.9rem; color: #1f3a5f; font-weight: 500; }
.upload-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.upload-btns label { cursor: pointer; padding: 6px 12px; border-radius: 40px; font-size: 0.78rem; font-weight: 600; border: 1px solid #b8cee4; background: #fff; transition: 0.15s; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.upload-btns label:hover { background: #eef6ff; border-color: #7aa9d9; }
.upload-btns input[type="file"] { display: none; }
.qsl-thumb { width: 40px; height: 28px; object-fit: cover; border-radius: 4px; border: 1px solid #dbe7f3; cursor: pointer; transition: 0.15s; background: #f4f9ff; }
.qsl-thumb:hover { transform: scale(1.05); border-color: #0066cc; }
.qsl-thumb-empty { width: 40px; height: 28px; border-radius: 4px; border: 1px dashed #cbdae8; display: flex; align-items: center; justify-content: center; color: #b8cee4; font-size: 1rem; background: #fbfdff; }

/* ===== 燈箱與 Toast ===== */
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.75); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 24px; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 90%; max-height: 85vh; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); background: #fff; padding: 8px; }
.lightbox-close {
    position: absolute; top: 24px; right: 32px; color: #fff; font-size: 2rem;
    cursor: pointer; line-height: 1; background: transparent; border: 0;
    width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { opacity: 0.7; background: rgba(255,255,255,0.12); }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: #0b2a4a; color: #fff; padding: 14px 32px; border-radius: 60px; font-weight: 500; font-size: 0.95rem; opacity: 0; pointer-events: none; transition: 0.3s ease; box-shadow: 0 12px 28px rgba(0,0,0,0.2); z-index: 3000; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.flex-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.empty-state { text-align: center; padding: 40px 20px; color: #5a6e85; }

/* ===== 響應式 (手機版優化) ===== */
@media (max-width: 700px) {
    .header-bar { flex-direction: column; border-radius: 24px; padding: 16px; gap: 16px; }
    .nav-links { justify-content: center; width: 100%; }
    .nav-links a { padding: 8px 14px; font-size: 0.85rem; }
    .header-bar > div:last-child { width: 100%; justify-content: center; margin-top: 4px; }
    .card { padding: 20px 18px; border-radius: 24px; }
    
    /* 手機版表格調整 */
    #adminPanel table { font-size: 0.75rem; min-width: 800px; }
    #adminPanel th, #adminPanel td { padding: 8px 4px; }
    .search-box { max-width: 100%; width: 100%; margin-top: 10px; }
}

/* ===== 減少動態效果（作業系統設定） ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* ===== 高對比模式 ===== */
@media (prefers-contrast: more) {
    th { color: #0b2a4a; }
    td { color: #14293f; }
    .card-sub, .empty-state { color: #41586f; }
}

/* ===== 管理頁統計面板 ===== */
.stat-panel { background: #f8fbfe; border: 1px solid #dbe7f3; border-radius: 16px; padding: 16px; }
.stat-track { background: #e0e9f2; height: 10px; border-radius: 5px; overflow: hidden; margin-bottom: 10px; }
.muted-label { color: #5a6e85; }
.stat-text { color: #1a3a5c; font-weight: bold; }

/* ===== 後台表格：狀態選單與操作按鈕 ===== */
.status-select-change {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #cbdae8;
    font-size: 0.8rem;
    background: #fff;
    color: #1f3a5f;
    cursor: pointer;
    outline: none;
    max-width: 11em;
}
.btn-del-img { background: #fde8e8; color: #b03030; border: none; padding: 4px 6px; border-radius: 4px; cursor: pointer; font-size: 0.75rem; margin-left: 4px; }
.btn-delete-record { background: #0b2a4a; color: #fff; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 0.75rem; white-space: nowrap; }
.btn-delete-req { background: #fde8e8; color: #b03030; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 0.75rem; white-space: nowrap; }
.btn-approve-req { background: #d9f0e0; color: #0e6b3e; border: none; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.btn-reject-req { background: #fff0d9; color: #b45f06; border: none; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }

.req-card { margin-bottom: 10px; padding: 10px; background: #f8fbfe; border: 1px solid #e0e9f2; border-radius: 8px; position: relative; }
.req-call { color: #7b3fa0; font-size: 0.95rem; }
.req-detail { font-size: 0.85rem; color: #333; margin-bottom: 8px; line-height: 1.4; }
.req-empty { color: #a0b2c6; font-size: 0.85rem; }

.reminder-chip { font-size: 0.7rem; margin-top: 4px; }
.warn-chip { color: #b45f06; background: #fff0d9; padding: 2px 6px; border-radius: 4px; display: inline-block; }
.ok-chip { color: #0e6b3e; }

/* ===== 主題切換按鈕 ===== */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #d9e2ec;
    background: #fff;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    padding: 0;
}
.theme-toggle:hover { background: #eef6ff; border-color: #7aa9d9; }

/* ===== 深色模式（由 js/theme.js 設定 html[data-theme]） ===== */
html[data-theme="dark"] { color-scheme: dark; }

html[data-theme="dark"] body { background: #0b1220; color: #cfdceb; }

html[data-theme="dark"] .header-bar { background: #131c2e; border-color: #24314a; box-shadow: 0 4px 16px rgba(0,0,0,.45); }
html[data-theme="dark"] .logo-area { color: #e6edf7; }

html[data-theme="dark"] .nav-links a { color: #b9c9dd; }
html[data-theme="dark"] .nav-links a:hover,
html[data-theme="dark"] .nav-links a.active { background: rgba(56,189,248,.14); color: #7dd3fc; }

html[data-theme="dark"] .theme-toggle { background: #1e2b42; border-color: #3a4a66; color: #d7e3f4; }
html[data-theme="dark"] .theme-toggle:hover { background: #26364f; border-color: #5b7ba6; }

html[data-theme="dark"] .lang-switch { background: #1b263c; box-shadow: inset 0 2px 4px rgba(0,0,0,.4); }
html[data-theme="dark"] .lang-slider { background: #2f405c; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
html[data-theme="dark"] .lang-option { color: #8fa3bd; }
html[data-theme="dark"] .lang-switch[data-active="zh"] .lang-option[data-lang="zh"],
html[data-theme="dark"] .lang-switch[data-active="cn"] .lang-option[data-lang="cn"],
html[data-theme="dark"] .lang-switch[data-active="en"] .lang-option[data-lang="en"],
html[data-theme="dark"] .lang-switch[data-active="ja"] .lang-option[data-lang="ja"] { color: #e6edf7; }

html[data-theme="dark"] .card { background: #131c2e; border-color: #24314a; box-shadow: 0 8px 28px rgba(0,0,0,.35); }
html[data-theme="dark"] .card h2,
html[data-theme="dark"] .card h3 { color: #e6edf7 !important; }
html[data-theme="dark"] .card-sub { color: #9fb2c9; }
html[data-theme="dark"] .muted-label { color: #9fb2c9; }
html[data-theme="dark"] .stat-text { color: #cfe0f2; }

html[data-theme="dark"] .btn { background: #1e2b42; color: #d7e3f4; }
html[data-theme="dark"] .btn-primary { background: #1e5fa8; color: #fff; }
html[data-theme="dark"] .btn-primary:hover { background: #2a72c4; }
html[data-theme="dark"] .btn-outline { border-color: #3a4a66; color: #c2d3e6; }
html[data-theme="dark"] .btn-outline:hover { background: rgba(56,189,248,.12); border-color: #5b7ba6; }
html[data-theme="dark"] #btnQuery { background: #1e5fa8 !important; }

html[data-theme="dark"] .role-badge { background: rgba(56,189,248,.16); color: #7dd3fc; }
html[data-theme="dark"] .role-badge.admin { background: rgba(251,146,60,.16); color: #fdba74; }

html[data-theme="dark"] .table-wrapper { border-color: #24314a; }
html[data-theme="dark"] th { background: #182238; color: #b9cbe2; border-bottom-color: #24314a; }
html[data-theme="dark"] td { color: #cfdceb; border-bottom-color: #1f2c42; }
html[data-theme="dark"] tr:hover td { background: #17223a; }

html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .admin-login-box,
html[data-theme="dark"] .manual-form input,
html[data-theme="dark"] .manual-form select {
    background: #182238 !important;
    color: #d7e3f4 !important;
    border-color: #2f405c !important;
}
html[data-theme="dark"] .search-box input::placeholder { color: #6d8199; }
html[data-theme="dark"] .admin-login-box { border-color: #24314a; }

html[data-theme="dark"] .upload-zone { background: #131c2e; border-color: #3a4a66; }
html[data-theme="dark"] .upload-zone:hover { background: #16223a; border-color: #5b7ba6; }
html[data-theme="dark"] .upload-label { background: #1e5fa8; }
html[data-theme="dark"] .file-hint { color: #93a4bf; }
html[data-theme="dark"] .qsl-thumb { background: #182238; border-color: #24314a; }

html[data-theme="dark"] .empty-state { color: #9fb2c9; }
html[data-theme="dark"] .toast { background: #1e2b42; }

html[data-theme="dark"] .stat-panel { background: #182238; border-color: #24314a; }
html[data-theme="dark"] .stat-track { background: #22304a; }

html[data-theme="dark"] .badge-none,
html[data-theme="dark"] .status-badge { background: rgba(148,163,184,.18); color: #c3d0e0; }
html[data-theme="dark"] .badge-pending { background: rgba(251,191,36,.16); color: #fbbf24; }
html[data-theme="dark"] .badge-received,
html[data-theme="dark"] .badge-approved,
html[data-theme="dark"] .badge-completed { background: rgba(52,211,153,.16); color: #34d399; }
html[data-theme="dark"] .badge-sent { background: rgba(129,140,248,.18); color: #a5b4fc; }
html[data-theme="dark"] .badge-not-needed,
html[data-theme="dark"] .badge-requested,
html[data-theme="dark"] .status-badge.applied { background: rgba(167,139,250,.18); color: #c4b5fd; }
html[data-theme="dark"] .badge-rejected { background: rgba(248,113,113,.16); color: #f87171; }
html[data-theme="dark"] .badge-completed-dark { background: #17603c; color: #fff; }

/* 後台表格元件 */
html[data-theme="dark"] .status-select-change { background: #182238 !important; color: #d7e3f4 !important; border-color: #2f405c !important; }
html[data-theme="dark"] .upload-btns label { background: #1e2b42; border-color: #3a4a66; color: #c2d3e6; }
html[data-theme="dark"] .upload-btns label:hover { background: #26364f; border-color: #5b7ba6; }
html[data-theme="dark"] .btn-del-img,
html[data-theme="dark"] .btn-delete-req { background: rgba(248,113,113,.16); color: #f87171; }
html[data-theme="dark"] .btn-delete-record { background: #1e5fa8; color: #fff; }
html[data-theme="dark"] .btn-approve-req { background: rgba(52,211,153,.16); color: #34d399; }
html[data-theme="dark"] .btn-reject-req { background: rgba(251,191,36,.16); color: #fbbf24; }
html[data-theme="dark"] .req-card { background: #182238; border-color: #24314a; }
html[data-theme="dark"] .req-call { color: #c4b5fd; }
html[data-theme="dark"] .req-detail { color: #cfdceb; }
html[data-theme="dark"] .req-empty { color: #7f92a8; }
html[data-theme="dark"] .warn-chip { background: rgba(251,191,36,.16); color: #fbbf24; }
html[data-theme="dark"] .ok-chip { color: #34d399; }

/* ===== 列印（管理頁印地址用） ===== */
@media print {
    body { background: #fff !important; padding: 0; color: #000; }
    .header-bar,
    .skip-link,
    .upload-zone,
    .admin-login-box,
    .search-box,
    .filter-select,
    .theme-toggle,
    .lang-switch,
    #paginationContainer,
    #loginSection,
    #btnBuildThumbs,
    #thumbProgress,
    [class*="btn-delete"] { display: none !important; }

    .card { box-shadow: none !important; border: none !important; padding: 0 !important; margin: 0 0 16px !important; background: #fff !important; }
    .card h2, .card h3 { color: #000 !important; }
    .card-sub { color: #333 !important; }
    .table-wrapper { overflow: visible !important; border: 1px solid #999 !important; }
    table { font-size: 10pt; }
    th { background: #eee !important; color: #000 !important; }
    td { color: #000 !important; border-bottom: 1px solid #ccc !important; }
    tr { page-break-inside: avoid; }
    tr:hover td { background: transparent !important; }
    .btn, button, label.upload-label { display: none !important; }
    a[href]::after { content: "" !important; }
}
