* { box-sizing: border-box; }
body {
  margin: 0;
  color-scheme: dark;
  --bg: #040b1b;
  --ink: #f7f8fd;
  --sub: #ccd2e1;
  --hot: #ff72b9;
  --line: rgba(198, 214, 242, .23);
  --raised: rgba(181, 193, 220, .13);
  --panel: #172035;
  --field: #10182a;
  --glass: linear-gradient(126deg, #8ad8f020, #adabc31c 52%, #df8fb72b), #10172b70;
  --rail: linear-gradient(168deg, #111e30 0%, #0b1828 62%, #0b2d39 100%);
  --rim: linear-gradient(128deg, #a3f2ffed 0%, #8abaed63 18%, #bbb6db45 43%, #e99fcd86 76%, #b1dcffc4 100%);
  --gloss: inset 0 1px 2px #e8f2ff58, inset 0 -1px 2px #d4e3ff24, inset 0 0 20px #c2d8fa1a, 0 14px 32px #02071422;
  --surface: radial-gradient(ellipse 23% 32% at 87% -4%, #e541ac 0%, #ad25808c 51%, transparent 100%),
             radial-gradient(ellipse 43% 78% at 86% 2%, #a5207e 0%, #591447 40%, #33153a80 70%, transparent 100%),
             radial-gradient(ellipse 21% 29% at 7% 96%, #00d0e4 0%, #05b6cf61 53%, transparent 100%),
             radial-gradient(ellipse 45% 71% at 5% 91%, #008ca2 0%, #004960 46%, #00405552 75%, transparent 100%),
             linear-gradient(113deg, #031321, #020b1e 43%, #100e23);
  --wash: linear-gradient(transparent, transparent);
  --shine-a: 140 222 255;
  --shine-b: 246 143 206;
  --shine: .9;
  --instrument: #dddcff;
  --instrument-bg: #9bade017;
  --plot-fill: linear-gradient(160deg, #c5bde8, #9385bb);
  --tag: #d8d8ec29;
  --active-bg: linear-gradient(110deg, #ff328543, #d4569630);
  --active-edge: #fa64aa64;
  --menu-bg: #172036f5;
  --bar-bg: linear-gradient(105deg, #0c192a, #101725 70%, #24192d);
  --rail-rule: #89b5cf40;
  --overlay: #02081799;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 Inter, Arial, sans-serif;
}
body.light {
  color-scheme: light;
  --bg: #eef3fa;
  --ink: #17233b;
  --sub: #44526c;
  --hot: #9b1458;
  --line: #3d638b38;
  --raised: #4c668015;
  --panel: #f5f8fd;
  --field: #ffffffd9;
  --glass: linear-gradient(130deg, #ffffffd9, #faf9ff9c 50%, #ffe9f469), #ffffff50;
  --rail: linear-gradient(145deg, #ffffffdd, #f0fbffc2);
  --rim: linear-gradient(125deg, #77b6c9bf, #a9bbd287, #e2b0ccc9 80%, #8caed5c4);
  --gloss: inset 0 1px 1px #fff, 0 10px 30px #354d7112;
  --shine: .25;
  --instrument: #454768;
  --instrument-bg: #7c7c9c12;
  --plot-fill: linear-gradient(160deg, #9283bc, #6c60a0);
  --surface: radial-gradient(ellipse 54% 80% at 92% 0%, #eaa4d2, transparent 77%),
             radial-gradient(ellipse 52% 77% at 0% 97%, #7bd9e4, transparent 75%),
             linear-gradient(120deg, #e6f0fa, #f7f4fa 64%, #e8e8f4);
  --tag: #66608420;
  --active-bg: linear-gradient(110deg, #f774b132, #eb92bd22);
  --active-edge: #be407c4d;
  --menu-bg: #f9fafffa;
  --bar-bg: linear-gradient(105deg, #f8fbff, #f6f3f9);
  --rail-rule: #315a7a38;
  --overlay: #15203955;
}
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
a { color: var(--hot); }
:where(button, a, input, textarea, select):focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { line-height: 1.08; letter-spacing: -.05em; }
h2 { font-size: 21px; line-height: 1.2; letter-spacing: -.043em; }
small, .sub, time { color: var(--sub); }
[hidden] { display: none !important; }
.staff-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.staff-skeleton {
  display: block; width: 72%; max-width: 100%; height: .65rem; border-radius: .3rem;
  background-color: var(--line);
}
@media (prefers-reduced-motion: no-preference) {
  .staff-skeleton {
    background-image: linear-gradient(100deg, transparent 36%, color-mix(in srgb, var(--ink) 14%, transparent) 50%, transparent 64%);
    background-size: 250% 100%;
    animation: staff-shimmer 2s ease-in-out infinite;
  }
  @keyframes staff-shimmer { from { background-position: 100% 0; } to { background-position: -65% 0; } }
}
@media (forced-colors: active) { .staff-skeleton { background: GrayText; forced-color-adjust: none; opacity: .45; animation: none; } }
.staff-startup {
  display: grid; min-height: 100vh; min-height: 100dvh; place-content: center; text-align: center;
  background-color: var(--bg); background-image: var(--surface);
}
#app:not(:empty) + .staff-startup { display: none; }
.staff-startup img { display: block; margin: 0 auto 14px; }
.staff-startup p { color: var(--sub); font-weight: 600; }
.startup-track { display: flex; gap: 4px; width: 100px; margin: 14px auto 0; transform: skewX(-16deg); }
.startup-track .staff-skeleton { flex: 1; height: 4px; border-radius: 1px; }
.startup-track .staff-skeleton:nth-child(2) { animation-delay: .12s; }
.startup-track .staff-skeleton:last-child { animation-delay: .24s; }
@media (scripting: none) { .staff-startup [role="status"] { display: none; } }
.icon {
  flex: none;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell {
  --rail-size: clamp(206px, 15vw, 252px);
  --bar-size: calc(clamp(72px, 5.5vw, 88px) + env(safe-area-inset-top, 0px));
  --gutter: clamp(16px, 2vw, 36px);
  --gap: clamp(13px, 1.05vw, 22px);
  --panel-pad: clamp(18px, 1.98vw, 38px);
  --radius: clamp(19px, 1.55vw, 29px);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: var(--rail-size) minmax(0, 1fr);
  grid-template-rows: var(--bar-size) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}
.shell::before { content: ''; position: absolute; inset: 0; z-index: -1; background-color: var(--bg); background-image: var(--surface); pointer-events: none; }
.shell.fold { --rail-size: 72px; }
.skip-content { position: fixed; top: 8px; left: 8px; z-index: 9; transform: translateY(calc(-100% - 16px)); padding: 10px 16px; border-radius: 6px; background: var(--panel); color: var(--ink); }
.skip-content:focus { transform: none; }
.content, #panel { min-width: 0; }
#panel { padding-block: var(--gutter) max(var(--gutter), env(safe-area-inset-bottom)); }
.content {
  grid-area: 2 / 2;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-inline: var(--gutter) max(var(--gutter), env(safe-area-inset-right));
  scroll-padding: var(--gutter);
  container: content / inline-size;
}
.card, .metric {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--wash), var(--glass);
  box-shadow: var(--gloss);
  -webkit-backdrop-filter: blur(19px);
  backdrop-filter: blur(19px);
}
.card::before, .metric::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 1;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(ellipse 46% 32% at 15% 0%, rgb(var(--shine-a) / .88), transparent 92%),
              radial-gradient(ellipse 51% 42% at 85% 100%, rgb(var(--shine-b) / .8), transparent 92%), var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.metric::after, .dashboard-reports .card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: var(--shine);
  background: radial-gradient(ellipse 56% 15% at 13% -3%, rgb(var(--shine-a) / .65), transparent 85%),
              radial-gradient(ellipse 43% 10% at 94% -2%, rgb(var(--shine-b) / .22), transparent 89%),
              radial-gradient(ellipse 57% 14% at 83% 105%, rgb(var(--shine-b) / .7), transparent 90%);
}
body:not(.light) .dashboard-metrics .metric:nth-child(1) {
  --wash: radial-gradient(ellipse at 109% 76%, #fa79c669 0%, transparent 64%), linear-gradient(135deg, #aa6fad40, transparent 57%);
}
.dashboard-metrics .metric:nth-child(2) { --shine-a: 255 147 215; --shine-b: 173 183 248; }
body:not(.light) .dashboard-metrics .metric:nth-child(2) { --wash: linear-gradient(135deg, #a72c823b, #7e2b7640 55%, transparent); }
.dashboard-metrics .metric:nth-child(3) { --shine-b: 112 215 255; }
body:not(.light) .dashboard-metrics .metric:nth-child(3) { --wash: linear-gradient(30deg, #06678959, transparent 54%, #b4499347); }
body:not(.light) .dashboard-metrics .metric:nth-child(4) { --wash: linear-gradient(150deg, #865b9b49, transparent 70%, #ac578327); }
body:not(.light) .activity-card { --wash: radial-gradient(ellipse at 3% 102%, #00aabd84, transparent 60%); }
.activity-card { --shine-b: 146 204 255; }
body:not(.light) .recent-card { --wash: linear-gradient(150deg, #4266821a, #03152d29 55%, transparent); }
.staff-sidebar {
  --rail-inset: clamp(12px, 1vw, 18px);
  grid-area: 1 / 1 / -1 / 2;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--rail-rule);
  background: var(--rail);
}
.sidebar-head { display: flex; flex: 0 0 var(--bar-size); align-items: center; justify-content: space-between; padding: env(safe-area-inset-top) var(--gutter) 0; border-bottom: 1px solid var(--rail-rule); }
.brand { display: inline-flex; align-items: center; min-width: 0; border-radius: 6px; }
.brand img { display: block; width: clamp(90px, 7vw, 112px); max-width: 100%; height: auto; }
.rail-toggle, .drawer-close { display: grid; place-items: center; flex: none; min-height: 44px; min-width: 44px; padding: 0; border-radius: 9px; color: var(--sub); }
.rail-toggle .icon { display: none; }
.rail-toggle:hover, .drawer-close:hover { background: var(--raised); color: var(--ink); }
.nav { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--rail-inset); scrollbar-width: thin; }
.navgroup { display: grid; gap: 2px; }
.navgroup + .navgroup { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rail-rule); }
.nav-caption { padding: 0 12px 4px; font-size: 10px; line-height: 1.5; letter-spacing: .15em; text-transform: uppercase; font-weight: bold; color: var(--sub); }
.nav-group-toggle { display: flex; align-items: center; justify-content: space-between; min-height: 30px; padding-block: 3px; border-radius: 6px; }
.nav-group-toggle:is(:hover, :focus-visible) { background: var(--raised); color: var(--ink); }
.nav-group-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.navgroup:has(.navitem.active) > .nav-group-toggle[aria-expanded="false"] { color: var(--hot); }
.nav-group-links { display: grid; gap: inherit; }
.navitem, .menubtn { display: flex; align-items: center; width: 100%; min-height: 44px; gap: 12px; padding: 6px 11px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); text-align: left; }
.navitem { font-size: clamp(13px, .97vw, 16px); line-height: 1.25; letter-spacing: -.012em; }
.navitem, .menubtn { text-decoration: none; }
.navitem:hover, .menubtn:hover { background: var(--raised); }
.navitem.active, .menubtn.active { border-color: var(--active-edge); background: var(--active-bg); color: var(--hot); font-weight: 700; }
.sidebottom { display: grid; gap: 2px; flex: none; padding: 8px var(--rail-inset) max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--rail-rule); }
.sidebar-utilities { display: flex; align-items: center; gap: 6px; }
.sidebar-tool { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid transparent; border-radius: 9px; color: var(--sub); }
.sidebar-tool:active { background: var(--raised); border-color: var(--line); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .sidebar-tool:hover { background: var(--raised); border-color: var(--line); color: var(--ink); }
}
@media (prefers-reduced-motion: no-preference) {
  .sidebar-tool { transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
}
.drawer-close { display: none; }
@media (width > 850px) {
  .fold .sidebar-utilities { flex-direction: column; }
  .fold .sidebar-head { justify-content: center; padding-inline: 8px; }
  .fold .brand { justify-content: center; width: 100%; min-height: 44px; }
  .fold .brand img { width: 52px; }
  .fold .staff-sidebar { --rail-inset: 10px; }
  .fold .navitem { justify-content: center; padding-inline: 0; }
  .fold .navitem span, .fold .nav-caption { display: none; }
}

.bar {
  grid-area: 1 / 1 / 2 / -1;
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  min-width: 0;
  gap: clamp(10px, 1.2vw, 20px);
  padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 calc(var(--rail-size) + var(--gutter));
  border-bottom: 1px solid var(--rail-rule);
  background: var(--bar-bg);
}
.bar::after { content: ''; position: absolute; left: calc(var(--rail-size) + var(--gutter)); bottom: -1px; width: 34px; height: 4px; transform: skewX(-24deg); background: linear-gradient(90deg, #6ef3e9 0 26%, transparent 26% 37%, #ff4fa3 37% 63%, transparent 63% 74%, #b37bff 74%); pointer-events: none; }
.page-title { min-width: 0; font: 400 clamp(24px, 2.05vw, 36px)/1.1 var(--display); letter-spacing: .012em; text-transform: uppercase; text-wrap: balance; }
.content:focus { outline: none; }
.content:focus-visible { outline: 2px solid var(--hot); outline-offset: -2px; }
.account-tools { position: relative; min-width: 0; flex-shrink: 0; margin-left: auto; padding-left: clamp(10px, 1.2vw, 20px); border-left: 1px solid var(--line); }
.account-pill { display: flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); box-shadow: inset 0 1px 0 #ffffff10; }
.identity { display: flex; align-items: center; min-width: 44px; min-height: 44px; gap: 11px; padding: 0 clamp(6px, .93vw, 18px); border-radius: 999px; font-weight: bold; font-size: clamp(14px, 1vw, 17px); }
.identity:hover, .identity[aria-expanded=true] { background: var(--raised); }
.identity > .icon { width: 16px; height: 16px; }
.username { max-width: 15ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; flex: none; width: clamp(32px, 2.35vw, 40px); aspect-ratio: 1; overflow: hidden; border: 1px solid #c88bb7; border-radius: 50%; background: linear-gradient(140deg, #ad246f, #383272 70%); color: white; font-size: 12px; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.menu { position: absolute; right: 0; top: calc(100% + 9px); width: 224px; max-height: calc(100dvh - var(--bar-size) - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 7px; border: 1px solid var(--line); border-radius: 15px; background: var(--menu-bg); box-shadow: var(--gloss), 0 15px 44px #02051242; }
.menubtn { font-size: 14px; gap: 10px; }
.menubtn .icon { width: 17px; height: 17px; }

.dashboard-view { container-type: size; display: flex; flex-direction: column; }
.dashboard-view #panel {
  display: grid;
  height: auto;
  flex: 1;
  min-height: 0;
  gap: var(--gap);
  grid-template:
    "garage garage totals" minmax(9rem, 1.18fr)
    "chart recent recent" minmax(9rem, 1fr)
    / minmax(0, .93fr) minmax(0, .17fr) minmax(0, .9fr);
}
.dashboard-summary, .dashboard-reports { display: contents; }
.metrics { display: grid; gap: var(--gap); }
.dashboard-metrics {
  grid-area: totals;
  min-width: 0;
  min-height: 0;
  grid-template: repeat(2, minmax(0, 1fr)) / repeat(2, minmax(0, 1fr));
}
body:not(.light) .dashboard-metrics .metric {
  --shine: .25;
  background: linear-gradient(130deg, #192a3b, #1a2034);
}
body:not(.light) .dashboard-view { background: linear-gradient(115deg, #081523, #101529); }
body:not(.light) .dashboard-view :is(.activity-card, .recent-card) { --shine: .2; background: linear-gradient(130deg, #192a3b, #1a2034); }
.card { padding: var(--panel-pad); }
.metric { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: clamp(10px, .9vw, 18px); padding: clamp(16px, 1.65vw, 32px) clamp(16px, 2vw, 38px); }
.metric-label { display: flex; align-items: center; gap: clamp(10px, 1.02vw, 18px); font-size: clamp(14px, 1.09vw, 19px); line-height: 1.25; letter-spacing: -.012em; }
.metric-icon { display: grid; place-items: center; flex: none; width: clamp(35px, 3vw, 52px); aspect-ratio: 1; border-radius: 26%; border: 1px solid var(--line); color: var(--instrument); background: var(--instrument-bg); }
.metric-icon .icon { width: 56%; height: 56%; stroke-width: 1.8; }
.metric strong { max-width: 100%; font-size: clamp(34px, 3.62vw, 65px); line-height: 1; letter-spacing: -.025em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dashboard-metrics .metric { container: metric / size; --figure-size: clamp(34px, 3.62vw, 65px); min-height: 0; padding: clamp(8px, 1.5cqh, 16px); gap: clamp(4px, 1.35cqh, 14px); }
.dashboard-metrics .metric strong { font-size: clamp(14px, calc(145cqw / var(--value-length)), var(--figure-size)); }
@container metric (height < 110px) {
  .metric-label { font-size: 12px; line-height: 1.2; }
  .metric-icon { display: none; }
  .dashboard-metrics .metric strong { font-size: clamp(22px, 32cqh, 32px); }
}
@container content (width < 840px) {
  .dashboard-metrics { min-height: 68px; }
  .dashboard-metrics .metric { min-height: 68px; }
}
.dashboard-reports > .card { display: flex; flex-direction: column; min-height: 0; padding: clamp(10px, min(2cqw, 2.7cqh), 32px); }
.paneltitle, .toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px 14px; margin-bottom: 20px; }
.paneltitle h2 { font-size: clamp(21px, 1.7vw, 30px); letter-spacing: -.025em; }
.paneltitle small, .axis { font-size: clamp(11px, .85vw, 14px); }
.paneltitle small { font-weight: normal; }
.activity-card { grid-area: chart; }
.plot { position: relative; flex: 1; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); align-items: stretch; column-gap: clamp(2px, .28vw, 6px); min-height: 0; padding: 17px 1px 0; border-bottom: 1px solid var(--sub); }
.plot-day { display: flex; align-items: end; justify-content: center; min-width: 0; }
.plot-bar { position: relative; display: block; width: 100%; min-height: 2px; max-width: 48px; border-radius: 4px 4px 1px 1px; background: var(--plot-fill); box-shadow: inset 0 1px 1px #ffffff54; }
.plot-day.latest .plot-bar { background: linear-gradient(155deg, #ff86c3, #e73592 65%, #bf216e); }
.plot-count { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); color: var(--ink); font-size: clamp(10px, .82vw, 14px); line-height: 1.2; font-weight: bold; }
.plot .emptychart { position: absolute; inset: 0; display: grid; place-content: center; color: var(--sub); font-size: 13px; }
.axis { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); column-gap: clamp(2px, .28vw, 6px); margin-top: 9px; padding-inline: 1px; color: var(--sub); white-space: nowrap; }
.axis span:first-child { grid-column: 1 / span 2; }
.axis span:nth-child(2) { grid-column: 8; justify-self: center; }
.axis span:last-child { grid-column: -3 / -1; justify-self: end; }
.recent-card { grid-area: recent; container: recent / inline-size; }
.recent-list {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 0;
  margin: 0;
  list-style: none;
}
.recent-list:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }
.dashboard-reports .paneltitle { flex: none; margin-bottom: clamp(4px, 1.4cqh, 16px); }
.recent-row { display: grid; grid-template-columns: minmax(105px, 1.55fr) minmax(68px, .8fr) auto auto auto; align-items: center; gap: clamp(8px, 1.15vw, 20px); padding: clamp(11px, .95vw, 17px); border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(115deg, #8fbded12, #b9a3cb14); box-shadow: inset 0 1px 1px #ffffff0b; font-size: clamp(12px, .93vw, 16px); }
.recent-person { min-width: 0; padding-right: 8px; border-right: 1px solid var(--line); overflow-wrap: anywhere; }
.recent-person strong, .recent-person small { display: block; }
.recent-person strong { font-size: clamp(14px, 1.08vw, 19px); line-height: 1.25; letter-spacing: -.035em; }
.recent-person small { margin-top: 3px; font-size: clamp(11px, .84vw, 14px); }
.recent-group { overflow-wrap: anywhere; }
.recent-row time { color: var(--ink); white-space: nowrap; }
.recent-row .link { min-width: 44px; min-height: 44px; border-left: 1px solid var(--line); padding-left: clamp(8px, 1vw, 18px); }
.tag { display: inline-block; width: fit-content; padding: 3px 10px; border-radius: 999px; background: var(--tag); color: var(--ink); font-weight: bold; font-size: .88em; white-space: nowrap; }
.link { min-height: 36px; padding: 2px 0; color: var(--hot); font-weight: bold; font-size: inherit; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.recent-card .paneltitle .link { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; }
.recent-card .paneltitle .link .icon { width: 14px; height: 14px; }
.empty { padding: 28px 12px; text-align: center; color: var(--sub); }
.recent-card .empty { flex: 1; display: grid; align-content: center; min-height: 0; padding: 3px; }

.sk-figure { width: 2.1em; height: .72em; margin-block: .14em; border-radius: .13em; }
.sk-plot { position: absolute; inset: 18% 0 8%; display: flex; flex-direction: column; justify-content: space-around; }
.sk-plot > .staff-skeleton { width: 100%; height: 3px; }
.sk-recent { overflow: hidden; }
.sk-recent .recent-person .staff-skeleton + .staff-skeleton { height: .5rem; width: 87%; margin-top: 7px; }
.sk-recent .recent-row { min-height: 46px; }
.sk-recent .recent-row:nth-child(even) .recent-person > :first-child { width: 53%; }
.sk-chip { width: 3.6rem; height: 1.25rem; border-radius: 999px; }
.sk-date { width: 3rem; }
.sk-action { width: 1.7rem; }
.sk-table-row .staff-skeleton { max-width: 10rem; margin-block: .33rem; }
.sk-table-row:nth-child(even) .staff-skeleton { width: 57%; }
.sk-field { display: grid; gap: 6px; font-size: 13px; font-weight: bold; }
.sk-field .staff-skeleton { width: 100%; height: 44px; border-radius: 7px; }
.sk-button { width: 7rem; height: 42px; border-radius: 10px; }

.commerce-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); margin-bottom: var(--gap); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.commerce-stat { display: grid; gap: 3px; align-content: start; padding: 10px clamp(8px,1.5vw,20px); min-width: 0; }
.commerce-stat + .commerce-stat { border-left: 1px solid var(--line); }
.commerce-stat-name, .commerce-facts dt { color: var(--sub); font-size: 12px; font-weight: 650; }
.commerce-stat > strong { font-size: clamp(19px,2vw,26px); line-height: 1.15; overflow-wrap: anywhere; }
.commerce-split { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--sub); font-size: 12px; }
.commerce-split span { max-width: 100%; overflow-wrap: anywhere; }
.commerce-split abbr { text-decoration: none; }
.commerce-split b { color: var(--ink); font-variant-numeric: tabular-nums; }
.commerce-row { cursor: pointer; }
.commerce-row:hover, .commerce-row:focus-within { background: var(--raised); }
.commerce-order { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 650; text-align: left; }
.commerce-order svg { flex: none; color: var(--hot); }
.commerce-customer { color: var(--hot); overflow-wrap: anywhere; text-underline-offset: 3px; }
.commerce-customer small { display: block; color: var(--sub); }
.commerce-dialog { width: min(540px, 94vw); overflow-wrap: anywhere; }
.commerce-receipt-head, .commerce-lines li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.commerce-receipt-head { margin: 18px 0 12px; font-size: 17px; }
.commerce-receipt-head span { font-weight: 750; white-space: nowrap; }
.commerce-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; padding: 14px 0; margin: 0; border-block: 1px solid var(--line); }
.commerce-facts .wide { grid-column: 1/-1; }
.commerce-facts dd { margin: 2px 0 0; }
.commerce-lines { list-style: none; margin: 0; padding: 0; }
.commerce-lines li { padding: 8px 0; border-top: 1px solid var(--line); }
.commerce-lines span { color: var(--sub); }
@media (max-width: 600px) {
  .commerce-stat { padding: 9px 8px; }
  .commerce-stat-name, .commerce-split { font-size: 11px; }
  .commerce-register table { min-width: 0; }
  .commerce-register thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .commerce-register .commerce-row { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 5px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .commerce-register .commerce-row td { padding: 0; border: 0; }
  .commerce-row td:nth-child(-n+2) { grid-column: 1/-1; }
  .commerce-row td:nth-child(n+4) { color: var(--sub); font-size: 12px; }
  .commerce-lines li { flex-wrap: wrap; }
}
.tablewrap { max-width: 100%; overflow-x: auto; }
body:not(.light) .card:has(.tablewrap) { --wash: linear-gradient(115deg, #0b1a2baf, #151528ad); }
@container content (min-width: 740px) {
  .tablewrap { overflow: visible; }
  .tablewrap th { position: sticky; top: 0; z-index: 2; background: var(--panel); box-shadow: inset 0 -1px var(--line); }
  .tablewrap td { overflow-wrap: anywhere; }
}
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 13px 9px; border-bottom: 1px solid var(--line); }
th { color: var(--sub); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
td { font-size: 14px; }
td small { display: block; }
tr:last-child td { border-bottom: 0; }
.pill, .soft { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; min-height: 42px; border-radius: 10px; font-weight: bold; }
.pill { background: #ac135f; color: white; }
.pill:hover { background: #be156b; }
.soft { background: var(--raised); border: 1px solid var(--line); }
.soft:hover { border-color: var(--hot); }
.shell :is(.pill, .soft, .navitem, .menubtn, .rail-toggle, .drawer-close, .identity, .directory-control, .row-actions, .garage-expand, .garage-controls button) {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.shell :is(button, a):focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }
.shell :is(.pill, .soft, .rail-toggle, .drawer-close, .directory-control, .row-actions, .garage-expand, .garage-controls button):not(:disabled):active { transform: translateY(1px); }
.sidebar-fold { color: var(--sub); }
.shell .navitem.active { box-shadow: inset 3px 0 var(--hot); }
@media (hover: hover) and (pointer: fine) {
  .shell :is(.navitem, .menubtn):hover { border-color: var(--active-edge); background: var(--active-bg); color: var(--hot); }
  .shell :is(.navitem, .menubtn):hover > .icon { transform: translateX(2px); }
  .shell :is(.navitem, .menubtn) > .icon { transition: transform 160ms ease; }
  .shell .pill:not(:disabled):hover { background: #c51b74; box-shadow: inset 0 1px #ffc4e45c, 0 4px 18px #e51b803b; transform: translateY(-1px); }
  /* The garage's full-bay click target must stay transparent; its visible label has its own hover style. */
  .shell :is(.soft, .directory-control, .garage-controls button):not(:disabled):hover {
    border-color: var(--hot); background-color: color-mix(in srgb, var(--panel), var(--hot) 12%); color: var(--ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--hot), transparent 72%);
  }
  .shell :is(.rail-toggle, .drawer-close, .row-actions, .identity):not(:disabled):hover { color: var(--hot); background-color: var(--raised); box-shadow: inset 0 0 0 1px var(--active-edge); }
  .shell .link:not(:disabled):hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
  .fold .navitem:hover > .icon { transform: none; }
}
@media (max-width: 850px) { .sidebar-fold { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .shell :is(.pill, .soft, .navitem, .menubtn, .rail-toggle, .drawer-close, .identity, .directory-control, .row-actions, .garage-expand, .garage-controls button), .shell :is(.navitem, .menubtn) > .icon { transition: none; }
  .shell :is(.pill, .navitem, .menubtn):hover, .shell :is(.navitem, .menubtn):hover > .icon { transform: none; }
}
input, select, textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--field); color: var(--ink); }
input::placeholder { color: var(--sub); }
.cn-select-trigger {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--field); color: var(--ink); font: 500 14px/1.4 var(--body);
  text-align: left; cursor: pointer; outline: none;
}
.cn-select-trigger > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-select-trigger:hover:not(:disabled) { border-color: color-mix(in srgb, var(--hot) 55%, var(--line)); }
.cn-select-trigger:focus-visible, .cn-select-trigger[data-state="open"] {
  outline: none; border-color: var(--hot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 19%, transparent);
}
.cn-select-trigger[data-placeholder] { color: var(--sub); }
.cn-select-trigger[data-disabled] { cursor: default; opacity: .5; }
.cn-select-trigger[aria-invalid="true"] { border-color: var(--error); }
.cn-select-chevron { flex: none; width: 17px; height: 17px; color: var(--sub); }
.cn-select-trigger[data-state="open"] .cn-select-chevron { color: var(--hot); transform: rotate(180deg); }
.cn-select-content {
  z-index: 20; width: var(--radix-select-trigger-width); min-width: 150px; max-width: calc(100vw - 16px);
  max-height: min(350px, var(--radix-select-content-available-height)); overflow: hidden;
  border: 1px solid var(--line); border-radius: 13px; background: var(--menu-bg); color: var(--ink);
  box-shadow: 0 18px 45px #02071466, inset 0 1px 0 color-mix(in srgb, var(--ink) 13%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transform-origin: var(--radix-select-content-transform-origin); outline: none;
}
.cn-select-viewport { padding: 5px; }
.cn-select-item {
  position: relative; display: flex; align-items: center; min-height: 48px; padding: 10px 36px 10px 12px;
  border-radius: 8px; color: var(--ink); font: 500 14px/1.4 var(--body); outline: none; cursor: pointer; user-select: none;
}
.cn-select-item > span:first-child { overflow-wrap: anywhere; }
.cn-select-item[data-state="checked"] { background: color-mix(in srgb, var(--pink) 10%, transparent); }
.cn-select-item[data-highlighted] { background: color-mix(in srgb, var(--pink) 20%, var(--raised)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pink) 26%, transparent); }
.cn-select-item[data-disabled] { pointer-events: none; opacity: .45; }
.cn-select-indicator { position: absolute; right: 11px; display: inline-grid; place-items: center; color: var(--hot); }
.cn-select-indicator svg, .cn-select-scroll svg { width: 17px; height: 17px; }
.cn-select-scroll { display: grid; place-items: center; min-height: 24px; color: var(--sub); background: var(--menu-bg); }
@media (prefers-reduced-motion: no-preference) {
  .cn-select-trigger, .cn-select-chevron { transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease; }
  .cn-select-content[data-state="open"] { animation: cn-select-in 140ms ease-out; }
  @keyframes cn-select-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
}
label, .form { display: grid; }
label { gap: 6px; font-size: 13px; font-weight: bold; }
.form { gap: 16px; }
.form .pill { justify-self: start; }
.settings .form { max-width: 520px; }
.staff-profile { display: grid; gap: var(--gap); }
.content:has(.profile-actions[data-active="true"]) { scroll-padding-bottom: 128px; }
.staff-profile .card { background: color-mix(in srgb, var(--panel) 88%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 10%, transparent), 0 8px 24px #02071418; }
.staff-profile .card::before { opacity: .45; }
.staff-profile fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.profile-layout { display: grid; grid-template-columns: minmax(200px, .78fr) minmax(0, 2fr); align-items: start; gap: var(--gap); }
.profile-details { display: grid; gap: var(--gap); min-width: 0; }
.profile-section, .profile-photo-card { padding: clamp(18px, 2.2vw, 30px); }
.profile-section-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 22px; }
.profile-section-heading > .icon { color: var(--hot); margin-top: 1px; }
.profile-section-heading h2 { font-size: 19px; letter-spacing: -.025em; }
.profile-section-heading p { margin-top: 5px; font-size: 13px; }
.profile-photo-card { display: grid; justify-items: center; gap: 12px; }
.profile-photo-card .profile-section-heading { width: 100%; margin-bottom: 8px; }
.avatar.profile-photo { width: 112px; height: 112px; border: 2px solid var(--line); box-shadow: 0 0 0 5px var(--raised); font-size: 34px; }
.profile-photo-wrap { padding: 5px; }
.profile-display-name { max-width: 100%; text-align: center; overflow-wrap: anywhere; font-size: 18px; line-height: 1.25; letter-spacing: -.025em; }
.profile-account-role { margin-top: -5px; color: var(--sub); font-size: 12px; }
.profile-upload { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 6px; }
.profile-photo-hint { text-align: center; font-size: 12px; line-height: 1.6; }
.staff-profile .profile-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; width: 100%; margin-top: 8px; }
.profile-presets legend { margin-bottom: 10px; color: var(--sub); font-size: 12px; }
.profile-presets label { position: relative; justify-items: center; gap: 7px; padding: 9px 3px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 500; cursor: pointer; }
.profile-presets input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.profile-presets label:has(input:checked) { border-color: var(--hot); background: var(--raised); }
.profile-presets label:has(input:focus-visible) { outline: 3px solid var(--hot); outline-offset: 2px; }
.profile-presets .avatar { width: 35px; font-size: 12px; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.profile-fields input { min-height: 44px; }
.profile-personal-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.profile-personal-fields .profile-field-help { grid-column: 3; margin: -8px 0 0; }
.profile-email-field { display: grid; grid-column: span 2; gap: 6px; min-width: 0; }
.profile-email-value { display: flex; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.profile-email-value input { min-width: 0; flex: 1; border: 0; border-radius: 7px 0 0 7px; background: transparent; }
.profile-email-value:has(input:focus-visible) { outline: 3px solid var(--hot); outline-offset: 3px; }
.profile-email-value input:focus-visible { outline: none; }
.profile-change-email { flex: none; min-width: 64px; min-height: 44px; padding: 8px 10px; border-left: 1px solid var(--line); border-radius: 0 7px 7px 0; background: var(--raised); color: var(--hot); font-size: 12px; font-weight: 700; }
.profile-change-email:hover:not(:disabled) { background: color-mix(in srgb, var(--hot) 16%, var(--field)); }
.profile-change-email:active:not(:disabled) { background: color-mix(in srgb, var(--hot) 24%, var(--field)); }
.profile-field-wide { grid-column: 1 / -1; }
.profile-field-help { margin-top: 13px; font-size: 12px; }
.profile-actions { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: var(--gap); padding: 14px 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--menu-bg); box-shadow: 0 8px 26px #0002; backdrop-filter: blur(16px); }
.profile-actions[data-active="false"] { position: static; box-shadow: none; backdrop-filter: none; }
.profile-actions > div:last-of-type { display: flex; gap: 10px; }
.profile-actions button { min-height: 44px; }
.profile-save-state { display: inline-flex; align-items: center; gap: 7px; color: var(--sub); font-size: 12px; }
.profile-save-state svg { color: var(--hot); }
.profile-actions .error { flex-basis: 100%; }
.profile-unavailable { padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); color: var(--sub); }
@container content (max-width: 800px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-photo-card { grid-template-columns: 1fr 1fr; gap: 10px 22px; }
  .profile-photo-card .profile-section-heading, .profile-photo-card .error { grid-column: 1 / -1; }
  .profile-photo-wrap { grid-row: span 3; }
  .profile-display-name { align-self: end; }
  .profile-photo-card .profile-upload { grid-column: 2; }
  .profile-photo-hint, .profile-photo-card > .link, .staff-profile .profile-presets { grid-column: 1 / -1; }
  .profile-photo-card .profile-presets { max-width: 250px; }
}
@container content (max-width: 420px) {
  .profile-fields { grid-template-columns: 1fr; }
  .profile-personal-fields .profile-field-help { grid-column: 1 / -1; }
  .profile-email-field { grid-column: auto; }
  .profile-photo-card { grid-template-columns: 1fr; }
  .profile-photo-wrap { grid-row: auto; }
  .profile-photo-card .profile-upload { grid-column: auto; }
  .profile-actions { bottom: 0; padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .profile-actions > div:last-of-type { width: 100%; }
  .profile-actions button { flex: 1; padding-inline: 9px; }
}
.row, .pager { display: flex; align-items: center; gap: 9px; }
.toolbar input { width: min(320px, 100%); }
.pager { justify-content: flex-end; margin-top: 10px; }
.message { white-space: pre-wrap; overflow-wrap: anywhere; }
.schedule-description { margin: 0 0 18px; }
.schedule-source { display: block; margin-top: 5px; font-size: 12px; }
.schedule-venue { display: block; margin-bottom: 5px; }
@container content (max-width: 600px) {
  .schedule-programme table, .schedule-programme tbody { display: block; }
  .schedule-programme thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .schedule-programme tbody tr { display: grid; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
  .schedule-programme td { display: block; padding: 0; border: 0; overflow-wrap: anywhere; }
  .schedule-programme td:first-child { color: var(--hot); font-weight: 700; }
  .schedule-programme td:nth-child(2) { font-size: 18px; font-weight: 700; }
  .schedule-programme .schedule-source { font-weight: 400; }
  .schedule-programme .message { color: var(--sub); }
  .schedule-programme .schedule-venue { color: var(--ink); }
  .schedule-programme td:last-child :is(a, button) { display: inline-flex; align-items: center; min-height: 44px; }
}
.error { color: var(--hot); font-weight: bold; }
.error:empty { display: none; }
dialog { width: min(480px, 94vw); max-height: 90dvh; padding: 25px; border: 1px solid var(--line); border-radius: 19px; background: var(--panel); box-shadow: var(--gloss); color: var(--ink); }
dialog::backdrop { background: var(--overlay); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.profile-email-dialog .paneltitle { align-items: start; gap: 16px; }
.profile-email-dialog .paneltitle .link { min-width: 44px; min-height: 44px; }
.profile-email-intro { margin: 8px 0 22px; }
.profile-email-dialog .profile-fields { grid-template-columns: 1fr; }
.profile-email-dialog .form > .pill { width: 100%; min-height: 48px; }
.profile-saved-dialog { --saved-accent: #6ef3e9; width: min(420px, calc(100vw - 32px)); padding: 40px 28px 28px; border-top: 3px solid var(--saved-accent); text-align: center; }
.profile-saved-dialog[open] { display: grid; justify-items: center; gap: 16px; }
.profile-saved-dialog > .paneltitle { display: contents; }
.profile-saved-dialog > .paneltitle h2 { grid-row: 2; font: 28px/1.2 Gebaco, Inter, sans-serif; letter-spacing: 0; }
.profile-saved-dialog > .paneltitle .link { position: absolute; top: 9px; right: 12px; display: grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 8px; font-size: 12px; }
.profile-saved-mark { display: grid; grid-row: 1; place-items: center; width: 64px; height: 64px; border: 1px solid var(--saved-accent); border-radius: 50%; background: color-mix(in srgb, var(--saved-accent) 10%, var(--panel)); color: var(--saved-accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--saved-accent) 5%, transparent); }
.profile-saved-message { grid-row: 3; max-width: 31ch; color: var(--sub); font-size: 15px; line-height: 1.65; }
.profile-saved-dialog > .pill { grid-row: 4; width: 100%; min-height: 48px; margin-top: 6px; }
body.light .profile-saved-dialog { --saved-accent: #0c7069; }
@media (prefers-reduced-motion: no-preference) {
  .profile-change-email { transition: background 160ms ease; }
  .profile-saved-dialog[open] { animation: profile-saved-in 180ms ease-out; }
  @keyframes profile-saved-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
}
.staff-account-dialog { width: min(580px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: clamp(16px, 3vw, 28px); overscroll-behavior: contain; }
.staff-account-dialog[open], .staff-account-dialog .form { display: flex; flex-direction: column; overflow: hidden; }
.staff-account-dialog .paneltitle { flex: none; margin-bottom: 12px; }
.staff-account-dialog .form { min-height: 0; }
.staff-account-body { display: grid; align-content: start; gap: 16px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px; scrollbar-width: thin; }
.staff-account-dialog .form > .pill { align-self: flex-end; flex: none; }
.account-fields, .access-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.staff-password-field { display: grid; gap: 6px; }
.staff-password-field > div { position: relative; }
.staff-password-field input { padding-right: 50px; min-height: 44px; }
.staff-password-field button { position: absolute; top: 0; bottom: 0; right: 0; width: 44px; padding: 0; border: 0; background: transparent; color: var(--sub); }
.staff-password-field button:hover { color: var(--ink); }
.staff-access-options { min-width: 0; margin: 0; padding: 0; border: 0; }
.staff-access-options legend { padding: 0; font-size: 18px; font-weight: 700; }
.staff-access-options > p { margin: 3px 0 14px; font-size: 13px; }
.access-group + .access-group { margin-top: 12px; }
.access-group h3 { margin: 0 0 5px; color: var(--sub); font: 700 11px/1.5 Inter, Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.access-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 6px 10px; border-radius: 8px; background: var(--raised); cursor: pointer; }
.access-option input { appearance: none; flex: none; position: relative; width: 34px; height: 20px; margin: 0; padding: 0; border: 1px solid var(--sub); border-radius: 20px; background: var(--field); cursor: inherit; }
.access-option input::before { content: ''; position: absolute; inset: 3px auto auto 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--sub); }
.access-option input:checked { border-color: var(--hot); background: #a71963; }
.access-option input:checked::before { transform: translateX(14px); background: white; }
.access-option:has(:disabled) { color: var(--sub); cursor: default; }
.access-option input:disabled { opacity: .72; }
.staff-row-actions { display: flex; flex-wrap: wrap; column-gap: 14px; }
@media (max-width: 460px) { .account-fields { grid-template-columns: 1fr; } }
@media (forced-colors: active) { .access-option input { appearance: auto; } .access-option input::before { display: none; } }
#announce:not(:empty) { position: fixed; bottom: 16px; left: 50%; z-index: 10; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; background: var(--panel); }

@container recent (max-width: 500px) {
  .recent-row { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 3px 7px; padding: 7px 9px; }
  .recent-person { grid-area: 1 / 1 / 2 / 4; border: 0; padding: 0; }
  .recent-row .tag { grid-area: 2 / 2; }
  .recent-row .recent-group { grid-area: 2 / 1; }
  .recent-row time { grid-area: 2 / 3; }
  .recent-row .link { grid-area: 1 / 4 / span 2; align-self: stretch; }
  .sk-recent .sk-chip { grid-area: 2 / 2; }
  .sk-recent .sk-date { grid-area: 2 / 3; }
  .sk-recent .sk-action { grid-area: 1 / 4 / span 2; }
}
@container recent (max-width: 350px) {
  .recent-card .paneltitle { gap: 2px 6px; }
  .recent-card .paneltitle h2 { font-size: 18px; }
  .recent-card .paneltitle .link { font-size: 13px; }
}
@container content (width >= 840px) and (height >= 540px) {
  .dashboard-view #panel:has(.recent-row:nth-child(4)) {
    grid-template-rows: minmax(10rem, .84fr) minmax(10rem, 1.16fr);
  }
  .recent-list:has(.recent-row:nth-child(4)) { gap: 4px; }
  .recent-list:has(.recent-row:nth-child(4)) .recent-row { padding-block: 1px; }
  .dashboard-metrics .metric { padding-block: clamp(8px, 1.5cqh, 20px); }
}
@container content (600px <= width < 840px) {
  .dashboard-view #panel {
    grid-template:
      "garage garage" minmax(7rem, .9fr)
      "totals totals" auto
      "chart recent" minmax(9rem, 1fr)
      / minmax(0, .85fr) minmax(0, 1.15fr);
  }
  .dashboard-metrics { grid-template: auto / repeat(4, minmax(0, 1fr)); }
  .dashboard-metrics .metric-label { gap: 8px; }
}
@container content (width < 600px) {
  .dashboard-view #panel {
    --gap: 9px;
    grid-template:
      "garage" minmax(5rem, 1.12fr)
      "totals" auto
      "recent" minmax(7.5rem, 1.32fr)
      "chart" minmax(7rem, .95fr)
      / minmax(0, 1fr);
  }
  .dashboard-metrics { grid-template-rows: repeat(2, auto); min-height: calc(136px + var(--gap)); }
  .dashboard-metrics .metric { --figure-size: clamp(22px, 3.9cqh, 30px); padding: 8px 12px; gap: 3px; }
  .dashboard-metrics .metric-label { font-size: 13px; gap: 6px; }
  .dashboard-metrics .metric-icon { width: 24px; }
  .dashboard-reports .paneltitle { margin-bottom: 4px; }
  .dashboard-reports > .activity-card { padding-block: 8px; }
  .activity-card .axis { margin-top: 4px; line-height: 1.2; }
}
@container content (width < 600px) and (height < 550px) {
  .dashboard-view #panel {
    --gap: 7px;
    padding-block: 8px max(8px, env(safe-area-inset-bottom));
    grid-template-rows: minmax(4.1rem, .92fr) auto minmax(6.6rem, 1.2fr) minmax(6.25rem, .95fr);
  }
  .dashboard-metrics .metric { --figure-size: 20px; padding: 5px 10px; gap: 2px; }
  .dashboard-metrics .metric-label { font-size: 12px; line-height: 1.1; }
  .dashboard-metrics .metric-icon { display: none; }
  .dashboard-reports > .recent-card { padding-block: 5px; }
}
@container content (width >= 480px) and (height < 470px) {
  .dashboard-view #panel {
    --gap: 8px;
    padding-block: 8px max(8px, env(safe-area-inset-bottom));
    grid-template:
      "garage totals" minmax(5rem, .85fr)
      "chart recent" minmax(7rem, 1.15fr)
      / minmax(0, .85fr) minmax(0, 1.15fr);
  }
  .dashboard-metrics { grid-template: repeat(2, minmax(0, 1fr)) / repeat(2, minmax(0, 1fr)); }
  .dashboard-metrics .metric { --figure-size: clamp(19px, 5cqh, 26px); padding: 5px 10px; gap: 2px; }
  .dashboard-metrics .metric-label { font-size: 12px; }
  .dashboard-metrics .metric-icon { display: none; }
  .dashboard-reports > .card { padding: 8px 12px; }
  .dashboard-reports .paneltitle { margin-bottom: 3px; }
  .activity-card .paneltitle h2 { font-size: 18px; }
}
@media (max-height: 780px) {
  .nav { padding-block: 8px; }
  .navgroup { gap: 1px; }
  .navgroup + .navgroup { margin-top: 6px; padding-top: 6px; }
}
.dashboard-view #panel:has(> .limited-summary) { height: auto; grid-template: none / repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); grid-auto-rows: minmax(12rem, auto); align-content: start; }
.dashboard-view #panel:has(> .limited-summary) :is(.garage-card, .dashboard-metrics, .activity-card, .recent-card) { grid-area: auto; }
.limited-summary .dashboard-metrics { grid-template: none / repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); grid-auto-rows: minmax(6rem, 1fr); }
@media (max-width: 850px) {
  .shell, .shell.fold { --rail-size: 0px; --bar-size: calc(66px + env(safe-area-inset-top)); --gutter: clamp(14px, 2.8vw, 24px); grid-template-columns: minmax(0, 1fr); }
  .bar, .content { padding-left: max(var(--gutter), env(safe-area-inset-left)); }
  .rail-toggle .icon:last-child { display: block; }
  .content { grid-column: 1; }
  .page-title { font-size: clamp(22px, 3vw, 29px); }
  .staff-sidebar { display: none; }
  .shell.open .staff-sidebar {
    position: fixed; inset: 0; z-index: 75; display: flex; height: 100dvh;
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
    border: 0;
    background: radial-gradient(ellipse at 100% 22%, color-mix(in srgb, var(--hot) 18%, transparent), transparent 53%),
      radial-gradient(ellipse at 0% 40%, rgb(31 178 194 / .19), transparent 50%), var(--bg);
  }
  .shell.open .sidebar-head { flex: none; min-height: var(--bar-size); gap: 4px; }
  .shell.open .sidebar-head .brand { margin-right: auto; }
  .shell.open .drawer-close { display: grid; border: 1px solid var(--line); background: var(--raised); }
  .shell.open .nav { padding: clamp(16px, 4vw, 28px) var(--gutter) 24px; }
  .navigation-title { font-size: clamp(24px, 6vw, 32px); line-height: 1.2; margin-bottom: 18px; }
  .shell.open .navgroup { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shell.open .navgroup + .navgroup { margin-top: 22px; border: 0; padding: 0; }
  .shell.open .nav-caption { grid-column: 1 / -1; padding: 0; }
  .shell.open .nav .navitem {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
    min-width: 0; min-height: 84px; gap: 10px; padding: 13px 15px; border-radius: 17px;
    border: 1px solid var(--line); background: var(--glass); box-shadow: inset 0 1px #ffffff30;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: var(--ink); font-size: 15px; font-weight: 650; overflow-wrap: anywhere;
  }
  .shell.open .nav .navitem .icon { width: 24px; height: 24px; color: var(--instrument); }
  .member-shell.open .nav .navitem { min-height: clamp(102px, 15vh, 138px); padding: 17px; font-size: 17px; }
  .member-shell.open .nav .navitem .icon { width: 28px; height: 28px; }
  .shell.open .nav .navitem:only-child, .shell.open .nav-caption + .navitem:last-child {
    grid-column: 1 / -1; min-height: 60px; flex-direction: row; align-items: center; justify-content: flex-start;
  }
  .shell.open .nav .navitem.active {
    background: var(--active-bg), var(--glass); border-color: var(--hot); box-shadow: inset 0 1px #ffffff36;
  }
  .shell.open .nav .navitem.active .icon { color: var(--hot); }
  .shell.open .sidebottom {
    grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
    padding: 7px var(--gutter) max(8px, env(safe-area-inset-bottom)); background: var(--menu-bg);
  }
  .shell.open .sidebottom .navitem {
    flex-direction: column; justify-content: center; gap: 4px; padding: 5px 2px;
    min-height: 52px; font-size: 12px; color: var(--sub); text-align: center; overflow-wrap: anywhere;
  }
  .shell.open .sidebottom .navitem.active { color: var(--hot); box-shadow: none; }
  @media (hover: hover) {
    .shell.open .nav .navitem:hover { border-color: var(--hot); background: var(--active-bg), var(--glass); }
  }
  @media (prefers-reduced-motion: no-preference) {
    .shell.open .nav { animation: menu-appear 160ms ease-out; }
    @keyframes menu-appear { from { opacity: 0; transform: translateY(5px); } }
  }
}
@media (max-width: 550px) {
  .shell { --panel-pad: 17px; --gap: 10px; --radius: 18px; }
  .bar { gap: 6px; }
  .page-title { font-size: clamp(18px, 5.5vw, 26px); }
  .username { display: none; }
  .account-pill { padding: 1px; }
  .identity { padding: 0 7px; gap: 4px; }
  .identity > .icon { width: 13px; }
  .metric { padding: 16px 13px; gap: 12px; }
  .metric-label { gap: 7px; font-size: 13px; }
  .metric-icon { width: 31px; }
  .metric strong { font-size: 34px; }
  .recent-person strong { font-size: 15px; }
  .recent-person small, .recent-row { font-size: 13px; }
  .recent-row .link, .recent-card .paneltitle .link { min-height: 44px; }
  .row { flex: 1; min-width: 0; }
  .toolbar input { width: 100%; }
}
@media (forced-colors: active) {
  .staff-sidebar, .card, .metric, .metric-icon, .account-pill { border-color: CanvasText; }
  .plot-bar { background: Highlight; forced-color-adjust: none; }
}

.staff-login {
  color-scheme: dark;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 68px max(18px, env(safe-area-inset-right)) max(68px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  color: #fff;
  background: #0d0b17 url('./hero-poster.jpg') center / cover no-repeat;
}
.auth-film, .staff-login::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.auth-film { z-index: -2; object-fit: cover; }
.staff-login::before {
  content: '';
  z-index: -1;
  background: linear-gradient(115deg, #09071985, #10081652 50%, #0908198c),
              linear-gradient(0deg, #07061180, transparent 40%);
}
.auth-card {
  position: relative;
  width: min(100%, 422px);
  padding: clamp(25px, 5vw, 40px);
  border: 1px solid #ffffff36;
  border-radius: 22px;
  background: linear-gradient(150deg, #191522df, #0b0a12e6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 80px #03020a85, inset 0 1px 0 #ffffff12;
}
.auth-card::before {
  position: absolute;
  inset: -1px 12% auto;
  content: '';
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff0081 33%, #c100ff 65%, transparent);
}
.auth-heading { text-align: center; }
.auth-heading img { display: block; width: 130px; height: auto; margin: 0 auto 20px; }
.auth-heading h1 { color: #fff; font-size: clamp(30px, 4vw, 36px); letter-spacing: -.045em; }
.auth-form { display: grid; gap: 19px; margin-top: 30px; }
.auth-form label { display: block; margin-bottom: 7px; color: #f5f1f8; }
.auth-input { position: relative; }
.auth-input > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #c5bdcd;
  pointer-events: none;
}
.auth-input input {
  height: 49px;
  padding: 10px 14px 10px 42px;
  border: 1px solid #ffffff42;
  border-radius: 10px;
  background: #ffffff0b;
  color: #fff;
  font-size: 16px;
}
.auth-input input:focus-visible { border-color: #ff82bd; outline: 2px solid #ff62ad66; outline-offset: 1px; }
#auth-password { padding-right: 50px; }
.auth-reveal {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 2px 2px 2px auto;
  width: 44px;
  border-radius: 8px;
  color: #dfd8e5;
}
.auth-reveal:hover { background: #ffffff12; color: white; }
.auth-reveal svg, .auth-submit svg, .auth-motion svg { width: 18px; height: 18px; }
#auth-password[type="password"] + .auth-reveal .lucide-eye-off,
#auth-password[type="text"] + .auth-reveal .lucide-eye { display: none; }
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin-top: 3px;
  border: 1px solid #ff92c64d;
  border-radius: 10px;
  background: linear-gradient(105deg, #ba005e, #9a167e 70%, #792eaa);
  color: white;
  font-weight: 700;
  box-shadow: 0 5px 22px #dd127235;
}
.auth-submit:hover { filter: brightness(1.12); }
.auth-form .error { color: #ffa6c9; }
.auth-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  margin: 19px auto -8px;
  min-height: 44px;
  font-size: 13px;
  color: #ded7e4;
  text-decoration: none;
}
.auth-back svg { width: 15px; height: 15px; }
.auth-back:hover { color: white; text-decoration: underline; text-underline-offset: 3px; }
.auth-motion {
  position: absolute;
  bottom: max(12px, env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff61;
  border-radius: 50%;
  color: white;
  background: #090812b5;
}
.auth-motion[data-playing] .lucide-play, .auth-motion:not([data-playing]) .lucide-pause { display: none; }
@media (prefers-reduced-motion: reduce) { .auth-film, .auth-motion { display: none; } }

@media (max-width:850px) {
  .shell:has(> .mobile-dock) {grid-template-rows:var(--bar-size) minmax(0,1fr) auto}
  .mobile-dock {
    grid-column:1/-1;grid-row:3;display:flex;align-items:stretch;gap:2px;
    padding:4px max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));
    border-top:1px solid var(--line);background:var(--panel);z-index:2;
  }
  .mobile-dock > :is(a,button) {
    flex:1 1 0;min-width:0;min-height:48px;display:flex;flex-direction:column;align-items:center;
    justify-content:center;gap:3px;padding:2px;border-radius:9px;color:var(--sub);
    background:transparent;text-decoration:none;font:600 .68rem/1.15 Inter,sans-serif;text-align:center;
  }
  .mobile-dock svg {width:19px;height:19px}
  .mobile-dock > [aria-current=page] {color:var(--hot);background:var(--active-bg)}
  .mobile-dock > :nth-child(2):nth-last-child(2) svg,
  .mobile-dock > :nth-child(3):nth-last-child(3) svg {
    box-sizing:content-box;width:22px;height:22px;padding:4px 13px;border-radius:12px;
    background:var(--active-bg);color:var(--hot);
  }
  .mobile-dock > :is(a,button):is(:focus-visible,:hover) {background:var(--raised);color:var(--ink)}
}

.forms-list { list-style: none; padding: 0; margin: 0; }
.forms-list li { border-top: 1px solid var(--line); }
.forms-list button {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto 18px; gap: 8px 18px;
  align-items: center; text-align: left; width: 100%; padding: 14px 8px;
  background: transparent; color: var(--ink); border: 0; font: inherit; cursor: pointer;
}
.forms-list button:is(:hover, :focus-visible) { background: var(--raised); }
.forms-sender { display: grid; gap: 2px; overflow-wrap: anywhere; }
.forms-sender span, .forms-list time, .forms-source { color: var(--sub); font-size: .9em; }
.forms-detail dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; }
.forms-detail dt { color: var(--sub); }
.forms-detail dd { margin: 0; overflow-wrap: anywhere; }
.forms-detail a { color: var(--hot); }
.forms-message { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .forms-list button { grid-template-columns: minmax(0, 1fr) 18px; gap: 3px 8px; }
  .forms-list .forms-source, .forms-list time { grid-column: 1; }
  .forms-list svg { grid-area: 1 / 2 / 4 / 3; }
}
