/* ==========================================================================
   EasyRender Admin — Render Core Design System v2
   Brand: Precision tool for rendering engine management.
   Palette: Near-black core, single electric cyan accent, status-only semantics.
   Grid: 8px base scale. Typography: Plus Jakarta Sans + JetBrains Mono.
   ========================================================================== */

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

/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  /* ── Background Layers (near-black → dark navy) ── */
  --bg-root:         #080d14;
  --bg-elevated:     #0c1220;
  --bg-surface:      #101826;
  --bg-overlay:      #141e30;
  --bg-input:        #0a101c;

  /* ── Borders ── */
  --border-dim:      rgba(255, 255, 255, 0.04);
  --border-subtle:   rgba(255, 255, 255, 0.06);
  --border-default:  rgba(255, 255, 255, 0.08);
  --border-strong:   rgba(255, 255, 255, 0.12);
  --border-accent:   rgba(0, 212, 255, 0.20);

  /* ── Accent (single source of brand color) ── */
  --accent:          #00d4ff;
  --accent-dim:      rgba(0, 212, 255, 0.08);
  --accent-subtle:   rgba(0, 212, 255, 0.12);
  --accent-strong:   rgba(0, 212, 255, 0.25);
  --accent-glow:     0 0 12px rgba(0, 212, 255, 0.15);

  /* ── Status Colors (semantic only — badges, indicators) ── */
  --status-active:   #10b981;
  --status-active-bg: rgba(16, 185, 129, 0.12);
  --status-warning:  #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.12);
  --status-error:    #ef4444;
  --status-error-bg: rgba(239, 68, 68, 0.12);
  --status-info:     #6366f1;
  --status-info-bg:  rgba(99, 102, 241, 0.12);

  /* ── Text ── */
  /* FOUR STEPS, not one value under four names. Until 2026-09-21
     --text-secondary, --text-tertiary and --text-muted were all #e0e4e8 —
     352 call sites across three names that resolved to the same colour, one
     shade off --text-primary. So every label, value, caption and hint in the
     console rendered at the same brightness and the pages read as a flat
     wall of near-white text with no hierarchy at all. The intent was already
     written correctly at all 352 sites; only the values had collapsed.

     Contrast against the four surface tokens, measured not guessed. The
     dimmest step is 4.63:1 on the lightest surface (--bg-overlay), so every
     one of these is still legible body text and not decoration:
       secondary  11.03 / 10.59 / 10.07 / 9.45
       tertiary    7.34 /  7.05 /  6.70 / 6.29
       muted       5.40 /  5.19 /  4.93 / 4.63
     Do not darken --text-muted further without re-measuring: it is used on
     real sentences, not just on separators. */
  --text-primary:    #e8edf2;
  --text-secondary:  #b9c4d2;
  --text-tertiary:   #93a0b2;
  --text-muted:      #7b8899;
  --text-inverse:    #080d14;
  --text-accent:     #00d4ff;

  /* ── 8px Spacing Scale ── */
  --s-4:  4px;
  --s-8:  8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-20: 20px;
  --s-24: 24px;
  --s-32: 32px;
  --s-40: 40px;

  /* ── Radii ── */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;

  /* ── Transitions ── */
  --t-fast: 0.12s ease;
  --t-base: 0.18s ease;
  --t-slow: 0.25s ease;

  /* ── Typography ── */
  --font-ui:    'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;

  /* ── Shadows ── */
  --shadow-card: 0 1px 0 var(--border-subtle), 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-dropdown: 0 0 0 1px var(--border-default), 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 0 0 1px var(--border-strong), 0 16px 48px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   BASE
   ========================================================================== */
/* Skip-to-content link for keyboard accessibility */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--accent);
  color: var(--text-inverse);
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-to-content:focus {
  top: 8px;
}
body {
  background: var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle dot-grid on body (very faint — atmosphere only) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 24px 24px;
}

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

/* ── Focus visible ring (dark bg accessibility) ── */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Spinner fallback (if Bootstrap not loaded) ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.admin-nav {
  background: rgba(8, 13, 20, 0.85);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 var(--s-24);
  height: 52px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-nav .nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-nav .nav-brand {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.admin-nav .nav-brand svg {
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(0,212,255,0.3));
}
/* .admin-nav is a fixed 52px, so anything that wraps here overflows it
   rather than growing it. */
.admin-nav .nav-brand { flex: 0 0 auto; white-space: nowrap; }
.admin-nav .nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-12);
}
.admin-nav .btn-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: var(--s-4) var(--s-12);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--t-fast);
}
.admin-nav .btn-ghost:hover {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--text-accent);
}
.admin-metadata-container {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
  padding: var(--s-4) var(--s-8);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.admin-metadata-container:hover {
  background: var(--accent-dim);
  color: var(--text-primary);
}
/* The sign-out control is a <button> inside a POST form (see base.html), so it
   has to be stripped of the browser's button chrome to sit in the nav the way
   the anchor it replaced did. */
.admin-logout-form { margin: 0; display: flex; }
button.admin-metadata-container {
  background: none;
  border: 0;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.dashboard-shell {
  padding: var(--s-24) var(--s-24);
  max-width: 1440px;
  margin: 0 auto;
}

/* ==========================================================================
   STAT CARDS — Large numbers, clean labels, minimal decoration
   ========================================================================== */
.dashboard-stats {
  display: grid;
  /* Three, not four: feature usage moved out to .feature-usage below,
     because it is a list whose length is the data's, not a number. */
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-12);
  margin-bottom: var(--s-12);
}
@media (max-width: 992px) {
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .dashboard-stats { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s-20);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.stat-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-card);
}
/* Colored left edge (status only — minimal) */
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  border-radius: 0;
}
.stat-card.status-green::before  { background: var(--status-active); }
.stat-card.status-cyan::before   { background: var(--accent); }
.stat-card.status-amber::before  { background: var(--status-warning); }
.stat-card.status-purple::before { background: var(--status-info); }

.stat-label {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--s-8);
}
.stat-val {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--s-4);
  letter-spacing: -0.02em;
}
.stat-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* Feature usage — a full-width strip, one row per feature the telemetry has
   seen. Replaces .stat-features / .stat-feature-row, which were a three-row
   list living inside a stat card built for a single large number; nothing
   else used those two classes (grepped across templates and static/js). */
.feature-usage {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s-16) var(--s-20);
  margin-bottom: var(--s-24);
  position: relative;
  overflow: hidden;
}
/* Same 2px status edge the stat cards carry, so the strip reads as part of
   the same row rather than as a different kind of object. */
.feature-usage::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--status-info);
}
.feature-usage__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-12);
  flex-wrap: wrap;
  margin-bottom: var(--s-12);
}
.feature-usage__total {
  font-size: 11px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.feature-usage__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Two columns of rows on a wide screen so ten features do not become a
     ten-row column; one column once there is no room for two. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--s-24);
}
@media (max-width: 898px) {
  .feature-usage__list { grid-template-columns: 1fr; }
}
.feature-usage__row {
  display: grid;
  /* The name column is fixed so every bar in a column starts at the same x —
     a ragged left edge on the bars is what makes a list like this unreadable.
     minmax(0,…) on the track lets it shrink instead of forcing an overflow. */
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-12);
  padding: var(--s-8) 0;
  /* Separator on the TOP edge, not the bottom. With an odd number of rows
     the two columns end at different heights, and a bottom border leaves a
     line hanging under the shorter column with nothing beneath it. A top
     border cannot dangle: it always has a row under it by definition. */
  border-top: 1px solid var(--border-dim);
  font-size: 12px;
}
/* The first row of each of the two columns. */
.feature-usage__row:nth-child(1),
.feature-usage__row:nth-child(2) { border-top: none; }
@media (max-width: 898px) {
  /* One column here, so only the very first row starts the list. */
  .feature-usage__row:nth-child(2) { border-top: 1px solid var(--border-dim); }
}
.feature-usage__name {
  color: var(--text-secondary);
  /* A long label wraps rather than pushing the bar off the row. */
  overflow-wrap: anywhere;
}
.feature-usage__track {
  height: 6px;
  border-radius: 999px;
  background: var(--border-dim);
  overflow: hidden;
}
.feature-usage__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--status-info));
  /* A feature with a count of 1 next to one with 4000 still has to be
     visible, so the bar never renders as nothing. */
  min-width: 2px;
}
.feature-usage__count {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-accent);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.feature-usage__empty {
  display: flex;
  align-items: flex-start;
  gap: var(--s-12);
  margin: 0;
  padding: var(--s-16);
  border: 1px dashed var(--border-default);
  border-radius: var(--r-md);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-tertiary);
}
.feature-usage__empty svg {
  flex: 0 0 auto;
  /* Aligned to the first line of the paragraph rather than centred against
     all three of them — a 20px icon floating beside a three-line block is
     the shape this codebase has shipped twice before. */
  margin-top: 1px;
}

/* ==========================================================================
   CHANNEL STATUS STRIP
   ========================================================================== */

/* ==========================================================================
   TAB SYSTEM — Clean pill-style toggles
   ========================================================================== */
.dashboard-tabs {
  display: flex;
  gap: var(--s-4);
  margin-bottom: var(--s-20);
  padding-bottom: var(--s-12);
  border-bottom: 1px solid var(--border-subtle);
}
.section-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-8) var(--s-16);
  border: none;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
}
.section-tab:hover {
  color: var(--text-primary);
  background: var(--border-dim);
}
.section-tab.active {
  color: var(--text-accent);
  background: var(--accent-dim);
}
.section-tab svg {
  opacity: 0.6;
}
.section-tab.active svg {
  opacity: 1;
}

/* ==========================================================================
   TAB PANELS — Smooth appear
   ========================================================================== */
.tab-content-panel {
  display: none;
  animation: panelFadeIn 0.2s ease;
}
.tab-content-panel.active {
  display: block;
}
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   TOOLBAR — Bounded group for filters + search + actions
   ========================================================================== */
.panel-toolbar {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s-12);
  margin-bottom: var(--s-16);
}
.panel-toolbar__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-12);
}
.panel-toolbar__actions {
  display: flex;
  align-items: center;
  gap: var(--s-8);
}
.panel-toolbar__spacer {
  flex: 1;
}

/* ==========================================================================
   FILTER PILLS
   ========================================================================== */
.filter-pills {
  display: flex;
  gap: 1px;
  background: var(--bg-input);
  border-radius: var(--r-sm);
  padding: 2px;
}
.filter-pill {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  padding: var(--s-4) var(--s-12);
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.filter-pill:hover {
  color: var(--text-primary);
}
.filter-pill.active {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ==========================================================================
   SEARCH
   ========================================================================== */
.search-group {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  /* Take the slack in the toolbar row rather than sitting at a fixed width
     in the middle of it. MEASURED 2026-09-21: the Users tab's placeholder
     ("Search by email, name, or activation key…") needs 275px and the box
     was 198px, so it rendered as "…name, or ac" with the rest cut off —
     while the same row had ~600px of empty space to its left. */
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}
.search-group__input {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  padding: var(--s-4) var(--s-12);
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--t-fast);
  /* Grows into whatever the group was given, down to a width that still
     shows a useful amount of a typed query, and capped so it does not eat
     an entire empty toolbar. */
  flex: 1 1 auto;
  min-width: 160px;
  max-width: 340px;
}
.search-group__input:focus {
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
}
.search-group__input::placeholder {
  color: var(--text-tertiary);
}

/* ==========================================================================
   DATA CARDS (tables container)
   ========================================================================== */
.data-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   TABLES — Dark theme, subtle borders, hover states
   ========================================================================== */
.table-custom {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--text-primary);
  /* MEASURED 2026-09-21: across every console table, cells were rendering
     at rgb(33,37,41) — Bootstrap's default --bs-table-color — on a #0c1220
     surface. Contrast 1.21:1, i.e. invisible. Customer, Amount, Qty, org
     names, "Manage", the row-action buttons.
     The `color` above is on the TABLE; Bootstrap's `.table > :not(caption)
     > * > *` sets colour on the CELL, and a value set on the cell beats one
     inherited from the table. Setting the variable it reads fixes every
     cell at once, and the text utilities (.text-secondary, .text-green, …)
     still win over it because Bootstrap declares those !important.
     Do NOT "fix" this with a `.table-custom td { color: … }` rule: at
     (0,1,1) that ties Bootstrap's own selector and outranks every
     single-class colour utility on a cell. */
  --bs-table-color: var(--text-primary);
  --bs-table-bg: var(--bg-elevated);
  --bs-table-accent-bg: var(--bg-surface);
  --bs-table-hover-bg: rgba(255,255,255,0.03);
  --bs-table-striped-bg: rgba(255,255,255,0.02);
  background: var(--bg-elevated);
}
.table-custom th {
  background: var(--bg-surface);
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--s-12) var(--s-16);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-subtle);
}
.table-custom td {
  padding: var(--s-12) var(--s-16);
  border-bottom: 1px solid rgba(255,255,255,0.02);
  vertical-align: middle;
}

.table-custom tbody tr {
  transition: background var(--t-fast);
  background: var(--bg-elevated);
}
.table-custom tbody tr:hover {
  background: rgba(255,255,255,0.03);
}
/* ─── Screen Reader Only ─────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── Tables ────────────────────────────────────────────────────────────── */
.table-custom tbody tr:last-child td {
  border-bottom: none;
}

/* ── Text truncation utilities ── */
.text-truncate-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Right-align numeric columns (use class="number-cell" on <td>/<th>) */
.text-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Empty state — dark background */
.table-empty-state td,
td .table-empty-state {
  background: var(--bg-elevated);
}

/* Sticky table headers */
.table-responsive {
  overflow-x: auto;
}

/* Checkbox column */
.table-check-col {
  width: 40px;
  text-align: center;
}

/* Empty state row */
.table-empty-state {
  text-align: center;
  padding: var(--s-40) var(--s-24);
  color: var(--text-tertiary);
  background: var(--bg-elevated);
}
.table-empty-state-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--s-12);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-dim);
  border-radius: 50%;
  color: var(--text-tertiary);
}
.table-empty-state-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--s-4);
}
.table-empty-state-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: var(--s-16);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   LICENSE KEY — Terminal-style display
   ========================================================================== */
.premium-key {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: var(--r-xs);
  letter-spacing: 0.02em;
  /* An identifier is one token. "PAY-1041" was breaking after the hyphen in
     the Billing table's narrow Charge ID column and rendering as two lines,
     which reads as two different values. A chip that no longer fits should
     make its column wider, not split the thing it is showing.
     .key-secret-text below deliberately opts back out: a full secret is
     long enough that breaking it is better than overflowing. */
  white-space: nowrap;
}
.key-secret-text {
  word-break: break-all;
}

.hwid-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

/* ==========================================================================
   BADGES — Status only: green/amber/red
   ========================================================================== */
.badge-custom {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.badge-active  { background: var(--status-active-bg);  color: var(--status-active); }
.badge-revoked { background: var(--status-error-bg);   color: var(--status-error); }
.badge-danger  { background: var(--status-error-bg);   color: var(--status-error); }
.badge-completed { background: var(--status-active-bg);  color: var(--status-active); }
.badge-refunded  { background: var(--status-warning-bg); color: var(--status-warning); }
/* Used but never defined until 2026-09-21, so both rendered as bare
   uppercase text with a transparent background sitting in a row of real
   pills: `badge-warning` on the Activations billing chip
   (_tab_licenses.html:104) and `badge-cyan` on the device count in the
   licence modal and the renewal kind in the transactions list
   (_modals.html:220, licenses.js:210 and :360).
   Same defect the section-dot bg-yellow/bg-blue holes were — a class name
   invented at the call site that nobody ever added a rule for. They take
   existing tokens rather than new values; a third amber and a third cyan
   is how a palette stops meaning anything. */
.badge-warning   { background: var(--status-warning-bg); color: var(--status-warning); }
.badge-cyan      { background: var(--accent-dim);        color: var(--text-accent); }
.badge-failed    { background: var(--status-error-bg);   color: var(--status-error); }
/* Neutral. `unknown` is a status we cannot name; `count` is a plain number.
   Neither is an attention state, so neither may borrow amber — one
   declaration so they cannot drift into two answers. */
.badge-unknown,
.badge-count     { background: var(--border-dim);        color: var(--text-tertiary); }
/* A plan name (Standard, Pro): a word, so the uppercase badge type, in neutral grey.
   Not amber (.badge-unbound means "needs attention"), not mono (.badge-count is a number). */
.badge-plan      { background: var(--border-dim);        color: var(--text-secondary); }
/* A count is a number: mono and tabular so columns of them line up, and not
   uppercased the way .badge-custom uppercases words. */
.badge-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0;
}
/* AMBER MEANS ONE THING: needs attention. Users "No activation", Licenses
   "Unbound", Promos "Inactive"/"Unused". The Enterprise table painted its
   Seats/Members/Activations COUNTS with this until 2026-09-21, so a healthy
   org lit up amber on every row and an admin scanning for trouble got a
   false positive every time. Plain numbers take .badge-count. */
.badge-unbound {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}
.badge-event {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  background: var(--border-dim);
  padding: 2px 8px;
  border-radius: var(--r-xs);
}
.badge-channel-custom {
  background: var(--status-info-bg);
  color: var(--status-info);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  font-weight: 500;
}

/* ── Text utility overrides (dark bg readability) ── */
.text-secondary,
.text-muted,
.text-tertiary {
  color: #e0e4e8 !important;
}

/* Bootstrap badge overrides — dark-mode readable */
.badge {
  font-weight: 500;
}
.badge.bg-secondary {
  background: rgba(100, 116, 139, 0.30) !important;
  color: #e0e4e8 !important;
}
.badge.bg-success {
  background: rgba(16, 185, 129, 0.20) !important;
  color: #34d399 !important;
}
.badge.bg-danger {
  background: rgba(239, 68, 68, 0.20) !important;
  color: #f87171 !important;
}
.badge.bg-warning {
  background: rgba(245, 158, 11, 0.20) !important;
  color: #fbbf24 !important;
}
.badge.bg-info {
  background: rgba(6, 182, 212, 0.20) !important;
  color: #22d3ee !important;
}
.badge.bg-dark {
  background: rgba(255,255,255,0.10) !important;
  color: #e0e4e8 !important;
}
.badge.bg-light {
  background: rgba(255,255,255,0.10) !important;
  color: #e0e4e8 !important;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  font-family: var(--font-ui);
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--text-inverse);
  font-weight: 600;
}
.btn-primary:hover {
  background: #00bde6;
  border-color: #00bde6;
  box-shadow: var(--accent-glow);
}
.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-overlay);
}
.btn-danger {
  background: var(--status-error);
  border-color: var(--status-error);
  color: var(--text-primary);
}
.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}
.btn-sm {
  font-size: 12px;
  padding: var(--s-4) var(--s-12);
}
.btn-outline-light {
  border-color: var(--border-default);
  color: var(--text-secondary);
}
.btn-outline-light:hover {
  background: var(--border-dim);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-outline-secondary {
  border-color: var(--border-default);
  color: var(--text-secondary);
}
.btn-outline-secondary:hover {
  background: var(--border-dim);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-outline-danger {
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--status-error);
}
.btn-outline-danger:hover {
  background: var(--status-error-bg);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--status-error);
}
.btn-outline-cyan {
  border-color: rgba(0, 212, 255, 0.2);
  color: var(--accent);
}
.btn-outline-cyan:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.btn-outline-warning {
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--status-warning);
}
.btn-outline-success {
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--status-active);
}

/* Action buttons (modal footers) */
.action-btn {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: var(--s-8) var(--s-16);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}
.action-btn:hover {
  background: var(--border-dim);
  color: var(--text-primary);
}
.action-btn.danger {
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--status-error);
}
.action-btn.danger:hover {
  background: var(--status-error-bg);
  border-color: rgba(239, 68, 68, 0.4);
}

/* ── Disabled state (all buttons) ── */
.btn:disabled,
.btn[disabled],
.action-btn:disabled,
.action-btn[disabled] {
  color: #e0e4e8;
  opacity: 1;
  pointer-events: none;
  cursor: not-allowed;
}

/* ── Active/pressed state ── */
.btn:active:not(:disabled),
.action-btn:active:not(:disabled) {
  transform: scale(0.97);
  transform-origin: center;
}

/* Cyan action button */
.btn-cyan {
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  padding: var(--s-8) var(--s-16);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn-cyan:hover {
  background: #00bde6;
  box-shadow: var(--accent-glow);
}

/* Icon-only buttons */
.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  padding: var(--s-4);
  cursor: pointer;
  border-radius: var(--r-xs);
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover {
  color: var(--text-primary);
  background: var(--border-dim);
}
.btn-icon.danger:hover {
  color: var(--status-error);
  background: var(--status-error-bg);
}

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-control,
.form-select {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  padding: var(--s-8) var(--s-12);
  transition: border-color var(--t-fast);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
  outline: none;
}
.form-control::placeholder {
  color: var(--text-tertiary);
}
.form-control-sm {
  font-size: 12px;
  padding: var(--s-4) var(--s-8);
}
.form-check:not(.form-switch) > .form-check-input {
  width: 16px;
  height: 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xs);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.form-check:not(.form-switch) > .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' d='m6 10 3 3 5-6'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
}
.form-check:not(.form-switch) > .form-check-input:focus {
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
}
.table-custom .form-check-input {
  margin: 0;
  vertical-align: middle;
}
.form-label-premium {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--s-4);
  display: block;
}
.form-switch .form-check-input:checked {
  background-color: var(--accent);
}

/* ── Validation states ── */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--status-error) !important;
  box-shadow: 0 0 0 1px var(--status-error);
}
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: var(--status-error) !important;
  box-shadow: 0 0 0 1px var(--status-error), 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.field-error {
  color: var(--status-error);
  font-size: 11px;
  margin-top: 4px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-error::before {
  content: '⚠';
  font-size: 10px;
}

/* ==========================================================================
   GLASS / SECTION CARDS
   ========================================================================== */
.glass-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* Card header bar */
.card-header-premium {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-12);
  padding: var(--s-16) var(--s-20);
  border-bottom: 1px solid var(--border-subtle);
}
.form-section {
  padding: var(--s-20);
}

/* Section dot (colored indicator) */
.section-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
/* Every colour name a template actually asks for must appear here. An
   undefined one is not a wrong colour, it is NO colour: `bg-yellow` and
   `bg-blue` were used by _tab_settings.html and defined nowhere, so they
   computed to rgba(0,0,0,0) and left a transparent hole where the status
   dot should be. The aliases share one declaration with the name that was
   already defined rather than getting a second value of their own. */
.section-dot.bg-cyan   { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.section-dot.bg-green  { background: var(--status-active); }
.section-dot.bg-orange,
.section-dot.bg-yellow { background: var(--status-warning); }
.section-dot.bg-pink,
.section-dot.bg-blue   { background: var(--status-info); }

.section-header {
  display: flex;
  align-items: center;
  gap: var(--s-8);
}
.section-header h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.section-subtitle-premium {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s-16);
  padding-bottom: var(--s-8);
  border-bottom: 1px solid var(--border-subtle);
}

/* ==========================================================================
   BULK ACTIONS BAR — Hidden until items selected
   ========================================================================== */
.bulk-actions-bar {
  display: none;
  align-items: center;
  gap: var(--s-12);
  padding: var(--s-8) var(--s-12);
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-sm);
  margin-bottom: var(--s-12);
}
.bulk-actions-bar.is-visible {
  display: flex;
}
.bulk-actions-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  width: 100%;
}
.bulk-actions-bar__label {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.bulk-actions-bar__select {
  min-width: 150px;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.dashboard-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-16);
  padding: var(--s-16) 0;
}
.pag-btn {
  color: var(--text-secondary);
  text-decoration: none;
  /* MEASURED 2026-09-21: the Billing pagination rendered as two blank WHITE
     boxes. This class was written for the <a>/<span> the Activations tab
     uses and never reset the UA button chrome, and billing.js builds its
     arrows as <button> — so they came out with Chrome's rgb(239,239,239)
     background under near-white text, contrast 1.05:1. The class has to
     work for either element, because both use it. */
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.4;
  padding: var(--s-4) var(--s-12);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  font-size: 13px;
  transition: all var(--t-fast);
}
.pag-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}
.pag-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Row action buttons — the icon pair at the end of a table row.
   They stacked into two lines before this: two inline-blocks in a cell with
   no width rule, in a column narrow enough to wrap them, which doubled the
   row height on every row that had two actions. */
.row-actions {
  text-align: center;
  white-space: nowrap;
}
.btn-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-4) var(--s-8);
  line-height: 1;
}
.btn-row-action + .btn-row-action { margin-left: var(--s-4); }

/* ==========================================================================
   REGION LOCK — Settings > Security
   ========================================================================== */
.rl-intro {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--s-16);
  max-width: 68ch;
}
/* The state line, and the "what am I seen as" line under it, are the two
   facts the operator cannot get from anywhere else. They read as a pair. */
.rl-state {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--s-12) var(--s-16);
  border-radius: var(--r-md) var(--r-md) 0 0;
  border: 1px solid var(--border-default);
  border-bottom: none;
  background: var(--bg-elevated);
}
.rl-state__dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex: 0 0 auto;
}
.rl-state[data-state="open"]    { color: var(--status-active); }
.rl-state[data-state="locked"]  { color: var(--status-error); }
.rl-state[data-state="killed"]  { color: var(--status-warning); }
.rl-state[data-state="loading"] { color: var(--text-tertiary); }
.rl-state[data-state="open"]    .rl-state__dot { background: var(--status-active); box-shadow: 0 0 0 3px var(--status-active-bg); }
.rl-state[data-state="locked"]  .rl-state__dot { background: var(--status-error);  box-shadow: 0 0 0 3px var(--status-error-bg); }
.rl-state[data-state="killed"]  .rl-state__dot { background: var(--status-warning); box-shadow: 0 0 0 3px var(--status-warning-bg); }
.rl-state[data-state="loading"] .rl-state__dot { background: var(--text-tertiary); }

.rl-you {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s-8);
  font-size: 12px;
  color: var(--text-secondary);
  padding: var(--s-12) var(--s-16);
  border: 1px solid var(--border-default);
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: var(--bg-input);
  margin-bottom: var(--s-16);
}
.rl-you strong {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-accent);
}
/* An unvouched request is the one state where the country on screen means
   nothing at all, so it does not get to look like ordinary grey metadata. */
.rl-you__via { font-size: 11px; color: var(--text-tertiary); }
.rl-you__via[data-vouched="0"] { color: var(--status-warning); }

.rl-hint {
  margin: var(--s-8) 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-tertiary);
  max-width: 68ch;
}
.rl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  margin-top: var(--s-16);
}
/* .gate-act is a full-width block in the site-gate panel it came from; here
   the two sit side by side, so they size to their labels. */
.rl-actions .gate-act { width: auto; margin-top: 0; }
/* .gate-act[disabled] inherits `cursor: progress` from the site-gate panel,
   where disabled always means "a request is in flight". Here it usually
   means "this action is not available and will not become available until
   you change something", so it says so. And the primary button at .55
   opacity still read as live against this card's background. */
.rl-actions .gate-act[disabled] {
  cursor: not-allowed;
  /* Flat, so it does not read as "a request is in flight" the way
     .gate-act[disabled]'s inherited `cursor: progress` did, plus a real
     drop in contrast. The colour alone is not enough: even with the text
     scale fixed, --text-muted is deliberately still legible body text. */
  opacity: 0.5;
  background: var(--bg-elevated);
  border-color: var(--border-default);
  color: var(--text-muted);
}
/* The line under the buttons is the REASON the arm button is disabled — the
   single most useful sentence on this card when it is showing. It does not
   get to look like the hint text above it. */
#rl-warning:not(:empty) {
  margin-top: var(--s-12);
  padding: var(--s-8) var(--s-12);
  border-left: 2px solid var(--status-warning);
  background: var(--status-warning-bg);
  color: var(--text-secondary);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.rl-nginx { margin-top: var(--s-20); }
.rl-nginx summary {
  font-size: 12px;
  color: var(--text-accent);
  cursor: pointer;
}
.rl-nginx__code {
  margin: var(--s-12) 0 var(--s-8);
  padding: var(--s-12);
  border-radius: var(--r-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  /* A config block is the one thing on this page allowed to scroll
     sideways — wrapping it would make it wrong to paste. */
  overflow-x: auto;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre;
}
.rl-escape {
  margin-top: var(--s-20);
  padding: var(--s-12) var(--s-16);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-secondary);
}
.rl-escape code {
  font-family: var(--font-mono);
  color: var(--text-accent);
  background: var(--accent-dim);
  padding: 1px 6px;
  border-radius: var(--r-xs);
}

/* ==========================================================================
   MODALS — Elevated, dark, clean
   ========================================================================== */
.modal-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-modal);
  color: var(--text-primary);
}
.modal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--s-16) var(--s-20);
}
.modal-title {
  font-size: 15px;
  font-weight: 600;
}
/* ONE convention for a modal that cannot be undone. Delete User was red and
   Refund and Revoke Activation were the same cyan as "Create Enterprise
   Deal", so the colour of the heading said nothing about the consequence.
   Red on all three, and as a class rather than three inline styles. */
.modal-title--danger { color: var(--status-error); }
.modal-body {
  padding: var(--s-20);
}
.modal-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--s-12) var(--s-20);
  display: flex;
  justify-content: flex-end;
  gap: var(--s-8);
}
.modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* Dropdown menus */
.dropdown-menu-custom {
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-dropdown);
  padding: var(--s-4);
}
.dropdown-item-custom {
  color: var(--text-secondary);
  font-size: 12px;
  border-radius: var(--r-xs);
  padding: var(--s-8) var(--s-12);
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  gap: var(--s-8);
}
.dropdown-item-custom:disabled,
.dropdown-item-custom.disabled {
  color: #e0e4e8;
  opacity: 1;
  pointer-events: none;
  cursor: not-allowed;
}
.dropdown-item-custom:hover {
  background: var(--accent-dim);
  color: var(--text-primary);
}
.dropdown-item-custom.danger { color: var(--status-error); }
.dropdown-item-custom.danger:hover { background: var(--status-error-bg); }
.dropdown-item-custom.text-green { color: var(--status-active); }
.dropdown-item-custom.text-green:hover { background: var(--status-active-bg); }

/* Metadata cards (in license details modal) */
.metadata-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: var(--s-12);
}
.metadata-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

/* Modal visibility + smooth open animation */

.modal.show {
  display: flex;
}
.modal.fade {
  opacity: 1;
}
.modal.fade .modal-dialog {
  transform: translateY(-8px);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}
.modal.fade.show .modal-dialog {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   BRAND / HERO
   ========================================================================== */
.brand-gradient {
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard-hero {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s-16) var(--s-20);
  margin-bottom: var(--s-20);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   ANALYTICS CHARTS
   ========================================================================== */

/* Geography heatmap cards */

/* ==========================================================================
   PULSE / LIVE INDICATOR
   ========================================================================== */
.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-active);
  box-shadow: 0 0 6px var(--status-active);
  animation: pulse-glow 2s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--status-active); }
  50%      { opacity: 0.5; box-shadow: 0 0 8px var(--status-active); }
}

/* ==========================================================================
   TELEMETRY
   ========================================================================== */
.pre-telemetry {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 350px;
  line-height: 1.5;
}

/* Telemetry error block with stack trace (UX-12) */
.telemetry-error-block {
  max-width: 400px;
}
.telemetry-error-msg {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--status-error);
  background: var(--status-error-bg);
  border-left: 2px solid var(--status-error);
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 3px;
  word-break: break-word;
  line-height: 1.5;
}
.telemetry-stack-details {
  margin-top: 2px;
}
.telemetry-stack-summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--accent);
  user-select: none;
  padding: 2px 0;
}
.telemetry-stack-summary:hover {
  color: #00bde6;
}
.pre-stack-trace {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 8px;
  margin: 4px 0 0 0;
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 390px;
  max-height: 250px;
  overflow-y: auto;
  line-height: 1.4;
}

.btn-copy-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: all var(--t-fast);
  line-height: 1;
}
.btn-copy-icon:hover {
  background: var(--border-dim);
  color: var(--text-secondary);
  border-color: var(--border-default);
}

/* ==========================================================================
   PROMO CHANNEL CARDS
   ========================================================================== */
.promo-channel-card {
  padding: var(--s-16);
  transition: border-color var(--t-base);
}
.promo-channel-card:hover {
  border-color: var(--border-default);
}
.promo-channel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-12);
}
.promo-platform-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.promo-channel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-12);
  margin-bottom: var(--s-12);
}
.promo-stat {
  display: flex;
  flex-direction: column;
}
.promo-stat-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.promo-stat-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.promo-channel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s-12);
  border-top: 1px solid var(--border-subtle);
}
.promo-channel-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Promo Channel Loading Skeleton ─────────────────────────────────── */
.promo-skeleton-card {
  pointer-events: none;
  opacity: 0.7;
}

.skeleton-pill {
  display: inline-block;
  background: var(--border-subtle);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-pill:nth-child(2n) {
  animation-delay: 0.3s;
}

.skeleton-pill:nth-child(3n) {
  animation-delay: 0.6s;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.75; }
}

/* ==========================================================================
   TOGGLE ROWS (settings)
   ========================================================================== */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-12) 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: var(--s-16);
}
.toggle-row:last-child {
  border-bottom: none;
}
.toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1px;
}
.border-bottom-glass { border-bottom: 1px solid; border-color: var(--border-subtle); }
.border-top-glass    { border-top: 1px solid; border-color: var(--border-subtle); }

/* ==========================================================================
   TOAST NOTIFICATIONS
   ==========================================================================
   Used to be defined here (.toast-container / .toast-msg, z-index 9999,
   a translucent var(--bg-overlay) background). Replaced by the shared
   .ezr-toast-container / .ezr-toast in static/css/toast.css, linked in
   base.html's <head>, which every page that includes this stylesheet also
   loads. */

/* ==========================================================================
   PORTAL AUTH (shared with portal routes)
   ========================================================================== */
.portal-auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--s-40) var(--s-20); }
.portal-auth-shell { width: 100%; max-width: 440px; }
.portal-auth-header { text-align: center; margin-bottom: var(--s-32); }
.portal-auth-logo { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-dim); border: 1px solid var(--border-accent); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--s-16); overflow: hidden; box-shadow: 0 0 20px rgba(0,212,255,0.06); }
.portal-auth-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portal-auth-title { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: var(--s-4); letter-spacing: -0.02em; }
.portal-auth-tagline { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* Google Sign-in Button (admin login) */

.portal-card { background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: var(--s-24); box-shadow: var(--shadow-card); }

.download-btn { display: flex; align-items: center; justify-content: center; gap: var(--s-8); width: 100%; padding: var(--s-12); background: var(--accent); border: none; border-radius: var(--r-sm); color: var(--text-inverse); font-size: 14px; font-weight: 600; text-decoration: none; transition: all var(--t-fast); }
.download-btn:hover { background: #00bde6; box-shadow: var(--accent-glow); color: var(--text-inverse); }

.btn-sign-out { background: transparent; border: none; color: var(--text-tertiary); font-size: 13px; cursor: pointer; padding: var(--s-8) var(--s-16); transition: color var(--t-fast); }
.btn-sign-out:hover { color: var(--status-error); }

.plan-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-md); padding: var(--s-20); margin-bottom: var(--s-16); }

.portal-section-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); margin-bottom: var(--s-12); font-weight: 600; }

.badge-status-active  { background: var(--status-active-bg);  color: var(--status-active);  padding: 3px 10px; border-radius: var(--r-xs); font-size: 11px; font-weight: 600; }
.badge-status-revoked { background: var(--status-error-bg);   color: var(--status-error);   padding: 3px 10px; border-radius: var(--r-xs); font-size: 11px; font-weight: 600; }
.badge-status-warning { background: var(--status-warning-bg); color: var(--status-warning); padding: 3px 10px; border-radius: var(--r-xs); font-size: 11px; font-weight: 600; }
.badge-status-unbound { background: var(--status-warning-bg); color: var(--status-warning); padding: 3px 10px; border-radius: var(--r-xs); font-size: 11px; font-weight: 600; }

.portal-account-actions { display: flex; flex-direction: column; gap: var(--s-8); margin-bottom: var(--s-16); }

/* ==========================================================================
   REGISTRATION WIZARD
   ========================================================================== */

.step-indicator { display: flex; gap: var(--s-8); margin-bottom: var(--s-24); }
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-tertiary); transition: all var(--t-base); }
.step-dot.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.step-dot.done { background: var(--status-active-bg); border-color: var(--status-active); color: var(--status-active); }
.step-connector { flex: 1; height: 1px; background: var(--border-subtle); align-self: center; }
.step-connector.done { background: var(--status-active); }

/* ==========================================================================
   TEXT UTILITIES
   ========================================================================== */
.text-cyan    { color: var(--accent); }
.text-green   { color: var(--status-active); }
.text-orange  { color: var(--status-warning); }
.text-purple  { color: var(--status-info); }
.text-red     { color: var(--status-error); }

.text-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.word-break-all     { word-break: break-all; }
.white-space-nowrap { white-space: nowrap; }
.font-monospace     { font-family: var(--font-mono); }

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Firefox scrollbar */
html { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

/* ==========================================================================
   ALIGNMENT HELPERS
   ========================================================================== */

.gap-s8  { gap: var(--s-8); }

/* ═══════════════════════════════════════════════════════════════════════════
   CONFIRM MODAL — Single definition (deduplicated)
   ═══════════════════════════════════════════════════════════════════════════ */
.confirm-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: none; align-items: center; justify-content: center; z-index: 10000;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.confirm-modal-overlay.open {
  display: flex;
  animation: overlayFadeIn 0.18s ease;
}
@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }
.confirm-modal-box {
  background: var(--bg-overlay); border: 1px solid var(--border-default);
  border-radius: var(--r-lg); padding: var(--s-24); max-width: 440px; width: 90%;
  box-shadow: var(--shadow-modal);
  animation: modalSlideUp 0.2s ease;
}
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.confirm-modal-box h3 { margin-top: 0; color: var(--text-primary); font-size: 16px; font-weight: 600; }
.confirm-modal-box p { color: var(--text-secondary); font-size: 14px; margin-bottom: var(--s-20); line-height: 1.5; }
.confirm-modal-box .btn-row { display: flex; gap: var(--s-12); justify-content: flex-end; }
.confirm-modal-box .btn-cancel {
  background: var(--border-dim); color: var(--text-secondary);
  border: 1px solid var(--border-default); padding: var(--s-8) var(--s-16);
  border-radius: var(--r-sm); cursor: pointer; font-size: 13px; font-family: var(--font-ui);
  transition: all var(--t-fast);
}
.confirm-modal-box .btn-cancel:hover { background: var(--border-subtle); color: var(--text-primary); }
.confirm-modal-box .btn-danger {
  background: var(--status-error); color: #fff; border: none;
  padding: var(--s-8) var(--s-16); border-radius: var(--r-sm);
  cursor: pointer; font-size: 13px; font-weight: 600; font-family: var(--font-ui);
  transition: background var(--t-fast);
}
.confirm-modal-box .btn-danger:hover { background: #dc2626; }

/* ═══════════════════════════════════════════════════════════════════════════
   EMAIL TEMPLATE EDITOR
   ═══════════════════════════════════════════════════════════════════════════ */
.email-editor {
    font-family: var(--font-mono);
    font-size: 12px;
    min-height: 500px;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--r-md);
    padding: var(--s-12);
    resize: vertical;
    line-height: 1.5;
    tab-size: 2;
}
.email-editor:focus {
    border-color: var(--accent);
    box-shadow: var(--accent-glow);
    outline: none;
}
.email-vars-hint {
    margin-top: var(--s-8);
    padding: var(--s-8) var(--s-12);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--r-sm);
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.8;
}
.email-vars-hint strong {
    color: var(--accent);
    display: block;
    margin-bottom: var(--s-4);
}
.email-vars-hint code {
    background: var(--bg-overlay);
    color: var(--text-accent);
    padding: 2px 6px;
    border-radius: var(--r-xs);
    margin: 0 2px;
    font-size: 11px;
    white-space: nowrap;
}
.settings-card__footer {
    padding-top: var(--s-20);
    border-top: 1px solid var(--border-subtle);
}
.settings-card__footer .d-flex {
    width: 100%;
    display: flex;
    align-items: center;
}
.settings-card__footer a.text-muted {
    order: 1;
    margin-right: auto;
}
.settings-card__footer span[id$="-save-status"] {
    order: 2;
    margin-right: 16px;
}
.settings-card__footer .btn-preview {
    order: 3;
    margin-left: auto;
}
.settings-card__footer .btn-save {
    order: 4;
}
.btn-preview {
    background: var(--border-dim);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
    padding: var(--s-8) var(--s-16);
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
}
.btn-preview:hover {
    background: var(--border-subtle);
    border-color: var(--border-strong);
    color: var(--text-primary);
}
.btn-save {
    background: var(--accent);
    color: var(--text-inverse);
    border: none;
    padding: var(--s-8) var(--s-24);
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
}
.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 212, 255, 0.25);
}

/* ==========================================================================
   Analytics Bar Chart (Overview, Promos Usage, Telemetry Success Rate)
   ========================================================================== */
.analytics-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 200px;
    padding: 8px 0 0;
}
.analytics-bar-chart__bar-group {
    flex: 1;
    min-width: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}
.analytics-bar-chart__bar {
    width: 100%;
    max-width: 32px;
    border-radius: 4px 4px 0 0;
    background: var(--accent);
    transition: background 0.2s;
    min-height: 2px;
    position: relative;
}
.analytics-bar-chart__bar:hover {
    filter: brightness(1.3);
}
.analytics-bar-chart__label {
    font-size: 9px;
    color: var(--text-tertiary);
    margin-top: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.analytics-bar-chart__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 12px;
}

/* confirm-modal styles consolidated above — this duplicate block removed */

/* spinner-border consolidated in BASE section above */

/* ==========================================================================
   RESPONSIVE — Mobile / small viewport overrides
   ========================================================================== */
@media (max-width: 1024px) {
  .dashboard-shell { padding: var(--s-16); }
  .table-custom th,
  .table-custom td { padding: var(--s-8) var(--s-12); font-size: 12px; }
}
@media (max-width: 898px) {
  .admin-nav { padding: 0 var(--s-12); }
  .dashboard-tabs { flex-wrap: wrap; gap: var(--s-4); }
  .panel-toolbar__row { flex-direction: column; align-items: stretch; }
  .search-group__input { min-width: 0; width: 100%; }
  .modal-content { margin: var(--s-8); max-height: 95vh; }
  .modal-body { max-height: 60vh; overflow-y: auto; }
  /* Larger touch targets on mobile */
  .btn-icon { padding: var(--s-8); min-width: 44px; min-height: 44px; }
  .btn-sm { padding: var(--s-8) var(--s-16); font-size: 13px; }
  .filter-pill { padding: var(--s-8) var(--s-16); }
}
/* MEASURED 2026-09-21: at a 400px viewport the document was 593px wide and
   the whole page scrolled sideways. It was not the tables — those were fixed
   earlier and scroll inside their own wrapper — it was this: six nav items
   at their natural width in a row that could neither wrap (the bar is a
   fixed 52px) nor shrink (nothing set min-width). The links strip now
   scrolls within the bar, so the overflow stays inside the one element that
   has too much in it instead of being handed to the document. */
@media (max-width: 898px) {
  .admin-nav .nav-inner { gap: var(--s-12); }
  .admin-nav .nav-links {
    flex: 1 1 auto;
    /* Without this a flex item refuses to shrink below its content. */
    min-width: 0;
    /* flex-end here scrolled the strip to its END on a phone, so the first
       thing on screen was "Admin · Logout" and Dashboard and Analytics —
       the two links actually used — sat off-screen to the LEFT, where
       nothing suggests they exist. Start at the beginning; the account
       control is the one worth scrolling for. */
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* A scrollbar across a 52px bar is louder than the thing it scrolls. */
    scrollbar-width: none;
  }
  .admin-nav .nav-links::-webkit-scrollbar { display: none; }
  .admin-nav .nav-links > * { flex: 0 0 auto; }
  .admin-nav .btn-ghost,
  .admin-metadata-container { white-space: nowrap; }
}
@media (max-width: 576px) {
  .dashboard-stats { grid-template-columns: 1fr; }
  .admin-nav .nav-links { gap: var(--s-4); }
  .section-tab { font-size: 12px; padding: var(--s-4) var(--s-8); }
  .dashboard-pagination { flex-wrap: wrap; gap: var(--s-8); }
  /* Toast responsive sizing is now in the shared static/css/toast.css. */
}

/* ==========================================================================
   ANALYTICS TAB — user table, profile panel, alert cards
   Everything here is a class static/js/analytics.js builds by string
   concatenation. Grepping the templates for these names finds nothing, which
   is not the same as them being unused.
   ========================================================================== */

.section-dot.bg-red { background: var(--status-error); }

/* Sortable column header. The route sorts descending only, so there is one
   arrow state and no ascending variant to paint. */
.table-sort-btn {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
}
.table-sort-btn:hover { color: var(--text-primary); }
.table-sort-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.analytics-sort-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.analytics-sort-arrow.desc {
  border-top: 5px solid var(--accent);
  opacity: 1;
}
.analytics-sort-arrow.asc {
  border-bottom: 5px solid var(--accent);
  opacity: 1;
}

/* ── User rows ─────────────────────────────────────────────────────────── */
.analytics-user-row:hover { background: var(--border-dim); }
.analytics-user-row-expanded {
  background: var(--accent-dim);
  box-shadow: inset 3px 0 0 var(--accent);
}

.churn-badge {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  padding: 2px var(--s-8);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.churn-badge--low    { background: var(--status-active-bg);  color: var(--status-active); }
.churn-badge--medium { background: var(--status-warning-bg); color: var(--status-warning); }
.churn-badge--high   { background: var(--status-error-bg);   color: var(--status-error); }

.engagement-bar {
  display: inline-block;
  width: 64px;
  height: 6px;
  border-radius: 999px;
  background: var(--border-default);
  margin-right: var(--s-8);
  vertical-align: middle;
  overflow: hidden;
}
.engagement-bar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

/* ── Expanded profile panel ────────────────────────────────────────────── */
.analytics-profile-section { margin-bottom: var(--s-20); }
.analytics-profile-section:last-child { margin-bottom: 0; }
.analytics-profile-section h6 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--s-12);
  padding-bottom: var(--s-8);
  border-bottom: 1px solid var(--border-subtle);
}
.analytics-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--s-12);
}
.analytics-profile-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: var(--s-8) var(--s-12);
  min-width: 0;
}
.analytics-profile-item .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.analytics-profile-item .value {
  font-size: 13px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/* ── Alert cards ───────────────────────────────────────────────────────── */
.analytics-alert-card {
  height: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: var(--s-12) var(--s-16);
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.analytics-alert-card--danger  { border-left-color: var(--status-error); }
.analytics-alert-card--warning { border-left-color: var(--status-warning); }

.analytics-alert-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
}
.analytics-alert-card__email {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.analytics-alert-card__score {
  flex-shrink: 0;
  padding: 2px var(--s-8);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--border-dim);
  color: var(--text-secondary);
}
.analytics-alert-card__score--danger  { background: var(--status-error-bg);   color: var(--status-error); }
.analytics-alert-card__score--warning { background: var(--status-warning-bg); color: var(--status-warning); }

.analytics-alert-card__meta {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  font-size: 11px;
  color: var(--text-secondary);
}
.analytics-alert-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
}
.analytics-alert-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  margin-top: auto;
  padding-top: var(--s-4);
}

@media (max-width: 768px) {
  .analytics-profile-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Phone pass, 2026-09-30 ────────────────────────────────────────────────
   Measured at 390px: the three header stats stacked at full size and pushed
   the tab bar ~600px down, and nothing said the nav strip scrolls (it looked
   cut off at "Enterprise"). Header stats only: Billing and Analytics reuse
   .dashboard-stats for dollar amounts that need the width. */
@media (max-width: 576px) {
  .dashboard-stats--header { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8); }
  .dashboard-stats--header .stat-card { padding: var(--s-12); }
  .dashboard-stats--header .stat-label { font-size: 10px; letter-spacing: .04em; gap: 4px; }
  .dashboard-stats--header .stat-label svg { display: none; }
  .dashboard-stats--header .stat-val { font-size: 22px; line-height: 1.15; margin: 4px 0 0; }
  .dashboard-stats--header .stat-sub { display: none; }
  /* The strip scrolls; a fade at the edge says so. */
  .admin-nav .nav-links {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }
}

/* Billing and Analytics tiles set their column count inline, which beat every
   media query: on a phone "$9,845.00" was cut to "$9,8" and the labels ran
   into each other. Column counts are classes now, so they can step down. */
.dashboard-stats--3 { grid-template-columns: repeat(3, 1fr); }
.dashboard-stats--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 992px) {
  .dashboard-stats--3, .dashboard-stats--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .dashboard-stats--3, .dashboard-stats--4 { grid-template-columns: 1fr; }
}
