/* Think One Access — server-rendered app layout & responsive rules.
   Desktop: fixed sidebar + topbar. Mobile (≤920px): compact header +
   fixed bottom tab bar. Both chromes live in the DOM; CSS toggles them. */

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body { font-family: "Geist", -apple-system, system-ui, sans-serif; background: #0a0b0e; }
a { color: inherit; text-decoration: none; }

.scroll-y { overflow-y: auto; scrollbar-width: none; }
.scroll-y::-webkit-scrollbar { display: none; }
.scroll-x { overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ── app frame ── */
.app { display: flex; height: 100vh; height: 100dvh; width: 100%; overflow: hidden; background: var(--bg); }

.app-side { flex: 0 0 auto; width: 244px; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100%; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.app-topbar { height: 64px; flex: 0 0 auto; border-bottom: 1px solid var(--border);
  background: var(--surface); display: flex; align-items: center; gap: 16px; padding: 0 26px; }
.app-content { flex: 1; min-height: 0; padding: 24px; }

.app-search { display: flex; align-items: center; gap: 8px; width: 260px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); cursor: text; }
.app-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: 13px; }
.app-search input::placeholder { color: var(--muted); opacity: 1; }
.global-search { position: relative; }
.global-search-results { display: none; position: absolute; top: 44px; right: 0; width: min(420px, 84vw);
  max-height: 430px; overflow: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); box-shadow: var(--shadow); z-index: 30; }
.global-search-results[data-open="1"] { display: block; }
.gs-item { display: block; padding: 10px 11px; border-radius: 7px; color: var(--ink); }
.gs-item:hover, .gs-item[data-active="1"] { background: var(--surface-2); }
.gs-kind { font-family: var(--mono); font-size: 10px; color: var(--accent); letter-spacing: .04em; }
.gs-title { font-size: 13px; font-weight: 650; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-empty { padding: 13px 11px; color: var(--muted); font-size: 12.5px; }
.icon-btn { width: 38px; height: 38px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--ink-2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.header-clock { height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2);
  color: var(--muted); flex: 0 0 auto; }
.header-clock span { font-size: 12px; font-weight: 750; color: var(--ink); letter-spacing: .02em; }
.header-clock--mobile { height: 34px; padding: 0 9px; }
.header-clock--mobile span { font-size: 11.5px; }
.notif-pop { position: relative; }
.notif-pop .icon-btn { position: relative; }
.notif-badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--crit); color: #fff; border-radius: 9px; font-size: 9.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-family: var(--mono); }
.notif-panel { display: none; position: absolute; top: 45px; right: 0; width: min(390px, 86vw);
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow);
  z-index: 35; overflow: hidden; }
.notif-panel[data-open="1"] { display: block; }
.notif-panel::before { content: ""; position: absolute; top: -6px; right: 16px; width: 10px; height: 10px;
  background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: rotate(45deg); }
.notif-head { height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 14px;
  border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; }
.notif-head a { margin-left: auto; color: var(--accent); font-size: 12px; font-weight: 700; }
.notif-body { max-height: 360px; overflow: auto; padding: 6px; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 7px; color: var(--ink); }
.notif-item:hover { background: var(--surface-2); }
.notif-title { display: block; font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-detail { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto;
  font-family: var(--mono); font-size: 10px; color: var(--muted); }
.notif-empty { padding: 18px 12px; color: var(--muted); font-size: 12.5px; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex;
  flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: block; border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); padding: 12px 13px;
  color: var(--ink); animation: toast-in .18s ease both; }
.toast[data-out="1"] { animation: toast-out .24s ease both; }
.toast--crit { border-left-color: var(--crit); }
.toast--warn { border-left-color: var(--warn); }
.toast--info { border-left-color: var(--accent); }
.toast-title { font-size: 13px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-detail { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-time { font-family: var(--mono); font-size: 10.5px; color: var(--faint); margin-top: 8px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.chartjs-wrap { position: relative; width: 100%; min-height: 160px; }
.chartjs-wrap canvas { display: block; width: 100% !important; height: 100% !important; }
.auth-screen { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg); color: var(--ink); }
.auth-card { width: min(390px, 100%); padding: 24px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-md); }
.auth-field { display: block; margin-top: 11px; }
.auth-field span { display: block; font-size: 11px; font-weight: 750; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 6px; }
.auth-field input { width: 100%; height: 44px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink); outline: 0; padding: 0 12px; font-family: var(--sans); font-size: 14px; }
.auth-field input:focus { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.auth-error, .auth-note { padding: 10px 11px; border-radius: var(--r-sm); margin-bottom: 12px; font-size: 12.5px; }
.auth-error { color: var(--crit); background: var(--crit-weak); }
.auth-note { color: var(--present); background: var(--present-weak); }
.live-filterbar { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.live-log-search { height: 36px; min-width: 210px; display: flex; align-items: center; gap: 8px;
  padding: 0 11px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--muted); }
.live-log-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--ink); font-family: var(--sans); font-size: 12.5px; }
.live-log-search input::placeholder { color: var(--muted); opacity: 1; }
.live-date-picker { height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2);
  color: var(--ink); flex: 0 0 auto; cursor: pointer; position: relative; }
.live-date-picker[data-on="1"] { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.live-date-picker span { font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.live-date-picker input { position: static; width: 22px; min-width: 22px; height: 28px; margin: 0 0 0 -2px;
  padding: 0; border: 0; outline: 0; background: transparent; color: transparent; cursor: pointer; }
.live-date-picker input::-webkit-datetime-edit { color: transparent; }
.live-date-picker input::-webkit-calendar-picker-indicator { width: 18px; height: 18px; margin: 0; padding: 2px;
  cursor: pointer; opacity: .78; }
.live-select { height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 9px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2);
  color: var(--muted); flex: 0 0 auto; }
.live-select span { font-size: 12.5px; font-weight: 500; }
.live-select select { max-width: 185px; border: 0; outline: 0; background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.live-select select option { color: #111827; background: #fff; }
.live-view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.live-timeline-card { overflow: hidden; }
.live-person-list { display: flex; flex-direction: column; }
.live-person { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; padding: 14px 18px;
  border-bottom: 1px solid var(--border-2); }
.live-person:last-child { border-bottom: 0; }
.live-person-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.live-person-total { text-align: right; flex: 0 0 auto; }
.live-person-total span { display: block; font-family: var(--mono); font-size: 13px; font-weight: 750; color: var(--ink); }
.live-person-total small { display: block; margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.live-line-wrap { position: relative; min-width: 0; display: flex; align-items: flex-start; gap: 10px; overflow-x: auto;
  padding: 3px 0 4px; scrollbar-width: none; }
.live-line-wrap::-webkit-scrollbar { display: none; }
.live-line { position: absolute; left: 8px; right: 8px; top: 13px; height: 2px; background: var(--border); border-radius: 2px; }
.live-step { position: relative; z-index: 1; min-width: 118px; padding: 21px 10px 9px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-sm); }
.live-step-dot { position: absolute; top: 7px; left: 10px; width: 10px; height: 10px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 0 3px var(--surface); }
.live-step .mono { display: block; font-size: 11.5px; font-weight: 750; color: var(--ink); }
.live-step b { display: block; margin-top: 3px; font-size: 11.5px; color: currentColor; }
.live-step small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.live-step--in { color: var(--present); }
.live-step--out { color: var(--absent); }
.live-step--unk { color: var(--warn); }
.live-step--internal { color: var(--accent); }
.live-profile-link { appearance: none; border: 0; padding: 0; margin: 0; background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: 13px; font-weight: 700; cursor: pointer; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.live-profile-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.live-profile-link--large { display: block; max-width: 100%; font-size: 13.5px; }
.profile-modal { display: none; position: fixed; inset: 0; z-index: 120; place-items: center; padding: 24px; }
.profile-modal[data-open="1"] { display: grid; }
.profile-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.48); backdrop-filter: blur(2px); }
.profile-modal-card { position: relative; z-index: 1; width: min(560px, calc(100vw - 48px));
  max-height: calc(100vh - 96px); overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); box-shadow: 0 26px 80px rgba(15, 23, 42, .28); display: flex; flex-direction: column; }
.profile-modal-head { height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 14px;
  border-bottom: 1px solid var(--border); font-size: 13.5px; font-weight: 750; }
.profile-modal-head .icon-btn { margin-left: auto; width: 34px; height: 34px; }
.profile-modal-body { overflow: auto; }
.quick-profile { display: grid; gap: 14px; padding: 16px; }
.quick-profile-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.quick-profile-name { font-size: 18px; font-weight: 780; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-profile-meta { margin-top: 3px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-profile-stats div { padding: 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.quick-profile-stats span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.quick-profile-stats b { display: block; margin-top: 6px; font-size: 14px; white-space: nowrap; }
.quick-profile-section { border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.quick-profile-section-head { height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.quick-profile-section-head b { font-size: 12.5px; }
.quick-profile-section-head span { font-size: 11px; color: var(--muted); }
.quick-profile-event { display: grid; grid-template-columns: 48px auto minmax(0, 1fr); align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--border-2); }
.quick-profile-event:last-child { border-bottom: 0; }
.quick-profile-event > span { font-size: 11.5px; color: var(--ink); }
.quick-profile-event small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-profile-empty { padding: 16px; color: var(--muted); font-size: 12.5px; }
.quick-profile-actions { display: flex; justify-content: flex-end; gap: 8px; }
.enroll-card { width: min(520px, calc(100vw - 48px)); }
.enroll-form { display: grid; gap: 14px; padding: 18px; }
.enroll-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.enroll-field { display: grid; gap: 7px; min-width: 0; }
.enroll-field span { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.enroll-field .field { background: var(--surface-2); }
.enroll-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 18px;
  border-top: 1px solid var(--border); background: var(--surface-2); }
.sched-card { overflow: hidden; margin-bottom: 16px; }
.sched-head { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 18px; border-bottom: 1px solid var(--border); }
.sched-score { display: flex; align-items: baseline; gap: 7px; color: var(--warn); }
.sched-score span { font-size: 28px; font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.sched-score small { font-size: 11px; color: var(--muted); font-weight: 700; }
.sched-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid var(--border-2); background: var(--surface-2); }
.sched-mini { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.sched-mini b { font-family: var(--mono); font-size: 16px; line-height: 1; }
.sched-mini small { min-width: 0; color: var(--muted); font-size: 11.5px; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: currentColor; }
.sched-dot--warn { color: var(--warn); box-shadow: 0 0 0 4px var(--warn-weak); }
.sched-dot--crit { color: var(--crit); box-shadow: 0 0 0 4px var(--crit-weak); }
.sched-dot--muted { color: var(--muted); box-shadow: 0 0 0 4px color-mix(in srgb, var(--muted) 12%, transparent); }
.sched-dot--accent { color: var(--accent); box-shadow: 0 0 0 4px var(--accent-weak); }
.sched-empty { display: flex; align-items: center; gap: 12px; padding: 22px 18px; color: var(--muted);
  font-size: 12.5px; font-weight: 650; }
.sched-list { display: grid; gap: 0; }
.sched-item { display: grid; grid-template-columns: minmax(210px, 1.05fr) minmax(250px, 1.2fr) minmax(160px, .85fr);
  gap: 16px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--border-2);
  position: relative; }
.sched-item:last-child { border-bottom: 0; }
.sched-item::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 4px 4px 0; background: var(--warn); }
.sched-item--crit::before { background: var(--crit); }
.sched-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sched-name { font-size: 13px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-meta { margin-top: 3px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-clock { min-width: 0; }
.sched-rail { position: relative; height: 18px; margin-bottom: 5px; }
.sched-rail span { position: absolute; left: 10px; right: 10px; top: 8px; height: 3px;
  border-radius: 999px; background: linear-gradient(90deg, var(--present), var(--warn), var(--absent)); opacity: .72; }
.sched-rail i { position: absolute; top: 4px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--ink-2); box-shadow: 0 0 0 3px var(--surface); }
.sched-rail i:nth-child(2) { left: 5px; border-color: var(--present); }
.sched-rail i:nth-child(3) { right: 5px; border-color: var(--absent); }
.sched-times { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono);
  font-size: 11px; color: var(--muted); }
.sched-times span:first-child { color: var(--ink); font-weight: 750; }
.sched-issues { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.report-page { display: grid; gap: 16px; }
.report-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.report-title { font-size: 22px; font-weight: 760; letter-spacing: -.02em; }
.report-sub { margin-top: 3px; font-size: 13px; color: var(--muted); }
.report-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.report-date { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); }
.report-date span { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.report-date input { height: 30px; border: 0; outline: 0; background: transparent; color: var(--ink);
  font-family: var(--mono); font-size: 12px; }
.report-hero { display: grid; grid-template-columns: minmax(260px, .95fr) minmax(0, 1.55fr); gap: 16px;
  padding: 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
  box-shadow: var(--shadow-sm); }
.report-hero-main { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.report-hero-main > span { color: var(--accent); font-size: 10.5px; font-weight: 800; letter-spacing: .08em; }
.report-hero-main h2 { margin: 0; font-size: 28px; line-height: 1; letter-spacing: -.03em; }
.report-filter-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.report-filter-chips span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%;
  height: 28px; padding: 0 9px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 650; }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.report-kpi { min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface-2); }
.report-kpi .stat-ic { width: 30px; height: 30px; margin-bottom: 12px; background: var(--surface); }
.report-kpi b { display: block; font-size: 25px; line-height: 1; letter-spacing: -.03em; }
.report-kpi span { display: block; margin-top: 7px; font-size: 12px; color: var(--ink); font-weight: 750; }
.report-kpi small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr); gap: 16px; align-items: start; }
.report-panel { min-width: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
  box-shadow: var(--shadow-sm); overflow: hidden; }
.report-panel--wide { min-height: 100%; }
.report-panel-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--border); }
.report-panel-head b { display: block; font-size: 13.5px; }
.report-panel-head span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.report-day-list { display: grid; gap: 0; padding: 0 16px 14px; }
.report-day { display: grid; grid-template-columns: 128px minmax(90px, 1fr) 112px; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--border-2); }
.report-day div:first-child { min-width: 0; }
.report-day b { display: block; font-size: 12px; }
.report-day span { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-day strong { font-size: 11.5px; text-align: right; color: var(--ink-2); }
.report-day-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.report-day-bar i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--present); }
.report-signal-list { display: grid; gap: 0; padding: 2px 16px 14px; }
.report-signal-list div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--border-2); }
.report-signal-list div:last-child { border-bottom: 0; }
.report-signal-list span { font-size: 12.5px; color: var(--muted); }
.report-signal-list b { font-size: 12.5px; text-align: right; }
.report-list { display: grid; gap: 0; }
.report-person-row, .report-event-row { border-bottom: 1px solid var(--border-2); }
.report-person-row:last-child, .report-event-row:last-child { border-bottom: 0; }
.report-person-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(130px, auto); align-items: center;
  gap: 10px; padding: 12px 14px; }
.report-person-row b, .report-event-row b { display: block; font-size: 12.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-person-row span:not(.prio) { display: block; margin-top: 2px; font-size: 10.8px; color: var(--muted); }
.report-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.report-event-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; }
.report-event-row > div { min-width: 0; }
.report-event-row .act { margin-right: 7px; }
.report-event-row span:not(.act) { display: block; margin-top: 3px; font-size: 11.2px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-event-row time { font-size: 11.3px; color: var(--muted); text-align: right; }
.report-empty { padding: 16px; color: var(--muted); font-size: 12.5px; }
.clean-report { display: grid; gap: 16px; }
.clean-report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.clean-report-title { font-size: 21px; font-weight: 760; letter-spacing: -.02em; }
.clean-report-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }
.clean-filterbar { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.clean-filterbar label { display: grid; gap: 5px; }
.clean-filterbar label span { font-size: 10.5px; font-weight: 760; color: var(--muted); text-transform: uppercase; letter-spacing: .055em; }
.clean-filterbar input, .clean-filterbar select { height: 36px; min-width: 132px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); padding: 0 10px;
  font-family: var(--sans); font-size: 12.5px; outline: 0; }
.clean-filterbar select { min-width: 165px; }
.clean-summary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.clean-summary div { padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); box-shadow: var(--shadow-sm); }
.clean-summary span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.clean-summary b { display: block; margin-top: 8px; font-size: 22px; line-height: 1; letter-spacing: -.03em; }
.clean-report-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.clean-table-card { overflow: hidden; }
.clean-card-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--border); }
.clean-card-head b { display: block; font-size: 13.5px; }
.clean-card-head span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.clean-table-wrap { overflow: auto; }
.clean-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.clean-table th { height: 38px; padding: 0 12px; text-align: left; border-bottom: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.clean-table td { padding: 11px 12px; border-bottom: 1px solid var(--border-2); font-size: 12.5px; color: var(--ink-2); vertical-align: middle; }
.clean-table tbody tr:hover { background: var(--surface-2); }
.clean-table tbody tr:last-child td { border-bottom: 0; }
.clean-user { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.clean-user span { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clean-side { display: grid; gap: 16px; }
.clean-side-card { overflow: hidden; }
.clean-day-list, .clean-issue-list { display: grid; gap: 0; }
.clean-day-list > div, .clean-issue-list > div { padding: 12px 14px; border-bottom: 1px solid var(--border-2); }
.clean-day-list > div:last-child, .clean-issue-list > div:last-child { border-bottom: 0; }
.clean-day-list span { display: block; color: var(--muted); font-size: 11px; }
.clean-day-list b { display: block; margin-top: 4px; font-size: 12.5px; }
.clean-day-list small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.clean-issue-list > div { display: grid; gap: 8px; }
.clean-issue-list b { display: block; font-size: 12.5px; }
.clean-issue-list span.mono { display: block; margin-top: 2px; color: var(--muted); font-size: 10.8px; }
.clean-issue-list > div > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
.clean-empty { padding: 16px; color: var(--muted); font-size: 12.5px; }
.report-tabs-card { overflow: hidden; }
.report-tabs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.report-tabs-head > span { color: var(--muted); font-size: 11.5px; }
.report-tab-panel { min-height: 220px; }
.overview-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px 16px 0; }
.overview-stats div { padding: 12px 13px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.overview-stats span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.overview-stats b { display: block; margin-top: 7px; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overview-chart { margin: 16px 16px 0; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.report-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; }
.report-overview-grid .clean-side-card { border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.clean-table--compact { min-width: 720px; }

/* mobile chrome (hidden on desktop) */
.m-header, .m-tabbar { display: none; }
.m-header { flex: 0 0 auto; background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 10px 16px; align-items: center; gap: 12px; }
.m-tabbar { flex: 0 0 auto; justify-content: space-around; align-items: stretch;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 9px 6px calc(10px + env(safe-area-inset-bottom)); }
.m-tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-family: var(--sans); }
.m-tab[data-on="1"] { color: var(--accent); }
.m-tab .lab { font-size: 10px; font-weight: 500; }
.m-tab[data-on="1"] .lab { font-weight: 700; }
.m-pad { padding: 0 16px; }

/* ── responsive grids used by views ── */
.acc .kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.acc .emp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.acc .dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.acc .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acc .card { max-width: 100%; }
.acc .employee-profile-actions > button.btn,
.acc .app-content > .page-pad > .card:first-of-type > div[style*="display:flex"][style*="gap:9px"] > button.btn--ghost {
  display: none !important;
}

@keyframes accfade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.screen-enter { animation: accfade .22s ease both; }

/* ── tablet ── */
@media (max-width: 1180px) {
  .acc .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .acc .emp-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── mobile ── */
@media (max-width: 920px) {
  .app { flex-direction: column; }
  .app-side { display: none; }
  .app-topbar { display: none; }
  .m-header { display: flex; }
  .m-tabbar { display: flex; }
  .app-content { padding: 4px 0 16px; }
  .acc .kpi-grid { grid-template-columns: 1fr 1fr; }
  .acc .emp-grid { grid-template-columns: 1fr; }
  .acc .dept-grid { grid-template-columns: 1fr; }
  .acc .row.stack-m { flex-direction: column; }
  .live-person { grid-template-columns: 1fr; }
  .profile-modal { padding: 12px; align-items: end; }
  .profile-modal-card { width: 100%; max-height: calc(100vh - 96px); }
  .enroll-grid { grid-template-columns: 1fr; }
  .enroll-actions { align-items: stretch; flex-direction: column-reverse; }
  .enroll-actions .btn { width: 100%; }
  .quick-profile-stats { grid-template-columns: 1fr 1fr; }
  .sched-summary { grid-template-columns: 1fr 1fr; padding: 12px; }
  .sched-item { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px; }
  .sched-issues { justify-content: flex-start; }
  .sched-head { align-items: flex-start; }
  .report-top { align-items: stretch; flex-direction: column; }
  .report-toolbar { align-items: stretch; }
  .report-date, .report-toolbar .live-select { width: 100%; }
  .report-hero, .report-grid { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: 1fr 1fr; }
  .report-day { grid-template-columns: 1fr; gap: 7px; }
  .report-day strong { text-align: left; }
  .report-person-row { grid-template-columns: 30px minmax(0, 1fr); }
  .report-tags { grid-column: 1 / -1; justify-content: flex-start; }
  .clean-report-head { flex-direction: column; align-items: stretch; }
  .clean-filterbar { align-items: stretch; }
  .clean-filterbar label, .clean-filterbar input, .clean-filterbar select { width: 100%; }
  .clean-summary { grid-template-columns: 1fr 1fr; }
  .clean-report-grid { grid-template-columns: 1fr; }
  .report-tabs-head { align-items: flex-start; flex-direction: column; }
  .overview-stats { grid-template-columns: 1fr 1fr; padding: 12px 12px 0; }
  .overview-chart { margin: 12px 12px 0; }
  .report-overview-grid { grid-template-columns: 1fr; padding: 12px; }
  .acc .row.stack-m > * { width: 100% !important; flex: 1 1 auto !important; }
  .acc .hide-m { display: none !important; }
  .acc .page-pad { padding: 0 16px; }
}
@media (min-width: 921px) {
  .acc .only-m { display: none !important; }
}
