:root {
  --bg-page: #f7f8fa;
  --bg-card: #ffffff;
  --bg-sidebar: #f7f8fa;
  --bg-header: #ffffff;
  --bg-hover: #f0f2f5;
  --bg-active: #e8ebef;
  --bg-input: #ffffff;
  --bg-table-header: #f7f8fa;

  --text-primary: #1a1a1a;
  --text-secondary: #5e6577;
  --text-muted: #8792a2;
  --text-inverse: #ffffff;

  --border: #e3e8ee;
  --border-subtle: #eef0f3;

  --accent: #635bff;
  --accent-hover: #5046e5;
  --accent-subtle: rgba(99, 91, 255, 0.08);
  --accent-text: #635bff;

  --success: #0d9e6e;
  --success-subtle: rgba(13, 158, 110, 0.08);
  --warning: #d97706;
  --warning-subtle: rgba(217, 119, 6, 0.08);
  --danger: #dc2626;
  --danger-subtle: rgba(220, 38, 38, 0.06);
  --info: #2563eb;
  --info-subtle: rgba(37, 99, 235, 0.08);

  --sidebar-width: 240px;
  --header-height: 52px;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 10px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;

  /* Tokens ~30 console pages reference but that were only ever defined
     in the till/admissions apps — here they resolved to NOTHING and
     silently fell back to transparent/inherit. Aliased to the console
     palette so those pages render as intended. */
  --bg-base: var(--bg-page);
  --bg-elevated: var(--bg-hover);
  --bg-surface: var(--bg-card);
  --bg-panel: var(--bg-card);
  --text-dim: var(--text-muted);
  --accent-dim: var(--accent-subtle);
  --danger-dim: var(--danger-subtle);

  /* Spacing + type scale (v2 foundation). Pages migrate onto these
     instead of raw pixel literals. */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --text-xs: 11px; --text-sm: 12px; --text-base: 13px; --text-md: 14px;
  --text-lg: 16px; --text-xl: 20px; --text-2xl: 24px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: white;
}

/* ===== LAYOUT ===== */
.app-wrapper {
  display: none;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.app-wrapper.active {
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.app-header {
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 100;
}

.app-header .logo {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.app-header .tenant-name {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.app-header .header-spacer { flex: 1; }

.app-header .user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 120ms;
}

.app-header .user-menu:hover {
  background: var(--bg-hover);
}

.app-header .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.app-header .user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar { width: 0; }

.sidebar-nav {
  padding: 12px 8px;
  flex: 1;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms;
  user-select: none;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-subtle);
  color: var(--accent);
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}

.nav-item:hover svg,
.nav-item.active svg {
  opacity: 1;
}

/* ===== NAV FLYOUT ===== */
.nav-flyout-parent {
  position: relative;
}

/* Sidebar search / venue card / user card + topbar breadcrumb & alerts
   are v2 furniture — classic hides them. Also the filter class
   the menu search toggles. */
.sidebar-search, .sidebar-user, .sidebar-venue, .sidebar-brand,
.topbar-breadcrumb, .topbar-alerts { display: none; }
.nav-filter-hide { display: none !important; }

/* Venue switcher dropdown rows (shared classic + v2) */
.venue-dd-label { font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 8px 10px 4px; }
.venue-dd-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text-primary); }
.venue-dd-item:hover { background: var(--bg-hover); }
.venue-dd-item.current { cursor: default; background: var(--bg-active); }
.venue-dd-tile { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.venue-dd-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.venue-dd-check { color: var(--accent); flex: none; }
#venue-dropdown { padding: 6px; }

.nav-flyout-trigger {
  cursor: pointer;
}

.nav-flyout-parent.active > .nav-flyout-trigger,
.nav-flyout-parent:has(.nav-item.active) > .nav-flyout-trigger {
  background: var(--accent-subtle);
  color: var(--accent);
}

.nav-flyout-parent:has(.nav-item.active) > .nav-flyout-trigger svg {
  opacity: 1;
}

.nav-flyout {
  display: none;
  position: fixed;
  min-width: 160px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  padding: 6px;
  z-index: 1000;
}

.nav-flyout-parent.open > .nav-flyout {
  display: block;
}

/* Mobile: render the flyout inline under its trigger rather than floating.
   Avoids the stacking-context + portal mess that caused the submenu to
   render behind page content or overlap adjacent menu rows. */
@media (max-width: 768px) {
  .nav-flyout-parent .nav-flyout {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 0 4px 20px !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-height: none !important;
    left: auto !important;
    top: auto !important;
  }
  .nav-flyout-parent.open > .nav-flyout {
    display: block !important;
  }
}

.nav-flyout-item {
  display: block;
  padding: 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.nav-flyout-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-flyout-item.active {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* Nested collapsible section inside a flyout (e.g. Admin → Designers) */
.nav-flyout-section { display: flex; flex-direction: column; }
.nav-flyout-section-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 7px 14px;
  font-size: 13px;
  font-family: inherit;
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-align: left;
}
.nav-flyout-section-trigger:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-flyout-section-chevron { transition: transform 150ms ease; flex-shrink: 0; opacity: 0.6; }
.nav-flyout-section.open .nav-flyout-section-chevron { transform: rotate(90deg); }
.nav-flyout-section-body {
  display: none;
  padding-left: 12px;
  margin: 2px 0 4px;
  border-left: 2px solid var(--border);
  margin-left: 14px;
}
.nav-flyout-section.open .nav-flyout-section-body { display: flex; flex-direction: column; gap: 1px; }

/* ===== CONTENT ===== */
.content-area {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-page);
}

.content-area::-webkit-scrollbar { width: 6px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 16px;
  gap: 16px;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 1px;
}

.page-actions {
  display: flex;
  gap: 8px;
}

.page-content {
  padding: 0 32px 32px;
}

/* Nav badge — small red pill showing unread count, sits inline with nav text */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 8px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.nav-badge.alert {
  background: #f59e0b;
}
.nav-badge.alert::before {
  content: '!';
}

/* ===== LOGIN ===== */
/* boot-authed (set pre-paint by boot-theme.js when a token exists)
   hides the login instantly on refresh — no sign-in flash for signed-in
   users. Auth.showLogin()'s inline display:flex overrides this when a
   token turns out stale. */
html.boot-authed .login-wrapper { display: none; }
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--bg-page);
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.login-logo {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.login-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-error {
  display: none;
  background: var(--danger-subtle);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.login-error.visible { display: block; }

/* ===== LOGIN v2 — split layout =====
   Left: clean form column on the card surface. Right: warm showcase
   panel with a CSS product preview and a quote. The showcase hides on
   narrow screens; the form column then centres alone. Slate CTA is a
   deliberate fixed identity colour (not the venue accent). */
.login-shell {
  display: grid;
  grid-template-columns: minmax(400px, 46%) 1fr;
  width: 100%;
  height: 100vh;
  background: var(--bg-card);
}
.login-left {
  display: flex;
  flex-direction: column;
  padding: 28px 48px 22px;
  overflow-y: auto;
}
.login-brand { flex: none; }
.login-left .login-card {
  max-width: 396px;
  width: 100%;
  margin: auto;
  padding: 32px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.login-heading {
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-align: center;
}
.login-left .login-subtitle {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 6px 0 30px;
}
.login-left .form-label { font-size: 13px; font-weight: 600; }
.login-left .form-input {
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 14px;
}
.login-left .form-input:focus {
  border-color: #22304a;
  outline: 3px solid rgba(32, 43, 59, 0.1);
}
.login-left .btn-primary,
.login-left #login-biometric {
  border-radius: 999px !important;
  padding: 12px 16px !important;
  font-size: 14px;
  font-weight: 650;
}
.login-left .btn-primary {
  background: linear-gradient(180deg, #2a3850, #1d2939) !important;
  border: 1px solid #1d2939 !important;
  color: #fff !important;
}
.login-left .btn-primary:hover { background: #2c3a52 !important; }
.login-left #login-biometric {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  display: flex;
}
.login-foot {
  flex: none;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 16px;
}
.login-foot a { color: var(--text-primary); font-weight: 600; text-decoration: none; }

/* Showcase panel */
.login-showcase {
  margin: 14px;
  border-radius: 20px;
  background: #efedea;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: 48px 56px;
  overflow: hidden;
  min-width: 0;
}
.lp-window {
  background: #ffffff;
  border: 1px solid #e6e4df;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(25, 30, 40, 0.10);
  padding: 18px 22px 22px;
  max-width: 560px;
  width: 100%;
  align-self: center;
}
.lp-dots { display: flex; gap: 6px; margin-bottom: 16px; }
.lp-dots span { width: 9px; height: 9px; border-radius: 999px; background: #e4e2dc; }
.lp-greet { font-size: 19px; font-weight: 750; letter-spacing: -0.01em; color: #191b20; }
.lp-sub { font-size: 12.5px; color: #8d919d; margin: 2px 0 16px; }
.lp-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.lp-kpi { border: 1px solid #ecebe6; border-radius: 12px; padding: 12px 14px; }
.lp-kpi-label { font-size: 11px; color: #8d919d; font-weight: 600; }
.lp-kpi-value { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: #191b20; margin: 2px 0; font-variant-numeric: tabular-nums; }
.lp-kpi-delta { font-size: 11px; color: #8d919d; }
.lp-kpi-delta.up { color: #16a34a; }
.lp-chart { display: flex; align-items: flex-end; gap: 8px; height: 84px; margin-bottom: 16px; }
.lp-chart div { flex: 1; border-radius: 6px 6px 3px 3px; background: #eceae5; }
.lp-chart div.on { background: linear-gradient(180deg, #2a3850, #1d2939); }
.lp-rows { border-top: 1px solid #efede9; }
.lp-row { display: flex; justify-content: space-between; font-size: 12px; color: #565a64; padding: 9px 2px; border-bottom: 1px solid #f3f1ed; font-variant-numeric: tabular-nums; }
.lp-row span:last-child { font-weight: 700; color: #191b20; }
.lp-quote { max-width: 560px; align-self: center; }
.lp-quote p { font-size: 21px; line-height: 1.45; color: #6b7078; font-weight: 500; margin: 0 0 18px; letter-spacing: -0.01em; }
.lp-quote strong { color: #23262c; font-weight: 700; }
.lp-attrib { display: flex; align-items: center; gap: 12px; }
.lp-avatar { width: 40px; height: 40px; border-radius: 999px; background: linear-gradient(180deg, #2a3850, #1d2939); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.lp-name { font-size: 14px; font-weight: 700; color: #191b20; }
.lp-role { font-size: 12px; color: #8d919d; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-showcase { display: none; }
  .login-left { padding: 24px 22px 18px; }
}
/* Dark appearance (v2 dark) — form column follows tokens; the showcase
   keeps its own committed light-on-warm look, which reads as a framed
   product shot against the dark form column. */
html.v2.dark .login-shell { background: var(--bg-page); }
html.v2.dark .login-showcase { background: #1d1f25; }
html.v2.dark .lp-quote p { color: #9aa0ab; }
html.v2.dark .lp-quote strong { color: #e8eaed; }
html.v2.dark .lp-name { color: #e8eaed; }

/* ===== LOCK SCREEN =====
   OS-style: the app behind is UNMOUNTED (real lock), so the overlay is
   a full frosted surface with a large clock and a compact identity
   card. Tokens keep it correct in dark mode. */
.lock-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-page);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 24px;
}

.lock-overlay.active { display: flex; animation: lock-fade 0.25s ease-out; }
@keyframes lock-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lock-overlay.active { animation: none; } }

.lock-clock-wrap { text-align: center; user-select: none; }
.lock-clock {
  font-size: 76px;
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.lock-date {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

.lock-card {
  width: 100%;
  max-width: 360px;
  padding: 26px 26px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: lock-rise 0.3s ease-out;
}
@keyframes lock-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .lock-card { animation: none; } }

.lock-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover, var(--accent)));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: -60px auto 14px;
  border: 4px solid var(--bg-card);
  box-shadow: var(--shadow-md);
}

.lock-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
}

.lock-message {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.lock-unlock-btn { width: 100%; justify-content: center; padding: 11px 16px; }

.lock-pin {
  text-align: center;
  font-size: 24px;
  letter-spacing: 14px;
  padding: 10px 0 10px 14px; /* left pad offsets the trailing letter-spacing */
  font-variant-numeric: tabular-nums;
}

.lock-mode-toggle {
  display: block;
  margin: 12px auto 0;
  padding: 4px 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lock-mode-toggle:hover { color: var(--text-primary); }

.lock-bio-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.lock-bio-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -240px;
    top: var(--header-height);
    bottom: 0;
    z-index: 200;
    transition: left 200ms ease;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open { left: 0; }

  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--header-height);
    background: rgba(0,0,0,0.2);
    z-index: 199;
  }

  .mobile-overlay.active { display: block; }
  .menu-toggle { display: flex !important; }
  /* Header title + actions wrap on narrow screens instead of pushing
     the buttons off the right edge (zoom is locked, so there was no
     way to reach them). Actions grow full-width so they stay tappable. */
  .page-header { padding: 16px; flex-wrap: wrap; }
  .page-actions { flex-wrap: wrap; }
  /* Extra bottom padding for iOS so the last item isn't hidden behind
     the home indicator / Safari URL bar. max() keeps the base 16px on
     non-notched devices and adds the inset on devices that expose one. */
  .page-content { padding: 0 16px max(16px, env(safe-area-inset-bottom)); }
  .content-area { padding-bottom: env(safe-area-inset-bottom); }
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.menu-toggle:hover {
  background: var(--bg-hover);
}

/* ============ Command palette (Cmd/Ctrl+K) ============ */
#command-palette { display: none; }
#command-palette.open { display: block; }
#command-palette .cp-backdrop {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(15, 18, 25, 0.35);
}
#command-palette .cp-panel {
  position: fixed; z-index: 901;
  top: 16vh; left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg), 0 24px 64px rgba(0,0,0,0.18);
  overflow: hidden;
  display: flex; flex-direction: column;
}
#command-palette .cp-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
#command-palette #cp-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; color: var(--text-primary);
}
#command-palette #cp-input::placeholder { color: var(--text-muted); }
#command-palette .cp-esc {
  font-size: 10.5px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 5px;
  padding: 2px 6px;
}
#command-palette .cp-list {
  max-height: min(48vh, 420px); overflow-y: auto;
  padding: 6px;
}
#command-palette .cp-group {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 8px 10px 3px;
}
#command-palette .cp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  cursor: pointer; color: var(--text-secondary);
}
#command-palette .cp-row svg { flex: 0 0 auto; opacity: 0.7; }
#command-palette .cp-row.active {
  background: var(--bg-active);
  color: var(--text-primary);
}
#command-palette .cp-name {
  font-size: 13.5px; font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#command-palette .cp-sub {
  margin-left: auto; padding-left: 12px;
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 45%;
}
#command-palette .cp-empty {
  padding: 28px 0; text-align: center;
  font-size: 13px; color: var(--text-muted);
}
#command-palette .cp-foot {
  display: flex; gap: 16px;
  padding: 8px 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px; color: var(--text-muted);
}
#command-palette .cp-foot kbd {
  font-family: inherit; font-size: 10px;
  border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 4px; margin-right: 3px;
  background: var(--bg-page);
}
.sidebar-search-kbd {
  font-size: 10px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 5px; flex: 0 0 auto;
}
.sidebar-search { cursor: pointer; }
.sidebar-search #nav-search { cursor: pointer; }
