:root {
    --tblr-font-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
}
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
/* Tabler／Bootstrap 沒有的兩個工具類 */
.text-pre-line { white-space: pre-line; }              /* 使用者輸入的多行文字（選票注意事項） */
.scroll-y-sm { max-height: 360px; overflow-y: auto; }  /* 長清單區內捲動（匯入差異） */
/* 最小欄寬：手機上讓表格在 table-responsive 內橫向捲動，而不是把文字欄擠成一字一行 */
.min-w-8 { min-width: 8rem; }
.min-w-10 { min-width: 10rem; }
.min-w-12 { min-width: 12rem; }
.min-w-18 { min-width: 18rem; }

/* 掃描畫面 */
.scan-input { font-size: 2rem; letter-spacing: .15em; font-family: ui-monospace, Consolas, monospace; }
.scan-result { font-size: 1.6rem; font-weight: 700; min-height: 4.5rem; display: flex; align-items: center; }
.scan-result.ok { background: var(--tblr-green-lt); color: var(--tblr-green); }
.scan-result.dup { background: var(--tblr-yellow-lt); color: #8a6100; }
.scan-result.changed { background: var(--tblr-azure-lt); color: var(--tblr-azure); }
.scan-result.error { background: var(--tblr-red-lt); color: var(--tblr-red); }
/* 掃描頁即時統計：現場要遠看，數字放大並等寬 */
#stats .h1 { font-size: 2.2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* 大螢幕（Tabler 原生樣式，只放大字級） */
body.board .board-title { font-size: 2rem; }
body.board .board-clock { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
body.board .board-num { font-size: 3.2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
body.board .progress-lg { height: 1rem; }
@media (max-width: 575.98px) {
    body.board .board-title, body.board .board-clock { font-size: 1.5rem; }
    body.board .board-num { font-size: 2.4rem; }
}

/* 登入頁 */
.login-body { min-height: 100vh; background: var(--tblr-bg-surface); }
.login-form-col { min-height: 100vh; }
.login-cover {
    position: relative; overflow: hidden; min-height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #206bc4 55%, #4dabf7 100%);
}
.login-cover-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.login-cover-icons {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3rem;
    color: rgba(255,255,255,.9);
}
.login-cover-icons i {
    font-size: 4.5rem; width: 8rem; height: 8rem; display: flex; align-items: center; justify-content: center;
    border-radius: 1.5rem; background: rgba(255,255,255,.12); box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.login-cover-icons i:nth-child(2) { transform: translateY(-2.5rem); }
.captcha-img { cursor: pointer; flex: 0 0 auto; height: auto; max-height: 2.75rem; width: auto; background: #f6f8fb; }

/* 使用說明 */
.help-toc { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; }
.help-toc-list { overflow-y: auto; min-height: 0; }
.help-toc-list .list-group-item.active { font-weight: 600; }
.help-top { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1030; border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity .2s; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.help-top.show { opacity: 1; pointer-events: auto; }
.help-body .card { scroll-margin-top: 1rem; }
.help-body li { margin-bottom: .25rem; }
.help-dl dt { font-weight: 600; }
.help-steps li { margin-bottom: .4rem; }
@media print {
    .help-body .accordion-collapse { display: block !important; }
    .help-body .card { break-inside: avoid; }
}

/* ===== 主題（參考 Tabler 官方 demo：深色品牌列、彩色圖示、卡片色條） ===== */
.navbar-brand-bar {
    background: linear-gradient(90deg, #0b2a55 0%, #0f4c94 60%, #1667c4 100%) !important;
    border-bottom: 0 !important;
}
.navbar-brand-bar .brand-mark {
    width: 2.25rem; height: 2.25rem; border-radius: .6rem; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.16); color: #fff; font-size: 1.4rem;
}
.navbar-brand-bar .brand-sub { color: rgba(255,255,255,.7); }
.navbar-brand-bar .user-avatar { background: rgba(255,255,255,.18); color: #fff; }
.navbar-menu-bar { box-shadow: 0 1px 0 var(--tblr-border-color), 0 2px 10px rgba(24,36,51,.04); }
.navbar-menu-bar .nav-item.active .nav-link-icon,
.navbar-menu-bar .nav-item.active .nav-link-title { color: var(--tblr-primary); }

.card { box-shadow: 0 1px 2px rgba(24,36,51,.04), 0 3px 8px rgba(24,36,51,.03); }
.card-stat { transition: transform .15s ease, box-shadow .15s ease; }
.card-stat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(24,36,51,.08); }
.title-icon {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 1.75rem; height: 1.75rem; border-radius: .5rem; margin-right: .6rem; font-size: 1rem;
}
.card-title { display: flex; align-items: center; }
.page-pretitle { color: var(--tblr-primary); font-weight: 600; }

/* 首頁歡迎區 */
.hero-card {
    position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(135deg, #0b2a55 0%, #0f4c94 50%, #2f8be6 100%);
}
.hero-card .card-body { padding: 2rem; }
.hero-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(90deg, transparent 20%, #000 80%);
}
.hero-title { font-size: 1.75rem; font-weight: 700; color: #fff; }
.hero-date { color: rgba(255,255,255,.75); font-size: .875rem; }
.hero-text { color: rgba(255,255,255,.88); font-size: 1rem; }
.btn-hero-ghost { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.btn-hero-ghost:hover { color: #fff; background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); }
.hero-icons { display: flex; gap: 1.25rem; padding-right: 1rem; }
.hero-icons i {
    font-size: 2.5rem; width: 4.75rem; height: 4.75rem; border-radius: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.13); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.hero-icons i:nth-child(2) { transform: translateY(-1rem); }
@media (max-width: 575.98px) {
    .hero-card .card-body { padding: 1.25rem; }
    .hero-title { font-size: 1.4rem; }
}
.avatar-sm > .ti { font-size: 1.1rem; }
.avatar-md > .ti { font-size: 1.5rem; }

/* 表格列底色（斑馬紋）＋滑過加深 */
.table.card-table { --tblr-table-striped-bg: rgba(var(--tblr-primary-rgb), .04); --tblr-table-hover-bg: rgba(var(--tblr-primary-rgb), .09); }
