/* 分校配色（主任在看板「看板配色」選）：<html data-campus-theme="navy|teal">；沒設定＝原本的暖橘（playful.css）。
   規則只寫一份，用變數換色：
   navy 深藍灰：#FFFFFF #F1F3F5 #6C7A89 #2C3E50 #1A252F
   teal 墨綠焦糖：#FAF5EC #EADFC8 #D4A373 #287271 #1D3B3A */
html[data-campus-theme="navy"]{--t-bg:#f1f3f5;--t-surface:#ffffff;--t-soft:#e4e9ee;--t-softer:#f7f9fa;--t-line:#dfe4e9;--t-line2:#cfd6dd;
 --t-ink:#1a252f;--t-muted:#6c7a89;--t-primary:#2c3e50;--t-primary-dark:#1a252f;--t-accent:#6c7a89;--t-glow:#e4e9ee;
 --t-side:#1a252f;--t-side-text:#c3ccd5;--t-side-muted:#8795a3;--t-side-hover:#2c3e50;--t-side-active:#f1f3f5;--t-side-active-text:#1a252f;--t-side-line:#2c3e50}
html[data-campus-theme="teal"]{--t-bg:#faf5ec;--t-surface:#fffdf8;--t-soft:#eadfc8;--t-softer:#f6efe2;--t-line:#eadfc8;--t-line2:#dccfb3;
 --t-ink:#1d3b3a;--t-muted:#6f6656;--t-primary:#287271;--t-primary-dark:#1d3b3a;--t-accent:#d4a373;--t-glow:#f1e4cc;
 --t-side:#1d3b3a;--t-side-text:#e0dccf;--t-side-muted:#a7b4a7;--t-side-hover:#287271;--t-side-active:#faf5ec;--t-side-active-text:#1d3b3a;--t-side-line:#2d5150}

html[data-campus-theme]{color:var(--t-ink);background:var(--t-bg);--muted:var(--t-muted);--line:var(--t-line);--accent:var(--t-primary)}
html[data-campus-theme] body{background:radial-gradient(ellipse at 95% 0%,var(--t-glow) 0,transparent 40%),var(--t-bg);color:var(--t-ink)}

/* 側欄 */
html[data-campus-theme] .sidebar{background:var(--t-side);color:var(--t-side-text);border-right-color:var(--t-side);scrollbar-color:var(--t-side-line) transparent}
html[data-campus-theme] .brand,html[data-campus-theme] .brand span{color:#ffffff}
html[data-campus-theme] .brand small{color:var(--t-side-muted)}
html[data-campus-theme] .logo{background:var(--t-primary);box-shadow:3px 4px 0 #00000040}
html[data-campus-theme] .logo span{color:var(--t-accent)}
html[data-campus-theme] .logo.daily{background:var(--t-side-active)}
html[data-campus-theme] .nav-label,html[data-campus-theme] .sidebar.has-junior .nav-sub{color:var(--t-side-muted);border-top-color:var(--t-side-line)}
html[data-campus-theme] .nav{color:var(--t-side-text)}
html[data-campus-theme] .nav:hover{background:var(--t-side-hover);color:#ffffff}
html[data-campus-theme] .nav.active{background:var(--t-side-active);color:var(--t-side-active-text);box-shadow:0 5px 12px #00000030}
html[data-campus-theme] .nav b{background:var(--t-side-hover);color:#ffffff}
html[data-campus-theme] .nav.active b{background:var(--t-accent);color:var(--t-side-active-text)}
html[data-campus-theme] .sidebar.has-junior #junior-nav{background:#ffffff0d}
html[data-campus-theme] .side-note{border-color:var(--t-side-line);color:var(--t-side-muted)}
html[data-campus-theme] .side-note p,html[data-campus-theme] .side-note a{color:var(--t-side-muted)}
@media(max-width:720px){html[data-campus-theme] .sidebar{border-bottom-color:var(--t-side)}}

/* 頁首、標題、提示 */
html[data-campus-theme] header{background:var(--t-surface);border-color:var(--t-line)}
html[data-campus-theme] .sidebar-toggle{background:var(--t-softer);border-color:var(--t-line2);color:var(--t-primary)}
html[data-campus-theme] .breadcrumb{color:var(--t-primary)}
html[data-campus-theme] .breadcrumb span{color:var(--t-muted)}
html[data-campus-theme] .avatar{background:var(--t-primary);color:#ffffff;box-shadow:0 2px 6px #00000020}
html[data-campus-theme] .eyebrow{color:var(--t-accent)}
html[data-campus-theme] h1{color:var(--t-ink)}
html[data-campus-theme] .page-heading p,html[data-campus-theme] .hint{color:var(--t-muted)}
html[data-campus-theme] .section-heading h2::before{background:var(--t-accent)}
html[data-campus-theme] .campus-switch{background:var(--t-soft)}
html[data-campus-theme] .campus-switch button.on,html[data-campus-theme] .campus-switch button.busy{background:var(--t-primary);color:#fff}

/* 按鈕、表單、對話框、表格 */
html[data-campus-theme] .primary{background:var(--t-primary);border-color:var(--t-primary);color:#fff;box-shadow:0 3px 0 #00000020}
html[data-campus-theme] .primary:hover:not(:disabled){background:var(--t-primary-dark)}
html[data-campus-theme] .secondary{background:var(--t-surface);border-color:var(--t-line2);color:var(--t-primary)}
html[data-campus-theme] .secondary:hover:not(:disabled){background:var(--t-softer)}
html[data-campus-theme] .text-btn{color:var(--t-primary)}
html[data-campus-theme] input,html[data-campus-theme] select,html[data-campus-theme] textarea{border-color:var(--t-line2)}
html[data-campus-theme] dialog{border-color:var(--t-line);background:var(--t-surface);color:var(--t-ink);box-shadow:0 24px 90px #00000030}
html[data-campus-theme] dialog::backdrop{background:#1a252f66}
html[data-campus-theme] .modal-heading h2{color:var(--t-ink)}
html[data-campus-theme] .modal-heading .close{background:var(--t-softer)}
html[data-campus-theme] #toast{background:var(--t-primary-dark);box-shadow:0 6px 22px #00000030}
html[data-campus-theme] .record{border-color:var(--t-line)}
html[data-campus-theme] .record p{color:var(--t-muted)}
html[data-campus-theme] .record button,html[data-campus-theme] td button{background:var(--t-soft);color:var(--t-primary)}
html[data-campus-theme] .welcome{background:var(--t-surface);border-color:var(--t-line)}
html[data-campus-theme] .welcome-icon,html[data-campus-theme] .quick-check{background:var(--t-soft);color:var(--t-primary)}
html[data-campus-theme] .quick-spinner{border-color:var(--t-soft);border-top-color:var(--t-primary)}
html[data-campus-theme] .metric{--tile:var(--t-surface);--ink:var(--t-primary);border-color:var(--t-line);box-shadow:0 4px 14px #0000000a}
html[data-campus-theme] .table-wrap{border-color:var(--t-line);box-shadow:0 5px 18px #0000000a}
html[data-campus-theme] th{background:var(--t-softer);color:var(--t-primary)}
html[data-campus-theme] th,html[data-campus-theme] td{border-color:var(--t-line)}
html[data-campus-theme] tbody tr:hover{background:var(--t-softer)}

/* 月曆、待處理、打卡 */
html[data-campus-theme] .leave-strip{background:var(--t-surface);border-color:var(--t-line)}
html[data-campus-theme] .leave-chip{background:var(--t-surface);border-color:var(--t-line)}
html[data-campus-theme] .leave-chip strong{color:var(--t-ink)}
html[data-campus-theme] #calendar-view .calendar-panel,html[data-campus-theme] #calendar-view .day-panel{background:var(--t-surface);border-color:var(--t-line)}
html[data-campus-theme] #calendar-view .month-icon{background:var(--t-soft);color:var(--t-primary)}
html[data-campus-theme] #calendar-view .weekdays{background:var(--t-softer);border-color:var(--t-line)}
html[data-campus-theme] #calendar-view .weekdays span:first-child,html[data-campus-theme] #calendar-view .weekdays span:last-child{color:var(--t-accent)}
html[data-campus-theme] #calendar-view .day-cell.selected,html[data-campus-theme] #calendar-view .day-cell.selected.is-today{background:var(--t-soft);box-shadow:inset 0 0 0 2px var(--t-primary)}
html[data-campus-theme] #calendar-view .day-cell.is-today{background:var(--t-softer)}
html[data-campus-theme] #calendar-view .today-label{color:var(--t-primary)}
html[data-campus-theme] #calendar-view .selected-dot{background:var(--t-soft);border-color:var(--t-primary)}
html[data-campus-theme] #calendar-view .calendar-legend,html[data-campus-theme] #calendar-view .calendar-bottom{color:var(--t-muted)}
html[data-campus-theme] #inbox-panel .inbox-wrap{border-color:var(--t-line2);background:var(--t-softer);color:var(--t-primary)}
html[data-campus-theme] #inbox-panel .inbox-tile,html[data-campus-theme] #inbox-panel .inbox-section{background:var(--t-surface);border-color:var(--t-line);color:var(--t-ink)}
html[data-campus-theme] #inbox-panel .inbox-tile.attention{background:var(--t-soft);border-color:var(--t-line2)}
html[data-campus-theme] #inbox-panel .inbox-section h2 b{background:var(--t-soft);color:var(--t-primary)}
html[data-campus-theme] #inbox-panel .inbox-status,html[data-campus-theme] #inbox-panel .inbox-tile small,html[data-campus-theme] #inbox-panel .inbox-section .section-hint,html[data-campus-theme] #inbox-panel .inbox-group h3{color:var(--t-muted)}
html[data-campus-theme] #inbox-panel .inbox-item.unread{border-left-color:var(--t-primary);background:var(--t-softer)}
html[data-campus-theme] .clock-now{color:var(--t-primary)}
html[data-campus-theme] .clock-kind input:checked+span{background:var(--t-primary);border-color:var(--t-primary)}
html[data-campus-theme] .clock-actions .text-btn,html[data-campus-theme] .notification-delivery .text-btn{color:var(--t-primary)}

/* 國高中部 */
html[data-campus-theme] .jr-chip{color:var(--t-primary);border-color:var(--t-line2);background:var(--t-surface)}
html[data-campus-theme] .jr-chip.on{background:var(--t-primary);border-color:var(--t-primary);color:#fff}
html[data-campus-theme] .jr-tabs button.on{color:var(--t-ink);border-bottom-color:var(--t-primary)}
html[data-campus-theme] .jr-card,html[data-campus-theme] .jr-kpis>div,html[data-campus-theme] .jr-table-wrap{background:var(--t-surface);border-color:var(--t-line)}
html[data-campus-theme] .jr-grid thead th{background:var(--t-softer)}
html[data-campus-theme] .jr-grid tbody th{background:var(--t-surface)}
html[data-campus-theme] .jr-td-row{background:var(--t-surface);border-left-color:var(--t-accent)}
html[data-campus-theme] .jr-td-row.done{border-left-color:#2c7a4b}
html[data-campus-theme] .jr-td-row.late{border-left-color:#c8402f}
html[data-campus-theme] .jr-cap{background:var(--t-soft);color:var(--t-ink)}
html[data-campus-theme] .jr-cap.soon{background:#fdecea;color:#b0362a}
html[data-campus-theme] .jr-seg input:checked+span{background:var(--t-primary)}
html[data-campus-theme] .jr-log-seg .late input:checked+span{background:#b06a00}
html[data-campus-theme] .jr-log-seg .absent input:checked+span{background:#c8402f}
html[data-campus-theme] .jr-log-seg .leave input:checked+span{background:#7d8794}
html[data-campus-theme] .jr-ls-form{background:var(--t-softer)}
html[data-campus-theme] .jr-ls-d{background:var(--t-softer)}
html[data-campus-theme] #calendar-view .leave-strip{background:var(--t-surface);border-color:var(--t-line)}
html[data-campus-theme] #calendar-view .leave-chip{background:var(--t-surface);border-color:var(--t-line)}
html[data-campus-theme] #calendar-view .leave-chip strong{color:var(--t-ink)}
html[data-campus-theme] #calendar-view .leave-strip.empty{background:var(--t-softer)}
html[data-campus-theme] #calendar-view .leave-strip-head strong{color:var(--t-primary)}
html[data-campus-theme] #calendar-view .leave-strip.empty .leave-strip-head strong,html[data-campus-theme] #calendar-view .leave-strip>p,html[data-campus-theme] #calendar-view .leave-chip small{color:var(--t-muted)}
html[data-campus-theme] #calendar-view .leave-chip.kind-early{background:var(--t-softer);border-color:var(--t-line2)}
