:root {
  --bg: #f1f5f9;
  --bg-elevated: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --panel: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --sidebar: #0b1220;
  --sidebar-ink: #e2e8f0;
  --sidebar-muted: #94a3b8;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(225, 29, 72, 0.16);
  --accent: #c73e54;
  --accent-hover: #b33448;
  --accent-ink: #ffffff;
  --accent-soft: rgba(199, 62, 84, 0.1);
  --focus: #2563eb;
  --success: #0f766e;
  --danger: #b91c1c;
  --warn: #b45309;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sidebar-w: 220px;
  --header-h: 56px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --z-nav: 30;
  --z-dialog: 40;
  --z-toast: 50;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.error {
  color: var(--danger);
  min-height: 1.2em;
  font-size: 0.9rem;
}
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.9em;
}

/* ——— Login ——— */
.login-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  background: var(--bg);
}
.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  color: #f8fafc;
  background:
    radial-gradient(ellipse 70% 55% at 20% 10%, rgba(199, 62, 84, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(37, 99, 235, 0.2), transparent 50%),
    linear-gradient(165deg, #0b1220 0%, #162033 55%, #1a2438 100%);
  overflow: hidden;
}
.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}
.login-visual-inner {
  position: relative;
  max-width: 28rem;
}
.login-visual .eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fda4af;
}
.login-visual h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}
.login-visual p {
  margin: 0;
  color: #cbd5e1;
  font-size: 1rem;
  max-width: 36ch;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 32px 24px;
}
.login-card {
  width: min(400px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.login-brand {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.login-card h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.login-card > .muted { margin: 0 0 4px; }
.login-card form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

/* ——— Forms & controls ——— */
label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
/* Checkbox / radio rows: keep control + text on one line */
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}
input, select, textarea, button {
  font: inherit;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--ink);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
  border-color: #94a3b8;
}
input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 3px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
textarea { min-height: 90px; resize: vertical; }
.svc-picker {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #fff;
  display: grid;
  gap: 2px;
  margin-top: 8px;
}
.svc-picker label,
.svc-picker .svc-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 6px;
  font-weight: 400;
  margin: 0;
}
.svc-picker label:hover,
.svc-picker .svc-row:hover {
  background: #f8fafc;
}
.svc-picker .svc-row[hidden] {
  display: none;
}

.nb-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}
.nb-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nb-search-label {
  margin: 0;
  font-weight: 400;
}
.nb-search-label input {
  margin: 0;
}
.nb-hint {
  margin: 0;
  font-size: 0.84rem;
}

.typeahead {
  position: relative;
}
.typeahead-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 12;
  display: grid;
  gap: 2px;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.typeahead-menu.hidden {
  display: none;
}
.typeahead-item {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent !important;
  color: var(--ink) !important;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.typeahead-item:hover,
.typeahead-item:focus-visible {
  background: #eff6ff !important;
  color: var(--ink) !important;
  outline: none;
}
.typeahead-item .muted {
  color: var(--muted) !important;
}
.typeahead-item.typeahead-new {
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  margin-top: 2px;
  padding-top: 10px;
}
.typeahead-empty {
  padding: 8px 10px;
  font-size: 0.86rem;
  color: var(--muted);
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease),
    border-color 160ms var(--ease),
    transform 120ms var(--ease),
    opacity 160ms var(--ease);
}
button:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}
button:active { transform: scale(0.98); }
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
button.ghost:hover,
button.ghost:focus-visible {
  background: #f8fafc;
  border-color: #94a3b8;
  color: var(--ink);
}
button.danger { background: var(--danger); color: #fff; }
button.danger:hover,
button.danger:focus-visible {
  background: #991b1b;
  color: #fff;
}
button.small {
  padding: 6px 10px;
  font-size: 0.82rem;
  min-height: 32px;
}
button.text {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 6px 8px;
}
button.text:hover,
button.text:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/*
 * Surface buttons (cards, rows, menus, segments): never inherit the primary
 * red fill — that makes dark labels unreadable on hover.
 */
button.bk-barber,
button.ws-slot,
button.typeahead-item,
button.as-btn,
.seg button,
.bk-grid-head button.cell {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
button.bk-barber:hover,
button.bk-barber:focus-visible,
button.ws-slot:hover,
button.ws-slot:focus-visible,
button.typeahead-item:hover,
button.typeahead-item:focus-visible,
button.as-btn:hover,
button.as-btn:focus-visible,
.seg button:hover,
.seg button:focus-visible,
.bk-grid-head button.cell:hover,
.bk-grid-head button.cell:focus-visible {
  background: #f8fafc;
  color: var(--ink);
}
button.bk-barber:active,
button.ws-slot:active,
button.typeahead-item:active,
button.as-btn:active,
.seg button:active,
.bk-grid-head button.cell:active {
  transform: none;
  color: var(--ink);
}

/* ——— App shell ——— */
.console {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
}
.nav-backdrop {
  display: none;
}
/* Nav drawer only — do not style content <aside> panels (e.g. bookings rail). */
#sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 14px 10px;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: var(--z-nav);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.brand {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 4px 10px;
  align-items: center;
  padding: 2px 6px 4px;
  flex-shrink: 0;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
}
.brand strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand small {
  grid-column: 2;
  color: var(--sidebar-muted);
  font-size: 0.7rem;
}
.tenant-switcher {
  flex-shrink: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tenant-switcher-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}
.tenant-switcher strong {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tenant-switcher .muted {
  margin: 0;
  font-size: 0.8rem;
  color: var(--sidebar-muted);
}
.tenant-switcher .ghost {
  width: 100%;
  margin-top: 2px;
  padding: 6px 10px;
  font-size: 0.8rem;
}
nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  align-content: start;
}
nav:empty {
  display: none;
}
nav button {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  text-align: left;
  background: transparent;
  color: var(--sidebar-muted);
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.84rem;
  line-height: 1.2;
  padding: 7px 10px;
  border-left: none;
  justify-content: flex-start;
}
nav button:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
nav button.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}
.aside-foot {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
#user-chip {
  font-size: 0.8rem;
  color: var(--sidebar-muted);
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#sidebar .ghost {
  color: var(--sidebar-ink);
  border-color: rgba(255, 255, 255, 0.14);
}
#sidebar .ghost:hover {
  background: var(--sidebar-hover);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.main-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.menu-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.menu-btn:hover { background: #f8fafc; }
.topbar-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  padding: 18px 22px 32px;
  max-width: none;
  width: 100%;
}
main > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
/* Bookings / dense ops views: reclaim header chrome */
body.page-compact main > header {
  display: none;
}
body.page-compact main {
  padding-top: 12px;
}
main > header h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-wrap: balance;
}
main > header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
body.platform-picker main > header .badge {
  display: none;
}
.badge {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ——— Surfaces ——— */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.panel.flat {
  box-shadow: none;
}
.panel.error {
  border-color: rgba(185, 28, 28, 0.35);
  background: #fef2f2;
  color: var(--danger);
}
.grid {
  display: grid;
  gap: 12px;
  align-items: start;
}
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.chip .muted { font-weight: 500; }

.stat {
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.stat .muted {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

/* ——— Tables ——— */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 560px;
}
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
  position: sticky;
  top: 0;
}
tbody tr {
  transition: background-color 120ms var(--ease);
}
tbody tr:hover { background: #f8fafc; }
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.toolbar,
.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
}
.page-toolbar .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.seg button {
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  border: none;
  padding: 8px 14px;
  font-weight: 500;
  min-height: 36px;
}
.seg button:hover,
.seg button:focus-visible {
  background: #f8fafc;
  color: var(--ink);
}
.seg button.active,
.seg button.active:hover,
.seg button.active:focus-visible {
  background: var(--ink);
  color: #fff;
}
.seg button:active { transform: none; }

.form-grid { display: grid; gap: 12px; }
.form-grid.two {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.flow-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 840px) {
  .flow-form-grid { grid-template-columns: 1fr; }
}
.flow-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.flow-step {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.flow-step-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}
.flow-step-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.flow-step-body strong { font-size: 0.92rem; }
.flow-step-body .muted { font-size: 0.8rem; }
.flow-step-actions {
  display: flex;
  gap: 4px;
}
.flow-step-actions button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.flow-fieldset {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 10px;
}
.flow-fieldset legend {
  padding: 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.flow-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin: 0;
  cursor: pointer;
}
.flow-choice input { margin-top: 3px; }
.flow-choice span {
  display: grid;
  gap: 2px;
}
.flow-choice .muted { font-size: 0.85rem; }
.hours-grid { display: grid; gap: 8px; }
.hours-row {
  display: grid;
  grid-template-columns: 70px 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pill.warn {
  background: rgba(185, 28, 28, 0.1);
  color: var(--danger);
}
.pill.ok {
  background: rgba(15, 118, 110, 0.12);
  color: var(--success);
}
.pill.neutral {
  background: #f1f5f9;
  color: var(--muted);
}
.pill.checkin {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.kv { display: grid; gap: 0; }
.kv-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.kv-row span { color: var(--muted); font-weight: 500; }
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ——— Empty / loading ——— */
.empty-state {
  display: grid;
  gap: 8px;
  place-items: start;
  padding: 28px 8px;
  text-align: left;
}
.empty-state strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.empty-state p {
  margin: 0;
  color: var(--muted);
  max-width: 42ch;
}
.loading-block {
  display: grid;
  gap: 10px;
  padding: 8px 0;
}
.skeleton {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
.skeleton.lg { height: 48px; }
.skeleton.md { height: 22px; width: 40%; }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ——— Dialog ——— */
.dialog-root {
  position: fixed;
  inset: 0;
  z-index: var(--z-dialog);
  display: grid;
  place-items: center;
  padding: 20px;
}
.dialog-root.hidden { display: none !important; }
.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
}
.dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(90dvh, 820px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px 22px;
}
.dialog.wide { width: min(720px, 100%); }
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.dialog-head h2 {
  margin: 0;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.dialog-body .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.dialog-body .error { margin-top: 8px; }

/* ——— Toast ——— */
.toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: var(--z-toast);
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--ink);
  color: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: toast-in 220ms var(--ease);
}
.toast.error { background: #7f1d1d; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ——— Responsive ——— */
@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual {
    min-height: 220px;
    padding: 28px 24px;
  }
  .login-visual h2 { font-size: 1.6rem; }

  .console { grid-template-columns: 1fr; }
  .topbar { display: flex; }
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 220ms var(--ease);
    box-shadow: var(--shadow);
  }
  .console.nav-open #sidebar { transform: translateX(0); }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms var(--ease);
    z-index: calc(var(--z-nav) - 1);
  }
  .console.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  main { padding: 18px 16px 48px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .form-grid.two { grid-template-columns: 1fr; }
  .hours-row { grid-template-columns: 1fr; }
  .kv-row { grid-template-columns: 1fr; gap: 2px; }
  main > header h1 { font-size: 1.35rem; }
}

@media (min-width: 961px) {
  .console.nav-open #sidebar { transform: none; }
}

/* ——— Bookings day board ——— */
.bk-page {
  display: grid;
  gap: 12px;
}
.bk-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.bk-kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.bk-kpi .label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.bk-kpi .value {
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.bk-kpi .meta {
  font-size: 0.78rem;
  color: var(--muted);
}
.bk-kpi .meta.up { color: var(--success); font-weight: 600; }

.bk-barbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.bk-barber {
  background: var(--panel) !important;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  color: var(--ink) !important;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease), transform 140ms var(--ease), background-color 140ms var(--ease);
}
.bk-barber:hover,
.bk-barber:focus-visible {
  background: #f8fafc !important;
  border-color: #cbd5e1;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  outline: none;
  color: var(--ink) !important;
}
.bk-barber:hover .bk-barber-name,
.bk-barber:focus-visible .bk-barber-name {
  color: var(--ink);
}
.bk-barber:hover .bk-barber-stats,
.bk-barber:focus-visible .bk-barber-stats {
  color: var(--muted);
}
.bk-barber:hover .bk-barber-stats strong,
.bk-barber:focus-visible .bk-barber-stats strong {
  color: var(--ink);
}
.bk-barber:hover .pill.ok,
.bk-barber:focus-visible .pill.ok {
  background: rgba(15, 118, 110, 0.12);
  color: var(--success);
}
.bk-barber-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bk-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.bk-barber-name {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
}
.bk-barber-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}
.bk-barber-stats strong {
  color: var(--ink);
  font-weight: 650;
}
.bk-util {
  height: 6px;
  border-radius: 99px;
  background: #eef2f7;
  overflow: hidden;
}
.bk-util > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 280ms var(--ease);
}

.bk-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
}
.bk-main {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}
.bk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.bk-toolbar .left,
.bk-toolbar .right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.bk-toolbar .right {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}
.bk-date-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bk-date-nav .date-label {
  font-weight: 650;
  font-size: 0.92rem;
  min-width: 9.5rem;
  text-align: center;
  letter-spacing: -0.02em;
}
.bk-search {
  flex: 0 1 200px;
  min-width: 140px;
  max-width: 220px;
}
.bk-search input,
.bk-toolbar select {
  margin: 0;
  height: 36px;
  font-size: 0.88rem;
  width: auto;
  min-width: 0;
}
.bk-search input {
  width: 100%;
}
.bk-toolbar select {
  flex: 0 0 auto;
  width: auto;
  min-width: 132px;
  max-width: 180px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.bk-grid-wrap {
  overflow: auto;
  max-height: min(70dvh, 820px);
}
.bk-grid {
  --bk-hour-h: 72px;
  --bk-label-w: 64px;
  display: grid;
  min-width: max-content;
  position: relative;
}
.bk-grid-head {
  display: grid;
  grid-template-columns: var(--bk-label-w) repeat(var(--bk-cols, 1), minmax(160px, 1fr));
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.bk-grid-head .cell {
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-right: 1px solid var(--line);
}
.bk-grid-head .cell:last-child { border-right: none; }
.bk-grid-body {
  display: grid;
  grid-template-columns: var(--bk-label-w) repeat(var(--bk-cols, 1), minmax(160px, 1fr));
  position: relative;
}
.bk-time-col {
  position: relative;
  border-right: 1px solid var(--line);
  background: #fbfdff;
}
.bk-time-label {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-family: var(--mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bk-col {
  position: relative;
  overflow: visible;
  border-right: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--bk-hour-h) - 1px),
      var(--line) calc(var(--bk-hour-h) - 1px),
      var(--line) var(--bk-hour-h)
    );
}
.bk-col:last-child { border-right: none; }
.bk-now {
  position: absolute;
  left: var(--bk-label-w);
  right: 0;
  height: 0;
  border-top: 2px solid #ef4444;
  z-index: 2;
  pointer-events: none;
}
.bk-now::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

.bk-card {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 10px;
  padding: 0;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: visible;
  cursor: default;
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease);
  z-index: 1;
}
.bk-card-hit {
  display: grid;
  gap: 3px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 6px 8px;
  border: none !important;
  border-radius: inherit;
  background: transparent !important;
  color: inherit !important;
  text-align: left;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
  overflow: hidden;
  box-shadow: none !important;
}
.bk-card-hit:hover,
.bk-card-hit:focus-visible {
  background: rgba(255, 255, 255, 0.28) !important;
  color: inherit !important;
  outline: none;
  transform: none;
}
.bk-card:hover,
.bk-card.is-open {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  z-index: 8;
}
.bk-card.is-open {
  z-index: 10;
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 1px;
}
.bk-card .t-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.bk-card .t {
  font-size: 0.66rem;
  font-weight: 650;
  font-family: var(--mono);
  opacity: 0.9;
  white-space: nowrap;
}
.bk-card .n-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.bk-card .n {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-card .s {
  font-size: 0.72rem;
  opacity: 0.88;
  font-weight: 500;
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-card .s::before {
  content: "·";
  margin-right: 6px;
  opacity: 0.55;
}
.bk-card .icos {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  margin-left: auto;
}
.bk-ico {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
  color: inherit;
  opacity: 0.9;
}
.bk-card .badge {
  display: inline-block;
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}
.bk-card .badge.ok {
  background: rgba(22, 163, 74, 0.18);
  color: #166534;
}
.bk-card .badge.checkin {
  background: rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
}
.bk-card .badge.warn {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}
.bk-card .badge.neutral {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}
/* Actions open on click (is-open), not hover — keeps card text readable */
.bk-card .acts {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 9;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.bk-card.is-open .acts {
  display: flex;
}
.bk-card .acts button {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 650;
  padding: 6px 8px;
  height: auto;
  color: var(--ink) !important;
  background: #fff !important;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}
.bk-card .acts button.ghost:hover,
.bk-card .acts button.ghost:focus-visible {
  background: #f8fafc !important;
  color: var(--ink) !important;
}
.bk-card .acts button.danger,
.bk-card .acts button.danger:hover,
.bk-card .acts button.danger:focus-visible {
  color: #fff !important;
  background: var(--danger) !important;
  border-color: var(--danger);
}
.bk-card .acts button.danger:hover,
.bk-card .acts button.danger:focus-visible {
  background: #991b1b !important;
}
.bk-card.tone-0 { background: #ede9fe; border-color: #ddd6fe; color: #4c1d95; }
.bk-card.tone-1 { background: #dbeafe; border-color: #bfdbfe; color: #1e3a8a; }
.bk-card.tone-2 { background: #fce7f3; border-color: #fbcfe8; color: #9d174d; }
.bk-card.tone-3 { background: #ccfbf1; border-color: #99f6e4; color: #115e59; }
.bk-card.tone-4 { background: #ffedd5; border-color: #fed7aa; color: #9a3412; }
.bk-card.checked_in {
  box-shadow: inset 3px 0 0 #2563eb;
}
.bk-card.cancelled {
  background: #f1f5f9;
  border-color: var(--line);
  color: var(--muted);
  opacity: 0.85;
  border-style: dashed;
}
.bk-card.unassigned {
  background: #fff7ed;
  border-color: #ffedd5;
  color: #9a3412;
}

.bk-rail {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 8px;
  color: var(--ink);
  background: transparent;
}
.bk-rail-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  color: var(--ink);
}
.bk-rail-card h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.bk-arrive {
  display: grid;
  gap: 10px;
}
.bk-arrive-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.bk-arrive-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.bk-arrive-row .who {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.bk-arrive-row .sub {
  font-size: 0.75rem;
  color: var(--muted);
}
.bk-empty-soft {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}
.bk-grid-head .cell.as-btn {
  appearance: none;
  background: transparent !important;
  border: none;
  border-right: 1px solid var(--line);
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--ink) !important;
}
.bk-grid-head .cell.as-btn:hover,
.bk-grid-head .cell.as-btn:focus-visible {
  background: #eef2ff !important;
  color: var(--ink) !important;
  outline: none;
}
.bk-avatar.lg {
  width: 52px;
  height: 52px;
  font-size: 0.95rem;
}

/* ——— Worker schedule (selected barber) ——— */
.ws-page {
  display: grid;
  gap: 16px;
}
.ws-top {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
}
.ws-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.ws-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.ws-hero h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}
.ws-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.ws-hero-meta .chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}
.ws-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr) 260px;
  gap: 14px;
  align-items: start;
}
.ws-timeline-panel,
.ws-detail-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  overflow: hidden;
}
.ws-timeline {
  display: grid;
  gap: 8px;
  padding: 12px;
  max-height: min(70dvh, 820px);
  overflow: auto;
}
.ws-slot {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff !important;
  font: inherit;
  font-weight: 400;
  color: var(--ink) !important;
  cursor: pointer;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease), background 140ms var(--ease);
}
.ws-slot:hover,
.ws-slot:focus-visible {
  background: #f8fafc !important;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
  outline: none;
  color: var(--ink) !important;
}
.ws-slot.is-selected,
.ws-slot.is-selected:hover,
.ws-slot.is-selected:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff !important;
  box-shadow: 0 0 0 1px #93c5fd inset;
  color: var(--ink) !important;
}
.ws-slot.is-checkin {
  box-shadow: inset 3px 0 0 #2563eb;
}
.ws-slot.is-cancelled,
.ws-slot.is-cancelled:hover {
  opacity: 0.72;
  border-style: dashed;
  background: #f8fafc !important;
}
.ws-slot.open {
  background: #fafafa !important;
  border-style: dashed;
  color: var(--muted) !important;
}
.ws-slot.open:hover,
.ws-slot.open:focus-visible {
  background: #f0fdf4 !important;
  border-color: #86efac;
  color: var(--ink) !important;
}
.ws-slot-time {
  display: grid;
  gap: 2px;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.ws-slot-time strong {
  font-size: 0.86rem;
  color: var(--ink);
}
.ws-slot-name {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
}
.ws-slot-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.ws-plus {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ecfdf5;
  color: #047857;
  font-weight: 700;
}
.ws-detail {
  padding: 18px;
  display: grid;
  gap: 16px;
}
.ws-detail.empty {
  min-height: 220px;
  place-items: center;
  text-align: center;
}
.ws-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.ws-detail-head .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ws-detail-head h3 {
  margin: 4px 0 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.ws-person {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ws-person .who {
  font-weight: 700;
  font-size: 1.02rem;
}
.ws-person .sub {
  color: var(--muted);
  font-size: 0.86rem;
}
.ws-section-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.ws-services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.ws-services li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}
.ws-total {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.ws-notes {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.ws-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ws-actions .danger {
  grid-column: 1 / -1;
}
.ws-rail {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 12px;
  color: var(--ink);
  background: transparent;
}
.ws-perf {
  display: grid;
  gap: 12px;
}
.ws-perf > div {
  display: grid;
  gap: 6px;
}
.ws-perf span {
  font-size: 0.78rem;
  color: var(--muted);
}
.ws-perf strong {
  font-size: 0.95rem;
}
.bk-arrive-row.as-btn {
  appearance: none;
  background: transparent !important;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  color: var(--ink) !important;
  border-radius: 10px;
  padding: 8px;
  margin: 0 -8px;
}
.bk-arrive-row.as-btn:hover,
.bk-arrive-row.as-btn:focus-visible {
  background: #f8fafc !important;
  color: var(--ink) !important;
  outline: none;
}
.bk-arrive-row.as-btn.is-selected,
.bk-arrive-row.as-btn.is-selected:hover {
  background: #eff6ff !important;
  color: var(--ink) !important;
}
.bk-arrive-row.as-btn .who {
  color: var(--ink);
}
.bk-arrive-row.as-btn .sub {
  color: var(--muted);
}

@media (max-width: 1200px) {
  .ws-body { grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr); }
  .ws-rail { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; position: static; }
}
@media (max-width: 1100px) {
  .bk-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bk-board { grid-template-columns: 1fr; }
  .bk-rail { position: static; }
}
@media (max-width: 860px) {
  .ws-body { grid-template-columns: 1fr; }
  .ws-rail { grid-template-columns: 1fr; }
  .ws-actions { grid-template-columns: 1fr; }
  .ws-actions .danger { grid-column: auto; }
}
@media (max-width: 720px) {
  .bk-kpis { grid-template-columns: 1fr 1fr; }
}
