/* ===== TOP巔峰 CIS =====
   標準色:碳黑 #25282A / 薄荷綠 #B5E3D8 / 白(2026-07-10 依 CIS 網頁色版)
   標準字:昭源黑體 GlowSans TC(標題 Wide Bold、內文 Normal Regular)*/
@font-face {
  font-family: 'GlowSansTC';
  src: url('/public/brand/GlowSansTC-Regular.otf') format('opentype');
  font-weight: 400; font-display: swap;
}

/* ---- 假別、給假規則與餘額（B2） ---- */
.leave-day-hours-form, .leave-inline-action { display:flex; align-items:end; gap:10px; flex-wrap:wrap; }
.leave-day-hours-form label, .leave-inline-action label { margin:0; }
.leave-day-hours-form input, .leave-inline-action input { width:150px; }
.leave-type-create > summary, .leave-type-card > summary, .leave-admin-actions details > summary { cursor:pointer; color:var(--mint-deep); font-weight:700; }
.leave-type-card > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.leave-type-card > summary span:first-child { display:flex; align-items:baseline; gap:8px; }
.leave-type-card > summary small { color:#64748b; font-weight:400; }
.leave-type-card[open] > summary, .leave-type-create[open] > summary, .leave-admin-actions details[open] > summary { margin-bottom:14px; }
.leave-type-card.inactive { opacity:.68; background:#f8fafc; }
.leave-type-form { border-top:1px solid #e2e8f0; padding-top:10px; }
.leave-payroll-options { display:flex; gap:16px; flex-wrap:wrap; margin-top:8px; }
.leave-grant-table input { width:120px; }
.leave-grant-result { border-left:5px solid var(--mint); }
.leave-missing-list, .leave-cannot-calc, .leave-freeze-notice { background:#fff7ed; border:1px solid #fed7aa; color:#9a3412; border-radius:8px; padding:10px 12px; }
.leave-admin-actions { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.leave-admin-actions .card { margin-top:0; }
.leave-balance-table td:first-child small, .leave-balance-table td:nth-child(2) small { display:block; color:#64748b; margin-top:2px; }
.leave-negative { color:#b91c1c; }
.leave-entry-details > summary { cursor:pointer; color:var(--mint-deep); white-space:nowrap; }
.leave-entry-details ul { list-style:none; margin:8px 0 0; padding:0; min-width:310px; }
.leave-entry-details li { border-top:1px solid #e2e8f0; padding:7px 0; }
.leave-entry-details li small { display:block; color:#64748b; margin-top:2px; line-height:1.45; }
.leave-self-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:14px; }
.leave-self-grid .card { margin:0; }
.leave-self-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.leave-self-card-head h2 { margin:0; }
.leave-self-card-head small { color:#64748b; }
.leave-remaining { text-align:right; font-size:1.08rem; }
.leave-remaining span { display:block; color:#64748b; font-size:.76rem; font-weight:400; }
.leave-balance-metrics { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0; }
.leave-balance-metrics > div { background:var(--mint-tint); border:1px solid var(--mint); border-radius:8px; padding:9px 10px; }
.leave-balance-metrics span { display:block; color:#64748b; font-size:.76rem; }
.leave-balance-metrics strong { display:block; margin-top:2px; }
.leave-cannot-calc { margin:10px 0; font-size:.88rem; }
.leave-import-error { background:#fff1f2; color:#9f1239; }
.leave-import-table td:last-child { font-weight:600; }

/* ---- 請假與加班申請（B3） ---- */
.attendance-application-preview { margin:14px 0; padding:14px; border:1px solid var(--mint); border-radius:10px; background:var(--mint-tint); }
.attendance-application-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.attendance-application-metrics > div { min-width:0; padding:10px; border:1px solid #d1e9e3; border-radius:8px; background:#fff; text-align:center; }
.attendance-application-metrics span { display:block; color:#64748b; font-size:.78rem; }
.attendance-application-metrics strong { display:block; margin-top:3px; color:var(--ink); font-size:1.08rem; overflow-wrap:anywhere; }
.attendance-overtime-metric { grid-template-columns:minmax(180px,280px); justify-content:center; }
.attendance-application-summary { margin:10px 0 0; text-align:center; color:var(--mint-deep); font-weight:700; }
.attendance-application-preview .attendance-status { margin-top:5px; }

@media (max-width: 680px) {
  .leave-admin-actions { grid-template-columns:1fr; }
  .leave-self-grid { grid-template-columns:1fr; }
  .leave-self-card { padding:14px; }
  .leave-self-card-head { align-items:center; }
  .leave-year-nav { gap:7px; }
  .leave-year-nav .btn { padding:7px 9px; }
  .leave-entry-details ul { min-width:0; }
  .leave-type-card > summary span:first-child { display:block; }
  .leave-day-hours-form > *, .leave-inline-action > * { width:100%; }
  .leave-day-hours-form input, .leave-inline-action input { width:100%; }
  .attendance-application-preview { padding:10px; }
  .attendance-application-metrics { gap:6px; }
  .attendance-application-metrics > div { padding:9px 5px; }
  .attendance-application-metrics span { font-size:.72rem; }
  .attendance-application-metrics strong { font-size:.94rem; }
}
@font-face {
  font-family: 'GlowSansTC Wide';
  src: url('/public/brand/GlowSansTC-WideBold.otf') format('opentype');
  font-weight: 700; font-display: swap;
}
:root {
  --ink: #25282A;         /* 品牌碳黑 */
  --ink-soft: #3A3E41;
  --mint: #B5E3D8;        /* 品牌薄荷綠 */
  --mint-tint: #EAF7F3;
  --mint-deep: #2C7A66;   /* 薄荷綠深階(連結/強調,無障礙對比用) */
  --font-system:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue","PingFang TC","Noto Sans TC","Microsoft JhengHei UI","Microsoft JhengHei",sans-serif;
  --font-system-display:-apple-system,BlinkMacSystemFont,"SF Pro Display","Helvetica Neue","PingFang TC","Noto Sans TC","Microsoft JhengHei UI","Microsoft JhengHei",sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: #f3f5f4; color: #25282a;
  font-family:var(--font-system);
  font-optical-sizing:auto; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  font-size: 15px; line-height: 1.6;
}
a { color: var(--mint-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.4rem; margin: 18px 0 12px; font-family:var(--font-system-display); }
h2 { font-size: 1.05rem; margin: 0 0 10px; font-family:var(--font-system-display); }

/* ---- 導覽列 ---- */
.topnav {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-bottom: 3px solid var(--mint);
}
.topnav .brand {
  color: #fff; font-weight: 700; font-size: 1.02rem;
  font-family:var(--font-system-display);
  display: inline-flex; align-items: center; gap: 8px;
}
/* 品牌星芒(自 CIS 橫式標誌裁切星芒核心) */
.brand-star {
  display: inline-block; width: 26px; height: 26px; flex: none;
  background: url('/public/brand/star.png') no-repeat;
  background-size: 500.5px 51px; background-position: -43.5px -12.5px;
}
.topnav .links { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; }
.topnav .links a { color: #cdd4d1; padding: 2px 0; border-bottom: 2px solid transparent; }
.topnav .links a:hover { color: var(--mint); text-decoration: none; border-bottom-color: var(--mint); }
.topnav .userbox { display: flex; align-items: center; gap: 10px; color: #cdd4d1; margin: 0; }
.topnav .userbox .user-link { color: #fff; font-weight: 600; }
.topnav .userbox .user-link:hover { color: var(--mint); text-decoration: none; }
.badge {
  background: var(--mint); color: var(--ink); border-radius: 10px; font-weight: 700;
  font-size: 0.72rem; padding: 1px 7px; margin-left: 4px; vertical-align: 2px;
}
.btn-link { background: none; border: none; color: #cdd4d1; cursor: pointer; font-size: 0.9rem; padding: 0; font-family: inherit; }
.btn-link:hover { color: var(--mint); }

.container { max-width: 1080px; margin: 0 auto; padding: 8px 14px 60px; }
/* 欄位多的管理表格用(帳號管理):1080px 塞九欄會把欄寬擠到一個字一行 */
.container.wide { max-width: 1440px; }

/* ---- 卡片 ---- */
.card { background: #fff; border-radius: 10px; padding: 16px 18px; margin: 14px 0; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.action-card { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--mint); }
.empty { color: #94a3b8; text-align: center; padding: 12px 0; }
.hint { color: #64748b; font-size: 0.85rem; }
.count { color: #64748b; font-weight: 400; font-size: 0.9rem; }

/* ---- 統計 ---- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.stat { background: #fff; border-radius: 10px; padding: 14px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.stat .num { font-size: 1.5rem; font-weight: 700; color: var(--ink); font-family:var(--font-system-display); }
.stat .label { color: #64748b; font-size: 0.82rem; }
a.stat-link { display: block; }
a.stat-link:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--mint); }

/* ---- 新單捷徑 ---- */
.newdoc-row { display: flex; gap: 10px; flex-wrap: wrap; }
.newdoc {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--mint-tint); border: 1px solid var(--mint); border-radius: 8px;
  padding: 10px 14px; color: var(--ink); font-weight: 500;
}
.newdoc:hover { background: var(--mint); text-decoration: none; }
.newdoc .prefix { background: var(--ink); color: var(--mint); border-radius: 5px; font-size: 0.72rem; padding: 2px 6px; font-family:var(--font-system-display); }

/* ---- 表格 ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
th { color: #64748b; font-weight: 500; font-size: 0.82rem; white-space: nowrap; }
tr.inactive { opacity: 0.5; }
.num-col { text-align: right; white-space: nowrap; }
td.center, th.center { text-align: center; }
.actions { white-space: nowrap; }

/* ---- 標籤 ---- */
.tag { display: inline-block; border-radius: 6px; font-size: 0.75rem; padding: 2px 8px; white-space: nowrap; }
.tag-draft { background: var(--mint-tint); color: var(--mint-deep); }
.tag-pending { background: #fef3c7; color: #92400e; }
.tag-returned { background: #fee2e2; color: #991b1b; }
.tag-withdrawn { background: #e2e8f0; color: #475569; }
.tag-completed { background: #dcfce7; color: #166534; }
.tag-delegate { background: #ede9fe; color: #5b21b6; margin-left: 5px; }

/* ---- 表單 ---- */
[hidden] { display: none !important; }
label { display: block; margin: 10px 0; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 9px 10px; margin-top: 4px;
  border: 1px solid #cbd5e1; border-radius: 7px; font-size: 15px; font-family: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--mint); border-color: var(--mint-deep); }
input[type="checkbox"] { width: auto; }
input[type="color"] { width: 44px; height: 30px; padding: 2px; vertical-align: middle; }
input[type="file"] { padding: 6px; }
.req { color: #ef4444; }
.input-sm { padding: 5px 7px; font-size: 0.85rem; margin: 0; min-width: 90px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 4px 16px; align-items: end; }
.grid-form label, .check { margin: 6px 0; }
.onboarding-create-grid { align-items:start; }
.onboarding-reading-head { margin-top:18px; }
.onboarding-reading-head h2 { margin-bottom:2px; }
.onboarding-reading-head .hint { margin:0 0 10px; }
.onboarding-doc-back { margin:6px 0 2px; }
.onboarding-doc-intro { margin:0 0 10px; }
.onboarding-doc-list { margin-top:10px; }
.onboarding-doc-upload { scroll-margin-top:calc(var(--toolbar-height, 56px) + 12px); }
.onboarding-doc-upload-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(180px,1fr); align-items:start; gap:4px 16px; }
.onboarding-doc-upload-grid label { margin:6px 0; }
.onboarding-doc-upload-grid input[type="number"] { display:block; max-width:140px; }
.onboarding-doc-upload-grid .onboarding-doc-full { grid-column:1/-1; }
.onboarding-doc-upload-grid .check { display:flex; align-items:center; gap:8px; min-height:44px; }
.onboarding-doc-upload-grid .check input { flex:none; margin:0; }
.onboarding-template-back { margin:6px 0 2px; }
.onboarding-template-intro { margin:0 0 10px; }
.onboarding-template-create { scroll-margin-top:calc(var(--toolbar-height, 56px) + 12px); }
.onboarding-template-create .inline-form input { flex:1 1 260px; }
.onboarding-template-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.onboarding-template-head h2 { margin:0; }
.onboarding-template-more { flex:none; }
.onboarding-template-more > summary { width:40px; min-height:40px; }
.onboarding-template-delete { width:44px; padding-left:4px; padding-right:4px; }
.onboarding-template-delete form { margin:0; }
.onboarding-template-delete .icon-action { width:36px; min-width:36px; min-height:36px; border:0; background:transparent; color:#78847f; }
.onboarding-template-delete .icon-action:hover { color:#9d3d3d; background:#fff1f1; }
.onboarding-template-add { margin-top:8px; }
.onboarding-template-add > summary { min-height:42px; display:flex; align-items:center; cursor:pointer; }
.department-back { margin:6px 0 4px; }
.department-meta { display:flex; flex-wrap:wrap; gap:5px 18px; margin-bottom:4px; color:#60706a; font-size:.85rem; }
.department-meta span { display:inline-flex; gap:7px; align-items:baseline; }
.department-meta strong { color:#34413d; }
.department-file-card { position:relative; }
.department-file-card > h2 { padding-right:46px; }
.department-upload > summary { position:absolute; top:8px; right:10px; list-style:none; cursor:pointer; border:0; background:transparent; }
.department-upload > summary::-webkit-details-marker { display:none; }
.department-upload > summary .ui-icon { transition:transform .18s ease; }
.department-upload[open] > summary .ui-icon { transform:rotate(45deg); }
.department-upload-form { align-items:start; margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.department-upload-actions { grid-column:1/-1; margin-top:4px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { width: auto; margin-top: 0; }
.inline-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.inline-label input { margin-top: 0; }
.filter-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filter-form select, .filter-form input { width: auto; margin-top: 0; }

/* ---- 按鈕 ---- */
.btn {
  display: inline-block; background: #fff; border: 1px solid #cbd5e1; color: #334155;
  border-radius: 7px; padding: 8px 16px; font-size: 0.92rem; cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--mint-tint); border-color: var(--mint); text-decoration: none; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.btn-approve { background: #16a34a; border-color: #16a34a; color: #fff; font-size: 1.05rem; padding: 12px 28px; }
.btn-approve:hover { background: #15803d; }
.btn-return { background: #fff; border-color: #ef4444; color: #dc2626; font-size: 1.05rem; padding: 12px 28px; }
.btn-return:hover { background: #fef2f2; }
.btn-sm { padding: 5px 10px; font-size: 0.82rem; }
.btn-danger { border-color: #ef4444; color: #dc2626; }
.btn-danger:hover { background: #fef2f2; }
.btn-block { width: 100%; margin-top: 14px; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }

/* ---- 訊息 ---- */
.flash { border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.flash-ok { background: #dcfce7; color: #166534; }
.flash-err { background: #fee2e2; color: #991b1b; }

/* ---- 登入(品牌深色卡片+直式 Logo)---- */
.login-card {
  max-width: 400px; margin: 7vh auto; background: var(--ink); color: #e8ecea;
  border-radius: 14px; padding: 30px; box-shadow: 0 8px 28px rgba(37,40,42,.35);
  border-bottom: 4px solid var(--mint);
}
.login-card h1 { text-align: center; margin: 0; color: #fff; }
.login-card h2 { text-align: center; margin: 4px 0 18px; color: var(--mint); font-weight: 400; font-size: 0.95rem; letter-spacing: 2px; }
.login-logo { display: block; width: 210px; margin: 4px auto 10px; }
.login-card label { color: #cdd4d1; }
.login-card input { background: #fff; color: var(--ink); border-color: transparent; }
.login-card .btn-primary { background: var(--mint); border-color: var(--mint); color: var(--ink); font-weight: 700; }
.login-card .btn-primary:hover { background: #cdeee5; }
.login-card .btn { background: transparent; color: #e8ecea; border-color: #4a4f52; }
.login-card .hint { color: #9aa3a0; }
.login-card .hint a { color: var(--mint); }

/* ---- 單據明細 ---- */
.detail { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
.detail dt { color: #64748b; }
.detail dd { margin: 0; }
.detail .amount { font-weight: 700; color: #b45309; }
.document-identity { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.document-number { color:#52605b; font-weight:650; font-variant-numeric:tabular-nums; }
.pre { white-space: pre-wrap; }
.app-version { text-align: center; color: #94a3b8; font-size: .78rem; padding: 18px 0 10px; }
.tabbar { display: flex; gap: 8px; margin-bottom: 12px; }

/* ---- 導覽列「更多」下拉(桌機);手機時攤平進 ☰ 清單 ---- */
.nav-more { position: relative; }
.nav-more-btn { background: none; border: none; color: #cdd4d1; font: inherit; cursor: pointer; padding: 2px 0; border-bottom: 2px solid transparent; }
.nav-more-btn:hover { color: var(--mint); border-bottom-color: var(--mint); }
.nav-more-menu { display: none; position: absolute; top: calc(100% + 8px); left: -10px; flex-direction: column; background: #2b2f31; border: 1px solid #3d4446; border-radius: 8px; padding: 6px; min-width: 150px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.nav-more.open .nav-more-menu { display: flex; }
.nav-more-menu a { padding: 9px 12px !important; border-radius: 6px; border-bottom: none !important; white-space: nowrap; }
.nav-more-menu a:hover { background: #3a4043; }
@media (max-width: 680px) {
  .nav-more-btn { display: none; }
  .nav-more, .nav-more-menu, .nav-more.open .nav-more-menu { display: contents; }
}

/* ---- 簽核軌跡 ---- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 3px solid #e2e8f0; }
.timeline li { position: relative; padding: 6px 0 10px 14px; }
.timeline li::before {
  content: ''; position: absolute; left: -25px; top: 14px;
  width: 13px; height: 13px; display:flex; align-items:center; justify-content:center; border-radius: 50%; background: #cbd5e1; border: 2px solid #fff;
  color:#fff; font-size:8px; font-weight:800; line-height:1;
}
.timeline .step-approved::before { content:'✓'; background: #27866d; }
.timeline .step-returned::before { content:'×'; background: #c94c4c; }
.timeline .step-current::before { background: #f59e0b; }
.timeline .step-waiting::before, .timeline .step-skipped::before { background:#cbd5d1; }
.timeline .round { color: #64748b; font-size: 0.82rem; padding-left: 0; }
.timeline .round::before { display: none; }
.step-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.step-status { color: #64748b; font-size: 0.82rem; }
.step-approved .step-status { color:#27866d; }
.step-returned .step-status { color:#b33c3c; }
.step-current .step-status { color:#a65f00; font-weight:650; }
.step-meta { color: #94a3b8; font-size: 0.82rem; }
.step-comment { background: #f8fafc; border-radius: 6px; padding: 5px 10px; margin-top: 4px; font-size: 0.9rem; }
.step-comment span { display:block; margin-bottom:2px; color:var(--text-secondary); font-size:.72rem; font-weight:700; }

/* ---- 附件預覽 ---- */
.detail-attachments { min-width:0; }
.att-item { display:grid; gap:8px; margin-bottom:12px; padding:11px; border:1px solid var(--line); border-radius:12px; background:#f9fbfa; }
.att-item:last-child { margin-bottom:0; }
.att-file-main { min-width:0; display:flex; align-items:center; gap:9px; color:var(--text); }
.att-file-main > .ui-icon { width:19px; height:19px; color:var(--mint-deep); }
.att-file-main > span:last-child { min-width:0; display:grid; gap:1px; }
.att-file-main small { color:var(--text-secondary); font-size:.72rem; font-weight:600; }
.att-file-main strong { overflow-wrap:anywhere; font-size:.88rem; }
.att-versions { display:flex; gap:6px 12px; flex-wrap:wrap; padding-top:7px; border-top:1px solid var(--line); }
.att-stamped { color:#8f3a34; font-size:.8rem; font-weight:600; }
.att-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.att-action { min-height:40px; display:flex; align-items:center; justify-content:center; padding:7px 9px; border-radius:9px; color:var(--mint-deep); background:#edf5f2; font-size:.8rem; font-weight:650; text-align:center; cursor:pointer; }
.att-action:hover { color:var(--ink); background:var(--mint-tint); }
.att-preview { grid-column:1/-1; margin:0; }
.att-preview summary { list-style:none; }

/* ---- 採購單發票／憑證 ---- */
.invoice-evidence-card { scroll-margin-top:calc(var(--toolbar-height, 56px) + 12px); }
.invoice-evidence-head { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.invoice-evidence-head-copy { min-width:0; display:grid; gap:2px; }
.invoice-evidence-head-copy h2 { margin:0; }
.invoice-evidence-head-copy p { margin:0; color:var(--text-secondary); font-size:.78rem; }
.invoice-evidence-create[hidden] { display:none !important; }
.invoice-evidence-create { margin-top:12px; padding-top:14px; border-top:1px solid var(--line); }
.invoice-evidence-grid { align-items:start; }
.invoice-evidence-full { grid-column:1/-1; }
.invoice-evidence-full .hint { display:block; margin-top:5px; font-weight:400; }
.invoice-evidence-submit { justify-content:flex-end; margin-top:8px; }
.invoice-evidence-empty { margin:14px 0 2px; }
.invoice-evidence-list { display:grid; gap:9px; margin-top:13px; }
.invoice-evidence-item { min-width:0; padding:12px; border:1px solid var(--line); border-radius:12px; background:#f9fbfa; }
.invoice-evidence-main { min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:start; gap:10px; }
.invoice-evidence-type { margin-top:1px; padding:3px 8px; border-radius:999px; color:var(--mint-deep); background:var(--mint-tint); font-size:.72rem; font-weight:700; white-space:nowrap; }
.invoice-evidence-copy { min-width:0; display:grid; gap:4px; }
.invoice-evidence-copy strong { overflow-wrap:anywhere; }
.invoice-evidence-meta { display:flex; flex-wrap:wrap; gap:3px 12px; color:#74817c; font-size:.75rem; }
.invoice-evidence-menu { align-self:start; }
.invoice-evidence-menu > summary { width:36px; height:36px; min-width:36px; min-height:36px; }
.invoice-evidence-menu .page-more-menu-pop { width:160px; }
.invoice-evidence-note { margin:10px 0 0; padding-top:9px; border-top:1px solid var(--line); color:#4d5b56; font-size:.84rem; }
.invoice-evidence-file { min-width:0; display:inline-flex; align-items:center; gap:7px; margin-top:9px; color:var(--mint-deep); font-size:.82rem; font-weight:600; }
.invoice-evidence-file .ui-icon { width:17px; height:17px; flex:none; }
.invoice-evidence-file span { min-width:0; overflow-wrap:anywhere; }
.invoice-evidence-voided { margin-top:13px; padding-top:11px; border-top:1px solid var(--line); }
.invoice-evidence-voided > summary { width:max-content; max-width:100%; color:#74817c; cursor:pointer; font-size:.8rem; }
.invoice-evidence-item.is-voided { opacity:.72; background:#f5f6f5; }
.invoice-evidence-item.is-voided .invoice-evidence-type { color:#68736f; background:#e8ecea; }
@media (max-width:680px) {
  .invoice-evidence-head .icon-action { width:44px; min-width:44px; height:44px; min-height:44px; }
  .invoice-evidence-create { margin-top:10px; padding-top:12px; }
  .invoice-evidence-grid { grid-template-columns:1fr; gap:7px; }
  .invoice-evidence-full { grid-column:auto; }
  .invoice-evidence-submit, .invoice-evidence-submit .btn { width:100%; }
  .invoice-evidence-item { padding:11px; }
  .invoice-evidence-main { grid-template-columns:auto minmax(0,1fr) 40px; gap:8px; }
  .invoice-evidence-menu > summary { width:40px; height:40px; min-width:40px; min-height:40px; }
  .invoice-evidence-menu .page-more-menu-pop { top:calc(100% + 4px); right:0; width:min(170px,calc(100vw - 40px)); }
  .invoice-evidence-meta { display:grid; gap:2px; }
  .invoice-evidence-file { width:100%; min-height:40px; }
}

/* ===== 巡課回報 ①：基礎資料與題庫維護 ===== */
.patrol-nav,.patrol-section-tabs,.patrol-category-filter { display:flex; gap:7px; overflow-x:auto; padding:5px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.86); scrollbar-width:thin; }
.patrol-nav a,.patrol-section-tabs a,.patrol-category-filter a { flex:none; min-height:40px; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 13px; border-radius:9px; color:#53615c; font-weight:700; white-space:nowrap; }
.patrol-nav a:hover,.patrol-section-tabs a:hover,.patrol-category-filter a:hover { text-decoration:none; background:var(--mint-tint); }
.patrol-nav a.active,.patrol-section-tabs a.active,.patrol-category-filter a.active { color:var(--ink); background:var(--mint); }
.patrol-section-tabs { margin-top:12px; }
.patrol-section-tabs a { flex:1; }
.patrol-section-tabs span { min-width:22px; padding:1px 6px; border-radius:99px; background:rgba(255,255,255,.7); font-size:.72rem; text-align:center; }
.patrol-erp-sync-card { margin-bottom:12px; padding:16px 18px; border-top:4px solid var(--mint-deep); }
.patrol-erp-sync-card.sync-failed { border-top-color:#ce574f; background:#fff9f8; }
.patrol-erp-sync-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.patrol-erp-sync-copy { min-width:0; }
.patrol-erp-sync-kicker { color:var(--mint-deep); font-size:.74rem; font-weight:800; letter-spacing:.06em; }
.patrol-erp-sync-copy h2 { margin:2px 0; font-size:1.12rem; }
.patrol-erp-sync-copy p { margin:0; color:var(--muted); font-size:.82rem; overflow-wrap:anywhere; }
.patrol-erp-sync-copy .patrol-erp-sync-error { margin-top:5px; color:#983c36; font-weight:700; }
.patrol-erp-sync-error code { color:inherit; }
.patrol-erp-sync-action { flex:none; margin:0; }
.patrol-erp-sync-action .btn { min-height:44px; }
.patrol-erp-sync-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:13px; }
.patrol-erp-sync-counts > div { min-width:0; display:flex; align-items:center; flex-wrap:wrap; gap:5px 9px; padding:9px 11px; border:1px solid #d9e5e1; border-radius:10px; background:#f7fbfa; }
.patrol-erp-sync-counts strong { margin-right:auto; }
.patrol-erp-sync-counts span { color:#66736e; font-size:.76rem; white-space:nowrap; }
.patrol-erp-sync-warnings { margin-top:11px; padding-top:10px; border-top:1px solid var(--line); }
.patrol-erp-sync-warnings summary { min-height:36px; display:flex; align-items:center; gap:7px; color:#8a5c0a; font-weight:800; cursor:pointer; }
.patrol-erp-sync-warnings summary span { min-width:22px; padding:2px 7px; border-radius:99px; background:#fff0c7; font-size:.72rem; text-align:center; }
.patrol-erp-sync-warnings ul { margin:7px 0 0; padding-left:22px; color:#765b25; font-size:.82rem; }
.patrol-erp-tag { color:#1f6756; background:#dff3ed; }
.patrol-record input[readonly],.patrol-record select:disabled { color:#596560; background:#edf1f0; opacity:1; -webkit-text-fill-color:#596560; }
.patrol-erp-managed { align-self:center; color:var(--muted); font-size:.75rem; font-weight:700; white-space:nowrap; }
.patrol-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:10px; }
.patrol-card-head h2 { margin-bottom:2px; }
.patrol-card-head p { margin:0; }
.patrol-card-head code { display:inline-block; margin-top:4px; color:var(--mint-deep); font-size:.75rem; }
.patrol-create-card { border-top:4px solid var(--mint); }
.patrol-create-grid { display:grid; grid-template-columns:minmax(180px,2fr) minmax(160px,1fr) minmax(90px,.55fr) auto; align-items:end; gap:9px 12px; }
.patrol-create-grid label,.patrol-question-fields label,.patrol-record-form label,.patrol-theme-row label,.patrol-option-row label,.patrol-theme-create label { min-width:0; margin:0; }
.patrol-create-grid .btn { min-height:42px; margin-bottom:0; }
.patrol-campus-filter { display:flex; align-items:end; gap:10px; margin-bottom:12px; }
.patrol-campus-filter label { width:min(100%,390px); margin:0; }
.patrol-record-list { display:grid; gap:10px; }
.patrol-record { min-width:0; padding:13px 14px; border:1px solid var(--line); border-radius:12px; background:#f9fbfa; }
.patrol-record-form { display:grid; grid-template-columns:minmax(190px,1.4fr) minmax(150px,1fr) 90px auto; align-items:end; gap:9px 12px; }
.patrol-record-title { grid-column:1/-1; display:flex; align-items:center; flex-wrap:wrap; gap:7px; min-width:0; }
.patrol-record-title strong { overflow-wrap:anywhere; }
.patrol-record-title small { color:var(--muted); }
.patrol-record-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.patrol-coach-batch textarea { resize:vertical; }
.patrol-coach-batch .patrol-create-grid { grid-template-columns:minmax(200px,1fr) minmax(130px,.5fr) auto; margin-top:10px; }
.patrol-coach-form { grid-template-columns:minmax(150px,1fr) minmax(190px,1.5fr) minmax(140px,1fr) 80px auto; }
.patrol-question-create > label { margin-bottom:12px; }
.patrol-question-create .patrol-create-grid { grid-template-columns:minmax(100px,.5fr) minmax(140px,.7fr) minmax(220px,2fr); margin-bottom:8px; }
.patrol-category-filter { margin:12px 0; padding:4px; border:0; background:#f3f6f5; }
.patrol-category-filter a { min-height:36px; padding:6px 11px; }
.patrol-question-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.patrol-question-card { min-width:0; padding:14px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.patrol-question-card > form > header { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-bottom:10px; }
.patrol-question-card header strong { min-width:0; overflow-wrap:anywhere; }
.patrol-question-code { flex:none; padding:3px 8px; border-radius:7px; color:var(--ink); background:var(--mint); font-size:.78rem; font-weight:800; }
.patrol-question-fields { display:grid; grid-template-columns:minmax(90px,.55fr) minmax(120px,.7fr) minmax(180px,1.7fr); gap:8px; }
.patrol-question-description { grid-column:1/-1; }
.patrol-question-description textarea { resize:vertical; }
.patrol-question-card .patrol-record-actions { justify-content:flex-start; margin-top:10px; }
.patrol-theme-create { display:grid; grid-template-columns:minmax(220px,1fr) 100px auto; align-items:end; gap:9px 12px; padding:12px; border-radius:11px; background:var(--mint-tint); }
.patrol-theme-create .btn { min-height:42px; }
.patrol-theme-list { display:grid; gap:8px; margin-top:12px; }
.patrol-theme-row { display:grid; grid-template-columns:minmax(210px,1fr) 90px 70px auto; align-items:end; gap:9px 12px; padding:11px 12px; border:1px solid var(--line); border-radius:11px; }
.patrol-theme-count { align-self:center; color:var(--muted); font-size:.8rem; white-space:nowrap; }
.patrol-theme-picker label { width:min(100%,480px); margin:0 0 12px; }
.patrol-theme-fieldset { min-width:0; margin:12px 0; padding:11px; border:1px solid var(--line); border-radius:12px; }
.patrol-theme-fieldset legend { padding:0 7px; color:var(--mint-deep); font-weight:800; }
.patrol-theme-question-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.patrol-theme-question { min-width:0; min-height:72px; display:grid; grid-template-columns:22px minmax(0,1fr) 68px; align-items:center; gap:9px; margin:0; padding:10px; border:1px solid #dce5e2; border-radius:10px; background:#fff; cursor:pointer; }
.patrol-theme-question:has(input[type="checkbox"]:checked) { border-color:#79b9aa; background:var(--mint-tint); }
.patrol-theme-question input[type="checkbox"] { width:18px; height:18px; margin:0; }
.patrol-theme-question span { min-width:0; }
.patrol-theme-question strong,.patrol-theme-question small { display:block; overflow-wrap:anywhere; }
.patrol-theme-question small { margin-top:3px; color:var(--muted); font-size:.76rem; font-weight:400; }
.patrol-sort-input { width:68px; margin:0; text-align:center; }
.patrol-sticky-save { position:sticky; bottom:10px; z-index:2; display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-top:14px; padding:10px; border:1px solid #93cfc0; border-radius:12px; background:rgba(234,247,243,.96); box-shadow:0 8px 24px rgba(37,40,42,.1); backdrop-filter:blur(8px); }
.patrol-sticky-save span { color:var(--mint-deep); font-weight:800; }
.patrol-option-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.patrol-option-group { min-width:0; margin:0; }
.patrol-option-list { display:grid; gap:8px; }
.patrol-option-row { min-width:0; display:grid; grid-template-columns:12px minmax(170px,1fr) 78px auto auto; align-items:end; gap:9px; padding:10px; border:1px solid var(--line); border-radius:11px; background:#fafcfb; }
.patrol-tone { align-self:center; width:10px; height:34px; border-radius:8px; background:#aab4b0; }
.patrol-tone-ok { background:#35a27e; }.patrol-tone-warn { background:#e0a429; }.patrol-tone-bad { background:#d75b52; }.patrol-tone-off { background:#aab4b0; }.patrol-tone-neutral { background:#5f7c72; }
.patrol-option-row > .tag { align-self:center; }

@media (max-width:958px) {
  .patrol-erp-sync-counts { grid-template-columns:1fr; }
  .patrol-record-form,.patrol-coach-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .patrol-record-actions { justify-content:flex-start; }
  .patrol-question-list,.patrol-theme-question-grid,.patrol-option-groups { grid-template-columns:1fr; }
  .patrol-option-row { grid-template-columns:12px minmax(170px,1fr) 78px auto auto; }
}

@media (max-width:680px) {
  .patrol-nav,.patrol-section-tabs { margin-left:-12px; margin-right:-12px; padding:6px 12px; border-left:0; border-right:0; border-radius:0; }
  .patrol-nav a,.patrol-section-tabs a { min-height:44px; }
  .patrol-section-tabs a { flex:none; min-width:104px; }
  .patrol-card-head { display:block; }
  .patrol-erp-sync-card { padding:14px 12px; }
  .patrol-erp-sync-head { display:grid; grid-template-columns:1fr; }
  .patrol-erp-sync-copy p span { display:block; margin-top:2px; }
  .patrol-erp-sync-action,.patrol-erp-sync-action .btn { width:100%; }
  .patrol-erp-sync-counts > div { display:grid; grid-template-columns:1fr repeat(3,auto); gap:5px 7px; }
  .patrol-erp-managed { white-space:normal; }
  .patrol-card-head > .count { display:block; margin-top:5px; }
  .patrol-create-grid,.patrol-coach-batch .patrol-create-grid,.patrol-question-create .patrol-create-grid,
  .patrol-record-form,.patrol-coach-form,.patrol-theme-create,.patrol-theme-row,.patrol-option-row { grid-template-columns:1fr; }
  .patrol-create-grid .btn,.patrol-record-actions,.patrol-record-actions .btn,.patrol-theme-create .btn { width:100%; min-height:44px; }
  .patrol-record-actions { display:grid; grid-template-columns:1fr 1fr; }
  .patrol-record { padding:12px; }
  .patrol-campus-filter label,.patrol-theme-picker label { width:100%; }
  .patrol-question-fields { grid-template-columns:1fr 1fr; }
  .patrol-question-fields label:nth-child(3),.patrol-question-description { grid-column:1/-1; }
  .patrol-question-card { padding:12px; }
  .patrol-theme-row .patrol-theme-count { grid-row:1; }
  .patrol-theme-question { grid-template-columns:22px minmax(0,1fr) 58px; padding:9px 8px; }
  .patrol-sort-input { width:58px; }
  .patrol-sticky-save { bottom:74px; display:grid; grid-template-columns:1fr; text-align:center; }
  .patrol-sticky-save .btn { width:100%; min-height:46px; }
  .patrol-option-row .patrol-tone { width:100%; height:5px; }
  .patrol-option-row > .tag { justify-self:start; }
}

/* ===== 巡課回報 ②：巡場填報與歸檔 ===== */
.patrol-new-record h1,.patrol-record-hero h1 { margin:0; font-size:1.55rem; }
.patrol-new-form fieldset,.patrol-report-section fieldset { min-width:0; margin:0; padding:0; border:0; }
.patrol-new-basics { display:grid; grid-template-columns:minmax(150px,.7fr) minmax(180px,1fr) minmax(220px,1.2fr); gap:10px 12px; }
.patrol-new-basics label { min-width:0; margin:0; }
.patrol-coach-picker { margin-top:15px !important; }
.patrol-coach-picker legend,.patrol-coach-picker > strong { display:block; margin-bottom:8px; color:var(--ink); font-weight:800; }
.patrol-check-buttons,.patrol-radio-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.patrol-check-buttons label,.patrol-radio-buttons label { position:relative; min-width:0; margin:0; cursor:pointer; }
.patrol-check-buttons input,.patrol-radio-buttons input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.patrol-check-buttons span,.patrol-radio-buttons span { min-height:46px; display:flex; align-items:center; justify-content:center; padding:9px 14px; border:1.5px solid #cfd9d6; border-radius:11px; background:#fff; color:#43504c; font-weight:750; line-height:1.2; text-align:center; transition:border-color .15s,background .15s,box-shadow .15s; }
.patrol-check-buttons label:has(input:checked) span { border-color:var(--mint-deep); background:var(--mint); color:var(--ink); box-shadow:0 0 0 2px rgba(92,160,144,.12); }
.patrol-radio-buttons label:has(input:focus-visible) span,.patrol-check-buttons label:has(input:focus-visible) span { outline:3px solid rgba(50,120,104,.22); outline-offset:2px; }
.patrol-radio-buttons .tone-ok:has(input:checked) span { border-color:#2f8f70; background:#dcf5ec; color:#176047; }
.patrol-radio-buttons .tone-warn:has(input:checked) span { border-color:#d69a1d; background:#fff4d4; color:#805d12; }
.patrol-radio-buttons .tone-bad:has(input:checked) span { border-color:#cf554d; background:#fde7e5; color:#8f302a; }
.patrol-radio-buttons .tone-off:has(input:checked) span { border-color:#7b8b86; background:#edf1f0; color:#43504c; }
.patrol-radio-buttons .tone-neutral:has(input:checked) span { border-color:var(--mint-deep); background:var(--mint-tint); color:var(--mint-deep); }
.patrol-primary-action { min-height:48px; margin-top:15px; }
.patrol-report-list { display:grid; gap:10px; }
.patrol-report-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; padding:13px 14px; border:1px solid var(--line); border-left:5px solid #d5a33b; border-radius:12px; background:#fff; }
.patrol-report-card.submitted { border-left-color:#55a88f; }
.patrol-report-main { min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr); gap:4px 10px; color:var(--ink); }
.patrol-report-main:hover { text-decoration:none; }
.patrol-report-main strong,.patrol-report-main > span:not(.patrol-report-date),.patrol-report-main small { grid-column:2; min-width:0; overflow-wrap:anywhere; }
.patrol-report-main .patrol-report-date { grid-row:1/4; align-self:start; padding:5px 8px; border-radius:8px; background:var(--mint-tint); color:var(--mint-deep); font-size:.78rem; font-weight:800; }
.patrol-report-main small { color:var(--muted); }
.patrol-report-side { display:flex; align-items:center; gap:7px; }
.patrol-report-side form { margin:0; }
.patrol-record-hero { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-bottom:12px; padding:16px 18px; border-radius:14px; background:#25282A; color:#fff; }
.patrol-record-hero .back-link { display:inline-block; margin-bottom:7px; color:#B5E3D8; }
.patrol-record-hero p { margin:5px 0 0; color:#d5dfdc; }
.patrol-progress { position:sticky; top:62px; z-index:4; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; margin-bottom:14px; padding:7px; border:1px solid #cddbd7; border-radius:13px; background:rgba(255,255,255,.94); box-shadow:0 6px 20px rgba(37,40,42,.08); backdrop-filter:blur(10px); }
.patrol-progress a { min-width:0; min-height:46px; display:flex; align-items:center; justify-content:center; gap:6px; padding:7px; border-radius:9px; color:#68746f; font-size:.8rem; font-weight:750; text-align:center; }
.patrol-progress a:hover { text-decoration:none; background:#f3f6f5; }
.patrol-progress a span { flex:none; width:25px; height:25px; display:grid; place-items:center; border-radius:50%; background:#e9eeec; font-weight:850; }
.patrol-progress a.done { color:#176047; background:#e6f5f0; }
.patrol-progress a.done span { background:#B5E3D8; }
.patrol-report-section { scroll-margin-top:130px; }
.patrol-section-heading { display:flex; align-items:flex-start; gap:11px; margin-bottom:14px; }
.patrol-section-heading > span { flex:none; min-width:34px; min-height:34px; display:grid; place-items:center; padding:0 7px; border-radius:9px; background:var(--mint); color:var(--ink); font-weight:900; }
.patrol-section-heading h2 { margin:0 0 2px; }
.patrol-section-heading p { margin:0; }
.patrol-section-save { min-height:46px; margin-top:14px; }
.patrol-subcard,.patrol-coach-score,.patrol-parent-card { padding:14px; border:1px solid var(--line); border-radius:12px; background:#fafcfb; }
.patrol-subcard + .patrol-subcard,.patrol-choice-block + .patrol-choice-block { margin-top:11px; }
.patrol-subcard h3,.patrol-parent-card h3 { margin:0 0 10px; }
.patrol-choice-block > strong { display:block; margin-bottom:7px; }
.patrol-inline-note { margin:8px 0 0; }
.patrol-inline-note input { margin-top:4px; }
.patrol-field-card { margin-top:11px; border-color:#9ccfc2; background:var(--mint-tint); }
.patrol-coach-score-list { display:grid; gap:14px; }
.patrol-coach-score { padding:15px; background:#fff; }
.patrol-coach-score > header { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:11px; }
.patrol-coach-score h3 { margin:0 0 2px; }
.patrol-coach-score header small { color:var(--muted); }
.patrol-theme-choose { display:grid; grid-template-columns:minmax(180px,1fr) auto; align-items:end; gap:9px; margin-bottom:12px; padding:10px; border-radius:10px; background:var(--mint-tint); }
.patrol-theme-choose label { margin:0; }
.patrol-score-question { padding:13px 0; border-top:1px solid var(--line); }
.patrol-question-copy { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:9px; }
.patrol-question-copy > span { padding:4px 8px; border-radius:7px; background:var(--mint); color:var(--ink); font-size:.78rem; font-weight:850; }
.patrol-question-copy h4 { margin:1px 0 3px; }
.patrol-question-copy p { margin:0; color:var(--muted); line-height:1.5; }
.patrol-score-buttons { margin:10px 0; }
.patrol-score-question > label { margin:0; }
.patrol-score-question textarea,.patrol-parent-texts textarea,.patrol-redlight-grid textarea { resize:vertical; }
.patrol-parent-presence { margin-bottom:12px; }
.patrol-parent-list { display:grid; gap:11px; }
.patrol-parent-card > label { margin-top:0; }
.patrol-parent-texts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-top:10px; }
.patrol-parent-texts label { margin:0; }
.patrol-readonly-parent { display:grid; gap:10px; }
.patrol-readonly-parent > p,.patrol-parent-card p { margin:5px 0; }
.patrol-no-parent { padding:12px; border-radius:10px; background:#f3f6f5; }
.patrol-no-parent label { margin:0; }
.patrol-redlight-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.patrol-redlight-grid label { margin:0; padding:12px; border-radius:11px; }
.patrol-redlight-grid strong { display:block; margin-bottom:7px; }
.patrol-red-card { border:1px solid #f0b9b5; background:#fff7f6; }
.patrol-green-card { border:1px solid #a6d8c9; background:#f2fbf8; }
.patrol-photo-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
.patrol-photo-grid a { min-width:0; display:grid; gap:4px; padding:8px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:#fff; }
.patrol-photo-grid a:hover { border-color:var(--mint-deep); text-decoration:none; }
.patrol-photo-grid img { width:100%; height:120px; object-fit:cover; border-radius:7px; background:#edf1f0; }
.patrol-photo-grid span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.82rem; font-weight:700; }
.patrol-photo-grid small { color:var(--muted); }
.patrol-photo-upload { display:flex; align-items:end; gap:10px; margin-top:12px; }
.patrol-photo-upload label { flex:1; margin:0; }
.patrol-submit-card { display:flex; align-items:center; justify-content:space-between; gap:14px; border:2px solid var(--mint-deep); background:var(--mint-tint); }
.patrol-submit-card h2,.patrol-submit-card p { margin:0; }
.patrol-submit-card p { margin-top:4px; color:#4f625c; }
.patrol-submit-card form { flex:none; margin:0; }
.patrol-submit-card .btn { min-height:48px; }
.patrol-archived { display:flex; justify-content:center; align-items:center; gap:9px; color:#176047; background:var(--mint-tint); }
.patrol-report-section fieldset:disabled input,.patrol-report-section fieldset:disabled textarea,.patrol-report-section fieldset:disabled select { color:var(--ink); opacity:1; -webkit-text-fill-color:var(--ink); }

@media (max-width:680px) {
  .patrol-new-basics,.patrol-parent-texts,.patrol-redlight-grid { grid-template-columns:1fr; }
  .patrol-primary-action,.patrol-section-save,.patrol-photo-upload .btn,.patrol-submit-card .btn { width:100%; }
  .patrol-check-buttons,.patrol-radio-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .patrol-check-buttons span,.patrol-radio-buttons span { min-height:50px; padding:8px 9px; }
  .patrol-report-card { grid-template-columns:1fr; }
  .patrol-report-side { display:grid; grid-template-columns:auto 1fr 1fr; }
  .patrol-report-side .btn { width:100%; min-height:44px; }
  .patrol-record-hero { padding:14px; }
  .patrol-progress { top:54px; margin-left:-4px; margin-right:-4px; gap:3px; padding:5px; }
  .patrol-progress a { display:grid; gap:2px; min-height:52px; padding:4px 2px; font-size:.68rem; }
  .patrol-progress a span { margin:auto; }
  .patrol-report-section { scroll-margin-top:122px; padding:13px 12px; }
  .patrol-subcard,.patrol-coach-score,.patrol-parent-card { padding:12px; }
  .patrol-theme-choose { grid-template-columns:1fr; }
  .patrol-theme-choose .btn { width:100%; min-height:44px; }
  .patrol-score-buttons { grid-template-columns:1fr 1fr; }
  .patrol-photo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .patrol-photo-upload,.patrol-submit-card,.patrol-archived { display:grid; grid-template-columns:1fr; }
  .patrol-submit-card { text-align:center; }
}

/* ===== 巡課回報 ③：異常觸發與追蹤事項 ===== */
.patrol-tracker-page-head { margin-bottom:10px; }
.patrol-tracker-page-head h1 { margin:0 0 4px; font-size:1.65rem; }
.patrol-tracker-page-head p { margin:0; color:var(--muted); }
.patrol-tracker-group { scroll-margin-top:78px; }
.patrol-tracker-list { display:grid; gap:9px; }
.patrol-tracker-card { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; padding:13px 14px; border:1px solid var(--line); border-left:5px solid #d8a53a; border-radius:12px; color:var(--ink); background:#fff; }
.patrol-tracker-card.status-assigned { border-left-color:#5f9f90; }
.patrol-tracker-card.status-closed { border-left-color:#aab4b0; background:#f7f9f8; }
.patrol-tracker-card:hover { border-top-color:#91bfb4; border-right-color:#91bfb4; border-bottom-color:#91bfb4; text-decoration:none; }
.patrol-tracker-card-copy { min-width:0; display:grid; gap:4px; }
.patrol-tracker-card-copy strong,.patrol-tracker-card-copy small { overflow-wrap:anywhere; }
.patrol-tracker-card-copy small { color:var(--muted); }
.patrol-tracker-card-side { display:flex; align-items:center; gap:7px; }
.patrol-tracker-card-side .ui-icon { width:18px; height:18px; color:var(--muted); }
.patrol-tracker-hero { align-items:center; }
.patrol-tracker-hero > div { min-width:0; }
.patrol-tracker-hero h1 { overflow-wrap:anywhere; }
.patrol-tracker-hero > .tag { flex:none; background:#fff; }
.patrol-tracker-item-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.patrol-tracker-item { min-width:0; padding:14px; border:1px solid var(--line); border-radius:12px; background:#fafcfb; }
.patrol-tracker-item header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; }
.patrol-tracker-item header > span { padding:3px 8px; border-radius:7px; color:var(--mint-deep); background:var(--mint-tint); font-size:.75rem; font-weight:800; }
.patrol-tracker-item header small { min-width:0; color:var(--muted); overflow-wrap:anywhere; text-align:right; }
.patrol-tracker-item h3 { margin:0 0 7px; overflow-wrap:anywhere; }
.patrol-tracker-option { margin:0; color:#8a352f; font-weight:800; overflow-wrap:anywhere; }
.patrol-tracker-item dl { margin:10px 0 0; padding-top:9px; border-top:1px solid var(--line); }
.patrol-tracker-item dt { color:var(--muted); font-size:.75rem; font-weight:700; }
.patrol-tracker-item dd { margin:3px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.patrol-tracker-detail-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; }
.patrol-tracker-detail-grid > .card { min-width:0; margin-top:0; }
.patrol-tracker-timeline-card h2,.patrol-tracker-result-card h2 { margin-bottom:13px; }
.patrol-tracker-timeline { display:grid; gap:0; margin:0; padding:0; list-style:none; }
.patrol-tracker-timeline li { position:relative; min-width:0; display:grid; grid-template-columns:18px minmax(0,1fr); gap:10px; min-height:60px; }
.patrol-tracker-timeline li:not(:last-child)::after { content:""; position:absolute; top:17px; bottom:-1px; left:8px; width:2px; background:#dce4e1; }
.patrol-tracker-timeline li > span { position:relative; z-index:1; width:18px; height:18px; border:3px solid #d3dcd9; border-radius:50%; background:#fff; }
.patrol-tracker-timeline li.done > span { border-color:var(--mint-deep); background:var(--mint); }
.patrol-tracker-timeline li div { min-width:0; display:grid; align-content:start; gap:3px; padding-bottom:14px; }
.patrol-tracker-timeline strong,.patrol-tracker-timeline small { overflow-wrap:anywhere; }
.patrol-tracker-timeline small { color:var(--muted); }
.patrol-tracker-results { display:grid; gap:10px; margin:0 0 14px; }
.patrol-tracker-results > div { min-width:0; padding-bottom:10px; border-bottom:1px solid var(--line); }
.patrol-tracker-results dt { color:var(--muted); font-size:.78rem; font-weight:700; }
.patrol-tracker-results dd { margin:4px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.patrol-tracker-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.patrol-tracker-actions form { min-width:0; margin:0; padding:13px; border:1px solid var(--line); border-radius:12px; background:#fafcfb; }
.patrol-tracker-actions label { margin:0 0 10px; }
.patrol-tracker-actions textarea { resize:vertical; }
.patrol-tracker-actions .btn { min-height:44px; }

@media (max-width:958px) {
  .patrol-tracker-detail-grid { grid-template-columns:1fr; }
}

@media (max-width:680px) {
  .patrol-tracker-page-head h1 { font-size:1.45rem; }
  .patrol-tracker-group { scroll-margin-top:62px; }
  .patrol-tracker-card { grid-template-columns:1fr; padding:12px; }
  .patrol-tracker-card-side { justify-content:space-between; }
  .patrol-tracker-hero { display:grid; grid-template-columns:1fr; align-items:start; }
  .patrol-tracker-hero > .tag { justify-self:start; }
  .patrol-tracker-item-list,.patrol-tracker-actions { grid-template-columns:1fr; }
  .patrol-tracker-item { padding:12px; }
  .patrol-tracker-item header { align-items:flex-start; }
  .patrol-tracker-item header small { text-align:left; }
  .patrol-tracker-actions form { padding:12px; }
  .patrol-tracker-actions .btn,.patrol-tracker-result-card .btn { width:100%; min-height:46px; }
}

/* ===== 巡課回報 ④：列表查詢與覆蓋率 ===== */
.patrol-reporting-tabs { margin:12px 0 14px; }
.patrol-overview-head { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; }
.patrol-overview-filter { padding:0; overflow:hidden; }
.patrol-overview-filter > summary { min-height:58px; display:grid; grid-template-columns:minmax(0,1fr) 20px; align-items:center; gap:12px; padding:10px 16px; list-style:none; cursor:pointer; }
.patrol-overview-filter > summary::-webkit-details-marker { display:none; }
.patrol-overview-filter > summary > span { min-width:0; display:grid; gap:2px; }
.patrol-overview-filter > summary small { color:var(--muted); font-size:.76rem; font-weight:500; }
.patrol-overview-filter > summary .ui-icon { color:var(--mint-deep); transition:transform .18s ease; }
.patrol-overview-filter[open] > summary { border-bottom:1px solid var(--line); }
.patrol-overview-filter[open] > summary .ui-icon { transform:rotate(90deg); }
.patrol-overview-filter-form { padding:14px 16px 16px; }
.patrol-overview-filter-fields { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:10px 12px; }
.patrol-overview-filter-fields label { min-width:0; margin:0; }
.patrol-overview-filter-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:13px; }
.patrol-overview-filter-actions .plain-action { margin-right:auto; }
.patrol-overview-table-scroll { max-width:100%; }
.patrol-overview-table { min-width:890px; }
.patrol-overview-table td { vertical-align:middle; }
.patrol-overview-table td:nth-child(1),.patrol-overview-table td:nth-child(5),.patrol-overview-table td:nth-child(6),.patrol-overview-table td:last-child { white-space:nowrap; }
.patrol-overview-status { display:inline-flex; align-items:center; justify-content:center; min-height:26px; padding:3px 9px; border-radius:999px; color:#68736f; background:#edf1f0; font-size:.74rem; font-weight:750; white-space:nowrap; }
.patrol-overview-status.status-pending { color:#895d0c; background:#fff2cf; }
.patrol-overview-status.status-assigned { color:#246557; background:#e2f3ee; }
.patrol-overview-status.status-closed { color:#58645f; background:#e8edeb; }
.patrol-overview-mobile { display:none; }
.patrol-pagination { min-height:48px; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px; margin:14px 0; }
.patrol-pagination > :first-child { justify-self:start; }
.patrol-pagination > :last-child { justify-self:end; }
.patrol-pagination > span { color:var(--muted); font-size:.82rem; }
.patrol-coverage-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.patrol-coverage-summary .card { min-height:92px; display:grid; grid-template-columns:1fr auto; align-items:center; gap:12px; margin:0; padding:15px 17px; border-top:4px solid #55a88f; }
.patrol-coverage-summary .status-stale,.patrol-coverage-summary .status-never { border-top-color:#ce574f; background:#fff9f8; }
.patrol-coverage-summary span { color:var(--muted); font-size:.82rem; font-weight:700; }
.patrol-coverage-summary strong { color:var(--ink); font-size:1.75rem; }
.patrol-coverage-summary .status-stale strong,.patrol-coverage-summary .status-never strong { color:#a33b35; }
.patrol-coverage-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.patrol-coverage-card { min-width:0; min-height:120px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; padding:14px; border:1px solid var(--line); border-left:5px solid #55a88f; border-radius:12px; background:#fff; }
.patrol-coverage-card.status-stale,.patrol-coverage-card.status-never { border-color:#efc1bd; border-left-color:#ce574f; background:#fff7f6; }
.patrol-coverage-card-copy { min-width:0; display:grid; gap:4px; }
.patrol-coverage-card-copy small { color:var(--muted); font-weight:650; }
.patrol-coverage-card-copy strong { overflow-wrap:anywhere; font-size:1rem; }
.patrol-coverage-card-copy span { color:#66736e; font-size:.76rem; }
.patrol-coverage-card-status { min-width:76px; display:grid; justify-items:end; gap:2px; text-align:right; }
.patrol-coverage-card-status strong { color:#24715e; font-size:1.7rem; line-height:1; }
.patrol-coverage-card-status span { color:#66736e; font-size:.74rem; font-weight:700; white-space:nowrap; }
.patrol-coverage-card.status-stale .patrol-coverage-card-status strong,.patrol-coverage-card.status-never .patrol-coverage-card-status strong,
.patrol-coverage-card.status-stale .patrol-coverage-card-status span,.patrol-coverage-card.status-never .patrol-coverage-card-status span { color:#a33b35; }

@media (max-width:958px) {
  .patrol-overview-filter-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .patrol-coverage-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:680px) {
  .patrol-reporting-tabs { margin-left:-12px; margin-right:-12px; }
  .patrol-overview-filter > summary { min-height:62px; padding:10px 12px; }
  .patrol-overview-filter-form { padding:12px; }
  .patrol-overview-filter-fields { grid-template-columns:1fr; gap:8px; }
  .patrol-overview-filter-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .patrol-overview-filter-actions .plain-action { grid-column:1/-1; justify-self:end; min-height:34px; margin:0; }
  .patrol-overview-filter-actions .btn { width:100%; min-height:44px; }
  .patrol-overview-table-scroll { display:none; }
  .patrol-overview-mobile { display:grid; }
  .patrol-overview-mobile-card { min-width:0; min-height:82px; display:grid; grid-template-columns:minmax(0,1fr) auto 18px; align-items:center; gap:9px; padding:11px 0; color:var(--ink); border-bottom:1px solid var(--line); }
  .patrol-overview-mobile-card:last-child { border-bottom:0; }
  .patrol-overview-mobile-card:hover { text-decoration:none; }
  .patrol-overview-mobile-copy { min-width:0; display:grid; gap:3px; }
  .patrol-overview-mobile-copy small,.patrol-overview-mobile-copy span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:.74rem; }
  .patrol-overview-mobile-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .patrol-overview-mobile-side { display:grid; justify-items:end; gap:5px; }
  .patrol-overview-mobile-side small { color:var(--muted); font-size:.7rem; white-space:nowrap; }
  .patrol-overview-mobile-card > .ui-icon { width:18px; height:18px; color:#7a8782; }
  .patrol-pagination .btn { min-height:44px; padding-left:11px; padding-right:11px; }
  .patrol-coverage-summary { gap:7px; }
  .patrol-coverage-summary .card { min-height:78px; display:grid; grid-template-columns:1fr; justify-items:center; gap:3px; padding:11px 8px; text-align:center; }
  .patrol-coverage-summary strong { grid-row:1; font-size:1.45rem; }
  .patrol-coverage-grid { grid-template-columns:1fr; }
  .patrol-coverage-card { min-height:108px; padding:13px 12px; }
}
.att-preview summary::-webkit-details-marker { display:none; }
.att-preview[open] .att-action { color:var(--ink); background:var(--mint); }
.att-frame { width: 100%; height: 520px; border: 1px solid #e2e8f0; border-radius: 8px; margin-top: 6px; background: #f8fafc; }
.att-img { max-width: 100%; max-height: 520px; border: 1px solid #e2e8f0; border-radius: 8px; margin-top: 6px; }

/* ---- 調整蓋章 ---- */
.stamp-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.stamp-co { display: inline-flex; gap: 6px; align-items: center; }
.stamp-size { display: inline-flex; gap: 8px; align-items: center; background: #fef3c7; border-radius: 8px; padding: 4px 10px; }
.stamp-size input[type="range"] { width: 120px; }
.stamp-stage { position: relative; margin: 0 auto; border: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.stamp-stage canvas { display: block; }
.stamp-overlay { position: absolute; inset: 0; }
.seal-el {
  position: absolute; cursor: grab; touch-action: none; user-select: none;
  border: 2px solid #c41d1d; color: #c41d1d; background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  box-sizing: border-box; padding: 0 4px;
  font-family: "DFKai-SB", "標楷體", "BiauKai", serif; white-space: nowrap;
}
.seal-el .seal-text { display: inline-block; line-height: 1; }
.seal-el .seal-title { display: inline-block; line-height: 1.25; text-align: center; }
.seal-el.sel { outline: 3px dashed #2563eb; outline-offset: 3px; }
.seal-cols { display: flex; flex-direction: row-reverse; width: 100%; height: 100%; padding: 6%; box-sizing: border-box; }
.seal-col { flex: 1; display: flex; flex-direction: column; }
.seal-col span {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: calc(100% * 1); line-height: 1;
}
.seal-el .seal-col span { font-size: inherit; }

/* ---- 匯款資訊 ---- */
.bank-fields { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 6px 14px 10px; margin: 10px 0; }

/* ---- 品項明細 ---- */
.items-block { margin: 14px 0; }
.items-block-head { min-height:40px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.items-block-head h2 { margin:0; }
.items-scroll { overflow-x: auto; margin-bottom: 8px; }
.items-scroll table { min-width: 720px; }
#itemsTable input { margin-top: 0; padding: 6px 7px; font-size: 0.9rem; }
#itemsTable .w-name { min-width: 140px; }
#itemsTable .w-spec { min-width: 110px; }
#itemsTable .w-num { width: 90px; }
#itemsTable .seq { color: #94a3b8; }
#itemsTable .subtotal { font-weight: 600; white-space: nowrap; }
.tax-box { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 14px; margin-top: 10px; }
.tax-box select { width: auto; margin-top: 0; }
.tax-summary { display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline; }
.tax-summary .grand { font-size: 1.05rem; }
.tax-summary .grand strong { color: #b45309; }
.detail-tax { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 14px; margin-top: 10px; }
.attachment-block { margin:18px 0; }
.attachment-head { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.attachment-head-copy { display:grid; gap:1px; }
.attachment-head h2 { margin:0; }
.attachment-head small { color:var(--text-secondary); font-size:.75rem; font-weight:500; }
.attachment-empty { margin:7px 0 0; color:#87948f; font-size:.86rem; }
.attachment-list { list-style:none; margin:7px 0 0; padding:0; }
.attachment-item { min-height:46px; display:flex; align-items:center; gap:10px; padding:7px 0; border-top:1px solid var(--line); }
.attachment-file-info { min-width:0; flex:1; overflow-wrap:anywhere; color:#46534e; font-size:.86rem; }
.attachment-item-error .attachment-file-info { color:#b42318; }
.attachment-remove { width:40px; height:40px; color:#7a8782; }

.flow-preview { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 10px 14px; margin: 14px 0; font-size: 0.9rem; }
.form-desc { background: #fefce8; border: 1px solid #fde047; border-radius: 8px; padding: 10px 14px; margin: 14px 0 0; font-size: 0.9rem; color: #713f12; }
.flow-preview .chain { color: #0369a1; }
.flow-preview-disclosure { padding:0 14px; background:#f7faf9; border-color:var(--line); }
.flow-preview-disclosure > summary { min-height:50px; display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; cursor:pointer; }
.flow-preview-disclosure > summary::-webkit-details-marker { display:none; }
.flow-preview-disclosure > summary > span { display:grid; gap:1px; }
.flow-preview-disclosure > summary small { color:var(--text-secondary); font-size:.74rem; font-weight:500; }
.flow-preview-disclosure > summary .ui-icon { width:17px; height:17px; color:var(--mint-deep); transition:transform .18s ease; }
.flow-preview-disclosure[open] > summary .ui-icon { transform:rotate(90deg); }
.flow-preview-body { display:grid; gap:5px; padding:0 0 12px; }
.doc-submit-row { display:grid; grid-template-columns:auto minmax(150px,220px); justify-content:end; gap:9px; margin-top:20px; padding-top:16px; border-top:1px solid var(--line); }
.addsign { margin-top: 12px; }
.addsign-users { display: flex; gap: 4px 16px; flex-wrap: wrap; margin-top: 8px; padding: 8px 12px; background: #f8fafc; border-radius: 8px; }
.addsign-users .inline-label { white-space: nowrap; }
.addsign summary { cursor: pointer; color: var(--mint-deep); }
.sign-form textarea { margin-bottom: 4px; }

/* ---- 管理列 ---- */
.adminnav { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0; }
.adminnav a { background: #fff; border: 1px solid #cbd5e1; border-radius: 7px; padding: 6px 13px; color: #334155; font-size: 0.9rem; }
.adminnav a:hover { background: var(--mint-tint); border-color: var(--mint); text-decoration: none; }
.payroll-nav { display:flex; gap:6px; flex-wrap:wrap; margin:10px 0 16px; padding:5px; border:1px solid #dbe3e0; border-radius:10px; background:#f8faf9; }
.payroll-nav a { padding:8px 12px; border-radius:7px; color:#475569; font-size:.92rem; }
.payroll-nav a:hover, .payroll-nav a.active { background:#fff; color:#25282A; text-decoration:none; box-shadow:0 1px 4px rgba(37,40,42,.1); }
.payroll-table-wrap { overflow:auto; border:1px solid #dbe3e0; border-radius:10px; margin:10px 0; }
.payroll-table-wrap table { margin:0; min-width:760px; }
.payroll-table-wrap th { white-space:nowrap; text-align:center; vertical-align:middle; }
.payroll-table-wrap td { vertical-align:middle; }
.payroll-items-table { min-width:1180px !important; }
.payroll-items-table td:nth-child(n+3):nth-child(-n+10) { text-align:center; white-space:nowrap; }
.payroll-row-actions { display:flex; gap:5px; align-items:center; white-space:nowrap; }
.payroll-row-actions form { margin:0; }
.payroll-inactive-row { opacity:.58; background:#f8fafc; }
.payroll-pagination { display:flex; gap:6px; justify-content:center; flex-wrap:wrap; margin-top:14px; }
.payroll-edit-card { border-color:#B5E3D8; }
.payroll-check-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:4px 14px; margin:12px 0; }
.payroll-check-grid .check { min-height:44px; }
.payroll-version-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:12px 0; }
.payroll-version-summary > div { display:flex; flex-direction:column; gap:3px; border:1px solid #dbe3e0; border-radius:9px; padding:12px; background:#f8faf9; }
.payroll-bracket-list { columns:4; column-gap:28px; }
.payroll-bracket-list li { break-inside:avoid; padding:2px 0; }
.payroll-preview { border:1px solid #B5E3D8; border-radius:10px; padding:12px 16px; margin:12px 0; background:var(--mint-tint); }
.payroll-subnav { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 14px; }
.payroll-subnav a { border:1px solid #dbe3e0; border-radius:999px; padding:7px 13px; color:#475569; background:#fff; }
.payroll-subnav a.active { border-color:#B5E3D8; background:var(--mint-tint); color:#25282A; text-decoration:none; }
.payroll-profile-items { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px; margin:12px 0; }
.payroll-profile-items label { display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid #e2e8f0; border-radius:9px; padding:9px 11px; }
.payroll-profile-items input { width:120px; }
.payroll-live-total { margin:12px 0; padding:12px 14px; border-radius:9px; background:var(--mint-tint); text-align:right; }
.payroll-me-date { display:flex; align-items:end; gap:10px; }
.payroll-me-date label { margin:0; }
.payroll-me-list { display:grid; gap:7px; }
.payroll-me-list > div { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid #e2e8f0; padding:8px 0; }
.payroll-me-bank { display:grid; grid-template-columns:max-content 1fr; gap:6px 14px; margin-top:16px; }
.payroll-me-bank dt { color:#64748b; }
.payroll-me-bank dd { margin:0; overflow-wrap:anywhere; }
.payroll-me-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; }
.payroll-me-cards article { border:1px solid #dbe3e0; border-radius:10px; padding:12px; }
.payroll-me-cards article h3 { margin-top:0; }
.payroll-rollcall { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:14px 0; }
.payroll-rollcall > div { border:1px solid #dbe3e0; border-radius:10px; padding:12px 14px; background:#f8faf9; }
.payroll-rollcall h3 { margin-top:0; }
.payroll-line-list { display:grid; gap:10px; }
.payroll-line-list > article { border:1px solid #dbe3e0; border-radius:10px; padding:12px 14px; }
.payroll-line-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.payroll-line-head > div { display:flex; flex-direction:column; }
.payroll-negative { color:#b42318; }
.payroll-basis { margin-top:10px; }
.payroll-basis summary { cursor:pointer; color:#475569; }
.payroll-basis pre { white-space:pre-wrap; overflow-wrap:anywhere; background:#f8faf9; border-radius:8px; padding:10px; font-size:.78rem; }
.dept-rows { display: flex; flex-direction: column; gap: 4px; }
.dept-row { display: flex; gap: 4px; align-items: center; }
.dept-row select { min-width: 170px; }

/* ---- 打卡與紀錄（A1 + A2） ---- */
.attendance-page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.attendance-page-head h1 { margin-bottom:2px; }
.attendance-page-head p { margin:0; }
.attendance-create-panel[hidden] { display:none !important; }
.attendance-create-panel { scroll-margin-top:64px; }
.attendance-location-create-block { padding:14px 0; border-top:1px solid var(--line); }
.attendance-location-create-block:first-of-type { padding-top:2px; border-top:0; }
.attendance-location-create-block:last-child { padding-bottom:0; }
.attendance-location-create-block h3 { margin:0 0 8px; }
.attendance-summary-card { max-width:720px; margin-left:auto; margin-right:auto; }
.attendance-today-summary { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0; }
.attendance-today-summary > div { background:var(--mint-tint); border:1px solid var(--mint); border-radius:10px; padding:12px; text-align:center; }
.attendance-today-summary span { display:block; color:#64748b; font-size:.82rem; }
.attendance-today-summary strong { display:block; font-size:1.35rem; color:var(--ink); }
.attendance-punch-actions { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; }
.attendance-punch-button { min-height:132px; border:0; border-radius:14px; padding:20px 14px; cursor:pointer; font-family:inherit; box-shadow:0 3px 9px rgba(37,40,42,.16); }
.attendance-punch-button span { display:block; font-family:'GlowSansTC Wide','GlowSansTC',sans-serif; font-size:1.45rem; font-weight:700; }
.attendance-punch-button small { display:block; margin-top:7px; font-size:.83rem; }
.attendance-punch-button.punch-in { background:var(--ink); color:#fff; border-bottom:5px solid var(--mint); }
.attendance-punch-button.punch-in small { color:#cdd4d1; }
.attendance-punch-button.punch-out { background:var(--mint); color:var(--ink); border-bottom:5px solid var(--ink); }
.attendance-punch-button:disabled { opacity:.55; cursor:wait; }
.attendance-status { min-height:25px; margin:12px 0 0; text-align:center; color:#475569; }
.attendance-status.success { color:#166534; font-weight:700; }
.attendance-status.error { color:#b91c1c; font-weight:700; }
.attendance-tag-abnormal { background:#fee2e2; color:#991b1b; }
.attendance-reason-dialog { position:fixed; inset:0; z-index:200; background:rgba(37,40,42,.72); padding:18px; display:flex; align-items:center; justify-content:center; }
.attendance-reason-dialog[hidden] { display:none; }
.attendance-reason-panel { width:min(100%,480px); background:#fff; border-radius:14px; border-top:5px solid var(--mint); padding:20px; box-shadow:0 16px 48px rgba(0,0,0,.35); }
.attendance-reason-panel p { margin:6px 0; }
.attendance-reason-error { min-height:22px; color:#b91c1c; font-size:.86rem; }
.attendance-month-nav { display:flex; justify-content:center; align-items:center; gap:14px; margin:12px 0; }
.attendance-month-nav strong { min-width:90px; text-align:center; font-size:1.05rem; }
.attendance-report-filter label { margin:0; font-size:.84rem; }
.attendance-report-filter button { align-self:flex-end; }
.attendance-dashboard-entry { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.attendance-dashboard-entry p { margin:0; }
.attendance-dashboard-entry .btn-row { margin-top:0; }
.attendance-location-list { display:grid; gap:12px; }
.attendance-location-item { border:1px solid #dbe3e0; border-radius:10px; padding:14px; display:grid; grid-template-columns:1fr auto; gap:12px; align-items:end; }
.attendance-location-item.inactive { opacity:.62; background:#f8fafc; }
.attendance-location-heading { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.attendance-unlimited-check, .attendance-setting-check { min-height:44px; display:flex; align-items:center; gap:9px; align-self:end; margin:0; padding:8px 0; line-height:1.45; }
.attendance-unlimited-check input[type="checkbox"], .attendance-setting-check input[type="checkbox"],
.attendance-user-checklist input[type="checkbox"] { width:18px; min-width:18px; height:18px; min-height:18px; flex:none; margin:0; padding:0; }
.attendance-qr-location { max-width:720px; margin:12px auto; padding:12px 16px; border:2px solid var(--mint); border-radius:10px; background:var(--mint-tint); text-align:center; }
.attendance-qr-location span { display:block; color:#64748b; font-size:.8rem; }
.attendance-qr-location strong { display:block; color:var(--ink); font-family:'GlowSansTC Wide','GlowSansTC',sans-serif; font-size:1.2rem; }
.attendance-qr-screen-actions { display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap; margin:14px 0; }
.attendance-qr-print-card { width:min(100%,720px); margin:18px auto; padding:34px; border:3px solid var(--ink); border-radius:14px; background:#fff; text-align:center; box-shadow:7px 7px 0 var(--mint); }
.attendance-qr-print-card h1 { margin:12px 0 18px; font-size:2.2rem; }
.attendance-qr-brand { color:var(--mint-deep); font-family:'GlowSansTC Wide','GlowSansTC',sans-serif; font-size:1.05rem; letter-spacing:.08em; }
.attendance-qr-print-card img { display:block; width:min(100%,480px); height:auto; margin:0 auto; image-rendering:pixelated; }
.attendance-qr-instruction { margin:14px 0 0; color:var(--ink); font-size:1.2rem; font-weight:700; }
.attendance-qr-generated { margin:4px 0 0; color:#64748b; font-size:.82rem; }
.attendance-qr-inactive { margin:0 auto 12px; }
.attendance-qr-invalid { max-width:560px; margin:60px auto; text-align:center; padding:34px 22px; }
.attendance-qr-invalid h1 { margin:12px 0 4px; }
.attendance-qr-invalid-icon { width:64px; height:64px; margin:0 auto; border-radius:50%; background:#fee2e2; color:#991b1b; font-size:2.2rem; font-weight:700; line-height:64px; }
.attendance-config-list { display:grid; gap:14px; }
.attendance-config-item { border:1px solid #dbe3e0; border-radius:10px; padding:14px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:end; }
.attendance-config-item.inactive { opacity:.62; background:#f8fafc; }
.attendance-config-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.attendance-subhead { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:12px 0 6px; }
.attendance-subhead h2, .attendance-subhead p { margin:0; }
.attendance-breaks { margin:12px 0; padding:10px 12px; border:1px solid #dbe3e0; border-radius:9px; background:#f8fafc; }
.attendance-break-row { display:grid; grid-template-columns:minmax(140px,1fr) minmax(140px,1fr) auto; gap:10px; align-items:end; }
.attendance-break-row label { margin:4px 0; }
.attendance-break-row .btn { margin-bottom:1px; }
.attendance-work-preview, .attendance-week-total { color:var(--mint-deep); font-weight:700; }
.attendance-rule-summary > .btn-row { margin:0; justify-content:flex-end; }
.attendance-rule-summary > .btn-row form { margin:0; }
.attendance-week-grid { display:grid; gap:8px; }
.attendance-week-row { display:grid; grid-template-columns:70px minmax(150px,.7fr) minmax(280px,1.8fr); gap:12px; align-items:end; padding:8px 10px; border:1px solid #e2e8f0; border-radius:9px; }
.attendance-week-row > strong { align-self:center; }
.attendance-week-row label { margin:0; }
.attendance-roster-note { border-color:var(--mint); background:var(--mint-tint); }
.attendance-assignment-filter { align-items:center; }
.attendance-user-checklist { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:8px; margin:10px 0; }
.attendance-user-checklist .member-check { min-height:44px; display:flex; align-items:flex-start; gap:8px; margin:0; padding:10px; border:1px solid #dbe3e0; border-radius:8px; }
.attendance-user-checklist .member-check input { margin-top:2px; }
.attendance-user-checklist small { display:block; color:#64748b; font-weight:400; }
.attendance-assignment-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.attendance-assignment-list { display:grid; gap:10px; }
.attendance-assignment-item { border:1px solid #dbe3e0; border-radius:9px; padding:12px; }
.attendance-today-team { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:9px; }
.attendance-today-team > div { border:1px solid var(--mint); border-radius:9px; padding:10px 12px; background:var(--mint-tint); }
.attendance-today-team span, .attendance-today-team small { display:block; }
.attendance-today-team span { color:var(--ink); }
.attendance-today-team small { color:#64748b; }
.attendance-schedule-filter { display:flex; align-items:end; gap:12px; flex-wrap:wrap; }
.attendance-schedule-filter label { min-width:210px; margin:0; }
.attendance-schedule-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.attendance-schedule-toolbar h2 { display:inline-block; margin-right:8px; }
.attendance-schedule-toolbar .btn-row, .attendance-schedule-toolbar form { margin:0; }
.attendance-publication-draft { background:#fef3c7; color:#92400e; }
.attendance-publication-partial { background:#e0f2fe; color:#075985; }
.attendance-publication-published { background:#dcfce7; color:#166534; }
.attendance-schedule-legend { display:flex; gap:14px; align-items:center; flex-wrap:wrap; margin:10px 0; color:#64748b; font-size:.84rem; }
.attendance-schedule-legend span { display:inline-flex; gap:5px; align-items:center; }
.attendance-schedule-legend i { display:inline-grid; place-items:center; width:25px; height:25px; border-radius:6px; font-style:normal; font-weight:700; }
.attendance-schedule-legend .is-unscheduled { border:1px dashed #cbd5e1; background:#fff; }
.attendance-schedule-legend .is-rest { background:#e2e8f0; color:#475569; }
.attendance-schedule-legend .is-holiday { background:#fef3c7; color:#92400e; }
.attendance-schedule-save-status { min-height:24px; margin:5px 0; font-weight:700; }
.attendance-schedule-save-status.success { color:#166534; }
.attendance-schedule-save-status.error { color:#b91c1c; }
.attendance-schedule-table-wrap { overflow:auto; max-height:72vh; border:1px solid #dbe3e0; border-radius:10px; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.07); }
.attendance-schedule-table { width:max-content; min-width:100%; border-collapse:separate; border-spacing:0; }
.attendance-schedule-table th, .attendance-schedule-table td { min-width:64px; padding:4px; text-align:center; border-right:1px solid #edf1f0; border-bottom:1px solid #e2e8f0; background:#fff; }
.attendance-schedule-table thead th { position:sticky; top:0; z-index:3; background:#f8fafc; }
.attendance-schedule-table thead th strong, .attendance-schedule-table thead th small { display:block; }
.attendance-schedule-table thead th.today { background:var(--mint-tint); color:var(--mint-deep); }
.attendance-schedule-table th.weekend, .attendance-schedule-table td.weekend { background:#fbfcfc; }
.attendance-schedule-table .attendance-schedule-person { position:sticky; left:0; z-index:2; min-width:210px; max-width:210px; text-align:left; padding:8px 10px; box-shadow:2px 0 0 #e2e8f0; }
.attendance-schedule-table thead .attendance-schedule-person { z-index:4; }
.attendance-schedule-person > strong, .attendance-schedule-person > small { display:block; }
.attendance-schedule-person > small { color:#64748b; font-weight:400; }
.attendance-row-fill { display:grid; grid-template-columns:1fr auto; gap:5px; margin-top:6px; }
.attendance-row-fill select { min-width:0; margin:0; padding:5px 6px; font-size:.76rem; }
.attendance-row-fill .btn { white-space:nowrap; padding:5px 7px; }
.attendance-schedule-cell { display:grid; place-items:center; width:54px; min-height:44px; margin:auto; padding:3px; border:1px solid transparent; border-radius:7px; background:#fff; color:var(--ink); font:700 .75rem 'GlowSansTC Wide','GlowSansTC',sans-serif; cursor:pointer; }
.attendance-schedule-cell:hover:not(:disabled) { outline:2px solid var(--mint); }
.attendance-schedule-cell.is-work { border-color:var(--shift-color); box-shadow:inset 0 -5px 0 var(--shift-color); }
.attendance-schedule-cell.is-rest { background:#e2e8f0; color:#475569; }
.attendance-schedule-cell.is-holiday { background:#fef3c7; color:#92400e; }
.attendance-schedule-cell.is-unscheduled { border:1px dashed #cbd5e1; color:#94a3b8; }
.attendance-schedule-cell.is-disabled { background:#f8fafc; color:#d5dcda; cursor:not-allowed; }
.attendance-schedule-dialog { width:min(92vw,440px); padding:18px; border:0; border-top:5px solid var(--mint); border-radius:12px; box-shadow:0 18px 60px rgba(0,0,0,.35); }
.attendance-schedule-dialog::backdrop { background:rgba(37,40,42,.68); }
.attendance-schedule-dialog-head { display:flex; justify-content:space-between; align-items:start; gap:12px; }
.attendance-schedule-dialog-head strong, .attendance-schedule-dialog-head small { display:block; }
.attendance-schedule-dialog-head small { color:#64748b; }
.attendance-schedule-draft-notice { background:#fef3c7; color:#92400e; }
.attendance-my-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:7px; }
.attendance-calendar-weekday { padding:5px; text-align:center; color:#64748b; font-size:.8rem; }
.attendance-calendar-day { min-height:112px; padding:9px; border:1px solid #dbe3e0; border-radius:9px; background:#fff; overflow:hidden; }
.attendance-calendar-day.today { outline:3px solid var(--mint); }
.attendance-calendar-day.status-work { border-top:5px solid var(--shift-color); }
.attendance-calendar-day.status-rest { background:#f1f5f9; }
.attendance-calendar-day.status-holiday { background:#fffbeb; }
.attendance-calendar-day.status-draft { background:#fffbeb; border-style:dashed; }
.attendance-calendar-day.status-unscheduled { border-style:dashed; }
.attendance-calendar-day.not-roster { opacity:.38; }
.attendance-calendar-date { display:flex; align-items:center; justify-content:space-between; gap:4px; }
.attendance-calendar-date strong { font-family:'GlowSansTC Wide','GlowSansTC',sans-serif; }
.attendance-calendar-date small { color:#94a3b8; }
.attendance-calendar-code, .attendance-calendar-label { display:block; margin-top:12px; font-weight:700; line-height:1.25; }
.attendance-calendar-day > small { display:block; color:#64748b; font-size:.72rem; }
.attendance-calendar-note { margin-top:4px; color:#475569 !important; }
/* ---- 出勤結算與異常（A5） ---- */
.attendance-head-actions { margin-top:10px; }
.attendance-day-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:9px; }
.attendance-day-card { border:1px solid #dbe3e0; border-radius:9px; padding:11px 12px; background:#fff; }
.attendance-day-card.is-exempt, .attendance-row-exempt { background:#f8fafc; }
.attendance-day-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.attendance-day-card > small, .attendance-days-table td > small { display:block; color:#64748b; }
.attendance-day-flags { display:flex; align-items:center; gap:5px; flex-wrap:wrap; margin-top:8px; }
.attendance-tag-warning, .attendance-minute-warning { background:#fef3c7; color:#92400e; }
.attendance-tag-absent { background:#991b1b; color:#fff; }
.attendance-tag-exempt { background:#e0f2fe; color:#075985; }
.attendance-minute { display:inline-block; border-radius:6px; padding:2px 7px; font-weight:700; white-space:nowrap; }
.attendance-recalculate-panel > summary { cursor:pointer; color:var(--mint-deep); font-weight:700; }
.attendance-recalculate-panel[open] > summary { margin-bottom:8px; }
.attendance-days-table-wrap { overflow:auto; border:1px solid #e2e8f0; border-radius:9px; }
.attendance-days-table { min-width:1180px; }
.attendance-days-table th { background:#f8fafc; }
.attendance-days-table td:first-child, .attendance-days-table td:nth-child(2) { min-width:135px; }
.attendance-days-table td:nth-child(3), .attendance-days-table td:nth-child(4) { min-width:158px; }
.attendance-row-menu { position:relative; min-width:102px; }
.attendance-row-menu > summary { list-style:none; text-align:center; }
.attendance-row-menu > summary::-webkit-details-marker { display:none; }
.attendance-row-menu form { width:260px; padding:10px; margin-top:6px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; box-shadow:0 6px 18px rgba(37,40,42,.14); white-space:normal; }
.attendance-row-menu label { margin:0 0 8px; }

@media (max-width:680px) {
  .attendance-page-head > .btn { width:100%; text-align:center; }
  .attendance-punch-actions { grid-template-columns:1fr; }
  .attendance-punch-button { min-height:118px; width:100%; }
  .attendance-punch-button span { font-size:1.55rem; }
  .attendance-reason-dialog { align-items:flex-end; padding:0; }
  .attendance-reason-panel { width:100%; border-radius:16px 16px 0 0; padding:18px 14px 22px; }
  .attendance-reason-panel .btn-row, .attendance-reason-panel .btn { width:100%; }
  .attendance-month-nav { gap:7px; }
  .attendance-month-nav .btn { padding:8px 10px; flex:1; text-align:center; }
  .attendance-report-filter, .attendance-report-filter label, .attendance-report-filter input,
  .attendance-report-filter select, .attendance-report-filter .btn { width:100%; }
  .attendance-dashboard-entry, .attendance-dashboard-entry .btn-row, .attendance-dashboard-entry .btn { width:100%; }
  .attendance-dashboard-entry .btn { text-align:center; }
  .attendance-location-item { grid-template-columns:1fr; }
  .attendance-location-item > form:last-child .btn { width:100%; }
  .attendance-config-item, .attendance-break-row, .attendance-week-row { grid-template-columns:1fr; }
  .attendance-config-item > form:last-child .btn, .attendance-config-item .btn-row, .attendance-config-item .btn-row .btn { width:100%; }
  .attendance-rule-summary > .btn-row { justify-content:stretch; }
  .attendance-week-row { gap:5px; }
  .attendance-week-row > strong { padding-bottom:3px; border-bottom:1px solid #e2e8f0; }
  .attendance-assignment-filter, .attendance-assignment-filter label, .attendance-assignment-filter select { width:100%; }
  .attendance-user-checklist { grid-template-columns:1fr; }
  .attendance-today-team { grid-template-columns:1fr; }
  .attendance-assignment-actions, .attendance-assignment-actions .btn { width:100%; }
  .attendance-create-panel .grid-form { gap:8px; }
  .attendance-create-panel > form > .btn-primary { width:100%; min-height:44px; }
  .attendance-create-panel .attendance-assignment-actions { display:grid; grid-template-columns:1fr; }
  .attendance-location-create-block { padding:16px 0; }
  .attendance-qr-print-card { padding:22px 14px; }
  .attendance-qr-print-card h1 { font-size:1.65rem; }
  .attendance-qr-screen-actions .btn { flex:1; text-align:center; }
  .attendance-schedule-filter, .attendance-schedule-filter label, .attendance-schedule-filter select,
  .attendance-schedule-filter input, .attendance-schedule-filter .btn { width:100%; }
  .attendance-schedule-toolbar, .attendance-schedule-toolbar .btn-row, .attendance-schedule-toolbar form,
  .attendance-schedule-toolbar .btn { width:100%; }
  .attendance-schedule-toolbar .btn { text-align:center; }
  .attendance-schedule-table { display:table; width:max-content; min-width:100%; }
  .attendance-schedule-table thead { display:table-header-group; }
  .attendance-schedule-table tbody { display:table-row-group; width:auto; }
  .attendance-schedule-table tr { display:table-row; width:auto; margin:0; padding:0; border:0; }
  .attendance-schedule-table th, .attendance-schedule-table td { display:table-cell; width:auto; }
  .attendance-schedule-table td[data-th]::before { content:none; }
  .attendance-schedule-table .attendance-schedule-person { min-width:190px; max-width:190px; }
  .attendance-calendar-weekday { display:none; }
  .attendance-my-calendar { grid-template-columns:1fr; gap:8px; }
  .attendance-calendar-day { grid-column:1 !important; min-height:0; display:grid; grid-template-columns:105px 1fr; align-items:center; gap:10px; padding:11px 13px; }
  .attendance-calendar-day::before { content:attr(data-date-label); font-weight:700; }
  .attendance-calendar-date { display:none; }
  .attendance-calendar-code, .attendance-calendar-label { margin:0; }
  .attendance-calendar-day > small { grid-column:2; }
  .attendance-head-actions, .attendance-head-actions .btn { width:100%; text-align:center; }
  .attendance-day-cards { grid-template-columns:1fr; }
  .attendance-recalculate-panel .grid-form, .attendance-recalculate-panel .btn { width:100%; }
}

@media print {
  @page { size:auto; margin:12mm; }
  body { background:#fff; }
  .topnav, .global-work-timer, .app-version, .attendance-qr-screen-actions { display:none !important; }
  .container { max-width:none; padding:0; }
  .attendance-qr-print-card { width:100%; max-width:180mm; margin:0 auto; padding:12mm; border:2px solid #25282A; border-radius:0; box-shadow:none; break-inside:avoid; }
  .attendance-qr-print-card h1 { font-size:26pt; }
  .attendance-qr-print-card img { width:125mm; max-width:100%; }
  .attendance-qr-inactive { display:none; }
}

/* ---- 組織圖 ---- */
.org-help-card { padding-top:8px; padding-bottom:8px; }
.org-help-card summary, .org-full-disclosure > summary { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; cursor:pointer; }
.org-help-card summary::-webkit-details-marker, .org-full-disclosure > summary::-webkit-details-marker { display:none; }
.org-help-card summary .ui-icon, .org-full-disclosure > summary .ui-icon { width:16px; height:16px; flex:none; color:var(--mint-deep); transition:transform .18s ease; }
.org-help-card[open] summary .ui-icon, .org-full-disclosure[open] > summary .ui-icon { transform:rotate(90deg); }
.org-help-body { padding:4px 0 6px; }
.org-help-body p { margin:7px 0; }
.org-mobile-overview { display:none; }
.org-full-disclosure > summary { display:none; }
.report-filter-card > summary { display:none; }
.report-filter-form { display:grid; gap:12px; }
.report-filter-fields { display:grid; grid-template-columns:minmax(280px,.9fr) minmax(480px,1.6fr); gap:10px; align-items:end; }
.report-date-grid, .report-select-grid { display:grid; gap:10px; }
.report-date-grid { grid-template-columns:1fr 1fr; }
.report-select-grid { grid-template-columns:repeat(4,minmax(110px,1fr)); }
.report-filter-form label { min-width:0; margin:0; }
.report-filter-form input, .report-filter-form select { width:100%; min-width:0; }
.report-filter-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.report-stat-row .num { font-size:clamp(1.25rem,2.3vw,1.8rem); overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.org-scroll { overflow-x: auto; padding: 10px 4px 20px; }
/* 內容比視窗寬時從左緣開始捲動,窄時置中(不能用 justify-content:center,會讓左半邊捲不到) */
.org-canvas { width: max-content; margin: 0 auto; position: relative; }
/* 企業主:左上(位置由 JS 對齊主管處欄位);與下方樹之間留連接線空間 */
.org-owner { display: inline-block; margin-bottom: 26px; }
.org-row { display: flex; align-items: flex-start; gap: 24px; }
.org-line { position: absolute; background: #64748b; z-index: 0; }
.org-connector-v { width: 2px; height: 18px; background: #cbd5e1; }
.org-node {
  display: inline-block; background: #fff; border: 2px solid #cbd5e1; border-radius: 9px;
  padding: 8px 12px; min-width: 130px; max-width: 190px; text-align: center; font-size: 0.85rem;
}
.org-node.org-role { border-color: var(--ink); background: var(--ink); color: #fff; }
.org-node.org-role .org-mgr { color: #cdd4d1; }
.org-node.org-mine { border-color: var(--mint-deep); box-shadow: 0 0 0 3px var(--mint); }
.org-node.org-vacant { border-style: dashed; }
.org-name { font-weight: 700; }
.org-mgr { color: #475569; font-size: 0.8rem; margin-top: 2px; }
.org-mgr .ui-icon { width:13px; height:13px; margin-right:4px; vertical-align:-2px; }
.org-vacant .org-mgr { color: #b45309; }
.org-members { margin-top: 5px; padding-top: 5px; border-top: 1px dashed #e2e8f0; color: #64748b; font-size: 0.76rem; display: flex; flex-wrap: wrap; gap: 2px 8px; justify-content: center; }
.org-members .org-me { color: var(--mint-deep); font-weight: 700; }
.org-legend { display: inline-block; border: 2px solid; border-radius: 5px; padding: 0 6px; font-size: 0.8rem; }
.org-legend-mine { border-color: var(--mint-deep); color: var(--mint-deep); }
.org-legend-vacant { border-style: dashed; border-color: #94a3b8; color: #64748b; }

/* 最末層(科)直式堆疊 */
.org-vlist { display: flex; flex-direction: column; align-items: center; }
.org-vitem { position: relative; padding-top: 12px; }
.org-vitem::before { content: ''; position: absolute; top: 0; left: 50%; width: 2px; height: 12px; background: #cbd5e1; }
.org-vlist .org-node { min-width: 120px; max-width: 190px; padding: 5px 10px; font-size: 0.8rem; }

/* 樹狀連接線 */
.org-tree { display: flex; }
.org-tree ul { display: flex; padding: 18px 0 0; margin: 0; position: relative; list-style: none; }
.org-tree li { display: flex; flex-direction: column; align-items: center; position: relative; padding: 18px 8px 0; }
/* 向上的線 */
.org-tree li::before {
  content: ''; position: absolute; top: 0; left: 50%; width: 2px; height: 18px; background: #cbd5e1;
}
/* 橫向的線 */
.org-tree li::after {
  content: ''; position: absolute; top: 0; height: 2px; background: #cbd5e1; left: 0; right: 0;
}
.org-tree li:first-child::after { left: 50%; }
.org-tree li:last-child::after { right: 50%; }
.org-tree li:only-child::after { display: none; }
.org-tree > ul { padding-top: 0; }
.org-tree > ul > li { padding-top: 18px; }
.org-tree > ul > li::before { display: block; }
/* 父單位框 → 子層橫線之間的垂直短線(沒有這段,父框會浮在橫線上方) */
.org-tree li > ul::before {
  content: ''; position: absolute; top: 0; left: 50%; margin-left: -1px;
  width: 2px; height: 18px; background: #cbd5e1;
}
/* 注意:最上層不畫跨全寬的橫線,避免線條延伸到單位框之外;
   兄弟間的橫線由 li::after 的「首尾各半」規則繪製,自然終止於第一與最後一個單位的中心 */

/* ---- 手機:導覽列收合(漢堡選單) ---- */
.nav-toggle { display: none; position: relative; background: none; border: 1px solid #4a5052; border-radius: 6px; color: #fff; font-size: 1.05rem; line-height: 1; padding: 6px 11px; cursor: pointer; }
.nav-dot { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }

/* ---- 手機:表格轉卡片 ---- */
@media (max-width: 680px) {
  .payroll-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .payroll-nav a { text-align:center; }
  .payroll-version-summary { grid-template-columns:1fr; }
  .payroll-bracket-list { columns:2; }
  .payroll-edit-card .btn-row, .payroll-edit-card .btn-row .btn { width:100%; }
  .payroll-table-wrap table { display:table; width:max-content; }
  .payroll-table-wrap thead { display:table-header-group; }
  .payroll-table-wrap tbody { display:table-row-group; width:auto; }
  .payroll-table-wrap tr { display:table-row; width:auto; border:0; padding:0; }
  .payroll-table-wrap th, .payroll-table-wrap td { display:table-cell; width:auto; border-bottom:1px solid #e2e8f0; padding:8px 10px; }
  .payroll-profile-items { grid-template-columns:1fr; }
  .payroll-profile-items label { align-items:flex-start; flex-direction:column; }
  .payroll-profile-items input { width:100%; }
  .payroll-me-date { align-items:stretch; flex-direction:column; }
  .payroll-me-date .btn { width:100%; }
  .payroll-me-cards { grid-template-columns:1fr; }
  .payroll-rollcall { grid-template-columns:1fr; }
  .payroll-line-head { align-items:flex-start; }
  .container { padding: 6px 10px 60px; }
  .topnav { gap: 8px; }
  .topnav .brand { flex: 1; }
  .topnav .brand .brand-text { display: none; }
  .topnav .userbox { gap: 8px; font-size: 0.88rem; }
  .nav-toggle { display: block; }
  .topnav .links { display: none; order: 5; flex: none; width: 100%; flex-direction: column; gap: 0; border-top: 1px solid #3d4446; margin-top: 6px; }
  .topnav.open .links { display: flex; }
  .topnav .links a { padding: 11px 4px; border-bottom: 1px solid #3d4446; }
  .topnav .links a:last-child { border-bottom: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 10px; padding: 6px 4px; }
  td { border: none; padding: 3px 10px; }
  td[data-th]::before { content: attr(data-th) ':'; color: #94a3b8; font-size: 0.78rem; margin-right: 6px; }
  .num-col { text-align: left; }
  /* 品項明細表在手機維持表格+橫向捲動 */
  .items-scroll table { display: table; }
  .items-scroll thead { display: table-header-group; }
  .items-scroll tbody { display: table-row-group; }
  .items-scroll tr { display: table-row; border: none; margin: 0; }
  .items-scroll td, .items-scroll th { display: table-cell; width: auto; }
  .items-scroll td[data-th]::before { content: none; }
  .items-scroll .num-col { text-align: right; }
  /* 帳號管理是九欄的寬表,手機不要跟著橫向捲(要捲很久),改回一列一張卡的堆疊式 */
  .user-table-scroll { overflow-x: visible; }
  .user-table-scroll table { display: block; min-width: 0; }
  .user-table-scroll thead { display: none; }
  .user-table-scroll tbody { display: block; }
  .user-table-scroll tr { display: block; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 10px; padding: 6px 4px; }
  .user-table-scroll td, .user-table-scroll th { display: block; width: 100%; }
  .user-table-scroll td[data-th]::before { content: attr(data-th) ':'; color: #94a3b8; font-size: 0.78rem; margin-right: 6px; }
  .detail { grid-template-columns: 90px 1fr; }
  .btn-approve, .btn-return { flex: 1; text-align: center; }
}

/* ===== 公告系統 ===== */
.dot-unread { display:inline-block; width:8px; height:8px; border-radius:50%; background:#e5484d; margin-right:6px; vertical-align:middle; }
.announce-body { white-space:pre-wrap; line-height:1.7; margin:12px 0; }
.announce-home { list-style:none; padding:0; margin:0; }
.announce-home li { padding:7px 0; border-bottom:1px solid #eee; }
.announce-home li:last-child { border-bottom:none; }
.dept-checklist { max-height:260px; overflow-y:auto; border:1px solid #ddd; border-radius:6px; padding:8px 12px; margin-top:4px; }
.dept-check { display:block; margin:2px 0; font-weight:normal; }
.announcement-form { display:grid; gap:10px; }
.announcement-form > label { margin:0; }
.announcement-form .dept-checklist { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:0 10px; padding:6px; border-color:var(--line); border-radius:10px; }
.announcement-form .announcement-check { min-width:0; min-height:44px; display:flex; align-items:center; gap:9px; margin:0; padding:8px 10px; font-weight:600; line-height:1.45; }
.announcement-form .announcement-check input[type="checkbox"] { width:18px; min-width:18px; height:18px; min-height:18px; display:block; flex:none; margin:0; padding:0; }
.announcement-form .dept-check span { min-width:0; padding-left:calc(var(--dept-depth, 0) * 14px); font-weight:400; overflow-wrap:anywhere; }
.announcement-form .grid-form { gap:10px 16px; align-items:start; }
@media (max-width:680px) {
  .announcement-editor { padding:15px; }
  .announcement-form { gap:8px; }
  .announcement-form .dept-checklist { grid-template-columns:1fr; padding:4px; }
  .announcement-form .announcement-check { min-height:48px; padding:9px 8px; align-items:flex-start; }
  .announcement-form .announcement-check input[type="checkbox"] { margin-top:2px; }
  .announcement-form .grid-form { grid-template-columns:1fr; gap:7px; }
}
.ack-guard { max-width:760px; margin:0 auto; }

/* ===== 新人到職 ===== */
.progress { background:#eee; border-radius:6px; height:8px; width:90px; display:inline-block; vertical-align:middle; margin-right:6px; }
.progress-bar { background:#2f9e44; border-radius:6px; height:8px; }
.btn-check { background:none; border:none; font-size:18px; cursor:pointer; padding:0; }
.task-done { text-decoration:line-through; color:#888; }
.overdue { color:#e5484d; font-weight:bold; }
.reading-group { margin-bottom:14px; }
.reading-group h3 { margin:10px 0 4px; }
.reading-group .check { display:block; font-weight:normal; margin:2px 0; }

/* ===== TOP LEARN 學習中心（手機優先） ===== */
.learning-page { max-width: 900px; margin: 0 auto; font-size: 16px; }
.learning-page .btn { min-height: 44px; }
.learning-page h1 { font-size: 1.7rem; margin: 4px 0; }
.learning-page h2 { font-size: 1.15rem; }
.learning-page p { margin: 5px 0; }
.learning-eyebrow { color: var(--mint-deep); font-family: 'GlowSansTC Wide', sans-serif; font-size: .78rem; letter-spacing: .08em; }
.learning-page-head, .learning-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.learning-page-head { margin: 16px 0; }
.learning-page-head > div, .learning-card-head > div { min-width: 0; }
.learning-progress-number { color: var(--mint-deep); font: 700 1.45rem 'GlowSansTC Wide', sans-serif; white-space: nowrap; }
.learning-progress-track { height: 10px; overflow: hidden; border-radius: 99px; background: #e2e8f0; margin: 12px 0; }
.learning-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--mint-deep); }
.learning-progress-large { height: 13px; margin-bottom: 20px; }
.learning-hero-card { color: #fff; background: var(--ink); border-top: 5px solid var(--mint); padding: 22px; }
.learning-hero-card h2 { color: #fff; font-size: 1.45rem; margin: 8px 0 2px; }
.learning-hero-card p { color: #cdd4d1; }
.learning-status-text { color: var(--mint-deep); font-weight: 700; font-size: .82rem; }
.learning-hero-card .learning-status-text { color: var(--mint); }
.learning-due { display: inline-block; color: #e8ecea; background: #3a3e41; border-radius: 7px; padding: 7px 10px; margin: 14px 0; }
.learning-due.is-overdue { color: #fecaca; }
.learning-primary-action { display: block; width: 100%; min-height: 48px; padding: 11px 16px; text-align: center; margin-top: 10px; }
.learning-hero-card .learning-primary-action { color: var(--ink); background: var(--mint); border-color: var(--mint); }
.learning-stage-list, .learning-task-list { display: grid; gap: 8px; margin-top: 12px; }
.learning-stage-row, .learning-task-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #e2e8f0; }
.learning-stage-row { grid-template-columns: 32px minmax(0,1fr); }
.learning-stage-row span, .learning-task-row span { display: block; color: #64748b; font-size: .82rem; }
.learning-stage-marker, .learning-task-check { display: grid !important; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ink) !important; background: #e2e8f0; font-weight: 700; }
.status-completed .learning-stage-marker { background: var(--mint); }
.status-in_progress .learning-stage-marker { color: #fff !important; background: var(--mint-deep); }
.learning-full-button { display: block; min-height: 44px; margin-top: 12px; text-align: center; }
.learning-stage-card { border-left: 5px solid #cbd5e1; }
.learning-stage-card.status-in_progress { border-left-color: var(--mint-deep); }
.learning-stage-card.status-completed { border-left-color: var(--mint); }
.learning-stage-card time { color: #64748b; font-size: .85rem; white-space: nowrap; }
.learning-sign-hint { color: #64748b; font-size: .86rem; margin-top: 14px !important; }
.learning-empty { text-align: center; padding: 36px 18px; }
.learning-empty-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; background: var(--mint); font-size: 1.5rem; font-weight: 700; }
.learning-completed { margin: 20px 0; color: #64748b; }
.learning-completed summary { cursor: pointer; min-height: 44px; padding: 10px 0; }
.learning-completed a { display: block; padding: 10px 12px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.learning-plan-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 14px; }
.learning-plan-card { margin: 0; }
.learning-plan-card.is-inactive { opacity: .65; }
.learning-course-admin-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.learning-course-admin-actions .btn { margin:0; text-align:center; }
.learning-dept-pill { padding: 3px 9px; border-radius: 99px; background: var(--mint-tint); color: var(--mint-deep); font-size: .8rem; }
.learning-plan-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.learning-plan-meta div { padding: 8px; border-radius: 7px; background: #f8fafc; }
.learning-plan-meta dt { color: #64748b; font-size: .76rem; }
.learning-plan-meta dd { margin: 0; font-weight: 700; }
.learning-form-page { max-width: 760px; }
.learning-form-page input, .learning-form-page select { min-height: 44px; font-size: 16px; }
.learning-form-actions { position: sticky; bottom: 10px; z-index: 20; display: flex; justify-content: flex-end; padding: 10px; border-radius: 10px; background: rgba(37,40,42,.94); }
.learning-form-actions .btn { min-height: 44px; min-width: 150px; }
.learning-stage-editors { display: grid; gap: 12px; margin-top: 12px; }
.learning-stage-editor { padding: 14px; border: 1px solid #cbd5e1; border-left: 5px solid var(--mint); border-radius: 9px; background: #f8fafc; }
.learning-stage-editor fieldset { margin-top: 12px; border: 1px solid #dbe3e0; border-radius: 8px; background: #fff; }
.learning-stage-editor legend { padding: 0 6px; font-weight: 700; }
.learning-doc-checks { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
.learning-doc-checks .check { display: flex; align-items: center; min-height: 44px; gap: 8px; border-bottom: 1px solid #eef2f1; }
.learning-doc-checks .check span { margin-left: auto; color: #64748b; font-size: .8rem; }
.learning-publish-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--mint); }
.learning-onboarding-card { border-top: 5px solid var(--mint); }
.learning-sync-note { display:flex; align-items:center; gap:12px; margin:10px 0 14px; padding:12px 14px; border-left:4px solid var(--mint); border-radius:8px; background:var(--mint-tint); }
.learning-sync-note span { flex:1; color:#475569; }
.learning-summary-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #e2e8f0; }
.learning-summary-row span:nth-child(2) { color: #64748b; font-size: .85rem; }
.learning-warning { color: #92400e; background: #fef3c7; border-radius: 7px; padding: 10px; }
.learning-course-editor { display:grid; gap:14px; margin:14px 0; }
.learning-chapter-editor { border:1px solid #dbe3e0; border-left:5px solid var(--mint); border-radius:9px; padding:14px; background:#f8fafc; }
.learning-chapter-editor h3, .learning-lesson-card h3 { margin:3px 0; }
.learning-lesson-admin-list { display:grid; gap:7px; margin:10px 0; }
.learning-lesson-admin-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:9px; align-items:center; background:#fff; border:1px solid #e2e8f0; border-radius:8px; padding:8px 10px; }
.learning-lesson-admin-row form { margin:0; }
.learning-lesson-admin-item { border-radius:8px; background:#fff; }
.learning-order-actions { display:flex; align-items:center; gap:5px; }
.learning-order-actions form { margin:0; }
.learning-order-actions .btn { min-width:38px; padding-left:9px; padding-right:9px; }
.learning-lesson-edit { margin:-1px 8px 0; border:1px solid #e2e8f0; border-top:0; border-radius:0 0 8px 8px; background:#fff; }
.learning-lesson-edit summary { min-height:42px; padding:10px 12px; color:var(--mint-deep); cursor:pointer; font-weight:700; }
.learning-lesson-edit-form { display:grid; gap:10px; padding:0 12px 14px; }
.learning-lesson-edit-form label { margin:0; }
.learning-lesson-edit-form input, .learning-lesson-edit-form textarea { font-size:16px; }
.learning-type-pill { display:inline-block; color:var(--mint-deep); background:var(--mint-tint); border-radius:6px; padding:3px 8px; font-size:.76rem; white-space:nowrap; }
.learning-add-lesson { margin-top:10px; }
.learning-add-lesson summary { cursor:pointer; min-height:44px; padding:10px 0; color:var(--mint-deep); font-weight:700; }
.learning-lesson-form { padding:12px; background:#fff; border:1px solid #dbe3e0; border-radius:8px; }
.learning-lesson-form [hidden] { display:none; }
.learning-add-chapter { padding-top:12px; border-top:1px solid #e2e8f0; }
.learning-course-chapter { border-top:5px solid var(--mint); }
.learning-lesson-card { padding:16px 0; border-top:1px solid #e2e8f0; }
.learning-lesson-card:first-of-type { border-top:0; }
.learning-lesson-card.is-completed { opacity:.78; }
.learning-article { white-space:pre-wrap; line-height:1.85; padding:14px; margin:10px 0; border-radius:8px; background:#f8fafc; overflow-wrap:anywhere; }
.learning-course-viewer-page { max-width:1400px; }
.learning-viewer-head { align-items:flex-end; }
.learning-viewer-layout { display:grid; grid-template-columns:minmax(190px,240px) minmax(420px,1fr) minmax(250px,320px); gap:14px; align-items:start; }
.learning-viewer-layout > .card { margin:0; }
.learning-viewer-outline, .learning-interaction-panel { position:sticky; top:14px; max-height:calc(100vh - 28px); overflow:auto; padding:0; }
.learning-viewer-panel-title { display:flex; justify-content:space-between; gap:10px; padding:15px 16px; border-bottom:1px solid #e2e8f0; font-weight:700; }
.learning-viewer-panel-title small { color:#64748b; }
.learning-outline-chapter h2 { padding:14px 16px 6px; margin:0; font-size:.92rem; }
.learning-outline-chapter nav { display:grid; }
.learning-outline-lesson { display:grid; grid-template-columns:24px minmax(0,1fr); gap:8px; align-items:start; min-height:48px; padding:9px 14px; color:var(--ink); border-left:4px solid transparent; }
.learning-outline-lesson:hover { text-decoration:none; background:#f8fafc; }
.learning-outline-lesson.is-current { border-left-color:var(--mint-deep); background:var(--mint-tint); font-weight:700; }
.learning-outline-lesson small { display:block; margin-top:2px; color:#64748b; font-size:.72rem; font-weight:400; }
.learning-outline-dot { display:grid; place-items:center; width:20px; height:20px; margin-top:1px; border:2px solid #cbd5e1; border-radius:50%; color:var(--ink); font-size:.7rem; }
.learning-outline-dot.is-done { border-color:var(--mint); background:var(--mint); }
.learning-viewer-content { min-width:0; padding:22px; }
.learning-viewer-lesson-head { display:flex; justify-content:space-between; gap:14px; padding-bottom:14px; border-bottom:1px solid #e2e8f0; }
.learning-viewer-lesson-head h2 { margin:5px 0 0; font-size:1.35rem; }
.learning-viewer-article { min-height:280px; padding:22px; margin:18px 0; }
.learning-video-frame { position:relative; overflow:hidden; width:100%; aspect-ratio:16/9; margin:18px 0; border-radius:10px; background:#111; }
.learning-video-frame video, .learning-video-frame iframe { display:block; width:100%; height:100%; border:0; }
.learning-video-fallback { display:grid; place-items:center; min-height:280px; margin:18px 0; padding:24px; border-radius:10px; background:#f1f5f9; text-align:center; }
.learning-lesson-description { margin:18px 0; padding:16px 18px; border-left:4px solid var(--mint); border-radius:0 8px 8px 0; background:#f8fafc; }
.learning-lesson-description h3 { margin:0 0 7px; }
.learning-lesson-description p { white-space:pre-wrap; line-height:1.75; }
.learning-material-card { display:grid; grid-template-columns:68px minmax(0,1fr) auto; align-items:center; gap:15px; min-height:180px; margin:18px 0; padding:22px; border:1px solid #dbe3e0; border-radius:10px; background:#f8fafc; }
.learning-material-card h3 { margin:0 0 5px; overflow-wrap:anywhere; }
.learning-material-icon { display:grid; place-items:center; width:64px; height:64px; border-radius:12px; color:var(--mint-deep); background:var(--mint-tint); font-weight:700; }
.learning-viewer-complete { display:flex; justify-content:center; padding:18px 0; border-top:1px solid #e2e8f0; }
.learning-viewer-complete form { margin:0; }
.learning-complete-badge { padding:10px 16px; border-radius:99px; background:var(--mint-tint); color:var(--mint-deep); font-weight:700; }
.learning-viewer-pager { display:flex; justify-content:space-between; gap:10px; padding-top:14px; }
.learning-panel-tabs { display:grid; grid-template-columns:1fr 1fr; border-bottom:1px solid #e2e8f0; }
.learning-panel-tabs button { min-height:50px; padding:10px; border:0; border-bottom:3px solid transparent; background:#fff; color:#64748b; cursor:pointer; font:inherit; font-weight:700; }
.learning-panel-tabs button.is-active { border-bottom-color:var(--mint-deep); color:var(--mint-deep); }
.learning-panel-tabs button span { display:inline-grid; place-items:center; min-width:20px; height:20px; border-radius:99px; background:#e2e8f0; font-size:.72rem; }
.learning-interaction-panel > section { padding:15px; }
.learning-interaction-panel textarea { width:100%; resize:vertical; font:inherit; font-size:16px; }
.learning-time-button { width:100%; margin:7px 0; }
.learning-note-time { color:var(--mint-deep); font-size:.8rem; }
.learning-note-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:8px; }
.learning-comment-compose { padding-bottom:14px; border-bottom:1px solid #e2e8f0; }
.learning-comment-compose .btn { width:100%; margin-top:7px; }
.learning-comment-list { display:grid; gap:12px; margin-top:14px; }
.learning-comment-empty { padding:24px 8px; color:#64748b; text-align:center; }
.learning-comment { padding-bottom:12px; border-bottom:1px solid #e2e8f0; }
.learning-comment header { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.learning-comment header small { color:#64748b; font-size:.7rem; text-align:right; }
.learning-comment p { margin:8px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.learning-comment-reply { margin:10px 0 0 14px; padding:10px; border-left:3px solid var(--mint); border-radius:0 7px 7px 0; background:#f8fafc; }
.learning-reply-form summary { min-height:36px; padding:7px 0; color:var(--mint-deep); cursor:pointer; font-size:.82rem; }
.learning-reply-form textarea { margin-top:5px; }
.learning-reply-form .btn { width:100%; margin-top:5px; }
.learning-lesson-admin-row > div { display:grid; gap:3px; min-width:0; }
.learning-lesson-admin-row > div small { color:#64748b; overflow-wrap:anywhere; }
.learning-discussion-filters { display:grid; grid-template-columns:minmax(180px,260px) minmax(240px,1fr) auto; align-items:end; gap:12px; }
.learning-discussion-admin-list { display:grid; gap:13px; }
.learning-discussion-admin-card { overflow:hidden; padding:0; }
.learning-discussion-admin-card.is-open { border-left:5px solid #f59e0b; }
.learning-discussion-admin-card.is-answered { border-left:5px solid var(--mint); }
.learning-discussion-admin-card > header { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:16px 18px; border-bottom:1px solid #e2e8f0; background:#f8fafc; }
.learning-discussion-admin-card > header h2 { margin:4px 0; }
.learning-discussion-question { display:grid; grid-template-columns:42px minmax(0,1fr); gap:11px; padding:18px; }
.learning-discussion-question p, .learning-discussion-replies p { display:flex; justify-content:space-between; gap:8px; margin:0 0 7px; }
.learning-discussion-question small, .learning-discussion-replies small { color:#64748b; font-size:.75rem; text-align:right; }
.learning-discussion-question > div:last-child > div, .learning-discussion-replies span { white-space:pre-wrap; overflow-wrap:anywhere; }
.learning-discussion-replies { display:grid; gap:8px; margin:0 18px 14px 70px; }
.learning-discussion-replies > div { padding:11px 13px; border-left:3px solid var(--mint); border-radius:0 8px 8px 0; background:#f8fafc; }
.learning-discussion-admin-reply { border-top:1px solid #e2e8f0; padding:0 18px 16px; }
.learning-discussion-admin-reply summary { min-height:44px; padding:12px 0 8px; color:var(--mint-deep); cursor:pointer; font-weight:700; }
.learning-discussion-admin-reply form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:9px; }
.learning-discussion-admin-reply textarea { width:100%; font:inherit; font-size:16px; }
.learning-admin-list, .learning-question-list, .learning-attempt-list { display:grid; gap:9px; margin-top:12px; }
.learning-admin-row { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:58px; padding:11px 12px; border:1px solid #e2e8f0; border-radius:9px; background:#fff; color:inherit; }
.learning-admin-row:hover { text-decoration:none; border-color:var(--mint-deep); }
.learning-admin-row h3 { margin:5px 0 2px; }
.learning-admin-row > div:last-child { display:flex; align-items:flex-end; flex-direction:column; gap:7px; }
.learning-question-form textarea, .learning-exam-page input { font-size:16px; }
.learning-question-form [hidden] { display:none; }
.learning-question-admin { padding:14px; border:1px solid #dbe3e0; border-radius:9px; background:#f8fafc; }
.learning-question-admin.is-inactive { opacity:.55; }
.learning-question-admin ol, .learning-exam-question ul { margin:10px 0 0; padding-left:28px; }
.learning-question-admin li, .learning-exam-question li { padding:4px 7px; }
.learning-question-admin li.is-answer, .learning-exam-question li.is-answer { color:#166534; background:#dcfce7; font-weight:700; border-radius:6px; }
.learning-setting-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.learning-score-badge { padding:10px 14px; border-radius:9px; background:var(--mint-tint); color:var(--mint-deep); font-weight:700; white-space:nowrap; }
.learning-score-badge.is-pass, .is-pass { color:#166534; }
.learning-score-badge.is-fail, .is-fail { color:#b91c1c; }
.learning-exam-intro { border-top:5px solid var(--mint); }
.learning-exam-question { margin:0; border-left:5px solid var(--mint); }
.learning-exam-question legend { width:100%; padding:0 4px; font-weight:700; font-size:1.05rem; }
.learning-exam-question legend span, .learning-exam-question h2 span { display:inline-grid; place-items:center; width:28px; height:28px; margin-right:5px; border-radius:50%; background:var(--mint-tint); color:var(--mint-deep); }
.learning-answer-option { display:flex; align-items:center; gap:10px; min-height:50px; margin:8px 0; padding:10px 12px; border:1px solid #dbe3e0; border-radius:9px; cursor:pointer; }
.learning-answer-option:has(input:checked) { border-color:var(--mint-deep); background:var(--mint-tint); }
.learning-answer-option input { width:22px; height:22px; flex:none; }
.learning-submit-exam { position:sticky; bottom:10px; z-index:20; box-shadow:0 5px 18px rgba(37,40,42,.25); }
.learning-result-card { border-top:5px solid var(--mint); text-align:center; }
.learning-exam-question.is-correct { border-left-color:#16a34a; }
.learning-exam-question.is-wrong { border-left-color:#dc2626; }
.learning-result-label { font-weight:700; }
.learning-exam-question.is-correct .learning-result-label { color:#166534; }
.learning-exam-question.is-wrong .learning-result-label { color:#b91c1c; }
.learning-exam-question li.is-selected { outline:2px solid #64748b; outline-offset:-2px; border-radius:6px; }
.learning-explanation { margin-top:12px !important; padding:10px; border-radius:8px; background:#f8fafc; }
.learning-dashboard-filters { display:grid; grid-template-columns:minmax(160px,.8fr) minmax(220px,1.3fr) auto; gap:12px; align-items:end; }
.learning-data-readiness { display:grid; grid-template-columns:minmax(240px,1fr) minmax(240px,1.2fr) auto; gap:18px; align-items:center; border-left:5px solid #d97706; background:#fffbeb; }
.learning-data-readiness h2 { margin:0 0 6px; font-size:1.05rem; }
.learning-data-readiness p { margin:0; }
.learning-data-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.learning-data-stats article { display:grid; gap:4px; min-height:125px; align-content:start; }
.learning-data-stats span, .learning-data-stats small { color:#64748b; }
.learning-data-stats strong { color:var(--mint-deep); font-size:1.85rem; }
.learning-data-stats .is-alert { border-top:5px solid #d97706; }
.learning-data-stats .is-alert strong { color:#b45309; }
.learning-data-filters { display:grid; grid-template-columns:minmax(190px,.8fr) minmax(240px,1.2fr) auto; gap:12px; align-items:end; }
.learning-data-filters label { margin:0; }
.learning-data-table-wrap { overflow-x:auto; }
.learning-data-table { min-width:760px; }
.learning-data-table td strong, .learning-data-table td small { display:block; }
.learning-data-table td small { margin-top:3px; color:#64748b; }
.learning-data-table td.is-missing { color:#b45309; font-weight:700; }
.learning-data-tags { display:flex; flex-wrap:wrap; gap:5px; }
.learning-data-tags span, .learning-data-status { padding:4px 8px; border-radius:999px; background:#fff7ed; color:#9a4e08; font-size:.82rem; white-space:nowrap; }
.learning-data-status.is-ready { background:var(--mint-tint); color:var(--mint-deep); }
.learning-data-help { margin-top:16px; }
.learning-data-help ol { margin-bottom:0; padding-left:22px; }
.learning-dashboard-filters label { margin:0; }
.learning-dashboard-filters input, .learning-dashboard-filters select { min-height:44px; font-size:16px; }
.learning-dashboard-tabs { display:flex; gap:7px; overflow-x:auto; padding:3px 0 12px; scrollbar-width:thin; }
.learning-dashboard-tabs a { flex:none; min-height:44px; padding:10px 13px; border:1px solid #dbe3e0; border-radius:99px; background:#fff; color:#475569; white-space:nowrap; }
.learning-dashboard-tabs a.active { color:#fff; background:var(--ink); border-color:var(--ink); }
.learning-dashboard-tabs strong { margin-left:4px; }
.learning-dashboard-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.learning-dashboard-stats .card { margin:0; min-height:125px; }
.learning-dashboard-stats span { display:block; color:#64748b; }
.learning-dashboard-stats strong { display:inline-block; margin-top:8px; color:var(--mint-deep); font:700 1.8rem 'GlowSansTC Wide',sans-serif; }
.learning-dashboard-stats small { margin-left:5px; color:#64748b; }
.learning-dashboard-stats .is-alert { border-top:5px solid #dc2626; }
.learning-dashboard-stats .is-alert strong { color:#b91c1c; }
.learning-progress-track i { display:block; height:100%; border-radius:inherit; background:var(--mint-deep); }
.learning-department-summary { display:grid; gap:6px; }
.learning-department-summary a { display:grid; grid-template-columns:minmax(170px,1fr) minmax(180px,2fr) 45px; align-items:center; gap:12px; min-height:52px; padding:7px 9px; color:inherit; border-radius:8px; }
.learning-department-summary a:hover { background:#f8fafc; text-decoration:none; }
.learning-department-summary span { display:block; color:#64748b; font-size:.8rem; }
.learning-department-summary .learning-progress-track { margin:0; }
.learning-dashboard-list-card { padding-bottom:4px; }
.learning-dashboard-list { margin:8px -18px 0; }
.learning-dashboard-row { display:grid; grid-template-columns:minmax(150px,1fr) minmax(190px,1.4fr) 90px 100px 112px; align-items:center; gap:12px; min-height:74px; padding:11px 18px; border-top:1px solid #e2e8f0; color:inherit; }
.learning-dashboard-row:hover { background:#f8fafc; text-decoration:none; }
.learning-dashboard-row.is-overdue { box-shadow:inset 5px 0 #dc2626; background:#fffafa; }
.learning-dashboard-row.is-cancelled { box-shadow:inset 5px 0 #94a3b8; background:#f8fafc; color:#64748b; }
.learning-dashboard-person { display:flex; align-items:center; gap:9px; min-width:0; }
.learning-avatar { display:grid; place-items:center; width:36px; height:36px; flex:none; border-radius:50%; background:var(--mint); color:var(--ink); font-weight:700; }
.learning-dashboard-person div, .learning-dashboard-course { min-width:0; }
.learning-dashboard-person span:not(.learning-avatar), .learning-dashboard-course span { display:block; color:#64748b; font-size:.8rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.learning-dashboard-course strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.learning-dashboard-due { text-align:right; }
.learning-dashboard-due time { display:block; margin-top:4px; color:#64748b; font-size:.8rem; }
.learning-dashboard-row.is-overdue .learning-status-text { color:#b91c1c; }
.learning-dashboard-progress strong { color:var(--mint-deep); }
.learning-dashboard-progress .learning-progress-track { height:7px; margin:5px 0 0; }
.learning-dashboard-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.learning-dashboard-actions a:not(.btn) { font-size:.85rem; white-space:nowrap; }
.learning-history-link { display:block; margin-top:7px; text-align:right; font-size:.85rem; white-space:nowrap; }
.learning-manual-assignment { display:grid; gap:16px; }
.learning-manual-assignment > label { margin:0; }
.learning-manual-assignment fieldset { min-width:0; margin:0; padding:14px; border:1px solid #dbe3e0; border-radius:10px; }
.learning-manual-assignment legend { padding:0 6px; font-weight:700; }
.learning-picker-toolbar { display:flex; gap:8px; margin-bottom:10px; }
.learning-user-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:430px; overflow:auto; }
.learning-user-picker label { display:flex; align-items:center; gap:9px; min-height:58px; margin:0; padding:8px 10px; border:1px solid #dbe3e0; border-radius:9px; cursor:pointer; }
.learning-user-picker label:has(input:checked) { border-color:var(--mint-deep); background:var(--mint-tint); }
.learning-user-picker input { width:20px; height:20px; flex:none; }
.learning-user-picker small { display:block; color:#64748b; font-weight:400; }
.learning-history-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.learning-history-grid > .card { margin:0; }
.learning-history-assignments > a { display:grid; grid-template-columns:minmax(0,1fr) 115px; align-items:center; gap:12px; min-height:65px; padding:9px 0; border-top:1px solid #e2e8f0; color:inherit; }
.learning-history-assignments > a.is-cancelled { color:#64748b; }
.learning-history-assignments span, .learning-history-attempt span { display:block; color:#64748b; font-size:.82rem; }
.learning-history-assignments b { display:block; text-align:right; color:var(--mint-deep); }
.learning-history-assignments .learning-progress-track { height:7px; margin:5px 0 0; }
.learning-history-attempt { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:65px; padding:9px 0; border-top:1px solid #e2e8f0; color:inherit; }
.learning-history-attempt b { flex:none; }
.learning-history-attempt .is-passed { color:#166534; }
.learning-history-attempt .is-failed { color:#b91c1c; }
.learning-timeline { margin:0; padding:0; list-style:none; }
.learning-timeline li { display:flex; gap:11px; padding:10px 0; border-top:1px solid #e2e8f0; }
.learning-timeline li > span { display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:50%; background:var(--mint-tint); color:var(--mint-deep); font-weight:700; }
.learning-timeline small { display:block; color:#64748b; }
.learning-task-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.learning-task-actions form { margin:0; }
.learning-cancelled-banner { border-left:5px solid #64748b; background:#f8fafc; }
.learning-cancelled-banner p { margin:6px 0 !important; }
.learning-cancelled-banner small { display:block; color:#64748b; }
.learning-cancelled-banner .btn { margin-top:10px; }
.learning-assignment-meta dl { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0; }
.learning-assignment-meta dl div { padding:10px; border-radius:8px; background:#f8fafc; }
.learning-assignment-meta dt { color:#64748b; font-size:.82rem; }
.learning-assignment-meta dd { margin:4px 0 0; font-weight:700; }
.learning-assignment-danger { border:1px solid #fecaca; }
.learning-assignment-danger summary { display:flex; align-items:center; min-height:44px; color:#b91c1c; cursor:pointer; font-weight:700; }
.learning-assignment-danger form { display:grid; gap:10px; margin-top:12px; }
.learning-assignment-danger textarea { min-height:88px; font-size:16px; }
.learning-reassign-card form { display:grid; grid-template-columns:minmax(180px,1fr) auto; align-items:end; gap:10px; }
.learning-reassign-card label { margin:0; }
.learning-completion-banner { display:flex; align-items:center; justify-content:space-between; gap:16px; border-top:5px solid var(--mint-deep); background:linear-gradient(135deg,#f4fffb,#fff); }
.learning-completion-banner h2 { margin:3px 0; }
.learning-completion-banner p { margin:0 !important; color:#475569; }
.learning-feedback-score { display:inline-grid; place-items:center; min-width:82px; min-height:54px; margin:5px 0; border-radius:10px; background:var(--mint-tint); color:var(--mint-deep); font-size:1.5rem; }
.learning-feedback-summary small { color:#64748b; }
.learning-feedback-form form { display:grid; gap:14px; }
.learning-feedback-form fieldset { margin:0; padding:12px; border:1px solid #dbe3e0; border-radius:10px; }
.learning-feedback-form legend { padding:0 6px; font-weight:700; }
.learning-rating-picker { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.learning-rating-picker label { display:grid; place-items:center; min-height:50px; margin:0; border:1px solid #dbe3e0; border-radius:9px; cursor:pointer; }
.learning-rating-picker label:has(input:checked) { border-color:var(--mint-deep); background:var(--mint-tint); }
.learning-rating-picker input { position:absolute; width:1px; height:1px; opacity:0; }
.learning-rating-picker span { color:var(--ink); font-size:1.15rem; font-weight:700; }
.learning-feedback-form textarea { min-height:105px; font-size:16px; }
.learning-notification-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.learning-notification-stats article { display:grid; gap:4px; }
.learning-notification-stats strong { color:var(--mint-deep); font-size:1.8rem; }
.learning-notification-stats .is-alert { border-color:#fecaca; background:#fff7f7; }
.learning-notification-stats .is-alert strong { color:#b42318; }
.learning-notification-stats .is-waiting { border-color:#fde68a; background:#fffdf2; }
.learning-notification-list { display:grid; }
.learning-notification-list article { display:grid; grid-template-columns:minmax(0,1fr) minmax(155px,auto); gap:16px; padding:14px 0; border-top:1px solid #e7ecea; }
.learning-notification-list article > div { display:grid; gap:3px; }
.learning-notification-list span, .learning-notification-list small, .learning-notification-list time { color:#64748b; }
.learning-notification-delivery { justify-items:end; text-align:right; }
.learning-notification-delivery b { padding:3px 9px; border-radius:999px; background:#eef2f1; color:#475569; }
.learning-notification-delivery .is-delivered { background:var(--mint-tint); color:var(--mint-deep); }
.learning-notification-delivery .is-failed { background:#fee2e2; color:#b42318; }
.learning-channel-card { margin-bottom:16px; }
.learning-channel-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.learning-channel-grid article { display:grid; gap:4px; padding:13px; border:1px solid #e2e8e5; border-radius:9px; }
.learning-channel-grid article b { color:#64748b; }
.learning-channel-grid article span { color:#64748b; font-size:.9rem; }
.learning-channel-grid .is-ready { border-color:#a7e3d5; background:#f0fdf8; }
.learning-channel-grid .is-ready b { color:var(--mint-deep); }
.learning-channel-grid .is-standby { border-color:#f8d69d; background:#fffbeb; }
.learning-channel-grid .is-blocked { background:#f8fafc; }
.learning-channel-warning { padding:10px 12px; border-radius:8px; background:#fff7ed; color:#9a4e08; }
.learning-channel-settings { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-top:12px; }
.learning-channel-settings label { margin:0; }
.learning-release-banner { display:flex; align-items:center; justify-content:space-between; gap:18px; border-top:5px solid var(--mint-deep); }
.learning-release-banner.is-blocked { border-color:#dc2626; background:#fff7f7; }
.learning-release-banner h2 { margin:4px 0; }
.learning-release-banner p { margin:0; color:#64748b; }
.learning-release-banner > strong { display:grid; place-items:center; width:54px; height:54px; border-radius:50%; background:var(--mint); font-size:1.8rem; }
.learning-release-banner.is-blocked > strong { background:#fecaca; color:#b91c1c; }
.learning-release-checks { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.learning-release-checks article { display:grid; gap:4px; min-height:120px; align-content:start; }
.learning-release-checks span, .learning-release-checks small { color:#64748b; }
.learning-release-checks strong { color:var(--mint-deep); font-size:1.55rem; }
.learning-release-checks .is-warning { border-top:5px solid #d97706; }
.learning-release-checks .is-blocked { border-top:5px solid #dc2626; }
.learning-release-messages, .learning-release-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.learning-release-messages article { margin:0; }
.learning-release-messages .is-warning { border-left:5px solid #d97706; background:#fffbeb; }
.learning-release-messages .is-blocked { border-left:5px solid #dc2626; background:#fff7f7; }
.learning-release-messages ul { margin-bottom:0; padding-left:20px; }
.learning-release-list { display:grid; gap:0; margin:0; }
.learning-release-list div { display:flex; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid #e2e8e5; }
.learning-release-list div:last-child { border-bottom:0; }
.learning-release-list dd { margin:0; font-weight:700; text-align:right; }
.learning-release-steps code { padding:2px 5px; border-radius:4px; background:#eef2f1; }
.learning-release-steps ol { margin-bottom:0; padding-left:22px; }
.learning-analytics-filters { display:grid; grid-template-columns:repeat(4,minmax(145px,1fr)) auto; align-items:end; gap:12px; margin-bottom:16px; }
.learning-analytics-filters label { margin:0; }
.learning-analytics-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.learning-analytics-kpis article { display:grid; gap:4px; min-height:132px; align-content:start; }
.learning-analytics-kpis strong { color:var(--mint-deep); font-size:1.85rem; line-height:1.2; }
.learning-analytics-kpis small { color:#64748b; }
.learning-analytics-section { margin-top:16px; }
.learning-analytics-trends, .learning-analytics-departments { display:grid; gap:12px; }
.learning-analytics-trends article { display:grid; grid-template-columns:minmax(145px,0.7fr) minmax(180px,2fr) 55px; align-items:center; gap:14px; }
.learning-analytics-trends article > div:first-child { display:grid; }
.learning-analytics-trends span, .learning-analytics-departments span, .learning-analytics-departments small { color:#64748b; }
.learning-analytics-bar { height:11px; overflow:hidden; border-radius:999px; background:#e6eeeb; }
.learning-analytics-bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--mint-deep),var(--mint)); }
.learning-analytics-table-wrap { overflow-x:auto; }
.learning-analytics-table { min-width:900px; }
.learning-analytics-table td:first-child { display:table-cell; }
.learning-analytics-table td:first-child strong, .learning-analytics-table td:first-child small { display:block; }
.learning-analytics-table td:first-child small { margin-top:3px; color:#64748b; }
.learning-analytics-departments { grid-template-columns:repeat(2,minmax(0,1fr)); }
.learning-analytics-departments article { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; padding:14px; border:1px solid #e2e8e5; border-radius:10px; }
.learning-analytics-departments article > div:first-child { display:grid; }
.learning-analytics-departments .learning-analytics-bar, .learning-analytics-departments small { grid-column:1/-1; }
.learning-skill-readiness { display:grid; justify-items:end; }
.learning-skill-readiness strong { color:var(--mint-deep); font-size:2rem; line-height:1; }
.learning-skill-readiness span { margin-top:5px; color:#64748b; }
.learning-skill-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.learning-skill-stats article { display:grid; gap:3px; }
.learning-skill-stats strong { color:var(--mint-deep); font-size:1.75rem; }
.learning-skill-stats .is-alert { border-color:#fecaca; background:#fff7f7; }
.learning-skill-stats .is-alert strong { color:#b42318; }
.learning-skill-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.learning-skill-card { border-top:4px solid #efc3bd; }
.learning-skill-card.is-met { border-top-color:var(--mint-deep); }
.learning-skill-card h2 { margin:4px 0; }
.learning-skill-level { min-width:64px; color:var(--mint-deep); font-size:1.45rem; text-align:right; }
.learning-skill-scale { height:12px; margin:12px 0 8px; overflow:hidden; border-radius:999px; background:#e7ecea; }
.learning-skill-scale i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--mint-deep),var(--mint)); }
.learning-skill-card.is-gap .learning-skill-scale i { background:linear-gradient(90deg,#d97706,#fbbf24); }
.learning-skill-levels { display:flex; justify-content:space-between; gap:12px; }
.learning-skill-sources { display:grid; gap:4px; margin-top:12px; padding:10px; border-radius:8px; background:#f7faf9; color:#64748b; font-size:.9rem; }
.learning-skill-assess { margin-top:12px; border-top:1px solid #e2e8e5; padding-top:10px; }
.learning-skill-assess summary { cursor:pointer; color:var(--mint-deep); font-weight:700; }
.learning-skill-assess form { display:grid; grid-template-columns:minmax(130px,.6fr) minmax(220px,1.4fr) auto; align-items:end; gap:10px; margin-top:10px; }
.learning-skill-assess label { margin:0; }
.learning-path-section { margin-top:16px; border-top:5px solid var(--mint-deep); }
.learning-path-list { display:grid; gap:10px; }
.learning-path-list article { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px; padding:14px; border:1px solid #dfe8e5; border-radius:10px; }
.learning-path-list article > div { display:grid; gap:3px; }
.learning-path-list ul { margin:8px 0 0; padding-left:20px; color:#475569; }
.learning-path-pending { color:#92400e; font-weight:700; }
.learning-competency-department { max-width:420px; margin-bottom:16px; }
.learning-competency-department label { margin:0; }
.learning-competency-forms { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.learning-competency-forms form { display:grid; align-content:start; gap:10px; }
.learning-competency-forms h2 { margin-bottom:4px; }
.learning-competency-forms label { margin:0; }
.learning-competency-summary { margin-top:16px; }
.learning-competency-catalog { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.learning-competency-catalog article { display:grid; gap:4px; padding:12px; border:1px solid #e2e8e5; border-radius:9px; }
.learning-competency-catalog span, .learning-competency-catalog small { color:#64748b; }
.learning-competency-tags { display:flex; flex-wrap:wrap; gap:8px; }
.learning-competency-tags span { padding:7px 10px; border-radius:999px; background:#f1f7f5; color:#475569; }
.learning-matrix-wrap { overflow-x:auto; }
.learning-matrix-table { min-width:760px; }
.learning-matrix-table td:first-child, .learning-matrix-table td:nth-child(2) { min-width:145px; }
.learning-matrix-table td strong, .learning-matrix-table td small { display:block; }
.learning-matrix-table td small { margin-top:3px; color:#64748b; }
.learning-matrix-table td.is-met { background:#f0fdf8; color:#087f5b; }
.learning-matrix-table td.is-gap { background:#fff7ed; color:#b45309; }
.learning-matrix-table td.is-na { color:#94a3b8; }
.learning-recommendation-toolbar { display:grid; grid-template-columns:minmax(180px,260px) 1fr auto; align-items:end; gap:14px; margin-bottom:14px; }
.learning-recommendation-toolbar label { margin:0; }
.learning-recommendation-toolbar .btn-row { margin:0; }
.learning-recommendation-toolbar > strong { padding-bottom:9px; color:var(--mint-deep); white-space:nowrap; }
.learning-recommendation-plans { display:grid; gap:14px; padding-bottom:80px; }
.learning-recommendation-plan { padding:0; overflow:hidden; }
.learning-recommendation-plan > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 18px; border-bottom:1px solid #e2e8e5; background:#f7faf9; }
.learning-recommendation-plan h2 { margin:3px 0 0; }
.learning-recommendation-candidates { display:grid; }
.learning-recommendation-candidate { display:grid; grid-template-columns:24px 38px minmax(150px,.8fr) minmax(130px,.65fr) minmax(220px,1.5fr) auto; align-items:center; gap:10px; margin:0; padding:13px 18px; border-bottom:1px solid #eef2f0; }
.learning-recommendation-candidate input[type="checkbox"] { cursor:pointer; }
.learning-recommendation-candidate:last-child { border-bottom:0; }
.learning-recommendation-candidate:hover { background:#fbfdfc; }
.learning-recommendation-candidate.is-assigned { background:#f8fafc; color:#64748b; cursor:default; }
.learning-recommendation-person, .learning-recommendation-impact { display:grid; gap:2px; }
.learning-recommendation-person small, .learning-recommendation-impact small { color:#64748b; }
.learning-recommendation-impact strong { color:var(--mint-deep); }
.learning-recommendation-skills { display:flex; flex-wrap:wrap; gap:5px; }
.learning-recommendation-skills i { padding:4px 7px; border-radius:999px; background:#fff7ed; color:#9a4e08; font-size:.82rem; font-style:normal; }
.learning-recommendation-submit { position:sticky; bottom:10px; z-index:30; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:12px 16px; border:1px solid var(--mint-deep); border-radius:11px; background:#fff; box-shadow:0 8px 28px rgba(15,56,48,.18); }
.learning-recommendation-submit span { color:#64748b; }

@media (max-width:1100px) {
  .learning-viewer-layout { grid-template-columns:minmax(180px,220px) minmax(0,1fr); }
  .learning-interaction-panel { position:static; grid-column:2; max-height:none; }
}

@media (max-width: 680px) {
  .learning-page { font-size: 16px; }
  .learning-page .btn { font-size: 1rem; }
  .learning-page h1 { font-size: 1.5rem; }
  .learning-page .card { padding: 15px; }
  .learning-page-head { align-items: stretch; flex-direction: column; }
  .learning-viewer-head { display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .learning-viewer-head .learning-progress-number { grid-column:2; grid-row:1; }
  .learning-viewer-layout { display:flex; flex-direction:column; }
  .learning-viewer-layout > .card { width:100%; }
  .learning-viewer-outline, .learning-interaction-panel { position:static; max-height:none; padding:0 !important; }
  .learning-viewer-outline { overflow:visible; }
  .learning-outline-chapter nav { grid-auto-flow:column; grid-auto-columns:minmax(190px,78vw); overflow-x:auto; scroll-snap-type:x proximity; }
  .learning-outline-lesson { scroll-snap-align:start; border-left:0; border-bottom:4px solid transparent; }
  .learning-outline-lesson.is-current { border-left:0; border-bottom-color:var(--mint-deep); }
  .learning-viewer-content { padding:15px !important; }
  .learning-viewer-article { min-height:0; padding:16px; }
  .learning-material-card { grid-template-columns:54px minmax(0,1fr); min-height:0; padding:16px; }
  .learning-material-icon { width:50px; height:50px; }
  .learning-material-card .btn { grid-column:1/-1; text-align:center; }
  .learning-viewer-pager .btn { flex:1; text-align:center; }
  .learning-note-actions { align-items:stretch; flex-direction:column; }
  .learning-note-actions .btn { width:100%; }
  .learning-discussion-filters { grid-template-columns:1fr; }
  .learning-discussion-filters .btn { width:100%; }
  .learning-discussion-admin-card > header { align-items:stretch; flex-direction:column; }
  .learning-discussion-admin-card > header .btn { width:100%; text-align:center; }
  .learning-discussion-question { grid-template-columns:36px minmax(0,1fr); padding:15px; }
  .learning-discussion-replies { margin:0 15px 12px 51px; }
  .learning-discussion-question p, .learning-discussion-replies p { align-items:flex-start; flex-direction:column; }
  .learning-discussion-question small, .learning-discussion-replies small { text-align:left; }
  .learning-discussion-admin-reply form { grid-template-columns:1fr; }
  .learning-discussion-admin-reply .btn { width:100%; }
  .learning-page-head > .btn { min-height: 44px; text-align: center; }
  .learning-plan-grid { grid-template-columns: 1fr; }
  .learning-course-admin-actions { grid-template-columns:1fr; }
  .learning-task-row { grid-template-columns: 30px minmax(0,1fr); }
  .learning-task-row .btn { grid-column: 2; min-height: 44px; text-align: center; }
  .learning-task-actions { grid-column:2; align-items:stretch; justify-content:stretch; flex-direction:column; }
  .learning-task-actions .btn { display:block; width:100%; font-size:1rem; }
  .learning-assignment-meta dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .learning-reassign-card form { grid-template-columns:1fr; }
  .learning-reassign-card .btn, .learning-assignment-danger .btn { min-height:44px; width:100%; }
  .learning-completion-banner { align-items:stretch; flex-direction:column; }
  .learning-completion-banner .btn { min-height:44px; text-align:center; }
  .learning-rating-picker label { min-height:52px; }
  .learning-notification-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .learning-notification-list article { grid-template-columns:1fr; }
  .learning-notification-delivery { justify-items:start; text-align:left; }
  .learning-notification-page .learning-page-head form, .learning-notification-page .learning-page-head button { width:100%; min-height:44px; }
  .learning-analytics-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .learning-analytics-filters button { grid-column:1/-1; min-height:44px; }
  .learning-analytics-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .learning-analytics-trends article { grid-template-columns:1fr auto; }
  .learning-analytics-trends article > div:first-child { grid-column:1/-1; }
  .learning-analytics-trends .learning-analytics-bar { min-width:0; }
  .learning-analytics-departments { grid-template-columns:1fr; }
  .learning-analytics-page .learning-page-head > .btn { width:100%; min-height:44px; text-align:center; }
  .learning-skill-readiness { justify-items:start; }
  .learning-skill-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .learning-skill-list { grid-template-columns:1fr; }
  .learning-skill-levels { align-items:flex-start; flex-direction:column; }
  .learning-skill-assess form { grid-template-columns:1fr; }
  .learning-skill-assess button { min-height:44px; }
  .learning-path-list article { grid-template-columns:1fr; }
  .learning-path-list .btn { min-height:44px; text-align:center; }
  .learning-competency-forms, .learning-competency-catalog { grid-template-columns:1fr; }
  .learning-competency-forms button { min-height:44px; }
  .learning-competency-admin-page .learning-page-head > .btn, .learning-matrix-page .learning-page-head > .btn { width:100%; min-height:44px; text-align:center; }
  .learning-matrix-page .learning-page-head > .btn-row, .learning-matrix-page .learning-page-head > .btn-row .btn { width:100%; }
  .learning-recommendation-toolbar { grid-template-columns:1fr; align-items:stretch; }
  .learning-recommendation-toolbar .btn-row, .learning-recommendation-toolbar .btn { width:100%; }
  .learning-recommendation-toolbar > strong { padding:0; }
  .learning-recommendation-plan > header { align-items:stretch; flex-direction:column; }
  .learning-recommendation-plan > header .btn { min-height:44px; }
  .learning-recommendation-candidate { grid-template-columns:24px 38px minmax(0,1fr); align-items:start; padding:14px; }
  .learning-recommendation-impact, .learning-recommendation-skills, .learning-recommendation-candidate > a { grid-column:2/-1; }
  .learning-recommendation-submit { align-items:stretch; flex-direction:column; }
  .learning-recommendation-submit .btn { min-height:48px; width:100%; }
  .learning-card-head time { white-space: normal; text-align: right; }
  .learning-publish-card, .learning-summary-row { display: grid; grid-template-columns: 1fr; }
  .learning-publish-card .btn, .learning-summary-row .btn { min-height: 44px; text-align: center; }
  .learning-form-actions { left: 10px; right: 10px; }
  .learning-form-actions .btn { width: 100%; }
  .learning-lesson-admin-row { grid-template-columns:auto minmax(0,1fr); }
  .learning-lesson-admin-row > .learning-order-actions { grid-column:1/-1; justify-content:flex-end; }
  .learning-order-actions .btn { min-height:44px; min-width:44px; }
  .learning-lesson-edit { margin:-1px 0 0; }
  .learning-add-chapter { display:grid; grid-template-columns:1fr; }
  .learning-add-chapter input, .learning-add-chapter .btn { width:100%; min-height:44px; }
  .learning-admin-row { align-items:stretch; flex-direction:column; }
  .learning-admin-row > div:last-child { align-items:stretch; }
  .learning-admin-row .btn { width:100%; text-align:center; }
  .learning-setting-grid { grid-template-columns:1fr; }
  .learning-answer-option { min-height:52px; }
  .learning-dashboard-filters { grid-template-columns:1fr; }
  .learning-data-readiness { grid-template-columns:1fr; }
  .learning-data-readiness .btn { width:100%; min-height:44px; text-align:center; }
  .learning-data-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .learning-data-filters { grid-template-columns:1fr; }
  .learning-data-filters .btn { width:100%; min-height:44px; }
  .learning-channel-grid, .learning-release-checks, .learning-release-messages, .learning-release-columns { grid-template-columns:1fr; }
  .learning-channel-settings { align-items:stretch; flex-direction:column; }
  .learning-channel-settings .btn { width:100%; min-height:44px; }
  .learning-dashboard-filters .btn { width:100%; }
  .learning-dashboard-stats { grid-template-columns:repeat(2,1fr); }
  .learning-dashboard-stats .card { min-height:112px; }
  .learning-department-summary a { grid-template-columns:minmax(0,1fr) 42px; }
  .learning-department-summary .learning-progress-track { grid-column:1/-1; grid-row:2; }
  .learning-dashboard-list-card { padding-left:14px !important; padding-right:14px !important; }
  .learning-dashboard-list { display:grid; gap:9px; margin:8px 0 14px; }
  .learning-dashboard-row { grid-template-columns:minmax(0,1fr) auto; gap:9px; padding:13px; border:1px solid #e2e8f0; border-radius:9px; }
  .learning-dashboard-person, .learning-dashboard-course { grid-column:1; }
  .learning-dashboard-due { grid-column:2; grid-row:1 / span 2; }
  .learning-dashboard-progress { grid-column:1/-1; display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center; gap:8px; }
  .learning-dashboard-progress .learning-progress-track { margin:0; }
  .learning-dashboard-actions { grid-column:1/-1; justify-content:stretch; }
  .learning-dashboard-actions .btn { flex:1; min-height:44px; text-align:center; }
  .learning-dashboard-actions a:not(.btn) { display:grid; place-items:center; min-width:72px; min-height:44px; font-size:1rem; }
  .learning-history-link { min-height:44px; padding-top:10px; text-align:left; }
  .learning-user-picker, .learning-history-grid { grid-template-columns:1fr; }
  .learning-user-picker { max-height:none; }
  .learning-picker-toolbar .btn { flex:1; min-height:44px; }
  .learning-history-assignments > a { grid-template-columns:minmax(0,1fr) 90px; }
}

/* ===== 用印位置標註 ===== */
.mark-el { position:absolute; border:2px dashed #c41d1d; color:#c41d1d; background:rgba(196,29,29,.06);
  display:flex; align-items:center; justify-content:center; font-size:14px; cursor:move;
  user-select:none; touch-action:none; border-radius:4px; }
.mark-el.sel { outline:2px solid #1971c2; }

/* 組織圖成員職稱 */
.org-members .org-title { color: #94a3b8; font-size: 0.9em; margin-left: 2px; }
.org-members .org-me .org-title { color: var(--mint-deep); }
/* 組織圖單位名稱連結(進職位頁):繼承框內文字色,hover 才變化 */
.org-name a { color: inherit; text-decoration: none; }
.org-name a:hover { text-decoration: underline; }

/* 職位頁的 inline 編輯列 */
.edit-row td { background: #f8fafc; padding: 6px 10px; border-bottom: 2px solid #e2e8f0; }
.edit-row .inline-form { gap: 6px; }

/* ===== 協作模組 Phase 1:卡片看板 ===== */
.page-head, .board-page-head, .card-page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.page-head h1, .board-page-head h1, .card-page-head h1 { margin-bottom:2px; }
.page-head p, .board-page-head p { margin:2px 0; }
.page-titlebar { align-items:center; margin:14px 0; }
.page-titlebar h1 { margin:0; }
.toolbar-actions-only { justify-content:flex-end; min-height:34px; }
.toolbar-actions-only > .icon-action,
.toolbar-actions-only > details { margin-left:auto; }
.page-symbol-actions { flex:none; display:flex; align-items:center; gap:3px; margin-left:auto; }
.board-head-copy { width:100%; }
.board-title-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.board-title-row h1 { min-width:0; margin:0; }
.board-symbol-actions { flex:none; display:flex; align-items:center; gap:3px; }
.board-page-menu, .meeting-page-menu, .page-more-menu { position:relative; }
.board-page-menu > summary, .meeting-page-menu > summary, .page-more-menu > summary { list-style:none; cursor:pointer; letter-spacing:2px; }
.board-page-menu > summary::-webkit-details-marker, .meeting-page-menu > summary::-webkit-details-marker, .page-more-menu > summary::-webkit-details-marker { display:none; }
.board-page-menu > summary:focus, .meeting-page-menu > summary:focus, .page-more-menu > summary:focus { outline:none; }
.board-page-menu > summary:focus-visible, .meeting-page-menu > summary:focus-visible, .page-more-menu > summary:focus-visible { box-shadow:0 0 0 3px rgba(54,137,117,.2); }
.board-page-menu[open] > summary, .meeting-page-menu[open] > summary, .page-more-menu[open] > summary { color:var(--mint-deep); background:var(--mint-tint); }
.board-page-menu-pop, .meeting-page-menu-pop, .page-more-menu-pop { position:absolute; z-index:30; top:calc(100% + 7px); right:0; width:210px; padding:7px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 14px 32px rgba(37,40,42,.18); }
.board-page-menu-pop a, .board-page-menu-pop button, .meeting-page-menu-pop a, .page-more-menu-pop a, .page-more-menu-pop button { width:100%; min-height:40px; display:flex; align-items:center; padding:9px 10px; color:var(--ink); background:transparent; border:0; border-radius:8px; font:inherit; text-align:left; cursor:pointer; }
.board-page-menu-pop a:hover, .board-page-menu-pop button:hover, .meeting-page-menu-pop a:hover, .page-more-menu-pop a:hover, .page-more-menu-pop button:hover { background:var(--mint-tint); text-decoration:none; }
.board-page-menu-pop .danger { color:#b42318; }
.board-page-menu-pop form, .page-more-menu-pop form { margin:0; }
.document-page-head { margin-bottom:8px; }
.document-create-pop { width:290px; max-height:min(460px,70vh); overflow-y:auto; }
.document-create-pop a { gap:10px; }
.document-type-prefix { min-width:38px; padding:3px 6px; border-radius:7px; color:var(--mint); background:var(--ink); font-size:.68rem; font-weight:700; text-align:center; }
.document-list-toolbar { position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0 12px; }
.document-quick-filters { display:inline-flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:11px; background:rgba(255,255,255,.82); }
.document-quick-filters a { min-height:34px; display:inline-flex; align-items:center; justify-content:center; padding:6px 12px; border-radius:8px; color:#596762; font-size:.84rem; font-weight:600; }
.document-quick-filters a:hover, .document-quick-filters a.active { color:var(--ink); background:var(--mint); }
.document-filter { position:relative; flex:none; }
.document-filter > summary { min-height:38px; display:flex; align-items:center; gap:5px; padding:6px 9px 6px 11px; list-style:none; border-radius:9px; color:#4f5e58; cursor:pointer; font-size:.84rem; font-weight:600; }
.document-filter > summary::-webkit-details-marker { display:none; }
.document-filter > summary:hover, .document-filter[open] > summary { color:var(--ink); background:#edf2f0; }
.document-filter > summary .ui-icon { width:15px; height:15px; transition:transform .16s ease; }
.document-filter[open] > summary .ui-icon { transform:rotate(90deg); }
.document-filter-count { min-width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; color:var(--ink); background:var(--mint); font-size:.7rem; }
.document-filter-form { position:absolute; z-index:35; top:calc(100% + 7px); right:0; width:min(720px,calc(100vw - 290px)); display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)) auto; gap:10px; align-items:end; margin:0; padding:13px; border:1px solid var(--line); border-radius:13px; background:#fff; box-shadow:0 16px 40px rgba(37,40,42,.16); }
.document-filter-form label { margin:0; color:#60706a; font-size:.76rem; }
.document-filter-form select { margin-top:4px; }
.document-filter-form .btn { min-height:44px; }
.document-list-card { margin-top:0; }
.document-main-cell a { display:block; color:var(--text); font-weight:700; }
.document-main-cell small { display:block; margin-top:2px; color:#7a8782; font-size:.74rem; }
.document-empty { min-height:90px; display:flex; align-items:center; justify-content:center; margin:0; }
.form-label { display:block; margin:10px 0 4px; font-weight:500; }
.member-checklist { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:3px 12px; max-height:280px; overflow-y:auto; border:1px solid #cbd5e1; border-radius:7px; padding:9px 12px; background:#fff; }
.member-checklist.compact { max-height:190px; }
.member-check { margin:0; font-weight:400; }
.member-check input { margin-top:0; }
.board-index-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:14px; }
.board-index-card { display:flex; flex-direction:column; gap:12px; margin:0; color:var(--ink); border-top:5px solid var(--mint); }
.board-index-card:hover { box-shadow:0 0 0 2px var(--mint); }
.board-index-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.board-index-head h2 { margin:2px 0 0; }
.board-index-head h2 a { color:var(--ink); }
.board-index-kicker { color:#64748b; font-size:.72rem; font-weight:700; letter-spacing:.08em; }
.board-card-count { flex:none; color:#475569; background:#f1f5f4; border-radius:99px; padding:5px 9px; font-size:.78rem; white-space:nowrap; }
.board-card-count strong { color:var(--mint-deep); font-size:1rem; }
.board-name-difference { display:grid; gap:2px; background:#fff7ed; border:1px solid #fdba74; border-left:4px solid #f97316; border-radius:8px; padding:8px 10px; }
.board-name-difference span { color:#9a3412; font-size:.72rem; font-weight:700; }
.board-index-footer { margin-top:auto; display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap; }
.board-index-footer > .btn { flex:none; }
.board-quick-add { margin-top:20px; }
.archive-list { list-style:none; padding:0; }
.archive-list li { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid #e2e8f0; }
.archive-list form { margin:0; }
.board-description { white-space:pre-wrap; }
.board-head-actions { margin-top:18px; }
.board-head-actions form { margin:0; }
.board-quick-add { margin:10px 0; padding:10px 12px; }
.board-quick-add .inline-form { flex-wrap:nowrap; }
.board-quick-add input { flex:1; min-width:220px; }
.board-filter-bar { display:flex; align-items:end; gap:12px; margin:10px 0; padding:10px 12px; }
.board-filter-bar > div { margin-right:auto; align-self:center; }
.board-filter-bar > div span { display:block; margin-top:2px; }
.board-filter-bar label { margin:0; color:#475569; font-size:.82rem; font-weight:600; }
.board-filter-bar select { min-width:150px; margin-top:3px; padding:7px 9px; }
.board-canvas { display:flex; gap:14px; align-items:flex-start; overflow-x:auto; padding:4px 2px 18px; scroll-snap-type:x proximity; }
.board-list { flex:0 0 300px; max-width:300px; background:#e7ebe9; border-radius:10px; padding:10px; scroll-snap-align:start; }
.board-list-head { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:34px; }
.board-list-head[draggable="true"] { cursor:grab; }
.board-list-head h2 { margin:0; overflow-wrap:anywhere; }
.list-menu { position:relative; }
.list-menu summary { cursor:pointer; list-style:none; padding:2px 7px; border-radius:5px; }
.list-menu summary:hover { background:#d5dcda; }
.list-menu-pop { position:absolute; right:0; z-index:5; width:230px; background:#fff; border:1px solid #cbd5e1; border-radius:8px; box-shadow:0 5px 18px rgba(0,0,0,.15); padding:9px; }
.list-menu-pop form { margin:4px 0; }
.list-menu-pop input { width:100%; margin-bottom:5px; }
.board-card-stack { min-height:42px; padding-top:7px; }
.board-card-stack:empty::after { content:'拖拉卡片到這裡'; display:block; color:#94a3b8; text-align:center; font-size:.82rem; padding:12px 4px; border:2px dashed #cbd5e1; border-radius:8px; }
.board-card-stack.filtered-empty::after { content:'此篩選條件沒有工作'; display:block; color:#94a3b8; text-align:center; font-size:.82rem; padding:12px 4px; border:2px dashed #cbd5e1; border-radius:8px; }
.board-task-card { position:relative; background:#fff; border-radius:8px; margin-bottom:8px; box-shadow:0 1px 2px rgba(0,0,0,.1); border-left:4px solid transparent; cursor:grab; }
.board-task-card[hidden] { display:none; }
.board-task-card:hover { box-shadow:0 0 0 2px var(--mint); }
.board-task-card.dragging { opacity:.45; }
.board-list.dragging-list { opacity:.55; }
.board-card-overdue { border-left-color:#dc2626; }
.board-card-completed { opacity:.72; border-left-color:#16a34a; }
.board-card-completed strong { text-decoration:line-through; }
.board-card-link { display:block; color:var(--ink); padding:10px 11px; }
.board-card-link:hover { text-decoration:none; }
.board-card-link strong { display:block; overflow-wrap:anywhere; }
.board-routine-tag { display:inline-block; margin-top:6px; }
.board-label { display:block; width:42px; height:7px; border-radius:5px; margin-bottom:7px; }
.board-card-meta { display:block; color:#64748b; font-size:.8rem; margin-top:6px; }
.board-card-footer { display:flex; justify-content:space-between; gap:6px; color:#64748b; font-size:.76rem; margin-top:7px; }
.mobile-move-form { display:none; border-top:1px solid #e2e8f0; padding:5px 8px 8px; margin:0; }
.mobile-move-form label { font-size:.78rem; color:#64748b; margin:0; }
.mobile-move-form select { padding:5px 7px; margin-top:2px; font-size:.82rem; }
.board-new-list { background:var(--mint-tint); border:1px dashed var(--mint-deep); }
.archive-zone summary { cursor:pointer; font-weight:600; }
.card-detail-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(270px,1fr); gap:16px; align-items:start; }
.card-detail-grid .card { margin-top:0; }
.card-title-label { display:inline-block; width:12px; height:28px; border-radius:4px; vertical-align:-5px; margin-right:6px; }
.board-comments article { border-bottom:1px solid #e2e8f0; padding:8px 0; }
.board-comments time, .board-activity time { color:#94a3b8; font-size:.78rem; }
.board-comments p { white-space:pre-wrap; margin:4px 0; }
.board-file-list, .board-activity { list-style:none; padding:0; }
.board-file-list li { padding:6px 0; border-bottom:1px solid #e2e8f0; overflow-wrap:anywhere; }
.board-file-list span { display:block; }
.board-activity li { border-left:3px solid var(--mint); padding:2px 0 10px 10px; font-size:.85rem; }
.board-activity li span, .board-activity li time { display:block; }
.notification-page-head { min-height:32px; display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0 10px; }
.notification-page-head .hint { margin:0; }
.notification-page-menu { margin-left:auto; }
.notification-page-menu > summary { width:32px; min-height:32px; padding:0; border:0; border-radius:8px; background:transparent; font-size:1.12rem; line-height:1; letter-spacing:0; }
.notification-list { padding:0; overflow:hidden; }
.notification-item { min-height:82px; display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid #e2e8f0; color:var(--ink); }
.notification-item:last-child { border-bottom:0; }
.notification-item:hover { background:var(--mint-tint); text-decoration:none; }
.notification-item.unread { background:#f3fbf9; }
.notification-item.completed { background:#fafcfb; }
.notification-link { min-width:0; flex:1; display:flex; align-items:center; gap:10px; color:inherit; }
.notification-link:hover { text-decoration:none; }
.notification-resolve-form { flex:none; margin:0; }
.notification-marker { position:relative; width:24px; height:24px; flex:none; display:inline-flex; align-items:center; justify-content:center; padding:0; border:1px solid #cbd5d1; border-radius:50%; color:transparent; background:#fff; font:inherit; font-size:.78rem; font-weight:800; }
.notification-marker-button { cursor:pointer; }
.notification-marker-button:hover { border-color:var(--mint-deep); background:var(--mint-tint); }
.notification-marker.active { border-color:var(--mint-deep); color:#fff; background:var(--mint-deep); }
.notification-item.unread:not(.completed) .notification-marker::after { content:''; width:6px; height:6px; border-radius:50%; background:var(--mint-deep); }
.notification-content { min-width:0; flex:1; }
.notification-title { display:block; line-height:1.45; }
.notification-item.completed .notification-title { color:#64716c; }
.notification-meta { display:flex; align-items:center; gap:8px; margin-top:5px; color:#71807a; font-size:.78rem; }
.notification-meta .notification-source { color:var(--mint-deep); font-weight:700; }
.notification-meta time::before { content:'·'; margin-right:8px; color:#a2ada9; }
.notification-status { color:#71807a; font-weight:600; }
.notification-status::before { content:'·'; margin-right:8px; color:#a2ada9; }
.notification-status.done { color:var(--mint-deep); }
.notification-chevron { flex:none; color:#82908b; font-size:1.35rem; line-height:1; }
.notification-empty { min-height:150px; display:flex; align-items:center; justify-content:center; margin:0; }
.regulation-page-head { min-height:32px; display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0 10px; }
.regulation-summary { display:flex; align-items:center; gap:7px; margin:0; color:#62716c; font-size:.84rem; }
.regulation-summary > span { width:18px; height:18px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; font-size:.72rem; font-weight:800; }
.regulation-summary.complete > span { color:#fff; background:var(--mint-deep); }
.regulation-summary.pending { color:#9a5b16; }
.regulation-summary.pending > span { color:#fff; background:#c8781b; }
.regulation-page-menu { margin-left:auto; }
.regulation-page-menu > summary { width:32px; min-height:32px; padding:0; border:0; border-radius:8px; background:transparent; font-size:1.12rem; line-height:1; letter-spacing:0; }
.regulation-list { padding:0; overflow:hidden; }
.regulation-empty { min-height:170px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; color:#8a9691; }
.regulation-empty strong { color:#5e6a66; font-size:.98rem; }
.regulation-empty span { font-size:.82rem; }
.regulation-list-title { padding:13px 16px 10px; color:#61706b; font-size:.82rem; font-weight:700; }
.regulation-list-title span { margin-left:4px; color:#93a09b; font-weight:500; }
.regulation-item { display:flex; align-items:center; gap:16px; padding:15px 16px; border-top:1px solid #e2e8f0; }
.regulation-item.pending { background:#fffbf4; }
.regulation-copy { min-width:0; flex:1; }
.regulation-title { color:var(--ink); font-weight:700; line-height:1.4; }
.regulation-title:hover { color:var(--mint-deep); text-decoration:none; }
.regulation-title > span { color:#73817c; }
.regulation-copy > p { margin:4px 0 0; color:#6c7974; font-size:.83rem; }
.regulation-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px 13px; margin-top:6px; color:#76847f; font-size:.77rem; }
.regulation-meta .done { color:var(--mint-deep); font-weight:700; }
.regulation-meta .pending { color:#a55c0d; font-weight:700; }
.regulation-unsigned { margin-top:7px; font-size:.78rem; }
.regulation-unsigned > summary { width:max-content; color:#65736e; cursor:pointer; }
.regulation-unsigned p { max-width:620px; margin:5px 0 0; color:#7d8985; }
.regulation-actions { flex:none; display:flex; align-items:center; gap:4px; }
.regulation-actions form { margin:0; }
.regulation-item-menu .page-more-menu-pop { width:190px; }
.kb-library-toolbar { display:flex; align-items:center; gap:8px; margin:8px 0 10px; }
.kb-search { min-width:0; flex:1; height:44px; display:flex; align-items:center; gap:8px; margin:0; padding:0 5px 0 13px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.kb-search-submit { width:24px; height:34px; flex:none; display:inline-flex; align-items:center; justify-content:center; padding:0; border:0; color:#75827d; background:transparent; cursor:pointer; }
.kb-search-submit:hover { color:var(--ink); }
.kb-search-submit .ui-icon { width:18px; height:18px; }
.kb-search input { min-width:0; height:42px; flex:1; margin:0; padding:0; border:0; background:transparent; box-shadow:none; }
.kb-search input:focus { outline:0; box-shadow:none; }
.kb-search:focus-within { border-color:#85bbae; box-shadow:0 0 0 3px rgba(181,227,216,.36); }
.kb-search .icon-action { width:34px; height:34px; border-radius:8px; }
.kb-search .icon-action .ui-icon { width:17px; height:17px; }
.kb-library-menu { flex:none; }
.kb-library-menu > summary { font-size:1.12rem; line-height:1; letter-spacing:0; }
.kb-library-menu .page-more-menu-pop a { justify-content:space-between; gap:12px; }
.kb-library-list { padding:0; overflow:hidden; }
.kb-library-list-head { display:flex; align-items:center; gap:6px; padding:13px 16px 10px; color:#61706b; font-size:.82rem; }
.kb-library-list-head span { color:#93a09b; }
.kb-library-item { min-height:72px; display:flex; align-items:center; gap:12px; padding:13px 16px; border-top:1px solid #e2e8f0; color:var(--ink); }
.kb-library-item:hover { background:var(--mint-tint); text-decoration:none; }
.kb-library-copy { min-width:0; flex:1; }
.kb-library-copy > strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:1.4; }
.kb-library-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; margin-top:5px; color:#78857f; font-size:.76rem; }
.kb-locked { color:#9a5b16; font-weight:700; }
.kb-library-chevron { width:18px; height:18px; flex:none; color:var(--mint-deep); }
.kb-library-empty { min-height:150px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; color:#8a9691; }
.kb-library-empty strong { color:#5e6a66; font-size:.98rem; }
.kb-library-empty span { font-size:.82rem; }
.line-bind-code { font-size:2rem; font-weight:700; letter-spacing:.35em; color:var(--mint-deep); }
.settings-profile-head { display:flex; align-items:center; gap:13px; margin-bottom:14px; }
.settings-profile-head h2 { margin:0 0 2px; }
.settings-profile-head p { margin:0; }
.settings-avatar { width:44px; height:44px; flex:none; display:grid; place-items:center; border-radius:50%; color:var(--ink); background:var(--mint); font-size:1.05rem; font-weight:700; }
.settings-detail { grid-template-columns:92px minmax(0,1fr); margin-bottom:8px; }
.settings-note { margin:8px 0 0; }
.settings-form { display:grid; gap:12px; }
.settings-toggle-row { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0; padding:11px 0; border-top:1px solid var(--line); cursor:pointer; }
.settings-toggle-row > span { display:grid; gap:2px; min-width:0; }
.settings-toggle-row strong { color:var(--ink); }
.settings-toggle-row small { color:var(--muted); font-size:.78rem; font-weight:400; }
.settings-toggle-row input[type="checkbox"] { appearance:none; width:43px; min-width:43px; height:25px; min-height:25px; flex:none; margin:0; padding:2px; border:0; border-radius:999px; background:#cbd3d0; cursor:pointer; transition:background .18s ease; }
.settings-toggle-row input::after { content:""; display:block; width:21px; height:21px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #0003; transition:transform .18s ease; }
.settings-toggle-row input:checked { background:var(--mint-deep); }
.settings-toggle-row input:checked::after { transform:translateX(18px); }
.settings-toggle-row input:focus-visible { outline:3px solid color-mix(in srgb,var(--mint-deep) 30%,transparent); outline-offset:2px; }
.settings-form-actions { display:flex; justify-content:flex-end; }
.settings-stack { padding-bottom:5px; }
.settings-stack > h2, .settings-links-card > h2 { margin-bottom:8px; }
.settings-disclosure { border-top:1px solid var(--line); }
.settings-disclosure summary { min-height:58px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:8px 2px; list-style:none; cursor:pointer; }
.settings-disclosure summary::-webkit-details-marker { display:none; }
.settings-disclosure summary > span { display:grid; gap:2px; min-width:0; }
.settings-disclosure summary small { color:var(--muted); font-size:.78rem; font-weight:400; }
.settings-disclosure summary > .ui-icon { width:16px; height:16px; flex:none; color:var(--mint-deep); transition:transform .18s ease; }
.settings-disclosure[open] summary > .ui-icon { transform:rotate(90deg); }
.settings-disclosure-body { padding:2px 2px 16px; }
.settings-disclosure-body > :first-child { margin-top:4px; }
.settings-link-list { display:grid; }
.settings-link-list a { min-height:58px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 2px; color:var(--ink); border-top:1px solid var(--line); text-decoration:none; }
.settings-link-list a > span { display:grid; gap:2px; min-width:0; }
.settings-link-list a small { color:var(--muted); font-size:.78rem; }
.settings-link-list .ui-icon { width:16px; height:16px; flex:none; color:var(--mint-deep); }
.settings-link-list a:hover strong { color:var(--mint-deep); }
.delegation-page-actions { margin-bottom:8px; }
.delegation-invite-card[hidden] { display:none; }
.delegation-invite-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.delegation-invite-head h2 { margin:0 0 3px; }
.delegation-invite-head p { margin:0; }
.delegation-form { display:grid; grid-template-columns:minmax(180px,1fr) minmax(300px,1.35fr) auto; align-items:end; gap:12px; }
.delegation-form > label, .delegation-date-grid label { margin:0; }
.delegation-date-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.delegation-form > .btn { min-height:44px; white-space:nowrap; }
.delegation-note { margin:12px 0 0; }
.delegation-list-card .empty { min-height:76px; display:grid; place-items:center; margin:0; }
.calendar-page-head { align-items:center; }
.calendar-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0; }
.calendar-period-nav { display:flex; align-items:center; gap:5px; min-width:0; }
.calendar-period-nav h2 { min-width:165px; margin:0; text-align:center; font-size:1.08rem; font-variant-numeric:tabular-nums; }
.calendar-period-previous .ui-icon { transform:rotate(180deg); }
.calendar-toolbar-actions { display:flex; align-items:center; gap:8px; }
.calendar-today { min-height:32px; padding:5px 9px; border:0; border-radius:8px; color:#45514d; background:transparent; font:inherit; font-size:.84rem; cursor:pointer; }
.calendar-today:hover { color:var(--ink); background:#edf2f0; }
.calendar-view-buttons { display:inline-flex; padding:2px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.calendar-view-buttons button { min-width:38px; min-height:30px; padding:4px 9px; border:0; border-radius:6px; color:#596762; background:transparent; font:inherit; font-size:.82rem; cursor:pointer; }
.calendar-view-buttons button.active { color:var(--ink); background:var(--mint); font-weight:700; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(110px,1fr)); overflow-x:auto; background:#fff; border:1px solid #dbe3e0; border-radius:10px; }
.calendar-weekday { text-align:center; padding:6px; background:var(--ink); color:#fff; font-size:.82rem; }
.calendar-day { min-height:112px; padding:6px; border-right:1px solid #e2e8f0; border-bottom:1px solid #e2e8f0; }
.calendar-day.outside { opacity:.42; }.calendar-day.today>strong { background:var(--mint); border-radius:50%; padding:2px 7px; }
.calendar-event { display:block; width:100%; border:0; border-radius:5px; padding:3px 5px; margin-top:4px; text-align:left; font:inherit; font-size:.78rem; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.google-event { background:#dbeafe; }.card-event { background:var(--mint); }.calendar-agenda { display:none; }.calendar-form { scroll-margin-top:12px; }
.calendar-form form { margin:0; }
.calendar-event-main { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:4px 16px; align-items:end; }
.calendar-all-day { min-height:44px; display:flex; align-items:center; padding:0 4px; white-space:nowrap; }
.calendar-time-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 16px; }
.calendar-attendees { margin-top:14px; }
.calendar-attendee-picker { margin:10px 0; border:1px solid var(--line-strong); border-radius:10px; background:#fff; }
.calendar-attendee-picker > summary { min-height:46px; display:grid; grid-template-columns:minmax(0,1fr) auto 24px; align-items:center; gap:10px; padding:8px 12px; list-style:none; cursor:pointer; }
.calendar-attendee-picker > summary::-webkit-details-marker { display:none; }
.calendar-attendee-picker > summary span { color:#71807a; font-size:.82rem; font-weight:500; }
.calendar-attendee-picker > summary .ui-icon { width:18px; height:18px; color:#71807a; transition:transform .16s ease; }
.calendar-attendee-picker[open] > summary .ui-icon { transform:rotate(90deg); }
.calendar-attendee-picker .member-checklist { margin:0 10px 10px; border-color:var(--line); }
.calendar-attendee-label { display:block; margin-top:12px; }
@media(max-width:680px){
  .settings-profile-card, .settings-contact-card, .settings-stack, .settings-links-card { padding:15px; }
  .settings-detail { grid-template-columns:82px minmax(0,1fr); }
  .settings-form-actions .btn { width:100%; }
  .settings-disclosure-body .btn-row, .settings-disclosure-body .btn-row > * { width:100%; }
  .settings-disclosure-body .btn { width:100%; text-align:center; }
  .delegation-page-actions { margin-top:8px; }
  .delegation-invite-card { padding:15px; }
  .delegation-form { grid-template-columns:1fr; gap:12px; }
  .delegation-date-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .delegation-form > .btn { width:100%; }
  .delegation-list-card .empty { min-height:64px; }
  .calendar-page-head { flex-wrap:nowrap; }
  .calendar-page-head > div:first-child { min-width:0; }
  .calendar-page-head .hint { display:none; }
  .calendar-toolbar { align-items:center; gap:8px; }
  .calendar-period-nav { flex:1; justify-content:space-between; }
  .calendar-period-nav h2 { min-width:0; font-size:1rem; white-space:nowrap; }
  .calendar-toolbar-actions { gap:3px; }
  .calendar-grid{display:none}
  .calendar-agenda{display:block}
  .agenda-item{background:#fff;border-left:4px solid var(--mint);border-radius:7px;padding:8px 10px;margin:8px 0}
  .agenda-item time{display:block;color:#64748b;font-size:.8rem}
  .agenda-item .calendar-event{white-space:normal}
  .calendar-event-main, .calendar-time-grid { grid-template-columns:1fr; gap:0; }
  .calendar-all-day { min-height:36px; }
  .calendar-attendee-picker > summary { grid-template-columns:minmax(0,1fr) auto 20px; }
}

@media(max-width:680px){
  .org-help-card { padding:6px 14px; }
  .org-help-body { padding-bottom:8px; }
  .org-mobile-overview { display:block; padding:15px; }
  .org-mobile-overview h2 { margin-bottom:10px; }
  .org-command-line { margin:0; padding:0; list-style:none; }
  .org-command-line li { position:relative; min-height:58px; margin-left:9px; padding:7px 0 8px 25px; border-left:2px solid var(--mint); }
  .org-command-line li::before { content:""; position:absolute; top:18px; left:-6px; width:10px; height:10px; border:2px solid var(--mint-deep); border-radius:50%; background:#fff; }
  .org-command-line li:last-child { border-left-color:transparent; }
  .org-command-line li.is-vacant::before { border-style:dashed; border-color:#94a3b8; }
  .org-command-line a, .org-command-line .org-command-final { color:var(--ink); text-decoration:none; }
  .org-command-line strong, .org-command-line small { display:block; }
  .org-command-line small { margin-top:2px; color:var(--muted); font-size:.79rem; line-height:1.4; }
  .org-command-final::before { background:var(--mint); }
  .org-full-disclosure { padding:6px 14px; }
  .org-full-disclosure > summary { display:flex; }
  .org-full-disclosure > summary > span { display:grid; gap:2px; }
  .org-full-disclosure > summary small { color:var(--muted); font-size:.78rem; font-weight:400; }
  .org-full-disclosure[open] > summary { border-bottom:1px solid var(--line); }
  .org-full-disclosure .org-scroll { width:calc(100% + 8px); margin-left:-4px; padding-top:16px; overscroll-behavior-x:contain; }
  .report-filter-card { padding:6px 14px; }
  .report-filter-card > summary { min-height:50px; display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; cursor:pointer; }
  .report-filter-card > summary::-webkit-details-marker { display:none; }
  .report-filter-card > summary > span { display:grid; gap:2px; }
  .report-filter-card > summary small { color:var(--muted); font-size:.78rem; font-weight:400; }
  .report-filter-card > summary .ui-icon { width:16px; height:16px; flex:none; color:var(--mint-deep); transition:transform .18s ease; }
  .report-filter-card[open] > summary { border-bottom:1px solid var(--line); }
  .report-filter-card[open] > summary .ui-icon { transform:rotate(90deg); }
  .report-filter-form { padding:12px 0 8px; }
  .report-filter-fields { grid-template-columns:1fr; gap:12px; }
  .report-date-grid, .report-select-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .report-filter-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .report-filter-actions .plain-action { grid-column:1/-1; justify-self:end; min-height:34px; }
  .report-filter-actions .btn { width:100%; text-align:center; }
}
.notification-body { display:block; margin-top:3px; color:#64748b; font-size:.84rem; line-height:1.45; }

@media (max-width: 680px) {
  .page-head .btn { width:100%; text-align:center; }
  .board-index-grid { grid-template-columns:1fr; }
  .board-index-footer, .board-index-footer > .btn { width:100%; text-align:center; }
  .board-page-head, .card-page-head { display:block; }
  .board-head-actions { margin-top:8px; }
  .board-quick-add .inline-form { display:grid; grid-template-columns:1fr; }
  .board-quick-add input, .board-quick-add select { min-width:0; width:100%; }
  .board-list { flex-basis:86vw; max-width:86vw; }
  .board-task-card { cursor:default; }
  .mobile-move-form { display:block; }
  .card-detail-grid { grid-template-columns:1fr; }
  .member-checklist { grid-template-columns:1fr; }
}

/* ===== 會議紀錄模組 Phase 1 ===== */
.meeting-page-head { margin-bottom:14px; }
.meeting-head-symbols { flex:none; display:flex; align-items:center; gap:3px; margin-left:auto; }
.meeting-list-card { padding:0; overflow:hidden; }
.meeting-list-item { display:grid; grid-template-columns:90px minmax(0,1fr) 120px 18px; align-items:center; gap:14px; padding:15px 18px; color:var(--ink); border-bottom:1px solid #e2e8f0; }
.meeting-list-item:last-child { border-bottom:0; }
.meeting-list-item:hover { background:var(--mint-tint); text-decoration:none; }
.meeting-date { display:flex; flex-direction:column; border-right:1px solid #e2e8f0; }
.meeting-date strong { font-size:1.05rem; }
.meeting-date span, .meeting-list-main span, .meeting-action-progress span { color:#64748b; font-size:.8rem; }
.meeting-list-main, .meeting-action-progress { display:flex; flex-direction:column; min-width:0; }
.meeting-list-main strong { overflow-wrap:anywhere; font-size:1rem; }
.meeting-action-progress { text-align:center; }
.meeting-action-progress strong { font-size:1.05rem; color:var(--mint-deep); }
.meeting-chevron { color:#94a3b8; font-size:1.8rem; }
.meeting-detail-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:8px; }
.meeting-detail-head h1 { margin:2px 0; }
.meeting-eyebrow { display:inline-block; color:var(--mint-deep); font-size:.78rem; font-weight:700; letter-spacing:.12em; }
.meeting-participant-chips { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.meeting-participant-chips>span { display:inline-flex; align-items:center; gap:5px; padding:3px 9px 3px 4px; background:#fff; border:1px solid #dbe3e0; border-radius:18px; font-size:.82rem; }
.meeting-participant-chips b, .meeting-speaker-avatar { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:50%; background:var(--mint); color:var(--ink); }
.meeting-head-actions { margin-top:5px; }
.meeting-audio-card { border-left:5px solid var(--mint); }
.meeting-section-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.meeting-section-head>div { display:flex; align-items:center; gap:7px; min-width:0; }
.meeting-section-head>div:first-child:not(:last-child) { flex-wrap:wrap; }
.meeting-section-head h2, .meeting-section-head p { margin:0; }
.meeting-upload-form, .meeting-import-form { display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap; margin:0; }
.meeting-upload-form label { margin:0; max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.meeting-audio { width:100%; margin:12px 0 2px; accent-color:var(--mint-deep); }
.meeting-transcribe-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; padding:11px 12px; border:1px solid #dbe3e0; border-radius:9px; background:var(--mint-tint); }
.meeting-transcribe-status { display:grid; gap:2px; min-width:0; }
.meeting-transcribe-status strong { overflow-wrap:anywhere; color:var(--ink); }
.meeting-transcribe-status span { color:#64748b; font-size:.8rem; }
.meeting-transcribe-status.is-failed strong { color:#a33a32; }
.meeting-transcribe-form { flex:none; margin:0; }
.meeting-tabs { display:flex; gap:4px; border-bottom:2px solid #dbe3e0; margin:18px 0 14px; overflow-x:auto; }
.meeting-tabs a { flex:none; padding:10px 16px 8px; color:#64748b; border-bottom:3px solid transparent; margin-bottom:-2px; font-weight:600; }
.meeting-tabs a:hover { text-decoration:none; color:var(--ink); }
.meeting-tabs a.active { color:var(--ink); border-bottom-color:var(--mint-deep); }
.meeting-tabs a span { background:#e2e8f0; border-radius:10px; padding:1px 7px; font-size:.74rem; }
.meeting-tabs a.active span { background:var(--mint); }
.meeting-overview-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(270px,1fr); gap:16px; align-items:start; }
.meeting-overview-grid .card { margin-top:0; }
.meeting-summary-card textarea { margin-top:10px; }
.meeting-section-icon { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:7px; background:var(--mint); color:var(--ink); font-weight:700; }
.meeting-pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.meeting-agenda-record-item { display:grid; grid-template-columns:34px minmax(0,1fr); gap:10px; border-top:1px solid #e2e8f0; padding:15px 0; }
.meeting-agenda-record-item:first-of-type { margin-top:8px; }
.meeting-agenda-number { display:flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:50%; background:var(--ink); color:#fff; font-weight:700; }
.meeting-agenda-record-item h3 { margin:2px 0 5px; font-size:1rem; }
.meeting-note-block, .meeting-decision { border-radius:7px; padding:8px 10px; margin-top:8px; background:#f8fafc; }
.meeting-note-block p, .meeting-decision p { margin:3px 0; }
.meeting-decision { background:var(--mint-tint); border-left:4px solid var(--mint-deep); }
.meeting-action-mini { display:grid; grid-template-columns:25px minmax(0,1fr); gap:8px; padding:9px 0; border-bottom:1px solid #e2e8f0; }
.meeting-action-mini.done { opacity:.62; }
.meeting-action-mini.done strong { text-decoration:line-through; }
.meeting-check-mark { width:21px; height:21px; border:2px solid #94a3b8; border-radius:5px; display:flex; align-items:center; justify-content:center; color:var(--mint-deep); }
.meeting-action-mini.done .meeting-check-mark { background:var(--mint); border-color:var(--mint-deep); }
.meeting-action-mini strong, .meeting-action-mini small { display:block; overflow-wrap:anywhere; }
.meeting-action-mini small { color:#64748b; margin-top:2px; }
.meeting-source-card p { overflow-wrap:anywhere; }
.meeting-tab-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin:4px 0 10px; }
.meeting-tab-head h2, .meeting-tab-head p { margin:0; }
.meeting-import-card { background:var(--mint-tint); }
.meeting-import-form label { flex:1; min-width:260px; margin:0; }
.meeting-transcript-card { padding-top:4px; }
.meeting-transcript-row { display:grid; grid-template-columns:75px 34px minmax(0,1fr); gap:10px; padding:15px 0; border-bottom:1px solid #e2e8f0; scroll-margin-top:10px; }
.meeting-transcript-row:last-child { border-bottom:0; }
.meeting-transcript-row>time { color:#64748b; font-variant-numeric:tabular-nums; padding-top:5px; }
.meeting-speaker-avatar { width:32px; height:32px; font-weight:700; }
.meeting-speaker-form { display:flex; gap:6px; align-items:center; margin:0 0 5px; }
.meeting-speaker-form input { width:180px; }
.meeting-speaker-name { display:block; color:var(--mint-deep); }
.meeting-transcript-row p { margin:4px 0 0; }
.meeting-ai-draft { border-left:5px solid var(--mint-deep); scroll-margin-top:12px; }
.meeting-ai-draft.is-failed { border-left-color:#b4534b; }
.meeting-ai-draft-head, .meeting-ai-section-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.meeting-ai-draft-head h2 { margin:3px 0 0; font-size:1.12rem; }
.meeting-ai-draft-head form, .meeting-ai-section-head form { flex:none; margin:0; }
.meeting-ai-draft-state { display:grid; gap:3px; margin-top:14px; padding:11px 13px; border:1px solid #dbe3e0; border-radius:9px; background:#f8fafc; }
.meeting-ai-draft-state span { color:#64748b; font-size:.84rem; overflow-wrap:anywhere; }
.meeting-ai-draft-state.is-processing { border-color:#b9e6d9; background:var(--mint-tint); }
.meeting-ai-draft-state.is-failed { border-color:#fecaca; background:#fff7f7; }
.meeting-ai-draft-state.is-failed strong { color:#a33a32; }
.meeting-ai-draft-state.is-unavailable { border-color:#d7dce1; background:#f4f5f6; }
.meeting-ai-section { margin-top:16px; padding-top:16px; border-top:1px solid #dbe3e0; }
.meeting-ai-section>h3, .meeting-ai-section-head h3, .meeting-ai-section-head h4 { margin:0 0 8px; }
.meeting-ai-section>.meeting-pre { margin:4px 0 0; }
.meeting-ai-agenda { margin-top:10px; padding:12px; border-radius:9px; background:#f8fafc; }
.meeting-ai-agenda dl, .meeting-ai-agenda dd { margin:0; }
.meeting-ai-agenda dl { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.meeting-ai-agenda dl>div { min-width:0; padding:9px 10px; border:1px solid #e2e8f0; border-radius:8px; background:#fff; }
.meeting-ai-agenda dt { margin-bottom:4px; color:#64748b; font-size:.76rem; font-weight:700; }
.meeting-ai-action-list { display:grid; gap:8px; }
.meeting-ai-action { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; border:1px solid #dbe3e0; border-radius:9px; background:#fff; }
.meeting-ai-action>div { min-width:0; }
.meeting-ai-action strong { overflow-wrap:anywhere; }
.meeting-ai-action p { margin:4px 0 0; overflow-wrap:anywhere; }
.meeting-ai-action .btn { flex:none; }
.meeting-ai-readonly, .meeting-ai-prefill-note { margin:14px 0 0; padding:9px 11px; border-radius:8px; background:#f4f5f6; color:#525c66; font-size:.84rem; }
.meeting-action-ai-prefill { border-left:5px solid var(--mint-deep); }
.meeting-ai-prefill-note { margin:0 0 10px; background:var(--mint-tint); }
.meeting-ai-prefill-note a { margin-left:5px; font-weight:700; }
.meeting-action-form-grid small { display:block; margin-top:4px; font-weight:400; }
.meeting-action-form-grid { display:grid; grid-template-columns:minmax(220px,2fr) minmax(150px,1fr) minmax(145px,.7fr); gap:10px; align-items:end; }
.meeting-action-form-grid label { margin:4px 0; }
.meeting-action-row { display:grid; grid-template-columns:38px minmax(0,1fr); gap:10px; align-items:start; border-left:5px solid var(--mint); }
.meeting-action-row.late { border-left-color:#dc2626; }
.meeting-action-row.done { opacity:.72; border-left-color:#16a34a; }
.meeting-action-row>form { margin:0; }
.meeting-action-toggle { width:34px; height:34px; border:2px solid var(--mint-deep); border-radius:7px; background:#fff; color:var(--ink); font-size:1.15rem; cursor:pointer; }
.meeting-action-row.done .meeting-action-toggle { background:var(--mint); }
.meeting-action-toggle:disabled { border-color:#cbd5e1; cursor:not-allowed; }
.meeting-action-body>form { margin:0 0 7px; }
.meeting-action-body>form:last-child { margin:0; }
.meeting-action-row.done input[name="content"] { text-decoration:line-through; }
.meeting-action-meta { color:#64748b; font-size:.8rem; margin:3px 0 8px; }
.meeting-action-transfer { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-top:10px; padding:10px 12px; border:1px solid #dbe3e0; border-radius:9px; background:#f8fafc; }
.meeting-action-transfer.is-pending { border-color:#f4d48d; background:#fff9e8; }
.meeting-action-transfer.is-complete { border-color:#b9e6d9; background:var(--mint-tint); }
.meeting-action-transfer.is-returned { border-color:#fecaca; background:#fff7f7; }
.meeting-transfer-status { display:flex; flex-direction:column; gap:2px; min-width:0; overflow-wrap:anywhere; }
.meeting-transfer-status>span { color:#64748b; font-size:.72rem; font-weight:700; letter-spacing:.08em; }
.meeting-transfer-status strong { font-size:.88rem; }
.meeting-transfer-status small { color:#64748b; font-size:.78rem; }
.meeting-transfer-form { display:flex; align-items:flex-end; gap:8px; margin:0; flex:none; }
.meeting-transfer-form label { margin:0; font-size:.78rem; }
.meeting-transfer-form select { min-width:92px; }
.meeting-transfer-form .btn { white-space:nowrap; }
.meeting-danger-zone { border:1px solid #fecaca; margin-top:22px; }
.meeting-danger-zone summary { color:#b91c1c; cursor:pointer; font-weight:700; }
.meeting-agenda-editor { display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.meeting-agenda-editor-head .icon-action { width:34px; min-width:34px; height:34px; min-height:34px; margin-left:auto; }
.meeting-agenda-edit-row { display:grid; grid-template-columns:34px minmax(0,1fr) 72px; gap:10px; align-items:start; padding:12px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:9px; }
.agenda-seq { display:flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:50%; background:var(--ink); color:#fff; font-weight:700; margin-top:10px; }
.agenda-edit-fields label { margin:3px 0 8px; }
.agenda-order-buttons { display:flex; flex-wrap:wrap; gap:4px; padding-top:10px; }
.agenda-order-buttons .btn-danger { width:100%; }

/* ===== 會議紀錄模組 Phase 1.5 ===== */
.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; }
.meeting-template-picker { display:flex; align-items:center; gap:7px; margin:0; font-size:.86rem; }
.meeting-template-picker select { min-width:240px; }
.meeting-rich-editor { margin:4px 0 12px; min-width:0; }
.meeting-rich-editor .ql-toolbar.ql-snow { display:flex; flex-wrap:wrap; gap:1px; padding:6px; border-color:#cbd5e1; border-radius:7px 7px 0 0; background:#f8fafc; font-family:var(--font-system); }
.meeting-rich-editor .ql-toolbar .ql-formats { display:inline-flex; margin-right:5px; }
.meeting-rich-editor .ql-container.ql-snow { border-color:#cbd5e1; border-radius:0 0 7px 7px; font-family:var(--font-system); font-size:.92rem; color:var(--ink); }
.meeting-rich-editor .ql-editor { min-height:110px; overflow-wrap:anywhere; }
.meeting-rich-editor-compact .ql-editor { min-height:74px; }
.meeting-rich-editor .ql-editor img, .meeting-rich-content img { display:block; max-width:100%; height:auto; margin:7px 0; border-radius:6px; }
.meeting-editor-status { display:block; min-height:17px; margin-top:2px; color:var(--mint-deep); }
.meeting-editor-status.error { color:#b91c1c; }
.meeting-rich-content { overflow-wrap:anywhere; }
.meeting-rich-content p { margin:5px 0; }
.meeting-rich-content ol, .meeting-rich-content ul { margin:6px 0; padding-left:24px; }
.meeting-rich-content a { text-decoration:underline; }
.meeting-agenda-notes { margin-top:16px; padding-top:12px; border-top:1px dashed #cbd5e1; }
.meeting-agenda-notes h4 { margin:0 0 8px; }
.meeting-agenda-notes h4 span { display:inline-block; min-width:20px; padding:1px 6px; border-radius:10px; background:var(--mint); text-align:center; font-size:.75rem; }
.meeting-agenda-note-list { min-height:20px; }
.meeting-agenda-note { margin:8px 0; padding:9px 11px; border-left:4px solid var(--mint); border-radius:6px; background:#f8fafc; scroll-margin-top:12px; }
.meeting-agenda-note.is-new { animation:meeting-note-highlight 1.6s ease-out; }
.meeting-note-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; color:#64748b; font-size:.78rem; }
.meeting-note-meta strong { color:var(--ink); }
.meeting-note-meta form { margin:0 0 0 auto; }
.meeting-note-meta .danger { color:#b91c1c; }
.meeting-notes-empty { margin:8px 0; color:#64748b; font-size:.86rem; }
.meeting-notes-connection { margin:0 0 12px; padding:9px 11px; border:1px solid #fecaca; border-radius:7px; background:#fff7f7; color:#b91c1c; }
.meeting-note-form { margin:10px 0 0; padding:10px; border-radius:7px; background:var(--mint-tint); }
.meeting-note-form .form-label { margin-top:0; }
.meeting-note-noscript { display:block; }
.meeting-note-noscript textarea { width:100%; margin-top:4px; }
.meeting-note-feedback { margin:7px 0 0; color:var(--mint-deep); font-size:.84rem; }
.meeting-note-feedback.error { color:#b91c1c; }
.meeting-secondary-tools { margin-top:16px; color:#64748b; }
.meeting-secondary-tools>summary { cursor:pointer; font-weight:700; }
.meeting-secondary-tools>div { margin-top:10px; }
.meeting-secondary-tools .badge { margin-left:6px; }
@keyframes meeting-note-highlight {
  0% { background:#dcf7f0; box-shadow:0 0 0 2px rgba(181,227,216,.72); }
  100% { background:#f8fafc; box-shadow:none; }
}
.meeting-template-save { position:relative; }
.meeting-template-save>summary { list-style:none; cursor:pointer; }
.meeting-template-save>summary::-webkit-details-marker { display:none; }
.meeting-template-save>form { position:absolute; z-index:5; right:0; width:300px; margin-top:6px; padding:12px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; box-shadow:0 8px 22px rgba(37,40,42,.16); }
.meeting-template-list-card { padding:0; overflow:hidden; }
.meeting-template-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:center; padding:14px 16px; border-bottom:1px solid #e2e8f0; }
.meeting-template-row:last-child { border-bottom:0; }
.meeting-template-info { display:flex; flex-direction:column; min-width:0; }
.meeting-template-info span, .meeting-template-info small { color:#64748b; overflow-wrap:anywhere; }
.meeting-template-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.meeting-template-actions form { display:flex; align-items:center; gap:5px; margin:0; }
.meeting-template-actions input { width:190px; }

/* ===== 會議紀錄模組 M2：定稿與簽收 ===== */
.meeting-record-status { display:flex; justify-content:space-between; align-items:center; gap:18px; border-left:5px solid #94a3b8; }
.meeting-record-status.is-finalized { border-left-color:var(--mint-deep); }
.meeting-record-status>div:first-child { display:flex; flex-direction:column; gap:3px; min-width:0; }
.meeting-record-status>div:first-child strong { font-size:1.05rem; }
.meeting-record-status-actions { display:flex; align-items:flex-end; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.meeting-record-status-actions form { margin:0; }
.meeting-refinalize-form { display:flex; align-items:flex-end; gap:8px; }
.meeting-refinalize-form label { min-width:280px; margin:0; }
.meeting-record-page-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:14px; }
.meeting-record-page-head h1 { margin:2px 0; }
.meeting-record-version-nav { display:flex; align-items:center; justify-content:flex-end; gap:6px; flex-wrap:wrap; }
.meeting-record-version-nav a { padding:7px 10px; border:1px solid var(--line); border-radius:18px; background:#fff; color:var(--ink); font-size:.82rem; }
.meeting-record-version-nav a:hover { background:var(--mint-tint); text-decoration:none; }
.meeting-record-version-nav a.active { border-color:var(--mint-deep); background:var(--mint); font-weight:700; }
.meeting-record-replaced { margin-bottom:12px; padding:11px 13px; border:1px solid #f4d48d; border-radius:9px; background:#fff9e8; color:#744d08; }
.meeting-record-replaced a { margin-left:5px; font-weight:700; }
.meeting-record-change-note { border-left:5px solid var(--mint-deep); }
.meeting-record-change-note p { margin:5px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.meeting-record-content { padding:0; overflow:hidden; }
.meeting-record-snapshot { overflow-wrap:anywhere; }
.meeting-record-snapshot-head { padding:24px; background:linear-gradient(145deg,var(--mint-tint),#fff); border-bottom:1px solid var(--line); }
.meeting-record-snapshot-head h1 { margin:4px 0 16px; font-size:1.65rem; }
.meeting-record-meta { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 16px; margin:0; }
.meeting-record-meta div { min-width:0; padding:9px 0; border-top:1px solid rgba(37,40,42,.12); }
.meeting-record-meta dt { color:#64748b; font-size:.75rem; }
.meeting-record-meta dd { margin:2px 0 0; font-weight:700; }
.meeting-record-participants { margin-top:16px; }
.meeting-record-participants h2 { margin:0 0 4px; font-size:.9rem; }
.meeting-record-participants p { margin:0; }
.meeting-record-section { padding:22px 24px; border-bottom:1px solid var(--line); }
.meeting-record-section:last-child { border-bottom:0; }
.meeting-record-section>h2 { margin:0 0 14px; font-size:1.2rem; }
.meeting-record-agenda { margin-top:14px; padding-top:18px; border-top:1px solid var(--line); }
.meeting-record-agenda:first-of-type { margin-top:0; padding-top:0; border-top:0; }
.meeting-record-agenda-title { display:grid; grid-template-columns:30px minmax(0,1fr); align-items:center; gap:9px; }
.meeting-record-agenda-title>span { display:flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:50%; background:var(--ink); color:#fff; font-weight:700; }
.meeting-record-agenda-title h3 { margin:0; font-size:1.05rem; }
.meeting-record-block { margin:10px 0 0 39px; padding:10px 12px; border-radius:8px; background:#f8fafc; }
.meeting-record-block h4, .meeting-record-comments h4 { margin:0 0 6px; font-size:.86rem; }
.meeting-record-decision { border-left:4px solid var(--mint-deep); background:var(--mint-tint); }
.meeting-record-comments { margin:13px 0 0 39px; padding-top:11px; border-top:1px dashed #cbd5e1; }
.meeting-record-comment { margin-top:8px; padding:9px 11px; border-left:4px solid var(--mint); border-radius:7px; background:#f8fafc; }
.meeting-record-action-list { display:grid; gap:8px; }
.meeting-record-action { display:flex; justify-content:space-between; gap:12px; padding:11px 12px; border-left:5px solid var(--mint); border-radius:8px; background:#f8fafc; }
.meeting-record-action.done { opacity:.68; border-left-color:#16a34a; }
.meeting-record-action span { color:#64748b; font-size:.8rem; text-align:right; }
.meeting-ack-progress h2, .meeting-ack-progress h3 { margin-top:0; }
.meeting-ack-groups { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.meeting-ack-groups h3 { margin-bottom:7px; font-size:.92rem; }
.meeting-ack-chips { display:flex; gap:7px; flex-wrap:wrap; }
.meeting-ack-chips>span { display:flex; flex-direction:column; padding:7px 10px; border:1px solid #b9e6d9; border-radius:8px; background:var(--mint-tint); }
.meeting-ack-chips.pending>span:not(.hint) { border-color:#f4d48d; background:#fff9e8; }
.meeting-ack-chips small { margin-top:2px; color:#64748b; }
.meeting-ack-dock { border:1px solid #b9e6d9; background:var(--mint-tint); text-align:center; }
.meeting-ack-dock form { margin:0; }
.meeting-ack-dock p { margin:0; }
.meeting-ack-dock form p { margin-bottom:9px; }
.meeting-ack-complete { color:#176b56; font-weight:800; }
.meeting-pending-list-card { padding:0; overflow:hidden; }
.meeting-pending-row { display:grid; grid-template-columns:minmax(0,1fr) auto 18px; align-items:center; gap:14px; padding:14px 16px; color:var(--ink); border-bottom:1px solid var(--line); }
.meeting-pending-row:last-child { border-bottom:0; }
.meeting-pending-row:hover { background:var(--mint-tint); text-decoration:none; }
.meeting-pending-row>div { display:flex; flex-direction:column; min-width:0; }
.meeting-pending-row>div:nth-child(2) { text-align:right; }
.meeting-pending-row span { color:#64748b; font-size:.8rem; }

/* ===== 會議紀錄模組 Phase 2：Plaud 自動同步 ===== */
.plaud-status-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.plaud-status-head>div { display:flex; align-items:center; gap:8px; font-size:1.05rem; }
.plaud-status-dot { display:inline-block; width:10px; height:10px; margin-right:5px; border-radius:50%; background:#94a3b8; vertical-align:middle; }
.plaud-status-dot.connected { background:#16a34a; box-shadow:0 0 0 3px #dcfce7; }
.plaud-status-dot.invalid { background:#dc2626; box-shadow:0 0 0 3px #fee2e2; }
.plaud-status-list { margin:0 0 14px; }
.plaud-status-list>div { display:grid; grid-template-columns:110px minmax(0,1fr); gap:10px; padding:9px 0; border-bottom:1px solid #e2e8f0; }
.plaud-status-list dt { color:#64748b; }
.plaud-status-list dd { margin:0; overflow-wrap:anywhere; }
.plaud-settings-card form, .plaud-inbox-head form, .plaud-recording-row form { margin:0; }
.plaud-error { margin:12px 0; border:1px solid #fecaca; border-radius:8px; background:#fff7f7; }
.plaud-error summary { padding:10px 12px; color:#b91c1c; cursor:pointer; font-weight:700; }
.plaud-error pre { max-height:280px; margin:0; padding:0 12px 12px; white-space:pre-wrap; overflow:auto; overflow-wrap:anywhere; font-size:.8rem; }
.plaud-inbox-card { padding-top:12px; }
.plaud-recording-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:center; padding:14px 2px; border-bottom:1px solid #e2e8f0; }
.plaud-recording-row:last-child { border-bottom:0; }
.plaud-recording-row>div:first-child { display:flex; flex-direction:column; min-width:0; }
.plaud-recording-row strong { overflow-wrap:anywhere; }
.plaud-recording-row span { margin-top:3px; color:#64748b; font-size:.82rem; }
.plaud-ignored-card { margin-top:14px; }
.plaud-ignored-card>summary { cursor:pointer; font-weight:700; }
.plaud-open-recording { margin-top:6px; }

@media (max-width: 680px) {
  .meeting-list-card { background:transparent; box-shadow:none; }
  .meeting-list { display:grid; gap:10px; }
  .meeting-list-item { grid-template-columns:62px minmax(0,1fr) 20px; gap:10px; padding:12px; background:#fff; border:1px solid #e2e8f0; border-left:5px solid var(--mint); border-radius:9px; }
  .meeting-date { border:0; }
  .meeting-action-progress { grid-column:2; text-align:left; flex-direction:row; gap:5px; align-items:baseline; }
  .meeting-chevron { grid-column:3; grid-row:1 / span 2; }
  .meeting-detail-head { display:block; }
  .meeting-head-actions .btn { width:100%; text-align:center; }
  .meeting-section-head { display:block; }
  .meeting-section-head>div { margin-bottom:8px; }
  .meeting-upload-form { display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .meeting-upload-form label { width:100%; max-width:none; }
  .meeting-transcribe-row { align-items:stretch; flex-direction:column; }
  .meeting-transcribe-form .btn { width:100%; min-height:44px; }
  .meeting-tabs a { padding-left:11px; padding-right:11px; }
  .meeting-overview-grid { grid-template-columns:1fr; }
  .meeting-agenda-record-item { grid-template-columns:30px minmax(0,1fr); }
  .meeting-transcript-card { margin-left:-2px; margin-right:-2px; padding-left:12px; padding-right:12px; }
  .meeting-transcript-row { grid-template-columns:58px 28px minmax(0,1fr); gap:7px; }
  .meeting-speaker-avatar { width:28px; height:28px; }
  .meeting-speaker-form { align-items:stretch; flex-direction:column; }
  .meeting-speaker-form input { width:100%; }
  .meeting-speaker-form .btn { align-self:flex-start; }
  .meeting-ai-draft-head, .meeting-ai-section-head { display:grid; grid-template-columns:1fr; }
  .meeting-ai-draft-head .btn, .meeting-ai-section-head .btn { width:100%; min-height:44px; }
  .meeting-ai-agenda { padding:10px; }
  .meeting-ai-agenda dl { grid-template-columns:1fr; }
  .meeting-ai-action { display:grid; }
  .meeting-ai-action .btn { width:100%; min-height:44px; text-align:center; }
  .meeting-import-form { display:block; }
  .meeting-import-form label { min-width:0; }
  .meeting-import-form .btn { width:100%; margin-top:8px; }
  .meeting-action-form-grid { grid-template-columns:1fr; gap:2px; }
  .meeting-action-row { grid-template-columns:34px minmax(0,1fr); padding:12px; }
  .meeting-action-body .btn { margin-top:4px; }
  .meeting-action-transfer { display:grid; align-items:stretch; }
  .meeting-transfer-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:end; width:100%; }
  .meeting-transfer-form select, .meeting-transfer-form .btn { width:100%; min-height:44px; }
  .meeting-agenda-editor-head { display:flex; align-items:flex-start; flex-wrap:nowrap; }
  .meeting-agenda-editor-head>div { min-width:0; margin-bottom:0; }
  .meeting-agenda-editor-head .hint { display:none; }
  .meeting-agenda-edit-row { grid-template-columns:30px minmax(0,1fr); padding:9px; }
  .agenda-order-buttons { grid-column:2; padding-top:0; }
  .agenda-order-buttons .btn-danger { width:auto; }
  .meeting-template-picker { display:block; width:100%; }
  .meeting-template-picker select { width:100%; min-width:0; margin-top:4px; }
  .meeting-rich-editor .ql-toolbar.ql-snow { padding:4px; }
  .meeting-rich-editor .ql-toolbar .ql-formats { margin-right:2px; }
  .meeting-rich-editor .ql-editor { min-height:96px; padding:10px; }
  .meeting-rich-editor-compact .ql-editor { min-height:68px; }
  .meeting-note-form { padding:8px; }
  .meeting-note-form>.btn { width:100%; min-height:44px; margin-top:4px; }
  .meeting-note-meta .danger { min-height:44px; padding:8px; }
  .meeting-template-save { width:100%; }
  .meeting-template-save>summary { width:100%; text-align:center; }
  .meeting-template-save>form { position:static; width:100%; box-shadow:none; }
  .meeting-template-row { grid-template-columns:1fr; padding:12px; }
  .meeting-template-actions { justify-content:stretch; }
  .meeting-template-actions form:first-child { display:grid; grid-template-columns:minmax(0,1fr) auto; width:100%; }
  .meeting-template-actions input { width:100%; }
  .meeting-record-status { display:block; }
  .meeting-record-status-actions { display:grid; justify-content:stretch; margin-top:12px; }
  .meeting-record-status-actions .btn { width:100%; text-align:center; }
  .meeting-refinalize-form { display:grid; gap:8px; }
  .meeting-refinalize-form label { min-width:0; }
  .meeting-record-page-head { display:block; }
  .meeting-record-version-nav { justify-content:flex-start; margin-top:10px; }
  .meeting-record-snapshot-head, .meeting-record-section { padding:17px 14px; }
  .meeting-record-snapshot-head h1 { font-size:1.35rem; }
  .meeting-record-meta { grid-template-columns:1fr 1fr; gap:7px 12px; }
  .meeting-record-block, .meeting-record-comments { margin-left:0; }
  .meeting-record-action { display:block; }
  .meeting-record-action span { display:block; margin-top:4px; text-align:left; }
  .meeting-ack-groups { grid-template-columns:1fr; }
  .meeting-ack-dock.is-pending { position:fixed; z-index:45; left:10px; right:10px; bottom:calc(78px + env(safe-area-inset-bottom)); margin:0; padding:12px; box-shadow:0 12px 34px rgba(37,40,42,.24); }
  .meeting-ack-dock.is-pending .btn { width:100%; min-height:48px; }
  body:has(.meeting-ack-dock.is-pending) .container { padding-bottom:170px; }
  body:has(.global-work-timer) .meeting-ack-dock.is-pending { bottom:calc(142px + env(safe-area-inset-bottom)); }
  body:has(.global-work-timer):has(.meeting-ack-dock.is-pending) .container { padding-bottom:230px; }
  .meeting-pending-list-card { background:transparent; box-shadow:none; }
  .meeting-pending-row { grid-template-columns:minmax(0,1fr) 18px; gap:8px; margin-bottom:9px; padding:12px; border:1px solid var(--line); border-left:5px solid var(--mint); border-radius:9px; background:#fff; }
  .meeting-pending-row>div:nth-child(2) { grid-column:1; text-align:left; }
  .meeting-pending-row>.meeting-chevron { grid-column:2; grid-row:1 / span 2; }
  .plaud-inbox-head .btn-row, .plaud-inbox-head .btn-row form { width:100%; }
  .plaud-inbox-head .btn-row .btn { width:100%; text-align:center; }
  .plaud-status-head { align-items:flex-start; }
  .plaud-status-list>div { grid-template-columns:1fr; gap:2px; }
  .plaud-recording-row { grid-template-columns:1fr; gap:9px; padding:12px 0; }
  .plaud-recording-row .btn-row, .plaud-recording-row .btn-row form { width:100%; }
  .plaud-recording-row .btn-row .btn { width:100%; }
}

/* ---- 就地儲存(不重載):Toast 提示 + 未儲存標記 + 批次儲存列 ---- */
/* 管理頁整列編輯用:儲存改走 fetch,畫面不跳回最上面,結果以右下角 Toast 回報 */
.toast-host { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; max-width: min(380px, calc(100vw - 32px));
  border-radius: 8px; padding: 10px 14px; font-size: .9rem; line-height: 1.5;
  box-shadow: 0 4px 14px rgba(37,40,42,.22); overflow-wrap: anywhere;
  animation: toast-in .18s ease-out;
}
.toast-ok { background: #dcfce7; color: #166534; border-left: 4px solid #16a34a; }
.toast-err { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.toast-sticky { cursor: pointer; }
.toast-sticky::after { content: '(點一下關閉)'; display: block; font-size: .75rem; opacity: .7; margin-top: 2px; }
.toast-out { animation: toast-out .25s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

tr.row-dirty > td { background: #fffbeb; }
/* 註:<tr> 的第一個子節點是瀏覽器拆出來的空 <form>,所以用 first-of-type 而非 first-child */
tr.row-dirty > td:first-of-type { box-shadow: inset 3px 0 0 #f59e0b; }
tr.row-saved > td { background: #dcfce7; transition: background 1.2s ease-out; }
.row-flag { display: none; color: #b45309; font-size: .75rem; white-space: nowrap; }
tr.row-dirty .row-flag { display: block; }

.save-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 89;
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 10px 8px 18px;
  box-shadow: 0 6px 20px rgba(37,40,42,.3); font-size: .9rem;
}
.save-bar[hidden] { display: none; }

/* ---- 帳號管理:權限欄收合 ---- */
/* 七個勾選直接攤在欄位裡會把欄寬吃光(中文就被擠成一字一行),平常只顯示摘要,要改再點開 */
.perm-box > summary {
  cursor: pointer; white-space: nowrap; font-size: .82rem; color: #475569;
  list-style: none; padding: 2px 0;
}
.perm-box > summary::-webkit-details-marker { display: none; }
.perm-box > summary::before { content: '▸ '; color: #94a3b8; }
.perm-box[open] > summary::before { content: '▾ '; }
.perm-box > summary:hover { color: var(--mint-deep); }
.perm-count { font-weight: 700; color: var(--mint-deep); }
.perm-list { display: grid; gap: 3px; padding: 6px 0 2px; }
.perm-box:not([open]) > .perm-list { display:none; }
.perm-box[open] > .perm-list { display:grid; }
.perm-list .inline-label { white-space: nowrap; font-size: .82rem; color: #475569; }
.user-table-scroll table { min-width: 1180px; }
.user-table-scroll .status-cell { white-space: nowrap; }
.save-bar .btn { padding: 6px 16px; }
@media (max-width: 700px) {
  .save-bar { left: 12px; right: 12px; transform: none; justify-content: space-between; }
}

/* ===== 週計畫工作中心 ===== */
.work-tabs {
  position:relative; display:flex; gap:6px; overflow:visible; padding:10px 0 4px; margin-bottom:10px;
}
.work-tabs a {
  flex:none; color:#475569; background:#fff; border:1px solid #dbe3e0; border-radius:8px;
  padding:8px 12px; font-size:.88rem; white-space:nowrap;
}
.work-tabs a:hover, .work-tabs a.active { color:var(--ink); background:var(--mint); border-color:var(--mint-deep); text-decoration:none; }
.work-more { position:relative; flex:none; }
.work-more > summary { min-width:44px; min-height:36px; display:flex; align-items:center; justify-content:center; padding:8px 12px; color:#475569; border:1px solid transparent; border-radius:8px; cursor:pointer; font-weight:700; letter-spacing:2px; list-style:none; }
.work-more > summary::-webkit-details-marker { display:none; }
.work-more > summary:hover, .work-more.active > summary, .work-more[open] > summary { color:var(--ink); background:var(--mint); }
.work-more-menu { position:absolute; z-index:30; top:calc(100% + 7px); right:0; width:280px; padding:8px; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 14px 32px rgba(37,40,42,.18); }
.work-more-menu section { padding:7px 6px; }
.work-more-menu section + section { border-top:1px solid var(--line); }
.work-more-menu section > strong { display:block; padding:2px 8px 6px; color:#76827e; font-size:.75rem; letter-spacing:.06em; }
.work-tabs .work-more-menu a { width:100%; min-height:38px; display:flex; padding:8px; border:0; background:transparent; }
.work-tabs .work-more-menu a:hover, .work-tabs .work-more-menu a.active { background:var(--mint-tint); }
.weekly-titlebar { min-height:52px; display:grid; grid-template-columns:36px minmax(0,1fr) 36px; align-items:center; gap:6px; margin:6px 0 10px; }
.weekly-title-copy { min-width:0; display:flex; justify-content:center; align-items:baseline; gap:10px; color:var(--ink); text-decoration:none; }
.weekly-title-copy:hover { color:var(--ink); text-decoration:none; }
.weekly-title-copy h1 { margin:0; }
.weekly-title-copy .hint { white-space:nowrap; font-variant-numeric:tabular-nums; }
.weekly-arrow-previous .ui-icon { transform:rotate(180deg); }
.weekly-status-strip {
  position:relative; display:flex; gap:10px; flex-wrap:nowrap; align-items:center; background:var(--ink); color:#e8ecea;
  border-radius:9px; padding:10px 14px; margin:10px 0; white-space:nowrap;
}
.weekly-status-strip span { border-right:1px solid #56605d; padding-right:10px; }
.weekly-status-strip > span:last-of-type { border-right:0; }
.weekly-flow-menu { margin-left:auto; }
.weekly-flow-menu > summary { display:flex; align-items:center; gap:3px; cursor:pointer; color:var(--mint); font-weight:700; list-style:none; }
.weekly-flow-menu > summary::-webkit-details-marker { display:none; }
.weekly-flow-menu > summary .ui-icon { width:14px; height:14px; transition:transform .18s ease; }
.weekly-flow-menu[open] > summary .ui-icon { transform:rotate(90deg); }
.weekly-flow-panel { position:absolute; z-index:20; top:calc(100% + 7px); right:0; width:min(340px, calc(100vw - 28px)); padding:14px; color:var(--ink); background:#fff; border:1px solid #dbe3e0; border-radius:12px; box-shadow:0 12px 30px rgba(37,40,42,.18); white-space:normal; }
.weekly-flow-panel p { margin:0 0 10px; }
.weekly-flow-panel .btn-row { margin:0; }
.weekly-flow-panel form, .weekly-flow-panel .btn { width:100%; margin:0; }
.weekly-warning { color:#fde68a; font-weight:700; }
.weekly-stats .stat-alert { box-shadow:inset 0 -4px 0 #ef4444; }
.weekly-live-timer, .global-work-timer {
  display:flex; align-items:center; justify-content:space-between; gap:12px; background:#173f36; color:#fff;
  border:1px solid var(--mint); box-shadow:0 4px 16px rgba(15,56,48,.18);
}
.weekly-live-timer form, .global-work-timer form { margin:0; }
.weekly-live-clock, .global-work-timer time { color:var(--mint); font-family:monospace; font-weight:700; font-size:1.05rem; margin-left:10px; }
.timer-pulse { display:inline-block; width:9px; height:9px; background:#34d399; border-radius:50%; margin-right:8px; box-shadow:0 0 0 4px rgba(52,211,153,.15); animation:timer-pulse 1.7s infinite; }
@keyframes timer-pulse { 50% { box-shadow:0 0 0 8px rgba(52,211,153,0); } }
.global-work-timer {
  position:sticky; top:0; z-index:55; border-radius:0; padding:7px max(14px,calc((100vw - 1080px)/2));
}
.global-work-timer.timer-long-running { box-shadow: inset 0 0 0 2px #f59e0b; }
.global-work-timer.timer-waiting { background:#51431d; }
.global-work-timer.timer-waiting .timer-pulse { background:#fbbf24; animation:none; }
.weekly-time-history { margin-top: 1rem; border-top: 1px solid var(--border, #d7dfdd); padding-top: .75rem; }
.weekly-time-entry { display: flex; gap: .75rem; justify-content: space-between; align-items: flex-start; padding: .5rem 0; border-bottom: 1px dashed var(--border, #d7dfdd); }
.weekly-time-entry details { min-width: 12rem; }
.weekly-time-entry form { display: grid; gap: .4rem; margin-top: .4rem; }
.global-work-timer a { display:flex; align-items:center; gap:7px; min-width:0; color:#fff; }
.global-work-timer a:hover { text-decoration:none; color:var(--mint); }
.global-work-timer strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:420px; }
.global-work-timer .btn { background:#fff; }
.global-wait-count { flex:none; color:#fde68a; font-size:.8rem; font-weight:700; white-space:nowrap; }
.weekly-task-details > summary { cursor:pointer; font-weight:700; color:var(--mint-deep); }
.weekly-add { margin-top:22px; scroll-margin-top:78px; }
.weekly-add[hidden] { display:none; }
.weekly-add-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.weekly-add-head h2 { margin:0; }
.weekly-section { margin:20px 0; }
.weekly-section > h2 { margin:0 0 8px; }
.weekly-task-list { display:grid; gap:10px; }
.weekly-task {
  background:#fff; border:1px solid #dbe3e0; border-left:5px solid var(--mint); border-radius:10px;
  padding:13px 15px; box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.weekly-task.overdue { border-left-color:#ef4444; }
.weekly-task.completed { border-left-color:#16a34a; background:#f8fffb; }
.weekly-task.completed > .weekly-task-main .weekly-task-title-row > strong { text-decoration:line-through; color:#64748b; }
.weekly-task-title-row { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.weekly-task-title-row > strong { font-size:1.02rem; }
.weekly-output { margin:8px 0; color:#334155; }
.weekly-output span { display:inline-block; font-size:.72rem; border-radius:5px; background:var(--mint-tint); color:var(--mint-deep); padding:2px 6px; margin-right:7px; }
.weekly-task-meta { display:flex; gap:7px 14px; flex-wrap:wrap; color:#64748b; font-size:.82rem; }
.weekly-task-actions { display:flex; gap:7px; flex-wrap:wrap; margin-top:10px; }
.weekly-task-actions form { margin:0; }
.weekly-task-details { margin-top:10px; border-top:1px solid #e2e8f0; padding-top:8px; }
.weekly-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:10px; }
.weekly-subform, .weekly-edit-form, .weekly-manager-edit { background:#f8fafc; border-radius:8px; padding:10px 12px; }
.weekly-subform h3 { margin:0 0 6px; }
.weekly-edit-form { margin-top:10px; }
.weekly-empty { color:#94a3b8; background:#f8fafc; border:1px dashed #cbd5e1; border-radius:9px; padding:14px; text-align:center; }
.tag-repeat { background:#ffedd5; color:#9a3412; font-weight:700; }
.tag-post-close { background:#fef3c7; color:#92400e; }
.text-danger { color:#dc2626 !important; font-weight:700; }
.weekly-delegation-card { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,360px); gap:18px; align-items:start; }
.delegation-response { display:flex; gap:8px; align-items:flex-end; }
.delegation-response form { margin:0; flex:1; }
.delegation-response .btn { width:100%; }
.table-scroll { overflow-x:auto; }
.weekly-request { display:flex; justify-content:space-between; gap:14px; align-items:center; border-bottom:1px solid #e2e8f0; padding:9px 0; }
.weekly-request p { margin:3px 0; }
.weekly-request form { display:flex; gap:6px; align-items:end; margin:0; }
.weekly-request form input { min-width:180px; }
.weekly-approval-card > header { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.weekly-approval-card h2 { margin-bottom:3px; }
.weekly-approval-card header .btn-row { margin-top:0; }
.weekly-approval-card header form { margin:0; }
.weekly-approval-items { display:grid; gap:10px; margin-top:10px; }
.weekly-manager-edit { border-left:4px solid var(--mint); }
.weekly-supplements { margin-top:14px; background:#fff7ed; border-radius:8px; padding:10px 12px; }

/* 工作說明書 */
.weekly-instruction-box { margin-top:10px; border-top:1px solid #e2e8f0; padding-top:8px; }
.weekly-instruction-box > summary { cursor:pointer; font-weight:700; color:var(--mint-deep); display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.weekly-instruction-preview { margin-top:10px; padding:12px; background:#f8fafc; border:1px solid #dbe3e0; border-radius:8px; }
.weekly-instruction-head, .instruction-document-head, .instruction-index-head, .instruction-comment-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
}
.weekly-instruction-head p, .instruction-document-head p { margin:3px 0 0; }
.instruction-preline { white-space:pre-line; overflow-wrap:anywhere; }
.weekly-instruction-warning { background:#fff7dd; color:#744f00; border-left:4px solid #f59e0b; border-radius:6px; padding:10px 12px; margin:10px 0; }
.instruction-read-ok { color:#15803d; font-weight:700; align-self:center; }
.instruction-card-section .instruction-link-row { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:10px 0; border-bottom:1px solid #e2e8f0; }
.instruction-card-section .instruction-link-row:last-of-type { margin-bottom:10px; }
.instruction-card-section .instruction-link-row p { margin:3px 0 0; }
.cross-department-section > h2 { margin-bottom:4px; }
.inline-create-details { margin:14px 0; border:1px solid var(--line); border-radius:10px; background:#fff; }
.inline-create-details > summary { min-height:44px; display:flex; align-items:center; padding:10px 13px; color:var(--mint-deep); font-weight:750; cursor:pointer; list-style:none; }
.inline-create-details > summary::-webkit-details-marker { display:none; }
.inline-create-details[open] { padding:0 13px 13px; background:var(--mint-tint); }
.inline-create-details[open] > summary { margin:0 -13px 10px; border-bottom:1px solid #cfe5df; }
.cross-department-request-list { display:grid; gap:10px; margin-top:12px; }
.cross-department-request { padding:13px; border:1px solid var(--line); border-radius:10px; background:#f8faf9; }
.cross-department-request p { margin:7px 0 0; }
.cross-department-request-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.cross-department-review { margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.instruction-index-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:14px; }
.instruction-index-grid .card { margin:0; }
.instruction-index-item h2 { margin:4px 0 10px; }
.instruction-index-item p { margin:7px 0; }
.instruction-create-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(280px,1fr); gap:16px; align-items:start; }
.instruction-create-grid .card { margin-top:0; }
.instruction-detail-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(270px,1fr); gap:16px; align-items:start; }
.instruction-detail-grid .card { margin-top:0; margin-bottom:16px; }
.instruction-document h2 { margin-top:22px; }
.instruction-change-summary { background:var(--mint-tint); border-left:4px solid var(--mint-deep); padding:10px 12px; margin:12px 0; }
.instruction-steps { line-height:1.8; }
.instruction-file-form { margin:14px 0; padding-top:12px; border-top:1px solid #e2e8f0; }
.instruction-comments { display:grid; gap:10px; margin-bottom:14px; }
.instruction-comments article { background:#f8fafc; border-radius:8px; padding:12px; }
.instruction-comments article p { margin:8px 0; }
.instruction-response { background:var(--mint-tint); padding:9px 11px; margin-top:10px; border-radius:6px; }
.instruction-comments article form { display:grid; grid-template-columns:180px minmax(0,1fr) auto; gap:8px; align-items:end; margin-top:10px; }
.instruction-comments article form label { margin:0; }
.instruction-linked-work { display:flex; flex-direction:column; gap:2px; padding:8px 0; border-bottom:1px solid #e2e8f0; }
.instruction-reader-list, .instruction-version-list { list-style:none; padding:0; margin:0; }
.instruction-reader-list li, .instruction-version-list li { display:flex; flex-direction:column; gap:2px; padding:8px 0; border-bottom:1px solid #e2e8f0; }
.instruction-reader-list time, .instruction-version-list span { color:#64748b; font-size:.82rem; }

@media (max-width:680px) {
  .learning-sync-note { align-items:stretch; flex-direction:column; }
  .learning-sync-note .btn { width:100%; text-align:center; }
  .board-filter-bar { display:grid; grid-template-columns:1fr 1fr; align-items:end; }
  .board-filter-bar > div { grid-column:1/-1; margin-right:0; }
  .board-filter-bar select { width:100%; min-width:0; }
  .work-tabs { margin-left:-14px; margin-right:-14px; padding-left:14px; padding-right:14px; }
  .work-tabs > a { flex:1; justify-content:center; padding:8px 7px; }
  .work-more-menu { width:min(290px, calc(100vw - 24px)); }
  .weekly-titlebar { grid-template-columns:40px minmax(0,1fr) 40px; gap:3px; }
  .weekly-title-copy { gap:7px; }
  .weekly-title-copy h1 { font-size:1.28rem; white-space:nowrap; }
  .weekly-title-copy .hint { font-size:.76rem; }
  .weekly-status-strip { gap:7px; padding:10px 11px; font-size:.76rem; }
  .weekly-status-strip span { padding-right:7px; }
  .weekly-stats { grid-template-columns:repeat(2,1fr); }
  .weekly-live-timer { align-items:flex-start; flex-wrap:wrap; }
  .weekly-live-timer > div { min-width:0; }
  .weekly-live-timer > .btn-row { width:100%; margin-top:0; }
  .weekly-live-timer > .btn-row form, .weekly-live-timer > .btn-row .btn { flex:1; }
  .weekly-live-timer strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:66vw; }
  .weekly-live-clock { display:block; margin:5px 0 0 17px; }
  .global-work-timer { position:fixed; left:8px; right:8px; top:auto; bottom:8px; border-radius:12px; padding:8px 9px; gap:6px; z-index:90; }
  .global-work-timer a span:not(.timer-pulse), .global-work-timer time { display:none; }
  .global-work-timer strong { max-width:35vw; }
  .global-work-timer .btn-sm { padding:5px 7px; font-size:.76rem; }
  .global-wait-count { display:none; }
  body:has(.global-work-timer) .container { padding-bottom:110px; }
  .weekly-plan-actions { display:block; }
  .weekly-plan-actions .btn-row { margin-top:10px; }
  .weekly-plan-actions .btn-row, .weekly-plan-actions form, .weekly-plan-actions .btn { width:100%; }
  .weekly-task { padding:12px; }
  .weekly-task-actions, .weekly-task-actions form, .weekly-task-actions .btn { width:100%; }
  .weekly-detail-grid { grid-template-columns:1fr; }
  .weekly-time-entry { display:block; }
  .weekly-time-entry details { min-width:0; margin-top:6px; }
  .weekly-delegation-card { grid-template-columns:1fr; }
  .delegation-response { display:grid; grid-template-columns:1fr; }
  .weekly-request, .weekly-approval-card > header { display:block; }
  .weekly-request form { display:grid; grid-template-columns:1fr 1fr; margin-top:8px; }
  .weekly-request form input { grid-column:1/-1; min-width:0; }
  .weekly-approval-card header .btn-row { margin-top:10px; }
  .weekly-approval-card header .btn-row form, .weekly-approval-card header .btn-row .btn { width:100%; }
  .weekly-instruction-head, .instruction-document-head, .instruction-index-head, .instruction-comment-head { display:block; }
  .weekly-instruction-preview .btn-row, .weekly-instruction-preview .btn-row form, .weekly-instruction-preview .btn-row .btn { width:100%; }
  .instruction-card-section .instruction-link-row { display:block; }
  .instruction-card-section .instruction-link-row .btn-row { margin-top:8px; }
  .cross-department-request-head { align-items:flex-start; flex-direction:column; }
  .cross-department-review .btn-row, .cross-department-review .btn { width:100%; }
  .cross-department-review .btn { min-height:44px; }
  .instruction-create-grid, .instruction-detail-grid { grid-template-columns:1fr; }
  .instruction-comments article form { grid-template-columns:1fr; }
}

/* ===== 2026 全站介面收斂：清爽側欄、手機底部導覽與一致元件 ===== */
:root {
  --page-bg:#f4f6f5;
  --surface:#fff;
  --surface-soft:#f8faf9;
  --line:#dfe5e2;
  --line-strong:#cbd5d1;
  --text:#25282a;
  --text-secondary:#60706a;
  --sidebar-width:232px;
  --toolbar-height:60px;
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;
  --shadow-card:0 1px 2px rgba(37,40,42,.04),0 7px 24px rgba(37,40,42,.045);
}

html { scroll-behavior:smooth; }
body { background:var(--page-bg); color:var(--text); letter-spacing:0; }
body.mobile-sheet-open { overflow:hidden; }
button, input, select, textarea { letter-spacing:inherit; }
a, button, summary { -webkit-tap-highlight-color:transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline:3px solid rgba(44,122,102,.28); outline-offset:2px;
}
a:hover { text-decoration:none; }
h1 { font-size:clamp(1.45rem,2vw,1.8rem); line-height:1.28; margin:22px 0 14px; letter-spacing:-.018em; }
h2 { font-size:1.08rem; line-height:1.38; letter-spacing:-.008em; }
h3 { font-family:var(--font-system-display); letter-spacing:-.005em; }
p { margin-top:.55em; margin-bottom:.75em; }

.skip-link { position:fixed; left:12px; top:-60px; z-index:300; background:var(--ink); color:#fff; border-radius:8px; padding:9px 13px; }
.skip-link:focus { top:10px; }
.ui-icon-sprite { position:absolute; width:0; height:0; overflow:hidden; }
.ui-icon { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }

/* 桌機應用程式骨架 */
.has-app-shell { --shell-sidebar:var(--sidebar-width); }
.has-app-shell.sidebar-collapsed { --shell-sidebar:76px; }
.app-sidebar {
  position:fixed; inset:0 auto 0 0; z-index:110; width:var(--shell-sidebar); min-height:100dvh;
  display:flex; flex-direction:column; color:#e9efed; background:var(--ink);
  border-right:1px solid rgba(255,255,255,.08); overflow:hidden; transition:width .22s ease;
}
.sidebar-brand {
  height:var(--toolbar-height); display:flex; align-items:center; gap:11px; flex:none; padding:0 18px;
  color:#fff; font-family:var(--font-system-display); font-weight:700; white-space:nowrap;
}
.sidebar-brand:hover { color:var(--mint); }
.sidebar-brand .brand-star { width:30px; height:30px; }
.sidebar-nav { flex:1; overflow-y:auto; overscroll-behavior:contain; padding:12px 10px 16px; scrollbar-width:thin; }
.sidebar-group + .sidebar-group { margin-top:16px; padding-top:13px; border-top:1px solid rgba(255,255,255,.08); }
.sidebar-group-title { display:block; padding:0 10px 6px; color:#85918d; font-size:.72rem; letter-spacing:.08em; white-space:nowrap; }
.sidebar-item {
  position:relative; width:100%; min-height:42px; display:flex; align-items:center; gap:12px; padding:9px 10px;
  border:0; border-radius:10px; color:#cbd3d0; background:transparent; font:inherit; text-align:left; white-space:nowrap; cursor:pointer;
}
.sidebar-item:hover { color:#fff; background:rgba(255,255,255,.075); }
.sidebar-item.active { color:var(--ink); background:var(--mint); font-weight:700; }
.sidebar-item .ui-icon { width:20px; height:20px; }
.sidebar-label { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.nav-count {
  min-width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; margin-left:auto; padding:0 6px;
  border-radius:999px; color:var(--ink); background:var(--mint); font-size:.7rem; font-weight:700; font-variant-numeric:tabular-nums;
}
.sidebar-item.active .nav-count { color:#fff; background:var(--ink); }
.sidebar-shortcuts > summary { list-style:none; }
.sidebar-shortcuts > summary::-webkit-details-marker { display:none; }
.sidebar-chevron { width:15px !important; height:15px !important; margin-left:auto; transition:transform .18s ease; }
.sidebar-shortcuts[open] .sidebar-chevron { transform:rotate(90deg); }
.sidebar-shortcut-list { display:grid; margin:3px 0 0 32px; padding-left:9px; border-left:1px solid rgba(181,227,216,.22); }
.sidebar-shortcut-list a { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:35px; padding:7px 8px; border-radius:8px; color:#aeb9b5; font-size:.83rem; }
.sidebar-shortcut-list a:hover { color:#fff; background:rgba(255,255,255,.06); }
.sidebar-shortcut-list .ui-icon { width:14px; height:14px; opacity:.72; }
.sidebar-account { flex:none; padding:10px; border-top:1px solid rgba(255,255,255,.08); background:rgba(0,0,0,.08); }
.sidebar-account form { margin:0; }
.sidebar-collapsed .sidebar-label, .sidebar-collapsed .sidebar-group-title, .sidebar-collapsed .nav-count, .sidebar-collapsed .sidebar-chevron { display:none; }
.sidebar-collapsed .sidebar-brand { padding:0; justify-content:center; }
.sidebar-collapsed .sidebar-nav, .sidebar-collapsed .sidebar-account { padding-left:10px; padding-right:10px; }
.sidebar-collapsed .sidebar-item { justify-content:center; gap:0; padding-left:0; padding-right:0; }

.app-toolbar {
  position:sticky; top:0; z-index:100; height:var(--toolbar-height); margin-left:var(--shell-sidebar);
  display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 24px;
  color:var(--text); background:rgba(255,255,255,.9); border-bottom:1px solid rgba(203,213,209,.82);
  backdrop-filter:saturate(145%) blur(18px); transition:margin-left .22s ease;
}
.toolbar-start, .toolbar-actions { display:flex; align-items:center; gap:9px; min-width:0; }
.toolbar-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:var(--font-system-display); font-size:.98rem; }
.icon-action {
  position:relative; width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; flex:none;
  padding:0; border:0; border-radius:10px; color:#3f4b47; background:transparent; font:inherit; cursor:pointer;
}
.icon-action:hover { color:var(--ink); background:#edf2f0; }
.icon-action .ui-icon { width:21px; height:21px; }
.action-dot { position:absolute; width:7px; height:7px; right:6px; top:6px; border-radius:50%; background:var(--mint-deep); box-shadow:0 0 0 2px #fff; }
.toolbar-user { min-height:40px; display:flex; align-items:center; gap:8px; padding:0 8px; border-radius:10px; color:#46534e; font-size:.88rem; }
.toolbar-user:hover { color:var(--ink); background:#edf2f0; }
.toolbar-user .ui-icon { width:19px; height:19px; }
.toolbar-create { position:relative; }
.toolbar-create > summary { list-style:none; }
.toolbar-create > summary::-webkit-details-marker { display:none; }
.toolbar-menu {
  position:absolute; top:calc(100% + 7px); right:0; width:240px; display:grid; padding:7px;
  border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.98); box-shadow:0 18px 45px rgba(37,40,42,.16);
}
.toolbar-menu a { display:grid; gap:1px; padding:10px 11px; border-radius:9px; color:var(--text); }
.toolbar-menu a:hover { background:var(--mint-tint); }
.toolbar-menu span { font-weight:700; }
.toolbar-menu small { color:var(--text-secondary); font-size:.77rem; }

.has-app-shell .container {
  width:calc(100% - var(--shell-sidebar)); max-width:none; min-height:calc(100dvh - var(--toolbar-height));
  margin:0 0 0 var(--shell-sidebar); padding:12px max(24px,calc((100vw - var(--shell-sidebar) - 1180px)/2)) 84px;
  transition:width .22s ease,margin-left .22s ease;
}
.has-app-shell .container.wide { padding-left:24px; padding-right:24px; }
.has-app-shell .app-version { margin-top:30px; }

/* 共用元件 */
.card {
  margin:16px 0; padding:18px 20px; border:1px solid rgba(203,213,209,.72); border-radius:var(--radius-lg);
  background:var(--surface); box-shadow:var(--shadow-card);
}
.action-card { border:1px solid var(--line-strong); box-shadow:var(--shadow-card); }
.stat-row { gap:12px; margin:16px 0; }
.stat { min-height:98px; display:flex; flex-direction:column; justify-content:center; padding:15px; border:1px solid rgba(203,213,209,.72); border-radius:14px; box-shadow:var(--shadow-card); }
.stat .num { line-height:1.15; font-size:1.65rem; font-variant-numeric:tabular-nums; }
.stat .label { margin-top:5px; color:var(--text-secondary); font-size:.8rem; }
a.stat-link { transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
a.stat-link:hover { transform:translateY(-1px); border-color:var(--mint-deep); box-shadow:0 8px 24px rgba(37,40,42,.09); }
.empty { color:#87948f; padding:20px 0; }
.hint, .count { color:var(--text-secondary); }

table { font-size:.92rem; }
th, td { height:48px; padding:10px 12px; border-bottom:1px solid var(--line); }
th { color:#6c7974; font-size:.78rem; font-weight:700; letter-spacing:.035em; }
tbody tr { transition:background .14s ease; }
tbody tr:hover { background:#f8fbfa; }
.actions { white-space:normal; }
.table-scroll, .items-scroll { border-radius:10px; scrollbar-width:thin; }

label { margin:12px 0; color:#39433f; font-weight:600; }
input, select, textarea {
  min-height:44px; padding:10px 12px; margin-top:5px; border-color:var(--line-strong); border-radius:10px; color:var(--text); background:#fff;
}
textarea { min-height:96px; resize:vertical; }
input:hover, select:hover, textarea:hover { border-color:#9eaaa5; }
input:focus, select:focus, textarea:focus { outline:3px solid rgba(181,227,216,.62); border-color:var(--mint-deep); }
.input-sm { min-height:34px; padding:6px 9px; border-radius:8px; }
.grid-form { gap:6px 18px; }
.inline-form, .filter-form { gap:10px; }

.btn {
  min-height:40px; display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:8px 15px;
  border-color:var(--line-strong); border-radius:10px; color:#34413c; background:#fff; font-weight:600; line-height:1.25;
  transition:background .14s ease,border-color .14s ease,color .14s ease,transform .14s ease;
}
.btn:hover { border-color:#9fb4ac; background:#f2f7f5; }
.btn:active { transform:scale(.98); }
.btn-primary { color:#fff; border-color:var(--ink); background:var(--ink); }
.btn-primary:hover { color:var(--ink); border-color:var(--mint); background:var(--mint); }
.btn-sm { min-height:32px; padding:5px 10px; border-radius:8px; font-size:.8rem; }
.btn-link { min-height:36px; padding:6px 8px; border-radius:8px; }
.btn-row { gap:9px; }
.tag { padding:3px 8px; border-radius:999px; font-weight:600; }
.flash { margin:14px 0; padding:12px 15px; border:1px solid transparent; border-radius:11px; }
.flash-ok { border-color:#bbdfca; }
.flash-err { border-color:#f5caca; }

.newdoc-row { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:9px; }
.newdoc { min-height:48px; justify-content:flex-start; padding:10px 12px; border-color:var(--line); border-radius:11px; background:#f8fbfa; }
.newdoc:hover { border-color:var(--mint-deep); background:var(--mint-tint); }
.newdoc .prefix { min-width:34px; text-align:center; border-radius:7px; }
.adminnav, .work-tabs { gap:6px; padding:5px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.8); }
.adminnav a, .work-tabs a { min-height:36px; display:inline-flex; align-items:center; border-color:transparent; border-radius:8px; background:transparent; }
.adminnav a:hover, .adminnav a.active, .work-tabs a:hover, .work-tabs a.active { color:var(--ink); border-color:transparent; background:var(--mint); }
.app-version { color:#8d9994; }

h1:has(> .btn), h2:has(> .btn), h1:has(> span[style*="float"]), h2:has(> span[style*="float"]) { display:flex; align-items:center; justify-content:space-between; gap:12px; }
h1 > .btn, h2 > .btn, h1 > span[style*="float"], h2 > span[style*="float"] { float:none !important; margin-left:auto; }

/* 首頁列表：整列可讀、動作一致 */
.home-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin:22px 0 4px; }
.home-hero h1 { margin:0; }
.home-hero p { margin:4px 0 0; color:var(--text-secondary); }
.section-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:8px; }
.section-head h2 { margin:0; }
.section-link { display:inline-flex; align-items:center; gap:3px; color:var(--mint-deep); font-size:.84rem; font-weight:700; }
.section-link .ui-icon { width:15px; height:15px; }
.home-list { list-style:none; padding:0; margin:0; }
.home-list li { position:relative; display:flex; align-items:center; gap:10px; min-height:50px; padding:8px 2px; border-bottom:1px solid var(--line); }
.home-list li:last-child { border-bottom:0; }
.home-list-main { min-width:0; flex:1; display:grid; gap:2px; }
.home-list-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); font-weight:600; }
.home-list-meta { color:var(--text-secondary); font-size:.78rem; }
.home-list-chevron { color:#87948f; }
.home-list-chevron .ui-icon { width:17px; height:17px; }
.home-list-link { position:absolute; inset:0; border-radius:8px; }
.home-list-link:hover { background:rgba(181,227,216,.13); }
.home-list li > :not(.home-list-link) { position:relative; z-index:1; pointer-events:none; }
.home-list li .tag { pointer-events:none; }
.home-action-cell { width:42px; text-align:right; }
.row-chevron-link { width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; border-radius:9px; color:var(--mint-deep); }
.row-chevron-link:hover { background:var(--mint-tint); }
.row-chevron-link .ui-icon { width:18px; height:18px; }
.table-row-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.plain-action { min-height:34px; display:inline-flex; align-items:center; padding:4px 7px; border-radius:8px; color:var(--mint-deep); font-size:.8rem; font-weight:700; }
.plain-action:hover { background:var(--mint-tint); }
.instruction-index-item { position:relative; }
.instruction-open { position:absolute; right:14px; bottom:14px; }
.work-symbol-action {
  width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; padding:0; border:0; border-radius:10px;
  color:#47534f; background:transparent; font:700 1rem/1 var(--font-system); cursor:pointer;
}
.work-symbol-action:hover { color:var(--ink); background:#edf2f0; }
.work-symbol-action.action-start { color:#146b56; }
.work-symbol-action.action-start:hover { color:#0d523f; background:var(--mint-tint); }
.work-symbol-action.action-done { color:#147148; }
.work-symbol-action.work-symbol-compact { width:32px; height:32px; color:#fff; }
.work-symbol-action.work-symbol-compact:hover { color:var(--ink); background:var(--mint); }
.weekly-task-actions { align-items:center; }

/* 首頁：今天的工作台 */
.section-subtitle { margin:2px 0 0; color:var(--text-secondary); font-size:.8rem; font-weight:400; }
.home-focus-card { padding:20px; border-color:var(--ink); color:#eef4f2; background:var(--ink); box-shadow:0 12px 28px rgba(37,40,42,.14); }
.home-focus-card .section-head { margin-bottom:6px; }
.home-focus-card h2 { color:#fff; }
.home-focus-card .section-subtitle, .home-focus-card .count { color:#aab7b3; }
.focus-list { display:grid; }
.focus-row { display:grid; grid-template-columns:38px minmax(0,1fr) 20px; align-items:center; gap:11px; min-height:58px; padding:8px 5px; border-bottom:1px solid rgba(255,255,255,.1); color:#fff; border-radius:8px; }
.focus-row:last-child { border-bottom:0; }
.focus-row:hover { background:rgba(255,255,255,.065); }
.focus-icon { width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:10px; color:var(--mint); background:rgba(181,227,216,.1); }
.focus-icon .ui-icon { width:19px; height:19px; }
.focus-copy { min-width:0; display:grid; gap:1px; }
.focus-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.92rem; }
.focus-copy small { color:#aebbb6; font-size:.76rem; }
.focus-chevron { width:17px; height:17px; color:#7f918a; }
.home-clear-state { min-height:92px; display:flex; align-items:center; justify-content:center; gap:12px; color:var(--mint); }
.home-clear-state > span { width:34px; height:34px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(181,227,216,.12); font-size:1.05rem; }
.home-clear-state p { display:grid; gap:1px; margin:0; }
.home-clear-state strong { color:#fff; }
.home-clear-state small { color:#aebbb6; }

.home-primary-grid { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(250px,.7fr); gap:14px; }
.home-primary-grid .card, .home-secondary-grid .card { margin:0 0 14px; }
.home-work-list { display:grid; }
.home-work-row { min-height:57px; display:grid; grid-template-columns:minmax(0,1fr) 44px; align-items:center; gap:9px; padding:7px 2px; border-bottom:1px solid var(--line); }
.home-work-row:last-child { border-bottom:0; }
.home-work-row > a { min-width:0; display:grid; gap:2px; padding:4px 6px; border-radius:8px; color:var(--text); }
.home-work-row > a:hover { background:#f5f8f7; }
.home-work-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-work-row small { color:var(--text-secondary); font-size:.76rem; }
.home-work-row.overdue { box-shadow:inset 3px 0 0 #df5a5a; padding-left:9px; }
.home-work-row form { margin:0; }
.home-empty-action { min-height:155px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:var(--text-secondary); }
.home-empty-action p { margin:0; }

.progress-number { display:grid; gap:1px; margin:20px 0 14px; }
.progress-number strong { font-family:var(--font-system-display); font-size:2.15rem; line-height:1.1; font-variant-numeric:tabular-nums; }
.progress-number span { color:var(--text-secondary); font-size:.8rem; }
.home-progress-track { height:8px; overflow:hidden; border-radius:999px; background:#e5ebe8; }
.home-progress-track span { display:block; height:100%; border-radius:inherit; background:var(--mint-deep); }
.progress-meta { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:19px; }
.progress-meta div { display:grid; padding:10px; border-radius:10px; background:#f5f8f7; text-align:center; }
.progress-meta strong { font-family:var(--font-system-display); font-size:1.15rem; }
.progress-meta span { color:var(--text-secondary); font-size:.72rem; }

.home-secondary-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.compact-list { display:grid; }
.compact-list > a { min-height:52px; display:grid; grid-template-columns:34px minmax(0,1fr) 18px; align-items:center; gap:9px; padding:7px 3px; border-bottom:1px solid var(--line); color:var(--text); border-radius:8px; }
.compact-list > a:last-child { border-bottom:0; }
.compact-list > a:hover { background:#f5f8f7; }
.compact-list > a > span:nth-child(2) { min-width:0; display:grid; gap:1px; }
.compact-list strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.88rem; }
.compact-list small { color:var(--text-secondary); font-size:.74rem; }
.compact-list > a > .ui-icon { width:16px; height:16px; color:#87948f; }
.compact-status { min-width:24px; display:flex; align-items:center; justify-content:center; }
.compact-status .dot-unread { margin:0; }
.compact-date { color:var(--mint-deep); font-size:.74rem; font-weight:700; font-variant-numeric:tabular-nums; }

.document-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; }
.document-summary-grid a { min-height:74px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:10px; border-radius:11px; color:var(--text); background:#f5f8f7; }
.document-summary-grid a:hover { background:var(--mint-tint); }
.document-summary-grid strong { font-family:var(--font-system-display); font-size:1.35rem; line-height:1.15; }
.document-summary-grid span { margin-top:3px; color:var(--text-secondary); font-size:.75rem; }
.home-create-details { margin-top:14px; padding-top:10px; border-top:1px solid var(--line); scroll-margin-top:78px; }
.home-create-details[hidden] { display:none; }
.home-create-head { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.home-create-head h3 { margin:0; }
.home-followup-card > summary { min-height:48px; display:flex; align-items:center; justify-content:space-between; list-style:none; color:var(--mint-deep); font-weight:700; cursor:pointer; }
.home-followup-card > summary::-webkit-details-marker { display:none; }
.home-create-details .newdoc-row { padding:3px 0 8px; }
.home-followup-card > summary { color:var(--text); }
.home-followup-card .table-scroll { margin-top:8px; }

/* 行動裝置底部導覽與更多面板 */
.mobile-tabbar, .mobile-sheet, .mobile-sheet-backdrop { display:none; }

/* 工作計時、提示與儲存列要避開側欄 */
.has-app-shell .global-work-timer { margin-left:var(--shell-sidebar); top:var(--toolbar-height); transition:margin-left .22s ease; }
.has-app-shell .toast-host { bottom:20px; }

@media (max-width:1024px) and (min-width:681px) {
  body.has-app-shell { --shell-sidebar:76px; }
  .app-toolbar { padding-left:16px; padding-right:16px; }
  .app-sidebar .sidebar-label, .app-sidebar .sidebar-group-title, .app-sidebar .nav-count, .app-sidebar .sidebar-chevron { display:none; }
  .app-sidebar .sidebar-brand { padding:0; justify-content:center; }
  .app-sidebar .sidebar-nav, .app-sidebar .sidebar-account { padding-left:10px; padding-right:10px; }
  .app-sidebar .sidebar-item { justify-content:center; gap:0; padding-left:0; padding-right:0; }
  body.tablet-sidebar-open::after {
    content:''; position:fixed; inset:0 0 0 260px; z-index:105; background:rgba(20,24,23,.18); backdrop-filter:blur(1px);
  }
  .tablet-sidebar-open .app-sidebar { width:260px; box-shadow:16px 0 36px rgba(20,24,23,.22); }
  .tablet-sidebar-open .sidebar-toggle { position:fixed; top:8px; left:208px; z-index:120; color:#fff; background:rgba(255,255,255,.08); }
  .tablet-sidebar-open .sidebar-toggle:hover { color:#fff; background:rgba(255,255,255,.14); }
  .tablet-sidebar-open .app-sidebar span.sidebar-label { display:inline; }
  .tablet-sidebar-open .app-sidebar .sidebar-group-title { display:block; }
  .tablet-sidebar-open .app-sidebar .nav-count { display:inline-flex; }
  .tablet-sidebar-open .app-sidebar .sidebar-chevron { display:block; }
  .tablet-sidebar-open .app-sidebar .sidebar-shortcut-list.sidebar-label { display:grid; }
  .tablet-sidebar-open .app-sidebar .sidebar-brand { padding:0 18px; justify-content:flex-start; }
  .tablet-sidebar-open .app-sidebar .sidebar-nav { padding:12px 10px 16px; }
  .tablet-sidebar-open .app-sidebar .sidebar-account { padding:10px; }
  .tablet-sidebar-open .app-sidebar .sidebar-item { justify-content:flex-start; gap:12px; padding:9px 10px; }
  .has-app-shell .container { padding-left:20px; padding-right:20px; }
  .toolbar-user span { display:none; }
}

@media (max-width:680px) {
  :root { --toolbar-height:54px; }
  body.has-app-shell { --shell-sidebar:0px; padding-bottom:72px; }
  .app-sidebar, .sidebar-toggle { display:none; }
  .app-toolbar { position:sticky; height:var(--toolbar-height); margin-left:0; padding:0 12px; }
  .toolbar-title { font-size:.94rem; }
  .toolbar-user { width:40px; padding:0; justify-content:center; }
  .toolbar-user span { display:none; }
  .toolbar-actions { gap:2px; }
  .toolbar-menu { position:fixed; top:calc(var(--toolbar-height) + 4px); left:12px; right:12px; width:auto; }
  .has-app-shell .container, .has-app-shell .container.wide {
    width:100%; min-height:auto; margin-left:0; padding:8px 12px 104px;
  }
  h1 { font-size:1.45rem; margin:18px 0 12px; }
  h2 { font-size:1.02rem; }
  .card { margin:12px 0; padding:15px 14px; border-radius:14px; box-shadow:0 1px 3px rgba(37,40,42,.045); }
  .stat-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .stat { min-height:88px; padding:12px 8px; border-radius:12px; }
  .stat .num { font-size:1.45rem; }
  .newdoc-row { grid-template-columns:1fr; }
  .newdoc { width:100%; }
  .btn { min-height:42px; }
  .btn-sm { min-height:34px; }
  .btn-row { gap:8px; }
  .grid-form { grid-template-columns:1fr; gap:0; }
  .filter-form { align-items:stretch; }
  .filter-form select, .filter-form input, .filter-form .btn { width:100%; }
  .adminnav, .work-tabs { margin-left:-12px; margin-right:-12px; padding:7px 12px; border-left:0; border-right:0; border-radius:0; }
  table, tbody, tr, td { display:block; width:100%; }
  tbody tr { margin-bottom:10px; padding:8px 10px; border:1px solid var(--line); border-radius:12px; background:#fff; }
  tbody tr:hover { background:#fff; }
  td { min-height:32px; height:auto; padding:5px 2px; border:0; }
  td[data-th] { display:grid; grid-template-columns:minmax(82px,34%) minmax(0,1fr); gap:8px; align-items:start; }
  td[data-th]::before { content:attr(data-th); margin:0; color:#7a8782; font-size:.76rem; font-weight:700; }
  td.num-col { text-align:left; }
  td.actions, td:last-child:not([data-th]) { padding-top:8px; }
  td.actions .btn, td:last-child:not([data-th]) .btn { width:100%; }
  .items-scroll tbody tr, .table-scroll tbody tr { border-radius:0; background:transparent; }
  .home-hero { align-items:flex-start; margin:18px 0 2px; }
  .home-hero p { font-size:.87rem; }
  .section-head { align-items:flex-start; }
  .home-list-title { white-space:normal; }
  .home-focus-card { padding:15px 13px; }
  .focus-row { grid-template-columns:34px minmax(0,1fr) 18px; gap:9px; min-height:56px; }
  .focus-icon { width:32px; height:32px; }
  .focus-copy strong { white-space:normal; line-height:1.35; }
  .home-primary-grid, .home-secondary-grid { grid-template-columns:1fr; gap:0; }
  .home-primary-grid .card, .home-secondary-grid .card { margin-bottom:12px; }
  .home-work-row { grid-template-columns:minmax(0,1fr) 42px; }
  .home-work-row strong { white-space:normal; line-height:1.35; }
  .home-progress-card { display:grid; grid-template-columns:1fr 1fr; column-gap:12px; }
  .home-progress-card .section-head { grid-column:1/-1; }
  .home-progress-card .progress-number { margin:10px 0; }
  .home-progress-card .home-progress-track { grid-column:1/-1; }
  .home-progress-card .progress-meta { margin-top:10px; }
  .document-summary-grid { grid-template-columns:repeat(2,1fr); }
  .compact-list strong { white-space:normal; line-height:1.35; }
  .table-row-actions { display:flex; justify-content:flex-end; }
  .instruction-index-item { padding-bottom:54px; }

  .mobile-tabbar {
    position:fixed; inset:auto 0 0; z-index:120; height:72px; display:grid; grid-template-columns:repeat(5,1fr);
    padding:6px max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));
    border-top:1px solid rgba(203,213,209,.9); background:rgba(255,255,255,.94); backdrop-filter:saturate(150%) blur(20px);
  }
  .mobile-tabbar a, .mobile-tabbar button {
    position:relative; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
    padding:3px 2px; border:0; border-radius:10px; color:#798681; background:transparent; font:inherit; font-size:.68rem; line-height:1.2; cursor:pointer;
  }
  .mobile-tabbar a.active { color:var(--mint-deep); font-weight:700; }
  .mobile-tabbar a.active::before { content:''; position:absolute; top:-6px; width:24px; height:2px; border-radius:3px; background:var(--mint-deep); }
  .mobile-tabbar .ui-icon { width:22px; height:22px; }
  .mobile-icon-wrap { position:relative; display:inline-flex; }
  .mobile-count { position:absolute; left:14px; top:-7px; min-width:16px; height:16px; display:flex; align-items:center; justify-content:center; padding:0 4px; border:2px solid #fff; border-radius:999px; color:#fff; background:var(--mint-deep); font-size:.58rem; font-weight:700; }
  .mobile-tabbar .action-dot { right:-5px; top:-4px; box-shadow:0 0 0 2px #fff; }
  .mobile-sheet-backdrop { position:fixed; inset:0; z-index:129; display:block; background:rgba(15,22,19,.36); backdrop-filter:blur(2px); }
  .mobile-sheet {
    position:fixed; left:8px; right:8px; bottom:8px; z-index:130; display:block; max-height:min(78dvh,660px); overflow-y:auto;
    padding:7px 14px calc(16px + env(safe-area-inset-bottom)); border:1px solid var(--line); border-radius:20px;
    background:#fff; box-shadow:0 24px 70px rgba(25,35,31,.28); transform:translateY(calc(100% + 20px)); visibility:hidden; transition:transform .22s ease,visibility .22s;
  }
  .mobile-sheet.open { transform:translateY(0); visibility:visible; }
  .mobile-sheet-handle { width:38px; height:4px; margin:2px auto 8px; border-radius:4px; background:#d3dcd8; }
  .mobile-sheet header { display:flex; align-items:center; justify-content:space-between; min-height:44px; }
  .mobile-sheet header strong { font-family:var(--font-system-display); }
  .mobile-sheet header .icon-action { font-size:1.5rem; }
  .mobile-sheet-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .mobile-sheet-grid a { position:relative; min-height:82px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:10px 5px; border-radius:13px; color:#45514d; background:#f4f7f6; text-align:center; font-size:.76rem; }
  .mobile-sheet-grid a:active { background:var(--mint-tint); }
  .mobile-sheet-grid .ui-icon { width:23px; height:23px; }
  .mobile-sheet-grid .nav-count { position:absolute; right:7px; top:7px; margin:0; }
  .mobile-shortcuts { margin-top:12px; border-top:1px solid var(--line); }
  .mobile-shortcuts > summary { min-height:46px; display:flex; align-items:center; justify-content:space-between; list-style:none; color:#45514d; font-weight:700; cursor:pointer; }
  .mobile-shortcuts > summary::-webkit-details-marker { display:none; }
  .mobile-shortcuts > summary .ui-icon { width:16px; height:16px; transition:transform .18s ease; }
  .mobile-shortcuts[open] > summary .ui-icon { transform:rotate(90deg); }
  .mobile-shortcuts > div { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding-bottom:8px; }
  .mobile-shortcuts a { min-height:40px; display:flex; align-items:center; justify-content:space-between; gap:7px; padding:8px 10px; border-radius:9px; color:#54615c; background:#f6f8f7; font-size:.8rem; }
  .mobile-shortcuts a .ui-icon { width:14px; height:14px; }
  .mobile-logout { margin:5px 0 0; border-top:1px solid var(--line); padding-top:7px; }
  .mobile-logout button { width:100%; min-height:42px; display:flex; align-items:center; justify-content:center; gap:8px; border:0; border-radius:10px; color:#8d3535; background:transparent; font:inherit; cursor:pointer; }
  .mobile-logout button:active { background:#fff1f1; }

  .has-app-shell .global-work-timer { left:8px; right:8px; bottom:80px; top:auto; margin-left:0; }
  body:has(.global-work-timer) .container { padding-bottom:164px; }
  .toast-host { right:10px; bottom:82px !important; }
  .save-bar { bottom:82px; }
}

@media (max-width:680px) {
  .onboarding-doc-back { margin-top:4px; }
  .onboarding-doc-intro { line-height:1.55; }
  .onboarding-doc-list { margin-top:8px; }
  .onboarding-doc-upload-grid { grid-template-columns:1fr; gap:2px; }
  .onboarding-doc-upload-grid .onboarding-doc-full { grid-column:auto; }
  .onboarding-doc-upload-grid input[type="number"] { max-width:110px; }
  .onboarding-template-back { margin-top:4px; }
  .onboarding-template-create .inline-form { display:grid; grid-template-columns:1fr 88px; align-items:end; }
  .onboarding-template-create .inline-form input { grid-column:1/-1; width:100%; }
  .onboarding-template-card { padding:13px 12px; }
  .onboarding-template-head { margin-bottom:7px; }
  .onboarding-template-table tbody { display:grid; gap:8px; }
  .onboarding-template-table tbody tr {
    position:relative; display:grid; gap:2px; margin:0; padding:10px 42px 10px 11px;
    border:1px solid var(--line); border-radius:11px; background:#fff;
  }
  .onboarding-template-table td { display:grid; grid-template-columns:76px minmax(0,1fr); align-items:baseline; gap:6px; width:100%; padding:2px 0; border:0; }
  .onboarding-template-table td[data-th]::before { content:attr(data-th); margin:0; color:#7a8782; font-size:.73rem; font-weight:700; }
  .onboarding-template-table .onboarding-template-delete { position:absolute; top:4px; right:4px; display:block; width:36px; padding:0; }
  .onboarding-template-table .onboarding-template-delete .icon-action { width:36px; min-width:36px; min-height:36px; padding:0; }
  .onboarding-template-add > summary { min-height:44px; }
  .department-meta { display:grid; gap:4px; margin-bottom:8px; }
  .department-meta span { display:grid; grid-template-columns:48px minmax(0,1fr); gap:7px; }
  .department-upload > summary { top:6px; right:6px; width:44px; min-height:44px; }
  .department-upload-form { grid-template-columns:1fr; }
  .department-upload-actions { grid-column:auto; }
  .department-upload-actions .btn { width:100%; }
  .document-page-head { margin-top:8px; }
  .document-list-toolbar { align-items:center; gap:6px; margin-top:4px; }
  .document-quick-filters { min-width:0; flex:1; overflow-x:auto; scrollbar-width:none; }
  .document-quick-filters::-webkit-scrollbar { display:none; }
  .document-quick-filters a { min-width:max-content; flex:1; padding-left:9px; padding-right:9px; }
  .document-filter-form { position:absolute; right:0; width:calc(100vw - 24px); grid-template-columns:1fr; gap:3px; padding:12px; }
  .document-filter-form .btn { width:100%; margin-top:6px; }
  .document-create-pop { position:absolute; top:calc(100% + 4px); right:0; left:auto; width:min(290px,calc(100vw - 24px)); max-height:calc(100dvh - var(--toolbar-height) - 96px); }
  .document-list-card { padding:0; border:0; background:transparent; box-shadow:none; }
  .document-list-table .document-mobile-secondary { display:none !important; }
  .document-list-table tbody tr { padding:12px 13px; }
  .document-list-table td.document-main-cell { display:block; padding:0 0 9px; margin-bottom:4px; border-bottom:1px solid var(--line); }
  .document-list-table td.document-main-cell::before { display:none; }
  .document-list-table .document-main-cell a { font-size:.98rem; line-height:1.35; }
  .document-list-table td[data-th] { grid-template-columns:92px minmax(0,1fr); min-height:30px; padding:4px 0; }
  .document-empty { min-height:160px; padding:24px 12px; border:1px solid var(--line); border-radius:13px; background:#fff; }
  .notification-page-head { margin:2px 0 8px; }
  .notification-page-menu > summary { width:44px; min-height:44px; font-size:1.15rem; }
  .notification-page-menu-pop { position:absolute; top:calc(100% + 4px); right:0; left:auto; width:min(220px,calc(100vw - 24px)); }
  .notification-list { margin:0; border-radius:13px; }
  .notification-item { min-height:76px; gap:9px; padding:12px 11px; }
  .notification-link { gap:7px; }
  .notification-marker { width:23px; height:23px; }
  .notification-body { display:none; }
  .notification-title { overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; font-size:.94rem; }
  .notification-meta { gap:6px; margin-top:6px; font-size:.73rem; white-space:nowrap; }
  .notification-meta time::before, .notification-status::before { margin-right:6px; }
  .notification-chevron { font-size:1.2rem; }
  .regulation-page-head { margin:2px 0 8px; }
  .regulation-page-menu > summary { width:44px; min-height:44px; font-size:1.15rem; }
  .regulation-page-menu > .page-more-menu-pop { position:absolute; top:calc(100% + 4px); right:0; left:auto; width:min(220px,calc(100vw - 24px)); }
  .regulation-list { margin:0; border-radius:13px; }
  .regulation-empty { min-height:160px; padding:24px 12px; }
  .regulation-item { align-items:flex-start; gap:9px; padding:13px 12px; }
  .regulation-actions { align-self:center; }
  .regulation-meta { gap:5px 10px; font-size:.74rem; }
  .regulation-item-menu .page-more-menu-pop { position:absolute; top:calc(100% + 4px); right:0; left:auto; width:min(190px,calc(100vw - 24px)); }
  .kb-library-toolbar { margin:2px 0 8px; }
  .kb-library-menu > summary { width:44px; height:44px; }
  .kb-library-menu > .page-more-menu-pop { top:calc(100% + 4px); right:0; width:min(220px,calc(100vw - 24px)); }
  .kb-library-list { margin:0; border-radius:13px; }
  .kb-library-item { min-height:68px; padding:11px 12px; }
  .kb-library-meta { gap:5px 10px; font-size:.73rem; }
  .kb-library-empty { min-height:160px; padding:24px 12px; }

  /* 品項輸入：手機以分組清單取代寬表格，避免橫向捲動。 */
  .items-block-head { min-height:44px; margin-bottom:6px; }
  .items-block-head .icon-action { width:44px; height:44px; }
  .editable-items-scroll { overflow:visible; margin:0; border-radius:0; }
  .editable-items-scroll #itemsTable { display:block; width:100%; min-width:0; }
  .editable-items-scroll #itemsTable thead { display:none; }
  .editable-items-scroll #itemsTable tbody { display:grid; width:100%; gap:10px; }
  .editable-items-scroll #itemsTable tbody tr {
    position:relative; display:grid; width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px;
    margin:0; padding:42px 12px 12px; border:1px solid var(--line); border-radius:13px; background:#fff;
  }
  .editable-items-scroll #itemsTable td { display:block; width:auto; min-width:0; min-height:0; height:auto; padding:0; border:0; }
  .editable-items-scroll #itemsTable td.item-field-text { grid-column:1/-1; }
  .editable-items-scroll #itemsTable td[data-label]::before {
    content:attr(data-label); display:block; margin:0 0 4px; color:#74817c; font-size:.73rem; font-weight:700;
  }
  .editable-items-scroll #itemsTable input { width:100%; min-width:0; min-height:42px; margin:0; }
  .editable-items-scroll #itemsTable .seq {
    position:absolute; top:13px; left:12px; width:auto; color:var(--text-secondary); font-size:.8rem; font-weight:700;
  }
  .editable-items-scroll #itemsTable .seq::before { content:'品項 '; }
  .editable-items-scroll #itemsTable .item-remove { position:absolute; top:5px; right:5px; width:40px; padding:0; }
  .editable-items-scroll #itemsTable .item-remove .btn {
    width:40px; min-width:40px; min-height:40px; padding:0; border:0; color:#7a8782; background:transparent; font-size:.9rem;
  }
  .editable-items-scroll #itemsTable .subtotal {
    grid-column:1/-1; display:flex; align-items:baseline; justify-content:space-between; min-height:32px;
    padding-top:9px; border-top:1px solid var(--line); text-align:right;
  }
  .editable-items-scroll #itemsTable .subtotal::before { margin:0; }
  .items-block .tax-box { display:grid; gap:12px; padding:12px; margin-top:12px; }
  .items-block .tax-box .inline-label { display:grid; gap:5px; width:100%; margin:0; }
  .items-block .tax-box select { width:100%; }
  .items-block .tax-summary { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; font-size:.84rem; }
  .items-block .tax-summary .grand { grid-column:1/-1; display:flex; justify-content:space-between; padding-top:9px; border-top:1px solid #eadca8; }
  .doc-submit-row { grid-template-columns:96px minmax(0,1fr); }
  .doc-submit-row .btn { width:100%; }
  .readonly-items-scroll { overflow:visible; border-radius:0; }
  .readonly-items-scroll table { display:block; width:100%; min-width:0; }
  .readonly-items-scroll thead { display:none; }
  .readonly-items-scroll tbody { display:grid; width:100%; gap:10px; }
  .readonly-items-scroll tbody tr { display:block; margin:0; padding:11px 12px; border:1px solid var(--line); border-radius:13px; background:#fff; }
  .readonly-items-scroll td { display:grid; width:100%; grid-template-columns:minmax(88px,32%) minmax(0,1fr); gap:8px; min-height:30px; height:auto; padding:5px 0; border:0; }
  .readonly-items-scroll td::before { content:attr(data-th); color:#74817c; font-size:.73rem; font-weight:700; }
  .readonly-items-scroll td:first-child { display:flex; justify-content:space-between; padding:0 0 8px; color:var(--text-secondary); font-size:.8rem; font-weight:700; }
  .readonly-items-scroll td:first-child::before { content:'品項'; }
  .readonly-items-scroll td.num-col { text-align:right; }
  .readonly-items-scroll td:last-child { margin-top:4px; padding-top:9px; border-top:1px solid var(--line); font-weight:700; }
  .detail-tax { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; font-size:.84rem; }
  .detail-tax .grand { grid-column:1/-1; display:flex; justify-content:space-between; padding-top:9px; border-top:1px solid #eadca8; }
}

@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* ===== 帳號管理：摘要優先、低頻操作收合 ===== */
.admin-users-toolbar { margin-bottom:0; }
.admin-users-toolbar .icon-action .ui-icon { width:16px; height:16px; }
.admin-user-create[hidden] { display:none !important; }
.admin-user-create-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.admin-user-create-head h2 { margin:0; }
.admin-user-new-perms { grid-column:1/-1; padding:8px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.admin-user-new-perms > summary,
.admin-user-help > summary { min-height:40px; display:flex; align-items:center; gap:8px; color:var(--mint-deep); font-weight:700; cursor:pointer; list-style:none; }
.admin-user-new-perms > summary::-webkit-details-marker,
.admin-user-help > summary::-webkit-details-marker { display:none; }
.admin-user-new-perms > summary::before,
.admin-user-help > summary::before { content:'›'; color:#81908a; transition:transform .18s ease; }
.admin-user-new-perms[open] > summary::before,
.admin-user-help[open] > summary::before { transform:rotate(90deg); }
.admin-user-new-perms-list { display:grid; gap:7px; padding:7px 0 4px; }
.admin-user-create-actions { grid-column:1/-1; }
.user-mobile-summary { display:none; }
.user-table-scroll td { vertical-align:top; }
.user-cell-stack { min-width:0; display:grid; gap:6px; }
.user-account-fields { display:flex; flex-wrap:wrap; align-items:center; }
.user-account-fields .admin-mark { justify-self:start; }
.user-dept-cell > .user-cell-stack { grid-template-columns:minmax(0,1fr) 30px; align-items:start; }
.user-dept-add { width:30px; min-width:30px; height:30px; min-height:30px; justify-self:start; padding:6px; }
.user-dept-add .ui-icon { width:15px; height:15px; }
.user-row-actions { min-width:112px; position:relative; }
.user-row-actions > .btn-save { width:auto !important; min-width:70px; }
.user-row-actions-more { display:inline-block; position:relative; vertical-align:middle; }
.user-row-actions-more > summary { list-style:none; cursor:pointer; }
.user-row-actions-more > summary::-webkit-details-marker { display:none; }
.user-row-secondary-actions { position:absolute; z-index:40; right:0; bottom:calc(100% + 7px); width:150px; display:grid; gap:5px; padding:7px; border:1px solid var(--line); border-radius:11px; background:#fff; box-shadow:0 12px 28px rgba(37,40,42,.18); }
.user-row-secondary-actions .btn { width:100%; white-space:nowrap; }
.perm-box > summary { display:flex; align-items:center; gap:3px; min-width:0; }
.perm-summary-tail { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-user-help { margin-top:8px; border-top:1px solid var(--line); }
.admin-user-help .hint { margin:0 0 4px; }
.admin-top-roles { padding-top:8px; padding-bottom:8px; }
.admin-top-roles > summary { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; cursor:pointer; }
.admin-top-roles > summary::-webkit-details-marker { display:none; }
.admin-top-roles > summary span { display:flex; align-items:baseline; gap:9px; }
.admin-top-roles > summary small { color:#7a8782; font-size:.76rem; font-weight:500; }
.admin-top-roles-chevron { color:#7a8782; transition:transform .18s ease; }
.admin-top-roles[open] .admin-top-roles-chevron { transform:rotate(90deg); }
.admin-top-roles-body { padding-top:9px; border-top:1px solid var(--line); }

/* 中等寬度不硬塞十欄表格，先顯示一行員工摘要，點開才編輯。 */
@media (max-width:1100px) {
  .user-table-scroll { overflow-x:visible; }
  .user-table-scroll table { display:block; min-width:0; }
  .user-table-scroll thead { display:none; }
  .user-table-scroll tbody { display:block; width:100%; }
  .user-table-scroll tr { display:block; width:100%; margin-bottom:9px; padding:0; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; }
  .user-table-scroll tr:has(.user-row-actions-more[open]) { position:relative; z-index:20; overflow:visible; }
  .user-table-scroll tr > td { width:100%; }
  .user-table-scroll tr > td:not(.user-mobile-summary) { display:none; }
  .user-table-scroll tr.mobile-open > td { height:auto; min-height:48px; }
  .user-table-scroll tr.mobile-open > td[data-th] { display:grid; grid-template-columns:minmax(110px,22%) minmax(0,1fr); gap:10px; align-items:start; }
  .user-table-scroll tr.mobile-open > td[data-th]::before { content:attr(data-th); margin:0; padding-top:7px; color:#74817c; font-size:.76rem; font-weight:700; line-height:1.35; }
  .user-table-scroll tr.mobile-open > td[data-th] > input,
  .user-table-scroll tr.mobile-open > td[data-th] > .user-cell-stack,
  .user-table-scroll tr.mobile-open > td[data-th] > details { width:100%; max-width:560px; }
  .user-table-scroll tr.mobile-open > td[data-th] input:not([type="checkbox"]),
  .user-table-scroll tr.mobile-open > td[data-th] select { width:100%; max-width:100%; }
  .user-table-scroll tr.mobile-open .user-account-fields { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; }
  .user-table-scroll tr.mobile-open .user-account-fields .admin-mark { margin:0; }
  .user-table-scroll tr.mobile-open > .user-dept-cell > .user-cell-stack { display:contents; }
  .user-table-scroll tr.mobile-open > .user-dept-cell::before { grid-column:1; grid-row:1; }
  .user-table-scroll tr.mobile-open > .user-dept-cell > .user-cell-stack > .dept-rows { grid-column:2; grid-row:1; min-width:0; }
  .user-table-scroll tr.mobile-open > .user-dept-cell .user-dept-add { grid-column:1; grid-row:1; align-self:start; justify-self:start; margin:1px 0 0 72px; }
  .user-table-scroll tr.mobile-open > td.actions { display:flex; }
  .user-table-scroll tr.mobile-open > .status-cell { display:none !important; }
  .user-table-scroll .user-mobile-summary { display:block !important; min-height:0; padding:0; }
  .user-row-toggle { width:100%; min-height:52px; display:grid; grid-template-columns:minmax(0,1fr) auto 20px; align-items:center; gap:9px; padding:9px 13px; border:0; background:transparent; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
  .user-summary-copy { min-width:0; display:flex; align-items:baseline; gap:10px; }
  .user-summary-copy strong { flex:0 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.98rem; }
  .user-summary-copy small { flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.76rem; }
  .user-summary-status { min-width:42px; padding:3px 8px; border-radius:999px; color:#69736f; background:#eef1f0; font-size:.72rem; font-weight:700; text-align:center; }
  .user-summary-status.is-active { color:var(--mint-deep); background:var(--mint-tint); }
  .user-summary-chevron { color:#7a8782; transition:transform .18s ease; }
  .user-row-toggle[aria-expanded="true"] .user-summary-chevron { transform:rotate(90deg); }
  .user-table-scroll tr.mobile-open > td:not(.user-mobile-summary) { padding-left:13px; padding-right:13px; }
  .user-table-scroll tr.mobile-open > td:nth-last-child(2) { padding-bottom:9px; }
  .user-table-scroll tr.mobile-open > .user-row-actions { align-items:flex-start; justify-content:flex-end; gap:8px; padding:10px 13px 12px; border-top:1px solid var(--line); }
  .user-row-actions-more { margin-left:auto; }
  .user-row-secondary-actions { min-width:132px; }
}

@media (max-width:680px) {
  .adminnav { flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x proximity; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  .adminnav::-webkit-scrollbar { display:none; }
  .adminnav a { flex:0 0 auto; scroll-snap-align:start; white-space:nowrap; }
  .admin-user-create { scroll-margin-top:64px; }
  .admin-user-create .grid-form { gap:8px; }
  .admin-user-create-actions .btn { flex:1; }
  .user-table-scroll table { min-width:0; }
  .user-table-scroll tr { padding:0; overflow:hidden; }
  .user-table-scroll tr > td:not(.user-mobile-summary) { display:none; }
  .user-table-scroll tr.mobile-open > td[data-th] { display:grid; }
  .user-table-scroll tr.mobile-open > td.actions { display:flex; }
  .user-table-scroll .user-mobile-summary { display:block !important; min-height:0; padding:0; }
  .user-row-toggle { width:100%; min-height:72px; display:grid; grid-template-columns:minmax(0,1fr) auto 20px; align-items:center; gap:9px; padding:12px; border:0; background:transparent; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
  .user-summary-copy { min-width:0; display:grid; gap:2px; }
  .user-summary-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.98rem; }
  .user-summary-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.76rem; }
  .user-summary-status { min-width:42px; padding:3px 8px; border-radius:999px; color:#69736f; background:#eef1f0; font-size:.72rem; font-weight:700; text-align:center; }
  .user-summary-status.is-active { color:var(--mint-deep); background:var(--mint-tint); }
  .user-summary-chevron { color:#7a8782; transition:transform .18s ease; }
  .user-row-toggle[aria-expanded="true"] .user-summary-chevron { transform:rotate(90deg); }
  .user-table-scroll tr.mobile-open > td:not(.user-mobile-summary) { padding-left:12px; padding-right:12px; }
  .user-table-scroll tr.mobile-open > td:nth-last-child(2) { padding-bottom:9px; }
  .user-table-scroll tr.mobile-open > .user-row-actions { align-items:flex-start; justify-content:flex-end; gap:8px; padding:10px 12px 12px; border-top:1px solid var(--line); }
  .user-row-actions-more { margin-left:auto; }
  .user-row-secondary-actions { min-width:132px; }
  .admin-top-roles > summary { min-height:48px; }
  .admin-top-roles-body .grid-form { gap:8px; }
}

/* ===== 部門管理：摘要優先、設定按需展開 ===== */
.admin-departments-toolbar { margin-bottom:0; }
.admin-departments-toolbar .icon-action .ui-icon { width:16px; height:16px; }
.department-create-panel[hidden] { display:none !important; }
.department-create-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.department-create-head h2 { margin:0; }
.department-mobile-summary { display:none; }
.department-table-scroll table { min-width:1120px; }
.department-table-scroll td { vertical-align:top; }
.department-name-field { min-width:0; display:flex; align-items:center; gap:4px; }
.department-name-field input { min-width:0; }
.department-color-field { display:flex; align-items:center; gap:8px; }
.department-table-scroll input[type="checkbox"] { width:18px; min-width:18px; height:18px; min-height:18px; margin:2px 0; padding:0; }
.department-help { margin-top:8px; }

@media (max-width:1100px) {
  .department-table-scroll { overflow-x:visible; }
  .department-table-scroll table { display:block; min-width:0; }
  .department-table-scroll thead { display:none; }
  .department-table-scroll tbody { display:block; width:100%; }
  .department-table-scroll tr { display:block; width:100%; margin-bottom:9px; padding:0; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; }
  .department-table-scroll tr:has(.user-row-actions-more[open]) { position:relative; z-index:20; overflow:visible; }
  .department-table-scroll tr > td { width:100%; }
  .department-table-scroll tr > td:not(.department-mobile-summary) { display:none; }
  .department-table-scroll tr.mobile-open > td { height:auto; min-height:48px; }
  .department-table-scroll tr.mobile-open > td[data-th] { display:grid; grid-template-columns:minmax(110px,22%) minmax(0,1fr); gap:10px; align-items:start; padding:7px 13px; }
  .department-table-scroll tr.mobile-open > td[data-th]::before { content:attr(data-th); margin:0; padding-top:7px; color:#74817c; font-size:.76rem; font-weight:700; line-height:1.35; }
  .department-table-scroll tr.mobile-open > td.center { text-align:left; }
  .department-table-scroll tr.mobile-open > td.center::before { text-align:left; }
  .department-table-scroll tr.mobile-open > td.center > input[type="checkbox"] { align-self:start; justify-self:start; margin-top:7px; }
  .department-table-scroll tr.mobile-open > td[data-th] > input:not([type="checkbox"]):not([type="color"]),
  .department-table-scroll tr.mobile-open > td[data-th] > select,
  .department-table-scroll tr.mobile-open > td[data-th] > .department-name-field,
  .department-table-scroll tr.mobile-open > td[data-th] > .department-color-field { width:100%; max-width:560px; }
  .department-table-scroll tr.mobile-open > td[data-th] select,
  .department-table-scroll tr.mobile-open .department-name-field input { width:100% !important; max-width:100%; }
  .department-table-scroll tr.mobile-open > td.actions { display:flex; }
  .department-table-scroll tr.mobile-open > .status-cell { display:none !important; }
  .department-table-scroll .department-mobile-summary { display:block !important; min-height:0; height:auto; padding:0; }
  .department-row-toggle { width:100%; min-height:52px; display:grid; grid-template-columns:minmax(0,1fr) auto 20px; align-items:center; gap:9px; padding:9px 13px; border:0; background:transparent; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
  .department-summary-copy { min-width:0; display:flex; align-items:baseline; gap:10px; }
  .department-summary-copy strong { flex:0 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.98rem; }
  .department-summary-copy small { flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.76rem; }
  .department-summary-status { min-width:42px; padding:3px 8px; border-radius:999px; color:#69736f; background:#eef1f0; font-size:.72rem; font-weight:700; text-align:center; }
  .department-summary-status.is-active { color:var(--mint-deep); background:var(--mint-tint); }
  .department-summary-chevron { color:#7a8782; transition:transform .18s ease; }
  .department-row-toggle[aria-expanded="true"] .department-summary-chevron { transform:rotate(90deg); }
  .department-table-scroll tr.mobile-open > .department-row-actions { align-items:flex-start; justify-content:flex-end; gap:8px; padding:10px 13px 12px; border-top:1px solid var(--line); }
  .department-create-panel { scroll-margin-top:64px; }
}

@media (max-width:680px) {
  .department-create-panel .inline-form { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .department-create-panel .inline-form > input,
  .department-create-panel .inline-form > select { grid-column:1/-1; width:100%; }
  .department-create-panel .inline-form > .btn { width:100%; }
  .department-row-toggle { min-height:72px; padding:12px; }
  .department-summary-copy { display:grid; align-items:initial; gap:2px; }
  .department-table-scroll tr.mobile-open > td[data-th] { grid-template-columns:110px minmax(0,1fr); padding-left:12px; padding-right:12px; }
  .department-table-scroll tr.mobile-open > .department-row-actions { padding-left:12px; padding-right:12px; }
}

/* ===== 表單管理：半寬與手機改為摘要列 ===== */
.admin-formtypes-toolbar { margin-bottom:0; }
.admin-formtypes-toolbar .icon-action .ui-icon { width:16px; height:16px; }
.formtype-mobile-summary { display:none; }
.formtype-used-note { display:block; padding:8px 10px; color:#7a8782; font-size:.76rem; line-height:1.4; }
.formtype-card-menu .danger-text { color:#a33b35; }

@media (max-width:1100px) {
  .formtype-table-scroll { overflow:visible; }
  .formtype-table-scroll table { display:block; min-width:0; }
  .formtype-table-scroll thead { display:none; }
  .formtype-table-scroll tbody { display:grid; width:100%; gap:9px; }
  .formtype-table-scroll tr { display:block; width:100%; margin:0; padding:0; overflow:visible; border:1px solid var(--line); border-radius:12px; background:#fff; }
  .formtype-table-scroll tr > td:not(.formtype-mobile-summary) { display:none; }
  .formtype-table-scroll .formtype-mobile-summary { display:block; width:100%; height:auto; min-height:0; padding:0; border:0; }
  .formtype-summary-row { display:grid; grid-template-columns:minmax(0,1fr) auto 40px; align-items:center; gap:9px; min-height:64px; padding:9px 9px 9px 13px; }
  .formtype-summary-main { min-width:0; display:grid; gap:2px; color:var(--ink); }
  .formtype-summary-main:hover { text-decoration:none; }
  .formtype-summary-main strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.98rem; }
  .formtype-summary-main small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.76rem; }
  .formtype-summary-status { min-width:42px; padding:3px 8px; border-radius:999px; color:#69736f; background:#eef1f0; font-size:.72rem; font-weight:700; text-align:center; }
  .formtype-summary-status.is-active { color:var(--mint-deep); background:var(--mint-tint); }
  .formtype-card-menu { justify-self:end; }
  .formtype-card-menu > summary { width:36px; height:36px; min-width:36px; min-height:36px; }
  .formtype-card-menu > summary .ui-icon { width:18px; height:18px; }
  .formtype-card-menu .page-more-menu-pop { top:calc(100% + 4px); right:0; width:190px; }
}

@media (max-width:680px) {
  .formtype-summary-row { min-height:70px; grid-template-columns:minmax(0,1fr) auto 40px; padding:10px 8px 10px 12px; }
}

/* ===== 表單編輯：半寬兩欄、欄位設定卡片化 ===== */
.formtype-edit-page-title { margin-bottom:8px; }
.formtype-items-toggle { min-height:44px; display:flex; align-items:center; gap:9px; margin:4px 0; line-height:1.45; }
.formtype-items-toggle input[type="checkbox"] { width:18px; min-width:18px; height:18px; min-height:18px; flex:none; margin:0; padding:0; }
.formtype-fields-head { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:18px; }
.formtype-fields-head h2 { margin:0; }
.formtype-fields-head .icon-action { width:34px; min-width:34px; height:34px; min-height:34px; }
.formtype-fields-head .icon-action .ui-icon { width:16px; height:16px; }
.formtype-field-remove { width:32px; min-width:32px; height:32px; min-height:32px; padding:7px; color:#7a8782; }
.formtype-field-remove .ui-icon { width:15px; height:15px; }

@media (max-width:1100px) {
  .formtype-settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; }
  .formtype-category-field,
  .formtype-items-toggle { grid-column:1/-1; }
  #fieldTable { display:block; min-width:0; }
  #fieldTable thead { display:none; }
  #fieldTable tbody { display:grid; width:100%; gap:10px; }
  #fieldTable tbody tr { position:relative; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px; gap:9px 14px; width:100%; margin:0; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:#fff; }
  #fieldTable tbody td { display:grid; width:100%; height:auto; min-height:0; gap:4px; padding:0; border:0; text-align:left; }
  #fieldTable tbody td[data-th]::before { content:attr(data-th); color:#74817c; font-size:.73rem; font-weight:700; line-height:1.3; }
  #fieldTable tbody td:nth-child(1) { grid-column:1; grid-row:1; }
  #fieldTable tbody td:nth-child(2) { grid-column:2; grid-row:1; }
  #fieldTable tbody td:nth-child(3) { grid-column:1; grid-row:2; align-content:start; }
  #fieldTable tbody td:nth-child(4) { grid-column:2; grid-row:2; }
  #fieldTable tbody .formtype-field-actions { grid-column:3; grid-row:1/3; align-content:start; justify-items:end; }
  #fieldTable tbody input:not([type="checkbox"]),
  #fieldTable tbody select { width:100%; min-width:0; margin:0; }
  #fieldTable tbody input[type="checkbox"] { width:18px; min-width:18px; height:18px; min-height:18px; margin:7px 0 0; padding:0; }
}

@media (max-width:680px) {
  .formtype-settings-grid { grid-template-columns:1fr; gap:7px; }
  .formtype-category-field,
  .formtype-items-toggle { grid-column:auto; }
  #fieldTable tbody tr { grid-template-columns:minmax(0,1fr) 40px; gap:9px; }
  #fieldTable tbody td:nth-child(1) { grid-column:1; grid-row:1; }
  #fieldTable tbody td:nth-child(2) { grid-column:1; grid-row:2; }
  #fieldTable tbody td:nth-child(3) { grid-column:1; grid-row:3; }
  #fieldTable tbody td:nth-child(4) { grid-column:1; grid-row:4; }
  #fieldTable tbody .formtype-field-actions { grid-column:2; grid-row:1/3; }
}

/* ===== 專案管理：摘要優先、低頻操作收進更多選單 ===== */
.admin-projects-toolbar { margin-bottom:0; }
.admin-projects-toolbar .icon-action .ui-icon { width:16px; height:16px; }
.project-create-panel[hidden] { display:none !important; }
.project-create-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.project-create-head h2 { margin:0; }
.project-mobile-summary { display:none; }
.project-help { margin-top:8px; }

@media (max-width:1100px) {
  .project-table-scroll { overflow:visible; }
  .project-table-scroll table { display:block; min-width:0; }
  .project-table-scroll thead { display:none; }
  .project-table-scroll tbody { display:block; width:100%; }
  .project-table-scroll tr { display:block; width:100%; margin-bottom:9px; padding:0; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; }
  .project-table-scroll tr:has(.user-row-actions-more[open]) { position:relative; z-index:20; overflow:visible; }
  .project-table-scroll tr > td { width:100%; }
  .project-table-scroll tr > td:not(.project-mobile-summary) { display:none; }
  .project-table-scroll tr.mobile-open > td { height:auto; min-height:48px; }
  .project-table-scroll tr.mobile-open > td[data-th] { display:grid; grid-template-columns:minmax(110px,22%) minmax(0,1fr); gap:10px; align-items:center; padding:7px 13px; }
  .project-table-scroll tr.mobile-open > td[data-th]::before { content:attr(data-th); margin:0; color:#74817c; font-size:.76rem; font-weight:700; line-height:1.35; }
  .project-table-scroll tr.mobile-open > td[data-th] > input { width:100%; max-width:560px; }
  .project-table-scroll tr.mobile-open > td.num-col { text-align:left; }
  .project-table-scroll tr.mobile-open > td.num-col::before { text-align:left; }
  .project-table-scroll tr.mobile-open > td.actions { display:flex; }
  .project-table-scroll tr.mobile-open > .status-cell { display:none !important; }
  .project-table-scroll .project-mobile-summary { display:block !important; min-height:0; height:auto; padding:0; }
  .project-row-toggle { width:100%; min-height:52px; display:grid; grid-template-columns:minmax(0,1fr) auto 20px; align-items:center; gap:9px; padding:9px 13px; border:0; background:transparent; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
  .project-summary-copy { min-width:0; display:flex; align-items:baseline; gap:10px; }
  .project-summary-copy strong { flex:0 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.98rem; }
  .project-summary-copy small { flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.76rem; }
  .project-summary-status { min-width:54px; padding:3px 8px; border-radius:999px; color:#69736f; background:#eef1f0; font-size:.72rem; font-weight:700; text-align:center; white-space:nowrap; }
  .project-summary-status.is-active { color:var(--mint-deep); background:var(--mint-tint); }
  .project-summary-chevron { color:#7a8782; transition:transform .18s ease; }
  .project-row-toggle[aria-expanded="true"] .project-summary-chevron { transform:rotate(90deg); }
  .project-table-scroll tr.mobile-open > .project-row-actions { align-items:flex-start; justify-content:flex-end; gap:8px; padding:10px 13px 12px; border-top:1px solid var(--line); }
  .project-create-panel { scroll-margin-top:64px; }
}

@media (max-width:680px) {
  .project-create-panel .inline-form { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .project-create-panel .inline-form > input { grid-column:1/-1; width:100%; }
  .project-create-panel .inline-form > .btn { width:100%; }
  .project-row-toggle { min-height:72px; padding:12px; }
  .project-summary-copy { display:grid; align-items:initial; gap:2px; }
  .project-table-scroll tr.mobile-open > td[data-th] { grid-template-columns:88px minmax(0,1fr); padding-left:12px; padding-right:12px; }
  .project-table-scroll tr.mobile-open > .project-row-actions { padding-left:12px; padding-right:12px; }
}

/* ===== 公司資料：半寬與手機以公司摘要開啟編輯 ===== */
.company-row-toggle { display:none; }
.company-help { margin-top:10px; }

@media (max-width:1100px) {
  .company-card { padding:0; overflow:hidden; }
  .company-row-toggle { width:100%; min-height:64px; display:grid; grid-template-columns:minmax(0,1fr) auto 20px; align-items:center; gap:9px; padding:10px 13px; border:0; background:transparent; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
  .company-summary-copy { min-width:0; display:flex; align-items:baseline; gap:10px; }
  .company-summary-copy strong { flex:0 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.98rem; }
  .company-summary-copy small { flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.76rem; }
  .company-default-tag { margin:0; white-space:nowrap; }
  .company-summary-chevron { color:#7a8782; transition:transform .18s ease; }
  .company-row-toggle[aria-expanded="true"] .company-summary-chevron { transform:rotate(90deg); }
  .company-desktop-title,
  .company-card > form { display:none; }
  .company-card.mobile-open > form { display:grid; margin:0; padding:12px 13px 14px; border-top:1px solid var(--line); }
  .company-card.mobile-open > form > button[type="submit"] { justify-self:start; min-width:88px; }
}

@media (max-width:680px) {
  .company-row-toggle { min-height:72px; padding:12px; }
  .company-summary-copy { display:grid; align-items:initial; gap:2px; }
  .company-card.mobile-open > form { gap:8px; padding:12px; }
  .company-card.mobile-open > form > button[type="submit"] { width:100%; }
}

/* ===== 固定支出：新增表單按需展開，項目以摘要顯示 ===== */
.admin-recurring-toolbar { margin-bottom:0; }
.admin-recurring-toolbar .icon-action .ui-icon { width:16px; height:16px; }
.recurring-create-panel[hidden] { display:none !important; }
.recurring-create-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.recurring-create-head h2 { margin:0; }
.recurring-mobile-summary { display:none; }
.recurring-help { margin-top:10px; }
.recurring-filter-bar { display:flex; align-items:center; justify-content:flex-end; gap:9px; margin:12px 0 10px; }
.recurring-filter-bar label { margin:0; color:#52605b; font-size:.82rem; font-weight:700; }
.recurring-filter-bar select { width:auto; min-width:180px; margin:0; }
.recurring-category-tag { color:#355c54; background:#eef8f5; }
.recurring-desktop-menu .page-more-menu-pop { right:0; width:220px; }
.recurring-card-menu .danger-text,
.recurring-desktop-menu .danger-text { color:#a33b35; }
.recurring-category-editor { display:grid; gap:4px; padding:7px 10px 5px; color:#52605b; font-size:.76rem; font-weight:700; }
.recurring-category-editor select { width:100%; margin:0; padding:7px 8px; font-size:.82rem; }
.recurring-create-panel .item-remove .ui-icon { width:15px; height:15px; }
.recurring-primary-grid { align-items:start; }
.recurring-draft-notice { display:flex; align-items:center; justify-content:space-between; gap:18px; border-color:var(--mint); background:var(--mint-tint); }
.recurring-draft-notice h2 { margin:0 0 4px; }
.recurring-draft-notice p { margin:0; color:#52605b; }
.recurring-draft-notice .btn { flex:0 0 auto; }
.recurring-draft-form-note { border-color:var(--mint); background:var(--mint-tint); }

@media (max-width:1100px) {
  .recurring-table-scroll { overflow:visible; }
  .recurring-table-scroll table { display:block; min-width:0; }
  .recurring-table-scroll thead { display:none; }
  .recurring-table-scroll tbody { display:grid; width:100%; gap:9px; }
  .recurring-table-scroll tr { display:block; width:100%; margin:0; padding:0; overflow:visible; border:1px solid var(--line); border-radius:12px; background:#fff; }
  .recurring-table-scroll tr[hidden] { display:none !important; }
  .recurring-table-scroll tr > td:not(.recurring-mobile-summary) { display:none; }
  .recurring-table-scroll .recurring-mobile-summary { display:block; width:100%; height:auto; min-height:0; padding:0; border:0; }
  .recurring-summary-row { display:grid; grid-template-columns:minmax(0,1fr) auto 40px; align-items:center; gap:9px; min-height:64px; padding:9px 9px 9px 13px; }
  .recurring-summary-copy { min-width:0; display:grid; gap:2px; }
  .recurring-summary-title { min-width:0; display:flex; align-items:center; gap:7px; }
  .recurring-summary-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.98rem; }
  .recurring-summary-title .recurring-category-tag { flex:none; max-width:120px; overflow:hidden; text-overflow:ellipsis; }
  .recurring-summary-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.76rem; }
  .recurring-summary-status { min-width:42px; padding:3px 8px; border-radius:999px; color:#69736f; background:#eef1f0; font-size:.72rem; font-weight:700; text-align:center; }
  .recurring-summary-status.is-active { color:var(--mint-deep); background:var(--mint-tint); }
  .recurring-card-menu { justify-self:end; }
  .recurring-card-menu > summary { width:36px; height:36px; min-width:36px; min-height:36px; }
  .recurring-card-menu > summary .ui-icon { width:18px; height:18px; }
  .recurring-card-menu .page-more-menu-pop { top:calc(100% + 4px); right:0; width:220px; }
  .recurring-desktop-menu { display:none; }
  .recurring-create-panel { scroll-margin-top:64px; }
}

@media (max-width:680px) {
  .recurring-filter-bar { display:grid; grid-template-columns:1fr; align-items:stretch; }
  .recurring-filter-bar select { width:100%; min-width:0; }
  .recurring-draft-notice { align-items:stretch; flex-direction:column; gap:12px; }
  .recurring-draft-notice .btn { width:100%; text-align:center; }
  .recurring-summary-row { min-height:70px; padding:10px 8px 10px 12px; }
  .recurring-create-panel .grid-form { gap:8px; }
  .recurring-create-panel .btn-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .recurring-create-panel .btn-row .btn { width:100%; }
}

/* ===== 系統設定：依功能分組按需展開 ===== */
.settings-section { padding:0; overflow:hidden; }
.settings-section-summary { min-height:64px; display:grid; grid-template-columns:minmax(0,1fr) 20px; align-items:center; gap:12px; padding:11px 16px; list-style:none; cursor:pointer; }
.settings-section-summary::-webkit-details-marker { display:none; }
.settings-section-summary > span { min-width:0; display:grid; gap:2px; }
.settings-section-summary strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:1rem; }
.settings-section-summary small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.76rem; font-weight:500; }
.settings-section-chevron { color:#7a8782; transition:transform .18s ease; }
.settings-section[open] .settings-section-chevron { transform:rotate(90deg); }
.settings-section-body { padding:14px 16px 16px; border-top:1px solid var(--line); }
.settings-section-body > :first-child { margin-top:0; }
.settings-section-body > :last-child { margin-bottom:0; }
.settings-section-body .grid-form { align-items:start; }
.settings-checkbox-row { min-height:44px; display:flex; align-items:center; gap:9px; margin-top:10px; }
.settings-checkbox-row input[type="checkbox"] { width:18px; min-width:18px; height:18px; min-height:18px; flex:none; margin:0; padding:0; }
.settings-section-body code { overflow-wrap:anywhere; }

@media (max-width:680px) {
  .settings-section-summary { min-height:70px; padding:12px; }
  .settings-section-body { padding:12px; }
  .settings-section-body .grid-form { gap:8px; }
  .settings-section-body > .btn,
  .settings-section-body > .btn-row .btn { width:100%; }
}

/* ===== 操作日誌：半寬與手機使用雙行摘要 ===== */
.audit-mobile-summary { display:none; }

@media (max-width:1100px) {
  .audit-table-scroll { overflow:visible; }
  .audit-table-scroll table { display:block; min-width:0; }
  .audit-table-scroll thead { display:none; }
  .audit-table-scroll tbody { display:grid; width:100%; gap:0; }
  .audit-table-scroll tr { display:block; width:100%; margin:0; padding:0; border:0; border-bottom:1px solid var(--line); background:transparent; }
  .audit-table-scroll tr:last-child { border-bottom:0; }
  .audit-table-scroll tr > td:not(.audit-mobile-summary) { display:none; }
  .audit-table-scroll .audit-mobile-summary { display:block; width:100%; height:auto; min-height:0; padding:0; border:0; }
  .audit-summary-row { min-height:64px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; padding:10px 2px; }
  .audit-summary-copy { min-width:0; display:grid; gap:3px; }
  .audit-summary-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.92rem; font-weight:650; }
  .audit-summary-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.73rem; }
  .audit-doc-link { min-width:38px; min-height:32px; display:inline-flex; align-items:center; justify-content:center; padding:5px 8px; border-radius:999px; color:var(--mint-deep); background:var(--mint-tint); font-size:.76rem; font-weight:700; }
  .audit-doc-link:hover { text-decoration:none; }
}

@media (max-width:680px) {
  .audit-summary-row { min-height:68px; padding:10px 0; }
}

/* ===== 報表：半寬與手機以摘要列顯示結果 ===== */
.report-project-mobile-summary,
.report-record-mobile-summary { display:none; }

@media (max-width:1100px) {
  .report-filter-card { padding:6px 14px; }
  .report-filter-card > summary { min-height:50px; display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; cursor:pointer; }
  .report-filter-card > summary::-webkit-details-marker { display:none; }
  .report-filter-card > summary > span { display:grid; gap:2px; }
  .report-filter-card > summary small { color:var(--muted); font-size:.78rem; font-weight:400; }
  .report-filter-card > summary .ui-icon { width:16px; height:16px; flex:none; color:var(--mint-deep); transition:transform .18s ease; }
  .report-filter-card[open] > summary { border-bottom:1px solid var(--line); }
  .report-filter-card[open] > summary .ui-icon { transform:rotate(90deg); }
  .report-filter-form { padding:12px 0 8px; }
  .report-filter-fields { grid-template-columns:1fr; gap:12px; }
  .report-date-grid,
  .report-select-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .report-filter-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .report-filter-actions .plain-action { grid-column:1/-1; justify-self:end; min-height:34px; }
  .report-filter-actions .btn { width:100%; text-align:center; }
  .report-project-table-scroll,
  .report-record-table-scroll { overflow:visible; }
  .report-project-table-scroll table,
  .report-record-table-scroll table { display:block; min-width:0; }
  .report-project-table-scroll thead,
  .report-record-table-scroll thead { display:none; }
  .report-project-table-scroll tbody,
  .report-record-table-scroll tbody { display:grid; width:100%; gap:0; }
  .report-project-table-scroll tr,
  .report-record-table-scroll tr { display:block; width:100%; margin:0; padding:0; border:0; border-bottom:1px solid var(--line); background:transparent; }
  .report-project-table-scroll tr:last-child,
  .report-record-table-scroll tr:last-child { border-bottom:0; }
  .report-project-table-scroll tr > td:not(.report-project-mobile-summary),
  .report-record-table-scroll tr > td:not(.report-record-mobile-summary) { display:none; }
  .report-project-table-scroll .report-project-mobile-summary,
  .report-record-table-scroll .report-record-mobile-summary { display:block; width:100%; height:auto; min-height:0; padding:0; border:0; }
  .report-project-summary-row { min-height:64px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; padding:10px 2px; }
  .report-project-summary-row > span { min-width:0; display:grid; gap:3px; }
  .report-project-summary-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.92rem; }
  .report-project-summary-row small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.73rem; }
  .report-project-summary-row b { white-space:nowrap; font-size:.84rem; }
  .report-record-summary-row { min-height:72px; display:grid; grid-template-columns:minmax(0,1fr) auto 20px; align-items:center; gap:10px; padding:10px 2px; color:var(--ink); }
  .report-record-summary-row:hover { text-decoration:none; }
  .report-record-summary-copy { min-width:0; display:grid; gap:3px; }
  .report-record-summary-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.94rem; }
  .report-record-summary-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#74817c; font-size:.72rem; }
  .report-record-summary-side { display:grid; justify-items:end; gap:4px; }
  .report-record-summary-side small { color:#69736f; font-size:.72rem; white-space:nowrap; }
  .report-record-chevron { color:#7a8782; }
}

@media (max-width:680px) {
  .report-record-summary-row { grid-template-columns:minmax(0,1fr) auto 18px; padding:10px 0; }
  .report-project-summary-row { padding:10px 0; }
}

/* ===== 本週計畫：多則期限提醒合併顯示 ===== */
.weekly-warning-group { margin:10px 0; overflow:hidden; border:1px solid #f2c7c3; border-radius:12px; background:#fff1f0; }
.weekly-warning-group > summary { min-height:58px; display:grid; grid-template-columns:minmax(0,1fr) 20px; align-items:center; gap:12px; padding:10px 14px; color:#a33b35; list-style:none; cursor:pointer; }
.weekly-warning-group > summary::-webkit-details-marker { display:none; }
.weekly-warning-group > summary > span { min-width:0; display:grid; gap:2px; }
.weekly-warning-group > summary strong { font-size:.94rem; }
.weekly-warning-group > summary small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#a85b55; font-size:.76rem; font-weight:500; }
.weekly-warning-chevron { transition:transform .18s ease; }
.weekly-warning-group[open] .weekly-warning-chevron { transform:rotate(90deg); }
.weekly-warning-list { padding:0 14px 10px; border-top:1px solid #f2c7c3; }
.weekly-warning-list p { margin:0; padding:10px 0; color:#8f3631; border-bottom:1px solid #f2d4d1; font-size:.86rem; line-height:1.5; }
.weekly-warning-list p:last-child { border-bottom:0; }

@media (max-width:680px) {
  .weekly-warning-group > summary { min-height:62px; padding:10px 12px; }
  .weekly-warning-list { padding-left:12px; padding-right:12px; }
}

/* ===== 任務委派：新增表單由工具列開啟 ===== */
.work-delegation-create[hidden] { display:none !important; }
.work-delegation-create-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.work-delegation-create-head h2 { margin:0; }
.work-delegation-create { scroll-margin-top:64px; }

@media (max-width:680px) {
  .work-delegation-create .grid-form { gap:8px; }
  .work-delegation-create .btn-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .work-delegation-create .btn-row .btn { width:100%; }
}

/* ===== 例行工作：建立表單與休假日設定按需展開 ===== */
.routine-create-panel[hidden] { display:none !important; }
.routine-create-panel { scroll-margin-top:64px; }
.routine-create-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.routine-create-head h2 { margin:0; }
.inline-create-head { min-height:40px; display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.inline-create-head :is(h2, h3) { margin:0; }
.inline-create-head .icon-action { margin-left:auto; }

@media (max-width:680px) {
  .routine-create-panel .grid-form { gap:8px; }
  .routine-create-panel .btn-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .routine-create-panel .btn-row .btn { width:100%; }
  .routine-holidays .inline-form { display:grid; grid-template-columns:1fr; gap:8px; }
  .routine-holidays .inline-form > * { width:100%; }
}

/* ===== 共用成員勾選清單：勾選框與姓名保持同列 ===== */
.member-checklist { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:0; }
.member-checklist .member-check { min-width:0; min-height:44px; display:flex; align-items:center; gap:9px; margin:0; padding:8px 10px; line-height:1.4; }
.member-checklist .member-check input[type="checkbox"] { width:18px; min-width:18px; height:18px; min-height:18px; flex:none; margin:0; padding:0; }

/* 部門文件：展開上傳表單後，新增符號轉為清楚的收起符號。 */
.department-upload > summary .ui-icon { transition:transform .18s ease; }
.department-upload[open] > summary .ui-icon { transform:rotate(45deg); }

@media (max-width:680px) {
  .member-checklist { grid-template-columns:1fr; }
  .member-checklist .member-check { min-height:48px; }
}
/* ===== A5 出勤結算：摘要、覆核面板與手機單欄 ===== */
.attendance-settlement-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 16px; }
.attendance-settlement-summary .card { min-height:96px; display:grid; align-content:center; gap:4px; margin:0; padding:16px 18px; }
.attendance-settlement-summary span { color:var(--muted); font-size:.82rem; }
.attendance-settlement-summary strong { color:var(--ink); font-size:1.65rem; line-height:1; }
.attendance-settlement-filter { margin-bottom:14px; }
.attendance-recalculate-form { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:14px; border-top:1px solid var(--line); }
.attendance-recalculate-form p { margin:0; }
.attendance-settlement-abnormal { background:#fffaf9; }
.attendance-tag-leave { background:#eef8f5; color:#2d685c; }
.attendance-time-pair { display:block; white-space:nowrap; }
.attendance-review-menu { position:relative; min-width:82px; }
.attendance-review-menu > summary { list-style:none; cursor:pointer; }
.attendance-review-menu > summary::-webkit-details-marker { display:none; }
.attendance-review-panel { width:min(360px,calc(100vw - 40px)); display:grid; gap:10px; position:absolute; z-index:15; right:0; top:calc(100% + 6px); padding:12px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 12px 30px rgba(37,40,42,.14); }
.attendance-review-panel form { display:grid; gap:8px; margin:0; }
.attendance-review-panel label { margin:0; }

@media (max-width:958px) {
  .attendance-settlement-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .attendance-review-panel { width:min(280px,calc(100vw - 40px)); position:static; margin-top:8px; }
}

@media (max-width:680px) {
  .attendance-settlement-summary { gap:8px; }
  .attendance-settlement-summary .card { min-height:82px; padding:13px 14px; }
  .attendance-settlement-summary strong { font-size:1.4rem; }
  .attendance-settlement-filter { grid-template-columns:1fr; }
  .attendance-settlement-filter > * { width:100%; }
  .attendance-recalculate-form { align-items:stretch; flex-direction:column; }
  .attendance-recalculate-form .btn { width:100%; }
  .attendance-settlement-list .table-scroll { overflow:visible; }
  .attendance-review-panel { width:100%; }
  .attendance-review-panel .btn-row { display:grid; grid-template-columns:1fr; }
  .attendance-review-panel .btn { width:100%; min-height:44px; }
}
/* 巔峰盃專案：延續工作中心卡片語言，手機優先。 */
.peak-period-grid,.peak-template-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}
.peak-period-card{display:block;padding:18px;border:1px solid var(--line,#ddd);border-radius:14px;color:inherit;text-decoration:none;background:#fff}
.peak-period-card>div{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.peak-period-card p{margin:10px 0 0}.peak-period-card.is-archived{opacity:.66}
.peak-checklist{display:grid;gap:10px}.peak-check{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:12px;align-items:center;padding:14px;border:1px solid var(--line,#ddd);border-radius:12px}.peak-check.is-done{background:#f4faf8}.peak-check p{margin:4px 0 0}.peak-alert{border-left:5px solid #b98325}
@media(max-width:680px){.peak-template-grid{grid-template-columns:1fr}.peak-check{grid-template-columns:1fr}.peak-period-card>div{display:block}.peak-period-card .tag{display:inline-block;margin-top:8px}.peak-check form,.peak-check select,.peak-check input{width:100%}}

/* ===== 招聘模組 ===== */
.recruit-page-head { margin-bottom:8px; }
.recruit-back { margin:6px 0 2px; }
.recruit-section { overflow:hidden; }
.recruit-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.recruit-section-head h2, .recruit-section-head p { margin:0; }
.recruit-request-list { margin:12px -18px -16px; border-top:1px solid #e2e8f0; }
.recruit-request-row { display:grid; grid-template-columns:minmax(0,1fr) auto 22px; align-items:center; gap:14px; min-height:82px; padding:13px 18px; color:var(--ink); border-bottom:1px solid #e2e8f0; }
.recruit-request-row:last-child { border-bottom:0; }
.recruit-request-row:hover { background:var(--mint-tint); text-decoration:none; }
.recruit-request-main { min-width:0; display:grid; gap:2px; }
.recruit-request-main strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:1rem; }
.recruit-request-number, .recruit-candidate-number { color:#72807b; font-size:.76rem; font-variant-numeric:tabular-nums; }
.recruit-request-meta { color:#64748b; font-size:.84rem; }
.recruit-request-state { display:grid; justify-items:end; gap:5px; color:#64748b; }
.recruit-request-state small { white-space:nowrap; }
.recruit-row-chevron { width:18px; height:18px; color:#82908b; }
.recruit-detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin:10px 0 14px; }
.recruit-detail-head h1 { margin:1px 0 2px; }
.recruit-detail-head p { margin:0; }
.recruit-readonly-banner { padding:10px 14px; border:1px solid #b7d9d0; border-radius:9px; background:var(--mint-tint); color:#315f54; }
.recruit-summary-card .recruit-description { margin:13px 0; }
.recruit-approval-meta { margin:4px 0 0; }
.recruit-reject-reason { margin-top:14px; padding:12px 14px; border-left:4px solid #dc2626; border-radius:6px; background:#fff1f2; color:#7f1d1d; }
.recruit-reject-reason p { margin:3px 0 0; }
.recruit-approve-actions { display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap; margin-top:14px; }
.recruit-approve-actions form { margin:0; }
.recruit-reject-panel > summary { list-style:none; }
.recruit-reject-panel > summary::-webkit-details-marker { display:none; }
.recruit-reject-panel[open] { flex:1 1 360px; padding:12px; border:1px solid #fecaca; border-radius:9px; background:#fffafa; }
.recruit-reject-panel[open] > summary { display:none; }
.recruit-resubmit-card > div:first-child p { margin:0 0 12px; }
.recruit-form-grid { align-items:start; }
.recruit-form-full { grid-column:1/-1; }
.recruit-form-actions { justify-content:flex-start; }
.recruit-danger-zone { display:flex; justify-content:flex-end; margin:14px 0; }
.recruit-candidates-section { margin-top:24px; }
.recruit-candidate-heading { margin-bottom:10px; }
.recruit-heading-actions { display:flex; align-items:center; gap:10px; }
.recruit-add-panel { position:relative; }
.recruit-add-panel > summary { list-style:none; }
.recruit-add-panel > summary::-webkit-details-marker { display:none; }
.recruit-add-panel[open] { position:static; width:100%; flex-basis:100%; margin-top:12px; padding:15px; border:1px solid #cddbd7; border-radius:10px; background:#fff; box-shadow:0 6px 20px rgba(37,40,42,.08); }
.recruit-candidate-heading:has(.recruit-add-panel[open]) { flex-wrap:wrap; }
.recruit-add-panel[open] > summary { margin-left:auto; transform:rotate(45deg); }
.recruit-add-panel form { margin-top:8px; }
.recruit-candidate-list { display:grid; gap:14px; }
.recruit-candidate-card { margin:0; }
.recruit-candidate-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.recruit-candidate-head h3 { margin:1px 0 0; font-size:1.12rem; }
.recruit-candidate-head p { margin:1px 0 0; }
.recruit-resume-link { margin:10px 0; }
.recruit-resume-link a { display:inline-flex; align-items:center; gap:5px; }
.recruit-resume-link .ui-icon { width:15px; height:15px; }
.recruit-note { padding:10px 12px; border-radius:8px; background:#f7f9f8; }
.recruit-note p { margin:3px 0 0; }
.recruit-interviews { margin-top:15px; padding-top:13px; border-top:1px solid #e2e8f0; }
.recruit-subhead { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.recruit-subhead h4 { margin:0; font-size:.95rem; }
.recruit-interview-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; padding:11px 0; border-bottom:1px solid #edf1ef; }
.recruit-interview-row:last-child { border-bottom:0; }
.recruit-interview-row > div { display:flex; gap:8px 14px; flex-wrap:wrap; }
.recruit-interview-row > div span { color:#52605b; }
.recruit-interview-row p, .recruit-interview-row small { grid-column:1/-1; margin:0; }
.recruit-interview-row small { color:#7b8783; }
.recruit-candidate-actions { margin-top:13px; padding-top:13px; border-top:1px solid #e2e8f0; }
.recruit-interview-panel > summary { width:max-content; list-style:none; }
.recruit-interview-panel > summary::-webkit-details-marker { display:none; }
.recruit-interview-panel[open] { padding:12px; border-radius:9px; background:var(--mint-tint); }
.recruit-interview-panel[open] > summary { margin-bottom:8px; }
.recruit-status-actions { margin-top:10px; }
.recruit-status-actions form { margin:0; }
.recruit-close-card { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.recruit-close-card h2, .recruit-close-card p { margin:0; }
.recruit-close-card form { margin:0; }
.recruit-close-card button:disabled { cursor:not-allowed; opacity:.45; }
.recruit-empty { min-height:62px; display:grid; place-items:center; margin:0; }

@media (max-width:680px) {
  .recruit-page-head { margin-top:8px; }
  .recruit-section { padding:15px; }
  .recruit-request-list { margin:12px -15px -15px; }
  .recruit-request-row { grid-template-columns:minmax(0,1fr) 18px; gap:8px; min-height:88px; padding:12px 15px; }
  .recruit-request-state { grid-column:1; grid-row:2; justify-items:start; display:flex; align-items:center; gap:8px; }
  .recruit-row-chevron { grid-column:2; grid-row:1/3; }
  .recruit-request-main strong { white-space:normal; }
  .recruit-request-meta { line-height:1.45; }
  .recruit-detail-head { align-items:flex-start; }
  .recruit-detail-head > div { min-width:0; }
  .recruit-detail-head h1 { font-size:1.25rem; }
  .recruit-section-head { gap:10px; }
  .recruit-candidate-heading { flex-wrap:wrap; }
  .recruit-heading-actions { width:100%; justify-content:space-between; }
  .recruit-add-panel[open] { padding:12px; }
  .recruit-form-grid { grid-template-columns:1fr; gap:4px; }
  .recruit-form-full { grid-column:auto; }
  .recruit-form-actions, .recruit-form-actions .btn,
  .recruit-approve-actions, .recruit-approve-actions > form, .recruit-approve-actions .btn,
  .recruit-reject-panel, .recruit-reject-panel form, .recruit-reject-panel button,
  .recruit-resubmit-card > form > .btn, .recruit-status-actions, .recruit-status-actions form,
  .recruit-status-actions .btn { width:100%; }
  .recruit-form-actions .btn, .recruit-approve-actions .btn, .recruit-status-actions .btn { min-height:44px; text-align:center; }
  .recruit-danger-zone, .recruit-danger-zone form, .recruit-danger-zone .btn { width:100%; }
  .recruit-candidate-card { padding:15px; }
  .recruit-interview-row { grid-template-columns:1fr; }
  .recruit-interview-row > .tag, .recruit-interview-row p, .recruit-interview-row small { grid-column:1; }
  .recruit-interview-panel > summary { width:100%; min-height:44px; text-align:center; }
  .recruit-close-card { align-items:stretch; flex-direction:column; }
  .recruit-close-card form, .recruit-close-card .btn { width:100%; min-height:44px; text-align:center; }
}

/* ===== 專案收入：第二處銷售課唯讀收入台 ===== */
.revenue-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:18px; }
.revenue-heading h1 { margin:2px 0 4px; font-size:clamp(1.55rem,3vw,2.1rem); letter-spacing:-.035em; }
.revenue-heading p { margin:0; color:var(--muted); }
.revenue-eyebrow { color:var(--mint-deep) !important; font-size:.78rem; font-weight:750; letter-spacing:.08em; }
.revenue-projects { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.revenue-project { min-width:0; display:grid; gap:5px; padding:15px; color:var(--ink); border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 4px 14px rgba(37,40,42,.04); }
.revenue-project:hover { text-decoration:none; border-color:#8acdbd; }
.revenue-project.active { border-color:var(--mint-deep); box-shadow:inset 0 0 0 1px var(--mint-deep); }
.revenue-project span { font-size:.82rem; font-weight:750; }
.revenue-project strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:1.18rem; }
.revenue-project small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:.72rem; }
.revenue-filter { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)) auto; align-items:end; gap:10px; }
.revenue-filter label { display:grid; gap:5px; color:var(--muted); font-size:.76rem; font-weight:650; }
.revenue-stats { grid-template-columns:repeat(3,1fr); }
.revenue-stat { color:var(--ink); border:1px solid transparent; }
.revenue-stat:hover { text-decoration:none; border-color:var(--mint); }
.revenue-stat.active { border-color:var(--mint-deep); box-shadow:inset 0 0 0 1px var(--mint-deep); }
.revenue-stat.received .num { color:#176b59; }
.revenue-stat.checking .num { color:#95640d; }
.revenue-stat.unpaid .num { color:#a33b35; }
.revenue-sync-note { min-height:52px; display:flex; align-items:center; justify-content:space-between; gap:14px; margin:14px 0; padding:10px 14px; border:1px solid #b9ddd4; border-radius:12px; background:var(--mint-tint); color:#285c50; }
.revenue-sync-note.failed { border-color:#f0c5c1; background:#fff1f0; color:#8f3631; }
.revenue-sync-note > div { display:grid; gap:2px; }
.revenue-sync-note strong { font-size:.8rem; }
.revenue-sync-note span { font-size:.76rem; }
.revenue-sync-note a { flex:none; font-size:.78rem; font-weight:700; }
.revenue-snapshot-note { position:relative; }
.revenue-snapshot-menu { position:relative; flex:none; }
.revenue-snapshot-menu summary { width:36px; height:36px; display:grid; place-items:center; border-radius:9px; color:inherit; font-size:1.25rem; font-weight:800; line-height:1; cursor:pointer; list-style:none; }
.revenue-snapshot-menu summary::-webkit-details-marker { display:none; }
.revenue-snapshot-menu summary:hover { background:rgba(37,40,42,.07); }
.revenue-snapshot-menu form { position:absolute; z-index:20; top:42px; right:0; width:min(300px,calc(100vw - 44px)); padding:14px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 14px 32px rgba(37,40,42,.16); color:var(--text); }
.revenue-snapshot-menu p { margin:0 0 10px; color:var(--muted); font-size:.75rem; }
.revenue-snapshot-menu .btn { width:100%; min-height:44px; white-space:normal; }
.revenue-record-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.revenue-record-head h2 { margin:0 0 2px; }
.revenue-record-head p { margin:0; color:var(--muted); font-size:.76rem; }
.revenue-record-head > span { flex:none; color:var(--muted); font-size:.78rem; }
.revenue-status { display:inline-flex; align-items:center; min-height:25px; padding:3px 9px; border-radius:999px; font-size:.74rem; font-weight:750; white-space:nowrap; }
.revenue-status.received { color:#176b59; background:#e4f5f0; }
.revenue-status.checking { color:#8a5b08; background:#fff4d9; }
.revenue-status.unpaid { color:#9b3934; background:#fff0ef; }
.revenue-empty { min-height:210px; display:grid; place-items:center; align-content:center; gap:8px; color:var(--muted); text-align:center; }
.revenue-empty .ui-icon { width:30px; height:30px; color:var(--mint-deep); }
.revenue-empty strong { color:var(--ink); }
.revenue-empty p { max-width:430px; margin:0; font-size:.84rem; }
.revenue-course-filter { grid-template-columns:minmax(180px,1fr) minmax(210px,1fr) auto; }
.revenue-course-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
.revenue-course-stats .stat { min-width:0; }
.revenue-course-stats .num { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:clamp(1rem,2vw,1.35rem); }
.revenue-course-table table { min-width:1040px; }
.revenue-course-table td { vertical-align:top; }
.revenue-course-table td > small { display:block; margin-top:4px; color:var(--muted); font-size:.7rem; white-space:nowrap; }
.revenue-course-project-cell { min-width:235px; }
.revenue-course-project-cell > strong { display:block; max-width:300px; }
.revenue-quality { display:inline-flex; width:max-content; margin-top:7px; padding:3px 8px; border-radius:999px; font-size:.68rem; font-weight:750; }
.revenue-quality.partial { color:#835807; background:#fff1cc; }
.revenue-quality.unavailable { color:#973d37; background:#fff0ef; }
.revenue-quality-note { max-width:280px; white-space:normal !important; line-height:1.45; }
.revenue-change { font-weight:750; }
.revenue-change.up { color:#16705d; }
.revenue-change.down { color:#a33b35; }
.revenue-change.flat,.revenue-change.muted { color:var(--muted); }

@media (max-width:958px) {
  .revenue-projects { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .revenue-course-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:680px) {
  .revenue-heading { align-items:stretch; }
  .revenue-heading form { flex:none; }
  .revenue-heading .btn { min-height:44px; }
  .revenue-projects { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .revenue-project { padding:12px; }
  .revenue-project strong { font-size:1rem; }
  .revenue-filter { grid-template-columns:1fr 1fr; gap:8px; }
  .revenue-filter label:nth-of-type(3) { grid-column:1/-1; }
  .revenue-filter .btn { grid-column:1/-1; width:100%; }
  .revenue-course-filter { grid-template-columns:1fr; }
  .revenue-course-filter label:nth-of-type(2) { grid-column:auto; }
  .revenue-stats { grid-template-columns:1fr; gap:8px; }
  .revenue-course-stats { grid-template-columns:1fr 1fr; }
  .revenue-stat { display:grid; grid-template-columns:1fr auto; align-items:center; text-align:left; }
  .revenue-stat .num { order:2; font-size:1.05rem; }
  .revenue-sync-note { align-items:flex-start; }
  .revenue-table-scroll { overflow:visible; }
  .revenue-table-scroll table,
  .revenue-table-scroll tbody { display:block; min-width:0; }
  .revenue-table-scroll thead { display:none; }
  .revenue-table-scroll tr { display:grid; grid-template-columns:1fr auto; gap:5px 10px; padding:12px 0; border-bottom:1px solid var(--line); }
  .revenue-table-scroll tr:last-child { border-bottom:0; }
  .revenue-table-scroll td { display:block; padding:0; border:0; }
  .revenue-table-scroll td[data-th="日期"] { color:var(--muted); font-size:.75rem; }
  .revenue-table-scroll td[data-th="項目"] { grid-column:1; grid-row:2; font-weight:700; }
  .revenue-table-scroll td[data-th="來源"] { display:none; }
  .revenue-table-scroll td[data-th="說明"] { grid-column:1; color:var(--muted); font-size:.76rem; }
  .revenue-table-scroll td[data-th="狀態"] { grid-column:2; grid-row:1; text-align:right; }
  .revenue-table-scroll td[data-th="金額"] { grid-column:2; grid-row:2 / span 2; align-self:center; text-align:right; }
  .revenue-course-table table { min-width:0; }
  .revenue-course-table tr { grid-template-columns:1fr 1fr; gap:8px; padding:14px 0; }
  .revenue-course-table td { display:grid; grid-template-columns:1fr; gap:3px; padding:10px; border:1px solid var(--line); border-radius:10px; background:#fafcfc; text-align:left !important; }
  .items-scroll.revenue-course-table td[data-th]::before { content:attr(data-th); color:var(--muted); font-size:.68rem; font-weight:700; }
  .revenue-course-table .revenue-course-project-cell { grid-column:1/-1; display:block; min-width:0; padding:0 0 8px; border:0; background:transparent; }
  .revenue-course-table .revenue-course-project-cell::before { display:none; }
  .revenue-course-project-cell > strong { max-width:none; }
  .revenue-course-table td > small { white-space:normal; }
}

/* ---- 巡課:無外框＋/×與紅綠燈色點(top-employee-ui 慣例) ---- */
.patrol-head-actions{display:flex;align-items:center;gap:10px}
.patrol-plus{border:none;background:none;cursor:pointer;color:var(--ink,#25282A);
  font-size:1.5rem;line-height:1;width:44px;height:44px;border-radius:10px;
  display:inline-flex;align-items:center;justify-content:center;padding:0}
.patrol-plus:hover{background:#B5E3D8}
.patrol-plus:focus-visible{outline:2px solid #25282A;outline-offset:2px}
.patrol-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:baseline}
.patrol-dot-bad{background:#c0392b}
.patrol-dot-good{background:#2e7d4f}
/* ===== 新埔國小需到場時段（部門排班表，資料來自場租系統） ===== */
.xinpu-slots-card { margin:10px 0; }
.xinpu-slots-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.xinpu-slots-head h2 { margin:0; font-size:1rem; }
.xinpu-slots-head small { display:block; color:#64748b; margin-top:2px; }
.xinpu-slots-card .hint.error { color:#b91c1c; }
.xinpu-slots-list { display:flex; flex-direction:column; gap:4px; margin-top:6px; }
.xinpu-slot-day summary { display:flex; align-items:center; gap:10px; flex-wrap:wrap; cursor:pointer; padding:6px 8px; border-radius:8px; }
.xinpu-slot-day summary:hover { background:#f1f5f9; }
.xinpu-slot-day[open] summary { background:#f1f5f9; }
.xinpu-slot-day .xinpu-cover { color:#25282A; font-weight:600; }
.xinpu-slot-day ul { margin:2px 0 8px 28px; padding:0; color:#475569; font-size:.86rem; }
.xinpu-slot-day li { list-style:disc; margin:2px 0; }
.xinpu-slot-day li.xinpu-closure { color:#b91c1c; }
.xinpu-closure-tag { background:#fee2e2; color:#b91c1c; }
.attendance-schedule-table thead th { position:relative; }
.xinpu-dot { display:block; width:7px; height:7px; border-radius:50%; background:#e8a13a; margin:3px auto 0; }
@media (max-width:680px) {
  .xinpu-slots-head { flex-direction:column; }
  .xinpu-slot-day summary { padding:8px 6px; }
}

/* C4 發薪作業、薪資單與對帳 */
.payroll-add-control{font-size:2rem;line-height:1;color:#25282A;text-decoration:none;padding:.35rem .6rem;border-radius:10px}.payroll-add-control:hover,.payroll-add-control:focus{background:#B5E3D8}.payroll-state{display:inline-flex;padding:.2rem .65rem;border-radius:999px;background:#eef2f1;font-size:.85rem;white-space:nowrap}.payroll-run-summary,.payroll-payslip-totals,.payroll-recon-counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.payroll-run-summary>div,.payroll-payslip-totals>div,.payroll-recon-counts>div{display:grid;gap:.25rem}.payroll-payslip-totals{grid-template-columns:repeat(3,minmax(0,1fr));text-align:center}.payroll-payslip-totals strong{font-size:1.35rem}.payroll-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.4rem;margin:1rem 0}.payroll-steps span{padding:.65rem .45rem;border-radius:10px;background:#eef2f1;text-align:center;font-size:.86rem}.payroll-member-list{display:grid;gap:.65rem}.payroll-member-list article{display:flex;align-items:end;gap:1rem;padding:.8rem;border:1px solid #dce3e1;border-radius:12px}.payroll-member-list article>div{display:grid;gap:.25rem;min-width:12rem;margin-right:auto}.payroll-member-list form{display:flex;align-items:end;gap:.5rem;margin:0}.payroll-balance-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.75rem}.payroll-balance-grid article{padding:.8rem;border:1px solid #dce3e1;border-radius:12px}.payroll-balance-grid article div{display:flex;justify-content:space-between;margin-top:.45rem}.payroll-inline-create{margin-bottom:1rem;border:1px solid #dce3e1;border-radius:12px;padding:.75rem}.payroll-inline-create>summary{cursor:pointer;font-size:1.6rem;line-height:1;list-style:none;width:2rem}.payroll-inline-create[open]>summary{transform:rotate(45deg)}.payroll-member-picker{border:1px solid #dce3e1;border-radius:12px;margin:1rem 0;padding:1rem}.payroll-check-grid,.payroll-settings-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.35rem 1rem}.payroll-check-grid .check,.payroll-settings-list .check{min-height:44px}.payroll-terminal-check{margin:1rem 0}.payroll-terminal-card{border-color:#B5E3D8}.payroll-void-card{border-color:#ead8d8}.payroll-void-card summary{cursor:pointer}.payroll-payslip-list{display:grid;gap:.75rem}.payroll-payslip-link{display:flex;justify-content:space-between;align-items:center;text-decoration:none;color:inherit}.payroll-payslip-link div{display:grid;gap:.25rem}.payroll-trial-banner,.payroll-reconcile-notice{border-color:#d7b86b;background:#fffaf0}.payroll-taxable-total{display:flex;justify-content:space-between;align-items:center}.payroll-taxable-total strong{font-size:1.2rem}.payroll-recon-counts strong{font-size:1.4rem}.payroll-recon-diff{background:#fff6f4}.payroll-column-map{margin-top:1rem}
@media (max-width:958px){.payroll-run-summary,.payroll-recon-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.payroll-steps{grid-template-columns:repeat(3,minmax(0,1fr))}.payroll-member-list article{align-items:stretch;flex-wrap:wrap}.payroll-member-list article>div{width:100%}.payroll-member-list form{flex:1 1 250px}}
@media (max-width:680px){.payroll-run-summary,.payroll-payslip-totals,.payroll-recon-counts{grid-template-columns:1fr}.payroll-steps{display:flex;overflow-x:auto;padding-bottom:.35rem}.payroll-steps span{min-width:8.5rem}.payroll-member-list article,.payroll-member-list form{display:grid;width:100%}.payroll-member-list form .btn{width:100%}.payroll-check-grid,.payroll-settings-list{grid-template-columns:1fr}.payroll-inline-create .grid-form{grid-template-columns:1fr}.payroll-payslip-link{align-items:flex-start;gap:.75rem}.payroll-payslip-link>span{white-space:nowrap}}
