:root {
  color-scheme: dark;
  --bg:#090d18;
  --panel:#11182b;
  --panel2:#151e35;
  --text:#f7f8fc;
  --muted:#98a3ba;
  --line:#26324f;
  --accent:#8b5cf6;
  --vac:#7c3aed;
  --sick:#0ea5e9;
  --flex:#f59e0b;
  --ok:#22c55e;
  --danger:#fb7185;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing:border-box; }
body { margin:0; background:radial-gradient(circle at top,#18213b 0,#090d18 38%); color:var(--text); min-height:100vh; }
button,input,select { font:inherit; }
button { cursor:pointer; }
.shell { width:min(1180px,calc(100% - 28px)); margin:0 auto; padding:28px 0 80px; }
.topbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
h1,h2,h3,p { margin:0; }
h1 { font-size:clamp(28px,4vw,42px); letter-spacing:-.04em; }
h2 { font-size:clamp(28px,5vw,52px); letter-spacing:-.04em; margin-top:4px; }
h3 { font-size:20px; letter-spacing:-.02em; }
.eyebrow { color:#b4a4ff; font-size:11px; font-weight:800; letter-spacing:.16em; }
.muted { color:var(--muted); }
.card { background:linear-gradient(180deg,rgba(21,30,53,.94),rgba(14,20,37,.96)); border:1px solid rgba(148,163,184,.14); border-radius:24px; box-shadow:0 20px 60px rgba(0,0,0,.18); }
.hero { padding:24px; display:flex; justify-content:space-between; gap:20px; align-items:center; }
.pill { padding:9px 12px; border-radius:999px; background:rgba(34,197,94,.12); color:#9df2b2; font-size:12px; font-weight:700; border:1px solid rgba(34,197,94,.22); }
.balance-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin:14px 0; }
.balance-card { border-radius:22px; padding:20px; min-height:160px; border:1px solid rgba(255,255,255,.08); position:relative; overflow:hidden; }
.balance-card::after { content:""; position:absolute; width:140px; height:140px; border-radius:999px; right:-45px; bottom:-55px; filter:blur(2px); opacity:.18; }
.balance-card.vacation { background:linear-gradient(145deg,#24164a,#14182b); }
.balance-card.sick { background:linear-gradient(145deg,#0c3850,#11182b); }
.balance-card.flex { background:linear-gradient(145deg,#4a3210,#17182a); }
.balance-card.vacation::after { background:var(--vac); }
.balance-card.sick::after { background:var(--sick); }
.balance-card.flex::after { background:var(--flex); }
.balance-card.custom { background:linear-gradient(145deg,#1b2440,#11182b); }
.balance-card.custom::after { background:var(--leave-accent,var(--accent)); }
.balance-head { display:flex; justify-content:space-between; color:#dce3f1; font-weight:700; }
.balance-card strong { display:block; font-size:50px; line-height:1; margin:22px 0 7px; letter-spacing:-.05em; }
.balance-card small { color:var(--muted); }
.home-balance-link {
  width:100%;
  color:inherit;
  font:inherit;
  text-align:left;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
}
.home-balance-link:focus-visible {
  outline:3px solid rgba(139,92,246,.48);
  outline-offset:3px;
}
.home-balance-link:active { transform:scale(.99); }
.chart-card { padding:22px; margin-bottom:14px; }
.section-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-end; margin-bottom:18px; }
.chart { min-height:270px; overflow:auto; }
.chart svg { width:100%; min-width:720px; height:270px; display:block; }
.forecast-point { cursor:pointer; outline:none; }
.forecast-point-hit { fill:transparent; pointer-events:all; }
.forecast-point-dot { pointer-events:none; transition:r .12s ease,stroke-width .12s ease; }
.forecast-point:hover .forecast-point-dot,
.forecast-point:focus-visible .forecast-point-dot {
  r:5.5px;
  stroke:var(--panel);
  stroke-width:2px;
}
.forecast-point-value { pointer-events:none; }
.forecast-point-value rect {
  fill:var(--panel2);
  stroke:var(--line);
  stroke-width:1px;
}
.forecast-point-value text {
  fill:var(--text);
  font-size:11px;
  font-weight:800;
}
html[data-theme="light"] .forecast-point-value rect { fill:#fff; }
.two-col { display:grid; grid-template-columns:1.1fr .9fr; gap:14px; margin-bottom:14px; }
.planner,.quick-add,.calibration,.card:has(.timeline) { padding:22px; }
form { display:grid; gap:12px; }
label { display:grid; gap:6px; color:#cbd5e1; font-size:12px; font-weight:700; }
input,select { width:100%; border:1px solid var(--line); background:#0c1324; color:var(--text); border-radius:12px; padding:12px 13px; outline:none; }
input:focus,select:focus { border-color:#7c67d8; box-shadow:0 0 0 3px rgba(124,103,216,.14); }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.alloc-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(135px,1fr)); gap:10px; }
.primary,.ghost { border:0; border-radius:12px; padding:12px 15px; font-weight:800; }
.primary { background:linear-gradient(135deg,#7c3aed,#9f67ff); color:white; }
.ghost { background:#11182b; color:#d8def0; border:1px solid var(--line); }
.result { margin-top:14px; padding:14px; border:1px dashed var(--line); border-radius:14px; line-height:1.55; }
.result.good { color:#b9f8c7; border-color:rgba(34,197,94,.35); background:rgba(34,197,94,.06); }
.result.bad { color:#fecdd3; border-color:rgba(251,113,133,.35); background:rgba(251,113,133,.06); }
.timeline { display:grid; gap:10px; }
.plan-item { display:grid; grid-template-columns:130px 1fr auto; gap:14px; align-items:center; padding:13px 0; border-top:1px solid rgba(148,163,184,.1); }
.plan-item:first-child { border-top:0; }
.plan-date { font-weight:800; }
.plan-tags { display:flex; gap:6px; flex-wrap:wrap; }
.tag { border-radius:999px; padding:5px 8px; font-size:11px; font-weight:800; background:#0c1324; border:1px solid var(--line); }
.snapshot-form { grid-template-columns:1.1fr 1.2fr 1fr 1fr auto; align-items:end; }
.toast {
  position:fixed;
  z-index:300;
  top:24px;
  right:24px;
  width:min(360px,calc(100vw - 48px));
  opacity:0;
  pointer-events:none;
  transform:translateY(-12px) scale(.98);
  padding:13px 16px;
  background:rgba(237,242,255,.98);
  color:#111827;
  border:1px solid rgba(99,102,241,.18);
  border-radius:14px;
  box-shadow:0 18px 44px rgba(15,23,42,.22);
  font-size:13px;
  font-weight:800;
  line-height:1.4;
  transition:opacity .18s ease,transform .18s ease;
}
.toast.show { opacity:1; transform:translateY(0) scale(1); }
@media (max-width:800px) {
  .toast {
    top:max(12px,env(safe-area-inset-top));
    right:auto;
    left:50%;
    width:min(420px,calc(100vw - 24px));
    transform:translate(-50%,-12px) scale(.98);
    text-align:center;
  }
  .toast.show { transform:translate(-50%,0) scale(1); }
}
@media (max-width:800px) {
  .shell { width:min(100% - 18px,720px); padding-top:18px; }
  .balance-grid,.two-col { grid-template-columns:1fr; }
  .balance-card { min-height:132px; }
  .balance-card strong { font-size:44px; margin-top:15px; }
  .snapshot-form { grid-template-columns:1fr 1fr; }
  .snapshot-form button { grid-column:1/-1; }
  .plan-item { grid-template-columns:1fr; gap:7px; }
  .section-head { align-items:flex-start; flex-direction:column; }
}

.hidden { display:none !important; }

.auth-screen {
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  position:relative;
  overflow:hidden;
}
.auth-glow {
  position:absolute;
  width:520px;
  height:520px;
  border-radius:999px;
  background:radial-gradient(circle,rgba(124,58,237,.24),transparent 68%);
  filter:blur(12px);
  pointer-events:none;
}
.auth-card {
  width:min(460px,100%);
  max-width:100%;
  min-width:0;
  position:relative;
  padding:32px;
  border-radius:30px;
  background:linear-gradient(180deg,rgba(21,30,53,.96),rgba(12,18,34,.98));
  border:1px solid rgba(148,163,184,.16);
  box-shadow:0 32px 100px rgba(0,0,0,.38);
}
.auth-card h2 { font-size:34px; margin:18px 0 8px; }
.auth-form { margin-top:24px; }
.auth-message {
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  color:#fecdd3;
  border:1px solid rgba(251,113,133,.28);
  background:rgba(251,113,133,.07);
  font-size:13px;
}
.brand-lockup {
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:22px;
}
.brand-lockup h1 {
  font-size:36px;
  line-height:1;
}
.brand-lockup p {
  margin-top:3px;
  color:#b8c2d8;
  font-size:13px;
  font-weight:700;
  letter-spacing:.04em;
}
.brand-lockup.compact { margin:0; }
.brand-lockup.compact h1 { font-size:28px; }
.brand-mark {
  width:48px;
  height:48px;
  border-radius:16px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:linear-gradient(135deg,#7c3aed,#a855f7);
  box-shadow:0 12px 34px rgba(124,58,237,.28);
}
.compact .brand-mark {
  width:42px;
  height:42px;
  border-radius:14px;
  font-size:20px;
}
.top-actions {
  display:flex;
  align-items:center;
  gap:10px;
}
.settings-button {
  min-height:40px;
  display:flex;
  align-items:center;
  gap:7px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:9px 12px;
  background:#11182b;
  color:#d8def0;
  font-weight:800;
}
.settings-button:hover { border-color:#5b4db2; }
.user-chip {
  display:flex;
  align-items:center;
  gap:9px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(17,24,43,.72);
  color:inherit;
  font:inherit;
  cursor:pointer;
}
.user-chip:hover { border-color:#5b4db2; }
.user-chip > span,.avatar {
  width:32px;
  height:32px;
  border-radius:11px;
  display:grid;
  place-items:center;
  background-color:#232d49;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  font-weight:900;
}
.user-chip div { display:grid; }
.user-chip strong { font-size:12px; }
.user-chip small { color:var(--muted); font-size:10px; }
.approval-request-card { padding:22px; margin-top:14px; }
.approval-request-form { display:grid; gap:10px; }
.request-history-head { display:flex; justify-content:space-between; align-items:center; margin-top:20px; padding-top:16px; border-top:1px solid rgba(148,163,184,.1); }
.request-list { display:grid; gap:8px; margin-top:8px; }
.request-row { display:flex; justify-content:space-between; gap:14px; align-items:center; padding:13px; border:1px solid rgba(148,163,184,.1); border-radius:14px; background:rgba(15,23,42,.55); }
.request-row-main { display:grid; gap:3px; min-width:0; }
.request-row-main small { color:var(--muted); font-size:11px; line-height:1.35; }
.request-row-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.request-cancel { padding:7px 9px; font-size:10px; }
.request-status-pending { color:#f6cf77; }
.request-status-approved,.request-status-completed { color:#b9f8c7; }
.request-status-declined,.request-status-cancelled { color:#fca5a5; }
.deep-link-highlight { outline:2px solid rgba(168,85,247,.75); box-shadow:0 0 0 5px rgba(168,85,247,.12); }
.request-decision-note { color:#c4b5fd !important; }
.manager-workspace-card { padding:22px; margin-top:14px; }
.manager-workspace-copy { margin:-4px 0 14px; font-size:12px; }
.manager-request-list { display:grid; gap:10px; }
.manager-request-card { padding:14px; border:1px solid rgba(148,163,184,.11); border-radius:16px; background:rgba(15,23,42,.58); }
.manager-request-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.manager-request-person { display:flex; gap:10px; align-items:center; min-width:0; }
.manager-request-person > div:last-child { display:grid; min-width:0; }
.manager-request-person small { color:var(--muted); font-size:10px; overflow:hidden; text-overflow:ellipsis; }
.manager-request-detail { display:grid; gap:3px; margin:12px 0; }
.manager-request-detail span { color:var(--muted); font-size:11px; line-height:1.4; }
.manager-decision-box { display:grid; gap:9px; padding-top:12px; border-top:1px solid rgba(148,163,184,.09); }
.manager-decision-box textarea { min-height:64px; resize:vertical; }
.manager-decision-buttons { display:flex; gap:8px; justify-content:flex-end; }
.manager-decision-buttons button { min-width:100px; }
.manager-decision-summary { display:grid; gap:3px; padding:10px 12px; border-radius:12px; background:rgba(124,58,237,.07); }
.manager-decision-summary span { color:var(--muted); font-size:11px; line-height:1.4; }
.admin-panel { padding:22px; margin-top:14px; }
.feature-preview-grid { display:grid; gap:10px; margin:14px 0 10px; }
.feature-preview-card {
  padding:14px;
  border:1px solid rgba(148,163,184,.12);
  border-radius:16px;
  background:rgba(15,23,42,.42);
}
.feature-preview-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.feature-preview-card p { margin:7px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.feature-badges { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.feature-on { color:#b9f8c7; }
.feature-off { color:#cbd5e1; }
.preview-safety-note { margin:0; color:var(--muted); font-size:11px; line-height:1.45; }
.company-policy-shell { margin-top:18px; padding-top:18px; border-top:1px solid rgba(148,163,184,.1); }
.company-policy-copy { margin:-4px 0 12px; font-size:11px; line-height:1.45; }
.company-policy-list { display:grid; gap:8px; }
.company-policy-row { display:grid; grid-template-columns:minmax(150px,1.2fr) minmax(130px,.8fr) minmax(150px,.9fr) auto; gap:10px; align-items:end; padding:12px; border:1px solid rgba(148,163,184,.1); border-radius:14px; background:rgba(15,23,42,.45); }
.company-policy-name { display:grid; gap:2px; }
.company-policy-name small { color:var(--muted); font-size:10px; line-height:1.4; }
.company-policy-row label { display:grid; gap:4px; color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.company-policy-row input,.company-policy-row select { text-transform:none; letter-spacing:normal; font-weight:700; }
.approval-config-shell { margin-top:18px; padding-top:18px; border-top:1px solid rgba(148,163,184,.1); }
.approval-config-copy { margin:-4px 0 12px; font-size:11px; line-height:1.45; }
.approval-config-list { display:grid; gap:8px; }
.approval-config-row { display:grid; grid-template-columns:minmax(120px,1fr) minmax(160px,1fr) auto; gap:10px; align-items:end; padding:12px; border:1px solid rgba(148,163,184,.1); border-radius:14px; background:rgba(15,23,42,.45); }
.approval-config-name { display:grid; gap:2px; }
.approval-config-name small { color:var(--muted); font-size:10px; }
.approval-config-policy { display:grid; gap:4px; color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.approval-config-policy select { text-transform:none; letter-spacing:normal; font-weight:700; }
.approval-config-effective { display:grid; gap:4px; justify-items:end; }
.approval-config-effective span { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.approval-config-effective strong { font-size:12px; white-space:nowrap; }
.approval-preview-shell { margin-top:18px; padding:16px; border:1px solid rgba(124,58,237,.18); border-radius:18px; background:rgba(124,58,237,.045); }
.approval-preview-head { margin-bottom:12px; }
.preview-only-badge { white-space:nowrap; color:#d8ccff; }
.approval-preview-tabs { display:flex; gap:6px; padding:4px; border:1px solid rgba(148,163,184,.12); border-radius:14px; background:#0c1324; }
.approval-preview-tabs button { flex:1; border:0; border-radius:10px; padding:9px 10px; background:transparent; color:var(--muted); font-weight:800; cursor:pointer; }
.approval-preview-tabs button.active { background:#232d49; color:white; }
.approval-preview-stage { margin:10px 0; }
.approval-demo-card { padding:16px; border:1px solid rgba(148,163,184,.12); border-radius:16px; background:#0c1324; }
.approval-demo-title { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.approval-demo-title h4 { margin:2px 0 0; font-size:18px; }
.approval-demo-copy { margin:8px 0 14px; font-size:12px; line-height:1.5; }
.approval-form-preview { display:grid; grid-template-columns:1fr 120px; gap:8px; }
.approval-note-preview { grid-column:1/-1; }
.approval-form-preview input:disabled { opacity:1; color:#dce6f7; -webkit-text-fill-color:#dce6f7; }
.approval-preview-action { width:100%; margin-top:10px; }
.approval-preview-action:disabled,.approval-decision-actions button:disabled { opacity:.5; cursor:not-allowed; }
.approval-status-line { display:flex; gap:9px; align-items:center; margin-top:12px; padding:10px 12px; border-radius:12px; background:rgba(245,158,11,.07); }
.approval-status-line > div { display:grid; gap:2px; }
.approval-status-line small,.approval-inbox-row small,.owner-approval-setting small { color:var(--muted); font-size:10px; line-height:1.35; }
.approval-status-dot { width:9px; height:9px; flex:0 0 auto; border-radius:999px; background:#f59e0b; box-shadow:0 0 0 4px rgba(245,158,11,.12); }
.status-pending { color:#f6cf77; }
.approval-inbox-row { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; padding:12px; border:1px solid rgba(148,163,184,.1); border-radius:14px; background:rgba(15,23,42,.6); }
.approval-inbox-row > div:nth-child(2) { display:grid; gap:3px; }
.approval-decision-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.owner-approval-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.owner-approval-setting { display:grid; gap:4px; padding:12px; border:1px solid rgba(148,163,184,.1); border-radius:14px; background:rgba(15,23,42,.6); }
.owner-approval-setting > span { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.work-calendar-shell { margin-top:18px; padding-top:18px; border-top:1px solid rgba(148,163,184,.1); }
.work-calendar-copy { margin:-4px 0 12px; font-size:11px; line-height:1.45; }
.work-calendar-toolbar { display:grid; grid-template-columns:120px auto auto; gap:8px; align-items:end; }
.work-calendar-toolbar label,.work-calendar-add-form label { display:grid; gap:4px; }
.work-calendar-review-state { margin:8px 0 10px; font-size:11px; }
.work-calendar-add-form { display:grid; grid-template-columns:150px 1fr auto; gap:8px; align-items:end; margin-bottom:12px; }
.work-calendar-list { display:grid; gap:7px; }
.work-calendar-row { display:grid; grid-template-columns:120px 1fr auto auto; gap:10px; align-items:center; padding:11px 12px; border:1px solid rgba(148,163,184,.1); border-radius:13px; background:rgba(15,23,42,.45); }
.work-calendar-row small { color:var(--muted); font-size:10px; }
.work-calendar-source { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.work-calendar-row.excluded { opacity:.65; }
.work-calendar-row button { padding:7px 9px; font-size:10px; }
.admin-divider { height:1px; background:rgba(148,163,184,.1); margin:20px 0; }
.invite-form {
  grid-template-columns:1fr auto;
  align-items:end;
}
.invite-result {
  margin:14px 0;
  padding:14px;
  display:grid;
  gap:5px;
  border-radius:16px;
  border:1px solid rgba(124,58,237,.28);
  background:rgba(124,58,237,.07);
}
.invite-result span { color:var(--muted); font-size:12px; }
.copy-row {
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  margin-top:8px;
}
.member-list {
  display:grid;
  gap:4px;
  margin-top:18px;
}
.member-row {
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:10px;
  padding:11px 0;
  border-top:1px solid rgba(148,163,184,.09);
}
.member-row:first-child { border-top:0; }
.member-row > div:nth-child(2) { display:grid; }
.member-row small { color:var(--muted); font-size:11px; margin-top:2px; }
.member-actions { display:flex; align-items:center; gap:8px; }
.people-head { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-top:18px; padding-top:16px; border-top:1px solid rgba(148,163,184,.1); }
.people-head h4 { margin:2px 0 0; }
.people-controls-copy { margin:6px 0 0; font-size:11px; }
.member-row-managed { grid-template-columns:auto minmax(140px,1fr) minmax(300px,1.4fr); align-items:start; }
.member-identity { min-width:0; }
.people-controls { display:grid; grid-template-columns:repeat(2,minmax(130px,1fr)); gap:8px; }
.people-field { display:grid; gap:4px; color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.people-field select { min-width:0; text-transform:none; letter-spacing:normal; font-weight:700; }
.member-row-footer { grid-column:3; justify-self:end; }
.member-reset { padding:8px 10px; font-size:11px; }
.backup-btn { margin-top:16px; }
.empty-state {
  padding:18px;
  border:1px dashed var(--line);
  border-radius:16px;
  color:var(--muted);
  text-align:center;
}
.history-card { padding:22px; margin-top:14px; }
.history-head { align-items:flex-start; }
.history-copy { margin:-4px 0 12px; font-size:11px; }
.history-tabs { display:flex; gap:5px; padding:4px; border:1px solid rgba(148,163,184,.12); border-radius:12px; background:#0c1324; }
.history-tabs button { border:0; border-radius:9px; padding:7px 10px; background:transparent; color:var(--muted); font-weight:800; cursor:pointer; }
.history-tabs button.active { background:#232d49; color:white; }
.history-list { display:grid; gap:9px; }
.history-row { padding:13px; border:1px solid rgba(148,163,184,.1); border-radius:15px; background:rgba(15,23,42,.48); }
.history-row-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.history-row-head > div { display:grid; gap:3px; min-width:0; }
.history-row-head small { color:var(--muted); font-size:10px; line-height:1.4; }
.history-person { display:grid; gap:2px; margin-bottom:5px; padding-bottom:6px; border-bottom:1px solid rgba(148,163,184,.08); }
.history-person small { overflow:hidden; text-overflow:ellipsis; }
.history-note { margin:9px 0 0; color:var(--muted); font-size:11px; line-height:1.45; }
.history-decision { display:grid; gap:3px; margin-top:9px; padding:9px 10px; border-radius:11px; background:rgba(124,58,237,.07); }
.history-decision span { color:var(--muted); font-size:11px; }
.history-events { margin-top:9px; border-top:1px solid rgba(148,163,184,.08); padding-top:8px; }
.history-events summary { color:#d8ccff; font-size:11px; font-weight:800; cursor:pointer; }
.history-event-list { display:grid; gap:7px; margin-top:8px; }
.history-event { display:grid; grid-template-columns:auto 1fr; gap:8px; align-items:start; }
.history-event-dot { width:8px; height:8px; margin-top:5px; border-radius:999px; background:#8b5cf6; }
.history-event > div { display:grid; gap:2px; }
.history-event small { color:var(--muted); font-size:10px; line-height:1.4; }
.history-status-taken,.history-status-approved,.history-status-completed { color:#b9f8c7; }
.history-status-cancelled,.history-status-declined { color:#fca5a5; }
.history-status-pending,.history-status-planned { color:#f6cf77; }
.team-calendar-card { padding:22px; margin-top:14px; }
.team-calendar-head { align-items:center; }
.team-calendar-copy { margin:-4px 0 12px; font-size:11px; }
.team-calendar-nav { display:grid; grid-template-columns:38px minmax(150px,auto) 38px; gap:7px; align-items:center; }
.team-calendar-nav strong { text-align:center; font-size:13px; }
.team-calendar-nav button { padding:8px 10px; font-size:18px; line-height:1; }
.team-calendar-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:12px 0; }
.team-calendar-stats > div { display:grid; gap:2px; padding:10px 12px; border:1px solid rgba(148,163,184,.1); border-radius:13px; background:rgba(15,23,42,.42); }
.team-calendar-stats strong { font-size:20px; }
.team-calendar-stats span { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.team-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; }
.team-calendar-weekday { padding:5px 3px; color:var(--muted); font-size:9px; font-weight:800; text-align:center; text-transform:uppercase; letter-spacing:.04em; }
.team-calendar-day { min-height:108px; min-width:0; padding:7px; border:1px solid rgba(148,163,184,.1); border-radius:12px; background:rgba(15,23,42,.35); overflow:hidden; }
.team-calendar-day.has-away { background:rgba(91,65,180,.07); }
.team-calendar-blank { opacity:.32; background:transparent; border-style:dashed; }
.team-calendar-date { display:inline-flex; align-items:center; justify-content:center; width:23px; height:23px; border-radius:999px; color:var(--muted); font-size:10px; font-weight:800; }
.team-calendar-events { display:grid; gap:4px; margin-top:5px; }
.team-away-chip { display:grid; gap:1px; min-width:0; padding:5px 6px; border-radius:8px; background:rgba(124,58,237,.12); border:1px solid rgba(167,139,250,.14); }
.team-away-chip.past { background:rgba(34,197,94,.08); border-color:rgba(134,239,172,.12); }
.team-away-chip strong,.team-away-chip span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.team-away-chip strong { font-size:9px; }
.team-away-chip span { color:var(--muted); font-size:8px; }
.team-calendar-more { color:var(--muted); font-size:9px; font-weight:800; padding:2px 4px; }
.team-calendar-error { grid-column:1/-1; }
.status-planned { color:#d8ccff; }
.status-taken { color:#b9f8c7; }
@media (max-width:650px) {
  .auth-card { padding:24px; border-radius:24px; }
  .topbar { align-items:center; gap:10px; }
  .top-actions { align-items:center; flex-direction:row; gap:7px; }
  .user-chip { order:initial; }
  .brand-lockup.compact h1 { font-size:24px; }
  .invite-form { grid-template-columns:1fr; }
  .copy-row { grid-template-columns:1fr; }
  .copy-row button { width:100%; }
  .member-row { grid-template-columns:auto 1fr; }
  .member-row-managed { grid-template-columns:auto 1fr; }
  .member-actions { grid-column:1/-1; justify-content:flex-end; }
  .people-head { align-items:flex-start; }
  .people-controls { grid-column:1/-1; grid-template-columns:1fr; }
  .admin-balance-form { grid-template-columns:1fr; }
  .member-row-footer { grid-column:1/-1; justify-self:end; }
  .feature-preview-head { display:grid; }
  .feature-badges { justify-content:flex-start; }
  .approval-demo-title { display:grid; }
  .approval-form-preview,.owner-approval-grid { grid-template-columns:1fr; }
  .company-policy-row { grid-template-columns:1fr; align-items:stretch; }
  .approval-config-row { grid-template-columns:1fr; align-items:stretch; }
  .approval-config-effective { justify-items:start; }
  .work-calendar-toolbar,.work-calendar-add-form { grid-template-columns:1fr; }
  .work-calendar-row { grid-template-columns:1fr auto; }
  .work-calendar-row > :nth-child(2) { grid-column:1/-1; }
  .approval-note-preview { grid-column:auto; }
  .approval-inbox-row { grid-template-columns:auto 1fr; }
  .approval-inbox-row > .tag { grid-column:2; justify-self:start; }
  .approval-decision-actions { justify-content:stretch; }
  .approval-decision-actions button { flex:1; }
  .request-row { display:grid; }
  .request-row-actions { justify-content:flex-start; }
  .team-calendar-head { align-items:flex-start; gap:10px; }
  .team-calendar-nav { width:100%; grid-template-columns:38px 1fr 38px; }
  .team-calendar-stats { grid-template-columns:repeat(3,1fr); }
  .team-calendar-grid { gap:3px; }
  .team-calendar-weekday { font-size:8px; }
  .team-calendar-day { min-height:82px; padding:4px; border-radius:9px; }
  .team-calendar-date { width:20px; height:20px; font-size:9px; }
  .team-away-chip { padding:4px; }
  .team-away-chip strong { font-size:8px; }
  .team-away-chip span { display:none; }
}

.trip-count {
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#0c1324;
  color:#cdd7eb;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.allocation-label {
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.bucket {
  padding:10px;
  border-radius:14px;
  border:1px solid var(--line);
}
.vacation-bucket { background:rgba(124,58,237,.08); }
.sick-bucket { background:rgba(14,165,233,.08); }
.flex-bucket { background:rgba(245,158,11,.08); }
.custom-bucket { background:rgba(139,92,246,.06); }
.bucket-disabled { opacity:.55; }
.bucket-note { display:block; margin-top:2px; color:#8190aa; font-size:9px; font-weight:600; line-height:1.25; }
.assignment-panel { margin-top:12px; }
.wide { width:100%; }
.day-assignments {
  display:grid;
  gap:7px;
  margin-top:10px;
}
.day-assignment {
  grid-template-columns:1fr 145px;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border:1px solid rgba(148,163,184,.1);
  border-radius:12px;
  background:#0c1324;
}
.day-assignment span { font-size:13px; }
.day-assignment select { padding:9px 10px; }
.save-trip {
  width:100%;
  margin-top:12px;
  border:0;
  border-radius:14px;
  padding:14px 16px;
  background:linear-gradient(135deg,#22c55e,#16a34a);
  color:white;
  font-weight:900;
  font-size:15px;
  cursor:pointer;
}
.mobile-health { display:none; width:max-content; margin:10px 0; }
.mobile-nav { display:none; }
.plans-card { padding:22px; margin-bottom:14px; }
@media (max-width:800px) {
  html { scroll-padding-top:82px; }
  body { padding-bottom:112px; }
  .shell { width:100%; padding:14px 12px 34px; }
  .topbar { position:sticky; top:0; z-index:20; padding:7px 0 10px; background:rgba(9,13,24,.9); backdrop-filter:blur(14px); }
  .top-actions .ghost { display:none; }
  .settings-button { width:42px; min-height:42px; justify-content:center; padding:0; font-size:17px; }
  .settings-label { display:none; }
  .user-chip { padding:6px; }
  .user-chip div { display:none; }
  .brand-lockup.compact .brand-mark { width:38px; height:38px; }
  .hero { padding:18px; border-radius:20px; }
  .hero h2 { font-size:34px; }
  .hero .pill { display:none; }
  .mobile-health { display:block; }
  .balance-grid {
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:76%;
    grid-template-columns:none;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
    padding-bottom:3px;
  }
  .balance-grid::-webkit-scrollbar { display:none; }
  .balance-card { scroll-snap-align:start; min-height:138px; }
  .chart-card { padding:18px 14px; }
  .chart { min-height:230px; overflow-x:auto; scroll-snap-type:x proximity; }
  .chart svg { min-width:620px; height:230px; }
  .two-col { grid-template-columns:1fr; }
  .planner,.quick-add,.calibration,.plans-card,.admin-panel { padding:18px; border-radius:20px; }
  .planner,.plans-card,.calibration { scroll-margin-top:82px; }
  .alloc-grid { grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:7px; }
  .bucket { padding:8px; }
  .bucket input { padding:11px 9px; }
  .field-row { grid-template-columns:1fr 1fr; gap:8px; }
  input,select { min-height:46px; }
  .primary,.ghost,.save-trip { min-height:46px; }
  .snapshot-form { grid-template-columns:1fr 1fr; }
  .snapshot-form button { grid-column:1/-1; }
  .day-assignment { grid-template-columns:1fr 135px; }
  .mobile-nav {
    position:fixed;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    left:10px;
    right:10px;
    bottom:max(10px,env(safe-area-inset-bottom));
    z-index:50;
    padding:7px;
    border-radius:18px;
    border:1px solid rgba(148,163,184,.18);
    background:rgba(14,20,37,.94);
    box-shadow:0 18px 50px rgba(0,0,0,.45);
    backdrop-filter:blur(18px);
  }
  .mobile-nav button {
    border:0;
    background:transparent;
    color:#aebbd1;
    min-height:48px;
    border-radius:13px;
    font-weight:800;
    font-size:12px;
  }
  .mobile-nav button.active {
    color:white;
    background:rgba(124,58,237,.22);
  }
  .plan-item { grid-template-columns:1fr; }
  .section-head { align-items:flex-start; }
}
@media (max-width:430px) {
  .shell { padding-left:10px; padding-right:10px; }
  .balance-grid { grid-auto-columns:84%; gap:10px; }
  .balance-card strong { font-size:42px; }
  .field-row { grid-template-columns:1fr; }
  .alloc-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .bucket { font-size:10px; }
  .bucket input { font-size:15px; }
  .day-assignment { grid-template-columns:1fr 125px; }
  .auth-screen { padding:14px; }
  .auth-card { padding:22px; }
}

.trip-row {
  width:100%;
  appearance:none;
  border-left:0;
  border-right:0;
  border-bottom:0;
  background:transparent;
  color:inherit;
  text-align:left;
  font:inherit;
}
.trip-row:hover { background:rgba(255,255,255,.025); }
.trip-row:focus-visible {
  outline:2px solid #8b5cf6;
  outline-offset:3px;
  border-radius:12px;
}
.sheet-backdrop {
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(3,7,18,.72);
  backdrop-filter:blur(8px);
  opacity:0;
  transition:opacity .18s ease;
}
.sheet-backdrop.open { opacity:1; }
.trip-sheet {
  width:min(560px,100%);
  max-height:min(760px,88vh);
  overflow:auto;
  background:linear-gradient(180deg,#151e35,#0e1425);
  border:1px solid rgba(148,163,184,.18);
  border-radius:28px;
  box-shadow:0 34px 100px rgba(0,0,0,.5);
  padding:24px;
  transform:translateY(12px) scale(.985);
  transition:transform .18s ease;
}
.sheet-backdrop.open .trip-sheet { transform:none; }

.trip-row {
  width:100%;
  appearance:none;
  border-left:0;
  border-right:0;
  border-bottom:0;
  background:transparent;
  color:inherit;
  text-align:left;
  font:inherit;
}
.trip-row:hover { background:rgba(255,255,255,.025); }
.trip-row:focus-visible {
  outline:2px solid #8b5cf6;
  outline-offset:3px;
  border-radius:12px;
}

.sheet-backdrop {
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(3,7,18,.72);
  backdrop-filter:blur(8px);
  opacity:0;
  transition:opacity .18s ease;
}
.sheet-backdrop.open { opacity:1; }
.trip-sheet {
  width:min(560px,100%);
  max-height:min(760px,88vh);
  overflow:auto;
  background:linear-gradient(180deg,#151e35,#0e1425);
  border:1px solid rgba(148,163,184,.18);
  border-radius:28px;
  box-shadow:0 34px 100px rgba(0,0,0,.5);
  padding:24px;
  transform:translateY(12px) scale(.985);
  transition:transform .18s ease;
}
.sheet-backdrop.open .trip-sheet { transform:none; }

.sheet-handle {
  display:none;
  width:42px;
  height:4px;
  border-radius:99px;
  background:#3a4562;
  margin:0 auto 16px;
}
.sheet-head {
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
}
.sheet-head h2 { font-size:30px; margin:4px 0 5px; }
.icon-btn {
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#0c1324;
  color:#d8def0;
  font-size:24px;
  line-height:1;
}

.trip-hero-stat {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:22px 0 12px;
  padding:16px;
  border-radius:18px;
  background:rgba(124,58,237,.09);
  border:1px solid rgba(124,58,237,.2);
}
.trip-hero-stat strong { font-size:21px; }
.trip-hero-stat span { color:var(--muted); font-size:12px; font-weight:800; }
.trip-mix {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:22px;
}
.trip-chip {
  border-radius:999px;
  padding:7px 10px;
  font-size:11px;
  font-weight:900;
  border:1px solid var(--line);
}

.vacation-chip { background:rgba(124,58,237,.1); }
.sick-chip { background:rgba(14,165,233,.1); }
.flex-chip { background:rgba(245,158,11,.1); }
.trip-section {
  padding:18px 0;
  border-top:1px solid rgba(148,163,184,.11);
}
.projected-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-top:10px;
}
.projected-grid > div {
  padding:13px;
  border-radius:14px;
  background:#0c1324;
  border:1px solid var(--line);
}
.projected-grid small { display:block; color:var(--muted); }
.projected-grid strong { display:block; font-size:23px; margin-top:5px; }

.trip-day-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:11px 0;
  border-bottom:1px solid rgba(148,163,184,.08);
}
.trip-day-row:last-child { border-bottom:0; }
.trip-day-row strong { font-size:12px; }
.trip-empty { color:var(--muted); font-size:13px; padding-top:10px; }
.sheet-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.danger-button {
  border:1px solid rgba(251,113,133,.3);
  background:rgba(251,113,133,.08);
  color:#fecdd3;
  border-radius:12px;
  padding:12px 15px;
  font-weight:800;
}
.sheet-open { overflow:hidden; }

@media (max-width:650px) {
  .sheet-backdrop {
    align-items:end;
    padding:0;
  }
  .trip-sheet {
    width:100%;
    max-height:86vh;
    border-radius:26px 26px 0 0;
    padding:18px 16px calc(18px + env(safe-area-inset-bottom));
    transform:translateY(28px);
  }
  .sheet-handle { display:block; }
  .sheet-head h2 { font-size:27px; }
  .trip-hero-stat { margin-top:18px; }
  .sheet-actions {
    position:sticky;
    bottom:0;
    padding-top:10px;
    background:linear-gradient(180deg,transparent,#0e1425 28%);
  }
}

.settings-sheet { width:min(470px,100%); }
.vacation-settings-form {
  margin-top:24px;
  gap:16px;
}
.vacation-settings-form label { font-size:13px; }
.vacation-settings-form select {
  margin-top:4px;
  min-height:54px;
  font-size:17px;
  font-weight:800;
}
.vacation-summary {
  display:grid;
  gap:5px;
  padding:16px;
  border-radius:16px;
  border:1px solid rgba(124,58,237,.2);
  background:rgba(124,58,237,.08);
}
.vacation-summary strong { font-size:18px; }
.vacation-summary span {
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}
.vacation-settings-form .primary {
  min-height:50px;
  font-size:14px;
}
.password-field {
  position:relative;
}
.password-field input {
  padding-right:48px;
}
.password-toggle {
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#cbd5e1;
  font-size:17px;
}
.password-toggle:hover { background:rgba(255,255,255,.06); }
.settings-divider {
  height:1px;
  margin:24px 0 20px;
  background:rgba(148,163,184,.12);
}
.settings-subhead {
  display:grid;
  gap:4px;
  margin-bottom:14px;
}
.settings-subhead strong { font-size:15px; }
.settings-subhead span {
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.password-settings-form { gap:12px; }
.password-settings-form .ghost { margin-top:2px; }

.profile-sheet { width:min(430px,100%); }
.profile-summary {
  display:flex;
  align-items:center;
  gap:14px;
  margin:24px 0 20px;
  padding:16px;
  border-radius:18px;
  background:#0c1324;
  border:1px solid var(--line);
}
.profile-avatar {
  width:68px;
  height:68px;
  flex:0 0 68px;
  border-radius:22px;
  display:grid;
  place-items:center;
  background:#232d49 center/cover no-repeat;
  font-size:25px;
  font-weight:900;
}
.profile-identity {
  min-width:0;
  display:grid;
  gap:3px;
}
.profile-identity strong { font-size:18px; }
.profile-identity span { color:var(--muted); font-size:12px; }
.profile-photo-button {
  width:max-content;
  margin-top:6px;
  padding:0;
  border:0;
  background:transparent;
  color:#a78bfa;
  font-weight:800;
  font-size:12px;
  cursor:pointer;
}
.profile-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.profile-actions > button { min-height:48px; }

/* Visual foundation v30 */
.theme-picker {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
.theme-choice {
  min-width:0;
  display:grid;
  gap:3px;
  justify-items:start;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#0c1324;
  color:var(--text);
  text-align:left;
  transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.theme-choice > span { font-size:18px; }
.theme-choice strong { font-size:12px; }
.theme-choice small { color:var(--muted); font-size:10px; }
.theme-choice.active {
  border-color:rgba(139,92,246,.62);
  background:rgba(124,58,237,.12);
  box-shadow:0 0 0 3px rgba(124,58,237,.08);
}

@media (min-width:801px) {
  body { font-size:17px; line-height:1.5; }
  .shell { width:min(1240px,calc(100% - 40px)); padding-top:34px; }
  h3 { font-size:23px; line-height:1.2; }
  .eyebrow { font-size:12px; }
  .muted { line-height:1.55; }
  label { font-size:13px; }
  input,select { min-height:48px; font-size:15px; }
  .primary,.ghost { min-height:48px; padding:13px 17px; }
  .section-head { margin-bottom:20px; }
  .card { border-radius:26px; }
  .hero { padding:28px; }
  .planner,.quick-add,.calibration,.plans-card,.admin-panel,.history-card,.team-calendar-card { padding:24px; }
  .balance-card { padding:22px; min-height:172px; }
  .balance-head { font-size:15px; }
  .balance-card small,.member-row small,.history-row-head small { font-size:12px; }
  .tag { font-size:12px; padding:6px 9px; }
  .result { font-size:14px; }
  .trip-count,.allocation-label { font-size:12px; }
}

@keyframes dayoff-rise {
  from { opacity:0; transform:translateY(8px); }
  to { opacity:1; transform:none; }
}
@keyframes dayoff-pop {
  0% { transform:scale(.98); opacity:.72; }
  70% { transform:scale(1.015); }
  100% { transform:scale(1); opacity:1; }
}
.auth-card,.hero { animation:dayoff-rise .42s ease both; }
.balance-card { animation:dayoff-rise .38s ease both; }
.balance-card:nth-child(2) { animation-delay:.04s; }
.balance-card:nth-child(3) { animation-delay:.08s; }
.balance-card:nth-child(4) { animation-delay:.12s; }
.primary,.ghost,.settings-button,.user-chip,.theme-choice,.trip-row,.request-row,.manager-request-card {
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
@media (hover:hover) {
  .primary:hover,.ghost:hover,.settings-button:hover,.theme-choice:hover { transform:translateY(-1px); }
  .primary:hover { box-shadow:0 10px 28px rgba(124,58,237,.22); }
  .balance-card:hover { transform:translateY(-2px); }
}
.primary:active,.ghost:active,.theme-choice:active { transform:scale(.985); }
.empty-state::before { content:"✨"; display:block; font-size:22px; margin-bottom:6px; opacity:.8; }
.hero { position:relative; overflow:hidden; }
.hero::after { content:"🌴"; position:absolute; right:112px; bottom:-20px; font-size:82px; opacity:.055; transform:rotate(-7deg); pointer-events:none; }

html[data-theme="light"] {
  color-scheme:light;
  --bg:#f4f7fb;
  --panel:#ffffff;
  --panel2:#f7f9fd;
  --text:#172033;
  --muted:#626c7e;
  --line:#dbe3ef;
  --accent:#7c3aed;
  --ok:#15803d;
  --danger:#e11d48;
}
html[data-theme="light"] body {
  background:radial-gradient(circle at top,#eef2ff 0,#f7f9fc 42%,#f4f7fb 100%);
  color:var(--text);
}
html[data-theme="light"] .card,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .trip-sheet {
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(249,251,255,.98));
  border-color:#dfe6f1;
  box-shadow:0 20px 55px rgba(68,79,110,.10);
}
html[data-theme="light"] .eyebrow { color:#7155d9; }
html[data-theme="light"] label { color:#3d4960; }
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background:#ffffff;
  color:#172033;
  border-color:#d7e0ed;
}
html[data-theme="light"] .ghost,
html[data-theme="light"] .settings-button,
html[data-theme="light"] .user-chip,
html[data-theme="light"] .tag,
html[data-theme="light"] .theme-choice,
html[data-theme="light"] .icon-btn {
  background:#ffffff;
  color:#354052;
  border-color:#d9e1ec;
}
html[data-theme="light"] .theme-choice.active {
  background:#f0ebff;
  color:#4c2fb5;
  border-color:#a78bfa;
}
html[data-theme="light"] .balance-card.vacation { background:linear-gradient(145deg,#eee8ff,#ffffff); }
html[data-theme="light"] .balance-card.sick { background:linear-gradient(145deg,#e7f7fd,#ffffff); }
html[data-theme="light"] .balance-card.flex { background:linear-gradient(145deg,#fff3dd,#ffffff); }
html[data-theme="light"] .balance-card.custom { background:linear-gradient(145deg,#edf1ff,#ffffff); }
html[data-theme="light"] .balance-head { color:#263248; }
html[data-theme="light"] .pill { color:#166534; background:#ecfdf3; border-color:#bbf7d0; }
html[data-theme="light"] .result.good { color:#166534; background:#f0fdf4; border-color:#bbf7d0; }
html[data-theme="light"] .result.bad { color:#be123c; background:#fff1f2; border-color:#fecdd3; }
html[data-theme="light"] .request-status-pending,
html[data-theme="light"] .status-pending,
html[data-theme="light"] .history-status-pending,
html[data-theme="light"] .history-status-planned { color:#a16207; }
html[data-theme="light"] :is(
  .request-row,.manager-request-card,.feature-preview-card,.company-policy-row,.approval-config-row,
  .balance-managed-message,
  .approval-demo-card,.approval-inbox-row,.owner-approval-setting,.work-calendar-row,
  .history-row,.team-calendar-stats > div,.team-calendar-day,.day-assignment,
  .profile-summary,.vacation-summary,.bucket
) {
  background:rgba(255,255,255,.88);
  border-color:#e0e7f1;
}
html[data-theme="light"] .approval-preview-tabs,
html[data-theme="light"] .history-tabs {
  background:#f4f6fa;
  border-color:#dfe5ee;
}
html[data-theme="light"] .approval-preview-tabs button.active,
html[data-theme="light"] .history-tabs button.active {
  background:#e9e3ff;
  color:#4c2fb5;
}
html[data-theme="light"] .approval-preview-shell,
html[data-theme="light"] .manager-decision-summary,
html[data-theme="light"] .history-decision,
html[data-theme="light"] .trip-hero-stat {
  background:#f4f0ff;
  border-color:#ded3ff;
}
html[data-theme="light"] .team-calendar-day.has-away { background:#f5f1ff; }
html[data-theme="light"] .team-away-chip { background:#eee9ff; border-color:#d8ceff; }
html[data-theme="light"] .team-away-chip.past { background:#ecfdf3; border-color:#c6f6d5; }
html[data-theme="light"] .trip-row:hover { background:rgba(91,65,180,.05); }
html[data-theme="light"] .profile-avatar { background-color:#e7eaf3; }
html[data-theme="light"] .sheet-backdrop { background:rgba(43,52,71,.34); }
html[data-theme="light"] .sheet-handle { background:#c4ccd8; }
html[data-theme="light"] .auth-glow {
  background:radial-gradient(circle,rgba(124,58,237,.14),transparent 68%);
}
html[data-theme="light"] .brand-lockup p { color:#667085; }
html[data-theme="light"] .request-decision-note,
html[data-theme="light"] .history-events summary,
html[data-theme="light"] .preview-only-badge,
html[data-theme="light"] .profile-photo-button { color:#6d4ed2 !important; }
@media (max-width:800px) {
  html[data-theme="light"] .topbar {
    background:rgba(244,247,251,.91);
    border-bottom:1px solid rgba(217,225,236,.7);
  }
  html[data-theme="light"] .mobile-nav {
    background:rgba(255,255,255,.94);
    border-color:#dfe5ee;
    box-shadow:0 18px 45px rgba(68,79,110,.16);
  }
  html[data-theme="light"] .mobile-nav button { color:var(--muted); }
  html[data-theme="light"] .mobile-nav button.active {
    color:#5b35c9;
    background:#eee9ff;
  }
}
@media (max-width:560px) {
  .theme-picker { grid-template-columns:1fr; }
  .theme-choice { grid-template-columns:auto 1fr; column-gap:10px; align-items:center; }
  .theme-choice > span { grid-row:1/3; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior:auto !important;
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
}

:root {
  --chart-grid:rgba(148,163,184,.14);
  --chart-muted:#8190aa;
  --chart-label:#aab5ca;
}
html[data-theme="light"] {
  --chart-grid:rgba(100,116,139,.18);
  --chart-muted:#667085;
  --chart-label:#475467;
}

/* v30 accessibility + light-mode contrast cleanup */
@media (min-width:801px) {
  .manager-workspace-copy,
  .company-policy-copy,
  .company-policy-name small,
  .balance-managed-message,
  .approval-config-copy,
  .preview-safety-note,
  .work-calendar-copy,
  .work-calendar-review-state,
  .history-copy,
  .team-calendar-copy,
  .feature-preview-card p,
  .request-row-main small,
  .manager-request-person small,
  .manager-request-card small,
  .member-row small,
  .history-row-head small,
  .history-event small,
  .trip-hero-stat span,
  .trip-empty,
  .profile-identity span,
  .vacation-summary span,
  .settings-subhead span {
    font-size:14px;
    line-height:1.55;
  }
  .trip-chip { font-size:13px; }
  .team-calendar-stats span { font-size:12px; }
  .theme-choice strong { font-size:14px; }
  .theme-choice small { font-size:12px; }
  .feature-preview-card p { max-width:76ch; }
}
html[data-theme="light"] .projected-grid > div {
  background:#ffffff;
  color:#172033;
  border-color:#d7e0ed;
  box-shadow:0 6px 18px rgba(68,79,110,.06);
}
html[data-theme="light"] .projected-grid small { color:#667085; }
html[data-theme="light"] .projected-grid strong { color:#172033; }
html[data-theme="light"] .danger-button {
  background:#fff1f2;
  color:#be123c;
  border-color:#fda4af;
}
html[data-theme="light"] .feature-on,
html[data-theme="light"] .request-status-approved,
html[data-theme="light"] .request-status-completed,
html[data-theme="light"] .history-status-taken,
html[data-theme="light"] .history-status-approved,
html[data-theme="light"] .history-status-completed,
html[data-theme="light"] .status-taken { color:#166534; }
html[data-theme="light"] .feature-off { color:#475467; }
html[data-theme="light"] .request-status-declined,
html[data-theme="light"] .request-status-cancelled,
html[data-theme="light"] .history-status-declined,
html[data-theme="light"] .history-status-cancelled { color:#be123c; }
html[data-theme="light"] .auth-message {
  color:#be123c;
  background:#fff1f2;
  border-color:#fecdd3;
}
html[data-theme="light"] .avatar,
html[data-theme="light"] .user-chip > span,
html[data-theme="light"] .profile-avatar {
  background-color:#e7ebf4;
  color:#24324a;
  border-color:#d8e0eb;
}
/* v32 responsive workspace shell */
.desktop-sidebar,.desktop-page-context { display:none; }
body {
  background-image:url('/art/horizon-dark.svg'),radial-gradient(circle at top,#18213b 0,#090d18 38%);
  background-position:center bottom,center top;
  background-repeat:no-repeat,no-repeat;
  background-size:max(1180px,100vw) auto,auto;
  background-attachment:fixed,fixed;
}
@media (min-width:801px) {
  html { scroll-padding-top:28px; }
  .shell {
    width:min(1480px,calc(100% - 34px));
    display:grid;
    grid-template-columns:244px minmax(0,1fr);
    column-gap:22px;
    align-items:start;
    padding:18px 0 80px;
  }
  .desktop-sidebar {
    display:flex;
    flex-direction:column;
    grid-row:1/3;
    position:sticky;
    top:18px;
    height:calc(100vh - 36px);
    min-height:620px;
    padding:20px 16px 16px;
    border:1px solid rgba(148,163,184,.14);
    border-radius:28px;
    background:linear-gradient(180deg,rgba(18,25,45,.96),rgba(10,15,29,.96));
    box-shadow:0 24px 70px rgba(0,0,0,.22);
    backdrop-filter:blur(18px);
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
  }
  .sidebar-brand { display:grid; gap:14px; padding:2px 6px 20px; }
  .sidebar-brand .brand-lockup { margin:0; }
  .sidebar-brand .brand-mark { width:44px; height:44px; border-radius:15px; }
  .sidebar-brand .brand-lockup h1 { font-size:24px; }
  .sidebar-badge {
    width:max-content;
    padding:5px 9px;
    border-radius:999px;
    border:1px solid rgba(167,139,250,.18);
    background:rgba(124,58,237,.09);
    color:#c4b5fd;
    font-size:10px;
    font-weight:800;
    letter-spacing:.09em;
    text-transform:uppercase;
  }
  .desktop-nav { display:grid; gap:5px; }
  .desktop-nav button {
    width:100%;
    display:flex;
    align-items:center;
    gap:11px;
    min-height:46px;
    padding:9px 11px;
    border:0;
    border-radius:14px;
    background:transparent;
    color:#aeb8cc;
    text-align:left;
    font-weight:750;
  }
  .desktop-nav button:hover { background:rgba(148,163,184,.07); color:#f8fafc; }
  .desktop-nav button.active {
    color:#ffffff;
    background:linear-gradient(135deg,rgba(124,58,237,.27),rgba(139,92,246,.13));
    box-shadow:inset 0 0 0 1px rgba(167,139,250,.16);
  }
  .nav-glyph {
    width:28px;
    height:28px;
    display:grid;
    place-items:center;
    flex:0 0 28px;
    border-radius:9px;
    background:rgba(148,163,184,.07);
    font-size:15px;
  }
  .desktop-nav button.active .nav-glyph { background:rgba(167,139,250,.16); }
  .desktop-nav-divider { height:1px; margin:10px 8px; background:rgba(148,163,184,.10); }
  .sidebar-spacer { flex:1; min-height:20px; }
  .sidebar-account { display:grid; gap:8px; padding-top:14px; border-top:1px solid rgba(148,163,184,.10); }
  .sidebar-profile,.sidebar-settings {
    width:100%;
    border:0;
    border-radius:14px;
    background:transparent;
    color:var(--text);
  }
  .sidebar-profile {
    display:grid;
    grid-template-columns:38px 1fr;
    gap:10px;
    align-items:center;
    padding:8px;
    text-align:left;
  }
  .sidebar-profile:hover,.sidebar-settings:hover { background:rgba(148,163,184,.07); }
  .sidebar-avatar {
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:#232d49 center/cover no-repeat;
    color:#fff;
    font-weight:900;
  }
  .sidebar-profile-copy { min-width:0; display:grid; gap:1px; }
  .sidebar-profile-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
  .sidebar-profile-copy small { color:var(--muted); font-size:11px; }
  .sidebar-settings { display:flex; align-items:center; gap:10px; min-height:42px; padding:9px 11px; text-align:left; font-weight:750; }
  .sidebar-origin { padding:8px 8px 2px; color:#9da8bd; font-size:10px; line-height:1.45; }
  .sidebar-origin span { color:#737f96; }
  .topbar { grid-column:2; margin:0 0 14px; padding:8px 4px 2px; }
  .topbar > .brand-lockup,.topbar > .top-actions { display:none; }
  .desktop-page-context { display:grid; gap:2px; }
  .desktop-page-context strong { font-size:22px; letter-spacing:-.025em; }
  main { grid-column:2; min-width:0; }
  main > section,.two-col { scroll-margin-top:28px; }
}
@media (min-width:801px) and (max-width:1080px) {
  .shell { grid-template-columns:88px minmax(0,1fr); column-gap:16px; }
  .desktop-sidebar { min-height:560px; padding:16px 10px; border-radius:24px; }
  .sidebar-brand { justify-items:center; padding:0 0 18px; }
  .sidebar-brand .brand-lockup > div:last-child,.sidebar-badge,
  .desktop-nav button > span:last-child,.sidebar-profile-copy,
  .sidebar-settings > span:last-child,.sidebar-origin { display:none; }
  .desktop-nav button { justify-content:center; padding:8px; }
  .desktop-nav-divider { margin:9px 5px; }
  .sidebar-profile { display:flex; justify-content:center; padding:7px; }
  .sidebar-settings { justify-content:center; padding:8px; }
}
html[data-theme="light"] body {
  background-image:url('/art/horizon-light.svg'),radial-gradient(circle at top,#eef2ff 0,#f7f9fc 42%,#f4f7fb 100%);
  background-position:center bottom,center top;
  background-repeat:no-repeat,no-repeat;
  background-size:max(1180px,100vw) auto,auto;
  background-attachment:fixed,fixed;
}
@media (min-width:801px) {
  html[data-theme="light"] .desktop-sidebar {
    background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(247,249,253,.96));
    border-color:#dfe6f1;
    box-shadow:0 24px 65px rgba(68,79,110,.11);
  }
  html[data-theme="light"] .desktop-nav button { color:#647086; }
  html[data-theme="light"] .desktop-nav button:hover { background:#f4f1ff; color:#3f2c8f; }
  html[data-theme="light"] .desktop-nav button.active {
    color:#4f31bb;
    background:linear-gradient(135deg,#eee9ff,#f7f4ff);
    box-shadow:inset 0 0 0 1px #ddd4ff;
  }
  html[data-theme="light"] .nav-glyph { background:#f2f4f8; }
  html[data-theme="light"] .desktop-nav button.active .nav-glyph { background:#e5ddff; }
  html[data-theme="light"] .sidebar-profile:hover,
  html[data-theme="light"] .sidebar-settings:hover { background:#f4f1ff; }
  html[data-theme="light"] .sidebar-avatar { background-color:#e7ebf4; color:#24324a; }
  html[data-theme="light"] .sidebar-origin { color:#69758a; }
  html[data-theme="light"] .sidebar-origin span { color:#8994a6; }
}
@media (max-width:800px) {
  body {
    background-size:1100px auto,auto;
    background-position:center bottom,center top;
    background-attachment:scroll,scroll;
  }
  .desktop-sidebar,.desktop-page-context { display:none !important; }
}
@media (prefers-reduced-motion:reduce) {
  body { background-attachment:scroll,scroll; }
}

/* v33 workspace information architecture */
.workspace-item:not(.workspace-active) { display:none !important; }
.admin-section-hidden { display:none !important; }
.admin-panel.workspace-active { padding:26px; }
.admin-workspace-heading { align-items:flex-start; }
.admin-workspace-heading > span { max-width:58ch; line-height:1.5; text-align:right; }
.admin-section-nav {
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:5px;
  margin:4px 0 22px;
  border:1px solid rgba(148,163,184,.12);
  border-radius:16px;
  background:rgba(8,13,25,.32);
  scrollbar-width:none;
}
.admin-section-nav::-webkit-scrollbar { display:none; }
.admin-section-nav button {
  flex:0 0 auto;
  min-height:40px;
  padding:9px 13px;
  border:0;
  border-radius:11px;
  background:transparent;
  color:var(--muted);
  font-weight:800;
}

.admin-section-nav button:hover { color:var(--text); background:rgba(148,163,184,.07); }
.admin-section-nav button.active {
  color:#fff;
  background:linear-gradient(135deg,rgba(124,58,237,.38),rgba(139,92,246,.20));
  box-shadow:inset 0 0 0 1px rgba(167,139,250,.20);
}
.admin-system-panel {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:20px;
  border:1px solid rgba(148,163,184,.12);
  border-radius:18px;
  background:rgba(15,23,42,.42);
}
.admin-system-panel > div { display:grid; gap:5px; }
.admin-system-panel .backup-btn { margin:0; flex:0 0 auto; }
.profile-more {
  display:grid;
  gap:10px;
  margin:18px 0;
  padding-top:16px;
  border-top:1px solid rgba(148,163,184,.10);
}
.profile-more-grid { display:grid; gap:8px; }
.profile-more-button {
  width:100%;
  display:grid;

  grid-template-columns:34px 1fr;
  gap:10px;
  align-items:center;
  padding:11px 12px;
  border:1px solid rgba(148,163,184,.12);
  border-radius:14px;
  background:rgba(15,23,42,.44);
  color:var(--text);
  text-align:left;
}
.profile-more-button:hover { border-color:rgba(167,139,250,.35); background:rgba(124,58,237,.08); }
.profile-more-button > span:first-child {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:rgba(148,163,184,.08);
}
.profile-more-button > span:last-child { min-width:0; display:grid; gap:2px; }
.profile-more-button strong { font-size:13px; }
.profile-more-button small { color:var(--muted); font-size:11px; line-height:1.35; }
html[data-theme="light"] .admin-section-nav { background:#f7f8fc; border-color:#dfe5ee; }
html[data-theme="light"] .admin-section-nav button.active { color:#4f31bb; background:#eee9ff; }
html[data-theme="light"] .admin-system-panel,
html[data-theme="light"] .profile-more-button { background:#fff; border-color:#e0e7f1; }
@media (max-width:800px) {

  .workspace-item.workspace-active { margin-top:0; }
  .admin-panel.workspace-active { padding:18px; border-radius:20px; }
  .admin-workspace-heading { gap:8px; }
  .admin-workspace-heading > span { text-align:left; }
  .admin-section-nav { margin-inline:-4px; padding:4px; border-radius:14px; }
  .admin-section-nav button { min-height:38px; padding:8px 11px; font-size:12px; }
  .admin-system-panel { align-items:flex-start; flex-direction:column; }
  .admin-system-panel .backup-btn { width:100%; }
  .profile-more-button { min-height:58px; }
}

/* v33 workspace composition polish */
@media (min-width:801px) {
  .desktop-page-context { gap:3px; padding:2px 2px 8px; }
  .desktop-page-context strong { font-size:28px; line-height:1.12; letter-spacing:-.035em; }

  body:not([data-workspace="home"]) main {
    min-height:calc(100vh - 112px);
    padding:28px;
    border:1px solid rgba(148,163,184,.12);
    border-radius:30px;
    background:
      linear-gradient(180deg,rgba(17,24,43,.82),rgba(10,15,29,.76));
    box-shadow:0 24px 70px rgba(0,0,0,.16);
    backdrop-filter:blur(14px);
  }

  body:not([data-workspace="home"]) main > .workspace-item.workspace-active.card {
    width:100%;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }

  body[data-workspace="plan"] #planWorkspace.workspace-active {
    width:100%;
    margin:0;
    align-items:start;
  }

  body[data-workspace="admin"] #adminPanel.workspace-active {
    padding:0;
  }

  body[data-workspace="trips"] #plansCard.workspace-active,
  body[data-workspace="history"] #historyCard.workspace-active,
  body[data-workspace="balance"] #balanceCard.workspace-active,
  body[data-workspace="requests"] #approvalRequestCard.workspace-active,
  body[data-workspace="manager"] #managerWorkspaceCard.workspace-active,
  body[data-workspace="team"] #teamCalendarCard.workspace-active {
    padding:0;
  }

  body[data-workspace="admin"] .feature-preview-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }

  body[data-workspace="admin"] .feature-preview-card,
  body[data-workspace="admin"] .approval-preview-shell,
  body[data-workspace="admin"] .company-policy-row,
  body[data-workspace="admin"] .approval-config-row,
  body[data-workspace="admin"] .work-calendar-row,
  body[data-workspace="admin"] .admin-system-panel {
    background:rgba(12,19,36,.62);
  }

  body[data-workspace="admin"] .approval-preview-shell,
  body[data-workspace="admin"] .company-policy-shell,
  body[data-workspace="admin"] .approval-config-shell,
  body[data-workspace="admin"] .work-calendar-shell {
    margin-top:0;
  }

  .workspace-item.workspace-active {
    animation:dayoff-rise .24s ease both;
  }
}

html[data-theme="light"] body:not([data-workspace="home"]) main {
  background:linear-gradient(180deg,rgba(255,255,255,.90),rgba(248,250,253,.90));
  border-color:#dfe6ef;
  box-shadow:0 20px 60px rgba(68,79,110,.09);
}

@media (min-width:801px) {
  html[data-theme="light"] body[data-workspace="admin"] .feature-preview-card,
  html[data-theme="light"] body[data-workspace="admin"] .approval-preview-shell,
  html[data-theme="light"] body[data-workspace="admin"] .company-policy-row,
  html[data-theme="light"] body[data-workspace="admin"] .approval-config-row,
  html[data-theme="light"] body[data-workspace="admin"] .work-calendar-row,
  html[data-theme="light"] body[data-workspace="admin"] .admin-system-panel {
    background:#fff;
  }
}

@media (max-width:800px) {
  body:not([data-workspace="home"]) main {
    min-height:calc(100vh - 170px);
  }
  body:not([data-workspace="home"]) main > .workspace-item.workspace-active.card {
    width:100%;
    margin:0;
  }
  body[data-workspace="admin"] #adminPanel.workspace-active,
  body[data-workspace="trips"] #plansCard.workspace-active,
  body[data-workspace="history"] #historyCard.workspace-active,
  body[data-workspace="balance"] #balanceCard.workspace-active,
  body[data-workspace="requests"] #approvalRequestCard.workspace-active,
  body[data-workspace="manager"] #managerWorkspaceCard.workspace-active,
  body[data-workspace="team"] #teamCalendarCard.workspace-active {
    margin-top:0;
  }
}

.workspace-page { width:100%; }
.workspace-page-header {
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:flex-end;
  margin-bottom:20px;
}
.workspace-page-header h3 { margin-top:4px; font-size:28px; letter-spacing:-.035em; }
.workspace-page-header > p { max-width:52ch; text-align:right; }
.plan-grid { margin:0; align-items:start; }
.plan-grid > .card { min-height:100%; }
@media (max-width:800px) {
  .workspace-page-header {
    align-items:flex-start;
    flex-direction:column;
    gap:8px;
    margin-bottom:14px;
  }
  .workspace-page-header h3 { font-size:22px; }
  .workspace-page-header > p { max-width:none; text-align:left; }
  .plan-grid { margin:0; }
}

.home-insights-grid {
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(300px,.75fr);
  gap:14px;
  margin-bottom:14px;
}
.home-insights-grid .chart-card { margin:0; }
.home-upcoming-card { padding:22px; display:flex; flex-direction:column; }
.compact-action { min-height:38px; padding:8px 11px; font-size:12px; }
.home-upcoming { display:grid; gap:18px; flex:1; }
.home-upcoming-open {
  width:100%;
  min-width:0;
  display:grid;
  gap:18px;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  text-align:left;
  font:inherit;
  border-radius:18px;
  appearance:none;
  -webkit-appearance:none;
}
.home-upcoming-open:focus-visible {
  outline:3px solid rgba(139,92,246,.52);
  outline-offset:4px;
}
@media (hover:hover) {
  .home-upcoming-open:hover .home-upcoming-hero {
    border-color:rgba(139,92,246,.30);
    background:linear-gradient(135deg,rgba(124,58,237,.14),rgba(14,165,233,.075));
  }
}
.home-upcoming-open:active .home-upcoming-hero { transform:scale(.995); }
.home-upcoming-hero {
  display:flex;
  gap:14px;
  align-items:center;
  padding:16px;
  border:1px solid rgba(148,163,184,.11);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(124,58,237,.10),rgba(14,165,233,.055));
}
.home-upcoming-icon {
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  flex:0 0 46px;
  border-radius:15px;
  background:rgba(124,58,237,.13);
  font-size:22px;
}
.home-upcoming-hero > div { min-width:0; display:grid; gap:3px; }
.home-upcoming-hero strong { font-size:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-upcoming-hero p { color:var(--muted); font-size:12px; line-height:1.4; }
.home-upcoming-copy { min-width:0; display:grid; gap:3px; justify-items:start; }
.home-countdown-pill {
  display:inline-flex;
  align-items:center;
  width:max-content;
  max-width:100%;
  margin-top:5px;
  padding:4px 7px;
  border-radius:999px;
  border:1px solid rgba(139,92,246,.18);
  background:rgba(139,92,246,.09);
  color:#cfc3ff;
  font-size:10px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}
.home-upcoming-meta {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:auto;
}
.home-upcoming-meta > div {
  display:grid;
  gap:3px;
  padding:13px;
  border-radius:14px;
  background:rgba(15,23,42,.46);
  border:1px solid rgba(148,163,184,.09);
}
.home-upcoming-meta span { color:var(--muted); font-size:11px; }
.home-upcoming-meta strong { font-size:14px; text-transform:capitalize; }
.home-upcoming-empty {
  min-height:190px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:5px;
  text-align:center;
  color:var(--muted);
}
.home-upcoming-empty > span { font-size:30px; }
.home-upcoming-empty strong { color:var(--text); }
.home-upcoming-empty p { font-size:12px; }
.home-empty-plan { min-height:36px; margin-top:8px; padding:7px 11px; font-size:11px; }
html[data-theme="light"] .home-upcoming-hero,
html[data-theme="light"] .home-upcoming-meta > div {
  background:#fff;
  border-color:#dfe6ef;
}
html[data-theme="light"] .home-countdown-pill {
  color:#6d3dd1;
  background:#f4efff;
  border-color:#e0d4ff;
}
@media (max-width:1100px) and (min-width:801px) {
  .home-insights-grid { grid-template-columns:1fr; }
  .home-upcoming-card { min-height:auto; }
}
@media (max-width:800px) {
  .home-insights-grid { grid-template-columns:1fr; gap:12px; margin-bottom:12px; }
  .home-upcoming-card { padding:18px; }
  .home-upcoming-empty { min-height:130px; }
}

/* v34 loading / empty / error states */
.state-panel,
.empty-state {
  min-height:150px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:6px;
  padding:24px;
  border:1px dashed rgba(148,163,184,.22);
  border-radius:20px;
  background:rgba(15,23,42,.24);
  color:var(--muted);
  text-align:center;
}
.state-panel strong,
.empty-state strong { color:var(--text); font-size:15px; }
.state-panel p,
.empty-state p { max-width:48ch; margin:0; font-size:13px; line-height:1.5; }
.state-icon { font-size:26px; line-height:1; margin-bottom:2px; }
.state-action { min-height:40px; margin-top:8px; padding:9px 14px; font-size:12px; }
.error-state {
  border-style:solid;
  border-color:rgba(244,63,94,.24);
  background:rgba(244,63,94,.045);
}
.error-state .state-icon { color:#fb7185; }
.loading-state { border-style:solid; }
.loading-state .state-icon { animation:dayoff-soft-pulse 1.5s ease-in-out infinite; }
.empty-state::before { content:none; }

.skeleton-card {
  min-height:172px;
  display:grid;
  align-content:center;
  gap:13px;
  pointer-events:none;
}
.skeleton-line {
  display:block;
  width:100%;
  height:12px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(148,163,184,.09),rgba(148,163,184,.20),rgba(148,163,184,.09));
  background-size:220% 100%;
  animation:dayoff-skeleton 1.45s ease-in-out infinite;
}
.skeleton-line.short { width:42%; }
.skeleton-line.value { width:58%; height:38px; border-radius:12px; }
.chart-skeleton {
  min-height:250px;
  display:grid;
  align-content:end;
  gap:34px;
  padding:28px 18px 32px;
  border-radius:16px;
  overflow:hidden;
}
.chart-skeleton span {
  display:block;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(148,163,184,.08),rgba(148,163,184,.23),rgba(148,163,184,.08));
  background-size:220% 100%;
  animation:dayoff-skeleton 1.45s ease-in-out infinite;
}
@keyframes dayoff-skeleton {
  0% { background-position:100% 0; }
  100% { background-position:-120% 0; }
}
@keyframes dayoff-soft-pulse {
  0%,100% { opacity:.55; transform:translateY(0); }
  50% { opacity:1; transform:translateY(-2px); }
}
html[data-theme="light"] .state-panel,
html[data-theme="light"] .empty-state { background:rgba(255,255,255,.72); border-color:#d7e0ec; }
html[data-theme="light"] .error-state { background:#fff7f8; border-color:#fecdd3; }
@media (prefers-reduced-motion:reduce) {
  .skeleton-line,.chart-skeleton span,.loading-state .state-icon { animation:none; }
}
@media (max-width:800px) {
  .state-panel,.empty-state { min-height:126px; padding:20px 16px; border-radius:18px; }
  .skeleton-card { min-height:138px; }
}

.balance-grid.state-layout {
  display:block;
  overflow:visible;
  padding-bottom:0;
}
.balance-grid.state-layout > .state-panel { width:100%; }

/* v36 People onboarding */
.people-onboarding-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:4px 0 14px;
}
.people-add-card,
.invite-tracker {
  padding:18px;
  border:1px solid rgba(148,163,184,.12);
  border-radius:18px;
  background:rgba(15,23,42,.42);
}
.people-add-card-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:14px;
}
.people-add-card-head h4 { margin:3px 0 0; font-size:16px; }
.people-invite-form {
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
.people-invite-form .field-row {
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.bulk-invite-card { display:flex; flex-direction:column; }
.bulk-invite-card > p { margin:0 0 10px; line-height:1.5; font-size:12px; }
.bulk-invite-card textarea {
  min-height:144px;
  resize:vertical;
  line-height:1.5;
  font-family:inherit;
}
.bulk-invite-actions {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  margin-top:10px;
}
.file-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  cursor:pointer;
}
.visually-hidden {
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
.invite-tracker { margin:14px 0; }
.invite-summary { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
.invite-summary .tag { white-space:nowrap; }
.invite-list { display:grid; gap:8px; }
.invite-row {
  display:grid;
  grid-template-columns:minmax(180px,1.4fr) minmax(110px,.7fr) minmax(120px,.8fr) auto;
  gap:12px;
  align-items:center;
  padding:12px 13px;
  border:1px solid rgba(148,163,184,.10);
  border-radius:14px;
  background:rgba(15,23,42,.34);
}
.invite-person { min-width:0; display:grid; gap:2px; }
.invite-person strong,.invite-person small {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.invite-person small,.invite-meta small { color:var(--muted); font-size:11px; }
.invite-meta { display:grid; gap:3px; }
.invite-role { text-transform:capitalize; }
.invite-actions { display:flex; justify-content:flex-end; gap:6px; flex-wrap:wrap; }
.invite-actions button { padding:7px 9px; font-size:11px; }
.invite-status {
  display:inline-flex;
  width:max-content;
  padding:5px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.invite-status.pending { color:#f6cf77; background:rgba(245,158,11,.10); }
.invite-status.joined { color:#b9f8c7; background:rgba(34,197,94,.10); }
.invite-status.expired { color:#cbd5e1; background:rgba(148,163,184,.11); }
.invite-status.revoked { color:#fca5a5; background:rgba(244,63,94,.09); }
.prepared-invites { display:grid; gap:8px; margin-top:6px; }
.prepared-invite-row {
  display:grid;
  grid-template-columns:minmax(150px,1fr) auto;
  gap:8px;
  align-items:center;
}
.prepared-invite-row > div { min-width:0; display:grid; gap:2px; }
.prepared-invite-row strong,.prepared-invite-row small {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.prepared-invite-row small { color:var(--muted); }
.invite-result-head {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}
html[data-theme="light"] .people-add-card,
html[data-theme="light"] .invite-tracker,
html[data-theme="light"] .invite-row {
  background:#fff;
  border-color:#e0e7f1;
}
@media (max-width:1000px) {
  .people-onboarding-grid { grid-template-columns:1fr; }
  .invite-row { grid-template-columns:minmax(0,1fr) auto; }
  .invite-meta { grid-column:1; }
  .invite-actions { grid-column:2; grid-row:1/3; align-self:center; }
}
@media (max-width:650px) {
  .people-invite-form .field-row { grid-template-columns:1fr; }
  .bulk-invite-actions { align-items:stretch; flex-direction:column; }
  .bulk-invite-actions > * { width:100%; }
  .invite-row { grid-template-columns:1fr; }
  .invite-meta,.invite-actions { grid-column:auto; grid-row:auto; }
  .invite-actions { justify-content:flex-start; }
  .invite-summary { justify-content:flex-start; }
  .prepared-invite-row { grid-template-columns:1fr; }
}

/* v39 mobile viewport / zoom hardening */
@media (max-width:800px) {
  html,body {
    max-width:100%;
    overflow-x:clip;
  }
  .shell {
    display:block;
    width:100%;
    max-width:none;
    min-width:0;
    margin:0;
    grid-template-columns:none;
  }
  .topbar {
    position:relative;
    top:auto;
    left:auto;
    right:auto;
    width:100%;
    max-width:100%;
    min-width:0;
  }
  .topbar > .brand-lockup {
    min-width:0;
  }
  .topbar > .top-actions {
    flex:0 0 auto;
    min-width:0;
  }
  main {
    width:100%;
    max-width:100%;
    min-width:0;
  }
  .hero,
  .balance-grid,
  .home-insights-grid {
    width:100%;
    max-width:100%;
    min-width:0;
  }
}

/* v40 mobile insight-card containment */
@media (max-width:800px) {
  .home-insights-grid > * {
    min-width:0;
    max-width:100%;
  }

  .home-insights-grid .chart-card,
  .home-upcoming-card,
  .home-upcoming,
  .home-upcoming-meta {
    width:100%;
    max-width:100%;
    min-width:0;
  }

  .chart {
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:hidden;
    scroll-snap-type:none;
  }

  .chart svg {
    width:100%;
    max-width:100%;
    min-width:0;
    height:230px;
  }

  .home-upcoming-meta {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }

  .home-upcoming-meta > div {
    min-width:0;
    overflow:hidden;
  }

  .home-upcoming-meta strong {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}

/* v42 People import polish */
.bulk-import-preview {
  margin-top:10px;
  padding:10px 12px;
  border:1px dashed rgba(148,163,184,.24);
  border-radius:12px;
  font-size:12px;
  line-height:1.45;
  background:rgba(15,23,42,.22);
}
.bulk-import-ready {
  color:#b9f8c7;
  border-color:rgba(34,197,94,.28);
  background:rgba(34,197,94,.08);
}
.bulk-import-error {
  color:#fecaca;
  border-color:rgba(244,63,94,.28);
  background:rgba(244,63,94,.07);
}
.bulk-invite-actions-wrap {
  flex-wrap:wrap;
}
html[data-theme="light"] .bulk-import-preview {
  background:#f8fafc;
  border-color:#dbe3ee;
}
html[data-theme="light"] .bulk-import-ready {
  color:#166534;
  background:#f0fdf4;
  border-color:#bbf7d0;
}
html[data-theme="light"] .bulk-import-error {
  color:#991b1b;
  background:#fef2f2;
  border-color:#fecaca;
}
@media (max-width:650px) {
  .bulk-invite-actions-wrap > * {
    flex:1 1 100%;
  }
}

/* v43 visual polish — consistent iconography and restrained Edmonton artwork */
.hero {
  isolation:isolate;
}
.hero > * {
  position:relative;
  z-index:2;
}
.hero::before {
  content:"";
  position:absolute;
  z-index:0;
  right:-18px;
  bottom:-24px;
  width:min(48%,430px);
  height:145%;
  background:url('/art/horizon-dark.svg') right bottom / contain no-repeat;
  opacity:.16;
  pointer-events:none;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 28%,#000 100%);
  mask-image:linear-gradient(90deg,transparent 0%,#000 28%,#000 100%);
}
.hero::after {
  content:"";
  position:absolute;
  z-index:0;
  right:8%;
  top:-48%;
  width:220px;
  height:220px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(124,58,237,.18),rgba(14,165,233,.06) 54%,transparent 72%);
  opacity:.72;
  pointer-events:none;
  transform:none;
  filter:none;
}

.balance-head {
  align-items:center;
  gap:12px;
}
.balance-icon-badge {
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  color:var(--leave-accent,var(--accent));
  background:color-mix(in srgb,var(--leave-accent,var(--accent)) 14%,transparent);
  border:1px solid color-mix(in srgb,var(--leave-accent,var(--accent)) 22%,transparent);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.leave-icon-svg,
.travel-icon-svg {
  display:block;
  width:22px;
  height:22px;
}
.tag .leave-icon-svg {
  display:inline-block;
  width:14px;
  height:14px;
  margin-right:4px;
  vertical-align:-2px;
}

.section-title-with-icon {
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
}
.section-title-with-icon > div {
  min-width:0;
}
.section-icon {
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.14);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.section-icon svg {
  width:21px;
  height:21px;
}
.section-icon-chart {
  color:#b994ff;
  background:linear-gradient(145deg,rgba(124,58,237,.18),rgba(14,165,233,.09));
}
.section-icon-travel {
  color:#ffbe67;
  background:linear-gradient(145deg,rgba(245,158,11,.16),rgba(124,58,237,.08));
}

.visual-accent-card {
  position:relative;
  overflow:hidden;
  isolation:isolate;
}
.visual-accent-card > * {
  position:relative;
  z-index:1;
}
.visual-accent-card::after {
  content:"";
  position:absolute;
  z-index:0;
  right:-72px;
  top:-90px;
  width:210px;
  height:210px;
  border-radius:50%;
  pointer-events:none;
  opacity:.72;
}
.forecast-card::after {
  background:radial-gradient(circle,rgba(124,58,237,.10),transparent 68%);
}
.next-break-card::after {
  background:radial-gradient(circle,rgba(245,158,11,.10),transparent 68%);
}

.home-upcoming-icon {
  color:#9f67ff;
  background:linear-gradient(145deg,rgba(124,58,237,.17),rgba(14,165,233,.10));
  border:1px solid rgba(167,139,250,.14);
}
.home-upcoming-icon .travel-icon-svg {
  width:23px;
  height:23px;
}

html[data-theme="light"] .hero::before {
  background-image:url('/art/horizon-light.svg');
  opacity:.22;
}
html[data-theme="light"] .hero::after {
  background:radial-gradient(circle,rgba(124,58,237,.10),rgba(14,165,233,.04) 55%,transparent 72%);
}
html[data-theme="light"] .balance-icon-badge {
  background:color-mix(in srgb,var(--leave-accent,var(--accent)) 10%,white);
  border-color:color-mix(in srgb,var(--leave-accent,var(--accent)) 22%,white);
  box-shadow:0 8px 24px rgba(68,79,110,.06);
}
html[data-theme="light"] .section-icon {
  border-color:#e2e8f0;
  box-shadow:0 8px 24px rgba(68,79,110,.06);
}
html[data-theme="light"] .section-icon-chart {
  color:#6d3dd1;
  background:linear-gradient(145deg,#f1eaff,#eef8ff);
}
html[data-theme="light"] .section-icon-travel {
  color:#c56a08;
  background:linear-gradient(145deg,#fff3df,#f7edff);
}
html[data-theme="light"] .home-upcoming-icon {
  color:#7541dc;
  background:linear-gradient(145deg,#efe7ff,#e9f8ff);
  border-color:#e1d4ff;
}

@media (max-width:800px) {
  .hero::before {
    right:-42px;
    width:62%;
    height:125%;
    opacity:.11;
  }
  html[data-theme="light"] .hero::before {
    opacity:.15;
  }
  .balance-icon-badge {
    width:38px;
    height:38px;
    flex-basis:38px;
    border-radius:13px;
  }
  .balance-icon-badge .leave-icon-svg {
    width:20px;
    height:20px;
  }
  .section-icon {
    width:38px;
    height:38px;
    flex-basis:38px;
    border-radius:13px;
  }
  .section-icon svg {
    width:19px;
    height:19px;
  }
  .section-title-with-icon {
    gap:10px;
  }
}

@media (max-width:430px) {
  .chart-card .section-head,
  .home-upcoming-card .section-head {
    align-items:flex-start;
  }
  .chart-card .section-head > .muted {
    margin-top:8px;
  }
}

/* v44 emoji-forward polish */
.balance-emoji {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:21px;
  line-height:1;
  filter:saturate(1.08);
}

.section-emoji {
  font-size:21px;
  line-height:1;
}

.home-upcoming-icon {
  font-size:22px;
  line-height:1;
}

@media (min-width:801px) {
  .nav-glyph {
    font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
    font-size:16px;
    line-height:1;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
    transition:transform .16s ease,background .16s ease,box-shadow .16s ease;
  }

  .desktop-nav button:hover .nav-glyph,
  .desktop-nav button.active .nav-glyph {
    transform:translateY(-1px) scale(1.04);
  }

  .desktop-nav button[data-workspace="home"] .nav-glyph {
    background:rgba(139,92,246,.16);
  }
  .desktop-nav button[data-workspace="plan"] .nav-glyph {
    background:rgba(14,165,233,.14);
  }
  .desktop-nav button[data-workspace="trips"] .nav-glyph {
    background:rgba(245,158,11,.14);
  }
  .desktop-nav button[data-workspace="balance"] .nav-glyph {
    background:rgba(16,185,129,.14);
  }
  .desktop-nav button[data-workspace="history"] .nav-glyph {
    background:rgba(148,163,184,.13);
  }
  .desktop-nav button[data-workspace="team"] .nav-glyph {
    background:rgba(236,72,153,.13);
  }
  .desktop-nav button[data-workspace="requests"] .nav-glyph {
    background:rgba(34,197,94,.14);
  }
  .desktop-nav button[data-workspace="manager"] .nav-glyph {
    background:rgba(6,182,212,.14);
  }
  .desktop-nav button[data-workspace="admin"] .nav-glyph {
    background:rgba(249,115,22,.14);
  }

  html[data-theme="light"] .desktop-nav button[data-workspace="home"] .nav-glyph {
    background:#f0eaff;
  }
  html[data-theme="light"] .desktop-nav button[data-workspace="plan"] .nav-glyph {
    background:#eaf8ff;
  }
  html[data-theme="light"] .desktop-nav button[data-workspace="trips"] .nav-glyph {
    background:#fff5df;
  }
  html[data-theme="light"] .desktop-nav button[data-workspace="balance"] .nav-glyph {
    background:#eafaf3;
  }
  html[data-theme="light"] .desktop-nav button[data-workspace="history"] .nav-glyph {
    background:#f1f5f9;
  }
  html[data-theme="light"] .desktop-nav button[data-workspace="team"] .nav-glyph {
    background:#fff0f7;
  }
  html[data-theme="light"] .desktop-nav button[data-workspace="requests"] .nav-glyph {
    background:#ecfdf3;
  }
  html[data-theme="light"] .desktop-nav button[data-workspace="manager"] .nav-glyph {
    background:#ecfeff;
  }
  html[data-theme="light"] .desktop-nav button[data-workspace="admin"] .nav-glyph {
    background:#fff4e8;
  }
}

@media (max-width:800px) {
  .balance-emoji {
    font-size:20px;
  }
  .section-emoji {
    font-size:20px;
  }
}

.employer-demo-state {
  display:grid;
  gap:14px;
  margin:14px 0;
}
.employer-demo-summary {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(120px,.75fr));
  gap:10px;
}
.employer-demo-summary > div {
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--soft);
}
.employer-demo-summary strong {
  font-size:1.05rem;
}
.employer-demo-summary small {
  color:var(--muted);
}
.employer-demo-tags {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.employer-demo-story {
  display:grid;
  gap:7px;
  padding:14px 16px;
  border-radius:16px;
  background:var(--soft);
}
.employer-demo-story p {
  margin:0;
}
.employer-demo-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:10px 0 18px;
}
#employerDemoInviteForm {
  margin-top:8px;
}
@media (max-width:720px) {
  .employer-demo-summary {
    grid-template-columns:1fr;
  }
}

/* v47 desktop typography + rhythm experiment
   Intentionally scoped to desktop so the approved mobile visual remains untouched. */
@media (min-width:801px) {
  body {
    font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI Variable Text","Segoe UI Variable","Segoe UI",sans-serif;
    font-size:16px;
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
  }

  h1,h2,h3 {
    font-weight:600;
    letter-spacing:-.025em;
  }

  p { line-height:1.58; }

  .eyebrow {
    font-size:11px;
    font-weight:600;
    letter-spacing:.13em;
  }

  label {
    font-size:13px;
    font-weight:500;
  }

  .primary,.ghost,
  .settings-button,
  .pill,.tag,
  .toast {
    font-weight:600;
  }

  .shell {
    column-gap:28px;
  }

  .desktop-sidebar {
    padding:22px 17px 17px;
  }

  .sidebar-brand {
    gap:15px;
    padding-bottom:24px;
  }

  .sidebar-brand .brand-lockup h1 {
    font-size:23px;
    font-weight:600;
    letter-spacing:-.025em;
  }

  .sidebar-badge {
    font-weight:600;
    letter-spacing:.075em;
  }

  .desktop-nav {
    gap:6px;
  }

  .desktop-nav button {
    min-height:45px;
    font-size:14px;
    font-weight:500;
  }

  .desktop-nav button.active {
    font-weight:600;
  }

  .sidebar-avatar {
    font-weight:700;
  }

  .sidebar-profile-copy strong {
    font-size:13px;
    font-weight:600;
  }

  .sidebar-settings {
    font-weight:500;
  }

  .desktop-page-context {
    gap:5px;
    padding-bottom:12px;
  }

  .desktop-page-context strong {
    font-size:26px;
    line-height:1.18;
    font-weight:600;
    letter-spacing:-.025em;
  }

  body:not([data-workspace="home"]) main {
    padding:32px 34px 36px;
  }

  .workspace-page-header,
  .admin-workspace-heading {
    margin-bottom:28px;
  }

  .workspace-page-header h3 {
    font-size:27px;
    font-weight:600;
    letter-spacing:-.025em;
  }

  .workspace-page-header > p,
  .admin-workspace-heading > span {
    font-size:14px;
    line-height:1.6;
  }

  .admin-section-nav {
    gap:6px;
    padding:5px;
    margin:6px 0 28px;
  }

  .admin-section-nav button {
    min-height:39px;
    padding:9px 14px;
    font-size:13px;
    font-weight:500;
  }

  .admin-section-nav button.active {
    font-weight:600;
  }

  .feature-preview-grid {
    gap:16px;
  }

  .section-head {
    margin-bottom:20px;
  }

  .section-head h3 {
    font-weight:600;
  }

  .balance-grid {
    gap:16px;
    margin:16px 0;
  }

  .balance-head {
    font-weight:500;
  }

  .balance-card strong {
    font-weight:600;
    letter-spacing:-.04em;
  }

  .chart-card,
  .home-upcoming-card,
  .planner,.quick-add,.calibration,
  .card:has(.timeline) {
    padding:24px;
  }

  .home-insights-grid {
    gap:16px;
    margin-bottom:16px;
  }

  .home-upcoming-hero strong,
  .home-upcoming-meta strong {
    font-weight:600;
  }

  .profile-more-button strong {
    font-weight:600;
  }
}

/* v47 design QA pass 2 — feedback from desktop comparison */
.allocation-load-note {
  grid-column:1/-1;
  padding:12px 14px;
  border:1px dashed var(--line);
  border-radius:14px;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}

@media (min-width:801px) {
  /* Read supporting copy naturally instead of forcing a right-aligned block. */
  .workspace-page-header {
    display:grid;
    grid-template-columns:1fr;
    gap:7px;
    align-items:start;
    margin-bottom:24px;
  }

  .workspace-page-header > p {
    max-width:62ch;
    text-align:left;
    font-size:14px;
    line-height:1.6;
  }

  /* Upcoming-plan dates should support the content, not dominate it. */
  .plan-date {
    font-weight:500;
    color:var(--text);
  }

  /* Employer Access: identity fields belong together. */
  #employerDemoInviteForm {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px 14px;
    align-items:end;
    padding-top:4px;
  }

  #employerDemoInviteForm > .people-add-card-head,
  #employerDemoInviteForm > small {
    grid-column:1/-1;
  }

  #employerDemoInviteForm > .people-add-card-head {
    margin-bottom:2px;
  }

  #employerDemoInviteForm > button[type="submit"] {
    grid-column:1/-1;
    justify-self:start;
    width:auto;
    min-width:220px;
  }

  /* Invitation tracker: tighter alignment and one calm status language. */
  .invite-tracker .section-head {
    align-items:center;
    margin-bottom:14px;
  }

  .invite-row {
    grid-template-columns:minmax(220px,1.45fr) minmax(120px,.55fr) minmax(190px,.85fr) auto;
    gap:14px;
    align-items:center;
  }

  .invite-status,
  .invite-status.pending,
  .invite-status.joined,
  .invite-status.expired,
  .invite-status.revoked {
    color:var(--muted);
    background:rgba(148,163,184,.09);
    font-weight:600;
    text-transform:none;
    letter-spacing:0;
  }

  /* Employee balance calibration should look like the People cards, not a long form page. */
  .admin-balance-shell {
    margin:14px 0;
    padding:18px;
    border:1px solid rgba(148,163,184,.12);
    border-radius:18px;
    background:rgba(15,23,42,.42);
  }

  .admin-balance-shell .section-head {
    margin-bottom:14px;
  }

  .admin-balance-form {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px 14px;
    align-items:end;
  }

  .admin-balance-submit {
    justify-self:start;
    width:auto;
    min-width:132px;
    min-height:42px;
    padding-inline:18px;
  }

  html[data-theme="light"] .admin-balance-shell {
    background:#fff;
    border-color:#e0e7f1;
  }
}

/* v47 design QA pass 3 — invitation hierarchy */
@media (min-width:801px) {
  .invite-tracker {
    padding:18px 20px 20px;
  }

  .invite-tracker .section-head {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:16px;
    align-items:end;
    margin-bottom:12px;
  }

  .invite-list-head,
  .invite-row {
    display:grid;
    grid-template-columns:minmax(240px,1.45fr) minmax(150px,.72fr) minmax(210px,.9fr) auto;
    gap:18px;
    align-items:center;
  }

  .invite-list-head {
    padding:0 14px 7px;
    color:var(--muted);
    font-size:10px;
    font-weight:600;
    letter-spacing:.07em;
    text-transform:uppercase;
  }

  .invite-list {
    gap:8px;
  }

  .invite-row {
    padding:13px 14px;
  }

  .invite-person {
    gap:2px;
  }

  .invite-person .invite-role {
    margin-top:3px;
    color:var(--muted);
  }

  .invite-status-cell {
    align-items:start;
  }

  .invite-reporting-cell {
    gap:2px;
  }

  .invite-reporting-cell strong {
    font-weight:600;
  }

  .invite-actions {
    min-width:116px;
  }

  .invite-status {
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.035em;
  }

  .invite-status.pending {
    color:#b7791f;
    background:rgba(245,158,11,.13);
  }

  .invite-status.joined {
    color:#15803d;
    background:rgba(34,197,94,.13);
  }

  .invite-status.expired {
    color:#64748b;
    background:rgba(148,163,184,.12);
  }

  .invite-status.revoked {
    color:#be123c;
    background:rgba(244,63,94,.10);
  }

  .invite-summary-status {
    font-weight:600;
  }

  .invite-summary-status.pending {
    color:#b7791f;
    background:rgba(245,158,11,.10);
    border-color:rgba(245,158,11,.20);
  }

  .invite-summary-status.joined {
    color:#15803d;
    background:rgba(34,197,94,.10);
    border-color:rgba(34,197,94,.20);
  }

  html:not([data-theme="light"]) .invite-status.pending,
  html:not([data-theme="light"]) .invite-summary-status.pending {
    color:#f6cf77;
  }

  html:not([data-theme="light"]) .invite-status.joined,
  html:not([data-theme="light"]) .invite-summary-status.joined {
    color:#b9f8c7;
  }
}

@media (max-width:1000px) {
  .invite-list-head { display:none; }
}

@media (max-width:650px) {
  .invite-person .invite-role { margin-top:2px; }
}

/* v47 design QA pass 4 — desktop surface consistency */
@media (min-width:801px) {
  /* Admin overview */
  body[data-workspace="admin"] .feature-preview-grid {
    gap:14px;
    margin:6px 0 12px;
  }

  body[data-workspace="admin"] .feature-preview-card {
    min-height:118px;
    padding:18px;
    border-radius:18px;
  }

  body[data-workspace="admin"] .feature-preview-head {
    align-items:center;
  }

  body[data-workspace="admin"] .feature-preview-head > strong {
    font-size:15px;
    font-weight:600;
  }

  body[data-workspace="admin"] .feature-preview-card p {
    margin-top:10px;
    font-size:13px;
    line-height:1.55;
  }

  body[data-workspace="admin"] .feature-badges .tag {
    font-weight:500;
  }

  body[data-workspace="admin"] .preview-safety-note {
    font-size:12px;
    line-height:1.55;
  }

  body[data-workspace="admin"] .approval-preview-shell {
    padding:20px;
    border-radius:20px;
  }

  body[data-workspace="admin"] .approval-preview-head {
    margin-bottom:16px;
  }

  body[data-workspace="admin"] .approval-preview-tabs button {
    padding:10px 12px;
    font-size:13px;
    font-weight:500;
  }

  body[data-workspace="admin"] .approval-preview-tabs button.active {
    font-weight:600;
  }

  body[data-workspace="admin"] .approval-demo-card {
    padding:18px;
    border-radius:18px;
  }

  body[data-workspace="admin"] .approval-demo-title h4 {
    font-size:17px;
    font-weight:600;
  }

  body[data-workspace="admin"] .approval-demo-copy {
    font-size:13px;
    line-height:1.55;
  }

  body[data-workspace="admin"] .owner-approval-setting > span,
  body[data-workspace="admin"] .approval-config-policy,
  body[data-workspace="admin"] .approval-config-effective span,
  body[data-workspace="admin"] .work-calendar-source,
  body[data-workspace="admin"] .people-field {
    font-weight:600;
    letter-spacing:.035em;
  }

  /* Employer demo */
  #employerDemoShell {
    padding:20px;
    border-radius:20px;
  }

  #employerDemoShell > .muted {
    max-width:72ch;
    font-size:13px;
    line-height:1.6;
  }

  .employer-demo-state {
    gap:16px;
    margin:18px 0;
  }

  .employer-demo-summary {
    grid-template-columns:minmax(0,1.35fr) repeat(2,minmax(150px,.7fr));
    gap:12px;
  }

  .employer-demo-summary > div {
    min-height:94px;
    justify-content:center;
    padding:16px;
    border-radius:18px;
  }

  .employer-demo-summary strong {
    font-size:16px;
    font-weight:600;
  }

  .employer-demo-summary small {
    font-size:12px;
    line-height:1.45;
  }

  .employer-demo-tags {
    gap:7px;
  }

  .employer-demo-tags .tag {
    font-weight:500;
  }

  .employer-demo-story {
    gap:8px;
    padding:16px 18px;
    border:1px solid rgba(148,163,184,.10);
    border-radius:18px;
  }

  .employer-demo-story p {
    font-size:13px;
    line-height:1.5;
  }

  .employer-demo-actions {
    margin:12px 0 20px;
  }

  .employer-demo-actions button {
    min-height:40px;
    padding:9px 14px;
  }

  /* People */
  .people-onboarding-grid {
    gap:16px;
    margin:6px 0 16px;
  }

  .people-add-card,
  .invite-tracker {
    padding:20px;
    border-radius:20px;
  }

  .people-add-card-head {
    align-items:center;
    margin-bottom:16px;
  }

  .people-add-card-head h4,
  .invite-tracker h4,
  .people-head h4 {
    font-size:17px;
    font-weight:600;
  }

  .bulk-invite-card > p {
    font-size:13px;
    line-height:1.55;
  }

  .people-invite-form,
  .bulk-invite-card {
    gap:12px;
  }

  .people-head {
    margin-top:18px;
    padding:18px 2px 0;
  }

  .people-controls-copy {
    margin-top:8px;
    font-size:12px;
    line-height:1.5;
  }

  .member-list {
    gap:8px;
    margin-top:14px;
  }

  .member-row {
    padding:13px 14px;
    border:1px solid rgba(148,163,184,.10);
    border-radius:15px;
    background:rgba(15,23,42,.34);
  }

  .member-row:first-child {
    border-top:1px solid rgba(148,163,184,.10);
  }

  .member-row small {
    font-size:12px;
  }

  .people-field {
    font-size:10px;
  }

  /* Employee request / manager review */
  body[data-workspace="requests"] #approvalRequestCard.workspace-active,
  body[data-workspace="manager"] #managerWorkspaceCard.workspace-active {
    max-width:980px;
  }

  .approval-request-form {
    gap:12px;
  }

  .request-history-head {
    margin-top:24px;
    padding-top:20px;
  }

  .request-row {
    padding:15px 16px;
    border-radius:16px;
  }

  .request-row-main {
    gap:4px;
  }

  .request-row-main small {
    font-size:12px;
    line-height:1.45;
  }

  .manager-workspace-copy {
    margin:-2px 0 18px;
    max-width:68ch;
    font-size:13px;
    line-height:1.55;
  }

  .manager-request-list {
    gap:12px;
  }

  .manager-request-card {
    padding:18px;
    border-radius:18px;
  }

  .manager-request-head {
    align-items:center;
  }

  .manager-request-person {
    gap:12px;
  }

  .manager-request-person strong {
    font-size:14px;
    font-weight:600;
  }

  .manager-request-person small {
    margin-top:2px;
    font-size:11px;
  }

  .manager-request-detail {
    gap:5px;
    margin:16px 0;
  }

  .manager-request-detail > strong {
    font-size:15px;
    font-weight:600;
  }

  .manager-request-detail span {
    font-size:12px;
    line-height:1.5;
  }

  .manager-decision-box {
    gap:12px;
    padding-top:16px;
  }

  .manager-decision-buttons button {
    min-width:96px;
    min-height:40px;
    padding:9px 14px;
  }

  .manager-decision-summary {
    padding:12px 14px;
    border-radius:14px;
  }

  .manager-decision-summary strong {
    font-weight:600;
  }

  .manager-decision-summary span {
    font-size:12px;
    line-height:1.5;
  }

  /* Team calendar */
  body[data-workspace="team"] #teamCalendarCard.workspace-active {
    max-width:1180px;
  }

  .team-calendar-head {
    align-items:end;
    margin-bottom:10px;
  }

  .team-calendar-copy {
    margin:0 0 18px;
    max-width:70ch;
    font-size:13px;
    line-height:1.55;
  }

  .team-calendar-nav {
    grid-template-columns:40px minmax(180px,auto) 40px;
    gap:8px;
  }

  .team-calendar-nav strong {
    font-size:14px;
    font-weight:600;
  }

  .team-calendar-nav button {
    width:40px;
    min-height:40px;
    padding:7px;
  }

  .team-calendar-stats {
    gap:10px;
    margin:14px 0 18px;
  }

  .team-calendar-stats > div {
    min-height:76px;
    justify-content:center;
    padding:13px 15px;
    border-radius:15px;
  }

  .team-calendar-stats strong {
    font-size:22px;
    font-weight:600;
  }

  .team-calendar-stats span {
    margin-top:2px;
    font-size:10px;
    font-weight:600;
    letter-spacing:.035em;
  }

  .team-calendar-grid {
    gap:6px;
  }

  .team-calendar-weekday {
    padding:7px 3px;
    font-size:10px;
    font-weight:600;
    letter-spacing:.035em;
  }

  .team-calendar-day {
    min-height:116px;
    padding:8px;
    border-radius:13px;
  }

  .team-calendar-date {
    font-size:11px;
    font-weight:600;
  }

  .team-away-chip {
    gap:2px;
    padding:6px 7px;
    border-radius:9px;
  }

  .team-away-chip strong {
    font-size:10px;
    font-weight:600;
  }

  .team-away-chip span {
    font-size:9px;
  }

  html[data-theme="light"] .member-row {
    background:#fff;
    border-color:#e0e7f1;
  }

  html[data-theme="light"] .employer-demo-story {
    border-color:#e0e7f1;
  }
}

/* v47 design QA pass 5 — admin settings consistency */
@media (min-width:801px) {
  body[data-workspace="admin"] .company-policy-shell,
  body[data-workspace="admin"] .approval-config-shell,
  body[data-workspace="admin"] .work-calendar-shell,
  body[data-workspace="admin"] .admin-system-panel {
    margin-top:0;
    padding:20px;
    border:1px solid rgba(148,163,184,.12);
    border-radius:20px;
    background:rgba(12,19,36,.62);
  }

  body[data-workspace="admin"] .company-policy-shell > .section-head,
  body[data-workspace="admin"] .approval-config-shell > .section-head,
  body[data-workspace="admin"] .work-calendar-shell > .section-head {
    margin-bottom:12px;
  }

  body[data-workspace="admin"] .company-policy-copy,
  body[data-workspace="admin"] .approval-config-copy,
  body[data-workspace="admin"] .work-calendar-copy {
    margin:0 0 16px;
    max-width:72ch;
    font-size:13px;
    line-height:1.55;
  }

  body[data-workspace="admin"] .company-policy-list,
  body[data-workspace="admin"] .approval-config-list,
  body[data-workspace="admin"] .work-calendar-list {
    gap:10px;
  }

  body[data-workspace="admin"] .company-policy-row,
  body[data-workspace="admin"] .approval-config-row,
  body[data-workspace="admin"] .work-calendar-row {
    padding:14px;
    border-radius:15px;
  }

  body[data-workspace="admin"] .company-policy-name > strong,
  body[data-workspace="admin"] .approval-config-name > strong,
  body[data-workspace="admin"] .work-calendar-row > strong {
    font-weight:600;
  }

  body[data-workspace="admin"] .company-policy-name small,
  body[data-workspace="admin"] .approval-config-name small,
  body[data-workspace="admin"] .work-calendar-row small {
    font-size:11px;
    line-height:1.45;
  }

  body[data-workspace="admin"] .company-policy-row label,
  body[data-workspace="admin"] .approval-config-policy,
  body[data-workspace="admin"] .approval-config-effective span {
    font-size:10px;
    font-weight:600;
  }

  body[data-workspace="admin"] .company-policy-row input,
  body[data-workspace="admin"] .company-policy-row select,
  body[data-workspace="admin"] .approval-config-policy select {
    font-weight:500;
  }

  body[data-workspace="admin"] .approval-config-effective strong {
    font-size:12px;
    font-weight:600;
  }

  body[data-workspace="admin"] .work-calendar-toolbar {
    grid-template-columns:140px auto auto;
    gap:10px;
    margin-bottom:12px;
  }

  body[data-workspace="admin"] .work-calendar-toolbar button,
  body[data-workspace="admin"] .work-calendar-add-form button {
    min-height:42px;
    padding:9px 14px;
  }

  body[data-workspace="admin"] .work-calendar-review-state {
    margin:8px 0 14px;
    font-size:12px;
    line-height:1.45;
  }

  body[data-workspace="admin"] .work-calendar-add-form {
    grid-template-columns:170px minmax(240px,1fr) auto;
    gap:10px;
    margin-bottom:16px;
  }

  body[data-workspace="admin"] .work-calendar-row {
    grid-template-columns:130px minmax(220px,1fr) auto auto;
  }

  body[data-workspace="admin"] .work-calendar-row button {
    min-height:36px;
    padding:7px 10px;
    font-size:11px;
  }

  body[data-workspace="admin"] .admin-system-panel {
    align-items:center;
    min-height:132px;
  }

  body[data-workspace="admin"] .admin-system-panel > div {
    gap:6px;
    max-width:70ch;
  }

  body[data-workspace="admin"] .admin-system-panel h3 {
    font-weight:600;
  }

  body[data-workspace="admin"] .admin-system-panel p.muted {
    font-size:13px;
    line-height:1.55;
  }

  body[data-workspace="admin"] .admin-system-panel .backup-btn {
    min-height:42px;
    padding:9px 14px;
  }

  html[data-theme="light"] body[data-workspace="admin"] .company-policy-shell,
  html[data-theme="light"] body[data-workspace="admin"] .approval-config-shell,
  html[data-theme="light"] body[data-workspace="admin"] .work-calendar-shell,
  html[data-theme="light"] body[data-workspace="admin"] .admin-system-panel {
    background:#fff;
    border-color:#e0e7f1;
  }
}

/* v47 design QA pass 6 — Trips, History and Balance */
@media (min-width:801px) {
  /* Trips */
  body[data-workspace="trips"] #plansCard.workspace-active {
    max-width:1080px;
  }

  body[data-workspace="trips"] #plansCard > .section-head {
    margin-bottom:14px;
  }

  body[data-workspace="trips"] .timeline {
    gap:8px;
  }

  body[data-workspace="trips"] .plan-item {
    grid-template-columns:150px minmax(0,1fr) auto;
    gap:18px;
    padding:15px 14px;
    border:1px solid rgba(148,163,184,.10);
    border-radius:15px;
    background:rgba(15,23,42,.34);
  }

  body[data-workspace="trips"] .plan-item:first-child {
    border-top:1px solid rgba(148,163,184,.10);
  }

  body[data-workspace="trips"] .plan-date {
    font-size:13px;
    font-weight:500;
    line-height:1.45;
  }

  body[data-workspace="trips"] .plan-item > div:nth-child(2) > div:first-child {
    font-size:14px;
    font-weight:600;
    line-height:1.4;
  }

  body[data-workspace="trips"] .plan-tags {
    gap:6px;
    margin-top:6px;
  }

  body[data-workspace="trips"] .plan-tags .tag,
  body[data-workspace="trips"] .plan-item > .tag {
    font-weight:500;
  }

  body[data-workspace="trips"] .trip-row:hover {
    background:rgba(124,58,237,.045);
    border-color:rgba(124,58,237,.16);
  }

  /* History */
  body[data-workspace="history"] #historyCard.workspace-active {
    max-width:1080px;
  }

  .history-head {
    align-items:center;
    margin-bottom:8px;
  }

  .history-copy {
    margin:0 0 18px;
    max-width:64ch;
    font-size:13px;
    line-height:1.55;
  }

  .history-tabs {
    gap:4px;
    padding:4px;
    border-radius:13px;
  }

  .history-tabs button {
    padding:8px 12px;
    font-size:12px;
    font-weight:500;
  }

  .history-tabs button.active {
    font-weight:600;
  }

  .history-list {
    gap:10px;
  }

  .history-row {
    padding:16px;
    border-radius:16px;
  }

  .history-row-head {
    align-items:center;
  }

  .history-row-head strong,
  .history-person strong {
    font-weight:600;
  }

  .history-row-head small {
    font-size:11px;
    line-height:1.45;
  }

  .history-person {
    gap:3px;
    margin-bottom:8px;
    padding-bottom:8px;
  }

  .history-note,
  .history-decision span {
    font-size:12px;
    line-height:1.5;
  }

  .history-decision {
    gap:4px;
    margin-top:10px;
    padding:11px 12px;
    border-radius:13px;
  }

  .history-decision strong {
    font-weight:600;
  }

  .history-events {
    margin-top:11px;
    padding-top:10px;
  }

  .history-events summary {
    font-size:12px;
    font-weight:600;
  }

  .history-event {
    gap:9px;
  }

  .history-event small {
    font-size:11px;
    line-height:1.45;
  }

  /* Personal balance calibration */
  body[data-workspace="balance"] #balanceCard.workspace-active {
    max-width:980px;
  }

  body[data-workspace="balance"] #balanceCard > .section-head {
    display:grid;
    grid-template-columns:1fr;
    gap:7px;
    align-items:start;
    margin-bottom:18px;
  }

  body[data-workspace="balance"] #balanceCardCopy {
    max-width:62ch;
    font-size:13px;
    line-height:1.55;
    text-align:left;
  }

  body[data-workspace="balance"] .balance-managed-message {
    max-width:70ch;
    margin:0 0 14px;
    font-size:13px;
    line-height:1.55;
  }

  body[data-workspace="balance"] .snapshot-form {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px 14px;
    align-items:end;
    padding:20px;
    border:1px solid rgba(148,163,184,.12);
    border-radius:20px;
    background:rgba(15,23,42,.42);
  }

  body[data-workspace="balance"] .snapshot-form button {
    grid-column:1/-1;
    justify-self:start;
    width:auto;
    min-width:150px;
    min-height:42px;
    padding:9px 18px;
  }

  /* Trip detail sheet */
  .trip-sheet .sheet-head h2 {
    font-size:28px;
    font-weight:600;
    letter-spacing:-.025em;
  }

  .trip-hero-stat {
    padding:17px;
  }

  .trip-hero-stat strong {
    font-size:20px;
    font-weight:600;
  }

  .trip-hero-stat span {
    font-size:12px;
    font-weight:500;
  }

  .trip-chip {
    font-weight:600;
  }

  .projected-grid > div {
    padding:14px;
    border-radius:15px;
  }

  .projected-grid strong {
    font-size:22px;
    font-weight:600;
  }

  .trip-day-row strong {
    font-size:12px;
    font-weight:600;
  }

  .danger-button {
    font-weight:600;
  }

  html[data-theme="light"] body[data-workspace="trips"] .plan-item,
  html[data-theme="light"] body[data-workspace="balance"] .snapshot-form {
    background:#fff;
    border-color:#e0e7f1;
  }
}

/* v48 employer first-impression */
.invite-context {
  display:grid;
  gap:4px;
  padding:12px 14px;
  border:1px solid rgba(124,58,237,.18);
  border-radius:14px;
  background:rgba(124,58,237,.06);
}
.invite-context strong {
  font-size:13px;
  font-weight:600;
}
.invite-context span {
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
#inviteEmail[readonly] {
  color:var(--muted);
  cursor:not-allowed;
}

.employer-demo-welcome {
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1.5fr) auto;
  gap:24px;
  align-items:center;
  padding:24px 26px;
  border-color:rgba(124,58,237,.18);
  background:
    radial-gradient(circle at 96% 10%,rgba(124,58,237,.10),transparent 34%),
    linear-gradient(135deg,rgba(124,58,237,.055),rgba(14,165,233,.025));
}
.employer-demo-welcome-copy {
  display:grid;
  gap:7px;
  max-width:760px;
}
.employer-demo-welcome-copy h2 {
  margin:0;
  font-size:24px;
  line-height:1.18;
  font-weight:600;
  letter-spacing:-.025em;
}
.employer-demo-welcome-copy > p:last-child {
  margin:0;
  max-width:68ch;
  font-size:13px;
  line-height:1.6;
}
.employer-demo-welcome-badges {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-bottom:4px;
}
.employer-demo-welcome-badges .tag {
  font-weight:600;
}
.employer-demo-safe {
  color:#15803d;
  background:rgba(34,197,94,.08);
  border-color:rgba(34,197,94,.16);
}
.employer-demo-welcome-actions {
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  justify-content:flex-end;
  max-width:390px;
}
.employer-demo-welcome-actions button {
  min-height:40px;
  padding:9px 13px;
}

html:not([data-theme="light"]) .employer-demo-safe {
  color:#b9f8c7;
}
html[data-theme="light"] .employer-demo-welcome {
  background:
    radial-gradient(circle at 96% 10%,rgba(124,58,237,.08),transparent 34%),
    linear-gradient(135deg,#fff,rgba(245,243,255,.72));
}

@media (max-width:980px) {
  .employer-demo-welcome {
    grid-template-columns:1fr;
    align-items:start;
  }
  .employer-demo-welcome-actions {
    justify-content:flex-start;
    max-width:none;
  }
}
@media (max-width:650px) {
  .employer-demo-welcome {
    padding:18px;
    gap:18px;
  }
  .employer-demo-welcome-copy h2 {
    font-size:21px;
  }
  .employer-demo-welcome-actions {
    display:grid;
    grid-template-columns:1fr;
  }
  .employer-demo-welcome-actions button {
    width:100%;
  }
}

/* v49 bilingual language controls */
.auth-brand-row {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.language-compact,
.language-setting {
  display:flex;
  align-items:center;
  gap:8px;
}
.language-compact {
  flex:0 0 auto;
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel);
}
.language-compact select,
.language-setting select {
  border:0;
  outline:0;
  background:transparent;
  color:inherit;
  font:inherit;
  cursor:pointer;
}
.language-compact select {
  min-width:46px;
  font-size:12px;
  font-weight:600;
}
.language-setting {
  width:min(100%,360px);
  padding:11px 13px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel);
}
.language-setting select {
  width:100%;
  font-size:14px;
  font-weight:500;
}
html[data-theme="light"] .language-compact,
html[data-theme="light"] .language-setting {
  background:#fff;
}
@media (max-width:520px) {
  .auth-screen {
    padding-left:max(14px,env(safe-area-inset-left));
    padding-right:max(14px,env(safe-area-inset-right));
  }
  .auth-brand-row {
    min-width:0;
    gap:8px;
  }
  .auth-brand-row .brand-lockup {
    min-width:0;
    flex:1 1 auto;
    gap:9px;
  }
  .auth-brand-row .brand-mark {
    width:42px;
    height:42px;
  }
  .auth-brand-row .brand-lockup h1 {
    font-size:clamp(27px,7.6vw,32px);
    white-space:nowrap;
  }
  .auth-brand-row .brand-tagline {
    max-width:100%;
    font-size:9px;
    white-space:nowrap;
  }
  .language-compact {
    flex:0 0 auto;
    gap:5px;
    padding:4px 5px;
  }
  .language-compact select {
    min-width:40px;
  }
}

/* v49 mobile date + card QA */
.field-row > label,
.snapshot-form > label,
.password-settings-form > label {
  min-width:0;
}

input[type="date"] {
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
input[type="date"]::-webkit-date-and-time-value {
  min-width:0;
  text-align:left;
}
input[type="date"]::-webkit-datetime-edit {
  min-width:0;
  padding:0;
}

.plan-date,
.history-row-head > div > strong,
.home-upcoming-hero p {
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
}

@media (max-width:800px) {
  .shell {
    padding-bottom:calc(126px + env(safe-area-inset-bottom));
  }
  .workspace-page,
  .plans-card,
  .history-card,
  .team-calendar-card,
  .admin-panel {
    min-width:0;
  }
  .plan-item {
    width:100%;
    min-width:0;
    padding:14px 2px;
    gap:8px;
    overflow:hidden;
  }
  .plan-item > * {
    min-width:0;
    max-width:100%;
  }
  .plan-item > .tag {
    width:max-content;
    max-width:100%;
    justify-self:start;
  }
  .plan-date {
    line-height:1.4;
  }
  .home-upcoming-card {
    min-width:0;
    overflow:hidden;
  }
  .home-upcoming-hero {
    min-width:0;
    padding:14px;
  }
  .home-upcoming-hero > div {
    min-width:0;
    width:100%;
  }
  .home-upcoming-hero strong {
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    overflow-wrap:anywhere;
  }
  .home-upcoming-meta {
    min-width:0;
  }
  .home-upcoming-meta > div {
    min-width:0;
    padding:12px;
  }
  .home-upcoming-meta strong {
    overflow-wrap:anywhere;
  }
  .history-row {
    min-width:0;
    overflow:hidden;
  }
  .history-row-head {
    min-width:0;
  }
  .history-row-head > div {
    min-width:0;
    flex:1 1 auto;
  }
  .history-row-head > .tag {
    flex:0 0 auto;
    max-width:42%;
  }
}

@supports (-webkit-touch-callout:none) {
  input[type="date"] {
    width:100%;
    min-width:0;
    -webkit-min-logical-width:0;
  }
}

/* v49 mobile date containment + plan rhythm follow-up */
input[type="date"] {
  display:block;
  width:100%;
  inline-size:100%;
  min-width:0;
  min-inline-size:0;
  max-width:100%;
  max-inline-size:100%;
  box-sizing:border-box;
}
label:has(input[type="date"]) {
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
input[type="date"]::-webkit-date-and-time-value {
  width:100%;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:clip;
  white-space:nowrap;
}
input[type="date"]::-webkit-datetime-edit {
  width:100%;
  min-width:0;
  max-width:100%;
  overflow:hidden;
}

@media (max-width:800px) {
  body[data-workspace="plan"] #planWorkspace {
    min-width:0;
    max-width:100%;
    overflow:visible;
  }
  body[data-workspace="plan"] .workspace-page-header {
    width:100%;
    min-width:0;
    padding:2px 2px 0;
    margin-bottom:16px;
  }
  body[data-workspace="plan"] .plan-grid {
    width:100%;
    min-width:0;
    gap:14px;
  }
  body[data-workspace="plan"] .plan-grid > .card {
    width:100%;
    min-width:0;
    max-width:100%;
  }
}

@media (max-width:430px) {
  .field-row,
  .snapshot-form {
    grid-template-columns:minmax(0,1fr);
  }
  .snapshot-form > button {
    grid-column:auto;
  }
  #plannerForm input[type="date"],
  #approvalRequestForm input[type="date"],
  .snapshot-form input[type="date"] {
    font-size:16px;
  }
}

/* v49 rc2: eliminate Safari intrinsic-width overflow in Plan */
@media (max-width:800px) {
  .two-col {
    grid-template-columns:minmax(0,1fr);
  }

  body[data-workspace="plan"] main,
  body[data-workspace="plan"] #planWorkspace,
  body[data-workspace="plan"] .plan-grid,
  body[data-workspace="plan"] .planner,
  body[data-workspace="plan"] #plannerForm,
  body[data-workspace="plan"] #plannerForm .field-row,
  body[data-workspace="plan"] #plannerForm label,
  body[data-workspace="plan"] #plannerForm input,
  body[data-workspace="plan"] #plannerForm select {
    width:100%;
    min-width:0;
    max-width:100%;
    min-inline-size:0;
    max-inline-size:100%;
  }

  body[data-workspace="plan"] .plan-grid {
    grid-template-columns:minmax(0,1fr);
    overflow:hidden;
  }

  body[data-workspace="plan"] .planner {
    overflow:hidden;
  }
}

/* v49 rc3: iOS date control visual shell */
@media (max-width:800px) {
  .dayoff-date-shell {
    position:relative;
    display:flex;
    align-items:center;
    width:100%;
    min-width:0;
    max-width:100%;
    min-height:46px;
    padding:12px 13px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#0c1324;
    color:var(--text);
    overflow:hidden;
  }

  .dayoff-date-shell.is-focused {
    border-color:#7c67d8;
    box-shadow:0 0 0 3px rgba(124,103,216,.14);
  }

  .dayoff-date-display {
    display:block;
    width:100%;
    min-width:0;
    max-width:100%;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    font:inherit;
    color:inherit;
    line-height:1.35;
  }

  .dayoff-date-shell.is-empty .dayoff-date-display {
    min-height:1.35em;
  }

  .dayoff-date-native {
    position:absolute !important;
    inset:0 !important;
    display:block !important;
    width:100% !important;
    height:100% !important;
    min-width:0 !important;
    max-width:none !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:inherit !important;
    opacity:0 !important;
    background:transparent !important;
    color:transparent !important;
    -webkit-appearance:none !important;
    appearance:none !important;
    cursor:pointer;
    z-index:2;
  }
}

html[data-theme="light"] .dayoff-date-shell {
  background:#ffffff;
  color:#172033;
  border-color:#dbe3ef;
}

/* v49 rc4: round the mobile Plan workspace surface */
@media (max-width:800px) {
  body[data-workspace="plan"] #planWorkspace.workspace-active {
    background:var(--panel);
    border-radius:20px 20px 0 0;
    overflow:hidden;
  }

  body[data-workspace="plan"] #planWorkspace.workspace-active > .workspace-page-header {
    padding:18px 18px 14px;
    margin-bottom:0;
  }

  body[data-workspace="plan"] #planWorkspace.workspace-active > .plan-grid {
    padding:0 0 14px;
  }
}

/* v49 rc5: quick language switch in app chrome */
.app-language-quick {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel);
  color:var(--text);
}
.app-language-quick select {
  min-width:42px;
  border:0;
  outline:0;
  padding:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.sidebar-language-quick {
  width:100%;
  justify-content:flex-start;
}
.mobile-language-quick {
  display:none;
}
html[data-theme="light"] .app-language-quick {
  background:#fff;
}

@media (max-width:800px) {
  .mobile-language-quick {
    display:flex;
    min-height:42px;
    padding:7px 8px;
    gap:5px;
  }
  .mobile-language-quick select {
    min-width:34px;
    font-size:11px;
  }
}


/* v50 leave packages + configurable leave catalog */
.leave-type-create-form {
  display:grid; grid-template-columns:1.3fr .7fr .8fr 1fr 1fr auto;
  gap:10px; align-items:end; margin:14px 0 12px;
}
.leave-type-create-form label,.leave-type-row label,.leave-package-controls label {
  display:grid; gap:5px; font-size:11px; font-weight:700; color:var(--muted);
}
.leave-type-catalog-list { display:grid; gap:8px; margin-bottom:18px; }
.leave-type-row {
  display:grid; grid-template-columns:minmax(150px,1.4fr) minmax(100px,.7fr) minmax(90px,.55fr) auto;
  gap:10px; align-items:end; padding:12px; border:1px solid rgba(148,163,184,.14);
  border-radius:14px; background:rgba(15,23,42,.35);
}
.leave-type-archived { opacity:.7; }
.leave-type-status { display:grid; gap:5px; align-self:center; }
.leave-type-status span { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.04em; font-weight:700; }
.leave-type-actions { display:flex; gap:8px; justify-content:flex-end; }
.policy-days-summary { text-transform:none; letter-spacing:normal; font-weight:600; color:var(--muted); }
.leave-package-state { margin:2px 0 10px; font-size:12px; line-height:1.5; }
.leave-package-list { display:grid; gap:10px; }

.leave-package-row {
  display:grid; gap:10px; padding:14px; border:1px solid rgba(148,163,184,.16);
  border-radius:16px; background:rgba(15,23,42,.34);
}
.leave-package-row-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.leave-package-row-head > div { display:grid; gap:3px; }
.leave-package-row-head small { color:var(--muted); font-size:11px; }
.package-enabled { display:flex !important; grid-auto-flow:column; align-items:center; gap:7px !important; white-space:nowrap; }
.package-enabled input { width:auto; }
.leave-package-controls { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.leave-package-summary {
  display:flex; flex-wrap:wrap; gap:6px 12px; padding:9px 11px; border-radius:12px;
  background:rgba(139,92,246,.08); font-size:12px;
}
.leave-package-summary span { color:var(--muted); }
.leave-package-disabled { opacity:.62; }
.leave-package-disabled .leave-package-controls { filter:saturate(.6); }
.package-save { justify-self:stretch; }
.package-save-feedback {
  min-height:18px;
  margin-top:-2px;
  color:#86efac;
  font-size:12px;
  font-weight:700;
  text-align:center;
  opacity:0;
  transform:translateY(-2px);
  transition:opacity .18s ease,transform .18s ease;
}
.package-save-feedback.show { opacity:1; transform:none; }
html[data-theme="light"] .package-save-feedback { color:#16803a; }

.employee-package-sheet { max-width:620px; }
.member-package-footer { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.manager-package-tools {
  display:grid; grid-template-columns:minmax(180px,1fr) auto; gap:10px; align-items:end;
  margin:0 0 14px; padding:12px; border:1px solid rgba(148,163,184,.14); border-radius:14px;
}
.manager-package-tools label { display:grid; gap:5px; color:var(--muted); font-size:11px; font-weight:700; }
html[data-theme="light"] .leave-type-row,
html[data-theme="light"] .leave-package-row { background:rgba(255,255,255,.78); }

@media (max-width:800px) {
  .leave-type-create-form,.leave-type-row,.leave-package-controls,.manager-package-tools {
    grid-template-columns:1fr;
  }
  .leave-type-create-form { padding:12px; border:1px solid rgba(148,163,184,.14); border-radius:14px; }
  .leave-type-actions { justify-content:stretch; }
  .leave-type-actions button { flex:1; }
  .leave-package-row { padding:13px; }
  .leave-package-row-head { align-items:center; }
  .member-package-footer { grid-column:1/-1; width:100%; }
  .member-package-footer button { flex:1; }
}


/* v50.1 live policy preview + PWA install/back UX */
.install-dayoff-card {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:14px;
  border:1px solid rgba(148,163,184,.16);
  border-radius:16px;
  background:rgba(15,23,42,.34);
}
.install-dayoff-icon {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:13px;
  font-size:22px;
  background:rgba(139,92,246,.12);
}
.install-dayoff-copy {
  min-width:0;
  display:grid;
  gap:4px;
}
.install-dayoff-copy > strong {
  font-size:14px;
}
.install-dayoff-copy p {
  margin:0;
  font-size:12px;
  line-height:1.5;
}
.install-dayoff-card button {
  white-space:nowrap;
}
html[data-theme="light"] .install-dayoff-card {
  background:rgba(255,255,255,.8);
}
@media (max-width:600px) {
  .install-dayoff-card {
    grid-template-columns:auto minmax(0,1fr);
  }
  .install-dayoff-card button {
    grid-column:1/-1;
    width:100%;
  }
}

/* v50.2 bulk invite mobile containment */
@media (max-width:800px) {
  .bulk-invite-card {
    min-width:0;
    max-width:100%;
  }
  .bulk-invite-card textarea,
  .bulk-import-preview {
    min-width:0;
    max-width:100%;
  }
  .bulk-invite-actions,
  .bulk-invite-actions-wrap {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:stretch;
    width:100%;
    min-width:0;
  }
  .bulk-invite-actions > *,
  .bulk-invite-actions-wrap > * {
    width:100%;
    min-width:0;
    max-width:100%;
    margin:0;
  }
  .bulk-invite-actions .file-button {
    display:flex;
  }
}

/* v50.2 simplified onboarding + organization structure */
.bulk-invite-advanced {
  padding:10px 12px;
  border:1px solid rgba(148,163,184,.14);
  border-radius:13px;
  background:rgba(124,58,237,.04);
}
.bulk-invite-advanced summary {
  cursor:pointer;
  font-size:12px;
  font-weight:700;
}
.bulk-invite-advanced p {
  margin:8px 0 0;
  font-size:12px;
  line-height:1.5;
}
.invite-list-head,
.invite-row {
  grid-template-columns:minmax(240px,1.5fr) minmax(150px,.75fr) auto !important;
}
html[data-theme="light"] .bulk-invite-advanced {
  background:rgba(124,58,237,.03);
}
@media (max-width:1000px) {
  .invite-list-head { display:none; }
  .invite-row {
    grid-template-columns:minmax(0,1fr) auto !important;
  }
}
@media (max-width:650px) {
  .invite-row { grid-template-columns:1fr !important; }
  .invite-actions { grid-column:auto; grid-row:auto; }
}

/* v50.6 Team Calendar privacy, holidays + employee Home availability */
.home-team-availability {
  margin:0 0 14px;
  padding:22px;
}
.home-team-availability-body { display:grid; gap:12px; }
.home-team-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.home-team-summary > div { display:flex; align-items:baseline; gap:7px; }
.home-team-summary strong { font-size:28px; }
.home-team-summary span { color:var(--muted); font-size:12px; }
.home-team-list { display:grid; gap:7px; }
.home-team-row {
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:9px;
  align-items:center;
  padding:9px 10px;
  border:1px solid rgba(148,163,184,.1);
  border-radius:13px;
  background:rgba(15,23,42,.32);
}
.home-team-row-icon { font-size:18px; text-align:center; }
.home-team-row > div { display:grid; gap:2px; min-width:0; }
.home-team-row strong { font-size:13px; }
.home-team-row span { color:var(--muted); font-size:11px; }
.home-team-empty { display:grid; gap:3px; padding:12px 0 2px; }
.home-team-empty strong { font-size:13px; }
.home-team-empty span { color:var(--muted); font-size:12px; }
.team-calendar-day.has-holiday { border-color:rgba(245,158,11,.28); }
.team-holiday-chip {
  display:flex;
  gap:4px;
  align-items:center;
  min-width:0;
  margin:3px 0 5px;
  padding:4px 6px;
  border-radius:8px;
  background:rgba(245,158,11,.10);
  font-size:9px;
  font-weight:700;
  line-height:1.25;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.team-calendar-privacy-shell { margin-bottom:14px; }
.team-calendar-privacy-copy { margin:-3px 0 12px; }
.team-calendar-privacy-controls {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
}
.team-calendar-privacy-controls label { min-width:0; }
.team-calendar-privacy-controls select { width:100%; }
.team-calendar-scope-hint { margin:10px 0 0; font-size:12px; line-height:1.5; }
html[data-theme="light"] .home-team-row { background:rgba(255,255,255,.72); }
html[data-theme="light"] .team-holiday-chip { background:rgba(245,158,11,.11); }
@media (max-width:800px) {
  .home-team-availability { padding:18px; margin-bottom:12px; }
  .home-team-availability .section-head { gap:10px; }
  .home-team-availability .compact-action { width:100%; }
  .team-calendar-privacy-controls { grid-template-columns:1fr; }
  .team-calendar-privacy-controls button { width:100%; }
  .team-holiday-chip { font-size:8px; padding:3px 4px; }
}
@media (min-width:801px) {
  body[data-workspace="admin"] .team-calendar-privacy-shell {
    padding:20px;
    border:1px solid rgba(148,163,184,.12);
    border-radius:20px;
    background:rgba(12,19,36,.62);
  }
  html[data-theme="light"] body[data-workspace="admin"] .team-calendar-privacy-shell {
    background:#fff;
    border-color:#e0e7f1;
  }
}

.brand-mark img { width:100%; height:100%; display:block; object-fit:cover; }

/* GooseLeave v51.1 brand tagline */
.brand-copy {
  min-width:0;
  display:grid;
  gap:2px;
}
.brand-tagline {
  margin:2px 0 0;
  color:#9aa7bf;
  font-size:10px;
  font-weight:600;
  line-height:1.18;
  letter-spacing:0;
  white-space:nowrap;
}
.brand-lockup:not(.compact) .brand-tagline {
  font-size:11px;
}
.sidebar-brand .brand-tagline {
  max-width:160px;
  white-space:normal;
  font-size:9px;
  line-height:1.25;
}
html[data-theme="light"] .brand-tagline {
  color:#667085;
}
@media (max-width:800px) {
  .topbar .brand-lockup.compact {
    gap:9px;
  }
  .topbar .brand-tagline {
    max-width:150px;
    font-size:8px;
    line-height:1.12;
    white-space:nowrap;
  }
}
@media (max-width:420px) {
  .topbar .brand-tagline {
    max-width:132px;
    font-size:7.4px;
  }
}

/* GooseLeave v51.2 approved mascot + theme-aware wordmark */
.brand-copy h1 {
  color:var(--brand-goose, #f8fafc);
}
.brand-goose {
  color:var(--brand-goose, #f8fafc);
}
.brand-leave {
  color:#7c3aed;
  background:linear-gradient(135deg,#7c3aed 0%,#8b5cf6 52%,#6d28d9 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}
.brand-tagline {
  font-style:italic;
  font-weight:500;
  color:#a8b3c7;
}
html[data-theme="light"] .brand-goose,
html[data-theme="light"] .brand-copy h1 {
  color:#111827;
}
html[data-theme="light"] .brand-leave {
  color:#7c3aed;
  background:linear-gradient(135deg,#7c3aed 0%,#8b5cf6 52%,#6d28d9 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}
html[data-theme="light"] .brand-tagline {
  color:#667085;
}
.brand-mark {
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible;
}
.brand-mark img {
  object-fit:contain;
}

/* GooseLeave v51.8 clean mascot asset */
.brand-lockup > .brand-mark {
  flex:0 0 auto;
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible;
}
.brand-mark img {
  width:100%;
  height:100%;
  display:block;
  opacity:1;
  visibility:visible;
  object-fit:contain;
}
