/*
 * Control-plane stylesheet for the Mero UI + HTMX frontend.
 *
 * Load order: /vendor/mero/mero.css, then this file. Mero styles every
 * component through zero-specificity :where() rules and --mero-* tokens, so
 * this file (1) declares Origo's tokens (copied from public/styles.css
 * @layer tokens, DESIGN.md), (2) maps the --mero-* tokens onto them, and
 * (3) adds the control-plane shell and page parts. The tenant app keeps
 * /styles.css; the control plane no longer loads it.
 *
 * Themes: the pre-paint script sets html[data-theme] and color-scheme from
 * localStorage["theme"], like the tenant app. Origo tokens are light-dark()
 * pairs and Mero reads the same data-theme attribute, so one mapping covers
 * both themes.
 */

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    padding: 0;
  }
  /* Dialogs keep the UA margin:auto, which centres them in the top layer. */
  :where(*:not(dialog)) {
    margin: 0;
  }
}

/* ── Origo tokens (public/styles.css @layer tokens) ───────────────────────── */
:root {
  color-scheme: light;
  --color-primary: #5e6ad2;
  --color-primary-hover: #4f5bc0;
  --color-danger: #e5484d;
  --color-danger-hover: #cd2b31;
  --color-success: #30a46c;
  --color-warning: #f5a623;
  --color-primary-soft: light-dark(rgba(94, 106, 210, 0.12), rgba(139, 156, 245, 0.18));
  /* Text on a Control Violet fill: ≥ 4.5:1 on #5e6ad2 in both themes (white is 4.70:1). */
  --color-on-primary: light-dark(#fbfbff, #ffffff);
  --color-on-danger: light-dark(#fffafa, #fff4f4);
  --color-bg: light-dark(#f9f9fb, #1a1a1f);
  --color-surface: light-dark(#ffffff, #232329);
  --color-surface-raised: light-dark(#f4f4f6, #2a2a30);
  --color-bg-warning: light-dark(#fff8ed, #3d3520);
  --color-border: light-dark(#ebebef, #333339);
  --color-border-subtle: light-dark(#f2f2f5, #2a2a30);
  --color-border-warning: light-dark(#f4d6a5, #5f4a20);
  --color-control-border: light-dark(#c6c6cf, #4b4b55);
  --color-control-border-hover: light-dark(#a9a9b5, #62626d);
  --color-text: light-dark(#1c1c1e, #ededef);
  /* Muted text: ≥ 4.5:1 on surface and raised surface in both themes. */
  --color-text-secondary: light-dark(#6e6e76, #9a9aa3);
  --color-text-tertiary: light-dark(#a0a0a8, #5c5c66);
  --color-text-warning: light-dark(#8a5a00, #f5c842);
  /* Compact (tenant) navigation palette. */
  --color-sidebar-bg: light-dark(#f9f9fb, #202027);
  --color-sidebar-border: light-dark(#ebebef, #34343c);
  --color-sidebar-text: light-dark(#52525c, #c7c7d1);
  --color-sidebar-text-muted: light-dark(#6e6e7a, #9292a0);
  --color-sidebar-text-hover: light-dark(#26262c, #f0f0f4);
  --color-sidebar-hover-bg: light-dark(#f0f0f4, #292930);
  --color-sidebar-active-bg: light-dark(#eaeaf7, #343449);
  --color-sidebar-active-accent: light-dark(#5e6ad2, #aeb4ff);
  /* Active nav label: darker violet on light, lighter tint on dark (≥ 4.5:1 on the active bg). */
  --color-sidebar-active-text: light-dark(#4c54b4, #c6caff);
  /* Inline links: Control Violet on light; its lighter tint keeps 4.5:1 on dark surfaces. */
  --color-link: light-dark(var(--color-primary), #aeb4ff);
  /* Status badge pairs (.badge-* in styles.css), ≥ 4.5:1 in both themes. */
  --status-gray-bg: light-dark(#f0f0f2, #333339);
  --status-gray-fg: light-dark(#5b5b64, #b4b4be);
  --status-blue-bg: light-dark(#e0e7ff, #2d2d5e);
  --status-blue-fg: light-dark(#3b4fc0, #8b9cf5);
  --status-amber-bg: light-dark(#fef3cd, #3d3520);
  --status-amber-fg: light-dark(#856404, #f5c842);
  --status-red-bg: light-dark(#fde8e8, #3d2020);
  --status-red-fg: light-dark(#c0392b, #f58b8b);
  --status-green-bg: light-dark(#e6f9ee, #1d3a28);
  --status-green-fg: light-dark(#1a7f42, #5ec98b);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: var(--font-body);
  --font-label: "Schibsted Grotesk", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius: 6px;
  --radius-sm: 4px;
  --ease-out-origo: cubic-bezier(0.16, 1, 0.3, 1);
  --focus-ring: 0 0 0 3px rgba(94, 106, 210, 0.25);
}
html[data-theme="dark"] {
  color-scheme: dark;
}
html[data-theme="light"] {
  color-scheme: light;
}

/* ── Mero → Origo token bridge ─────────────────────────────────────────────
   html[data-theme] (0,1,1) outranks Mero's own [data-theme="dark"] (0,1,0), so
   these win in both themes; the values themselves are light-dark() pairs. */
html,
html[data-theme] {
  --mero-font: var(--font-body);
  --mero-radius: var(--radius);
  --mero-radius-panel: 8px;
  --mero-control-height: 2rem;
  --mero-control-padding-inline: 0.625rem;
  --mero-control-gap: 0.25rem;
  --mero-fast: 150ms;
  --mero-enter: 200ms;
  --mero-ease: var(--ease-out-origo);
  --mero-bg: var(--color-bg);
  --mero-surface: var(--color-surface);
  --mero-raised: var(--color-surface-raised);
  --mero-hover: var(--color-surface-raised);
  --mero-line: var(--color-border);
  --mero-control-line: var(--color-control-border);
  --mero-text: var(--color-text);
  --mero-muted: var(--color-text-secondary);
  --mero-primary: var(--color-primary);
  --mero-primary-ink: var(--color-on-primary);
  --mero-accent: var(--color-primary);
  --mero-accent-ink: var(--color-on-primary);
  --mero-switch-active: var(--color-primary);
  --mero-success: var(--status-green-fg);
  --mero-warning: var(--status-amber-fg);
  --mero-danger: var(--status-red-fg);
  --mero-info: var(--status-blue-fg);
  --mero-shadow: light-dark(
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 0 1px 0 rgba(255, 255, 255, 0.3) inset
  );
}

html,
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
:where(a:not([class*="mero-"])) {
  color: inherit;
}
code,
kbd,
.mono {
  font-family: var(--font-mono);
}
.mono {
  font-size: 0.75rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Mero components at Origo density (DESIGN.md: compact forms and tables) ── */
.mero-button {
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.3rem 0.75rem;
  gap: 0.25rem;
}
.mero-button-sm {
  --_height: 1.75rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}
.mero-button-primary {
  box-shadow: none;
}
.mero-button-primary:hover:not(:disabled, [aria-disabled="true"]) {
  background: var(--color-primary-hover);
}
.mero-button-danger {
  --_bg: var(--color-danger);
  --_ink: var(--color-on-danger);
}
.mero-button-danger:hover:not(:disabled, [aria-disabled="true"]) {
  background: var(--color-danger-hover);
}
.mero-button-secondary,
.mero-button-outline {
  --_bg: transparent;
  --_border: var(--color-border);
}
.mero-button-secondary:hover:not(:disabled, [aria-disabled="true"]),
.mero-button-outline:hover:not(:disabled, [aria-disabled="true"]) {
  background: var(--color-surface-raised);
  border-color: var(--color-control-border);
}
.mero-button-ghost {
  color: var(--color-text-secondary);
}
.mero-button-ghost:hover:not(:disabled, [aria-disabled="true"]) {
  background: var(--color-surface-raised);
  color: var(--color-text);
}
.mero-input,
.mero-select,
.mero-textarea {
  font-size: 0.875rem;
  border-color: var(--color-border);
  border-radius: var(--radius);
}
.mero-input:hover,
.mero-select:hover,
.mero-textarea:hover {
  border-color: var(--color-control-border);
}
.mero-input:focus,
.mero-select:focus,
.mero-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
}
.mero-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.mero-badge {
  padding: 0.0625rem 0.4rem;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1.5;
  white-space: nowrap;
}
.mero-dialog {
  border-radius: 8px;
}
.mero-menu-item {
  font-size: 0.8125rem;
}
.mero-menu-item[data-tone="danger"] {
  color: var(--status-red-fg);
}

/* One visible focus treatment everywhere (WCAG 2.4.7). */
:where(a, button, input, select, textarea, summary, [tabindex], [role="row"]):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Origo status chips: tiny pills, no border (DESIGN.md Chips). */
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.0625rem 0.4rem;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1.5;
  white-space: nowrap;
}
.status-chip[data-tone="gray"] {
  background: var(--status-gray-bg);
  color: var(--status-gray-fg);
}
.status-chip[data-tone="blue"] {
  background: var(--status-blue-bg);
  color: var(--status-blue-fg);
}
.status-chip[data-tone="amber"] {
  background: var(--status-amber-bg);
  color: var(--status-amber-fg);
}
.status-chip[data-tone="red"] {
  background: var(--status-red-bg);
  color: var(--status-red-fg);
}
.status-chip[data-tone="green"] {
  background: var(--status-green-bg);
  color: var(--status-green-fg);
}

/* ── App shell: the tenant app's compact navigation (styles.css
   .app-layout[data-navigation-mode="compact"]), rebuilt on Mero parts. ── */
:root {
  --shell-content-bg: light-dark(#ffffff, #1a1a1f);
  --interactive-soft: light-dark(#eeeefa, #343449);
}
.cp-shell {
  display: flex;
  min-height: 100vh;
  background: var(--shell-content-bg);
}
.cp-sidebar {
  width: 218px;
  flex-shrink: 0;
  background: var(--color-sidebar-bg);
  border-right: 1px solid var(--color-sidebar-border);
  color: var(--color-sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.cp-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem 1rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-sidebar-text-hover);
}
.cp-goto {
  margin: 0 0.75rem 0.75rem;
}
.cp-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  padding: 0 0.75rem 0.75rem;
}
.cp-nav-secondary {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-sidebar-border);
}
.nav-group + .nav-group {
  margin-top: 0.5rem;
}
.nav-group-title {
  padding: 0.5rem 0.75rem 0.125rem;
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-sidebar-text-muted);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 36px;
  margin: 2px 0;
  padding: 0 0.75rem;
  border-radius: 6px;
  color: var(--color-sidebar-text);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 150ms,
    color 150ms;
}
.nav-item svg {
  opacity: 0.7;
  flex-shrink: 0;
}
.nav-item:hover {
  background: var(--color-sidebar-hover-bg);
  color: var(--color-sidebar-text-hover);
}
.nav-item[aria-current="page"] {
  background: var(--color-sidebar-active-bg);
  color: var(--color-sidebar-active-text);
  font-weight: 600;
}
.nav-item:hover svg,
.nav-item[aria-current="page"] svg {
  opacity: 1;
}
.cp-sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--color-sidebar-border);
}
.cp-avatar {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--color-sidebar-active-bg);
  font-weight: 600;
}
.cp-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--shell-content-bg);
}
.cp-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 58px;
  padding: 0 2rem;
  background: var(--shell-content-bg);
  border-bottom: 1px solid var(--color-border);
}
.cp-header h1 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cp-content {
  padding: 1.875rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cp-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 100001;
  background: var(--color-primary);
  transform-origin: left;
  transform: scaleX(0);
  opacity: 0;
  transition:
    transform 400ms var(--ease-out-origo),
    opacity 200ms;
}
.cp-progress[data-active="true"] {
  transform: scaleX(0.7);
  opacity: 1;
}

@media (max-width: 1024px) {
  .cp-sidebar {
    display: none;
  }
  .cp-header {
    padding: 0 1rem;
  }
  .cp-content {
    padding: 1.25rem 1rem;
  }
}

/* Panels: flat, bordered, never nested. */
.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
}
.panel-body {
  padding: 1rem;
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.toolbar-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}
.table-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}
.page-subtitle {
  color: var(--color-text-secondary);
  margin: 0;
}

.empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--color-text-secondary);
}
.empty h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Login (public shell) ─────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--color-bg);
}
.login-stage {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.login-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.login-brand {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.login-brand-sub {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}
.login-card {
  padding: 1.5rem;
  box-shadow: light-dark(0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.24));
}
.login-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--color-text-tertiary);
  font-size: 0.75rem;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--color-border);
}

/* ── Page kit (tenant .page-header, .panel, .field, .form-container, .kpi) ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.back-link {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  text-decoration: none;
}
.back-link:hover {
  color: var(--color-text);
}
.panel {
  overflow: hidden;
}
.panel-header .panel-title {
  flex: 1;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}
.panel-header {
  border-bottom: 1px solid var(--color-border);
}
.field-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 0;
}
.field {
  margin: 0;
}
.field-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.field-value {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text);
  word-break: break-word;
}
.form-page {
  max-width: 800px;
  width: 100%;
}
.form-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.5rem;
}
.form-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.form-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}
.form-section-title {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem 1rem;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 1rem 1.25rem;
  color: inherit;
  text-decoration: none;
}
.kpi + .kpi {
  border-left: 1px solid var(--color-border);
}
a.kpi:hover {
  background: var(--color-surface-raised);
}
.kpi-label {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.kpi-hint {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}
.detail-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
}
.link {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 500;
}
.link:hover {
  text-decoration: underline;
}
.text-secondary {
  color: var(--color-text-secondary);
}
.cell-title {
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}
a.cell-title:hover {
  text-decoration: underline;
}

/* ── UX pass: record pages, lists, command menu ─────────────────────────── */
.section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.cell-label {
  display: none;
}

.table-with-peek {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .table-with-peek {
    grid-template-columns: minmax(0, 1fr);
  }
}
.peek-panel {
  position: sticky;
  top: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.peek-header,
.peek-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
}
.peek-header {
  border-bottom: 1px solid var(--color-border);
}
.peek-footer {
  border-top: 1px solid var(--color-border);
}
.peek-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.peek-body {
  padding: 1rem;
}
.peek-body .field-group {
  grid-template-columns: minmax(0, 1fr);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.breadcrumbs li + li::before {
  content: "›";
  margin-right: 0.375rem;
}
.breadcrumbs a {
  color: var(--color-text-secondary);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.record-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.record-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.record-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.record-meta {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
}

.attention-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  font-size: 14px;
}
.attention-strip[data-tone="red"] {
  background: var(--status-red-bg);
  border-color: color-mix(in srgb, var(--status-red-fg) 30%, transparent);
}
.attention-strip[data-tone="amber"] {
  background: var(--status-amber-bg);
  border-color: color-mix(in srgb, var(--status-amber-fg) 30%, transparent);
}
.attention-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--color-text-secondary);
  flex-shrink: 0;
}
[data-tone="red"] > .attention-dot {
  background: var(--color-danger);
}
[data-tone="amber"] > .attention-dot {
  background: var(--color-warning);
}
[data-tone="blue"] > .attention-dot {
  background: var(--color-primary);
}
[data-tone="green"] > .attention-dot {
  background: var(--color-success);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.view-tabs {
  display: inline-flex;
  gap: 0.125rem;
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface-raised);
}
.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 0.25rem 0.625rem;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.view-tab:hover {
  color: var(--color-text);
}
.view-tab[aria-pressed="true"] {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.view-tab-count {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 9999px;
  background: var(--status-gray-bg);
  color: var(--status-gray-fg);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.overview-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 14px;
  color: var(--color-text-secondary);
}
.overview-counts a {
  color: inherit;
  text-decoration: none;
}
.overview-counts a:hover {
  color: var(--color-text);
}
.overview-counts strong {
  color: var(--color-text);
  font-weight: 600;
}

.usage-meter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.usage-bar {
  height: 4px;
  border-radius: 9999px;
  background: var(--color-surface-raised);
  overflow: hidden;
}
.usage-bar span {
  display: block;
  height: 100%;
  background: var(--color-primary);
}
.usage-bar span[data-over] {
  background: var(--color-danger);
}
kbd {
  font-family: var(--font-body);
  font-size: 11px;
  padding: 0 0.3rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface-raised);
  color: var(--color-text-secondary);
}
.cp-activity {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}
.cp-activity-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.cp-activity-item[data-tone="amber"] {
  background: var(--status-amber-bg);
  color: var(--status-amber-fg);
  border-color: transparent;
}
.cp-activity-item:hover {
  border-color: var(--color-control-border-hover);
}
.cp-spinner {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  /* A steady dot, not a spinner: in-progress work is ambient state in the
     header, and constant motion there would compete with the page. */
  background: var(--color-primary);
}
.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
}
.shortcut-list div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.75rem;
  font-size: 13px;
}
.shortcut-list dd {
  margin: 0;
  color: var(--color-text-secondary);
}
.shortcut-list ~ .mero-description {
  margin-top: 0.75rem;
}

/* Danger zone: closed until the operator chooses the destructive action. */
.danger-zone {
  border: 1px solid color-mix(in srgb, var(--color-danger) 35%, var(--color-border));
  border-radius: 6px;
  background: var(--color-surface);
}
.danger-zone > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
}
.danger-zone > summary::-webkit-details-marker {
  display: none;
}
.danger-zone[open] > summary {
  border-bottom: 1px solid var(--color-border);
}
.danger-zone > .danger-zone-body {
  padding: 1rem;
}
.unavailable-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.unavailable-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0;
  font-size: 14px;
}
.unavailable-list li + li {
  border-top: 1px solid var(--color-border-subtle);
}
.unavailable-list strong {
  font-weight: 500;
  min-width: 11rem;
}
.entitlement-list {
  margin: 0;
  display: grid;
  gap: 0.375rem;
  font-size: 13px;
}
.entitlement-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.375rem;
}
.entitlement-list dd {
  margin: 0;
}

/* ── Mero integration: shell parts ─────────────────────────────────────────── */
.cp-drawer-toggle {
  display: none;
}
@media (max-width: 1024px) {
  .cp-drawer-toggle {
    display: inline-flex;
  }
}
.cp-drawer .cp-brand {
  color: var(--color-text);
}
.cp-goto-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.25rem;
  padding: 0 0.5rem 0 0.625rem;
  border: 1px solid var(--color-sidebar-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-sidebar-text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.cp-goto-button:hover {
  color: var(--color-sidebar-text-hover);
  border-color: var(--color-control-border-hover);
}
.nav-group ul {
  list-style: none;
}
.cp-account {
  width: 100%;
  justify-content: flex-start;
  gap: 0.5rem;
  padding-inline: 0.25rem;
  font-size: 0.8125rem;
  color: var(--color-sidebar-text-hover);
}
.cp-account-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-account-menu {
  min-width: 15rem;
}
.mero-menu-heading {
  padding: 0.375rem 0.625rem 0.25rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.mero-menu-heading:not(:first-child) {
  margin-top: 0.25rem;
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 0.5rem;
}
.filter-menu {
  max-height: min(26rem, 60vh);
  overflow: auto;
  min-width: 14rem;
}
.cp-drawer {
  /* The navigation drawer opens from the left, like the sidebar it replaces. */
  --mero-offset-x: -100%;
  inset-inline-start: 0;
  inset-inline-end: auto;
  border-radius: 0 8px 8px 0;
  --mero-panel-bg: var(--color-sidebar-bg);
  width: min(280px, 85vw);
  padding: 0;
  background: var(--color-sidebar-bg);
  color: var(--color-sidebar-text);
}
.cp-drawer .cp-nav {
  min-height: auto;
}
.cp-command {
  width: min(640px, calc(100vw - 2rem));
  padding: 0;
}
.cp-command .mero-combo {
  padding: 0.75rem;
}
.cp-command .mero-input {
  font-size: 15px;
  min-height: 2.5rem;
}
.cp-command .mero-combo-list {
  position: static;
  max-height: min(420px, 55vh);
  overflow: auto;
  margin-top: 0.5rem;
  box-shadow: none;
  border: 0;
}
.cp-command .mero-option {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 14px;
}
.cp-command .cmdk-detail {
  color: var(--color-text-secondary);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}
.cmdk-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-secondary);
}
.cp-content:focus {
  outline: none;
}

/* ── Lists: toolbar, filters, table density, cards ─────────────────────────── */
.toolbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 24rem;
  min-width: 0;
}
.toolbar-search {
  flex: 0 1 20rem;
  min-width: 12rem;
}
.toolbar-search-input {
  width: 100%;
}
.chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.filter-chips .mero-filter-chips {
  list-style: none;
  gap: 0.375rem;
}
.filter-clear {
  font-size: 13px;
}
.table-card {
  overflow: visible;
}
/* The wrapper scrolls a table wider than the page. Absolutely positioned
   content in it (.sr-only header text) must belong to the wrapper too, or it
   escapes the scroll and widens the whole page. */
.mero-table-wrap {
  position: relative;
}
.cp-table {
  width: 100%;
}
.cp-table-caption {
  text-align: left;
}
.cp-table thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
  background: var(--color-surface-raised);
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  text-align: left;
  white-space: nowrap;
}
.cp-table thead th a {
  color: inherit;
  text-decoration: none;
}
.cp-table thead th a:hover {
  color: var(--color-text);
}
.cp-table tbody :is(th, td) {
  padding: 0.5rem 1rem;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  vertical-align: middle;
  border-top: 1px solid var(--color-border-subtle);
}
.cp-table tbody tr:hover :is(th, td) {
  background: var(--color-surface-raised);
}
.cp-table .align-end {
  text-align: right;
}
.cp-table .cell-title {
  font-weight: 600;
}
.row-menu {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
}
.row-menu-trigger {
  min-width: 28px;
  color: var(--color-text-secondary);
}
.row-menu .form-error,
.cp-table .row-menu .form-error {
  white-space: normal;
  width: max-content;
  max-width: min(22rem, 70vw);
  text-align: right;
  font-size: 12px;
}
.view-tab[aria-current="page"] {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
a.view-tab {
  text-decoration: none;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
/* The cards' sort select (kit DataTable): shown where Mero turns rows into cards. */
.table-sort {
  display: none;
}
@media (width < 48rem) {
  .table-sort {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem 0;
  }
  /* A failed sort says so on its own line under the select. */
  .table-sort-error {
    flex-basis: 100%;
    margin: 0;
  }
  .table-sort .mero-label {
    flex: none;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: var(--color-text-secondary);
  }
  .table-sort .mero-select {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
  }
  /* Search and "+ Filter" share one row at control height. */
  .toolbar-search {
    flex: 1 1 12rem;
  }
  .filter-chips > .mero-button {
    --_height: var(--mero-control-height);
    padding-inline: 0.75rem;
    font-size: 0.8125rem;
    border: 1px solid var(--color-control-border);
  }
}
/* Phone cards (Mero .mero-table-cards below 48rem): compact Origo spacing. */
@container mero-table-cards (min-width: 0px) {
  /* The cards sort with the select above; the header link row is not shown. */
  .cp-table thead {
    display: none;
  }
  .cp-table tbody tr {
    border-top: 1px solid var(--color-border-subtle);
    padding: 0.625rem 0.875rem;
  }
  .cp-table tbody :is(th, td) {
    border: 0;
    padding: 0.125rem 0;
    background: transparent !important;
  }
  .cp-table .hide-mobile {
    display: none;
  }
  .cp-table .align-end {
    text-align: left;
  }
  .row-menu {
    align-items: flex-start;
  }
}

/* ── Forms, notices, identifiers ──────────────────────────────────────────── */
.form-field {
  min-width: 0;
}
.required-mark {
  color: var(--color-danger);
}
.form-error {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--status-red-fg);
}
.form-error[hidden] {
  display: none;
}
.cp-notice {
  font-size: 14px;
}
.cp-notice-body > * + * {
  margin-top: 0.25rem;
}
.cp-identifier {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
}
.cp-identifier code {
  overflow-wrap: anywhere;
}
.cp-copy {
  --_height: 1.5rem;
  padding: 0 0.375rem;
  font-size: 11px;
}
.record-heading {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.record-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.attention-text {
  flex: 1;
  min-width: 0;
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.empty-action {
  margin-top: 0.75rem;
  display: inline-flex;
}
.cp-pending-page {
  white-space: pre-wrap;
  font-size: 12px;
}

/* ── Page groups: each page group appends its own rules below its marker. ── */
/* @group accounts */
.acc-section,
.acc-column,
.acc-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.acc-column,
.acc-stack {
  gap: 1rem;
}
.acc-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.acc-policy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
}
.acc-form-end {
  display: flex;
  justify-content: flex-end;
}
.acc-when {
  display: contents;
}
.acc-when[hidden] {
  display: none;
}
.acc-small {
  font-size: 12px;
}
.acc-flush {
  margin: 0;
}
.acc-break {
  overflow-wrap: anywhere;
}
.acc-notes {
  white-space: pre-wrap;
}
.acc-danger-text {
  color: var(--color-danger);
}
.cell-sub {
  font-weight: 400;
  margin-inline-start: 0.375rem;
}
.usage-meter-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 14px;
}
.usage-over {
  color: var(--color-danger);
}
.acc-plan-form > .form-page + .form-page {
  margin-top: 1.25rem;
}
.acc-plan-form .form-grid {
  align-items: start;
}
/* @group environments-list */
.neon-fleet {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 14px;
}
.neon-fleet-count {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.neon-fleet-count strong {
  font-size: 1rem;
}
.neon-fleet .mero-meter {
  inline-size: 100%;
}
.neon-fleet-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.env-cell {
  display: inline-flex;
  flex-direction: column;
}
.env-cell-slug {
  font-size: 12px;
  font-weight: 400;
}
.env-engine {
  align-items: center;
  white-space: nowrap;
}
.env-engine .mono {
  font-size: 12px;
}
.env-delete-id {
  display: block;
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}
.env-create-error {
  margin-bottom: 1rem;
}
.env-conflict-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.env-conflict-actions[hidden],
.env-create [data-env-stage-text][hidden] {
  display: none;
}
.env-create-note {
  margin: 0.75rem 0 0;
}
/* @group environment-record */
.env-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.env-stack-tight {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  align-items: flex-start;
}
.env-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1.25rem;
}
.env-muted {
  margin: 0;
  font-size: 14px;
}
.env-small {
  font-size: 12px;
}
.env-block {
  display: block;
}
.env-break {
  overflow-wrap: anywhere;
}
.env-grow {
  min-width: 0;
  flex: 1;
}
.env-measure {
  max-width: 640px;
}
.env-truncate {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.env-subheading {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.env-ruled {
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}
.env-split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 14px;
}
.env-split-top {
  align-items: flex-start;
}
.env-split-ruled {
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}
.env-actions,
.env-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}
.env-two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .env-two-up {
    grid-template-columns: minmax(0, 1fr);
  }
}
.env-confirm {
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 14px;
}
.env-confirm .mero-checkbox {
  margin-top: 0.2rem;
}
.env-transition {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.env-transition-inline {
  align-items: center;
}
.env-transition-side {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.375rem;
}
.env-transition-arrow {
  padding-top: 1.5rem;
  color: var(--color-text-secondary);
}
.env-transition-inline .env-transition-arrow {
  padding-top: 0;
}
@media (max-width: 640px) {
  .env-transition {
    grid-template-columns: minmax(0, 1fr);
  }
  .env-transition-arrow {
    display: none;
  }
}
.env-operation-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.env-operation-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 14px;
}
.env-operation-list li + li {
  border-top: 1px solid var(--color-border);
}
.env-operations-more {
  border-top: 1px solid var(--color-border);
}
.env-operations-more > summary {
  padding: 0.625rem 1rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-link);
  cursor: pointer;
}
.env-operations-more > .env-operation-list {
  border-top: 1px solid var(--color-border);
}
.env-operation-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.25rem;
}
.readiness-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.readiness-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 14px;
}
.readiness-mark {
  width: 1rem;
  flex: none;
  text-align: center;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.readiness-list li[data-readiness="ready"] .readiness-mark {
  color: var(--color-success);
}
.readiness-list li[data-readiness="blocked"] .readiness-mark {
  color: var(--color-danger);
}
.readiness-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.readiness-text strong {
  font-weight: 500;
}
.env-subtable .cp-table {
  min-width: 560px;
}
.env-subtable .cp-table tbody th {
  font-weight: 500;
}
@media (max-width: 768px) {
  .env-subtable .cp-table {
    min-width: 0;
  }
}
.env-danger-summary {
  font-weight: 500;
  /* Text, not a fill: the red status ink keeps 4.5:1 where --color-danger does not. */
  color: var(--status-red-fg);
}
.env-focus-target:focus {
  outline: none;
}
.env-focus-target:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.env-narrow {
  max-width: 800px;
}
.env-page-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}
.env-label-note {
  font-weight: 400;
}
.env-gap-top {
  margin-top: 1rem;
}
.env-details > summary {
  cursor: pointer;
  list-style: none;
}
.env-details > summary::-webkit-details-marker {
  display: none;
}
.env-details:not([open]) > summary {
  border-bottom: 0;
}
[data-env-lifecycle-message]:empty {
  display: none;
}
.env-delete-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}
.env-span-2 {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .env-delete-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.env-record [hidden],
.env-deploy [hidden] {
  display: none !important;
}
/* @group releases */
.release-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.rollout-halt-reason {
  margin: 0;
  font-size: 14px;
}
.rollout-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.rollout-controls .form-hint {
  margin: 0;
}
.release-deploy [hidden] {
  display: none;
}
.release-deploy .rd-error:focus,
.release-deploy .rd-results:focus {
  outline: none;
}
.rd-intro {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 14px;
}
.rd-intro p {
  margin: 0;
}
.rd-panel-note {
  font-size: 12px;
  font-weight: 400;
}
.rd-table-wrap {
  border-top: 1px solid var(--color-border);
}
.rd-table td {
  vertical-align: top;
}
.rd-check {
  width: 2.5rem;
}
.rd-env,
.rd-status,
.rd-detail-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}
.rd-env strong {
  font-weight: 500;
}
.rd-env .mono,
.rd-small,
.rd-detail {
  font-size: 12px;
}
.rd-detail {
  color: var(--color-text-secondary);
}
.rd-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.rd-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
}
.rd-reason-form {
  max-width: 800px;
}
.rd-label-hint {
  font-weight: 400;
}
/* @group operations-access */
.op-short-id {
  font-weight: 400;
  font-size: 12px;
  margin-left: 0.25rem;
}
.op-pager {
  width: 100%;
}
.op-progress {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.op-progress:empty,
#op-stale:empty {
  display: none;
}
.op-progress-title {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}
.op-id {
  font-size: 12px;
  font-weight: 400;
}
.op-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.op-status-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.op-status-text strong {
  font-size: 1rem;
}
.op-status-text span {
  font-size: 14px;
}
.op-meter .mero-measure-label {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.op-meter .mero-progress {
  width: 100%;
}
.op-percent {
  font-variant-numeric: tabular-nums;
}
.op-hint,
.mcp-text,
.notice-text {
  margin: 0;
  font-size: 14px;
}
.op-message {
  margin: 0;
}
.op-recovery {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.op-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 0.75rem;
}
.op-actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
.op-actions-hint {
  margin: 0;
  text-align: right;
}
.op-diagnostics {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 13px;
}
.op-sub-id {
  display: block;
  font-size: 12px;
}
.op-resource {
  display: inline-flex;
  flex-direction: column;
}
.op-resource-kind {
  font-size: 12px;
}
.op-digest {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.op-digest-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.op-digest-value {
  flex: 1;
  min-width: 0;
  align-self: center;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.op-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.role-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.role-select {
  width: auto;
}
.role-form .form-error {
  flex-basis: 100%;
  margin: 0;
  font-size: 12px;
}
.user-ban {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
}
.user-ban-note {
  font-size: 12px;
}
.users-heading {
  margin-top: 0.5rem;
}
.secret-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.secret-panel[hidden],
[data-secret-panel][hidden] {
  display: none;
}
.secret-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 14px;
}
.secret-value {
  user-select: all;
  overflow-wrap: anywhere;
}
#api-key-form-wrap[hidden] {
  display: none;
}
.token-block {
  display: block;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface-raised);
  font-size: 13px;
  overflow-wrap: anywhere;
  user-select: all;
}
.danger-text {
  color: var(--color-danger);
}
.copy-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface-raised);
}
.copy-row-value {
  flex: 1;
  min-width: 0;
  align-self: center;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.copy-row-block {
  white-space: pre-wrap;
}
.mcp-tab-panel {
  padding-top: 0.75rem;
}
.mcp-tab-panel[hidden] {
  display: none;
}
.mcp-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}
.mcp-tools code {
  font-size: 13px;
}
.mcp-field-note {
  display: block;
  margin-top: 0.25rem;
  font-size: 14px;
}
.notice-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.login-notice {
  margin-top: 0.75rem;
}
.login-form {
  margin-top: 1rem;
}
.login-submit {
  width: 100%;
}
.login-form .form-error {
  margin: 0;
}
