/* ============================================================
 * ops-console prototype — styles
 * Source of truth: admin-portal/src/index.css (hybrid palette)
 * Design tokens are transcribed 1:1 from body.app-ops + :root.
 * No build step, no Tailwind — plain CSS using custom properties.
 * ============================================================ */

/* ── Design tokens (HSL triples) ─────────────────────────── */
:root {
  /* Brand — slate/teal (ops) */
  --brand-900: 222 47% 11%;
  --brand-800: 217 33% 17%;
  --brand-700: 193 72% 21%; /* primary teal */
  --brand-600: 191 73% 25%;
  --brand-500: 192 68% 33%;
  --brand-100: 191 50% 89%;
  --brand-50:  191 47% 95%;

  /* Accent — amber (CTA / page-title stripe) */
  --accent-700: 28 86% 31%;
  --accent-500: 38 92% 50%;
  --accent-100: 48 96% 89%;
  --accent-fg:  24 75% 12%;

  /* Ink (olive-tinted neutrals — preserved 200..900 in ops, 50/100 overridden slate) */
  --ink-900: 191 32% 17%;
  --ink-800: 191 26% 20%;
  --ink-700: 91 21% 32%;
  --ink-600: 96 17% 38%;
  --ink-500: 102 16% 59%;
  --ink-400: 95 13% 67%;
  --ink-300: 92 18% 78%;
  --ink-200: 41 31% 86%;
  --ink-100: 214 32% 91%;  /* slate-cool in ops */
  --ink-50:  210 40% 96%;  /* slate-cool in ops */
  --paper:   0 0% 100%;

  /* Status */
  --amber-700: 28 86% 31%;
  --amber-100: 48 96% 89%;
  --red-700:   0 73% 50%;
  --red-100:   0 93% 94%;
  --blue-700:  226 71% 40%;
  --blue-100:  214 95% 93%;
  --green-700: 142 71% 36%;
  --green-100: 142 76% 89%;

  /* Semantic shadcn-like aliases (matching ops body re-declaration) */
  --background: var(--ink-50);
  --foreground: var(--ink-900);
  --card: var(--paper);
  --card-foreground: var(--ink-900);
  --primary: var(--brand-700);
  --primary-foreground: var(--paper);
  --primary-hover: var(--brand-800);
  --secondary: var(--ink-100);
  --secondary-foreground: var(--ink-900);
  --muted: var(--ink-100);
  --muted-foreground: var(--ink-500);
  --border: var(--ink-200);
  --input: var(--ink-200);
  --ring: var(--brand-700);
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --warning: 38 92% 50%;
  --warning-foreground: 0 0% 100%;

  /* Sidebar */
  --sidebar-background: var(--paper);
  --sidebar-foreground: var(--ink-700);
  --sidebar-primary: var(--brand-700);
  --sidebar-primary-foreground: var(--paper);
  --sidebar-accent: var(--brand-100);
  --sidebar-accent-foreground: var(--brand-700);
  --sidebar-border: var(--ink-200);

  /* Ops banner gradient */
  --ops-banner-from: 222 47% 11%;
  --ops-banner-via:  193 72% 21%;
  --ops-banner-to:   192 73% 26%;
  --ops-banner-fg:   210 40% 98%;
  --ops-banner-meta: 215 20% 65%;
  --ops-banner-mark-bg: 38 92% 50%;
  --ops-banner-mark-fg: 45 96% 56%;

  /* Radius scale */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow:    0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Sidebar width tokens (mirror OpsSidebar collapsed prop) */
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 64px;
}

/* ── Reset + base ────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid hsl(var(--border));
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.app-ops input::placeholder,
body.app-ops textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  color: hsl(var(--foreground));
  letter-spacing: -0.01em;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: 'tnum';
}

/* Scrollbar — thin, matches shadcn scrollbar-thin */
.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--border)) transparent;
}
.scrollbar-thin::-webkit-scrollbar { width: 4px; height: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb {
  background-color: hsl(var(--border));
  border-radius: 9999px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--muted-foreground));
}

/* ── Shell layout ────────────────────────────────────────── */
.shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.shell-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.shell-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.main {
  flex: 1;
  overflow-y: auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  z-index: 100;
  padding: 0.875rem 1.25rem;
  margin: 1rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: var(--r-md);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.15s;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ── Ops Banner ──────────────────────────────────────────── */
.ops-banner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: hsl(var(--ops-banner-fg));
  border-bottom: 1px solid rgb(0 0 0 / 0.4);
  background: linear-gradient(
    to right,
    hsl(var(--ops-banner-from)),
    hsl(var(--ops-banner-via)),
    hsl(var(--ops-banner-to))
  );
  flex-shrink: 0;
}

.ops-banner__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--ops-banner-mark-fg));
  background: hsl(var(--ops-banner-mark-bg) / 0.2);
  border: 1px solid hsl(var(--ops-banner-mark-bg) / 0.4);
}
.ops-banner__mark-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: hsl(var(--ops-banner-mark-fg));
  box-shadow: 0 0 6px hsl(var(--ops-banner-mark-fg));
}

.ops-banner__user {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 500;
  color: hsl(var(--ops-banner-fg) / 0.9);
}
.ops-banner__user-name { font-weight: 500; }
.ops-banner__user-tag {
  padding: 0.125rem 0.375rem;
  border-radius: 0.1875rem;
  font-size: 0.6875rem;
  font-weight: 500;
  background: rgb(255 255 255 / 0.1);
  color: hsl(var(--ops-banner-meta));
}

.ops-banner__spacer { flex: 1; }

.ops-banner__meta {
  display: none;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6875rem;
  color: hsl(var(--ops-banner-meta));
}
@media (min-width: 768px) {
  .ops-banner__meta { display: flex; }
}
.ops-banner__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.ops-banner__meta-item svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  display: none;
  flex-direction: column;
  background: hsl(var(--sidebar-background));
  border-right: 1px solid hsl(var(--sidebar-border));
  height: 100%;
  overflow: hidden;
  transition: width 0.15s;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .sidebar { display: flex; }
}

.sidebar.is-collapsed { width: var(--sidebar-w-collapsed); }
.sidebar:not(.is-collapsed) { width: var(--sidebar-w); }

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border-bottom: 1px solid hsl(var(--sidebar-border));
  flex-shrink: 0;
  padding: 0.875rem 1rem;
}
.sidebar.is-collapsed .sidebar__brand {
  padding: 0.875rem 0.5rem;
  justify-content: center;
}
.sidebar__logo {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, hsl(var(--brand-700)), hsl(var(--brand-500)));
  display: grid;
  place-items: center;
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
}
.sidebar__brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sidebar__brand-name {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: hsl(var(--sidebar-foreground));
}
.sidebar__brand-sub {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
}
.sidebar__brand-sub .accent {
  margin-left: 0.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: hsl(var(--accent-500));
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.625rem;
}
.sidebar.is-collapsed .sidebar__nav { padding: 0.75rem 0.375rem; }

.sidebar__section { margin-bottom: 1rem; }
.sidebar__section-title {
  padding: 0.375rem 0.625rem 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--primary));
}
.sidebar.is-collapsed .sidebar__section-title { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
  text-align: left;
  color: hsl(var(--sidebar-foreground));
  background: transparent;
  border: 0;
}
.nav-item:hover {
  background: hsl(var(--sidebar-accent) / 0.6);
  color: hsl(var(--sidebar-accent-foreground));
}
.nav-item.is-active {
  background: hsl(var(--sidebar-accent));
  color: hsl(var(--sidebar-accent-foreground));
  font-weight: 600;
}
.nav-item.is-disabled {
  color: hsl(var(--muted-foreground) / 0.7);
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.nav-item:not(.is-collapsed-row) { gap: 0.625rem; padding: 0.5rem 0.625rem; }
.nav-item.is-collapsed-row { justify-content: center; padding: 0.5rem 0.5rem; }

.nav-item__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: hsl(var(--muted-foreground));
}
.nav-item.is-active .nav-item__icon,
.nav-item:hover .nav-item__icon {
  color: hsl(var(--sidebar-accent-foreground));
}

.nav-item__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-item__badge {
  margin-left: auto;
  padding: 0.0625rem 0.375rem;
  border-radius: 9999px;
  background: hsl(var(--accent-500));
  color: hsl(var(--accent-fg));
  font-size: 0.625rem;
  font-weight: 700;
}
.nav-item__pill-v2 {
  margin-left: auto;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
  background: hsl(var(--ink-100));
  color: hsl(var(--ink-600));
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0.625rem 0.625rem;
  padding: 0.625rem;
  border: 1px solid hsl(var(--sidebar-border));
  border-radius: 0.5rem;
  background: hsl(var(--sidebar-accent) / 0.3);
  flex-shrink: 0;
}
.sidebar.is-collapsed .sidebar__user {
  margin: 0.375rem;
  padding: 0.375rem;
  justify-content: center;
}
.sidebar__user-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  display: grid;
  place-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-hover)));
  flex-shrink: 0;
}
.sidebar__user-info {
  flex: 1;
  min-width: 0;
}
.sidebar__user-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--sidebar-foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar__user-org {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar__user-tag {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: hsl(var(--sidebar-accent));
  color: hsl(var(--sidebar-accent-foreground));
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 3.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem;
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  flex-shrink: 0;
}

.topbar__btn-icon {
  display: none;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  margin-left: -0.5rem;
  border-radius: var(--r-md);
  color: hsl(var(--muted-foreground));
  background: transparent;
  border: 0;
  transition: color 0.15s, background 0.15s;
}
.topbar__btn-icon:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}
@media (min-width: 768px) {
  .topbar__btn-icon { display: inline-flex; }
}

.topbar__crumb {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.topbar__crumb-sep { margin: 0 0.375rem; color: hsl(var(--ink-300)); }
.topbar__crumb-current {
  color: hsl(var(--foreground));
  font-weight: 600;
}
.topbar__crumb a:hover { color: hsl(var(--foreground)); }

.topbar__spacer { flex: 1; }

.topbar__btn-outline-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground));
}
.topbar__btn-outline-icon:hover { color: hsl(var(--foreground)); }

.topbar__notif {
  position: relative;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: hsl(var(--muted-foreground));
  background: transparent;
  border: 0;
}
.topbar__notif:hover { color: hsl(var(--foreground)); background: hsl(var(--muted)); }
.topbar__notif-dot {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 9999px;
  background: hsl(var(--accent-500));
  box-shadow: 0 0 0 2px hsl(var(--card));
}

.topbar__user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.625rem 0.25rem 0.25rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  background: transparent;
  border: 0;
  transition: background 0.15s;
}
.topbar__user-chip:hover,
.topbar__user-chip[aria-expanded="true"] {
  background: hsl(var(--muted));
}
.topbar__user-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  display: grid;
  place-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}
.topbar__user-name {
  display: none;
}
@media (min-width: 640px) {
  .topbar__user-name { display: inline; }
}

/* ── Role switcher (floating dev tool) ───────────────────── */
.role-switcher {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: hsl(var(--ink-900));
  color: hsl(var(--ops-banner-fg));
  border-radius: var(--r-full);
  font-size: 0.6875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
}
.role-switcher label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}
.role-switcher select {
  background: transparent;
  color: hsl(var(--ops-banner-fg));
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 0.125rem 0.25rem;
}
.role-switcher select option {
  color: hsl(var(--ink-900));
}

/* ── Page-level ──────────────────────────────────────────── */
.page {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 4rem;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-header__text { min-width: 0; }

.page-title {
  position: relative;
  padding-left: 0.875rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: hsl(var(--foreground));
}
.page-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.375rem;
  bottom: 0.375rem;
  width: 3px;
  border-radius: 2px;
  background: hsl(var(--accent-500));
}

.page-subtitle {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  max-width: 65ch;
}

.page-header__actions {
  display: flex;
  gap: 0.5rem;
}

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.5rem 0.75rem;
}
.card__title-block { display: flex; flex-direction: column; gap: 0.125rem; }
.card__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}
.card__subtitle {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.card__body { padding: 0 1.5rem 1rem; }
.card__body--flush { padding: 0; }
.card__body--padded { padding: 1.5rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 0.875rem; height: 0.875rem; }

.btn--primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.btn--primary:hover { background: hsl(var(--primary-hover)); }

.btn--outline {
  background: hsl(var(--card));
  color: hsl(var(--ink-700));
  border-color: hsl(var(--border));
}
.btn--outline:hover { background: hsl(var(--secondary)); }

.btn--ghost {
  background: transparent;
  color: hsl(var(--foreground));
}
.btn--ghost:hover { background: hsl(var(--muted)); }

.btn--danger {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn--link {
  background: transparent;
  color: hsl(var(--primary));
  padding: 0;
  font-weight: 500;
}
.btn--link:hover { text-decoration: underline; }

.btn--sm {
  padding: 0.3125rem 0.625rem;
  font-size: 0.75rem;
}
.btn--lg { padding: 0.625rem 1.125rem; font-size: 0.875rem; }

.btn--block { width: 100%; }

/* ── Badges & chips ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.0625rem 0.4375rem;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge--neutral   { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge--primary   { background: hsl(var(--brand-100)); color: hsl(var(--brand-800)); }
.badge--success   { background: hsl(var(--green-100)); color: hsl(var(--green-700)); }
.badge--warning   { background: hsl(var(--amber-100)); color: hsl(var(--amber-700)); }
.badge--danger    { background: hsl(var(--red-100)); color: hsl(var(--red-700)); }
.badge--info      { background: hsl(var(--blue-100)); color: hsl(var(--blue-700)); }
.badge--accent    { background: hsl(var(--accent-500) / 0.15); color: hsl(var(--accent-fg)); }

.badge--solid-primary { background: hsl(var(--brand-700)); color: hsl(var(--primary-foreground)); }

.badge--concierge {
  background: hsl(var(--blue-100));
  color: hsl(226 71% 30%);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.5625rem;
}
.badge--standard {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.5625rem;
}

.country-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.0625rem 0.25rem;
  border-radius: 0.1875rem;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  font-size: 0.8125rem;
  border-collapse: collapse;
}
.table thead {
  background: hsl(var(--muted) / 0.5);
  border-bottom: 1px solid hsl(var(--border));
}
.table th {
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
}
.table td {
  padding: 0.6875rem 0.75rem;
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: middle;
}
.table tbody tr {
  transition: background 0.1s;
  cursor: pointer;
}
.table tbody tr:hover { background: hsl(var(--muted) / 0.4); }
.table tbody tr:last-child td { border-bottom: 0; }

.table--clickable tbody tr { cursor: pointer; }
.table--static tbody tr { cursor: default; }

.table__num {
  text-align: right;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-feature-settings: 'tnum';
}

.table__cell-stack {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.table__cell-primary {
  font-weight: 500;
  color: hsl(var(--foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table__cell-meta {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table__row-link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
}

/* ── Hero metric strip (dashboard) ───────────────────────── */
.hero-metric {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) {
  .hero-metric {
    grid-template-columns: 1.2fr 2fr;
    align-items: center;
  }
}

.hero-metric__primary { display: flex; flex-direction: column; gap: 0.25rem; }
.hero-metric__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
}
.hero-metric__value {
  font-size: 2.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1;
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum';
}
.hero-metric__hint {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  max-width: 36ch;
  margin-top: 0.25rem;
}

.hero-metric__pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 600px) {
  .hero-metric__pills { grid-template-columns: repeat(4, 1fr); }
}

.metric-pill {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--r-md);
  background: hsl(var(--muted) / 0.5);
  border: 1px solid hsl(var(--border));
}
.metric-pill__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.metric-pill__value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: hsl(var(--foreground));
  font-feature-settings: 'tnum';
}
.metric-pill__hint { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.metric-pill--warn  { border-left: 3px solid hsl(var(--warning)); }
.metric-pill--warn .metric-pill__value { color: hsl(var(--amber-700)); }
.metric-pill--danger { border-left: 3px solid hsl(var(--destructive)); }
.metric-pill--danger .metric-pill__value { color: hsl(var(--destructive)); }

/* ── Stack / grid helpers ────────────────────────────────── */
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: 0.5rem; }
.stack-lg > * + * { margin-top: 1.5rem; }

.row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.row--between { justify-content: space-between; }
.row--tight { gap: 0.25rem; }

.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.grid-3 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.grid-4 { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.muted { color: hsl(var(--muted-foreground)); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-2xs { font-size: 0.6875rem; }

.divider {
  height: 1px;
  background: hsl(var(--border));
  margin: 0.75rem 0;
}

/* ── Queue list (dashboard cards) ───────────────────────── */
.queue-list { display: flex; flex-direction: column; }
.queue-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
  cursor: pointer;
  transition: background 0.1s;
}
.queue-list__item:first-child { border-top: 0; }
.queue-list__item:hover { background: hsl(var(--muted) / 0.4); }

.queue-list__primary { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.queue-list__name {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  min-width: 0;
}
.queue-list__name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-list__meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  min-width: 0;
}
.queue-list__meta-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-list__age {
  font-size: 0.6875rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  font-feature-settings: 'tnum';
}
.queue-list__age.is-sla { color: hsl(var(--amber-700)); font-weight: 600; }

.queue-list__amount {
  text-align: right;
  white-space: nowrap;
}
.queue-list__amount-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  color: hsl(var(--foreground));
}
.queue-list__amount-meta {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
}

/* ── Inbox card (platform admin) ─────────────────────────── */
.inbox-card {
  border-left: 3px solid hsl(var(--primary));
}

/* ── Empty state / loading ───────────────────────────────── */
.empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
}
.empty-state__icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.75rem;
  color: hsl(var(--muted-foreground) / 0.6);
}
.empty-state__title { font-size: 0.875rem; font-weight: 600; color: hsl(var(--foreground)); }
.empty-state__hint { font-size: 0.75rem; margin-top: 0.25rem; }

.skeleton {
  display: inline-block;
  background: linear-gradient(
    90deg,
    hsl(var(--muted) / 0.6) 25%,
    hsl(var(--muted)) 50%,
    hsl(var(--muted) / 0.6) 75%
  );
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
  border-radius: 0.375rem;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Drawer ──────────────────────────────────────────────── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.4);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 560px;
  background: hsl(var(--card));
  border-left: 1px solid hsl(var(--border));
  z-index: 51;
  transform: translateX(100%);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: translateX(0); }
@media (min-width: 768px) { .drawer { max-width: 640px; } }

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
  flex-shrink: 0;
}
.drawer__title { font-size: 1rem; font-weight: 600; }
.drawer__close {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: var(--r-md); color: hsl(var(--muted-foreground));
  background: transparent; border: 0;
}
.drawer__close:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 2rem;
}

/* ── Forms ───────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}
.field__hint { font-size: 0.6875rem; color: hsl(var(--muted-foreground)); }
.field__error { font-size: 0.6875rem; color: hsl(var(--destructive)); }

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-family: inherit;
  color: hsl(var(--foreground));
  background: hsl(var(--card));
  border: 1px solid hsl(var(--input));
  border-radius: var(--r-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: 0;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--brand-100));
}
.textarea { min-height: 5rem; resize: vertical; }

.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'><path fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.06l3.71-3.83a.75.75 0 111.08 1.04l-4.25 4.39a.75.75 0 01-1.08 0L5.21 8.27a.75.75 0 01.02-1.06z' clip-rule='evenodd'/></svg>"); background-repeat: no-repeat; background-position: right 0.5rem center; background-size: 1.25rem; padding-right: 2rem; }

.search-input {
  position: relative;
}
.search-input input {
  padding-left: 2.25rem;
}
.search-input__icon {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}

/* ── Toolbar (filter row above tables) ───────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  flex-wrap: wrap;
}
.toolbar__search { flex: 1; min-width: 12rem; max-width: 22rem; }
.toolbar__group {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-md);
}
.toolbar__chip {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
  color: hsl(var(--muted-foreground));
  background: transparent;
  border: 0;
}
.toolbar__chip:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.toolbar__chip.is-active { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }

/* ── Filters side panel ──────────────────────────────────── */
.layout-with-side {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 1024px) {
  .layout-with-side { grid-template-columns: 240px 1fr; }
}

.filter-panel {
  padding: 1rem;
}
.filter-panel__section { margin-bottom: 1rem; }
.filter-panel__title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}
.filter-panel__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.8125rem;
  cursor: pointer;
}
.filter-panel__option input { margin: 0; }
.filter-panel__option-count {
  margin-left: auto;
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pagination__pages { display: flex; align-items: center; gap: 0.25rem; }
.pagination__btn {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  color: hsl(var(--foreground));
  background: transparent;
  border: 0;
}
.pagination__btn:hover:not(:disabled) { background: hsl(var(--muted)); }
.pagination__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination__btn.is-active { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }

/* ── Detail panel (payment detail, etc.) ─────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 1.25rem;
}
@media (min-width: 640px) {
  .detail-grid { grid-template-columns: max-content 1fr; }
}
.detail-grid__label {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}
.detail-grid__value {
  font-size: 0.8125rem;
  color: hsl(var(--foreground));
}

/* ── Timeline (audit log) ───────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.4375rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: hsl(var(--border));
  border-radius: 1px;
}
.timeline__entry {
  position: relative;
  padding: 0.5rem 0 1rem 0.75rem;
}
.timeline__dot {
  position: absolute;
  left: -1.5rem;
  top: 0.6875rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
  border: 2px solid hsl(var(--card));
}
.timeline__dot--success { background: hsl(var(--green-700)); }
.timeline__dot--warning { background: hsl(var(--warning)); }
.timeline__dot--danger  { background: hsl(var(--destructive)); }
.timeline__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: hsl(var(--foreground));
  font-weight: 500;
}
.timeline__meta {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.125rem;
}
.timeline__body {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: hsl(var(--muted) / 0.4);
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-sm);
  padding: 0.5rem 0.625rem;
  overflow-x: auto;
}

/* ── Tab strip ───────────────────────────────────────────── */
.tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 1rem;
  overflow-x: auto;
}
.tab {
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { color: hsl(var(--foreground)); }
.tab.is-active { color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary)); }

/* ── Toast ───────────────────────────────────────────────── */
.toast-stack {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: hsl(var(--ink-900));
  color: hsl(var(--ops-banner-fg));
  padding: 0.625rem 1rem;
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s ease-out;
  pointer-events: auto;
  max-width: 28rem;
}
.toast__desc {
  font-weight: 400;
  font-size: 0.75rem;
  color: hsl(var(--ops-banner-fg) / 0.8);
  margin-top: 0.125rem;
}
@keyframes toast-in {
  from { transform: translateY(0.5rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Empty / placeholder utility ─────────────────────────── */
.deferred-card {
  text-align: center;
  padding: 2rem 1.5rem;
}
.deferred-card__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.25rem;
}
.deferred-card__hint {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  max-width: 36ch;
  margin: 0 auto;
}

/* ── Stat tiles (V2 accounting placeholders) ─────────────── */
.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-md);
}
.stat-tile__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
}
.stat-tile__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  font-feature-settings: 'tnum';
}
.stat-tile__delta {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.stat-tile__delta--up { color: hsl(var(--green-700)); }
.stat-tile__delta--down { color: hsl(var(--destructive)); }

/* ── Account settings tabs ───────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 1024px) {
  .settings-grid { grid-template-columns: 200px 1fr; }
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.settings-nav__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--r-md);
  color: hsl(var(--foreground));
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.settings-nav__item:hover { background: hsl(var(--muted)); }
.settings-nav__item.is-active {
  background: hsl(var(--sidebar-accent));
  color: hsl(var(--sidebar-accent-foreground));
  font-weight: 600;
}
.settings-nav__item svg { width: 1rem; height: 1rem; }

/* ── MFA QR card ─────────────────────────────────────────── */
.mfa-card {
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .mfa-card { grid-template-columns: 200px 1fr; } }
.mfa-card__qr {
  width: 200px; height: 200px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-md);
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(0deg, hsl(var(--ink-900)) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(90deg, hsl(var(--ink-900)) 0 6px, transparent 6px 12px),
    hsl(var(--paper));
  position: relative;
}
.mfa-card__qr::after {
  content: 'QR';
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  color: hsl(var(--paper));
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* ── Compact density mode ────────────────────────────────── */
body.density-compact .main { padding-top: 0.75rem; }
body.density-compact .card { padding: 0; }
body.density-compact .table th,
body.density-compact .table td { padding-top: 0.5rem; padding-bottom: 0.5rem; }
body.density-compact .page { padding-top: 1rem; padding-bottom: 2rem; }

/* ── Misc utility ────────────────────────────────────────── */
.flex-1 { flex: 1; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.no-wrap { white-space: nowrap; }
/* ── Modal (centered, used for "Add client" etc.) ────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.4);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 1rem));
  z-index: 61;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 4rem);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
  flex-shrink: 0;
}
.modal__title { font-size: 1rem; font-weight: 600; }
.modal__close {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: var(--r-md); color: hsl(var(--muted-foreground));
  background: transparent; border: 0;
}
.modal__close:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.modal__body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.3);
  flex-shrink: 0;
  border-bottom-left-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-lg);
}

/* ── Form grid (used inside modals) ─────────────────────── */
.form-grid {
  display: grid;
  gap: 0.875rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
  .form-grid--2 > .field--span-2 { grid-column: span 2; }
}
