:root {
  color-scheme: light;
  --green: #0b8f67;
  --green-dark: #08654e;
  --mint: #e7f7f1;
  --ink: #13251f;
  --muted: #64736e;
  --line: #dde7e2;
  --paper: #fff;
  --bg: #f3f7f5;
  --danger: #c84545;
  --amber: #a76400;
  font-family: Inter, "Noto Sans TC", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.topbar { height: 68px; background: #0c201a; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; }
.brand { display: flex; gap: 11px; align-items: center; font-weight: 800; letter-spacing: .02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: #20c997; display: grid; place-items: center; color: #062a20; }
.top-link { color: #cde5dc; text-decoration: none; font-size: 14px; }
.employee-shell { max-width: 480px; min-height: 100vh; margin: 0 auto; background: #fff; box-shadow: 0 0 40px #173d2d1a; }
.employee-head { padding: 18px 22px 22px; background: linear-gradient(145deg, #0b8f67, #0b7056); color: #fff; }
.employee-head .row { display: flex; justify-content: space-between; align-items: center; }
.eyebrow { font-size: 12px; letter-spacing: .12em; opacity: .75; }
.employee-head h1 { font-size: 22px; margin: 5px 0 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: #fff3 center/cover no-repeat; display: grid; place-items: center; font-weight: 800; }
.employee-main { padding: 20px; }
.date-line { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 8px 24px #1f4b3a0a; }
.location-card { background: #f8fbfa; }
.status-line { display: flex; gap: 12px; align-items: flex-start; }
.status-icon { width: 42px; height: 42px; border-radius: 14px; background: var(--mint); display: grid; place-items: center; font-size: 20px; }
.status-line strong { display: block; margin-bottom: 4px; }
.status-line small { color: var(--muted); line-height: 1.5; }
.progress { height: 5px; background: #dceae4; border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width .35s; }
.punch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.punch { border: 0; border-radius: 17px; padding: 18px 10px; font-weight: 800; font-size: 16px; }
.punch.primary { background: var(--green); color: #fff; box-shadow: 0 8px 18px #0b8f6730; }
.punch.secondary { background: #183c31; color: #fff; }
.punch:disabled { opacity: .4; cursor: not-allowed; }
.subhead { display: flex; justify-content: space-between; align-items: center; margin: 22px 2px 10px; }
.subhead h2 { font-size: 16px; margin: 0; }
.link-button { border: 0; background: transparent; color: var(--green-dark); font-weight: 700; padding: 4px; }
.timeline { display: grid; gap: 9px; }
.event { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 12px 4px; border-bottom: 1px solid #edf2ef; }
.event:last-child { border-bottom: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.dot.rejected { background: var(--danger); }
.dot.field { background: #3d77d8; box-shadow: 0 0 0 3px #e7effd; }
.event strong { font-size: 14px; }
.event small { display: block; color: var(--muted); margin-top: 3px; }
.event time { font-weight: 800; font-variant-numeric: tabular-nums; }
.notice { padding: 13px 14px; border-radius: 12px; font-size: 14px; margin-top: 12px; display: none; line-height: 1.5; }
.notice.show { display: block; }
.notice.ok { background: var(--mint); color: var(--green-dark); }
.notice.error { background: #fff0f0; color: #9f3030; }
.modal { position: fixed; inset: 0; background: #0c201ab3; display: none; place-items: center; padding: 20px; z-index: 5; }
.modal.open { display: grid; }
.modal-card { width: min(440px, 100%); background: #fff; border-radius: 20px; padding: 22px; }
.modal-card h2 { margin: 0 0 16px; }
.field { display: grid; gap: 7px; margin-bottom: 13px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #ccd9d3; border-radius: 10px; padding: 11px 12px; background: #fff; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.btn { border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 700; }
.btn.primary { background: var(--green); color: #fff; }
.btn.ghost { background: #edf3f0; color: var(--ink); }
.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 68px); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 24px 16px; }
.nav-label { font-size: 11px; color: #8a9993; letter-spacing: .12em; margin: 10px 12px; }
.nav-item { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 10px; color: #52615c; margin: 3px 0; }
.nav-item.active { background: var(--mint); color: var(--green-dark); font-weight: 800; }
.admin-main { padding: 30px; max-width: 1440px; width: 100%; margin: 0 auto; }
.page-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; }
.page-title h1 { margin: 0 0 6px; font-size: 28px; }
.page-title p { margin: 0; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric { padding: 17px; border: 1px solid var(--line); background: #fff; border-radius: 15px; }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { display: block; font-size: 28px; margin-top: 8px; }
.metric small { color: var(--green-dark); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 18px; margin-top: 18px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.panel-head { padding: 17px 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 16px; margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 11px 14px; color: var(--muted); font-size: 12px; background: #f8faf9; }
td { padding: 13px 14px; border-top: 1px solid #edf1ef; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 700; background: var(--mint); color: var(--green-dark); }
.badge.bad { background: #fff0f0; color: var(--danger); }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.location-list { padding: 4px 18px 12px; }
.location { padding: 14px 0; border-bottom: 1px solid var(--line); }
.location:last-child { border: 0; }
.location strong, .location small { display: block; }
.location small { color: var(--muted); margin-top: 5px; line-height: 1.45; }
.setup-box { margin: 8px 18px 18px; background: #f5faf8; padding: 14px; border-radius: 12px; }
.setup-box p { font-size: 13px; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.demo-select { border: 1px solid #ffffff50; background: #ffffff18; color: #fff; padding: 7px 9px; border-radius: 8px; }
.demo-select option { color: #111; }
.work-mode-hint { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 10px 2px 0; color: var(--muted); font-size: 11px; }
.work-mode-hint span { padding: 3px 7px; border-radius: 999px; background: #edf7f3; color: var(--green-dark); font-weight: 800; }
.work-mode-hint span:nth-child(4) { background: #edf2fc; color: #315eaa; }
.work-mode-hint b { color: #b1bcb7; }
#fieldModal { align-items: start; overflow-y: auto; overscroll-behavior: contain; padding-block: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-bottom)); }
.field-modal-card { max-height: none; margin: auto 0; overflow: visible; }
.modal-kicker { color: #3370c5; font-size: 10px; font-weight: 900; letter-spacing: .14em; margin-bottom: 5px; }
.field-location-summary { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; margin: 0 0 16px; padding: 12px; border: 1px solid #d9e4f5; border-radius: 12px; background: #f4f7fc; }
.field-location-summary > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #e3ebf9; color: #315eaa; font-size: 18px; }
.field-location-summary strong, .field-location-summary small { display: block; }
.field-location-summary small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.optional { color: var(--muted); font-size: 10px; font-weight: 500; }
.field-confirm { display: flex; gap: 9px; align-items: flex-start; padding: 11px 12px; border-radius: 10px; background: #f6f8f7; color: #52615c; font-size: 12px; line-height: 1.45; }
.field-confirm input { margin-top: 2px; }
.completion-screen { position: fixed; inset: 0; z-index: 20; display: none; place-items: center; padding: 24px; background: #f3f7f5; }
.completion-screen.open { display: grid; }
.completion-card { width: min(390px, 100%); padding: 34px 26px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 18px 55px #173d2d1a; text-align: center; }
.completion-check { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: var(--mint); color: var(--green); font-size: 32px; font-weight: 900; }
.completion-card h2 { margin: 8px 0; font-size: 25px; }
.completion-card > p:not(.eyebrow) { margin: 0 0 20px; color: var(--muted); line-height: 1.65; }
.completion-card .btn { width: 100%; min-height: 48px; }
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 20px 14px; }
  .topbar { padding: 0 18px; }
}
@media (max-width: 520px) {
  .employee-shell { width: 100%; }
  #fieldModal { padding: max(10px, env(safe-area-inset-top)) 8px max(10px, env(safe-area-inset-bottom)); }
  .field-modal-card { border-radius: 18px; padding: 20px 18px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric strong { font-size: 23px; }
  .page-title { align-items: flex-start; gap: 12px; }
}

/* Admin operations workspace */
.admin-body { min-width: 0; max-width: 100%; overflow-x: hidden; background: #f4f6f5; }
.admin-topbar { position: sticky; top: 0; z-index: 20; height: 70px; border-bottom: 1px solid #ffffff12; }
.admin-topbar .brand > span:last-child { display: grid; line-height: 1.2; }
.admin-topbar .brand small { color: #8eaaa1; font-size: 10px; font-weight: 600; letter-spacing: .12em; margin-top: 3px; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.system-live { color: #7fe0bc; font-size: 12px; }
.avatar-button { width: 34px; height: 34px; border: 1px solid #ffffff30; border-radius: 50%; background: #173a30; color: #fff; font-weight: 800; }
.admin-body .admin-layout { grid-template-columns: 244px minmax(0, 1fr); min-height: calc(100vh - 70px); }
.admin-body .sidebar { position: sticky; top: 70px; height: calc(100vh - 70px); padding: 18px 13px; overflow-y: auto; }
.workspace { display: grid; gap: 4px; padding: 14px; margin-bottom: 13px; border-radius: 12px; background: #f4f8f6; border: 1px solid var(--line); }
.workspace strong { font-size: 13px; }
.workspace small, .sidebar-foot small { color: var(--muted); font-size: 11px; }
.admin-body .nav-label { margin-top: 17px; }
.admin-body .nav-item { width: 100%; border: 0; background: transparent; font-size: 13px; text-align: left; cursor: pointer; }
.admin-body .nav-item:hover { background: #f2f7f5; }
.admin-body .nav-item span { width: 18px; text-align: center; color: #86968f; font-weight: 900; }
.admin-body .nav-item b { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 999px; background: #ecf0ee; color: #6d7c76; font-size: 10px; text-align: center; }
.admin-body .nav-item.active b { background: #cbeee1; color: var(--green-dark); }
.sidebar-foot { position: absolute; left: 13px; right: 13px; bottom: 16px; display: grid; gap: 3px; border-top: 1px solid var(--line); padding: 15px 10px 0; }
.sidebar-foot span { color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.sidebar-foot strong { font-size: 13px; }
.admin-body .admin-main { max-width: 1600px; padding: 28px 30px 50px; }
.admin-body .page-title { align-items: center; }
.eyebrow.dark { color: var(--green-dark); opacity: 1; font-weight: 800; margin: 0 0 6px !important; }
.page-actions { display: flex; align-items: center; gap: 9px; }
.last-sync { color: var(--muted); font-size: 11px; margin-right: 5px; }
.admin-view { display: none; }
.admin-view.active { display: block; animation: view-in .18s ease-out; }
@keyframes view-in { from { opacity: .2; transform: translateY(3px); } }
.filterbar { display: flex; align-items: end; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 14px; }
.filterbar label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.filterbar input, .filterbar select, .inline-filters input, .inline-filters select { height: 36px; min-width: 145px; padding: 0 11px; border: 1px solid #d4dfda; border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; }
.filter-summary { margin-left: auto; color: var(--muted); font-size: 12px; padding-bottom: 9px; }
.metrics.six { grid-template-columns: repeat(6, 1fr); }
.metric { position: relative; overflow: hidden; }
.metric.accent::before, .metric.warning::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--green); }
.metric.warning::before { background: #e19a29; }
.metric.warning strong { color: var(--amber); }
.metrics.compact { grid-template-columns: repeat(3, minmax(160px, 240px)); margin-bottom: 16px; }
.metrics.compact .metric strong { font-size: 24px; }
.dashboard-grid { grid-template-columns: minmax(600px, 1.65fr) minmax(300px, .8fr); }
.panel-head small { color: var(--muted); display: block; font-size: 11px; margin-top: 4px; }
.badge.live { color: var(--green); background: #edf9f4; letter-spacing: .05em; }
.table-wrap { overflow: auto; }
td small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.event-type, .request-type, .source-chip { display: inline-block; padding: 3px 7px; border: 1px solid #dbe5e1; border-radius: 6px; color: #41534c; font-size: 11px; font-weight: 700; }
.source-chip { color: var(--green-dark); background: #f0faf6; border-color: #d1ede2; }
.event-type.field, .badge.field { color: #315eaa; background: #edf2fc; border-color: #d6e1f5; }
.badge.neutral { background: #f1f3f2; color: #7c8883; }
.panel-link { width: 100%; padding: 13px 18px; border: 0; border-top: 1px solid var(--line); background: #fbfcfc; color: var(--green-dark); font-weight: 800; text-align: left; }
.action-queue { min-height: 268px; }
.queue-item { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; gap: 11px; align-items: center; padding: 13px 16px; border: 0; border-bottom: 1px solid #edf1ef; background: #fff; text-align: left; }
.queue-item:hover { background: #fafcfb; }
.queue-item > span:nth-child(2) { display: grid; gap: 3px; }
.queue-item strong { font-size: 13px; }
.queue-item small { color: var(--muted); font-size: 11px; }
.queue-item > b { color: #a0aaa6; }
.queue-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; }
.queue-icon.danger { color: var(--danger); background: #fff0f0; }
.queue-icon.amber { color: var(--amber); background: #fff6e8; }
.queue-clear { min-height: 268px; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); }
.queue-clear span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--mint); }
.queue-clear small { font-size: 11px; }
.attendance-strip { margin-top: 18px; }
.department-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 20px; }
.department-bars > div { display: grid; grid-template-columns: minmax(100px, 1fr) 2fr 40px; gap: 12px; align-items: center; }
.department-bars span { display: grid; gap: 3px; }
.department-bars small { color: var(--muted); font-size: 10px; }
.department-bars b { font-size: 12px; text-align: right; }
.bar { height: 7px; background: #e9efec; border-radius: 999px; overflow: hidden; }
.bar i { height: 100%; display: block; background: var(--green); border-radius: inherit; }
.inline-filters, .segmented { display: flex; gap: 7px; }
.segmented { padding: 3px; border-radius: 9px; background: #eef2f0; }
.segmented button { border: 0; background: transparent; border-radius: 7px; padding: 7px 10px; font-size: 11px; }
.segmented button.active { background: #fff; box-shadow: 0 2px 6px #193b2d16; }
.severity { padding: 4px 7px; border-radius: 6px; color: var(--danger); background: #fff0f0; font-size: 11px; font-weight: 800; }
.reason-cell { max-width: 310px; }
.person { display: flex; align-items: center; gap: 9px; }
.person > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #e6f5ef; color: var(--green-dark); font-style: normal; font-weight: 900; }
.person > span { display: grid; }
.status-dot { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: #16a36f; }
.status-dot.off { background: #abb5b1; }
.schedule-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.week-switch { display: flex; align-items: center; gap: 12px; }
.week-switch button { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 8px; }
.schedule-layout { display: grid; grid-template-columns: 360px 1fr; gap: 18px; }
.shift-cards { padding: 10px 16px 16px; }
.shift-card { width: 100%; display: grid; grid-template-columns: 5px 1fr auto; align-items: center; gap: 12px; padding: 13px 4px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.shift-card i { width: 5px; height: 35px; border-radius: 5px; }
.shift-card span { display: grid; gap: 4px; }
.shift-card small { color: var(--muted); }
.shift-card b { color: var(--muted); font-size: 10px; }
.schedule-preview { padding: 18px; overflow-x: auto; }
.schedule-head, .schedule-row { display: grid; grid-template-columns: repeat(7, minmax(86px, 1fr)); gap: 7px; }
.schedule-head b { padding: 8px; color: var(--muted); font-size: 11px; text-align: center; }
.schedule-row > span { min-height: 95px; display: grid; place-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 10px; text-align: center; font-size: 12px; }
.schedule-row small { color: var(--muted); font-size: 9px; }
.schedule-row .scheduled { background: #eff9f5; border-color: #cce9de; color: var(--green-dark); font-weight: 800; }
.schedule-row .offday { background: #f8f9f9; color: #9ca6a2; }
.location-grid { grid-template-columns: minmax(500px, 1.3fr) minmax(360px, .7fr); margin-top: 0; }
.location { display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; }
.location-pin { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--green-dark); background: var(--mint); }
.icon-button { border: 0; background: transparent; color: #8a9691; }
.settings-list { display: grid; padding: 7px 18px 17px; }
.settings-list label { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.settings-list label:last-child { border-bottom: 0; }
.settings-list label > span { display: grid; gap: 4px; }
.settings-list small { color: var(--muted); font-size: 10px; }
.settings-list b { color: var(--green-dark); font-size: 12px; }
.report-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.report-card { position: relative; min-height: 180px; display: grid; align-content: end; gap: 7px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; text-align: left; }
.report-card:hover { border-color: #9ccfbc; transform: translateY(-2px); box-shadow: 0 10px 25px #173d2d0c; }
.report-card > span { position: absolute; top: 18px; right: 18px; color: #b7c5bf; font-size: 28px; font-weight: 200; }
.report-card strong { font-size: 16px; }
.report-card small { color: var(--muted); }
.report-note { padding: 21px; margin-top: 18px; }
.report-note h2 { margin: 0 0 8px; font-size: 15px; }
.report-note p { margin: 0; max-width: 850px; color: var(--muted); line-height: 1.65; font-size: 13px; }
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; transform: translateY(20px); opacity: 0; pointer-events: none; padding: 12px 16px; border-radius: 10px; background: #102a22; color: #fff; box-shadow: 0 10px 30px #0c201a3d; transition: .2s; font-size: 13px; }
.toast.show { transform: translateY(0); opacity: 1; }
.mobile-admin-nav, .mobile-desktop-notice, .report-desktop-gate { display: none; }
@media (max-width: 1250px) {
  .metrics.six { grid-template-columns: repeat(3, 1fr); }
  .department-bars { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .admin-topbar { height: 60px; padding: 0 14px; }
  .admin-topbar .brand { min-width: 0; font-size: 14px; }
  .admin-topbar .brand > span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .admin-topbar .system-live, .admin-topbar .avatar-button { display: none; }
  .admin-topbar .top-actions { gap: 0; flex: 0 0 auto; }
  .admin-topbar .top-link { font-size: 12px; }
  .admin-body .admin-layout { display: block; min-height: calc(100vh - 108px); }
  .admin-body .sidebar { display: none; }
  .mobile-admin-nav { position: sticky; top: 60px; z-index: 19; display: flex; gap: 6px; width: 100%; padding: 8px 12px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; background: #fff; border-bottom: 1px solid var(--line); }
  .mobile-admin-nav::-webkit-scrollbar { display: none; }
  .mobile-nav-item { flex: 0 0 auto; min-height: 32px; padding: 6px 12px; border: 0; border-radius: 999px; background: #f1f4f3; color: #52615c; font-size: 12px; white-space: nowrap; }
  .mobile-nav-item.active { color: var(--green-dark); background: var(--mint); font-weight: 800; }
  .admin-body .admin-main { min-width: 0; padding: 18px 12px 40px; }
  .admin-body .page-title { display: grid; align-items: start; gap: 12px; margin-bottom: 14px; }
  .page-title h1 { font-size: 23px; }
  .page-title > div:first-child, .page-actions { min-width: 0; }
  #viewDescription { line-height: 1.5; font-size: 13px; }
  .page-actions { width: 100%; justify-content: space-between; }
  .last-sync { margin-right: auto; }
  .desktop-only-action { display: none !important; }
  .mobile-desktop-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 13px; margin-bottom: 14px; border: 1px solid #eadab8; border-radius: 12px; background: #fffaf0; }
  .mobile-desktop-notice span { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; background: #f5e6c7; color: #8a5b00; font-size: 10px; font-weight: 900; }
  .mobile-desktop-notice p { margin: 0; color: #765d2c; font-size: 11px; line-height: 1.55; }
  .filterbar { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 9px; }
  .filterbar label:first-child { grid-column: 1 / -1; }
  .filterbar input, .filterbar select, .inline-filters input, .inline-filters select { width: 100%; min-width: 0; }
  .filter-summary { grid-column: 1 / -1; margin-left: 0; padding: 2px 0 0; }
  .metrics.six { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metrics.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .metric { min-width: 0; padding: 14px 12px; }
  .metric span, .metric small { overflow-wrap: anywhere; }
  .dashboard-grid, .location-grid, .schedule-layout, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .panel, .admin-grid, .admin-view, .schedule-layout { min-width: 0; }
  .panel-head { align-items: flex-start; gap: 10px; padding: 14px; }
  .panel-head > div:first-child { min-width: 0; }
  .inline-filters { width: 100%; flex-direction: column; }
  .table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-body table { min-width: 680px; }
  .department-bars { grid-template-columns: 1fr; padding: 15px 13px; }
  .department-bars > div { grid-template-columns: minmax(88px, 1fr) 1.5fr 34px; gap: 8px; }
  .schedule-toolbar { align-items: flex-start; gap: 10px; }
  .schedule-toolbar > div:last-child { display: none; }
  .location { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .location small { overflow-wrap: anywhere; }
  .settings-list label { align-items: flex-start; gap: 10px; }
  .settings-list b { text-align: right; overflow-wrap: anywhere; }
  .report-desktop-gate { display: block; padding: 18px; border: 1px solid #d8e3de; border-radius: 14px; background: #fff; }
  .report-desktop-gate strong { display: block; margin-bottom: 6px; }
  .report-desktop-gate p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
  .desktop-report-grid { display: none; }
  .report-note { margin-top: 12px; }
  .toast { left: 12px; right: 12px; bottom: 12px; text-align: center; }
}
@media (max-width: 520px) {
  .admin-topbar .brand small { display: none; }
  .admin-topbar .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .metrics.compact { grid-template-columns: 1fr; }
  .metric strong { font-size: 24px; }
  .panel-head { flex-direction: column; }
  .panel-head .badge { align-self: flex-start; }
  .segmented { align-self: stretch; }
  .segmented button { flex: 1; }
}
