:root {
  color-scheme: dark;
  --bg: #06070a;
  --bg-elevated: #0b0e14;
  --surface: #0f131b;
  --surface-2: #151b26;
  --surface-hover: #1a212f;
  --glass: rgba(15, 19, 27, 0.78);
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.15);
  --specular: rgba(255, 255, 255, 0.11);
  --ink: #f4f6fb;
  --ink-soft: #9aa4b5;
  --ink-faint: #646f82;
  --gold: #d4ae4c;
  --gold-bright: #f2d275;
  --gold-soft: rgba(242, 210, 117, 0.12);
  --gold-glow: rgba(242, 210, 117, 0.25);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.13);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.14);
  --blue: #38bdf8;
  --blue-soft: rgba(56, 189, 248, 0.13);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 var(--specular);
  --shadow-md: 0 20px 55px rgba(0, 0, 0, 0.55), inset 0 1px 0 var(--specular);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --sidebar: 252px;
  font-family: "SF Pro Display", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 14% -8%, rgba(242, 210, 117, 0.065), transparent 65%),
    radial-gradient(720px 480px at 92% 105%, rgba(56, 189, 248, 0.055), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
a { color: inherit; }
.hidden { display: none !important; }

/* Boot screen */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: #fff;
  background: var(--bg);
}

.boot-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border: 1px solid rgba(242, 210, 117, 0.35);
  border-radius: 22px;
  background: radial-gradient(circle at 30% 20%, rgba(242, 210, 117, 0.14), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 40px rgba(242, 210, 117, 0.14);
}
.boot-mark img { width: 42px; height: 42px; object-fit: contain; }
.boot-screen strong { font-size: 17px; letter-spacing: 0.22em; font-weight: 700; }
.boot-screen span { color: var(--ink-faint); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.boot-line { width: 180px; height: 2px; margin-top: 20px; overflow: hidden; border-radius: 2px; background: #1a202c; }
.boot-line i { display: block; width: 45%; height: 100%; background: linear-gradient(90deg, transparent, var(--gold-bright), transparent); animation: load 1.1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-120%); } to { transform: translateX(340%); } }
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

/* Login Cockpit */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(420px, 0.82fr);
  background: var(--bg);
}

.login-brand {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(44px, 6.5vw, 96px);
  background:
    radial-gradient(640px 440px at 18% 22%, rgba(242, 210, 117, 0.09), transparent 62%),
    radial-gradient(560px 420px at 85% 82%, rgba(56, 189, 248, 0.07), transparent 65%),
    #050608;
  border-right: 1px solid var(--line);
}

.login-grid-bg, .kiosk-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 40% 40%, #000 10%, transparent 80%);
}

.login-brand-content { position: relative; z-index: 2; max-width: 640px; }
.brand-kicker { display: inline-flex; align-items: center; gap: 11px; color: var(--gold-bright); font-size: 12px; font-weight: 750; letter-spacing: 0.18em; text-transform: uppercase; }
.brand-kicker img { width: 28px; height: 28px; object-fit: contain; }
.login-live-clock {
  margin-top: 34px;
  font-size: clamp(42px, 4.6vw, 66px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.login-live-date {
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.login-brand h1 {
  margin: 32px 0 18px;
  font-size: clamp(44px, 5vw, 76px);
  line-height: 1.01;
  letter-spacing: -0.055em;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 10%, #98a2b3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-brand p { max-width: 540px; margin: 0; color: var(--ink-soft); font-size: clamp(15px, 1.35vw, 18px); line-height: 1.6; }
.login-proof { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.login-proof div { display: grid; gap: 3px; }
.login-proof strong { font-size: 20px; font-weight: 650; color: #fff; letter-spacing: -0.02em; }
.login-proof span { color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; }
.login-kicker-actions { margin-top: 32px; display: flex; gap: 12px; }
.brand-watermark {
  position: absolute;
  width: min(44vw, 540px);
  height: min(44vw, 540px);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.085;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 60px rgba(242, 210, 117, 0.16));
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.95) 28%, rgba(0, 0, 0, 0.35) 68%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.95) 28%, rgba(0, 0, 0, 0.35) 68%, transparent 100%);
}
.brand-watermark img { width: 100%; height: 100%; object-fit: contain; }
.kiosk-watermark {
  position: absolute;
  width: min(46vw, 560px);
  height: min(46vw, 560px);
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  opacity: 0.06;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9) 25%, transparent 88%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9) 25%, transparent 88%);
}
.kiosk-watermark img { width: 100%; height: 100%; object-fit: contain; }

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background: radial-gradient(circle at 50% 0%, rgba(242, 210, 117, 0.04), transparent 55%), var(--bg-elevated);
}
.login-card {
  width: min(100%, 420px);
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-md);
}
.eyebrow { color: var(--gold-bright); font-size: 11px; font-weight: 750; letter-spacing: 0.16em; text-transform: uppercase; }
.login-card h2 { margin: 8px 0 6px; font-size: 32px; letter-spacing: -0.04em; font-weight: 680; }
.login-card > p { margin: 0 0 26px; color: var(--ink-soft); font-size: 13px; }
.login-card label { display: grid; gap: 7px; margin: 14px 0; }
.login-card label span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.login-card input {
  height: 52px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 16px;
  color: #fff;
  background: rgba(6, 7, 10, 0.72);
  font-size: 16px;
  letter-spacing: 0.08em;
  outline: none;
  transition: 160ms ease;
}
.login-card input:focus { border-color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(242, 210, 117, 0.15); }
.login-card .button { width: 100%; margin-top: 12px; }
.mobile-kiosk-trigger { display: none !important; }
.login-setup { display: grid; gap: 4px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; }
.login-setup > span { color: var(--ink-faint); font-size: 12px; }
.login-help { margin-top: 20px !important; text-align: center; font-size: 11px; color: var(--ink-faint) !important; }
.mobile-login-logo { display: none; }

/* Warehouse Kiosk Mode */
.kiosk-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    radial-gradient(900px 600px at 18% 20%, rgba(242, 210, 117, 0.075), transparent 65%),
    radial-gradient(700px 500px at 85% 85%, rgba(52, 211, 153, 0.055), transparent 65%),
    #040508;
  overflow: auto;
}
.kiosk-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 7, 10, 0.72);
  backdrop-filter: blur(20px);
}
.kiosk-brand { display: flex; align-items: center; gap: 14px; }
.kiosk-brand img { width: 38px; height: 38px; object-fit: contain; }
.kiosk-brand strong { display: block; font-size: 15px; letter-spacing: 0.16em; }
.kiosk-brand span { display: block; color: var(--ink-faint); font-size: 12px; }
.kiosk-topbar-right { display: flex; align-items: center; gap: 12px; }
.kiosk-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 460px);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 56px);
}
.kiosk-telemetry { display: grid; gap: 12px; }
.kiosk-clock {
  font-size: clamp(56px, 7.5vw, 106px);
  font-weight: 280;
  line-height: 0.96;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.kiosk-date { color: var(--ink-soft); font-size: 18px; letter-spacing: -0.01em; }
.kiosk-selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; max-width: 520px; }
.kiosk-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.kiosk-status-strip div { display: grid; gap: 2px; }
.kiosk-status-strip span { font-size: 10px; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.kiosk-status-strip strong { font-size: 14px; color: var(--ink); }

.kiosk-console {
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  padding: 28px;
  background: rgba(13, 17, 24, 0.88);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-md);
}
.kiosk-step-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.kiosk-step-head h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -0.03em; }
.kiosk-display {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #06080d;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.24em;
  font-variant-numeric: tabular-nums;
}
.kiosk-dots { display: flex; gap: 14px; }
.kiosk-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: 120ms ease; }
.kiosk-dot.filled { border-color: var(--gold-bright); background: var(--gold-bright); box-shadow: 0 0 12px var(--gold-glow); }
.kiosk-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kiosk-key {
  height: 64px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: #fff;
  font-size: 22px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  transition: 100ms ease;
}
.kiosk-key:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.kiosk-key:active { transform: scale(0.97); }
.kiosk-key.key-alt { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.kiosk-key.key-go { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #0b0d11; border-color: transparent; font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.kiosk-person-card { display: grid; gap: 18px; text-align: center; padding: 8px 0; }
.kiosk-person-card .avatar { width: 64px; height: 64px; margin: 0 auto; font-size: 20px; }
.kiosk-person-card h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.kiosk-action-grid { display: grid; gap: 10px; margin-top: 6px; }
.kiosk-action-grid .button { min-height: 58px; font-size: 15px; border-radius: 14px; }
.kiosk-confirm { display: grid; justify-items: center; gap: 10px; padding: 28px 10px; text-align: center; }
.kiosk-check { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 30px; border: 1px solid rgba(52, 211, 153, 0.35); box-shadow: 0 0 36px rgba(52, 211, 153, 0.22); }

/* Main App Shell */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  color: var(--ink);
  background: rgba(9, 11, 16, 0.94);
  backdrop-filter: blur(22px);
  border-right: 1px solid var(--line);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 24px; }
.sidebar-brand img { width: 34px; height: 34px; object-fit: contain; }
.sidebar-brand div { display: grid; line-height: 1.05; }
.sidebar-brand strong { font-size: 16px; letter-spacing: 0.12em; }
.sidebar-brand span { color: var(--gold-bright); font-size: 10px; font-weight: 750; letter-spacing: 0.22em; }
.main-nav { display: grid; gap: 4px; overflow-y: auto; }
.nav-section { margin: 16px 10px 6px; color: var(--ink-faint); font-size: 10px; font-weight: 750; letter-spacing: 0.16em; text-transform: uppercase; }
.nav-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  gap: 11px;
  padding: 9px 11px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  transition: 140ms ease;
}
.nav-button:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.nav-button.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(242, 210, 117, 0.12), rgba(255, 255, 255, 0.03));
  border-color: rgba(242, 210, 117, 0.22);
}
.nav-button.active::before { content: ""; position: absolute; left: -14px; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--gold-bright); box-shadow: 0 0 12px var(--gold-glow); }
.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  transition: 140ms ease;
}
.nav-icon svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-button:hover .nav-icon, .nav-button.active .nav-icon { color: var(--gold-bright); border-color: rgba(242, 210, 117, 0.32); background: rgba(242, 210, 117, 0.08); }
.nav-button span:nth-child(2) { flex: 1; font-weight: 600; font-size: 13px; }
.nav-badge { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; border-radius: 20px; color: #090b10; background: var(--gold-bright); font-size: 10px; font-weight: 850; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; }
.kiosk-sidebar-btn { border: 1px solid rgba(242, 210, 117, 0.18); background: rgba(242, 210, 117, 0.05); color: var(--gold-bright); }
.kiosk-sidebar-btn:hover { background: rgba(242, 210, 117, 0.12); color: #fff; }
.profile-button { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 12px; color: #fff; background: transparent; text-align: left; }
.profile-button:hover { background: rgba(255, 255, 255, 0.04); }
.profile-button > span:nth-child(2) { display: grid; min-width: 0; }
.profile-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.profile-button small { color: var(--ink-faint); text-transform: capitalize; font-size: 11px; }
.profile-button b { color: var(--ink-faint); letter-spacing: 1px; }
/* GCA Mac-style Glowing Crest Emblem */
.avatar, .header-avatar {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #1d2330, #07090e 78%);
  border: 2px solid var(--emblem-color, var(--gold-bright));
  box-shadow: 0 0 14px color-mix(in srgb, var(--emblem-color, var(--gold-bright)) 38%, transparent), inset 0 0 8px color-mix(in srgb, var(--emblem-color, var(--gold-bright)) 24%, transparent);
  color: var(--emblem-color, var(--gold-bright));
  overflow: hidden;
  padding: 5px;
}
.avatar img, .header-avatar img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--emblem-color, var(--gold-bright)) 50%, transparent)); }
.avatar { width: 38px; height: 38px; }
.header-avatar { width: 38px; height: 38px; cursor: pointer; }
.profile-panel .avatar { width: 76px; height: 76px; padding: 11px; border-width: 2.5px; }

/* Persistent Nagging Alerts Stack */
.alert-banner-stack { max-width: 1460px; margin: 0 auto 16px; display: grid; gap: 10px; }
.alert-banner-stack:empty { display: none; margin: 0; }
.nag-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
  animation: toast-in 0.2s ease-out;
}
.nag-banner-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.nag-pulse { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(255,255,255,0.1); }
.nag-banner strong { display: block; font-size: 13px; letter-spacing: -0.01em; color: #fff; }
.nag-banner span { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.nag-banner.nag-late {
  border-color: rgba(251, 113, 133, 0.55);
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.22), rgba(15, 19, 27, 0.94));
  color: var(--red);
  box-shadow: 0 0 28px rgba(244, 63, 94, 0.16);
}
.nag-banner.nag-break {
  border-color: rgba(251, 191, 36, 0.55);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.2), rgba(15, 19, 27, 0.94));
  color: var(--amber);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.14);
}
.nag-banner.nag-policy {
  border-color: rgba(251, 113, 133, 0.55);
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.2), rgba(15, 19, 27, 0.95));
  color: var(--red);
  box-shadow: 0 0 24px rgba(244, 63, 94, 0.14);
}
.nag-banner.nag-confirmed {
  border-color: rgba(52, 211, 153, 0.55);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.22), rgba(15, 19, 27, 0.95));
  color: var(--green);
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.16);
}
.action-policy-stack {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}
.action-policy-item {
  display: grid;
  gap: 8px;
  padding: 15px 16px;
  border-radius: 13px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-left: 3px solid var(--red);
  background: var(--surface-2);
}
.action-policy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.action-policy-item h4 {
  margin: 2px 0 0;
  font-size: 14.5px;
  color: var(--ink);
}
.action-policy-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
}
.role-chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 650;
  color: var(--ink);
}
.role-chip strong { color: var(--gold-bright); font-weight: 750; }
.period-tabs { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); gap: 4px; }
.period-tab { padding: 7px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-soft); font-size: 12px; font-weight: 650; transition: 140ms ease; }
.period-tab.active { background: var(--gold-bright); color: #090b10; }
.emblem-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.emblem-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.emblem-swatch.selected { border-color: #fff; transform: scale(1.12); }

@media print {
  .sidebar, .app-header, .mobile-nav, .alert-banner-stack, .button-row, .period-tabs, .toast-stack, .modal-layer { display: none !important; }
  .app-main { margin-left: 0 !important; }
  body { background: #fff !important; color: #111 !important; }
  .card { background: #fff !important; color: #111 !important; border: 1px solid #ccc !important; box-shadow: none !important; }
  .metric-card strong, .data-table td, .data-table th { color: #111 !important; }
}

/* Header */
.app-main { min-height: 100vh; margin-left: var(--sidebar); }
.app-header {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 3.8vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 7, 10, 0.8);
  backdrop-filter: blur(22px);
}
.page-kicker { display: block; margin-bottom: 2px; color: var(--ink-faint); font-size: 10px; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; }
.app-header h1 { margin: 0; font-size: 24px; line-height: 1.1; letter-spacing: -0.035em; font-weight: 680; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-clock {
  padding: 0 12px;
  height: 34px;
  display: flex;
  align-items: center;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.online-chip {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 20px;
  color: var(--green);
  background: rgba(52, 211, 153, 0.08);
  font-size: 11px;
  font-weight: 700;
}
.online-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.online-chip i.pulse { animation: pulse-ring 2.2s infinite; }
.icon-button, .header-avatar { width: 36px; height: 36px; border: 1px solid var(--line); }
.icon-button { border-radius: 50%; color: var(--ink-soft); background: rgba(255, 255, 255, 0.04); font-size: 16px; transition: 140ms ease; }
.icon-button:hover { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, 0.08); }
.header-avatar { border: 0; }
.view-wrap { padding: clamp(20px, 3vw, 40px); }
.view { max-width: 1460px; margin: 0 auto; }

/* View Intro & Buttons */
.view-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.view-intro h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.03em; font-weight: 660; }
.view-intro p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--ink);
  background: var(--surface-2);
  font-weight: 650;
  font-size: 13px;
  text-decoration: none;
  transition: 140ms ease;
}
.button:hover { transform: translateY(-1px); background: var(--surface-hover); border-color: rgba(255, 255, 255, 0.24); }
.button-primary { border-color: rgba(255, 255, 255, 0.22); color: #06070a; background: #f4f6fb; }
.button-primary:hover { background: #ffffff; color: #06070a; }
.button-gold {
  border-color: transparent;
  color: #090b10;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  box-shadow: 0 8px 24px rgba(242, 210, 117, 0.2);
}
.button-gold:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--gold-bright), var(--gold)); }
.button-emerald {
  border-color: transparent;
  color: #04120c;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.22);
}
.button-glass { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); color: var(--ink); backdrop-filter: blur(12px); }
.button-glass:hover { background: rgba(255, 255, 255, 0.1); }
.button-danger { border-color: rgba(251, 113, 133, 0.35); color: var(--red); background: var(--red-soft); }
.button-danger:hover { background: rgba(251, 113, 133, 0.22); }
.button-quiet { border-color: var(--line); background: transparent; color: var(--ink-soft); }
.button-quiet:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.button-small { min-height: 32px; padding: 0 11px; font-size: 11px; border-radius: 9px; }
.button-large { min-height: 50px; font-size: 14px; border-radius: 13px; }
.link-button { padding: 0; border: 0; color: var(--gold-bright); background: transparent; font-weight: 650; font-size: 12px; }
.link-button:hover { text-decoration: underline; }

/* Cards & Grids */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.78fr); gap: 18px; align-items: start; }
.dashboard-grid > *, .stack, .card { min-width: 0; }
.stack { display: grid; gap: 16px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.card-header h3 { margin: 0; font-size: 13px; font-weight: 680; letter-spacing: 0.01em; }
.card-header span, .muted { color: var(--ink-soft); }
.section-label { color: var(--gold-bright); font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }

/* Metric Cards */
.metric-card { padding: 18px 20px; }
.metric-card span { color: var(--ink-soft); font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.metric-card strong { display: block; margin: 8px 0 4px; font-size: 28px; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: #fff; }
.metric-card small { color: var(--ink-faint); font-size: 11px; }
.metric-card.emphasis {
  border-color: rgba(242, 210, 117, 0.28);
  background: linear-gradient(150deg, rgba(242, 210, 117, 0.1), var(--surface) 60%);
}
.metric-card.emphasis strong { color: var(--gold-bright); }

/* Tesla Telemetry Hero */
.today-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3.6vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(500px 320px at 88% 18%, rgba(242, 210, 117, 0.11), transparent 60%),
    linear-gradient(160deg, #121722 0%, #090c12 100%);
  box-shadow: var(--shadow-md);
}
.today-hero.state-working {
  border-color: rgba(52, 211, 153, 0.26);
  background:
    radial-gradient(500px 320px at 88% 18%, rgba(52, 211, 153, 0.13), transparent 60%),
    linear-gradient(160deg, #0f1918 0%, #080c10 100%);
}
.today-hero.state-break {
  border-color: rgba(251, 191, 36, 0.28);
  background:
    radial-gradient(500px 320px at 88% 18%, rgba(251, 191, 36, 0.13), transparent 60%),
    linear-gradient(160deg, #19150d 0%, #0a0b0f 100%);
}
.hero-layout { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.hero-status { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-bright); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.state-working .hero-status { color: var(--green); }
.state-break .hero-status { color: var(--amber); }
.hero-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.hero-time { color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.today-hero h2 { margin: 8px 0 6px; font-size: clamp(34px, 4.6vw, 54px); line-height: 1; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; font-weight: 600; }
.today-hero .hero-copy { margin: 0; color: var(--ink-soft); font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.today-hero .button { min-height: 48px; padding: 0 22px; border-radius: 13px; }
.shift-details { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.shift-details div { display: grid; gap: 3px; }
.shift-details span { color: var(--ink-faint); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.12em; }
.shift-details strong { font-size: 13px; color: var(--ink); }

/* SVG Shift Gauge Ring */
.telemetry-ring {
  position: relative;
  width: 164px;
  height: 164px;
  display: grid;
  place-items: center;
}
.telemetry-ring svg { width: 164px; height: 164px; transform: rotate(-90deg); }
.telemetry-ring circle.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 7; }
.telemetry-ring circle.ring-fg {
  fill: none;
  stroke: var(--gold-bright);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 450ms ease;
  filter: drop-shadow(0 0 8px rgba(242, 210, 117, 0.45));
}
.state-working .telemetry-ring circle.ring-fg { stroke: var(--green); filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.5)); }
.state-break .telemetry-ring circle.ring-fg { stroke: var(--amber); filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.5)); }
.telemetry-ring-label { position: absolute; text-align: center; display: grid; gap: 2px; }
.telemetry-ring-label strong { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.telemetry-ring-label span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }

/* Meal compliance bar */
.meal-meter { margin-top: 16px; display: grid; gap: 6px; max-width: 380px; }
.meal-meter-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-soft); }
.meal-meter-track { height: 5px; border-radius: 5px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.meal-meter-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--gold-bright)); }

/* Timeline */
.timeline { display: grid; }
.timeline-row { display: grid; grid-template-columns: 64px 14px 1fr auto; gap: 12px; align-items: start; min-height: 68px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.timeline-row:last-child { border-bottom: 0; }
.timeline-time { color: var(--ink-soft); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline-dot { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 0 10px rgba(242, 210, 117, 0.45); }
.timeline-copy { display: grid; gap: 3px; }
.timeline-copy strong { font-size: 13px; }
.timeline-copy span { color: var(--ink-soft); font-size: 11px; }
.timeline-date { color: var(--ink-faint); font-size: 11px; }

/* Status Pills */
.status-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px; border-radius: 20px; font-size: 10px; font-weight: 750; letter-spacing: 0.03em; text-transform: capitalize; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-green, .status-working, .status-approved, .status-resolved, .status-completed, .status-active { color: var(--green); background: var(--green-soft); }
.status-amber, .status-warning, .status-pending, .status-scheduled, .status-open { color: var(--amber); background: var(--amber-soft); }
.status-red, .status-critical, .status-declined, .status-late_or_absent { color: var(--red); background: var(--red-soft); }
.status-blue, .status-info, .status-submitted { color: var(--blue); background: var(--blue-soft); }
.status-neutral, .status-draft, .status-inactive { color: var(--ink-soft); background: rgba(255, 255, 255, 0.06); }

/* Lists & Empty states */
.list { display: grid; }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-primary { min-width: 0; display: flex; align-items: center; gap: 12px; }
.list-primary > div { min-width: 0; display: grid; gap: 2px; }
.list-primary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.list-primary span { color: var(--ink-soft); font-size: 11px; }
.person-dot {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--gold-bright);
  border: 1px solid rgba(242, 210, 117, 0.24);
  background: var(--gold-soft);
  font-size: 11px;
  font-weight: 800;
}
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.empty-state { padding: 40px 24px; text-align: center; color: var(--ink-soft); font-size: 13px; }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; }

/* Command Banner */
.command-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 210, 117, 0.2);
  background:
    radial-gradient(420px 200px at 0% 50%, rgba(242, 210, 117, 0.1), transparent 65%),
    linear-gradient(120deg, #111620, #0b0e14);
  box-shadow: var(--shadow-sm);
}
.command-banner strong { display: block; font-size: 18px; letter-spacing: -0.02em; }
.command-banner span { color: var(--ink-soft); font-size: 12px; }
.command-banner-metrics { display: flex; gap: 32px; }
.command-banner-metrics div { display: grid; text-align: right; }
.command-banner-metrics strong { color: var(--gold-bright); font-size: 24px; font-variant-numeric: tabular-nums; }
.command-banner-metrics span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }

/* Alert Cards */
.alert-list { display: grid; gap: 10px; }
.alert-card { display: grid; grid-template-columns: 4px 1fr auto; gap: 13px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.alert-bar { align-self: stretch; border-radius: 4px; background: var(--amber); }
.alert-card.critical .alert-bar { background: var(--red); }
.alert-copy { display: grid; gap: 3px; }
.alert-copy strong { font-size: 12px; }
.alert-copy span { color: var(--ink-soft); font-size: 11px; }

/* Tables */
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th {
  height: 42px;
  padding: 0 16px;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td { height: 56px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }

/* Schedule Board */
.schedule-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.date-nav { display: flex; align-items: center; gap: 8px; }
.date-nav strong { min-width: 180px; text-align: center; font-size: 14px; }
.schedule-board { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.schedule-day { min-height: 520px; border-right: 1px solid var(--line); }
.schedule-day:last-child { border-right: 0; }
.schedule-day.drag-over { background: rgba(242, 210, 117, 0.08); }
.schedule-day-head { position: sticky; top: 0; z-index: 2; min-height: 66px; display: grid; place-content: center; text-align: center; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.schedule-day-head span { color: var(--ink-faint); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.1em; }
.schedule-day-head strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.schedule-day.today .schedule-day-head strong { width: 30px; height: 30px; display: grid; place-items: center; margin: 2px auto 0; color: #090b10; border-radius: 50%; background: var(--gold-bright); }
.schedule-day-body { display: grid; align-content: start; gap: 8px; padding: 9px; }
.schedule-shift { position: relative; display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-left: 3px solid var(--job-color, var(--gold-bright)); border-radius: 10px; background: var(--surface-2); cursor: grab; }
.schedule-shift:active { cursor: grabbing; }
.schedule-shift strong { font-size: 11px; }
.schedule-shift span { color: var(--ink-soft); font-size: 10px; }
.schedule-shift small { color: var(--ink-faint); font-size: 10px; }
.schedule-add { width: 100%; min-height: 36px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--ink-faint); background: transparent; font-size: 11px; }
.schedule-add:hover { color: var(--gold-bright); border-color: var(--gold); background: var(--gold-soft); }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field > span { color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: #07090e;
  outline: none;
  transition: 140ms ease;
}
.field input, .field select { min-height: 43px; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(242, 210, 117, 0.14); }
.check-field { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 12px; }
.check-field input { width: 17px; height: 17px; accent-color: var(--gold-bright); }

/* Policies */
.policy-card { display: grid; gap: 10px; padding: 18px; background: var(--surface-2); }
.policy-card h3 { margin: 0; font-size: 14px; }
.policy-card p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.policy-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.policy-meta span { color: var(--ink-faint); font-size: 11px; }

/* Bar Chart */
.bar-chart { display: grid; gap: 13px; padding: 18px 20px 22px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 145px) 1fr 68px; gap: 12px; align-items: center; }
.bar-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); font-size: 12px; }
.bar-track { height: 8px; overflow: hidden; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }
.bar-fill { height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.bar-row strong { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }

/* Profile Panel */
.profile-panel { display: grid; justify-items: center; gap: 10px; padding: 28px 22px; text-align: center; }
.profile-panel .avatar { width: 66px; height: 66px; font-size: 18px; }
.profile-panel h2 { margin: 6px 0 0; font-size: 20px; }
.profile-panel p { margin: 0; color: var(--ink-soft); text-transform: capitalize; font-size: 12px; }

/* Modals & Toasts */
.modal-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal-scrim { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(2, 3, 6, 0.74); backdrop-filter: blur(8px); }
.modal-card {
  position: relative;
  width: min(100%, 820px);
  max-height: min(88vh, 880px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.7);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 2px 0 0; font-size: 19px; letter-spacing: -0.025em; }
.modal-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; }
.modal-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--ink-soft); font-size: 18px; }
.modal-close:hover { color: #fff; border-color: var(--line-strong); }
.modal-body { padding: 20px 24px 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

.toast-stack { position: fixed; top: 20px; right: 20px; z-index: 200; display: grid; gap: 9px; width: min(360px, calc(100vw - 40px)); }
.toast { display: grid; grid-template-columns: 4px 1fr; gap: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 13px; background: rgba(15, 19, 27, 0.95); backdrop-filter: blur(18px); box-shadow: var(--shadow-md); animation: toast-in 0.2s ease-out; }
.toast i { border-radius: 4px; background: var(--green); }
.toast.error i { background: var(--red); }
.toast strong { display: block; font-size: 12px; color: #fff; }
.toast span { color: var(--ink-soft); font-size: 11px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
.form-message { min-height: 18px; margin-top: 12px; color: var(--red); font-size: 12px; text-align: center; }
.skeleton { min-height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, #0f131b 25%, #171d2a 50%, #0f131b 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }

/* Extra Hours & Availability Picker (Tesla Obsidian Edition) */
.eh-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 10px;
}
.eh-slot-head:first-child { margin-top: 0; }
.eh-slot-head span { color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.eh-slot-head strong { color: var(--gold-bright); font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.eh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.eh-chip {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 140ms ease;
}
.eh-chip:hover { border-color: rgba(242, 210, 117, 0.4); color: #fff; }
.eh-chip.active {
  border-color: var(--gold-bright);
  background: linear-gradient(155deg, rgba(242, 210, 117, 0.22), rgba(212, 174, 76, 0.08));
  color: var(--gold-bright);
  box-shadow: 0 0 18px rgba(242, 210, 117, 0.14);
}
.eh-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.eh-chip.active .eh-chip-dot {
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold-bright);
}
.eh-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.eh-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 11px;
}
.eh-legend span { display: inline-flex; align-items: center; gap: 6px; }
.eh-legend i {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
}
.eh-legend i.l-a { border-color: var(--gold-bright); background: rgba(242, 210, 117, 0.28); }
.eh-legend i.l-c { border-color: var(--green); background: rgba(52, 211, 153, 0.28); }
.eh-legend i.l-x { border-color: var(--red); background: rgba(251, 113, 133, 0.22); }

.eh-months {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1120px) {
  .eh-months {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}
.eh-month {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.eh-month h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.eh-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.eh-dow {
  text-align: center;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 4px;
}
.eh-day {
  min-height: 54px;
  padding: 6px 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: 120ms ease;
}
.eh-day.empty {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}
.eh-day .n {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.eh-day .s {
  font-size: 8.5px;
  color: var(--ink-faint);
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eh-day:not(.past):not(.empty):hover {
  border-color: rgba(242, 210, 117, 0.55);
  background: var(--surface-hover);
}
.eh-day.avail {
  border-color: rgba(242, 210, 117, 0.72);
  background: linear-gradient(155deg, rgba(242, 210, 117, 0.22), rgba(212, 174, 76, 0.08));
}
.eh-day.avail .n { color: var(--gold-bright); }
.eh-day.avail .s { color: var(--ink); font-weight: 600; }
.eh-day.confirmed {
  border-color: rgba(52, 211, 153, 0.8);
  background: linear-gradient(155deg, rgba(52, 211, 153, 0.24), rgba(16, 185, 129, 0.08));
}
.eh-day.confirmed .n { color: var(--green); }
.eh-day.confirmed .s { color: var(--ink); font-weight: 600; }
.eh-day.blocked {
  border-color: rgba(251, 113, 133, 0.55);
  background: rgba(251, 113, 133, 0.12);
}
.eh-day.blocked .n { color: var(--red); text-decoration: line-through; }
.eh-day.blocked .s { color: var(--red); font-weight: 600; }
.eh-day.past {
  opacity: 0.32;
  background: rgba(255, 255, 255, 0.02);
  cursor: not-allowed;
}
.eh-day.selected {
  outline: 2px solid var(--gold-bright);
  outline-offset: 1px;
}
.eh-day.confirmed.selected {
  outline-color: var(--green);
}
.eh-count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold-bright);
  color: #090b10;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.eh-count-badge.confirmed {
  background: var(--green);
  color: #052e16;
}
.schedule-table th {
  padding: 12px 10px;
  vertical-align: top;
}
.schedule-table td {
  padding: 10px 8px;
  vertical-align: middle;
}
.sched-day-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 40px;
}
.sched-day-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.sched-day-top strong {
  font-size: 14px;
  font-weight: 750;
  color: var(--ink);
}
.sched-day-sub {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-faint);
  text-transform: none;
  letter-spacing: 0;
}
.sched-pill {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid rgba(242, 210, 117, 0.7);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  transition: 140ms ease;
}
.sched-pill:hover {
  border-color: rgba(242, 210, 117, 0.55);
  background: rgba(242, 210, 117, 0.08);
}
.sched-pill.confirmed {
  border-color: rgba(52, 211, 153, 0.45);
  border-left-color: var(--green);
  background: rgba(52, 211, 153, 0.1);
}
.sched-pill strong { font-size: 12px; font-weight: 700; white-space: nowrap; }
.sched-pill small { font-size: 10.5px; color: var(--gold); font-weight: 600; }
.sched-pill.confirmed small { color: var(--green); }
.toggle-list {
  display: grid;
  gap: 10px;
}
.toggle-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 13px 15px;
  display: grid;
  gap: 12px;
}
.toggle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.toggle-copy strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
}
.toggle-copy span {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--line-strong);
  transition: 160ms ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: 160ms ease;
}
.switch input:checked + .switch-track {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}
.switch input:checked + .switch-track::after {
  transform: translateX(20px);
  background: #090b10;
}
.toggle-body {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.matrix-table th {
  white-space: normal;
  line-height: 1.25;
  padding: 10px 8px;
  font-size: 10.5px;
}
.matrix-table td {
  padding: 10px 8px;
}

/* Punctuality Scorecard & Attendance Dots */
.metric-card.clickable { cursor: pointer; transition: 140ms ease; }
.metric-card.clickable:hover { border-color: rgba(242, 210, 117, 0.4); transform: translateY(-1px); }
.punct-card { padding: 20px; display: grid; gap: 16px; }
.punct-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.punct-score-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.punct-big { font-size: 36px; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.punct-bar-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.punct-bar-fill { height: 100%; border-radius: inherit; transition: width 300ms ease; }
.punct-dots-wrap { display: grid; gap: 8px; }
.punct-dots-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--ink-soft); }
.punct-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.punct-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.punct-dot i { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.punct-dot.on-time { border-color: rgba(52, 211, 153, 0.25); }
.punct-dot.on-time i { background: var(--green); box-shadow: 0 0 8px rgba(52, 211, 153, 0.55); }
.punct-dot.late { border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.1); color: #fecdd3; }
.punct-dot.late i { background: var(--red); box-shadow: 0 0 8px rgba(251, 113, 133, 0.6); }
.grade-badge {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  height: 54px;
  padding: 0 12px;
  border-radius: 15px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  border: 1px solid rgba(242, 210, 117, 0.35);
  background: linear-gradient(155deg, rgba(242, 210, 117, 0.2), rgba(242, 210, 117, 0.04));
  color: var(--gold-bright);
}
.grade-badge.good { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.13); color: var(--green); }
.grade-badge.warn { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.14); color: var(--amber); }
.grade-badge.bad { border-color: rgba(251, 113, 133, 0.45); background: rgba(251, 113, 133, 0.14); color: var(--red); }
.resource-card { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.resource-card h4 { margin: 0; font-size: 14px; }
.resource-card p { margin: 0; font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.resource-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* Worker Monthly Schedule Calendar (Full & Compact Sidebar) */
.ws-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.ws-cal-grid.compact {
  gap: 5px;
}
.ws-cal-dow {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 4px 0 6px;
}
.ws-cal-cell {
  min-height: 78px;
  padding: 8px 9px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  transition: 140ms ease;
}
.ws-cal-cell.empty {
  background: transparent;
  border-color: transparent;
  min-height: 0;
  padding: 0;
}
.ws-cal-cell.work {
  border-color: rgba(242, 210, 117, 0.22);
  background: linear-gradient(180deg, rgba(242, 210, 117, 0.06), rgba(255, 255, 255, 0.015));
}
.ws-cal-cell.past {
  opacity: 0.72;
}
.ws-cal-cell.off {
  background: rgba(255, 255, 255, 0.012);
  border-color: rgba(255, 255, 255, 0.045);
}
.ws-cal-cell.holiday {
  background: rgba(234, 185, 82, 0.05);
  border-color: rgba(234, 185, 82, 0.2);
}
.ws-cal-cell.extra {
  background: rgba(52, 211, 153, 0.11);
  border-color: rgba(52, 211, 153, 0.45);
}
.ws-cal-cell.today {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px rgba(242, 210, 117, 0.45), 0 0 18px rgba(242, 210, 117, 0.14);
  opacity: 1;
}
.ws-cal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.ws-cal-num {
  font-size: 13px;
  font-weight: 750;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ws-cal-cell.today .ws-cal-num {
  color: var(--gold-bright);
}
.ws-cal-cell.off .ws-cal-num {
  color: var(--ink-faint);
}
.ws-cal-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
}
.ws-cal-badge.today {
  background: rgba(242, 210, 117, 0.2);
  color: var(--gold-bright);
}
.ws-cal-badge.extra {
  background: rgba(52, 211, 153, 0.2);
  color: var(--green);
}
.ws-cal-label {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.25;
}
.ws-cal-cell.off .ws-cal-label {
  color: var(--ink-faint);
  font-weight: 500;
}
.ws-cal-cell.holiday .ws-cal-label {
  color: var(--gold);
  font-weight: 600;
}
.ws-cal-cell.extra .ws-cal-label {
  color: #a7f3d0;
}
.ws-cal-sub {
  font-size: 10px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-cal-grid.compact .ws-cal-cell {
  min-height: 48px;
  padding: 5px 4px;
  border-radius: 9px;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 2px;
}
.ws-cal-grid.compact .ws-cal-top {
  justify-content: center;
}
.ws-cal-grid.compact .ws-cal-num {
  font-size: 12px;
}
.ws-cal-grid.compact .ws-cal-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ws-cal-grid.compact .ws-cal-badge,
.ws-cal-grid.compact .ws-cal-sub {
  display: none;
}

/* Signed / Archived Documents Collapsible Folder */
.signed-folder {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}
.signed-folder summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  transition: background 140ms ease;
}
.signed-folder summary::-webkit-details-marker {
  display: none;
}
.signed-folder summary:hover {
  background: rgba(255, 255, 255, 0.025);
}
.signed-folder-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.signed-folder-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--gold);
  flex-shrink: 0;
}
.signed-folder-chev {
  color: var(--ink-faint);
  font-size: 12px;
  transition: transform 160ms ease;
}
.signed-folder[open] .signed-folder-chev {
  transform: rotate(180deg);
}
.signed-folder-body {
  border-top: 1px solid var(--line);
  padding: 16px 18px;
}

/* DocuSign-style Signature Pad */
.sig-pad-wrap {
  display: grid;
  gap: 6px;
}
.sig-pad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.sig-pad-box {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(242, 210, 117, 0.35);
  background: #f8fafc;
  overflow: hidden;
}
.sig-pad-box::after {
  content: "X";
  position: absolute;
  left: 14px;
  bottom: 18px;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  pointer-events: none;
}
.sig-pad-line {
  position: absolute;
  left: 30px;
  right: 16px;
  bottom: 22px;
  height: 1px;
  background: #cbd5e1;
  pointer-events: none;
}
.sig-pad-canvas {
  display: block;
  width: 100%;
  height: 112px;
  touch-action: none;
  cursor: crosshair;
}

/* DocuSign-style Full-Viewport Document Viewer */
.modal-card.modal-doc {
  width: min(1040px, 96vw);
  height: 95vh;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
}
.modal-card.modal-doc .modal-head {
  padding: 12px 20px;
  align-items: center;
  flex: 0 0 auto;
}
.modal-card.modal-doc .modal-head h2 {
  font-size: 16px;
}
.modal-card.modal-doc .modal-body {
  flex: 1;
  min-height: 0;
  padding: 10px 18px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-card.modal-doc form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doc-sign-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.doc-sign-footer .modal-actions {
  margin-top: 0;
}
.pdf-viewer-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
}
.pdf-pages-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 48px;
  border-radius: 12px;
  background: #141923;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.pdf-pages-scroll.single-page {
  overflow: hidden;
  justify-content: center;
  padding: 10px 64px;
}
.pdf-page-frame {
  position: relative;
  width: 100%;
  max-width: 740px;
  flex: 0 0 auto;
  background: #ffffff;
  color-scheme: light;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  overflow: visible;
}
.pdf-pages-scroll.single-page .pdf-page-frame {
  height: 100%;
  width: auto;
  max-width: 100%;
}
.pdf-page-frame canvas.pdf-render-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}
.pdf-page-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}
.pdf-overlay-field {
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
}
.pdf-overlay-tag {
  position: absolute;
  right: calc(100% + 6px);
  bottom: 2px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #fef08a;
  border: 1px solid #eab308;
  color: #713f12;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.pdf-overlay-tag.right {
  right: auto;
  left: calc(100% + 6px);
}
.pdf-overlay-tag.done {
  background: #dcfce7;
  border-color: #16a34a;
  color: #14532d;
}
.pdf-overlay-input {
  width: 100%;
  height: 100%;
  border: 1.5px solid #eab308 !important;
  border-radius: 4px !important;
  background: rgba(254, 249, 195, 0.82) !important;
  color: #0f172a !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  padding: 2px 7px !important;
  outline: none !important;
}
.pdf-overlay-input:focus {
  background: rgba(254, 240, 138, 0.92) !important;
  border-color: #b45309 !important;
}
.pdf-overlay-input.valid {
  background: rgba(220, 252, 231, 0.78) !important;
  border-color: #16a34a !important;
}
.pdf-overlay-input::placeholder {
  color: #64748b;
  font-weight: 500;
  font-size: 11.5px;
}
.pdf-overlay-sig-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1.5px solid #eab308;
  border-radius: 4px;
  background: rgba(254, 249, 195, 0.78);
  overflow: hidden;
}
.pdf-overlay-sig-wrap.signed {
  background: rgba(220, 252, 231, 0.55);
  border-color: #16a34a;
}
.pdf-overlay-sig-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.pdf-overlay-clear {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 9.5px;
  font-weight: 700;
  color: #475569;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 5px;
  cursor: pointer;
}
.pdf-overlay-date {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  background: rgba(220, 252, 231, 0.72);
  border: 1px solid rgba(22, 163, 74, 0.55);
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}
.pdf-overlay-check {
  position: absolute;
  z-index: 4;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #0f172a;
  background: rgba(254, 249, 195, 0.85);
  border: 1.5px solid #eab308;
  border-radius: 3px;
}
.pdf-overlay-mini-input {
  position: absolute;
  z-index: 4;
  border: 1.5px solid #eab308 !important;
  border-radius: 3px !important;
  background: rgba(254, 249, 195, 0.82) !important;
  color: #0f172a !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  padding: 1px 5px !important;
  outline: none !important;
}
.pdf-overlay-mirror {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  background: rgba(220, 252, 231, 0.65);
  border: 1px dashed rgba(22, 163, 74, 0.7);
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
}
.pdf-overlay-mirror img {
  max-height: 92%;
  max-width: 96%;
  object-fit: contain;
}
.paper-doc {
  background: #ffffff;
  color: #0f172a;
  border-radius: 10px;
  padding: 28px 36px 30px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  border: 1px solid #e2e8f0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.paper-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid #0f172a;
  flex-wrap: wrap;
}
.paper-doc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.paper-doc-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: brightness(0);
}
.paper-doc-brand strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #0f172a;
}
.paper-doc-brand span {
  display: block;
  font-size: 10.5px;
  color: #475569;
}
.paper-doc-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.paper-doc-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #475569;
}
.paper-doc-body {
  font-size: 13px;
  line-height: 1.68;
  color: #1e293b;
  white-space: pre-line;
}
.paper-doc-fields {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid #cbd5e1;
  display: grid;
  gap: 18px;
}
.paper-field-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  align-items: end;
  gap: 14px;
}
.doc-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 6px;
  background: #fef08a;
  border: 1px solid #eab308;
  color: #713f12;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
}
.doc-tag.done {
  background: #dcfce7;
  border-color: #16a34a;
  color: #14532d;
}
.paper-line-box {
  display: grid;
  gap: 4px;
}
.paper-line-input {
  width: 100%;
  border: 0 !important;
  border-bottom: 1.5px solid #0f172a !important;
  border-radius: 4px 4px 0 0 !important;
  background: rgba(254, 249, 195, 0.45) !important;
  color: #0f172a !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 6px 8px !important;
  outline: none !important;
}
.paper-line-input:focus {
  background: rgba(254, 240, 138, 0.5) !important;
  border-bottom-color: #b45309 !important;
}
.paper-line-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
  font-style: italic;
}
.paper-line-static {
  border-bottom: 1.5px solid #0f172a;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 650;
  color: #0f172a;
}
.paper-sig-wrap {
  position: relative;
  border-bottom: 1.5px solid #0f172a;
  background: rgba(254, 249, 195, 0.38);
  border-radius: 6px 6px 0 0;
}
.paper-sig-wrap canvas {
  display: block;
  width: 100%;
  height: 82px;
  touch-action: none;
  cursor: crosshair;
}
.paper-sig-clear {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 8px;
  cursor: pointer;
}
.paper-line-label {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
}
@media (max-width: 640px) {
  .paper-doc { padding: 18px 16px; }
  .paper-field-row { grid-template-columns: 1fr; gap: 6px; }
  .doc-tag { justify-self: start; }
}

.mobile-nav { display: none; }

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .schedule-board { grid-template-columns: repeat(7, minmax(140px, 1fr)); }
  .kiosk-body { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --sidebar: 0px; }
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 24px; }
  .mobile-login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; font-weight: 800; letter-spacing: 0.14em; font-size: 13px; color: var(--gold-bright); }
  .mobile-login-logo img { width: 34px; height: 34px; object-fit: contain; }
  .mobile-kiosk-trigger { display: inline-flex !important; }
  .sidebar { display: none; }
  .app-main { margin-left: 0; }
  .app-header { height: 70px; padding: 0 16px; }
  .app-header h1 { font-size: 21px; }
  .page-kicker, .header-clock, .online-chip { display: none; }
  .view-wrap { padding: 16px 14px 24px; }
  .hero-layout { grid-template-columns: 1fr; }
  .telemetry-ring { display: none; }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 50;
    height: calc(64px + env(safe-area-inset-bottom));
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: start;
    padding: 6px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(6, 7, 10, 0.96);
    backdrop-filter: blur(20px);
  }
  .mobile-nav .nav-button { min-height: 52px; display: grid; place-items: center; gap: 3px; padding: 4px; border-radius: 8px; text-align: center; border: 0; background: transparent; }
  .mobile-nav .nav-button.active { color: var(--gold-bright); }
  .mobile-nav .nav-button.active::before { inset: auto auto -6px; width: 24px; height: 3px; border-radius: 3px 3px 0 0; }
  .mobile-nav .nav-icon { width: 24px; height: 22px; border: 0; background: transparent; }
  .mobile-nav .nav-button span:nth-child(2) { font-size: 12px; line-height: 1.15; font-weight: 700; }
  .mobile-nav .nav-badge, .mobile-nav .nav-section { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .view-intro { align-items: flex-start; flex-direction: column; margin-bottom: 16px; }
  .view-intro .button-row { width: 100%; }
  .view-intro .button { flex: 1; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .button:first-child:last-child { grid-column: 1 / -1; }
  .command-banner { align-items: flex-start; flex-direction: column; }
  .command-banner-metrics { width: 100%; justify-content: space-between; }
  .command-banner-metrics div { text-align: left; }
  .form-grid, .kiosk-selectors { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .schedule-toolbar { align-items: stretch; flex-direction: column; }
  .modal-layer { align-items: end; padding: 0; }
  .modal-card { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; }
}

@media (max-width: 560px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .header-actions .icon-button { display: none; }
  .list-row { align-items: flex-start; grid-template-columns: 1fr; }
  .row-actions { justify-content: flex-start; padding-left: 48px; }
  .timeline-row { grid-template-columns: 54px 10px 1fr; }
  .timeline-date { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

@media print {
  body { background: #fff !important; color: #111 !important; }
  .sidebar, .app-header, .mobile-nav, .alert-banner-stack, .toast-stack, .modal-scrim, .modal-close, .button, .link-button, .period-tabs { display: none !important; }
  .app-main { margin-left: 0 !important; }
  .modal-layer:not(.hidden) { position: static !important; padding: 0 !important; display: block !important; }
  .modal-card { width: 100% !important; max-height: none !important; box-shadow: none !important; border: 0 !important; background: #fff !important; color: #111 !important; }
  .card { background: #fff !important; color: #111 !important; border: 1px solid #d1d5db !important; box-shadow: none !important; }
  .metric-card strong, h1, h2, h3, h4, strong { color: #111 !important; }
  .muted, span, small, td, th { color: #374151 !important; }
}

/* ---------- Guided document signing ---------- */
.modal-head p:empty { display: none; }
.pdf-page-frame { container-type: inline-size; }
.pdf-pages-scroll { --pdf-zoom: 1; overflow-x: auto; scroll-padding: 24px; }
.pdf-pages-scroll .pdf-page-frame { width: calc(100% * var(--pdf-zoom)); max-width: calc(740px * var(--pdf-zoom)); }
.pdf-pages-scroll.zoomed { align-items: flex-start; }
.pdf-pages-scroll.zoomed .pdf-page-frame,
.pdf-pages-scroll.zoomed .sign-step-card { margin-left: auto; margin-right: auto; }
.pdf-pages-scroll.single-page.zoomed { overflow: auto; justify-content: flex-start; }
.pdf-pages-scroll.single-page.zoomed .pdf-page-frame { height: auto; width: calc(100% * var(--pdf-zoom)); max-width: none; }

.sign-progress { display: flex; flex-direction: column; gap: 5px; min-width: 150px; flex: 1; }
.sign-progress > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.sign-progress strong { color: var(--ink); font-size: 13px; }
.sign-progress-track { height: 4px; max-width: 260px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.sign-progress-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--gold, #f2d275); transition: width 0.25s ease; }
.sign-zoom { min-width: 34px; padding-left: 0; padding-right: 0; font-size: 16px; line-height: 1; }
.sign-finish { opacity: 0.55; }
.sign-finish.ready { opacity: 1; box-shadow: 0 0 0 3px rgba(242, 210, 117, 0.28); }

.sign-step-card {
  width: 100%;
  max-width: 740px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(242, 210, 117, 0.45);
  background: rgba(242, 210, 117, 0.08);
}
.sign-step-card > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.sign-step-card strong { font-size: 14px; }
.sign-step-card span { font-size: 12.5px; color: var(--ink-soft); }
.sign-step-card .check-field { margin: 0; flex-basis: 100%; padding: 4px 6px; border-radius: 8px; }

/* Answer choices placed on the printed circles and boxes */
.ov-opt {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  cursor: pointer;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}
.ov-opt.box { border-radius: 4px; }
.ov-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ov-mark {
  height: 100%;
  aspect-ratio: 1;
  box-sizing: border-box;
  border: 1.5px solid #eab308;
  border-radius: 50%;
  background: rgba(254, 240, 138, 0.7);
}
.ov-opt.box .ov-mark { border-radius: 18%; }
.ov-opt:hover .ov-mark { border-color: #b45309; background: rgba(253, 224, 71, 0.85); }
.ov-opt.grp-done .ov-mark { border-color: rgba(100, 116, 139, 0.55); background: rgba(255, 255, 255, 0.6); }
.ov-opt input:checked + .ov-mark {
  border-color: #0f172a;
  background: radial-gradient(circle, #0f172a 0 46%, #ffffff 50%);
}
.ov-opt.box input:checked + .ov-mark {
  background: #0f172a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 86% no-repeat;
}

/* The blank the signer is on */
.req-current { outline: 2px solid #f59e0b; outline-offset: 3px; border-radius: 6px; animation: reqPulse 1.1s ease-in-out infinite; }
.ov-opt.req-current { border-radius: 999px; }
@keyframes reqPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
  50% { box-shadow: 0 0 0 9px rgba(245, 158, 11, 0); }
}

/* Text on the page scales with the page, so it reads the same at any size */
.pdf-overlay-input { font-size: clamp(5px, 1.85cqw, 13.5px) !important; padding: 0 1cqw !important; }
.pdf-overlay-input::placeholder { font-size: clamp(5px, 1.55cqw, 11.5px); }
.pdf-overlay-date { font-size: clamp(5px, 1.7cqw, 12.5px); padding: 0 1cqw; }
.pdf-overlay-mirror { font-size: clamp(5px, 1.7cqw, 12.5px); font-weight: 700; color: #0f172a; padding: 0 1cqw; overflow: hidden; white-space: nowrap; }
.pdf-overlay-mini-input { font-size: clamp(5px, 1.5cqw, 11px) !important; padding: 0 0.8cqw !important; box-sizing: border-box; }
.pdf-overlay-mini-input.valid { background: rgba(220, 252, 231, 0.78) !important; border-color: #16a34a !important; }
.pdf-overlay-clear { font-size: clamp(6px, 1.3cqw, 9.5px); padding: 0 0.7cqw; }
.pdf-overlay-tag { font-size: clamp(6px, 1.25cqw, 9px); }


@media (max-width: 720px) {
  .modal-layer:has(.modal-card.modal-doc) { padding: 0; }
  .modal-card.modal-doc { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; }
  .modal-card.modal-doc .modal-head { padding: calc(8px + env(safe-area-inset-top)) 12px 8px; }
  .modal-card.modal-doc .modal-head h2 { font-size: 14px; line-height: 1.25; }
  .modal-card.modal-doc .modal-body { padding: 6px 0 calc(8px + env(safe-area-inset-bottom)); }
  .modal-card.modal-doc form { gap: 6px; }
  .pdf-viewer-bar { margin: 0 8px; padding: 6px 8px; flex-wrap: nowrap; }
  .pdf-viewer-bar .row-actions { flex-wrap: nowrap; gap: 6px; }
  .sign-open-pdf { display: none; }
  .sign-progress { min-width: 0; }
  .sign-progress > div:first-child { flex-direction: column; gap: 0; }
  .sign-progress-track { display: none; }
  .pdf-pages-scroll { padding: 8px 0; border-radius: 0; border-left: 0; border-right: 0; gap: 8px; }
  .pdf-pages-scroll.single-page { padding: 8px 0; }
  .pdf-pages-scroll.single-page { overflow: auto; justify-content: flex-start; }
  .pdf-pages-scroll.single-page .pdf-page-frame { height: auto; width: calc(100% * var(--pdf-zoom)); max-width: none; }
  .pdf-page-frame, .pdf-page-frame canvas.pdf-render-canvas { border-radius: 0; }
  .pdf-overlay-tag { display: none; }
  .sign-step-card { margin: 0 8px; width: auto; align-self: stretch; }
  .doc-sign-footer { padding: 6px 12px 0; gap: 8px; }
  .doc-sign-footer .check-field { font-size: 12px; }
  .doc-sign-footer .modal-actions { width: 100%; display: flex; gap: 8px; }
  .doc-sign-footer .modal-actions .sign-finish { flex: 1; }
}

.sign-consent { margin: 0; flex: 1; min-width: 180px; font-size: 12px; color: var(--ink-soft); }
.pdf-overlay-type { right: auto; left: 3px; }
.paper-sig-type { right: auto; left: 8px; }
.pdf-overlay-signspot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #eab308;
  border-radius: 4px;
  background: rgba(254, 240, 138, 0.82);
  color: #713f12;
  font-size: clamp(6px, 1.7cqw, 12.5px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}
.pdf-overlay-signspot[data-signed] { background: rgba(220, 252, 231, 0.55); border-color: #16a34a; }
.pdf-overlay-signspot img { max-height: 96%; max-width: 96%; object-fit: contain; }
.signed-done { align-items: stretch; text-align: center; max-width: 420px; margin: 0 auto; }
.signed-done-mark { width: 54px; height: 54px; margin: 4px auto 6px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: #06070a; background: var(--gold-bright); }
@media (max-width: 720px) {
  .sign-consent { flex-basis: 100%; font-size: 11px; }
}

/* ---------- Fill-in forms ---------- */
.acro-text {
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  margin: 0;
  padding: 0 0.5cqw !important;
  border: 1px solid #93c5fd !important;
  border-radius: 2px !important;
  background: rgba(219, 234, 254, 0.5) !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  outline: none !important;
  min-height: 0 !important;
  resize: none;
  appearance: none;
  -webkit-appearance: none;
}
.acro-text[data-req-group] { border: 1.5px solid #eab308 !important; background: rgba(254, 240, 138, 0.72) !important; }
.acro-text:focus { border-color: #b45309 !important; background: rgba(255, 255, 255, 0.95) !important; }
.acro-text.valid, .acro-text[data-req-group]:not(:placeholder-shown):not(select) { border-color: #16a34a !important; background: rgba(220, 252, 231, 0.7) !important; }
.acro-text:not([data-req-group]):not(:placeholder-shown):not(select) { background: rgba(255, 255, 255, 0.85) !important; }
.ov-opt.acro { border-radius: 2px; }
.ov-opt.acro input { inset: -45%; width: 190%; height: 190%; }
.ov-opt.acro:not(:has([data-req-group])) .ov-mark { border-color: #93c5fd; background: rgba(219, 234, 254, 0.6); }
.ov-opt.acro .ov-mark { border-width: 1px; }

.i9-choice { display: flex; flex-direction: column; gap: 8px; }
.i9-sig { background: #ffffff; border-radius: 8px; border: 1px solid var(--line-strong); }
.i9-sig canvas { height: 96px; }
[data-i9-block][hidden] { display: none; }

.detail-rows { display: grid; }
.detail-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 4px; border-top: 1px solid var(--line); font-size: 13px; }
.detail-rows > div:first-child { border-top: 0; }
.detail-rows span { color: var(--ink-soft); }
.detail-rows strong { text-align: right; user-select: all; }

/* iPhone: keep the page header and pop-up messages below the status bar and camera cutout */
.app-header { height: calc(82px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
.toast-stack { top: calc(20px + env(safe-area-inset-top)); }
@media (max-width: 860px) {
  .app-header { height: calc(70px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
}

/* The app behaves like an app on a phone: no page zoom from a double tap or a pinch. Documents zoom on their own. */
html, body { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; }
.pdf-pages-scroll { touch-action: pan-x pan-y; overscroll-behavior: contain; }

/* View as */
.view-as-bar {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(242, 210, 117, 0.6);
  background: rgba(15, 19, 27, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.view-as-bar strong { color: var(--gold-bright); }
@media (min-width: 861px) { .view-as-bar { bottom: 22px; } }

/* ---------- Phone app feel ---------- */
html { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; -webkit-touch-callout: none; }
@media (max-width: 860px) {
  body { -webkit-user-select: none; user-select: none; }
  input, textarea, select, [contenteditable], .selectable { -webkit-user-select: text; user-select: text; }
  .app-header .button[data-action="logout"] { display: none; }
  /* Today: the clock comes first, big and plain */
  .today-hero .role-chip-row, .today-hero .telemetry-ring, .today-hero .hero-time { display: none; }
  .today-hero h2 { font-size: 44px; }
  .today-hero .hero-actions { grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }
  .today-hero .hero-actions .button { min-height: 56px; font-size: 16px; border-radius: 16px; }
  .today-hero .hero-actions .button[data-action="request-correction"] { min-height: 44px; font-size: 14px; background: transparent; border-color: transparent; color: var(--ink-soft); }
  .alert-banner-stack.compact { gap: 6px; margin-bottom: 10px; }
  .alert-banner-stack.compact:empty { display: none; }
}
.nag-slim {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 14px; text-align: left;
  border: 1px solid rgba(242, 210, 117, 0.35); background: rgba(242, 210, 117, 0.07); color: var(--ink);
  font-size: 13px;
}
.nag-slim.nag-late, .nag-slim.nag-policy { border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.08); }
.nag-slim strong { flex: 1; min-width: 0; font-weight: 600; line-height: 1.3; }
.nag-slim .button { flex: none; padding: 6px 10px; font-size: 12px; min-height: 0; white-space: nowrap; }
.nag-slim .nag-pulse { flex: none; }
.nag-chevron { flex: none; font-size: 12px; color: var(--gold-bright); font-weight: 600; }

.phone-setup {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  background: #06070a;
}
.setup-card { width: 100%; max-width: 420px; display: grid; gap: 14px; }
.setup-mark { width: 64px; height: 64px; object-fit: contain; justify-self: center; opacity: 0.95; }
.setup-card h2 { text-align: center; font-size: 26px; margin: 0 0 8px; }
.setup-step {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: #0f131b;
}
.setup-step strong { display: block; font-size: 16px; }
.setup-step span { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.setup-step .button { min-height: 44px; padding: 0 20px; flex: none; }
.setup-ok { color: var(--green); font-weight: 700; }
.setup-off { color: var(--ink-soft); font-weight: 600; }
.setup-continue { min-height: 54px; font-size: 16px; border-radius: 16px; margin-top: 8px; }
@media (max-width: 860px) {
  .dashboard-grid .grid.grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dashboard-grid .metric-card { padding: 14px; }
  .dashboard-grid .metric-card strong { font-size: 24px; }
}

/* Documents on a phone: a plain to-do list, one row each */
.action-policy-item[data-action] { cursor: pointer; }
@media (max-width: 860px) {
  .action-policy-stack { gap: 8px; padding: 12px; }
  .action-policy-item { padding: 12px 14px; gap: 4px; }
  .action-policy-head { flex-wrap: nowrap; align-items: center; }
  .action-policy-item h4 { margin: 0; font-size: 15px; line-height: 1.3; }
  .action-policy-item p, .action-policy-item .section-label { display: none; }
  .action-policy-head .row-actions { flex: none; }
  .action-policy-head .row-actions a { display: none; }
  .action-policy-head .row-actions .button { min-height: 38px; padding: 0 16px; font-size: 13px; }
}
