/*!
 * ClinicOS Admin — design system ("calm clinical precision")
 * Every component class is prefixed `a-`. Brand accent vars (--a-accent*) are injected at runtime
 * from CLINIC_CONFIG.brand by admin.js (light + dark variants, contrast-corrected).
 */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

/* ============================================================== tokens (light) */
:root {
  color-scheme: light;
  --a-font: 'Geist', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  --a-font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --a-font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;

  /* 4px grid */
  --a-1: 4px; --a-2: 8px; --a-3: 12px; --a-4: 16px; --a-5: 20px; --a-6: 24px; --a-7: 28px; --a-8: 32px; --a-10: 40px; --a-12: 48px; --a-16: 64px;
  --a-r-xs: 4px; --a-r-sm: 6px; --a-r: 8px; --a-r-md: 10px; --a-r-lg: 14px; --a-r-xl: 20px; --a-r-full: 999px;

  --a-sb-w: 252px;
  --a-rail-w: 68px;
  --a-topbar-h: 60px;
  --a-tabbar-h: 64px;
  --a-ctl-h: 36px;
  --a-ctl-h-sm: 30px;

  /* surfaces — warm neutrals */
  --a-canvas: #f1efea;
  --a-bg: #f7f6f2;
  --a-surface: #ffffff;
  --a-surface-2: #f7f6f3;
  --a-surface-3: #efede8;
  --a-hover: rgba(40, 36, 28, .045);
  --a-press: rgba(40, 36, 28, .08);
  --a-line: #e8e5de;
  --a-line-2: #d8d4cb;
  --a-line-3: #c4bfb4;
  --a-ink: #1c1b18;
  --a-ink-2: #53504a;
  --a-ink-3: #6c6961;
  --a-ink-4: #9d998f;
  --a-scrim: rgba(28, 25, 20, .38);
  --a-tooltip-bg: #1f1e1b;
  --a-tooltip-ink: #f6f5f1;
  --a-toast-bg: #1f1e1b;
  --a-toast-ink: #f4f3ef;
  --a-toast-ink-2: #b9b6ae;

  --a-shadow-1: 0 1px 0 rgba(28, 25, 20, .025), 0 1px 2px rgba(28, 25, 20, .04);
  --a-shadow-2: 0 1px 2px rgba(28, 25, 20, .05), 0 6px 16px -6px rgba(28, 25, 20, .08);
  --a-shadow-3: 0 0 0 1px rgba(28, 25, 20, .06), 0 2px 6px rgba(28, 25, 20, .05), 0 16px 40px -12px rgba(28, 25, 20, .2);
  --a-shadow-4: 0 0 0 1px rgba(28, 25, 20, .06), 0 30px 80px -20px rgba(28, 25, 20, .35), 0 8px 24px -8px rgba(28, 25, 20, .12);

  /* brand (defaults; overridden by admin.js from CLINIC_CONFIG.brand) */
  --a-accent: #0f5c4d;
  --a-accent-ink: #ffffff;
  --a-accent-soft: #e3f1ec;
  --a-accent-text: #0f5c4d;
  --a-accent-hover: #0c4d40;
  --a-accent-line: rgba(15, 92, 77, .28);
  --a-accent-wash: rgba(15, 92, 77, .07);
  --a-ring: rgba(15, 92, 77, .55);

  /* semantic */
  --a-pos: #1c6d3c; --a-pos-soft: #e3f2e7;
  --a-neg: #b0301d; --a-neg-soft: #fbe8e4; --a-neg-hover: #92260f;
  --a-warn: #8a5600; --a-warn-soft: #fbf0d8;
  --a-info: #1f55a8; --a-info-soft: #e6eefb;

  /* appointment statuses — each: bg / fg / dot */
  --s-pending-bg: #fbf0d6; --s-pending-fg: #7c4f00; --s-pending-dot: #df9d17;
  --s-confirmed-bg: #e6eefc; --s-confirmed-fg: #1f4b97; --s-confirmed-dot: #3a74da;
  --s-checked-in-bg: #ece9fb; --s-checked-in-fg: #43379d; --s-checked-in-dot: #6c5ede;
  --s-completed-bg: #e2f2e6; --s-completed-fg: #1a6536; --s-completed-dot: #2e9b57;
  --s-cancelled-bg: #efede8; --s-cancelled-fg: #58544c; --s-cancelled-dot: #a39e94;
  --s-no-show-bg: #fbe6e2; --s-no-show-fg: #9e2d1b; --s-no-show-dot: #da5440;
  --s-neutral-bg: #efede8; --s-neutral-fg: #58544c; --s-neutral-dot: #a39e94;

  /* charts */
  --a-grid: #eeebe5;
  --a-axis: #8e8a80;
  --a-ch-2: #8f8a80;
  --a-ch-3: #bcb7ac;
  --a-ch-4: #dcd8cf;
}

/* ============================================================== tokens (dark) — explicit toggle */
:root[data-theme="dark"] {
  color-scheme: dark;
  --a-canvas: #0f0f0e;
  --a-bg: #151514;
  --a-surface: #1c1c1a;
  --a-surface-2: #212120;
  --a-surface-3: #2a2a27;
  --a-hover: rgba(255, 252, 240, .05);
  --a-press: rgba(255, 252, 240, .09);
  --a-line: #2b2a27;
  --a-line-2: #3a3935;
  --a-line-3: #4c4a45;
  --a-ink: #efeeea;
  --a-ink-2: #b7b4ac;
  --a-ink-3: #96938b;
  --a-ink-4: #6b6862;
  --a-scrim: rgba(0, 0, 0, .56);
  --a-tooltip-bg: #f1f0ec;
  --a-tooltip-ink: #1b1a17;
  --a-toast-bg: #2a2a27;
  --a-toast-ink: #f4f3ef;
  --a-toast-ink-2: #a9a69e;
  --a-shadow-1: 0 1px 0 rgba(0, 0, 0, .25);
  --a-shadow-2: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 20px -8px rgba(0, 0, 0, .45);
  --a-shadow-3: 0 0 0 1px rgba(255, 255, 255, .06), 0 16px 40px -10px rgba(0, 0, 0, .6);
  --a-shadow-4: 0 0 0 1px rgba(255, 255, 255, .07), 0 30px 80px -20px rgba(0, 0, 0, .75);
  --a-pos: #7fd09c; --a-pos-soft: rgba(63, 181, 108, .16);
  --a-neg: #f29b8d; --a-neg-soft: rgba(232, 112, 93, .16); --a-neg-hover: #f6b3a8;
  --a-warn: #f0c26a; --a-warn-soft: rgba(224, 160, 30, .15);
  --a-info: #9dbcf5; --a-info-soft: rgba(91, 143, 230, .16);
  --s-pending-bg: rgba(224, 160, 30, .15); --s-pending-fg: #f1c56f; --s-pending-dot: #e3a52a;
  --s-confirmed-bg: rgba(91, 143, 230, .17); --s-confirmed-fg: #a7c3f6; --s-confirmed-dot: #6495e8;
  --s-checked-in-bg: rgba(138, 126, 240, .19); --s-checked-in-fg: #c1baf7; --s-checked-in-dot: #8e82f0;
  --s-completed-bg: rgba(63, 181, 108, .16); --s-completed-fg: #93d8ab; --s-completed-dot: #45b872;
  --s-cancelled-bg: rgba(160, 155, 145, .13); --s-cancelled-fg: #bdb9b0; --s-cancelled-dot: #8a867e;
  --s-no-show-bg: rgba(232, 112, 93, .17); --s-no-show-fg: #f5a89b; --s-no-show-dot: #e8705d;
  --s-neutral-bg: rgba(160, 155, 145, .13); --s-neutral-fg: #bdb9b0; --s-neutral-dot: #8a867e;
  --a-grid: #272624;
  --a-axis: #8a877f;
  --a-ch-2: #8a867e;
  --a-ch-3: #5f5c56;
  --a-ch-4: #45433f;
}
/* OS dark preference before/without an explicit choice */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --a-canvas: #0f0f0e; --a-bg: #151514; --a-surface: #1c1c1a; --a-surface-2: #212120; --a-surface-3: #2a2a27;
    --a-hover: rgba(255, 252, 240, .05); --a-press: rgba(255, 252, 240, .09);
    --a-line: #2b2a27; --a-line-2: #3a3935; --a-line-3: #4c4a45;
    --a-ink: #efeeea; --a-ink-2: #b7b4ac; --a-ink-3: #96938b; --a-ink-4: #6b6862;
    --a-scrim: rgba(0, 0, 0, .56); --a-tooltip-bg: #f1f0ec; --a-tooltip-ink: #1b1a17;
    --a-toast-bg: #2a2a27; --a-toast-ink: #f4f3ef; --a-toast-ink-2: #a9a69e;
    --a-grid: #272624; --a-axis: #8a877f; --a-ch-2: #8a867e; --a-ch-3: #5f5c56; --a-ch-4: #45433f;
  }
}

/* ============================================================== base */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--a-bg);
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--a-bg);
  color: var(--a-ink);
  font-family: var(--a-font);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html.a-lock, html.a-lock body { overflow: hidden; }
#admin-root { min-height: 100dvh; }
:where(.admin), :where(.admin) * { -webkit-tap-highlight-color: transparent; }
:where(.admin) :where(h1, h2, h3, h4, p, dl, dd, figure) { margin: 0; }
:where(.admin) :where(a) { color: inherit; }
:where(.admin) :where(button) { font: inherit; color: inherit; }
:where(.admin) :where(img, svg) { display: block; }
:where(.admin) :where(:focus) { outline: none; }
:where(.admin) :where(:focus-visible) { outline: 2px solid var(--a-ring); outline-offset: 2px; border-radius: var(--a-r-sm); }
::selection { background: var(--a-accent-soft); color: var(--a-ink); }
[hidden] { display: none !important; }

/* ============================================================== utilities */
.a-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.a-mono { font-family: var(--a-font-mono); font-feature-settings: normal; letter-spacing: -.01em; }
.a-num { font-variant-numeric: tabular-nums; }
.a-muted { color: var(--a-ink-3); }
.a-soft { color: var(--a-ink-2); }
.a-strong { font-weight: 600; color: var(--a-ink); }
.a-nowrap { white-space: nowrap; }
.a-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.a-row { display: flex; align-items: center; gap: var(--a-2); min-width: 0; }
.a-row--wrap { flex-wrap: wrap; }
.a-row--between { justify-content: space-between; }
.a-stack { display: grid; gap: var(--a-4); }
.a-stack--sm { gap: var(--a-2); }
.a-stack--lg { gap: var(--a-6); }
.a-grow { flex: 1 1 auto; min-width: 0; }
.a-divider { height: 1px; background: var(--a-line); border: 0; margin: var(--a-4) 0; }
.a-link { color: var(--a-accent-text); text-decoration: none; font-weight: 500; border-radius: var(--a-r-xs); }
.a-link:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.a-linkbtn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--a-accent-text); font-weight: 500; text-align: left; border-radius: var(--a-r-xs); }
.a-linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.a-kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
  font: 500 11px/1 var(--a-font-mono); color: var(--a-ink-3);
  background: var(--a-surface); border: 1px solid var(--a-line-2); border-bottom-width: 2px; border-radius: 5px;
}
.a-eyebrow { font-size: 12px; font-weight: 500; color: var(--a-ink-3); letter-spacing: .01em; }
.a-section-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--a-ink-3); }

/* ============================================================== buttons */
.a-btn {
  --btn-bg: var(--a-surface); --btn-fg: var(--a-ink); --btn-bd: var(--a-line-2); --btn-sh: var(--a-shadow-1);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--a-ctl-h); padding: 0 14px; min-width: 0;
  font: 500 13.5px/1 var(--a-font); letter-spacing: -.005em; white-space: nowrap;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--a-r);
  box-shadow: var(--btn-sh);
  cursor: pointer; user-select: none; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.a-btn svg { flex: none; width: 16px; height: 16px; }
.a-btn:hover { background: color-mix(in srgb, var(--btn-bg) 94%, var(--a-ink)); }
.a-btn:active { transform: translateY(.5px); }
.a-btn:focus-visible { outline: 2px solid var(--a-ring); outline-offset: 2px; }
.a-btn[disabled], .a-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.a-btn--primary {
  --btn-bg: var(--a-accent); --btn-fg: var(--a-accent-ink); --btn-bd: transparent;
  --btn-sh: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(0, 0, 0, .12);
}
.a-btn--primary:hover { background: var(--a-accent-hover); }
.a-btn--ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-sh: none; --btn-fg: var(--a-ink-2); }
.a-btn--ghost:hover { background: var(--a-hover); color: var(--a-ink); }
.a-btn--soft { --btn-bg: var(--a-accent-soft); --btn-fg: var(--a-accent-text); --btn-bd: transparent; --btn-sh: none; }
.a-btn--soft:hover { background: color-mix(in srgb, var(--a-accent-soft) 85%, var(--a-accent)); }
.a-btn--danger { --btn-fg: var(--a-neg); }
.a-btn--danger:hover { background: var(--a-neg-soft); border-color: color-mix(in srgb, var(--a-neg) 30%, var(--a-line-2)); }
.a-btn--danger-solid { --btn-bg: #b3321f; --btn-fg: #fff; --btn-bd: transparent; --btn-sh: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 2px rgba(0,0,0,.12); }
.a-btn--danger-solid:hover { background: #972814; }
.a-btn--sm { height: var(--a-ctl-h-sm); padding: 0 10px; font-size: 12.5px; gap: 6px; border-radius: 7px; }
.a-btn--sm svg { width: 14px; height: 14px; }
.a-btn--lg { height: 44px; padding: 0 18px; font-size: 14.5px; border-radius: var(--a-r-md); }
.a-btn--block { width: 100%; }
.a-btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.a-btn.is-loading::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--btn-fg); border-right-color: transparent; animation: a-spin .7s linear infinite;
}
.a-iconbtn {
  display: inline-grid; place-items: center; flex: none;
  width: var(--a-ctl-h); height: var(--a-ctl-h); padding: 0;
  color: var(--a-ink-2); background: transparent; border: 1px solid transparent; border-radius: var(--a-r);
  cursor: pointer; position: relative;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.a-iconbtn svg { width: 18px; height: 18px; }
.a-iconbtn:hover { background: var(--a-hover); color: var(--a-ink); }
.a-iconbtn:active { background: var(--a-press); }
.a-iconbtn[aria-expanded="true"], .a-iconbtn.is-active { background: var(--a-press); color: var(--a-ink); }
.a-iconbtn--sm { width: 28px; height: 28px; border-radius: var(--a-r-sm); }
.a-iconbtn--sm svg { width: 15px; height: 15px; }
.a-iconbtn--bordered { border-color: var(--a-line-2); background: var(--a-surface); box-shadow: var(--a-shadow-1); }
.a-btn-group { display: inline-flex; gap: var(--a-2); flex-wrap: wrap; align-items: center; }

/* chips / tags */
.a-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  font-size: 12px; font-weight: 500; line-height: 1; color: var(--a-ink-2);
  background: var(--a-surface-3); border: 1px solid transparent; border-radius: var(--a-r-full); white-space: nowrap;
}
.a-chip svg { width: 13px; height: 13px; }
.a-chip--outline { background: transparent; border-color: var(--a-line-2); }
.a-chip--accent { background: var(--a-accent-soft); color: var(--a-accent-text); }
.a-chip--warn { background: var(--a-warn-soft); color: var(--a-warn); }
.a-chip--info { background: var(--a-info-soft); color: var(--a-info); }
.a-chip--pos { background: var(--a-pos-soft); color: var(--a-pos); }
.a-chip--neg { background: var(--a-neg-soft); color: var(--a-neg); }
.a-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  font: 600 11px/1 var(--a-font); font-variant-numeric: tabular-nums;
  color: var(--a-ink-2); background: var(--a-surface-3); border-radius: var(--a-r-full);
}

/* ============================================================== forms */
.a-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--a-4) var(--a-4); }
.a-fields--1 { grid-template-columns: minmax(0, 1fr); }
.a-field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.a-fields > .a-field { grid-column: 1 / -1; }
.a-fields > .a-field--half { grid-column: span 1; }
@media (max-width: 559.98px) { .a-fields > .a-field--half { grid-column: 1 / -1; } }
.a-label { font-size: 13px; font-weight: 500; color: var(--a-ink); display: flex; align-items: baseline; gap: 4px; }
.a-label .a-req { color: var(--a-neg); font-weight: 600; }
.a-label .a-opt { color: var(--a-ink-3); font-weight: 400; font-size: 12px; }
.a-hint { font-size: 12px; color: var(--a-ink-3); line-height: 1.45; }
.a-error { font-size: 12px; color: var(--a-neg); display: flex; gap: 5px; align-items: center; font-weight: 500; }
.a-error svg { width: 13px; height: 13px; flex: none; }
.a-input {
  width: 100%; height: var(--a-ctl-h); padding: 0 11px;
  font: 400 14px/1.4 var(--a-font); color: var(--a-ink);
  background: var(--a-surface); border: 1px solid var(--a-line-2); border-radius: var(--a-r);
  box-shadow: inset 0 1px 1px rgba(28, 25, 20, .03);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  -webkit-appearance: none; appearance: none;
}
.a-input::placeholder { color: var(--a-ink-4); }
.a-input:hover { border-color: var(--a-line-3); }
.a-input:focus, .a-input:focus-visible { outline: none; border-color: var(--a-accent); box-shadow: 0 0 0 3px var(--a-accent-wash), 0 0 0 1px var(--a-accent) inset; border-radius: var(--a-r); }
.a-input[aria-invalid="true"] { border-color: var(--a-neg); box-shadow: 0 0 0 3px var(--a-neg-soft); }
.a-input[disabled], .a-input[readonly] { background: var(--a-surface-2); color: var(--a-ink-2); }
.a-input[type="number"] { font-variant-numeric: tabular-nums; }
.a-input[type="date"], .a-input[type="time"] { font-variant-numeric: tabular-nums; padding-right: 8px; }
.a-input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
:root[data-theme="dark"] .a-input::-webkit-calendar-picker-indicator { filter: invert(1); }
textarea.a-input { height: auto; min-height: 92px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.a-select { position: relative; }
.a-select select.a-input { padding-right: 34px; cursor: pointer; }
.a-select > svg { position: absolute; right: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--a-ink-3); pointer-events: none; }
.a-inputwrap { position: relative; display: flex; align-items: center; }
.a-inputwrap > svg:first-child { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--a-ink-3); pointer-events: none; }
.a-inputwrap > .a-input { padding-left: 34px; }
.a-inputwrap > .a-inputwrap__end { position: absolute; right: 4px; }
.a-static { min-height: var(--a-ctl-h); display: flex; align-items: center; color: var(--a-ink-2); }

/* color */
.a-color { display: flex; gap: var(--a-2); align-items: center; }
.a-color input[type="color"] {
  width: var(--a-ctl-h); height: var(--a-ctl-h); padding: 3px; flex: none; cursor: pointer;
  border: 1px solid var(--a-line-2); border-radius: var(--a-r); background: var(--a-surface);
}
.a-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.a-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.a-color .a-input { font-family: var(--a-font-mono); text-transform: lowercase; }

/* switch */
.a-switch { display: flex; align-items: flex-start; gap: var(--a-3); cursor: pointer; min-height: 24px; }
.a-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.a-switch__track {
  flex: none; position: relative; width: 36px; height: 22px; margin-top: 1px; border-radius: 999px;
  background: var(--a-line-3); transition: background-color .2s ease;
}
.a-switch__thumb {
  position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .22s cubic-bezier(.3, .7, .3, 1);
}
.a-switch input:checked + .a-switch__track { background: var(--a-accent); }
.a-switch input:checked + .a-switch__track .a-switch__thumb { transform: translateX(14px); }
.a-switch input:focus-visible + .a-switch__track { outline: 2px solid var(--a-ring); outline-offset: 2px; }
.a-switch input:disabled + .a-switch__track { opacity: .5; }
.a-switch__text { display: grid; gap: 2px; min-width: 0; }
.a-switch__text strong { font-weight: 500; font-size: 13.5px; }

/* checkboxes */
.a-checks { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 6px; }
.a-checks legend { padding: 0; margin-bottom: 6px; }
.a-checks__list { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.a-check {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px 0 10px;
  border: 1px solid var(--a-line-2); border-radius: var(--a-r); background: var(--a-surface);
  cursor: pointer; font-size: 13.5px; user-select: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.a-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.a-check__box {
  flex: none; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--a-line-3);
  display: grid; place-items: center; background: var(--a-surface); transition: all .15s ease;
}
.a-check__box svg { width: 12px; height: 12px; color: var(--a-accent-ink); opacity: 0; transform: scale(.6); transition: all .15s ease; }
.a-check:hover { border-color: var(--a-line-3); }
.a-check:has(input:checked) { border-color: var(--a-accent-line); background: var(--a-accent-wash); }
.a-check input:checked + .a-check__box { background: var(--a-accent); border-color: var(--a-accent); }
.a-check input:checked + .a-check__box svg { opacity: 1; transform: none; }
.a-check:has(input:focus-visible) { outline: 2px solid var(--a-ring); outline-offset: 2px; }

/* segmented */
.a-seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--a-r-md);
  background: var(--a-surface-3); border: 1px solid var(--a-line); max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.a-seg::-webkit-scrollbar { display: none; }
.a-seg__opt { position: relative; flex: none; }
.a-seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.a-seg__opt span {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px;
  font-size: 13px; font-weight: 500; color: var(--a-ink-3); border-radius: 7px; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; cursor: pointer;
}
.a-seg__opt span svg { width: 14px; height: 14px; }
.a-seg__opt:hover span { color: var(--a-ink); }
.a-seg__opt input:checked + span { background: var(--a-surface); color: var(--a-ink); box-shadow: var(--a-shadow-1), 0 0 0 1px var(--a-line); }
.a-seg__opt input:focus-visible + span { outline: 2px solid var(--a-ring); outline-offset: 1px; }
.a-seg__count { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--a-ink-3); font-weight: 600; }
.a-seg--sm .a-seg__opt span { height: 24px; padding: 0 9px; font-size: 12px; }
.a-seg--block { display: flex; width: 100%; }
.a-seg--block .a-seg__opt { flex: 1; }
.a-seg--block .a-seg__opt span { width: 100%; justify-content: center; }

/* ============================================================== cards */
.a-card {
  background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-r-lg);
  box-shadow: var(--a-shadow-1); min-width: 0; position: relative;
}
.a-card__head { display: flex; align-items: flex-start; gap: var(--a-3); padding: 16px 18px 0; min-height: 44px; }
.a-card__titles { flex: 1; min-width: 0; display: grid; gap: 2px; }
.a-card__title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.a-card__sub { font-size: 12.5px; color: var(--a-ink-3); }
.a-card__actions { display: flex; align-items: center; gap: 6px; flex: none; margin: -4px -6px 0 0; }
.a-card__body { padding: 14px 18px 18px; }
.a-card__body--flush { padding: 8px 0 6px; }
.a-card__foot { padding: 12px 18px; border-top: 1px solid var(--a-line); display: flex; align-items: center; gap: var(--a-2); }
.a-card--pad { padding: 18px; }
.a-card--inset { background: var(--a-surface-2); box-shadow: none; }

/* ============================================================== status badge */
.a-status {
  --bg: var(--s-neutral-bg); --fg: var(--s-neutral-fg); --dot: var(--s-neutral-dot);
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 7px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  color: var(--fg); background: var(--bg); border-radius: var(--a-r-full);
}
.a-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); flex: none; }
.a-status--pending { --bg: var(--s-pending-bg); --fg: var(--s-pending-fg); --dot: var(--s-pending-dot); }
.a-status--pending::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--dot); width: 7px; height: 7px; }
.a-status--confirmed { --bg: var(--s-confirmed-bg); --fg: var(--s-confirmed-fg); --dot: var(--s-confirmed-dot); }
.a-status--checked-in { --bg: var(--s-checked-in-bg); --fg: var(--s-checked-in-fg); --dot: var(--s-checked-in-dot); }
.a-status--checked-in::before { animation: a-pulse-dot 2s ease-in-out infinite; }
.a-status--completed { --bg: var(--s-completed-bg); --fg: var(--s-completed-fg); --dot: var(--s-completed-dot); }
.a-status--cancelled { --bg: var(--s-cancelled-bg); --fg: var(--s-cancelled-fg); --dot: var(--s-cancelled-dot); }
.a-status--cancelled::before { border-radius: 1px; height: 1.5px; width: 7px; }
.a-status--no-show { --bg: var(--s-no-show-bg); --fg: var(--s-no-show-fg); --dot: var(--s-no-show-dot); }
.a-status--new, .a-status--unread { --bg: var(--s-confirmed-bg); --fg: var(--s-confirmed-fg); --dot: var(--s-confirmed-dot); }
.a-status--replied, .a-status--published, .a-status--active, .a-status--open { --bg: var(--s-completed-bg); --fg: var(--s-completed-fg); --dot: var(--s-completed-dot); }
.a-status--draft, .a-status--waiting { --bg: var(--s-pending-bg); --fg: var(--s-pending-fg); --dot: var(--s-pending-dot); }
.a-status--closed, .a-status--error { --bg: var(--s-no-show-bg); --fg: var(--s-no-show-fg); --dot: var(--s-no-show-dot); }
.a-status--lg { height: 26px; font-size: 13px; padding: 0 10px 0 9px; }

/* ============================================================== avatar */
.a-avatar {
  --av: #8a857b; --size: 32px;
  position: relative; flex: none; display: inline-grid; place-items: center;
  width: var(--size); height: var(--size); border-radius: 50%; overflow: hidden;
  font-size: calc(var(--size) * .38); font-weight: 600; letter-spacing: .01em; line-height: 1;
  color: color-mix(in oklab, var(--av) 72%, #000);
  background: color-mix(in oklab, var(--av) 16%, var(--a-surface));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--av) 22%, transparent);
  user-select: none;
}
:root[data-theme="dark"] .a-avatar { color: color-mix(in oklab, var(--av) 55%, #fff); background: color-mix(in oklab, var(--av) 26%, var(--a-surface)); }
.a-avatar img { width: 100%; height: 100%; object-fit: cover; }
.a-avatar--square { border-radius: 28%; }

/* ============================================================== page header */
.a-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--a-4) var(--a-6); flex-wrap: wrap; margin-bottom: var(--a-6); }
.a-page-head__text { display: grid; gap: 6px; min-width: 0; max-width: 720px; }
.a-page-head__title { font-size: 26px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; }
.a-page-head__sub { font-size: 14px; color: var(--a-ink-3); line-height: 1.5; }
.a-page-head__actions { display: flex; align-items: center; gap: var(--a-2); flex-wrap: wrap; }
@media (max-width: 959.98px) {
  .a-page-head { margin-bottom: var(--a-5); align-items: flex-start; }
  .a-page-head__title { font-size: 22px; }
}

/* ============================================================== empty state */
.a-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 40px 24px; }
.a-empty--compact { padding: 24px 16px; }
.a-empty__art { position: relative; width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 10px; color: var(--a-accent-text); }
.a-empty__art::before, .a-empty__art::after { content: ''; position: absolute; border-radius: 50%; }
.a-empty__art::before { inset: 0; background: radial-gradient(circle, var(--a-accent-wash) 0 55%, transparent 56%); box-shadow: 0 0 0 1px var(--a-accent-line) inset; opacity: .9; }
.a-empty__art::after { inset: -12px; border: 1px dashed var(--a-line-2); }
.a-empty__art svg { position: relative; width: 24px; height: 24px; }
.a-empty--compact .a-empty__art { width: 48px; height: 48px; margin-bottom: 6px; }
.a-empty--compact .a-empty__art::after { inset: -8px; }
.a-empty--compact .a-empty__art svg { width: 20px; height: 20px; }
.a-empty__title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.a-empty__text { font-size: 13.5px; color: var(--a-ink-3); max-width: 360px; line-height: 1.5; }
.a-empty__action { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.a-empty--error .a-empty__art { color: var(--a-neg); }
.a-empty--error .a-empty__art::before { background: radial-gradient(circle, var(--a-neg-soft) 0 55%, transparent 56%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--a-neg) 25%, transparent) inset; }

/* loading */
.a-skel { display: block; border-radius: var(--a-r-sm); background: linear-gradient(90deg, var(--a-surface-3), var(--a-surface-2), var(--a-surface-3)); background-size: 200% 100%; animation: a-shimmer 1.4s ease-in-out infinite; }
.a-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--a-line-2); border-top-color: var(--a-accent); animation: a-spin .7s linear infinite; }

/* ============================================================== table (stacked cards under 720px via container query) */
.a-table-wrap { container: a-table / inline-size; min-width: 0; }
.a-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.a-table th {
  position: sticky; top: var(--a-topbar-h); z-index: 2;
  height: 38px; padding: 0 14px; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 500; color: var(--a-ink-3);
  background: color-mix(in srgb, var(--a-surface-2) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--a-line);
}
.a-table th:first-child { border-top-left-radius: var(--a-r-lg); }
.a-table th:last-child { border-top-right-radius: var(--a-r-lg); }
.a-table th[data-align="right"], .a-table td[data-align="right"] { text-align: right; }
.a-table th[data-align="center"], .a-table td[data-align="center"] { text-align: center; }
.a-th-sort {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 -6px; padding: 4px 6px; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer; border-radius: var(--a-r-sm);
}
.a-th-sort:hover { color: var(--a-ink); background: var(--a-hover); }
.a-th-sort svg { width: 13px; height: 13px; opacity: .35; transition: opacity .15s ease, transform .15s ease; }
.a-table th[aria-sort="ascending"] .a-th-sort, .a-table th[aria-sort="descending"] .a-th-sort { color: var(--a-ink); }
.a-table th[aria-sort="ascending"] .a-th-sort svg, .a-table th[aria-sort="descending"] .a-th-sort svg { opacity: .9; }
.a-table th[aria-sort="descending"] .a-th-sort svg { transform: rotate(180deg); }
.a-table td { padding: 11px 14px; border-bottom: 1px solid var(--a-line); vertical-align: middle; color: var(--a-ink); }
.a-table tbody tr:last-child td { border-bottom: 0; }
.a-table tbody tr { transition: background-color .12s ease; }
.a-table tbody tr:hover { background: var(--a-surface-2); }
.a-table tr.a-row-click { cursor: pointer; }
.a-table tr.a-row-click:focus-visible { outline: 2px solid var(--a-ring); outline-offset: -2px; border-radius: 0; }
.a-table tr.is-selected { background: var(--a-accent-wash); }
.a-table .a-cell-strong { font-weight: 500; }
.a-table .a-cell-sub { display: block; font-size: 12px; color: var(--a-ink-3); margin-top: 1px; }
.a-table-card { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-r-lg); box-shadow: var(--a-shadow-1); }
@container a-table (max-width: 719.98px) {
  .a-table, .a-table tbody, .a-table tr, .a-table td { display: block; }
  .a-table thead { display: none; }
  .a-table tbody { display: grid; gap: 10px; padding: 0; }
  .a-table tbody tr {
    padding: 12px 14px; border: 1px solid var(--a-line); border-radius: var(--a-r-md);
    background: var(--a-surface); box-shadow: var(--a-shadow-1);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px;
  }
  .a-table tbody tr:hover { background: var(--a-surface); }
  .a-table td { padding: 0; border: 0; grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 22px; text-align: right !important; }
  .a-table td::before { content: attr(data-label); color: var(--a-ink-3); font-size: 12.5px; text-align: left; flex: none; }
  .a-table td.a-td-title { grid-column: 1; text-align: left !important; display: block; font-size: 14.5px; padding-bottom: 4px; }
  .a-table td.a-td-title::before, .a-table td.a-td-nolabel::before { content: none; }
  .a-table td.a-td-aside { grid-column: 2; grid-row: 1; justify-content: flex-end; padding-bottom: 4px; }
  .a-table td.a-td-aside::before { content: none; }
  .a-table td.a-td-hide { display: none; }
  .a-table-card { background: transparent; border: 0; box-shadow: none; }
}

/* ============================================================== KPI */
.a-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: var(--a-3); }
.a-kpi {
  position: relative; display: grid; gap: 10px; align-content: start; min-width: 0;
  padding: 16px 16px 14px; text-decoration: none; color: inherit;
  background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-r-lg); box-shadow: var(--a-shadow-1);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
a.a-kpi:hover { border-color: var(--a-line-2); box-shadow: var(--a-shadow-2); transform: translateY(-1px); }
a.a-kpi:focus-visible { outline: 2px solid var(--a-ring); outline-offset: 2px; border-radius: var(--a-r-lg); }
.a-kpi__top { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 32px; }
.a-kpi__icon { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--a-ink-2); background: var(--a-surface-3); }
.a-kpi__icon svg { width: 14px; height: 14px; }
.a-kpi__label { font-size: 12.5px; font-weight: 500; color: var(--a-ink-2); line-height: 1.25; flex: 1; min-width: 0; }
.a-kpi__go { width: 14px; height: 14px; color: var(--a-ink-4); opacity: 0; transform: translate(-3px, 3px); transition: all .18s ease; flex: none; }
a.a-kpi:hover .a-kpi__go { opacity: 1; transform: none; color: var(--a-ink-2); }
.a-kpi__value { font-size: 28px; line-height: 1; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-kpi__value small { font-size: 15px; font-weight: 500; color: var(--a-ink-3); letter-spacing: -.01em; margin-left: 2px; }
.a-kpi__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 20px; }
.a-kpi__hint { font-size: 12px; color: var(--a-ink-3); line-height: 1.35; min-width: 0; }
.a-delta {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--a-ink-2); background: var(--a-surface-3);
}
.a-delta__arrow { font-size: 8px; line-height: 1; }
.a-delta--pos { color: var(--a-pos); background: var(--a-pos-soft); }
.a-delta--neg { color: var(--a-neg); background: var(--a-neg-soft); }
.a-kpi--attention { border-color: color-mix(in srgb, var(--s-pending-dot) 45%, var(--a-line)); }
.a-kpi--attention .a-kpi__icon { color: var(--s-pending-fg); background: var(--s-pending-bg); }
.a-kpi--accent .a-kpi__icon { color: var(--a-accent-text); background: var(--a-accent-soft); }

/* ============================================================== charts */
.a-chart { position: relative; width: 100%; min-width: 0; }
.a-chart svg { overflow: visible; }
.a-chart text { font-family: var(--a-font); font-size: 11px; fill: var(--a-axis); font-variant-numeric: tabular-nums; }
.a-chart .a-ch-grid { stroke: var(--a-grid); stroke-width: 1; shape-rendering: crispEdges; }
.a-chart .a-ch-base { stroke: var(--a-line-2); stroke-width: 1; shape-rendering: crispEdges; }
.a-chart .a-ch-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.a-chart .a-ch-cross { stroke: var(--a-ink-4); stroke-width: 1; shape-rendering: crispEdges; }
.a-chart .a-ch-dot { stroke: var(--a-surface); stroke-width: 2; }
.a-chart .a-ch-bar { transition: opacity .15s ease, filter .15s ease; transform-box: fill-box; transform-origin: 50% 100%; }
.a-chart .a-ch-bar.is-dim { opacity: .4; }
.a-chart .a-ch-hit { fill: transparent; cursor: default; }
.a-chart .a-ch-hit:focus-visible { outline: none; }
.a-chart .a-ch-hit:focus-visible + .a-ch-focus, .a-chart .a-ch-focus.is-on { opacity: 1; }
.a-chart .a-ch-focus { fill: none; stroke: var(--a-ring); stroke-width: 2; opacity: 0; rx: 6; }
.a-chart .a-ch-value { fill: var(--a-ink-2); font-weight: 600; font-size: 11px; }
.a-chart .a-ch-value.is-hl { fill: var(--a-ink); }
.a-chart .a-ch-xlabel.is-hl { fill: var(--a-ink); font-weight: 600; }
.a-chart-plot:focus-visible { outline: 2px solid var(--a-ring); outline-offset: 4px; border-radius: 6px; }
.a-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 120px; max-width: 240px;
  padding: 8px 10px; border-radius: var(--a-r); background: var(--a-tooltip-bg); color: var(--a-tooltip-ink);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, .3); font-size: 12px; line-height: 1.35;
  opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease;
}
.a-tip.is-on { opacity: 1; transform: none; }
.a-tip__title { font-weight: 500; opacity: .7; margin-bottom: 4px; white-space: nowrap; }
.a-tip__row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.a-tip__row + .a-tip__row { margin-top: 2px; }
.a-tip__key { width: 10px; height: 2px; border-radius: 1px; flex: none; }
.a-tip__val { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }
.a-tip__lab { opacity: .7; }
.a-chart-empty { display: grid; place-items: center; text-align: center; color: var(--a-ink-3); font-size: 13px; border: 1px dashed var(--a-line-2); border-radius: var(--a-r-md); padding: 24px; }
/* horizontal bars (HTML) */
.a-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.a-hbar { display: grid; gap: 7px; min-width: 0; }
.a-hbar__row { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 13px; }
.a-hbar__label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--a-ink); font-weight: 500; }
.a-hbar__label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-hbar__sw { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.a-hbar__value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--a-ink); white-space: nowrap; }
.a-hbar__sub { font-variant-numeric: tabular-nums; color: var(--a-ink-3); font-size: 12px; white-space: nowrap; }
.a-hbar__track { height: 8px; border-radius: 4px; background: var(--a-surface-3); overflow: hidden; }
.a-hbar__fill { height: 100%; width: var(--w, 0%); border-radius: 4px; background: var(--c, var(--a-accent)); transform-origin: left center; }
.a-hbars.is-animating .a-hbar__fill { animation: a-grow-x .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
/* donut */
.a-donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.a-donut__fig { position: relative; flex: none; }
.a-donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.a-donut__value { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.a-donut__caption { font-size: 11.5px; color: var(--a-ink-3); max-width: 90px; line-height: 1.25; margin-top: 2px; }
.a-donut__seg { transition: opacity .15s ease; cursor: default; }
.a-donut__seg.is-dim { opacity: .28; }
.a-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; flex: 1; min-width: 150px; }
.a-legend__item {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 8px;
  padding: 5px 8px; margin: 0 -8px; border-radius: var(--a-r-sm); font-size: 13px; cursor: default;
  transition: background-color .12s ease;
}
.a-legend__item:hover, .a-legend__item.is-on { background: var(--a-hover); }
.a-legend__sw { width: 10px; height: 10px; border-radius: 3px; }
.a-legend__label { color: var(--a-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-legend__val { font-weight: 600; font-variant-numeric: tabular-nums; }
.a-legend__pct { color: var(--a-ink-3); font-variant-numeric: tabular-nums; font-size: 12px; min-width: 36px; text-align: right; }

/* ============================================================== overlays: layer, modal, drawer */
.a-layer { position: fixed; inset: 0; z-index: 100; display: grid; }
.a-layer > .a-scrim { position: absolute; inset: 0; background: var(--a-scrim); animation: a-fade-in .2s ease both; }
.a-layer.is-closing > .a-scrim { animation: a-fade-out .18s ease both; }
.a-modal {
  position: relative; place-self: center; width: min(var(--w, 520px), calc(100vw - 32px)); max-height: min(88dvh, 860px);
  display: flex; flex-direction: column; min-height: 0;
  background: var(--a-surface); border-radius: var(--a-r-xl); box-shadow: var(--a-shadow-4);
  animation: a-modal-in .26s cubic-bezier(.2, .9, .25, 1) both;
}
.a-layer.is-closing .a-modal { animation: a-modal-out .16s ease both; }
.a-modal[data-size="sm"] { --w: 420px; }
.a-modal[data-size="md"] { --w: 540px; }
.a-modal[data-size="lg"] { --w: 760px; }
.a-modal[data-size="xl"] { --w: 980px; }
.a-modal__head, .a-drawer__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; flex: none; }
.a-modal__titles, .a-drawer__titles { flex: 1; min-width: 0; display: grid; gap: 4px; }
.a-modal__title, .a-drawer__title { font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.a-modal__desc, .a-drawer__desc { font-size: 13.5px; color: var(--a-ink-3); line-height: 1.5; }
.a-modal__x, .a-drawer__x { margin: -6px -8px 0 0; }
.a-modal__body, .a-drawer__body { padding: 4px 22px 22px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; }
.a-modal__foot, .a-drawer__foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  padding: 14px 22px; border-top: 1px solid var(--a-line); flex: none;
  background: var(--a-surface-2); border-radius: 0 0 var(--a-r-xl) var(--a-r-xl);
}
.a-modal__foot .a-foot-start, .a-drawer__foot .a-foot-start { margin-right: auto; }
.a-modal__foot:empty, .a-drawer__foot:empty { display: none; }
.a-drawer {
  position: absolute; top: 8px; right: 8px; bottom: 8px; width: min(var(--w, 480px), calc(100vw - 16px));
  display: flex; flex-direction: column; min-height: 0;
  background: var(--a-surface); border-radius: var(--a-r-xl); box-shadow: var(--a-shadow-4);
  animation: a-drawer-in .32s cubic-bezier(.2, .9, .25, 1) both;
}
.a-layer.is-closing .a-drawer { animation: a-drawer-out .2s ease both; }
.a-sheet-handle { display: none; }
@media (max-width: 719.98px) {
  .a-drawer, .a-modal {
    top: auto; left: 0; right: 0; bottom: 0; place-self: end stretch; position: absolute;
    width: 100%; max-height: 92dvh; border-radius: 20px 20px 0 0;
    animation: a-sheet-in .34s cubic-bezier(.2, .9, .25, 1) both;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .a-layer.is-closing .a-drawer, .a-layer.is-closing .a-modal { animation: a-sheet-out .2s ease both; }
  .a-modal__foot, .a-drawer__foot { border-radius: 0; }
  .a-modal__foot .a-btn, .a-drawer__foot .a-btn { flex: 1 1 auto; }
  .a-modal__foot .a-foot-start, .a-drawer__foot .a-foot-start { flex: 0 0 auto; }
  .a-sheet-handle { display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--a-line-3); margin: 8px auto -8px; flex: none; }
  .a-modal__head, .a-drawer__head { padding: 16px 18px 12px; }
  .a-modal__body, .a-drawer__body { padding: 4px 18px 20px; }
  .a-modal__foot, .a-drawer__foot { padding: 12px 18px; }
}
/* confirm */
.a-confirm { display: flex; gap: 14px; align-items: flex-start; }
.a-confirm__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--a-accent-soft); color: var(--a-accent-text); }
.a-confirm__icon--danger { background: var(--a-neg-soft); color: var(--a-neg); }
.a-confirm__icon svg { width: 20px; height: 20px; }
.a-confirm__msg { color: var(--a-ink-2); font-size: 14px; line-height: 1.55; padding-top: 2px; }

/* popover & menu */
.a-pop {
  position: fixed; z-index: 120; min-width: 220px; max-width: min(380px, calc(100vw - 16px));
  background: var(--a-surface); border-radius: var(--a-r-lg); box-shadow: var(--a-shadow-3);
  animation: a-pop-in .16s cubic-bezier(.2, .9, .25, 1) both; transform-origin: var(--origin, top right);
  display: flex; flex-direction: column; max-height: min(560px, calc(100dvh - 80px));
}
.a-pop.is-closing { animation: a-pop-out .12s ease both; }
.a-pop__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; border-bottom: 1px solid var(--a-line); }
.a-pop__title { font-size: 13.5px; font-weight: 600; flex: 1; }
.a-pop__body { padding: 12px 14px; overflow-y: auto; }
.a-menu { padding: 5px; display: grid; gap: 1px; }
.a-menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px;
  border: 0; background: none; border-radius: var(--a-r-sm); cursor: pointer; text-align: left; font-size: 13.5px; color: var(--a-ink);
  text-decoration: none;
}
.a-menu__item svg { width: 16px; height: 16px; color: var(--a-ink-3); flex: none; }
.a-menu__item:hover, .a-menu__item:focus-visible { background: var(--a-hover); outline: none; }
.a-menu__item--danger, .a-menu__item--danger svg { color: var(--a-neg); }
.a-menu__sep { height: 1px; background: var(--a-line); margin: 4px 0; }

/* ============================================================== toasts */
.a-toasts {
  position: fixed; z-index: 200; right: 20px; bottom: 20px; width: min(400px, calc(100vw - 32px));
  display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none;
}
.a-toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 10px 12px 14px;
  background: var(--a-toast-bg); color: var(--a-toast-ink); border-radius: var(--a-r-lg);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  animation: a-toast-in .32s cubic-bezier(.2, .9, .25, 1) both; font-size: 13.5px; line-height: 1.4;
}
.a-toast.is-closing { animation: a-toast-out .2s ease both; }
.a-toast__icon { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; margin-top: 0; }
.a-toast__icon svg { width: 14px; height: 14px; }
.a-toast--success .a-toast__icon { background: #2f9c58; color: #fff; }
.a-toast--error .a-toast__icon { background: #d4513d; color: #fff; }
.a-toast--warning .a-toast__icon { background: #df9d17; color: #1c1b18; }
.a-toast--info .a-toast__icon { background: rgba(255, 255, 255, .14); color: var(--a-toast-ink); }
.a-toast--booking .a-toast__icon { background: var(--a-accent); color: var(--a-accent-ink); width: 32px; height: 32px; border-radius: 10px; }
.a-toast--booking .a-toast__icon svg { width: 17px; height: 17px; }
.a-toast__body { flex: 1; min-width: 0; padding-top: 1px; }
.a-toast__title { font-weight: 600; }
.a-toast__text { color: var(--a-toast-ink-2); font-size: 12.5px; margin-top: 1px; }
.a-toast__action {
  flex: none; align-self: center; height: 28px; padding: 0 10px; border-radius: 7px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: var(--a-toast-ink); font-weight: 600; font-size: 12.5px;
}
.a-toast__action:hover { background: rgba(255, 255, 255, .2); }
.a-toast__x { flex: none; width: 28px; height: 28px; border: 0; background: none; color: var(--a-toast-ink-2); border-radius: 7px; cursor: pointer; display: grid; place-items: center; align-self: center; }
.a-toast__x:hover { background: rgba(255, 255, 255, .1); color: var(--a-toast-ink); }
.a-toast__x svg { width: 14px; height: 14px; }
.a-toast :focus-visible { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 1px; }
@media (max-width: 959.98px) {
  .a-toasts { right: 12px; left: 12px; width: auto; bottom: calc(var(--a-tabbar-h) + 12px + env(safe-area-inset-bottom)); }
}

/* ============================================================== command palette */
.a-cmd-layer { place-items: start center; padding-top: min(14vh, 120px); }
.a-cmd {
  position: relative; width: min(640px, calc(100vw - 32px)); display: flex; flex-direction: column; max-height: min(72dvh, 620px);
  background: var(--a-surface); border-radius: 16px; box-shadow: var(--a-shadow-4); overflow: hidden;
  animation: a-modal-in .22s cubic-bezier(.2, .9, .25, 1) both;
}
.a-layer.is-closing .a-cmd { animation: a-modal-out .14s ease both; }
.a-cmd__bar { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--a-line); flex: none; }
.a-cmd__bar > svg { width: 18px; height: 18px; color: var(--a-ink-3); flex: none; }
.a-cmd__input { flex: 1; min-width: 0; height: 56px; border: 0; background: transparent; font: 400 16px var(--a-font); color: var(--a-ink); outline: none; }
.a-cmd__input::placeholder { color: var(--a-ink-4); }
.a-cmd__list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; flex: 1 1 auto; }
.a-cmd__group { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--a-ink-3); }
.a-cmd__opt {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 10px; border-radius: var(--a-r-md); cursor: pointer;
  scroll-margin: 8px;
}
.a-cmd__opt[aria-selected="true"] { background: var(--a-surface-3); }
.a-cmd__ico { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--a-surface-3); color: var(--a-ink-2); }
.a-cmd__opt[aria-selected="true"] .a-cmd__ico { background: var(--a-surface); box-shadow: var(--a-shadow-1); }
.a-cmd__ico svg { width: 15px; height: 15px; }
.a-cmd__txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.a-cmd__title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-cmd__title mark { background: none; color: var(--a-accent-text); font-weight: 600; }
.a-cmd__sub { font-size: 12.5px; color: var(--a-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-cmd__meta { flex: none; display: flex; align-items: center; gap: 6px; color: var(--a-ink-3); font-size: 12px; }
.a-cmd__enter { opacity: 0; color: var(--a-ink-3); }
.a-cmd__enter svg { width: 14px; height: 14px; }
.a-cmd__opt[aria-selected="true"] .a-cmd__enter { opacity: 1; }
.a-cmd__empty { padding: 36px 16px; text-align: center; color: var(--a-ink-3); font-size: 13.5px; }
.a-cmd__foot { display: flex; gap: 16px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--a-line); font-size: 12px; color: var(--a-ink-3); background: var(--a-surface-2); flex: none; }
.a-cmd__foot span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 719.98px) {
  .a-cmd-layer { padding-top: 0; place-items: stretch; }
  .a-cmd { width: 100%; max-height: none; height: 100dvh; border-radius: 0; }
  .a-cmd__foot { display: none; }
}

/* ============================================================== app shell */
.a-app { display: grid; grid-template-columns: var(--a-sb-w) minmax(0, 1fr); min-height: 100dvh; background: var(--a-bg); }
.a-app[data-sidebar="rail"] { --a-sb-w: var(--a-rail-w); }
.a-skip {
  position: fixed; left: 12px; top: -60px; z-index: 300; padding: 10px 14px; border-radius: var(--a-r);
  background: var(--a-ink); color: var(--a-bg); font-weight: 600; text-decoration: none; transition: top .15s ease;
}
.a-skip:focus { top: 12px; }

/* sidebar */
.a-sidebar {
  position: sticky; top: 0; height: 100dvh; z-index: 40;
  display: flex; flex-direction: column; min-width: 0;
  background: var(--a-canvas); border-right: 1px solid var(--a-line);
  transition: width .24s cubic-bezier(.2, .8, .2, 1);
}
.a-sidebar__head { display: flex; align-items: center; gap: 8px; height: var(--a-topbar-h); padding: 0 12px 0 16px; flex: none; }
.a-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; border-radius: var(--a-r); padding: 4px; margin: -4px; }
.a-brand__mark {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; overflow: hidden;
  background: var(--a-brand, var(--a-accent)); color: var(--a-brand-ink, var(--a-accent-ink));
  font: 600 14px/1 var(--a-font); letter-spacing: -.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(0, 0, 0, .12);
}
.a-brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.a-brand__mark--img { background: var(--a-surface); box-shadow: 0 0 0 1px var(--a-line); padding: 3px; }
.a-brand__logo { height: 28px; width: auto; max-width: 150px; object-fit: contain; }
.a-brand__text { display: grid; min-width: 0; line-height: 1.2; }
.a-brand__name { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-brand__sub { font-size: 11.5px; color: var(--a-ink-3); }
.a-sidebar__collapse { color: var(--a-ink-3); }
.a-sidebar__close { display: none; }
.a-nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 6px 12px 12px; scrollbar-width: thin; }
.a-nav__group + .a-nav__group { margin-top: 18px; }
.a-nav__label { padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--a-ink-3); white-space: nowrap; }
.a-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.a-nav__item {
  position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
  color: var(--a-ink-2); text-decoration: none; font-size: 13.5px; font-weight: 500; border-radius: var(--a-r);
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.a-nav__item:hover { background: var(--a-hover); color: var(--a-ink); }
.a-nav__item[aria-current="page"] { background: var(--a-surface); color: var(--a-ink); box-shadow: var(--a-shadow-1), 0 0 0 1px var(--a-line); }
.a-nav__icon { flex: none; width: 18px; height: 18px; display: grid; place-items: center; color: var(--a-ink-3); transition: color .15s ease; }
.a-nav__icon svg { width: 18px; height: 18px; }
.a-nav__item:hover .a-nav__icon { color: var(--a-ink-2); }
.a-nav__item[aria-current="page"] .a-nav__icon { color: var(--a-accent-text); }
.a-nav__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-nav__badge {
  flex: none; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--a-ink-2); background: var(--a-surface-3);
}
.a-nav__item[aria-current="page"] .a-nav__badge, .a-nav__badge--hot { background: var(--a-accent); color: var(--a-accent-ink); }
.a-nav__ext { width: 14px; height: 14px; color: var(--a-ink-4); flex: none; }
.a-sidebar__foot { flex: none; padding: 10px 12px 14px; border-top: 1px solid var(--a-line); display: grid; gap: 8px; }
.a-sidebar__links { display: grid; gap: 1px; }
.a-sidebar__extras { display: none; gap: 10px; padding: 4px 2px 6px; }
.a-user { display: flex; align-items: center; gap: 10px; padding: 6px 4px 0 6px; min-width: 0; }
.a-user__text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.a-user__name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-user__role { font-size: 11.5px; color: var(--a-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* rail (desktop collapsed) */
@media (min-width: 960px) {
  .a-app[data-sidebar="rail"] .a-sidebar__head { padding: 0; justify-content: center; flex-direction: column; height: auto; padding: 14px 0 8px; gap: 10px; }
  .a-app[data-sidebar="rail"] .a-brand { flex: none; margin: 0; }
  .a-app[data-sidebar="rail"] .a-brand__text,
  .a-app[data-sidebar="rail"] .a-brand__logo,
  .a-app[data-sidebar="rail"] .a-nav__text,
  .a-app[data-sidebar="rail"] .a-nav__ext,
  .a-app[data-sidebar="rail"] .a-user__text { display: none; }
  .a-app[data-sidebar="rail"] .a-brand__mark[data-when="rail"] { display: grid; }
  .a-app[data-sidebar="rail"] .a-nav { padding: 6px 10px; }
  .a-app[data-sidebar="rail"] .a-nav__label { height: 1px; padding: 0; margin: 4px 10px 10px; background: var(--a-line); font-size: 0; }
  .a-app[data-sidebar="rail"] .a-nav__group + .a-nav__group { margin-top: 10px; }
  .a-app[data-sidebar="rail"] .a-nav__item { justify-content: center; padding: 0; width: 44px; height: 40px; margin: 0 auto; }
  .a-app[data-sidebar="rail"] .a-nav__badge { position: absolute; top: 3px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--a-canvas); }
  .a-app[data-sidebar="rail"] .a-sidebar__foot { padding: 10px 8px 14px; justify-items: center; }
  .a-app[data-sidebar="rail"] .a-user { flex-direction: column; padding: 4px 0 0; gap: 8px; }
  .a-app[data-sidebar="rail"] .a-sidebar__collapse svg { transform: scaleX(-1); }
  .a-app[data-sidebar="rail"] [data-tip] { position: relative; }
  .a-app[data-sidebar="rail"] [data-tip]:hover::after, .a-app[data-sidebar="rail"] [data-tip]:focus-visible::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
    padding: 5px 9px; border-radius: 6px; background: var(--a-tooltip-bg); color: var(--a-tooltip-ink);
    font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: none; z-index: 50; box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .25);
  }
}
.a-brand__mark[data-when="rail"] { display: none; }

/* main + topbar */
.a-main { min-width: 0; display: flex; flex-direction: column; }
.a-topbar {
  position: sticky; top: 0; z-index: 30; height: var(--a-topbar-h);
  display: flex; align-items: center; gap: 10px; padding: 0 20px 0 28px;
  background: color-mix(in srgb, var(--a-bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease, background-color .2s ease;
}
.a-topbar.is-scrolled { border-bottom-color: var(--a-line); }
.a-topbar__menu { display: none; margin-left: -8px; }
.a-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; flex: 0 1 auto; }
.a-crumbs__group { color: var(--a-ink-3); white-space: nowrap; }
.a-crumbs__sep { color: var(--a-ink-4); width: 14px; height: 14px; flex: none; }
.a-crumbs__current { font-weight: 600; color: var(--a-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-topbar__spacer { flex: 1; }
.a-search-trigger {
  display: flex; align-items: center; gap: 10px; width: min(360px, 32vw); height: 36px; padding: 0 6px 0 11px;
  background: var(--a-surface); border: 1px solid var(--a-line-2); border-radius: var(--a-r); box-shadow: var(--a-shadow-1);
  color: var(--a-ink-3); font-size: 13.5px; cursor: pointer; text-align: left; transition: border-color .15s ease, box-shadow .15s ease;
}
.a-search-trigger:hover { border-color: var(--a-line-3); box-shadow: var(--a-shadow-2); }
.a-search-trigger svg { width: 16px; height: 16px; flex: none; }
.a-search-trigger__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-search-trigger__keys { display: flex; gap: 3px; }
.a-search-trigger--icon { display: none; }
.a-topbar__actions { display: flex; align-items: center; gap: 4px; }
.a-topbar__actions .a-btn--primary { margin-left: 6px; }
.a-bell__badge {
  position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  display: grid; place-items: center; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: #d4513d; color: #fff; box-shadow: 0 0 0 2px var(--a-bg); pointer-events: none;
}
.a-bell.is-ping svg { animation: a-ring 1s ease; transform-origin: 50% 10%; }
.a-bell.is-ping .a-bell__badge { animation: a-pop 0.5s cubic-bezier(.3, 1.6, .5, 1); }
.a-demo-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 9px; margin-right: 4px;
  border: 1px dashed var(--a-line-3); border-radius: var(--a-r-full); background: transparent;
  font-size: 12px; font-weight: 500; color: var(--a-ink-2); cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.a-demo-chip:hover, .a-demo-chip[aria-expanded="true"] { background: var(--a-surface); border-style: solid; border-color: var(--a-line-2); }
.a-demo-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--s-pending-dot); box-shadow: 0 0 0 3px var(--s-pending-bg); }
.a-content { flex: 1; padding: 24px 32px 56px; min-width: 0; }
.a-content:focus { outline: none; }
.a-view { max-width: 1360px; margin: 0 auto; min-width: 0; }
.a-view.is-entering { animation: a-view-in .28s cubic-bezier(.2, .8, .2, 1) both; }

/* bottom tab bar (mobile) */
.a-tabbar { display: none; }

@media (max-width: 1199.98px) {
  .a-demo-chip span { display: none; }
  .a-demo-chip { padding: 0; width: 30px; justify-content: center; }
}
@media (max-width: 959.98px) {
  :root { --a-topbar-h: 56px; }
  .a-app, .a-app[data-sidebar="rail"] { grid-template-columns: minmax(0, 1fr); --a-sb-w: min(300px, 86vw); }
  .a-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--a-sb-w); z-index: 70; height: 100dvh;
    transform: translateX(-104%); transition: transform .3s cubic-bezier(.2, .9, .25, 1), visibility 0s .3s; visibility: hidden;
    box-shadow: var(--a-shadow-4); border-right: 0; border-radius: 0 18px 18px 0;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
  }
  .a-app.is-nav-open .a-sidebar { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2, .9, .25, 1); }
  .a-sidebar__collapse { display: none; }
  .a-sidebar__close { display: inline-grid; }
  .a-sidebar__extras { display: grid; }
  .a-nav-scrim { position: fixed; inset: 0; z-index: 65; background: var(--a-scrim); animation: a-fade-in .2s ease both; }
  .a-topbar { padding: 0 12px; padding-top: env(safe-area-inset-top); height: calc(var(--a-topbar-h) + env(safe-area-inset-top)); gap: 4px; }
  .a-topbar__menu { display: inline-grid; margin-left: 0; }
  .a-crumbs__group, .a-crumbs__sep { display: none; }
  .a-crumbs { font-size: 16px; padding-left: 2px; }
  .a-search-trigger { display: none; }
  .a-search-trigger--icon { display: inline-grid; }
  .a-demo-chip, .a-theme-btn { display: none; }
  .a-topbar__actions .a-btn--primary { width: 36px; padding: 0; margin-left: 4px; }
  .a-topbar__actions .a-btn--primary .a-btn__label { display: none; }
  .a-content { padding: 16px 16px calc(var(--a-tabbar-h) + 28px + env(safe-area-inset-bottom)); }
  .a-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 0 4px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--a-surface) 90%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--a-line);
  }
  .a-tab {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: var(--a-tabbar-h); min-width: 0; padding: 0 2px; border: 0; background: none; cursor: pointer;
    color: var(--a-ink-3); text-decoration: none; font-size: 10.5px; font-weight: 500; letter-spacing: -.01em;
  }
  .a-tab__ico { position: relative; width: 44px; height: 28px; border-radius: 14px; display: grid; place-items: center; transition: background-color .2s ease, color .2s ease; }
  .a-tab__ico svg { width: 20px; height: 20px; }
  .a-tab__lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .a-tab[aria-current="page"] { color: var(--a-ink); }
  .a-tab[aria-current="page"] .a-tab__ico { background: var(--a-accent-soft); color: var(--a-accent-text); }
  .a-tab__badge {
    position: absolute; top: -3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    display: grid; place-items: center; font-size: 10px; font-weight: 700; background: var(--a-accent); color: var(--a-accent-ink);
    box-shadow: 0 0 0 2px var(--a-surface);
  }
}
@media (pointer: coarse) {
  .a-btn { min-height: 44px; }
  .a-btn--sm { min-height: 36px; }
  .a-iconbtn { width: 44px; height: 44px; }
  .a-iconbtn--sm { width: 36px; height: 36px; }
  .a-input { height: 44px; font-size: 16px; }
  textarea.a-input { font-size: 16px; }
  .a-nav__item { height: 44px; }
  .a-seg__opt span { height: 36px; }
  .a-menu__item { min-height: 44px; }
  .a-check { min-height: 44px; }
}

/* sidebar extras (mobile drawer) */
.a-extras__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.a-extras__label { font-size: 12.5px; color: var(--a-ink-3); font-weight: 500; }

/* ============================================================== notifications + demo popovers */
.a-notif { width: min(380px, calc(100vw - 16px)); }
.a-notif__list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; display: grid; gap: 1px; }
.a-notif__item {
  display: flex; gap: 11px; align-items: flex-start; width: 100%; padding: 9px 10px; border: 0; background: none; text-align: left;
  border-radius: var(--a-r-md); cursor: pointer; position: relative; color: var(--a-ink);
}
.a-notif__item:hover, .a-notif__item:focus-visible { background: var(--a-hover); }
.a-notif__ico { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--a-surface-3); color: var(--a-ink-2); }
.a-notif__ico svg { width: 15px; height: 15px; }
.a-notif__ico--booking { background: var(--a-accent-soft); color: var(--a-accent-text); }
.a-notif__ico--inquiry { background: var(--a-info-soft); color: var(--a-info); }
.a-notif__ico--cancel { background: var(--a-neg-soft); color: var(--a-neg); }
.a-notif__ico--status { background: var(--s-completed-bg); color: var(--s-completed-fg); }
.a-notif__txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.a-notif__msg { font-size: 13px; line-height: 1.4; }
.a-notif__msg b { font-weight: 600; }
.a-notif__time { font-size: 11.5px; color: var(--a-ink-3); }
.a-notif__item.is-unread::after { content: ''; position: absolute; right: 10px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--a-accent); }
.a-notif__item.is-unread .a-notif__msg { padding-right: 14px; }
.a-demo-pop { width: min(340px, calc(100vw - 16px)); }
.a-demo-pop__body { display: grid; gap: 12px; padding: 16px; }
.a-demo-pop__head { display: flex; gap: 10px; align-items: center; }
.a-demo-pop__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--s-pending-bg); color: var(--s-pending-fg); flex: none; }
.a-demo-pop__ico svg { width: 17px; height: 17px; }
.a-demo-pop p { color: var(--a-ink-2); font-size: 13px; line-height: 1.55; }
.a-demo-pop ul { margin: 0; padding: 0 0 0 16px; color: var(--a-ink-2); font-size: 12.5px; display: grid; gap: 3px; }

/* ============================================================== login */
.a-login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--a-surface); }
.a-login__brand {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 40px 48px; background: var(--a-brand, var(--a-accent)); color: var(--a-brand-ink, var(--a-accent-ink));
}
.a-login__pattern { position: absolute; inset: 0; z-index: -1; opacity: 1; pointer-events: none; }
.a-login__pattern svg { width: 100%; height: 100%; }
.a-login__brand::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 0% 100%, rgba(0, 0, 0, .22), transparent 60%), radial-gradient(90% 60% at 100% 0%, rgba(255, 255, 255, .10), transparent 60%);
}
.a-login__top { display: flex; align-items: center; gap: 12px; }
.a-login__mark {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; overflow: hidden;
  background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); font-weight: 600; font-size: 16px;
}
.a-login__mark img { width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }
.a-login__clinic { font-weight: 600; font-size: 15px; letter-spacing: -.01em; line-height: 1.25; }
.a-login__clinic small { display: block; font-weight: 400; opacity: .72; font-size: 12.5px; }
.a-login__statement { max-width: 520px; }
.a-login__statement h1 { font: 400 clamp(36px, 4.4vw, 60px)/1.02 var(--a-font-display); letter-spacing: -.01em; }
.a-login__statement h1 em { font-style: italic; opacity: .82; }
.a-login__statement p { margin-top: 18px; font-size: 15px; line-height: 1.6; opacity: .78; max-width: 420px; }
.a-login__meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; opacity: .78; }
.a-login__meta span { display: inline-flex; align-items: center; gap: 7px; }
.a-login__meta svg { width: 15px; height: 15px; }
.a-login__panel { display: grid; place-items: center; padding: 48px 24px; background: var(--a-bg); }
.a-login__form { width: min(400px, 100%); display: grid; gap: 22px; }
.a-login__form h2 { font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
.a-login__form .a-sub { color: var(--a-ink-3); margin-top: 6px; font-size: 14px; }
.a-login__fields { display: grid; gap: 16px; }
.a-login__fields .a-input { height: 44px; }
.a-pw { position: relative; }
.a-pw .a-input { padding-right: 48px; }
.a-pw__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.a-login__error {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--a-r-md);
  background: var(--a-neg-soft); color: var(--a-neg); font-size: 13px; font-weight: 500;
}
.a-login__error svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.a-login__form.is-shake { animation: a-shake .42s cubic-bezier(.36, .07, .19, .97) both; }
.a-democard {
  display: grid; gap: 12px; padding: 14px 16px; border-radius: var(--a-r-lg);
  border: 1px dashed var(--a-line-3); background: var(--a-surface);
}
.a-democard__head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.a-democard__head svg { width: 16px; height: 16px; color: var(--a-accent-text); }
.a-democard dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; }
.a-democard dt { color: var(--a-ink-3); }
.a-democard dd { margin: 0; font-family: var(--a-font-mono); font-size: 12.5px; overflow-wrap: anywhere; }
.a-democard p { font-size: 12px; color: var(--a-ink-3); line-height: 1.5; }
.a-login__foot { font-size: 12px; color: var(--a-ink-3); text-align: center; }
@media (max-width: 859.98px) {
  .a-login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .a-login__brand { padding: calc(20px + env(safe-area-inset-top)) 20px 26px; gap: 22px; }
  .a-login__statement h1 { font-size: 34px; }
  .a-login__statement p { margin-top: 10px; font-size: 14px; }
  .a-login__meta { display: none; }
  .a-login__panel { padding: 28px 16px calc(32px + env(safe-area-inset-bottom)); place-items: start center; }
  .a-login__fields .a-input { font-size: 16px; }
}

/* ============================================================== appointment drawer */
.a-apt-head { display: grid; gap: 6px; }
.a-apt-head__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.a-apt-ref {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 4px 0 7px; border-radius: 6px;
  font: 500 12px/1 var(--a-font-mono); color: var(--a-ink-2); background: var(--a-surface-3); border: 0; cursor: pointer;
}
.a-apt-ref svg { width: 12px; height: 12px; opacity: .6; }
.a-apt-ref:hover { color: var(--a-ink); }
.a-apt-head__name { font-size: 20px; font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }
.a-apt-head__when { font-size: 13.5px; color: var(--a-ink-2); }
.a-apt { display: grid; gap: 22px; }
.a-apt-section { display: grid; gap: 10px; }
.a-apt-section__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.a-pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.a-pipeline__step { display: grid; gap: 7px; font-size: 11.5px; color: var(--a-ink-3); font-weight: 500; min-width: 0; }
.a-pipeline__bar { height: 4px; border-radius: 2px; background: var(--a-surface-3); overflow: hidden; }
.a-pipeline__step.is-done .a-pipeline__bar { background: var(--a-accent); }
.a-pipeline__step.is-current .a-pipeline__bar { background: linear-gradient(90deg, var(--a-accent) 0 60%, color-mix(in srgb, var(--a-accent) 35%, var(--a-surface-3)) 60%); }
.a-pipeline__step.is-done, .a-pipeline__step.is-current { color: var(--a-ink); }
.a-pipeline__step span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-apt-banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--a-r-md); font-size: 13px;
  background: var(--s-cancelled-bg); color: var(--s-cancelled-fg);
}
.a-apt-banner svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.a-apt-banner--no-show { background: var(--s-no-show-bg); color: var(--s-no-show-fg); }
.a-apt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.a-apt-patient { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--a-line); border-radius: var(--a-r-lg); background: var(--a-surface-2); }
.a-apt-patient__main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.a-apt-patient__name { font-size: 14.5px; font-weight: 600; }
.a-apt-patient__lines { display: grid; gap: 3px; font-size: 13px; color: var(--a-ink-2); }
.a-apt-patient__lines a { text-decoration: none; }
.a-apt-patient__lines a:hover { text-decoration: underline; }
.a-apt-patient__line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.a-apt-patient__line svg { width: 14px; height: 14px; color: var(--a-ink-3); flex: none; }
.a-apt-patient__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.a-dl { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 1fr); gap: 0; margin: 0; font-size: 13.5px; border: 1px solid var(--a-line); border-radius: var(--a-r-lg); overflow: hidden; }
.a-dl dt, .a-dl dd { padding: 9px 12px; border-bottom: 1px solid var(--a-line); margin: 0; min-width: 0; }
.a-dl dt { color: var(--a-ink-3); background: var(--a-surface-2); font-size: 12.5px; display: flex; align-items: center; }
.a-dl dd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.a-dl dt:nth-last-of-type(1), .a-dl dd:nth-last-of-type(1) { border-bottom: 0; }
.a-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c, var(--a-ink-4)); }
.a-resched { display: grid; gap: 14px; padding: 14px; border: 1px solid var(--a-accent-line); border-radius: var(--a-r-lg); background: var(--a-accent-wash); }
.a-resched__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 479.98px) { .a-resched__row { grid-template-columns: 1fr; } }
.a-slots { display: grid; gap: 12px; }
.a-slots__group { display: grid; gap: 6px; }
.a-slots__label { font-size: 11.5px; font-weight: 600; color: var(--a-ink-3); letter-spacing: .04em; text-transform: uppercase; }
.a-slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.a-slot { position: relative; }
.a-slot input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.a-slot span {
  display: grid; place-items: center; height: 34px; border-radius: var(--a-r); border: 1px solid var(--a-line-2); background: var(--a-surface);
  font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; transition: all .12s ease;
}
.a-slot:hover span { border-color: var(--a-accent-line); color: var(--a-accent-text); }
.a-slot input:checked + span { background: var(--a-accent); border-color: var(--a-accent); color: var(--a-accent-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.a-slot input:focus-visible + span { outline: 2px solid var(--a-ring); outline-offset: 2px; }
.a-slot--past span { color: var(--a-ink-3); background: var(--a-surface-2); border-style: dashed; }
.a-slots__empty { padding: 16px; text-align: center; font-size: 13px; color: var(--a-ink-3); border: 1px dashed var(--a-line-2); border-radius: var(--a-r); background: var(--a-surface); }
.a-inline-error { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--a-neg); font-weight: 500; padding: 8px 10px; background: var(--a-neg-soft); border-radius: var(--a-r); }
.a-inline-error svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.a-notes-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 30px; }
.a-saved { font-size: 12.5px; color: var(--a-pos); display: inline-flex; gap: 5px; align-items: center; font-weight: 500; }
.a-saved svg { width: 14px; height: 14px; }
.a-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.a-timeline li { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; }
.a-timeline li:last-child { padding-bottom: 0; }
.a-timeline li::before { content: ''; position: absolute; left: 9.5px; top: 18px; bottom: 0; width: 1px; background: var(--a-line-2); }
.a-timeline li:last-child::before { display: none; }
.a-timeline__dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--a-surface-3); color: var(--a-ink-3); }
.a-timeline__dot svg { width: 11px; height: 11px; }
.a-timeline__txt { font-size: 13px; line-height: 1.4; padding-top: 1px; }
.a-timeline__txt small { display: block; color: var(--a-ink-3); font-size: 12px; margin-top: 2px; }

/* ============================================================== new appointment modal */
.a-na { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 24px; align-items: start; }
.a-na__main { display: grid; gap: 22px; min-width: 0; }
.a-na__section { display: grid; gap: 12px; }
.a-na__step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.a-na__step i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--a-surface-3); color: var(--a-ink-2); font-variant-numeric: tabular-nums; }
.a-na__summary { position: sticky; top: 0; display: grid; gap: 12px; padding: 16px; border-radius: var(--a-r-lg); background: var(--a-surface-2); border: 1px solid var(--a-line); }
.a-na__summary dl { margin: 0; display: grid; gap: 10px; }
.a-na__summary dt { font-size: 11.5px; color: var(--a-ink-3); font-weight: 500; }
.a-na__summary dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.a-na__summary dd.is-empty { color: var(--a-ink-4); font-weight: 400; }
.a-na__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.a-na__quickdates { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 719.98px) {
  .a-na { grid-template-columns: minmax(0, 1fr); }
  .a-na__summary { position: static; order: 2; }
}
@media (max-width: 479.98px) { .a-na__row { grid-template-columns: 1fr; } }
.a-typeahead { position: relative; }
.a-typeahead__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; list-style: none; margin: 0; padding: 5px;
  background: var(--a-surface); border-radius: var(--a-r-md); box-shadow: var(--a-shadow-3); max-height: 280px; overflow-y: auto;
}
.a-typeahead__opt { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--a-r-sm); cursor: pointer; }
.a-typeahead__opt[aria-selected="true"] { background: var(--a-surface-3); }
.a-typeahead__txt { flex: 1; min-width: 0; display: grid; }
.a-typeahead__txt b { font-weight: 500; font-size: 13.5px; }
.a-typeahead__txt span { font-size: 12px; color: var(--a-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-typeahead__new { color: var(--a-accent-text); font-weight: 500; font-size: 13.5px; }
.a-picked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--a-accent-line); background: var(--a-accent-wash); border-radius: var(--a-r-md); }
.a-picked__txt { flex: 1; min-width: 0; display: grid; }
.a-picked__txt b { font-weight: 600; font-size: 14px; }
.a-picked__txt span { font-size: 12.5px; color: var(--a-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================== overview */
.a-ov { display: grid; gap: 16px; }
.a-ov-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 8px; }
.a-ov-hello__text { display: grid; gap: 6px; min-width: 0; max-width: 760px; }
.a-ov-hello__title { font: 400 38px/1.05 var(--a-font-display); letter-spacing: -.01em; color: var(--a-ink); }
.a-ov-hello__title em { font-style: italic; color: var(--a-ink-2); }
.a-ov-hello__sum { font-size: 14.5px; color: var(--a-ink-2); line-height: 1.55; }
.a-ov-hello__sum b { color: var(--a-ink); font-weight: 600; }
.a-ov-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.a-ov-grid > [class*="a-ov-col-"] > .a-card:only-child, .a-ov-trio > .a-card { height: 100%; }
.a-ov-side > .a-card:last-child { flex: 1 1 auto; }
.a-ov-side { display: flex !important; flex-direction: column; }
.a-ov-col-8 { grid-column: span 8; }
.a-ov-col-4 { grid-column: span 4; }
.a-ov-col-6 { grid-column: span 6; }
.a-ov-col-12 { grid-column: 1 / -1; }
.a-ov-side { gap: 16px; }
.a-ov-stretch { align-self: stretch; }
.a-ov-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.a-ov-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; grid-column: 1 / -1; }
@media (max-width: 1399.98px) { .a-ov-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1099.98px) {
  .a-ov-col-8, .a-ov-col-4, .a-ov-col-6 { grid-column: 1 / -1; }
  .a-ov-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719.98px) {
  .a-ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .a-ov-kpis .a-kpi { padding: 14px 13px 12px; }
  .a-ov-kpis .a-kpi__value { font-size: 24px; }
  .a-ov-hello__title { font-size: 31px; }
  .a-ov-grid { gap: 12px; }
  .a-ov-trio { grid-template-columns: minmax(0, 1fr); }
  .a-ov-mobile-first { order: -1; }
}
.a-ov-figure { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.a-ov-figure strong { font-size: 24px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.a-ov-figure span { font-size: 12.5px; color: var(--a-ink-3); }
/* schedule timeline */
.a-sched { list-style: none; margin: 0; padding: 4px 8px 8px; display: grid; }
.a-sched__item { display: grid; grid-template-columns: 64px 18px minmax(0, 1fr); gap: 0 10px; align-items: stretch; position: relative; }
.a-sched__time { display: grid; align-content: start; justify-items: end; padding-top: 13px; font-variant-numeric: tabular-nums; }
.a-sched__clock { font: 500 13px/1.2 var(--a-font-mono); color: var(--a-ink); letter-spacing: -.02em; white-space: nowrap; }
.a-sched__dur { font-size: 11.5px; color: var(--a-ink-3); margin-top: 2px; }
.a-sched__rail { position: relative; display: grid; justify-items: center; }
.a-sched__rail::before { content: ''; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--a-line); }
.a-sched__item:first-child .a-sched__rail::before { top: 18px; }
.a-sched__item:last-child .a-sched__rail::before { bottom: calc(100% - 18px); }
.a-sched__dot { position: relative; margin-top: 15px; width: 11px; height: 11px; border-radius: 50%; background: var(--a-surface); box-shadow: inset 0 0 0 2.5px var(--c, var(--a-ink-4)); }
.a-sched__item.is-done .a-sched__dot { background: var(--c); }
.a-sched__card {
  display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 9px 10px 9px 12px; min-width: 0;
  border-radius: var(--a-r-md); transition: background-color .15s ease;
}
.a-sched__card:hover { background: var(--a-surface-2); }
.a-sched__open { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; border-radius: var(--a-r-sm); }
.a-sched__name { font-size: 14px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-sched__meta { font-size: 12.5px; color: var(--a-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-sched__side { display: flex; align-items: center; gap: 8px; flex: none; }
.a-sched__item.is-done .a-sched__name, .a-sched__item.is-done .a-sched__clock { color: var(--a-ink-3); }
.a-sched__item.is-live .a-sched__card { background: var(--s-checked-in-bg); }
.a-sched__now { display: grid; grid-template-columns: 64px 18px minmax(0, 1fr); gap: 0 10px; align-items: center; height: 18px; }
.a-sched__now span { font: 600 11px/1 var(--a-font-mono); color: #d4513d; text-align: right; letter-spacing: -.02em; }
.a-sched__now i { justify-self: center; width: 9px; height: 9px; border-radius: 50%; background: #d4513d; box-shadow: 0 0 0 3px color-mix(in srgb, #d4513d 22%, transparent); }
.a-sched__now b { height: 1.5px; background: linear-gradient(90deg, #d4513d, color-mix(in srgb, #d4513d 0%, transparent)); border-radius: 1px; }
@media (max-width: 559.98px) {
  .a-sched__clock .a-muted { display: block; font-size: 10.5px; margin-top: 1px; }
  .a-sched__clock { text-align: right; }
  .a-sched { padding: 2px 4px 6px; }
  .a-sched__item, .a-sched__now { grid-template-columns: 50px 14px minmax(0, 1fr); gap: 0 8px; }
  .a-sched__card { flex-wrap: wrap; gap: 8px; padding: 9px 8px; }
  .a-sched__open { flex-basis: 100%; }
  .a-sched__side { width: 100%; justify-content: space-between; }
}
/* pending list */
.a-plist { list-style: none; margin: 0; padding: 0 8px 6px; display: grid; }
.a-plist__item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--a-r-md); min-width: 0; }
.a-plist__item + .a-plist__item { box-shadow: 0 -1px 0 var(--a-line); }
.a-plist__item:hover { background: var(--a-surface-2); }
.a-plist__open { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; border-radius: var(--a-r-sm); }
.a-plist__name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-plist__meta { font-size: 12px; color: var(--a-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-plist__acts { display: flex; gap: 4px; flex: none; }
/* activity feed */
.a-feed { list-style: none; margin: 0; padding: 2px 8px 8px; display: grid; }
.a-feed__item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--a-r-md); width: 100%; border: 0; background: none; text-align: left; cursor: pointer; color: var(--a-ink); }
.a-feed__item:hover { background: var(--a-surface-2); }
.a-feed__item[disabled] { cursor: default; }
.a-feed__item[disabled]:hover { background: none; }
.a-feed__ico { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--a-surface-3); color: var(--a-ink-2); }
.a-feed__ico svg { width: 13px; height: 13px; }
.a-feed__txt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; padding-top: 3px; }
.a-feed__time { flex: none; font-size: 11.5px; color: var(--a-ink-3); padding-top: 4px; font-variant-numeric: tabular-nums; }

/* coming soon placeholder */
.a-soon { display: grid; place-items: center; min-height: 360px; background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-r-lg); position: relative; overflow: hidden; }
.a-soon::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--a-line-2) 1px, transparent 0); background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 0%, transparent 75%);
  opacity: .7;
}
.a-soon > * { position: relative; }
.a-soon__list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* error boundary */
.a-view-error { max-width: 560px; margin: 40px auto; }
.a-view-error pre { font: 12px/1.5 var(--a-font-mono); background: var(--a-surface-2); border: 1px solid var(--a-line); border-radius: var(--a-r); padding: 10px 12px; white-space: pre-wrap; text-align: left; color: var(--a-ink-2); max-height: 160px; overflow: auto; }

/* ============================================================== motion */
@keyframes a-spin { to { transform: rotate(360deg); } }
@keyframes a-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes a-fade-in { from { opacity: 0; } }
@keyframes a-fade-out { to { opacity: 0; } }
@keyframes a-modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes a-modal-out { to { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes a-drawer-in { from { opacity: .4; transform: translateX(calc(100% + 16px)); } }
@keyframes a-drawer-out { to { opacity: .4; transform: translateX(calc(100% + 16px)); } }
@keyframes a-sheet-in { from { transform: translateY(100%); } }
@keyframes a-sheet-out { to { transform: translateY(100%); } }
@keyframes a-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes a-pop-out { to { opacity: 0; transform: translateY(-2px) scale(.99); } }
@keyframes a-toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes a-toast-out { to { opacity: 0; transform: translateX(16px); } }
@keyframes a-view-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes a-grow-x { from { transform: scaleX(0); } }
@keyframes a-pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot) 45%, transparent); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot) 0%, transparent); } }
@keyframes a-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }
@keyframes a-pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
@keyframes a-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
@keyframes a-flash { from { background-color: var(--a-accent-wash); } }
.a-flash { animation: a-flash 1.6s ease-out; }

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .a-status, .a-chip, .a-btn, .a-card, .a-kpi { border: 1px solid CanvasText; }
  .a-nav__item[aria-current="page"] { outline: 2px solid Highlight; }
}
@media print {
  .a-sidebar, .a-topbar, .a-tabbar, .a-toasts { display: none !important; }
  .a-app { display: block; }
}

/* ============================================================== additions */
.a-cmd__ico--av, .a-cmd__opt[aria-selected="true"] .a-cmd__ico--av { background: none; box-shadow: none; }
button.a-chip { cursor: pointer; height: 28px; font-family: inherit; font-size: 12.5px; transition: border-color .15s ease, background-color .15s ease; }
button.a-chip:hover { border-color: var(--a-line-3); }
button.a-chip:focus-visible { outline: 2px solid var(--a-ring); outline-offset: 2px; border-radius: var(--a-r-full); }
.a-modal .a-table th, .a-drawer .a-table th { top: 0; }
.a-table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--a-r-lg); }
.a-table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--a-r-lg); }
.a-pop--menu { min-width: 200px; }
.a-notif-pop .a-pop__head { padding: 10px 10px 10px 14px; }
.a-notif-pop .a-notif__list { max-height: min(460px, calc(100dvh - 160px)); }
.a-typeahead__opt .a-avatar svg { width: 14px; height: 14px; }
.a-apt-drawer .a-drawer__head { padding-bottom: 16px; border-bottom: 1px solid var(--a-line); margin-bottom: 18px; }
.a-dl dd .a-muted { margin-left: 2px; }
.a-dl dd svg { width: 14px; height: 14px; color: var(--a-ink-3); }
.a-view-error details { margin-top: 12px; }
@media (max-width: 959.98px) {
  .a-notif-pop, .a-demo-pop { left: 8px !important; right: 8px; width: auto; max-width: none; }
}

:where(.admin) mark { background: none; color: var(--a-accent-text); font-weight: 600; }
@media (min-width: 720px) {
  html.a-has-drawer .a-toasts { right: calc(var(--a-drawer-w, 480px) + 28px); }
}
.a-na__section > .a-row { min-height: 30px; }
.a-na .a-switch { padding: 2px 0; }
@media (max-width: 719.98px) { .a-cmd__enter { display: none; } }
