@font-face {
  font-family: Vazirmatn;
  src: url('/admin/assets/Vazirmatn.woff2') format('woff2');
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
}

:root {
  color-scheme: dark;
  --bg: #07120f;
  --bg-deep: #040a08;
  --surface: rgba(12, 28, 23, .82);
  --surface-raised: rgba(16, 38, 31, .88);
  --surface-subtle: rgba(22, 48, 39, .54);
  --line: rgba(153, 206, 184, .16);
  --line-strong: rgba(140, 218, 187, .28);
  --text: #edf7f3;
  --text-soft: #c6d8d1;
  --muted: #8ea79e;
  --faint: #60766e;
  --accent: #33cb91;
  --accent-strong: #159f6c;
  --accent-soft: rgba(35, 190, 132, .15);
  --info: #84b6ff;
  --warning: #efbd57;
  --warning-soft: rgba(175, 129, 34, .2);
  --danger: #f27e89;
  --danger-soft: rgba(181, 62, 77, .2);
  --success: #73deb1;
  --success-soft: rgba(32, 156, 105, .2);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 10px 26px rgba(0, 0, 0, .16);
  --shadow: 0 24px 70px rgba(0, 0, 0, .33);
  --content: 1480px;
  --page-x: clamp(16px, 2.2vw, 32px);
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 20px;
  --space-5: 24px;

  /* Falcon Admin design-token layer.  Existing values are intentionally
     aliased here first so Package 1 can establish ownership without moving
     the accepted Users geometry.  Later page migrations may consume the
     `--fa-*` contract one family at a time. */
  --fa-space-0: 0px;
  --fa-space-1: var(--space-1);
  --fa-space-2: var(--space-2);
  --fa-space-3: var(--space-3);
  --fa-space-4: var(--space-4);
  --fa-space-5: var(--space-5);
  --fa-page-gutter: var(--page-x);
  --fa-content-max: var(--content);
  --fa-surface-base: var(--surface);
  --fa-surface-raised: var(--surface-raised);
  --fa-surface-subtle: var(--surface-subtle);
  --fa-text: var(--text);
  --fa-text-soft: var(--text-soft);
  --fa-text-muted: var(--muted);
  --fa-accent: var(--accent);
  --fa-accent-strong: var(--accent-strong);
  --fa-danger: var(--danger);
  --fa-success: var(--success);
  --fa-border: var(--line);
  --fa-border-strong: var(--line-strong);
  --fa-radius-control: var(--radius-sm);
  --fa-radius-card: var(--radius);
  --fa-radius-modal: var(--radius-lg);
  --fa-control-compact-height: 32px;
  --fa-control-height: 40px;
  --fa-button-height: 36px;
  --fa-button-compact-height: 32px;
  --fa-table-header-height: 42px;
  --fa-table-row-height: 73px;
  --fa-menu-width: 240px;
  --fa-menu-reference-width: 170px;
  --fa-shell-header-height: 56px;
  --fa-shell-header-mobile-height: 54px;
  --fa-menu-offset: 42px;
  --fa-menu-padding: 8px;
  --fa-menu-row-height: 38px;
  --fa-menu-icon-size: 18px;
  --fa-menu-gap: 9px;
  --fa-menu-radius: 11px;
  --fa-menu-surface: rgba(7, 23, 17, .998);
  --fa-menu-shadow: 0 18px 42px rgba(0, 0, 0, .36);
  --fa-modal-width: 672px;
  --fa-switch-width: 34px;
  --fa-switch-height: 20px;
  --fa-progress-height: 6px;
  --fa-overlay-backdrop: rgba(2, 9, 7, .76);
  --fa-overlay-blur: 9px;
  --fa-shadow-card: var(--shadow-sm);
  --fa-shadow-overlay: var(--shadow);
  --fa-focus-ring: 0 0 0 3px rgba(42, 198, 137, .14);
  --fa-z-base: 0;
  --fa-z-overlay-content: 1;
  --fa-z-sticky: 40;
  --fa-z-menu: 50;
  --fa-z-overlay: 70;
  --fa-z-modal: 75;
  --fa-z-discovery-overlay: 78;
  --fa-z-nested-modal: 85;
  --fa-z-toast: 100;
}

* { box-sizing: border-box; }
html { background: var(--bg-deep); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(900px 480px at 84% -5%, rgba(35, 133, 96, .25), transparent 68%),
    radial-gradient(720px 460px at 2% 22%, rgba(23, 72, 57, .18), transparent 72%),
    linear-gradient(180deg, #091712 0%, var(--bg) 45%, var(--bg-deep) 100%);
  color: var(--text);
  font: 14px/1.55 Vazirmatn, Tahoma, "Segoe UI", sans-serif;
}
body.modal-open, body.popout-open, body.discovery-overlay-open, body.discovery-overlay-modal-open, body.falcon-overlay-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
:where(body.falcon-admin-shell) button,
:where(body.falcon-admin-shell) input,
:where(body.falcon-admin-shell) select,
:where(body.falcon-admin-shell) textarea { font: inherit; }
:where(body.falcon-admin-shell) button { cursor: pointer; }
:where(body.falcon-admin-shell) button:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .52; filter: saturate(.5); }
::selection { background: rgba(54, 205, 147, .28); }

/* Canonical Falcon shell owner.  Header geometry is namespaced so page
   components cannot accidentally move the menu trigger or change its flow. */
.falcon-admin-shell-header {
  position: sticky;
  top: 0;
  z-index: var(--fa-z-sticky);
  min-height: var(--fa-shell-header-height);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 14, 11, .78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.falcon-admin-shell-inner {
  width: 100%;
  max-width: none;
  min-height: var(--fa-shell-header-height);
  margin: auto;
  padding: var(--fa-space-0) var(--fa-page-gutter);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--fa-space-3);
}
.falcon-admin-shell-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
  direction: ltr;
}
.falcon-admin-language {
  position: relative;
  width: auto;
  height: var(--fa-control-compact-height);
  flex: 0 0 auto;
  direction: ltr;
}
.falcon-admin-language-trigger {
  display: inline-flex;
  height: var(--fa-control-compact-height);
  min-width: 84px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--fa-border);
  border-radius: 7px;
  background: rgba(16, 35, 29, .78);
  color: var(--fa-text-soft);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.falcon-admin-language-trigger:hover,
.falcon-admin-language-trigger:focus-visible,
.falcon-admin-language-trigger[aria-expanded="true"] {
  border-color: rgba(83, 219, 164, .52);
  background: rgba(23, 53, 42, .94);
  color: var(--fa-success);
}
.falcon-admin-language-trigger svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.falcon-admin-language-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: var(--fa-z-menu);
  display: grid;
  min-width: 116px;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--fa-border-strong);
  border-radius: 9px;
  background: var(--fa-menu-surface);
  box-shadow: var(--fa-menu-shadow);
  direction: ltr;
}
.falcon-admin-language-panel[hidden] { display: none; }
.falcon-admin-language-panel form { display: contents; }
.falcon-admin-language-panel button {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fa-text-soft);
  text-align: left;
  white-space: nowrap;
}
.falcon-admin-language-panel button:hover,
.falcon-admin-language-panel button:focus-visible,
.falcon-admin-language-panel button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--text);
}
.icon-button, .popout-close, .management-popout-close, .modal-close, .close-link {
  display: inline-grid;
  place-items: center;
  width: var(--fa-control-compact-height);
  height: var(--fa-control-compact-height);
  padding: var(--fa-space-0);
  border: 1px solid var(--fa-border);
  border-radius: 6px;
  background: rgba(16, 35, 29, .72);
  color: var(--text-soft);
}
.icon-button:hover, .popout-close:hover, .management-popout-close:hover, .modal-close:hover, .close-link:hover { border-color: var(--line-strong); background: rgba(26, 57, 46, .9); color: #fff; }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.icon-button.future { display: none; }

/* Canonical isolated admin menu owner.  This is the only shell navigation
   component; generic dropdown/menu selectors intentionally do not participate. */
.falcon-admin-menu-root {
  position: relative;
  width: var(--fa-control-compact-height);
  height: var(--fa-control-compact-height);
  flex: 0 0 var(--fa-control-compact-height);
  align-self: center;
  isolation: isolate;
}
.falcon-admin-menu-trigger {
  display: grid;
  position: absolute;
  inset: 0;
  place-items: center;
  width: var(--fa-control-compact-height);
  height: var(--fa-control-compact-height);
  min-height: var(--fa-control-compact-height);
  margin: 0;
  padding: var(--fa-space-0);
  appearance: none;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 35, 29, .78);
  color: var(--text-soft);
  filter: none;
  transform: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.falcon-admin-menu-trigger:hover,
.falcon-admin-menu-trigger:focus-visible,
.falcon-admin-menu-trigger[aria-expanded="true"] {
  border-color: rgba(83, 219, 164, .52);
  background: rgba(23, 53, 42, .94);
  color: var(--success);
  filter: none;
  transform: none;
}
.falcon-admin-menu-trigger-icon {
  display: block;
  width: var(--fa-menu-icon-size);
  height: var(--fa-menu-icon-size);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}
.falcon-admin-menu {
  position: absolute;
  top: var(--fa-menu-offset);
  right: 0;
  left: auto;
  z-index: var(--fa-z-menu);
  width: var(--fa-menu-width);
  max-width: calc(100vw - 24px);
  padding: var(--fa-menu-padding);
  border: 1px solid var(--line-strong);
  border-radius: var(--fa-menu-radius);
  background: var(--fa-menu-surface);
  box-shadow: var(--fa-menu-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  direction: rtl;
  overflow: hidden;
}
.falcon-admin-menu[hidden],
.falcon-admin-menu-submenu[hidden] { display: none; }
.falcon-admin-menu-row {
  display: grid;
  grid-template-columns: var(--fa-menu-icon-size) minmax(0, 1fr) var(--fa-menu-icon-size);
  justify-content: stretch;
  width: 100%;
  height: var(--fa-menu-row-height);
  min-height: var(--fa-menu-row-height);
  align-items: center;
  gap: var(--fa-menu-gap);
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  direction: rtl;
  text-align: right;
  font-size: 14px;
  font-weight: 650;
  line-height: 20px;
  filter: none;
  transform: none;
  transition: background .14s ease, color .14s ease;
}
.falcon-admin-menu-row:hover,
.falcon-admin-menu-row:focus-visible {
  border: 0;
  background: rgba(62, 127, 101, .17);
  color: #f6fffb;
  filter: none;
  transform: none;
}
.falcon-admin-menu-icon,
.falcon-admin-menu-chevron,
.falcon-admin-menu-chevron-slot {
  display: grid;
  width: var(--fa-menu-icon-size);
  height: var(--fa-menu-icon-size);
  place-items: center;
  align-self: center;
  justify-self: center;
}
.falcon-admin-menu-icon svg,
.falcon-admin-menu-chevron svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}
.falcon-admin-menu-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.falcon-admin-menu-chevron {
  color: var(--muted);
  transform: rotate(0deg);
  transition: color .14s ease, transform .16s ease;
}
.falcon-admin-menu-chevron svg { width: 14px; height: 14px; }
.falcon-admin-menu-discovery > .falcon-admin-menu-row[aria-expanded="true"] {
  background: rgba(45, 154, 111, .11);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(104, 222, 167, .12);
}
.falcon-admin-menu-discovery > .falcon-admin-menu-row[aria-expanded="true"] .falcon-admin-menu-chevron {
  color: var(--success);
  transform: rotate(180deg);
}
.falcon-admin-menu-submenu {
  display: grid;
  gap: 1px;
  margin: 2px 0 5px;
  padding: 2px 0;
  border-inline-start: 1px solid rgba(116, 205, 169, .18);
}
.falcon-admin-menu-subrow {
  display: flex;
  width: 100%;
  height: 32px;
  align-items: center;
  padding: 0 42px 0 12px;
  border-radius: 6px;
  color: #a9c5ba;
  direction: rtl;
  font-size: 13px;
  font-weight: 580;
  line-height: 20px;
  text-align: right;
  white-space: nowrap;
}
.falcon-admin-menu-subrow:hover,
.falcon-admin-menu-subrow:focus-visible { background: rgba(62, 127, 101, .13); color: #ecfaf4; }
.falcon-admin-menu-divider { height: 1px; margin: 6px 6px; background: var(--line); }
.falcon-admin-menu-form { margin: 0; }
.falcon-admin-menu-logout {
  background: rgba(138, 50, 63, .55);
  color: #ffb8c0;
}
.falcon-admin-menu-logout:hover,
.falcon-admin-menu-logout:focus-visible { background: rgba(151, 53, 67, .72); color: #ffe6e9; }

.main { width: min(var(--fa-content-max), 100%); margin: auto; padding: var(--fa-space-5) var(--fa-page-gutter) 48px; }
.top, .page-head, .discovery-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fa-space-3);
  margin-bottom: var(--fa-space-4);
}
.top h1, .top h2, .page-head h1, .page-head h2, .discovery-top h2 { margin: 0; font-size: clamp(20px, 2vw, 25px); line-height: 1.25; letter-spacing: -.02em; }
.top .muted, .page-head .muted, .discovery-top .muted { margin-top: 5px; max-width: 760px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 11px; line-height: 1.65; }
.eyebrow { color: #83d6b6; font-size: 10px; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; }
.mono, [dir="ltr"] { direction: ltr; text-align: left; unicode-bidi: isolate; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; }

/*
 * Canonical opt-in primitives
 *
 * These classes are deliberately namespaced and are not applied to every
 * page in Package 1.  They provide one safe owner for future migrations while
 * the existing selectors remain compatibility rules.  Keeping the contracts
 * opt-in is what makes the accepted Users page pixel-stable in this package.
 */
.fa-admin-surface,
.fa-admin-card {
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-card);
  background: linear-gradient(145deg, var(--fa-surface-raised), var(--fa-surface-base));
  box-shadow: var(--fa-shadow-card);
}
.fa-admin-surface { padding: var(--fa-space-4); }
.fa-admin-card { padding: var(--fa-space-4); }
.fa-admin-stat-card {
  display: grid;
  min-height: 103px;
  align-content: center;
  gap: var(--fa-space-1);
  padding: var(--fa-space-4);
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-card);
  background: linear-gradient(145deg, var(--fa-surface-raised), var(--fa-surface-base));
  box-shadow: var(--fa-shadow-card);
}
.fa-admin-stat-card > :first-child { color: var(--muted); font-size: 14px; line-height: 21px; }
.fa-admin-stat-card > :last-child { color: var(--fa-text, var(--text)); font-size: 30px; line-height: 45px; font-variant-numeric: tabular-nums; }
.fa-admin-toolbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: var(--fa-space-3);
  padding: var(--fa-space-3) var(--fa-space-5);
  border-bottom: 1px solid var(--fa-border);
}
.fa-admin-table-shell {
  overflow: auto;
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-card);
  background: rgba(7, 18, 14, .5);
}
.fa-admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
.fa-admin-table > thead > tr { min-height: var(--fa-table-header-height); }
.fa-admin-table > thead > tr > th {
  height: var(--fa-table-header-height);
  padding: 12px var(--fa-space-5);
  border-bottom: 1px solid var(--fa-border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 16px;
  text-align: right;
  white-space: nowrap;
}
.fa-admin-table > tbody > tr { min-height: var(--fa-table-row-height); }
.fa-admin-table > tbody > tr > td {
  min-height: var(--fa-table-row-height);
  padding: 16px var(--fa-space-5);
  border-bottom: 1px solid var(--fa-border);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 20px;
  text-align: right;
  vertical-align: middle;
}
.fa-admin-table > tbody > tr:last-child > td { border-bottom: 0; }
.fa-admin-table > tbody > tr:hover > td { background: rgba(46, 94, 75, .15); }
.fa-admin-table .fa-admin-cell-ltr { direction: ltr; text-align: left; unicode-bidi: isolate; }
.fa-admin-table .fa-admin-cell-number { direction: ltr; font-variant-numeric: tabular-nums; text-align: center; }
.fa-admin-control,
.fa-admin-select,
.fa-admin-textarea {
  width: 100%;
  min-height: var(--fa-control-height);
  padding: 8px 12px;
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-control);
  background: rgba(5, 16, 12, .66);
  color: var(--text);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.fa-admin-textarea { min-height: 92px; resize: vertical; }
.fa-admin-control::placeholder,
.fa-admin-textarea::placeholder { color: var(--faint); }
.fa-admin-control:focus,
.fa-admin-select:focus,
.fa-admin-textarea:focus { border-color: rgba(60, 213, 151, .75); background: rgba(6, 22, 16, .9); box-shadow: var(--fa-focus-ring); }
.fa-admin-control:disabled,
.fa-admin-select:disabled,
.fa-admin-textarea:disabled { cursor: not-allowed; opacity: .55; }
.fa-admin-button {
  display: inline-flex;
  min-height: var(--fa-button-height);
  align-items: center;
  justify-content: center;
  gap: var(--fa-space-1);
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--fa-radius-control);
  background: linear-gradient(180deg, #1aae77, var(--accent-strong));
  color: #f5fffb;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.2;
  transition: background .16s ease, border-color .16s ease, filter .16s ease;
}
.fa-admin-button:hover { border-color: rgba(185, 255, 222, .28); filter: brightness(1.08); }
.fa-admin-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fa-admin-button:disabled,
.fa-admin-button[aria-disabled="true"] { cursor: not-allowed; opacity: .52; filter: saturate(.5); transform: none; }
.fa-admin-button--primary { background: linear-gradient(180deg, #1aae77, var(--accent-strong)); color: #f5fffb; }
.fa-admin-button--secondary { border-color: var(--fa-border); background: rgba(31, 57, 47, .72); color: var(--text-soft); }
.fa-admin-button--ghost { border-color: var(--fa-border); background: transparent; color: var(--text-soft); }
.fa-admin-button--danger { border-color: rgba(242, 126, 137, .25); background: rgba(137, 49, 62, .8); color: #ffe6e9; }
.fa-admin-button--compact { min-height: var(--fa-button-compact-height); padding: 0 12px; }
.fa-admin-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
}
.fa-admin-switch {
  position: relative;
  display: inline-flex;
  width: var(--fa-switch-width);
  height: var(--fa-switch-height);
  align-items: center;
  direction: ltr;
  cursor: pointer;
}
.fa-admin-switch > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fa-admin-switch > .fa-admin-switch-track {
  position: relative;
  display: block;
  width: var(--fa-switch-width);
  height: var(--fa-switch-height);
  padding: 1px;
  border: 1px solid #5d756c;
  border-radius: 999px;
  background: #3a5048;
}
.fa-admin-switch > .fa-admin-switch-track::after {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dbe9e3;
  content: '';
  transition: transform .16s ease;
}
.fa-admin-switch > input:checked + .fa-admin-switch-track { border-color: var(--accent); background: var(--accent-strong); }
.fa-admin-switch > input:checked + .fa-admin-switch-track::after { transform: translateX(14px); }
.fa-admin-modal {
  position: relative;
  z-index: var(--fa-z-modal);
  width: min(var(--fa-modal-width), 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: var(--fa-space-5);
  border: 1px solid var(--fa-border-strong);
  border-radius: var(--fa-radius-modal);
  background: rgba(12, 29, 23, .95);
  box-shadow: var(--fa-shadow-overlay);
}
.fa-admin-modal-head,
.fa-admin-modal-foot,
.fa-admin-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--fa-space-3); }
.fa-admin-modal-head { margin-bottom: var(--fa-space-3); }
.fa-admin-modal-foot { margin-top: var(--fa-space-3); padding-top: var(--fa-space-3); border-top: 1px solid var(--fa-border); }
.fa-admin-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--fa-z-overlay);
  display: grid;
  place-items: center;
  padding: var(--fa-space-4);
}
.fa-admin-overlay::before {
  position: absolute;
  inset: 0;
  background: var(--fa-overlay-backdrop);
  backdrop-filter: blur(var(--fa-overlay-blur));
  -webkit-backdrop-filter: blur(var(--fa-overlay-blur));
  content: '';
}
.fa-admin-section-head { margin-bottom: var(--fa-space-2); }
.fa-admin-section-head > :first-child { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.fa-admin-empty { padding: 34px; color: var(--muted); text-align: center; }

/* Shared panels, metrics, controls, and tables */
.card {
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-card);
  background: linear-gradient(145deg, var(--fa-surface-raised), var(--fa-surface-base));
  box-shadow: var(--fa-shadow-card);
  padding: var(--fa-space-4);
}
.grid { display: grid; gap: var(--fa-space-3); }
.stats { grid-template-columns: repeat(5, minmax(132px, 1fr)); margin-bottom: var(--fa-space-4); }
.stat, .discovery-stat, .queue-stat, .summary-card { min-height: 84px; display: grid; align-content: center; gap: 5px; }
.stat strong, .discovery-stat strong, .queue-stat strong { display: block; font-size: 25px; line-height: 1.1; letter-spacing: -.03em; }
.stat > span, .discovery-stat > span, .queue-stat > span, .summary-card > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.actions, .discovery-actions, .compact-actions, .inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn, :where(body.falcon-admin-shell) button {
  display: inline-flex;
  min-height: var(--fa-button-height);
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--fa-radius-control);
  background: linear-gradient(180deg, #1aae77, var(--accent-strong));
  color: #f5fffb;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.2;
  transition: background .16s ease, border-color .16s ease, filter .16s ease;
}
.btn:hover, :where(body.falcon-admin-shell) button:hover { border-color: rgba(185, 255, 222, .28); filter: brightness(1.08); }
.btn.secondary, :where(body.falcon-admin-shell) button.secondary { border-color: var(--fa-border); background: rgba(31, 57, 47, .72); color: var(--text-soft); }
.btn.secondary:hover, :where(body.falcon-admin-shell) button.secondary:hover { background: rgba(43, 79, 65, .86); color: #fff; }
.btn.danger, :where(body.falcon-admin-shell) button.danger, .danger-outline { border-color: rgba(242, 126, 137, .25); background: rgba(137, 49, 62, .8); color: #ffe6e9; }
.btn.small, :where(body.falcon-admin-shell) button.small { min-height: 32px; padding: 5px 9px; border-radius: 7px; font-size: 10px; }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   Shared operator action system (Falcon UI consistency pass).
   One canonical button geometry for anchors and native buttons.
   `.button` is the legacy Game Pack spelling and is aliased onto
   the same contract as `.btn` so every operator action renders as
   a real control instead of plain text. Presentation-only.
   ============================================================ */
.button, a.button {
  display: inline-flex;
  min-height: var(--fa-button-height);
  align-items: center;
  justify-content: center;
  gap: var(--fa-space-1);
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--fa-radius-control);
  background: linear-gradient(180deg, #1aae77, var(--accent-strong));
  color: #f5fffb;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, filter .16s ease, opacity .16s ease;
}
.button:hover, a.button:hover { border-color: rgba(185, 255, 222, .28); filter: brightness(1.08); }
.button:focus-visible, a.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.button.secondary, a.button.secondary { border-color: var(--fa-border); background: rgba(31, 57, 47, .72); color: var(--text-soft); }
.button.secondary:hover, a.button.secondary:hover { background: rgba(43, 79, 65, .86); color: #fff; }
.button.primary, a.button.primary { background: linear-gradient(180deg, #1aae77, var(--accent-strong)); color: #f5fffb; }
.button.danger, a.button.danger { border-color: rgba(242, 126, 137, .25); background: rgba(137, 49, 62, .8); color: #ffe6e9; }
.button.danger:hover, a.button.danger:hover { background: rgba(160, 58, 74, .92); }
.button.small, a.button.small { min-height: var(--fa-button-compact-height); padding: 5px 9px; border-radius: 7px; font-size: 10px; }
.button.ghost, a.button.ghost { border-color: var(--fa-border); background: transparent; color: var(--text-soft); }
.button.ghost:hover, a.button.ghost:hover { background: rgba(43, 79, 65, .5); color: #fff; }

/* Explicit disabled treatment: readable but clearly not actionable. */
.button[disabled], .button.disabled, .button:disabled,
a.button[disabled], a.button.disabled,
.btn[disabled], .btn.disabled,
:where(body.falcon-admin-shell) button[disabled],
:where(body.falcon-admin-shell) button.disabled {
  cursor: not-allowed;
  opacity: .55;
  filter: saturate(.55) brightness(.92);
  transform: none;
  border-style: dashed;
}
.button[disabled]:hover, .button.disabled:hover, .btn[disabled]:hover, .btn.disabled:hover,
:where(body.falcon-admin-shell) button[disabled]:hover,
:where(body.falcon-admin-shell) button.disabled:hover { filter: saturate(.55) brightness(.92); border-color: var(--fa-border); }

/* Semantic aliases so new markup can read as intent. */
.btn-primary, .btn-secondary, .btn-danger, .btn-ghost, .btn-small { display: inline-flex; align-items: center; justify-content: center; gap: var(--fa-space-1); min-height: var(--fa-button-height); padding: 8px 12px; border: 1px solid transparent; border-radius: var(--fa-radius-control); font-size: 12px; font-weight: 780; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .16s ease, border-color .16s ease, filter .16s ease; }
.btn-primary { background: linear-gradient(180deg, #1aae77, var(--accent-strong)); color: #f5fffb; }
.btn-secondary { border-color: var(--fa-border); background: rgba(31, 57, 47, .72); color: var(--text-soft); }
.btn-danger { border-color: rgba(242, 126, 137, .25); background: rgba(137, 49, 62, .8); color: #ffe6e9; }
.btn-ghost { border-color: var(--fa-border); background: transparent; color: var(--text-soft); }
.btn-small { min-height: var(--fa-button-compact-height); padding: 5px 9px; border-radius: 7px; font-size: 10px; }
.btn-primary:hover, .btn-secondary:hover, .btn-danger:hover, .btn-ghost:hover { filter: brightness(1.08); border-color: rgba(185, 255, 222, .28); }
.btn-secondary:hover { background: rgba(43, 79, 65, .86); color: #fff; }
.btn-danger:hover { background: rgba(160, 58, 74, .92); }
.btn-ghost:hover { background: rgba(43, 79, 65, .5); color: #fff; }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-danger:focus-visible, .btn-ghost:focus-visible, .btn-small:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   Shared action grouping. One predictable row layout for page
   headers, card footers, form footers, and table row actions.
   Ordering convention: secondary/safe actions first, then the
   primary action last (inline-end for LTR operator surfaces).
   ============================================================ */
.action-group, .card-actions, .page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.page-actions { justify-content: flex-end; }
.card-actions { justify-content: flex-end; padding-top: var(--fa-space-3); margin-top: var(--fa-space-3); border-top: 1px solid var(--fa-border); }
.card-actions:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.form-actions, .form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: var(--fa-space-3);
  border-top: 1px solid var(--line);
}
.form-actions .button, .form-actions .btn, .form-actions button { flex: 0 0 auto; }
.table-actions-cell .actions, .table-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ============================================================
   Shared operator layout primitives. These classes were already
   used by the Game Pack / review / publication surfaces but had
   no definition, so the pages rendered without their intended
   rhythm. Geometry mirrors the polished Discovery/Game Detail
   pages and reuses the existing --fa-* tokens.
   ============================================================ */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--fa-space-4); flex-wrap: wrap; margin: 0 0 var(--fa-space-4); }
.page-heading h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: -.02em; line-height: 1.15; }
.page-heading p { margin: 4px 0 0; color: var(--fa-text-muted); font-size: 12px; }
.page-heading .eyebrow { display: block; margin-bottom: 5px; }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fa-space-3); align-items: start; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--fa-space-2); margin-bottom: var(--fa-space-3); flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 13px; letter-spacing: -.01em; }
.card-head > a, .card-head > .button, .card-head > .btn { flex: 0 0 auto; }

.key-value { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.key-value dt { color: var(--fa-text-muted); font-size: 11px; font-weight: 650; }
.key-value dd { margin: 0; color: var(--fa-text-soft); font-size: 12px; word-break: break-word; }
.key-value.compact { gap: 4px 10px; }
.key-value div > dt, .key-value > div > dd { margin: 0; }

.safety-note { border-left: 3px solid var(--fa-accent); background: rgba(31, 57, 47, .4); }
.safety-note > strong:first-child { display: block; margin-bottom: 4px; color: var(--fa-text); }
.safety-note p { margin: 2px 0 0; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--fa-space-3); margin-bottom: var(--fa-space-4); }
.stat-card { min-height: 84px; display: grid; align-content: center; gap: 5px; padding: var(--fa-space-4); border: 1px solid var(--fa-border); border-radius: var(--fa-radius-card); background: rgba(7, 18, 14, .5); box-shadow: var(--fa-shadow-card); }
.stat-card > span { color: var(--fa-text-muted); font-size: 11px; font-weight: 650; }
.stat-card > strong { font-size: 25px; line-height: 1.1; letter-spacing: -.03em; }

.pagination { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Compact density for action controls living inside a discovery module. */
.discovery-module .button, .discovery-module .btn { min-height: 32px; padding: 0 11px; border-radius: 6px; font-size: 11px; }
.discovery-module .button.small, .discovery-module .btn.small, .discovery-module .button.compact, .discovery-module .btn.compact { min-height: 28px; padding: 0 9px; font-size: 10px; }

/* Sticky action footer for long operator forms so the final
   confirmation stays reachable while scrolling. Used sparingly. */
.sticky-form-footer {
  position: sticky;
  inset-block-end: 0;
  z-index: var(--fa-z-sticky);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: var(--fa-space-3);
  margin-top: var(--fa-space-3);
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-card);
  background: rgba(9, 22, 17, .94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .28);
}

/* Responsive: long action rows collapse to full width, never overflow. */
@media (max-width: 1180px) {
  .page-heading { align-items: flex-start; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .page-heading { flex-direction: column; align-items: stretch; }
  .page-heading .page-actions, .page-heading > .compact-actions, .page-heading > div:last-child { justify-content: flex-start; }
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

.table-wrap { overflow: auto; border: 1px solid var(--fa-border); border-radius: var(--fa-radius-card); background: rgba(7, 18, 14, .5); }
:where(body.falcon-admin-shell) table { width: 100%; min-width: 720px; border-collapse: collapse; }
:where(body.falcon-admin-shell) th, :where(body.falcon-admin-shell) td { padding: 11px 13px; border-bottom: 1px solid var(--fa-border); vertical-align: middle; text-align: right; }
:where(body.falcon-admin-shell) th { position: sticky; top: 0; z-index: 1; height: var(--fa-table-header-height); background: rgba(12, 29, 23, .97); color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
:where(body.falcon-admin-shell) td { height: 52px; color: var(--text-soft); font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(46, 94, 75, .15); }
.empty, .empty-state { padding: 34px; color: var(--muted); text-align: center; }
.empty-state { max-width: 680px; margin: auto; }
.empty-state h2 { margin: 0 0 6px; color: var(--text); }

.badge, .node-state, .decision-chip, .runtime-chip, .risk-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 780;
  line-height: 1.35;
  white-space: nowrap;
}
.badge.active, .badge.applied, .badge.direct, .badge.temp_routed, .badge.published, .badge.prepared, .badge.approved, .badge.pass, .node-state.connected, .decision-chip.route, .runtime-chip.on, .runtime-on { border-color: rgba(97, 216, 162, .28); background: var(--success-soft); color: #8bf0c3; }
.badge.pending, .badge.scheduled, .badge.review, .badge.unknown, .badge.needs_route, .badge.observed, .badge.requested, .badge.applying, .node-state.pending, .decision-chip.review { border-color: rgba(241, 188, 80, .28); background: var(--warning-soft); color: #ffd77e; }
.badge.inactive, .badge.disabled, .badge.expired, .badge.exhausted, .badge.blocked, .badge.rejected, .badge.ignored, .badge.rolled_back, .badge.cancelled, .badge.fail, .node-state.offline, .node-state.disabled, .decision-chip.disabled, .runtime-chip.off, .runtime-off { border-color: rgba(242, 126, 137, .27); background: var(--danger-soft); color: #ffabb3; }
.badge.completed, .badge.already_routed, .badge.neutral, .runtime-chip.neutral { border-color: rgba(133, 183, 255, .25); background: rgba(67, 102, 145, .22); color: #b4d3ff; }
.decision-chip.direct { border-color: rgba(97, 216, 162, .2); background: rgba(29, 108, 75, .22); color: #a4eccb; }
.risk-chip.high { border-color: rgba(242, 168, 78, .3); background: rgba(117, 66, 26, .36); color: #ffd08b; }

.notice, .error, .alert, .info-banner {
  margin-bottom: var(--space-3);
  padding: 10px 12px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.65;
}
.notice { border-color: rgba(100, 222, 167, .3); background: rgba(24, 104, 70, .22); color: #aeefd0; }
.error { border-color: rgba(242, 126, 137, .34); background: rgba(117, 43, 54, .3); color: #ffc7cd; }
.info-banner { border-color: var(--line); background: var(--surface-subtle); color: var(--text-soft); }

.form { width: min(880px, 100%); }
.form.form-wide, .form-shell { width: min(1040px, 100%); }
.form-grid, .session-info-grid, .session-advanced-body, .domain-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
:where(body.falcon-admin-shell) label { color: var(--text-soft); font-size: 12px; font-weight: 720; }
.field-help { min-height: 15px; color: var(--muted); font-size: 10px; }
.checkbox-field { align-content: center; }
.checkbox-field label { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { width: auto; }
:where(body.falcon-admin-shell) input,
:where(body.falcon-admin-shell) select,
:where(body.falcon-admin-shell) textarea {
  width: 100%;
  min-height: var(--fa-control-height);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(5, 16, 12, .66);
  color: var(--text);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
:where(body.falcon-admin-shell) input::placeholder,
:where(body.falcon-admin-shell) textarea::placeholder { color: var(--faint); }
:where(body.falcon-admin-shell) input:focus,
:where(body.falcon-admin-shell) select:focus,
:where(body.falcon-admin-shell) textarea:focus { border-color: rgba(60, 213, 151, .75); background: rgba(6, 22, 16, .9); box-shadow: var(--fa-focus-ring); }
:where(body.falcon-admin-shell) input:disabled,
:where(body.falcon-admin-shell) select:disabled,
:where(body.falcon-admin-shell) textarea:disabled { opacity: .55; cursor: not-allowed; }
:where(body.falcon-admin-shell) input[readonly],
:where(body.falcon-admin-shell) textarea[readonly] {
  border-color: rgba(153, 206, 184, .11);
  background: rgba(7, 18, 14, .5);
  color: var(--text-soft);
  cursor: default;
}
:where(body.falcon-admin-shell) textarea { min-height: 92px; resize: vertical; }
.form-actions { display: flex; grid-column: 1 / -1; align-items: center; justify-content: flex-start; gap: 8px; margin-top: 4px; padding-top: var(--space-3); border-top: 1px solid var(--line); }

.section { margin-top: var(--space-4); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.section-head h2, .section-head h3 { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); gap: var(--space-3); }
.detail-list { display: grid; gap: 0; }
.detail-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding: 9px 0; border-bottom: 1px dashed var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list > div > span { color: var(--muted); font-size: 11px; }
.detail-list strong { overflow-wrap: anywhere; text-align: end; }
.progress { display: block; height: 5px; min-width: 92px; overflow: hidden; border-radius: 999px; background: rgba(144, 190, 170, .16); }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5bb5ff, #5ce0ad); }

details.technical-details, details.session-advanced, details.discovery-details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(7, 20, 15, .38);
}
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.technical-details > summary, details.session-advanced > summary, details.discovery-details > summary { padding: 9px 11px; color: var(--text-soft); font-size: 11px; font-weight: 750; }
details.technical-details > summary::before, details.session-advanced > summary::before, details.discovery-details > summary::before { content: '+'; display: inline-grid; width: 17px; height: 17px; place-items: center; margin-inline-end: 7px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--success); font-size: 14px; }
details[open] > summary::before { content: '−'; }
.session-advanced-body { padding: 0 11px 11px; color: var(--text-soft); font-size: 11px; }

/* Users and operational popouts */
.users-heading, .users-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.users-heading h1 { margin: 0; font-size: 24px; }
.overview-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.overview-card { display: flex; min-height: 82px; align-items: center; justify-content: space-between; padding: 13px 15px; }
.overview-card .stat-copy { display: grid; gap: 4px; }
.overview-card strong { direction: ltr; font-size: 24px; line-height: 1.1; }
.stat-icon, .modal-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--success); }
.stat-icon svg, .modal-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.search-form { display: flex; width: min(540px, 100%); gap: 7px; }
.users-table { min-width: 900px; direction: ltr; }
.users-table th, .users-table td { text-align: left; }
.users-table th:nth-child(2), .users-table td:nth-child(2) { text-align: center; }
.identity { display: flex; align-items: center; gap: 9px; }
.identity-copy { display: grid; gap: 2px; }
.identity-copy .user-name, .identity-copy a { font-size: 14px; font-weight: 780; }
.presence-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #52665e; box-shadow: 0 0 0 3px rgba(104, 135, 124, .15); }
.presence-dot.online { background: var(--accent); box-shadow: 0 0 0 3px rgba(52, 203, 145, .17); }
.last-seen, .expiry-copy { color: var(--muted); font-size: 10px; }
.last-seen.online { color: var(--success); }
.service-state { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 7px; min-width: 190px; direction: ltr; }
.service-state .badge { grid-column: 2; justify-self: center; }
.service-state .expiry-copy { grid-column: 3; justify-self: start; white-space: nowrap; }
.usage-cell { min-width: 230px; direction: ltr; }
.usage-labels { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.copy-link { width: 32px; min-height: 32px; padding: 0; border-color: var(--line); background: var(--surface-subtle); color: var(--text-soft); }
.copy-link:hover { color: var(--success); }

/* Users page polish: full-width workspace, reference-density cards/table, and
   compact controls.  Keep these selectors scoped so other admin pages retain
   their existing geometry. */
body:has(.users-page) .falcon-admin-shell-inner,
.main:has(.users-page) { width: 100%; max-width: none; }
body:has(.users-page) .falcon-admin-shell-inner,
.main:has(.users-page) { padding-inline: 24px; }
.users-page { width: 100%; min-width: 0; }
.users-page .users-heading { margin-bottom: 16px; }
.users-page .users-heading h1 { font-size: 24px; line-height: 36px; }
.users-page .overview-stats { gap: 16px; margin-bottom: 14px; }
.users-page .overview-card {
  min-height: 103px;
  height: 103px;
  padding: 24px;
  gap: 16px;
  direction: rtl;
}
.users-page .overview-card .stat-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.users-page .overview-card .muted { font-size: 14px; line-height: 21px; font-weight: 500; }
.users-page .overview-card strong { font-size: 30px; line-height: 45px; font-weight: 600; white-space: nowrap; }
.users-page .stat-icon { width: 36px; height: 36px; border-radius: 6px; padding: 8px; }
.users-page .stat-icon svg { width: 20px; height: 20px; }
.users-page .users-toolbar {
  direction: ltr;
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 72px;
  margin: 0 -24px;
  padding: 16px 24px;
  gap: 16px;
  background: rgba(8, 24, 18, .58);
}
.users-page .search-form { width: min(342px, 100%); direction: ltr; }
.users-page .users-toolbar > .btn { direction: rtl; }
.users-page .users-toolbar > .btn { min-height: 32px; padding: 0 20px; border-radius: 6px; font-size: 14px; line-height: 16.8px; }
.users-page .users-toolbar input { height: 40px; min-height: 40px; border-radius: 6px; padding-inline: 12px; font-size: 16px; }
.users-page .table-wrap { width: 100%; min-width: 0; }
.users-page .users-table { width: 100%; min-width: 0; table-layout: fixed; }
.users-page .users-table th { padding: 12px 24px; line-height: 16px; }
.users-page .users-table td { padding: 16px 24px; line-height: 20px; }
.users-page .users-table th:last-child,
.users-page .users-table td:last-child { text-align: right; }
.users-page .users-table td:last-child form { display: flex; justify-content: flex-end; }
.users-page .users-table tbody tr { height: auto; }
.users-page .identity,
.users-page .identity-copy,
.users-page .usage-cell { min-width: 0; }
.users-page .identity-copy .user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.users-page .service-state { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.users-page .usage-cell { width: 100%; }
.users-page .usage-cell .progress { width: 100%; min-width: 0; height: 6px; }
.users-page .usage-labels { min-width: 0; align-items: center; font-size: 11px; white-space: nowrap; }
.users-page .usage-labels span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.users-page .copy-link {
  display: grid;
  width: 40px;
  min-height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}
.users-page .copy-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}
.users-page .copy-link:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* User forms use one predictable two-column grid at desktop widths. */
.users-page .user-modal {
  width: min(672px, calc(100vw - 24px));
  max-width: 672px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px;
  border-radius: 6px;
}
.users-page .user-modal .form-grid,
.users-page .user-modal .field,
.users-page .user-modal .name-with-toggle,
.users-page .user-modal .form-actions,
.users-page .user-modal .edit-tools { min-width: 0; }
.users-page .user-modal .form-grid { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.users-page .user-modal input,
.users-page .user-modal select,
.users-page .user-modal textarea { min-width: 0; max-width: 100%; }
.users-page .user-modal input,
.users-page .user-modal select { height: 32px; min-height: 32px; padding: 6px 12px; border-radius: 6px; font-size: 14px; line-height: 21px; }
.users-page .user-modal textarea { min-height: 80px; height: 80px; padding: 8px 16px; border-radius: 6px; font-size: 14px; line-height: 22px; }
.users-page .user-modal .field { gap: 4px; }
.users-page .user-modal .field > label { font-size: 14px; line-height: 21px; font-weight: 500; }
.users-page .name-with-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  direction: ltr;
}
.users-page .switch-control {
  position: relative;
  display: inline-flex !important;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  align-items: center;
  direction: ltr;
}
.users-page .switch-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 1px;
  min-height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
}
.users-page .switch-track {
  position: relative;
  display: block;
  width: 34px;
  height: 20px;
  padding: 2px;
  border: 1px solid #5d756c;
  border-radius: 999px;
  background: #3a5048;
}
.users-page .switch-track span {
  position: absolute;
  top: 1px;
  left: 1px;
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dbe9e3;
  transition: transform .16s ease;
}
.users-page .switch-control input:checked + .switch-track { border-color: var(--accent); background: var(--accent-strong); }
.users-page .switch-control input:checked + .switch-track span { transform: translateX(14px); }
.users-page .form-actions { min-width: 0; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.users-page .edit-form-actions { align-items: center; }
.users-page .edit-tools { direction: ltr; flex: 1 1 auto; gap: 8px; }
.users-page .edit-form-actions > button[type="submit"] { flex: 0 0 auto; min-width: 124px; }
.users-page .icon-action {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}
.users-page .icon-action:hover { border-color: var(--line-strong); background: var(--surface-subtle); color: var(--text); }
.users-page .icon-action.danger-outline { border-color: rgba(242, 126, 137, .3); color: var(--danger); }
.users-page .icon-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

/* Falcon overlay contract (Package 3): one namespaced owner for layers,
   backdrops, panels, scroll locking, and shared loading/error surfaces. */
.falcon-admin-overlay-layer, .falcon-admin-overlay-runtime, .falcon-admin-overlay-viewport {
  position: fixed;
  inset: 0;
  z-index: var(--fa-z-overlay);
  display: grid;
  place-items: center;
  padding: 20px;
}
.falcon-admin-overlay-layer[hidden], .falcon-admin-overlay-runtime[hidden], .falcon-admin-overlay-viewport[hidden] { display: none; }
.falcon-admin-overlay-backdrop {
  all: unset;
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--fa-overlay-backdrop);
  backdrop-filter: blur(var(--fa-overlay-blur));
  -webkit-backdrop-filter: blur(var(--fa-overlay-blur));
}
.falcon-admin-overlay-panel {
  position: relative;
  z-index: var(--fa-z-overlay-content);
  max-width: 100%;
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--fa-radius-modal);
  background: rgba(12, 29, 23, .95);
  box-shadow: var(--fa-shadow-overlay);
}
.falcon-admin-overlay-head,
.modal-head,
.popout-head,
.management-popout-head,
.discovery-overlay-head {
  display: flex;
  direction: ltr;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fa-space-3);
}
.falcon-admin-overlay-title { min-width: 0; }
.falcon-admin-overlay-close { flex: 0 0 auto; }
.falcon-admin-overlay-body { min-height: 0; overflow: auto; }
.falcon-admin-overlay-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--fa-space-2); }
.falcon-admin-overlay-loading, .falcon-admin-overlay-error { padding: 28px; color: var(--muted); text-align: center; }
.falcon-admin-overlay-error { color: #ffb7bf; }
.falcon-admin-dialog-layer { z-index: var(--fa-z-overlay); }
.falcon-admin-dialog-layer.confirm-layer { z-index: var(--fa-z-nested-modal); }
.falcon-admin-dialog-layer > .falcon-admin-overlay-backdrop { z-index: var(--fa-z-base); }
.falcon-admin-dialog-layer > .falcon-admin-overlay-panel { z-index: var(--fa-z-overlay-content); }
.panel-popout-backdrop, .management-popout-backdrop { /* legacy content hook; layer geometry is namespaced above */
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--fa-overlay-backdrop);
  backdrop-filter: blur(var(--fa-overlay-blur));
  -webkit-backdrop-filter: blur(var(--fa-overlay-blur));
}
.user-modal, .panel-modal, .domain-detail-modal, .confirm-modal {
  position: relative;
  z-index: var(--fa-z-overlay-content);
  width: min(650px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--fa-radius-modal);
  background: rgba(12, 29, 23, .95);
  box-shadow: var(--fa-shadow-overlay);
}
.user-modal, .panel-modal, .confirm-modal { padding: 18px; }
.panel-modal { width: min(580px, 100%); }
.domain-detail-modal { width: min(760px, 100%); }
.modal-head, .popout-head, .management-popout-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--fa-space-3); margin-bottom: var(--fa-space-3); }
.modal-title { display: flex; min-width: 0; align-items: center; gap: 9px; }
.modal-title h1 { margin: 0; font-size: 18px; }
.modal-title .mono { overflow: hidden; max-width: 500px; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.login-wrap { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.login-card { width: min(410px, 100%); padding: 26px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: rgba(12, 29, 23, .9); box-shadow: var(--shadow); }
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card .field { margin-top: 14px; }
.login-card button { width: 100%; margin-top: 18px; }
.binding { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.binding:last-child { border-bottom: 0; }
.edit-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.icon-action { width: 34px; min-height: 34px; padding: 0; }
.compact-action { min-height: 34px; padding: 7px 9px; }
.edit-usage { grid-column: 1 / -1; padding-top: 13px; border-top: 1px solid var(--line); }
.switch-control { display: inline-flex !important; align-items: center; cursor: pointer; }
.switch-control input { position: absolute; opacity: 0; }
.switch-track { display: block; width: 38px; height: 22px; padding: 2px; border: 1px solid #5d756c; border-radius: 999px; background: #3a5048; }
.switch-track span { display: block; width: 16px; height: 16px; border-radius: 50%; background: #dbe9e3; transition: transform .16s ease; }
.switch-control input:checked + .switch-track { border-color: var(--accent); background: var(--accent-strong); }
.switch-control input:checked + .switch-track span { transform: translateX(16px); }
.toast { position: fixed; top: 15px; left: 50%; z-index: var(--fa-z-toast); max-width: calc(100% - 28px); padding: 10px 14px; border: 1px solid rgba(104, 222, 167, .44); border-radius: var(--fa-radius-control); background: #133d2d; color: #d9ffeb; box-shadow: var(--fa-shadow-overlay); opacity: 0; pointer-events: none; transform: translate(-50%, -16px); transition: .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(242, 126, 137, .5); background: #572832; color: #ffe1e4; }
.center-stage { display: grid; min-height: calc(100vh - 150px); place-items: center; }
.confirm-layer { z-index: var(--fa-z-nested-modal); }
.confirm-modal { width: min(420px, 100%); }
.confirm-copy { margin: 6px 0 18px; color: var(--text-soft); }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Games profile popouts */
.panel-popout-shell, .management-popout-shell {
  position: relative;
  z-index: 1;
  width: min(1420px, calc(100vw - 40px));
  height: auto;
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(10, 25, 20, .96);
  box-shadow: var(--shadow);
}
.panel-popout-shell.narrow, .management-popout-shell.management-medium { width: min(900px, calc(100vw - 40px)); }
.games-popout-content, .management-popout-body { padding: 18px; }
.management-popout-shell { display: flex; flex-direction: column; overflow: hidden; }
.management-popout-head { position: sticky; top: 0; z-index: 2; margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(12, 30, 24, .98); }
.management-popout-title h2 { margin: 0; font-size: 17px; }
.management-popout-body { min-height: 0; max-height: calc(100vh - 112px); overflow: auto; }
.management-popout-loading, .panel-popout-loading { padding: 38px; color: var(--muted); text-align: center; }
.management-popout-error, .panel-popout-error { padding: 14px; color: #ffb7bf; text-align: center; }
.popout-busy { opacity: .58; pointer-events: none; }
.popout-head { padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.popout-head h2 { margin: 2px 0 4px; font-size: 20px; }
.popout-head p, .management-popout-title small { margin: 0; color: var(--muted); font-size: 11px; }
.popout-head-actions { display: flex; align-items: center; gap: 7px; }
.game-card-list, .node-list { display: grid; gap: 9px; }
.game-compact-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(7, 20, 15, .54); }
.game-card-title-row, .game-card-actions, .game-card-meta, .domain-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.game-card-title-row strong { font-size: 14px; }
.game-card-meta { margin-top: 7px; direction: ltr; }
.game-card-meta span { padding: 3px 6px; border-radius: 999px; background: var(--surface-subtle); color: var(--muted); font-size: 10px; }
.game-card-meta b { color: var(--text); }
.game-card-sub { margin-top: 5px; color: var(--muted); font-size: 10px; }
.compact-form-card, .profile-commandbar, .runtime-aside { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(7, 21, 16, .54); }
.compact-form-card { margin-bottom: 12px; }
.compact-form-card.flat { margin: 0; }
.compact-form-title { margin-bottom: 10px; font-weight: 790; }
.compact-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.profile-commandbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.import-main { margin-inline-end: auto; }
.game-stat-strip, .profile-summary-grid, .session-result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.game-stat-strip { margin-bottom: 12px; direction: ltr; }
.game-stat-strip a, .summary-card { padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(7, 20, 15, .5); }
.game-stat-strip a:hover { border-color: var(--line-strong); background: var(--surface-subtle); }
.game-stat-strip span, .summary-card small { color: var(--muted); font-size: 10px; }
.game-stat-strip strong { display: block; margin-top: 3px; font-size: 18px; }
.profile-preference-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: -2px 0 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(7, 20, 15, .34); color: var(--text-soft); font-size: 11px; }
.profile-preference-note span { color: var(--muted); font-size: 10px; }
.profile-preference-note strong { color: var(--accent); font-size: 11px; }
.profile-preference-note small { color: var(--muted); font-size: 10px; }
.compact-section { margin-top: 12px; }
.compact-section-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.compact-section-head h3 { margin: 0; font-size: 14px; }
.compact-section-head small { color: var(--muted); font-size: 10px; }
.filter-tabs, .queue-status-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 9px; }
.filter-tabs a, .queue-status-tabs a { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: rgba(7, 20, 15, .5); color: var(--muted); font-size: 10px; }
.filter-tabs a.active, .queue-status-tabs a.active { border-color: rgba(54, 203, 145, .45); background: var(--accent-soft); color: #c6ffe3; }
.compact-domain-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.domain-compact-row { display: grid; grid-template-columns: minmax(240px, 1.7fr) minmax(180px, 1fr) 95px 62px; align-items: center; gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--line); background: rgba(7, 19, 14, .46); }
.domain-compact-row:last-child { border-bottom: 0; }
.domain-identity { min-width: 0; }
.domain-identity strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.domain-identity small, .domain-ports { color: var(--muted); font-size: 10px; }
.icon-edit { padding: 5px 6px; border-radius: 6px; background: var(--surface-subtle); color: var(--text-soft); font-size: 10px; text-align: center; }
.domain-editor-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, .8fr); gap: 12px; }
.domain-readonly { margin-bottom: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(4, 14, 10, .75); }
.runtime-aside { display: grid; align-content: start; gap: 8px; }
.detail-pair { display: grid; gap: 2px; padding-top: 8px; border-top: 1px dashed var(--line); }
.detail-pair span { color: var(--muted); font-size: 10px; }
.import-result { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; padding: 9px 10px; border: 1px solid rgba(92, 213, 156, .28); border-radius: var(--radius-sm); background: rgba(28, 105, 72, .18); color: #afeed0; font-size: 10px; }
.import-result span { padding: 2px 5px; border-radius: 999px; background: rgba(11, 50, 37, .7); }
.runtime-conflict-note { margin-bottom: 10px; padding: 9px 10px; border: 1px solid rgba(241, 188, 80, .35); border-radius: var(--radius-sm); background: var(--warning-soft); color: #ffe29b; font-size: 10px; }
.import-history { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.import-history > div { display: grid; grid-template-columns: minmax(220px, 1fr) 180px 110px; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 10px; }
.import-history > div:last-child { border-bottom: 0; }

/* Discovery visual family.  These selectors own only Discovery content and
   deliberately reuse the Package-1 Falcon tokens/primitives. */
.discovery-page { width: 100%; min-width: 0; }
.discovery-nav {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: var(--fa-space-4);
  margin-bottom: var(--fa-space-4);
  padding: 10px 16px;
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-card);
  background: linear-gradient(145deg, rgba(16, 38, 31, .82), rgba(7, 19, 14, .68));
  box-shadow: var(--fa-shadow-card);
}
.discovery-nav-copy { display: grid; min-width: 120px; gap: 1px; }
.discovery-nav-copy h1 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
.discovery-nav-copy p { display: none; }
.discovery-tabs { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.discovery-tabs a {
  display: inline-flex;
  min-width: 112px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-control);
  background: rgba(7, 20, 15, .44);
  color: var(--fa-text-muted);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}
.discovery-tabs a:hover, .discovery-tabs a.active { border-color: rgba(54, 203, 145, .45); background: var(--accent-soft); color: var(--fa-text); }
.discovery-tabs span { font-size: 11px; font-weight: 760; }
.discovery-tabs small { display: none; }
.discovery-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--fa-space-3); margin-bottom: var(--fa-space-3); }
.discovery-section-head h2 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.discovery-section-head .muted { margin-top: 4px; font-size: 11px; }
.discovery-section-head .btn { flex: 0 0 auto; }
.discovery-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: var(--fa-space-2); margin-bottom: var(--fa-space-3); }
.discovery-stat-grid > .card,
.discovery-stat-grid > .discovery-stat,
.discovery-stat-grid > .queue-stat,
.discovery-stat-grid > .sessions-metric,
.discovery-stat-grid > .discovery-stat,
.discovery-stat-grid > .queue-stat {
  display: grid;
  min-height: 76px;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 11px 13px;
}
.discovery-stat-grid > * > span,
.discovery-stat-grid > span,
.discovery-stat-grid > .sessions-metric > span,
.discovery-stat > span,
.queue-stat > span { color: var(--fa-text-muted); font-size: 10px; font-weight: 700; }
.discovery-stat-grid > * > strong,
.discovery-stat-grid > .sessions-metric > strong,
.discovery-stat > strong,
.queue-stat > strong { display: block; color: var(--fa-text); font-size: 21px; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.discovery-stat.is-focus, .discovery-stat-grid > .is-focus { border-color: rgba(54, 203, 145, .38); background: linear-gradient(145deg, rgba(22, 73, 53, .72), var(--fa-surface-base)); }
.discovery-stat strong.compact { font-size: 15px; letter-spacing: 0; }
.discovery-filter-surface { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: var(--fa-space-2); padding: 10px 12px; }
.discovery-filter-surface input, .discovery-filter-surface select { min-height: var(--fa-control-compact-height); }
.discovery-filter-group { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 0 0 var(--fa-space-2); }
.discovery-filter-group a { min-height: 29px; padding: 5px 9px; border: 1px solid var(--fa-border); border-radius: var(--fa-radius-control); background: rgba(7, 20, 15, .5); color: var(--fa-text-muted); font-size: 10px; white-space: nowrap; }
.discovery-filter-group a.active { border-color: rgba(54, 203, 145, .45); background: var(--accent-soft); color: #c6ffe3; }
.discovery-table-shell { overflow: auto; border: 1px solid var(--fa-border); border-radius: var(--fa-radius-card); background: rgba(7, 18, 14, .5); }
.discovery-table { border-radius: var(--fa-radius-card); }
.discovery-table table { min-width: 760px; }
.discovery-table th, .discovery-table td, .queue-table th, .queue-table td, .session-table th, .session-table td { padding: 11px 12px; }
.discovery-table-shell > table { width: 100%; min-width: 760px; border-collapse: collapse; }
.discovery-table-shell > table th { height: 42px; }
.discovery-table-shell > table td { min-height: 56px; }
.discovery-section { margin-top: var(--fa-space-4); }
.discovery-detail-block { padding: 13px; }
.discovery-detail-grid { min-width: 0; }
.domain-cell { min-width: 190px; max-width: 310px; }
.domain-cell strong { display: block; overflow: hidden; max-width: 310px; text-overflow: ellipsis; white-space: nowrap; }
.domain-cell small, .evidence-short, .reason-cell, .seen-cell, .probe-cell { display: block; color: var(--fa-text-muted); font-size: 10px; line-height: 1.5; }
.reason-cell { min-width: 150px; max-width: 260px; color: var(--fa-text-soft); }
.actions-cell, .action-cell { white-space: nowrap; }
.action-menu { position: relative; }
.action-menu > summary { min-height: 29px; padding: 5px 8px; border: 1px solid var(--fa-border); border-radius: 7px; background: var(--fa-surface-subtle); color: var(--fa-text-soft); font-size: 10px; font-weight: 720; list-style: none; cursor: pointer; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu > summary::after { content: '⌄'; margin-inline-start: 5px; color: var(--fa-text-muted); }
.action-menu > form { display: grid; min-width: 185px; gap: 7px; margin-top: 6px; padding: 9px; border: 1px solid var(--fa-border-strong); border-radius: var(--fa-radius-control); background: rgba(10, 27, 21, .98); white-space: normal; }
.action-menu label { font-size: 10px; }
.action-menu select { min-height: 32px; padding: 5px 7px; font-size: 10px; }
.discovery-badge { font-size: 10px; }
.session-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--fa-space-3); margin-bottom: var(--fa-space-3); }
.session-title h2 { margin: 0 0 4px; font-size: 20px; }
.session-title > .mono { display: none; }
.session-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.meta-chip { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: rgba(7, 20, 15, .5); color: var(--muted); font-size: 10px; white-space: nowrap; }
.meta-chip strong { color: var(--text); }
.session-info { margin-bottom: var(--space-3); padding: 12px; }
.session-info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.session-info-item { display: grid; gap: 3px; min-width: 0; }
.session-info-item span { color: var(--muted); font-size: 10px; }
.session-info-item strong { overflow-wrap: anywhere; font-size: 12px; }
.session-live-card .refresh-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.session-result-summary { margin-top: var(--space-3); padding: 12px; }
.session-result-grid { grid-template-columns: repeat(5, minmax(110px, 1fr)); }
.session-result-grid > div { padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(7, 20, 15, .45); }
.session-result-grid span { color: var(--muted); font-size: 10px; }
.session-result-grid strong { display: block; margin-top: 2px; font-size: 18px; }
.session-result-note { margin-top: 4px; color: #a4d8c1; font-size: 9px; }
.session-detail-page .learning-indicator { display: block; margin-top: 3px; color: #87d9b5; font-size: 9px; font-weight: 650; }
.games-popout-content .learned-endpoints { margin-top: 12px; }
.games-popout-content .learned-endpoint-list { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7, 20, 15, .28); }
.games-popout-content .learned-endpoint-head, .games-popout-content .learned-endpoint-row { display: grid; grid-template-columns: minmax(220px, 2fr) 95px 130px minmax(180px, 1.4fr) 145px; align-items: center; gap: 10px; min-width: 760px; padding: 8px 10px; }
.games-popout-content .learned-endpoint-head { color: var(--muted); font-size: 9px; font-weight: 750; border-bottom: 1px solid var(--line); }
.games-popout-content .learned-endpoint-row { color: var(--text-soft); font-size: 10px; border-bottom: 1px solid rgba(130, 190, 162, .12); }
.games-popout-content .learned-endpoint-row:last-child { border-bottom: 0; }
.games-popout-content .learning-state { color: #b8f3d4; font-weight: 750; }

/* Game Detail owns these refinements so the accepted Games list and the
   shared Users/Discovery surfaces retain their existing geometry. */
.game-detail-content { min-width: 0; }
.game-detail-content .popout-head { align-items: center; margin-bottom: 10px; padding-bottom: 10px; }
.game-detail-content .game-detail-title { display: grid; min-width: 0; gap: 2px; }
.game-detail-content .game-detail-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.game-detail-content .game-detail-title-row h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 18px; line-height: 1.25; }
.game-detail-content .game-detail-title-row .badge { flex: 0 0 auto; }
.game-detail-content .game-stat-strip { gap: 7px; margin-bottom: 10px; }
.game-detail-content .game-stat-strip a { display: grid; min-height: 62px; align-content: center; gap: 3px; padding: 9px 10px; }
.game-detail-content .game-stat-strip span { font-size: 10px; }
.game-detail-content .game-stat-strip strong { margin-top: 0; font-size: 18px; line-height: 1.1; }
.game-detail-content .profile-commandbar { align-items: center; gap: 8px; margin-bottom: 10px; padding: 10px; }
.game-detail-content .game-runtime-switch {
  display: inline-flex;
  width: auto;
  height: auto;
  min-height: var(--fa-switch-height);
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}
.game-detail-content .game-runtime-switch > input { width: 1px; min-height: 1px; height: 1px; padding: 0; }
.game-detail-content .game-runtime-switch > input:focus-visible + .fa-admin-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.game-detail-content .game-runtime-switch-copy { white-space: nowrap; }
.game-profile-enabled {
  display: inline-flex;
  width: auto;
  height: auto;
  min-height: var(--fa-switch-height);
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
}
.game-profile-enabled > input { width: 1px; min-height: 1px; height: 1px; padding: 0; }
.game-profile-enabled > input:focus-visible + .fa-admin-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.game-profile-enabled-copy { white-space: nowrap; }
.game-detail-content .compact-section { margin-top: 10px; }
.game-detail-content .compact-section-head { margin-bottom: 7px; }
.game-detail-content .profile-summary-grid { gap: 7px; }
.game-detail-content .summary-card { min-height: 66px; padding: 9px 10px; }
.game-detail-content .learned-endpoints { margin-top: 10px; }
.game-detail-content .learned-endpoint-list { max-height: none; overflow-x: auto; overflow-y: visible; }
.game-detail-content .learned-endpoint-head,
.game-detail-content .learned-endpoint-row { gap: 8px; min-width: 720px; padding: 7px 9px; }
.game-detail-content .learned-endpoint-row { font-size: 10px; }
.game-detail-content .game-detail-title + .import-result,
.game-detail-content .game-detail-title + .runtime-conflict-note { margin-top: 0; }
@media (max-width: 680px) {
  .game-detail-content .game-runtime-switch-copy { white-space: normal; }
  .game-detail-content .profile-commandbar { align-items: stretch; }
  .game-detail-content .import-main { width: 100%; }
  .game-detail-content .game-runtime-switch { white-space: normal; }
}

/* Discovery module refresh: namespaced so legacy pages keep their geometry. */
.discovery-module { --discovery-table-edge-pad: 8px; direction:ltr; text-align:left; max-width:1500px; margin:0 auto; padding:18px 22px 34px; color:#dceee8; }
.discovery-module *, .discovery-module *::before, .discovery-module *::after { box-sizing:border-box; }
.discovery-module a { color:inherit; }
.discovery-module-nav { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; padding:0 0 16px; margin-bottom:22px; border-bottom:1px solid rgba(139,220,192,.16); }
.discovery-module-brand { display:flex; align-items:baseline; gap:10px; }
.discovery-module-kicker, .discovery-kicker { margin:0 0 4px; color:#73d6b2; font-size:10px; letter-spacing:.14em; text-transform:uppercase; }
.discovery-module-brand h1, .discovery-page-head h2, .discovery-detail-head h2 { margin:0; font-size:23px; line-height:1.2; font-weight:760; letter-spacing:-.02em; }
.discovery-module-tabs { display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.discovery-module-tabs a, .discovery-filter { display:inline-flex; align-items:center; min-height:32px; padding:0 11px; border:1px solid transparent; border-radius:7px; color:#9bb8af; font-size:12px; font-weight:650; text-decoration:none; white-space:nowrap; }
.discovery-module-tabs a:hover, .discovery-module-tabs a.active, .discovery-filter:hover, .discovery-filter.active { color:#eafff7; background:rgba(74,190,151,.12); border-color:rgba(104,217,176,.32); }
.discovery-page-head, .discovery-detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.discovery-subtitle { margin:5px 0 0; color:#8ea9a1; font-size:12px; }
.discovery-back { display:inline-flex; margin-bottom:10px; color:#7fdab7 !important; font-size:12px; font-weight:650; text-decoration:none; }
.discovery-detail-head > .discovery-status { margin-top:29px; }
.discovery-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0 0 18px; }
.discovery-metric { min-height:80px; display:flex; flex-direction:column; justify-content:center; gap:5px; padding:14px 16px; border:1px solid rgba(134,211,185,.16); border-radius:10px; background:rgba(9,33,28,.74); }
.discovery-metric.is-accent { border-color:rgba(76,214,163,.38); background:rgba(18,69,54,.42); }
.discovery-metric.is-warning { border-color:rgba(231,182,87,.34); }
.discovery-metric span, .discovery-metric small { color:#8eaba2; font-size:11px; }
.discovery-metric strong { color:#f0fff9; font-size:22px; line-height:1; font-weight:760; }
.discovery-metric strong.compact-value { font-size:14px; line-height:1.25; }
.discovery-surface { margin:0 0 16px; padding:15px 16px; border:1px solid rgba(134,211,185,.16); border-radius:10px; background:rgba(8,28,24,.82); box-shadow:0 10px 28px rgba(0,0,0,.12); }
.discovery-surface-head, .discovery-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.discovery-surface-head h3, .discovery-section-head h3 { margin:0; color:#e7faf2; font-size:14px; }
.discovery-inline-status { color:#89a79e; font-size:11px; }
.discovery-filter-surface { display:block; padding:12px 14px; }
.discovery-filter-form, .discovery-inline-form, .discovery-probe-form { display:flex; align-items:end; flex-wrap:wrap; gap:9px; }
.discovery-filter-form label, .discovery-inline-form label, .discovery-probe-form label { display:flex; flex-direction:column; gap:5px; color:#91aaa2; font-size:11px; font-weight:650; }
.discovery-module input, .discovery-module select { min-height:34px; padding:0 9px; border:1px solid rgba(134,211,185,.2); border-radius:6px; background:#0b2721; color:#e4f8ef; font:inherit; font-size:12px; }
.discovery-filter-form input { min-width:220px; }
.discovery-filter-form select { min-width:130px; }
.discovery-filter-bar { display:flex; flex-wrap:wrap; gap:5px; margin-top:11px; }
.discovery-text-link { align-self:center; color:#81d9b5 !important; font-size:11px; text-decoration:none; }
.discovery-table-scroll { overflow-x:auto; padding-inline:var(--discovery-table-edge-pad); }
.discovery-clean-table { width:100%; border-collapse:collapse; font-size:12px; }
.discovery-clean-table th { padding:10px 11px; border-bottom:1px solid rgba(134,211,185,.18); color:#82a79c; font-size:10px; font-weight:700; letter-spacing:.04em; text-align:left; white-space:nowrap; }
.discovery-clean-table td { padding:11px; border-bottom:1px solid rgba(134,211,185,.1); color:#c6ddd5; vertical-align:middle; }
.discovery-clean-table tbody tr:hover { background:rgba(74,190,151,.06); }
.discovery-clean-table td small, .discovery-domain-link small { display:block; margin-top:4px; color:#78958b; font-size:10px; }
.discovery-domain-link { display:block; text-decoration:none; }
.discovery-domain-link:hover strong { color:#8aebc3; }
.discovery-status { display:inline-flex; align-items:center; min-height:22px; padding:0 8px; border:1px solid rgba(134,211,185,.22); border-radius:999px; color:#b6d4c9; font-size:10px; font-weight:700; white-space:nowrap; }
.discovery-status.active, .discovery-status.assigned, .discovery-status.direct, .discovery-status.approved, .discovery-status.published { border-color:rgba(81,218,163,.38); color:#7ee8bb; background:rgba(37,131,91,.16); }
.discovery-status.pending, .discovery-status.review, .discovery-status.required, .discovery-status.prepared { border-color:rgba(232,183,83,.4); color:#f1c76d; background:rgba(126,88,17,.16); }
.discovery-status.ignored, .discovery-status.noise, .discovery-status.rejected, .discovery-status.expired { border-color:rgba(220,132,142,.3); color:#eaa0a8; background:rgba(123,45,55,.14); }
.discovery-status.paused { border-color:rgba(241,199,109,.38); color:#f1c76d; background:rgba(126,88,17,.16); }
.discovery-status.shared, .discovery-status.unresolved, .discovery-status.rolled_back { color:#a9c4bc; background:rgba(118,151,144,.12); }
.discovery-status.strong_route_candidate { border-color: rgba(93, 220, 169, 0.5); color: #5ddca9; background: rgba(70, 209, 157, 0.16); }
.discovery-status.possible_route_candidate { border-color: rgba(96, 165, 250, 0.5); color: #60a5fa; background: rgba(96, 165, 250, 0.16); }
.discovery-status.current_exit_not_useful { border-color: rgba(248, 113, 113, 0.4); color: #f87171; background: rgba(248, 113, 113, 0.1); }
.discovery-status.temporary_route { border-color: rgba(192, 132, 252, 0.5); color: #c084fc; background: rgba(192, 132, 252, 0.16); }
.discovery-status.already_routed { border-color: rgba(45, 212, 191, 0.5); color: #2dd4bf; background: rgba(45, 212, 191, 0.16); }
.discovery-row-actions, .discovery-action-row { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.discovery-more { position:relative; display:inline-block; }
.discovery-more summary { cursor:pointer; list-style:none; color:#8bdcb9; font-size:11px; }
.discovery-more summary::-webkit-details-marker { display:none; }
.discovery-action-row > .discovery-more[open] { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.discovery-action-row > .discovery-more[open] summary { margin-right:2px; }
.discovery-more form { position:absolute; z-index:4; right:0; top:25px; display:flex; flex-direction:column; gap:6px; min-width:170px; padding:10px; border:1px solid rgba(134,211,185,.22); border-radius:8px; background:#0b2822; box-shadow:0 14px 34px rgba(0,0,0,.35); }
.discovery-more form label { color:#8faea5; font-size:10px; }
.discovery-more form select { min-height:30px; }
.discovery-empty, .discovery-empty-line { padding:24px 10px; color:#78968c; text-align:center; font-size:12px; }
.discovery-footnote { margin:10px 0 0; color:#6f8d83; font-size:11px; }
.discovery-meta-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px 18px; margin:0; }
.discovery-meta-grid > div { min-width:0; }
.discovery-meta-grid dt { margin-bottom:4px; color:#7f9d94; font-size:10px; }
.discovery-meta-grid dd { margin:0; color:#d2e8df; font-size:12px; overflow-wrap:anywhere; }
.discovery-evidence-timeline { list-style:none; margin:0; padding:0; display:grid; gap:9px; }
.discovery-evidence-timeline li { display:grid; grid-template-columns:minmax(130px,.35fr) minmax(150px,.4fr) minmax(0,1fr); gap:10px; align-items:baseline; padding:9px 11px; border:1px solid rgba(133,184,165,.12); border-radius:10px; background:rgba(10,22,28,.22); }
.discovery-evidence-timeline strong { color:#d2e8df; font-size:12px; }
.discovery-evidence-timeline span, .discovery-evidence-timeline small { color:#8eada1; font-size:11px; overflow-wrap:anywhere; }
.discovery-technical { border-top:1px solid rgba(134,211,185,.12); margin-top:14px; padding-top:12px; }
.discovery-technical summary { cursor:pointer; color:#8bdcb9; font-size:12px; font-weight:650; }
.discovery-technical-body { margin-top:12px; }
.discovery-probe-card { background:rgba(11,39,32,.88); }
.discovery-probe-form button { align-self:end; }
.discovery-refresh-state { min-height:18px; color:#8ea9a1; font-size:11px; }
.discovery-section { margin:0 0 18px; }
.discovery-dialog { max-width:520px; }
.discovery-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.discovery-form-grid .field { display:flex; flex-direction:column; gap:6px; }
.discovery-form-grid .field.full { grid-column:1 / -1; }
.discovery-form-grid label { color:#91aaa2; font-size:11px; font-weight:650; }
.discovery-form-grid textarea { min-height:82px; width:100%; padding:9px; border:1px solid rgba(134,211,185,.2); border-radius:6px; background:#0b2721; color:#e4f8ef; font:inherit; font-size:12px; resize:vertical; }
.discovery-dialog-actions, .discovery-form-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; margin-top:16px; }
.discovery-detail-actions { display:flex; align-items:center; gap:7px; }
.discovery-title-line { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.discovery-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.discovery-detail-list { display:grid; gap:8px; margin-top:14px; }
.discovery-detail-list > div { display:flex; justify-content:space-between; gap:14px; padding:9px 0; border-bottom:1px solid rgba(134,211,185,.1); }
.discovery-detail-list span { color:#8ba79e; }
.discovery-module .fa-admin-button { min-height:32px; padding:0 11px; border-radius:6px; font-size:11px; }
.discovery-module .fa-admin-button--compact { min-height:28px; padding:0 9px; }
@media (max-width:900px) { .discovery-module-nav { align-items:flex-start; flex-direction:column; gap:12px; } .discovery-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .discovery-meta-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .discovery-module { padding:12px 13px 26px; } .discovery-module-brand h1, .discovery-page-head h2, .discovery-detail-head h2 { font-size:20px; } .discovery-metrics { grid-template-columns:1fr 1fr; gap:7px; } .discovery-metric { min-height:70px; padding:11px; } .discovery-metric strong { font-size:19px; } .discovery-meta-grid { grid-template-columns:1fr; } .discovery-evidence-timeline li { grid-template-columns:1fr; gap:4px; } .discovery-filter-form input { min-width:0; flex:1 1 160px; } .discovery-filter-form { align-items:stretch; } }
@media (max-width:600px) { .discovery-form-grid { grid-template-columns:1fr; } .discovery-form-grid .field.full { grid-column:auto; } .discovery-detail-head { flex-direction:column; } .discovery-detail-head > .discovery-status { margin-top:0; } }

/* Final Discovery table geometry: the DOM order is information-first and the
   action track is always last. Header and body cells share these same tracks. */
.discovery-clean-table { table-layout: fixed; }
.discovery-clean-table th,
.discovery-clean-table td { height: 54px; min-width: 0; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.discovery-clean-table th { height: 42px; }
.discovery-clean-table .cell-left { text-align: left; }
.discovery-clean-table .cell-center { text-align: center; }
.discovery-clean-table .cell-action { text-align: center; white-space: nowrap; }
.discovery-clean-table .cell-center .discovery-status { justify-content: center; }
.discovery-clean-table .number-cell,
.discovery-clean-table .mono,
.discovery-clean-table [dir="ltr"] { font-variant-numeric: tabular-nums; }
.discovery-clean-table tbody tr:hover td { font-weight: inherit; }
.discovery-clean-table .col-game { width: 19%; }
.discovery-clean-table .col-client { width: 13%; }
.discovery-clean-table .col-started { width: 16%; }
.discovery-clean-table .col-status { width: 12%; }
.discovery-clean-table .col-isolation { width: 14%; }
.discovery-clean-table .col-count { width: 9%; }
.discovery-clean-table .col-action { width: 8%; }
.discovery-live-domains-table .col-domain { width: 35%; }
.discovery-live-domains-table .col-count { width: 10%; }
.discovery-live-domains-table .col-seen { width: 16%; }
.discovery-live-domains-table .col-status { width: 13%; }
.discovery-live-domains-table .col-attribution { width: 16%; }
.discovery-live-domains-table .col-action { width: 10%; }
.discovery-suggestions-table .col-domain { width: 22%; }
.discovery-suggestions-table .col-game { width: 15%; }
.discovery-suggestions-table .col-confidence { width: 12%; }
.discovery-suggestions-table .col-status { width: 12%; }
.discovery-suggestions-table .col-reason { width: 29%; }
.discovery-suggestions-table .col-action { width: 10%; }
.discovery-session-domains-table .col-domain { width: 25%; }
.discovery-session-domains-table .col-status { width: 13%; }
.discovery-session-domains-table .col-confidence { width: 12%; }
.discovery-session-domains-table .col-reason { width: 30%; }
.discovery-session-domains-table .col-seen { width: 12%; }
.discovery-session-domains-table .col-action { width: 8%; }

.discovery-status { height: 24px; line-height: 1; padding-inline: 9px; }
.discovery-row-actions { justify-content: center; }
.discovery-more[data-discovery-menu] { position: relative; z-index: 2; }
.discovery-more[data-discovery-menu] > summary { display: inline-flex; min-height: 28px; align-items: center; padding: 0 8px; border: 1px solid rgba(134,211,185,.22); border-radius: 6px; color: #8bdcb9; background: rgba(7,20,15,.34); }
.discovery-more[data-discovery-menu] > summary::after { content: '⌄'; margin-inline-start: 5px; color: #84b6a5; }
.discovery-more[data-discovery-menu][open] > summary::after { transform: rotate(180deg); }
.discovery-menu-portal { position: fixed !important; z-index: 2147483000 !important; display: grid !important; min-width: 205px; max-width: min(280px, calc(100vw - 20px)); gap: 7px; margin: 0 !important; overflow: auto; padding: 10px !important; border: 1px solid rgba(134,211,185,.28) !important; border-radius: 8px !important; background: rgba(8,31,25,.98) !important; box-shadow: 0 18px 42px rgba(0,0,0,.48) !important; }
.discovery-menu-portal label { color: #8faea5; font-size: 10px; }
.discovery-menu-portal select { min-height: 32px; }

.discovery-technical > summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; }
.discovery-technical > summary::-webkit-details-marker { display: none; }
.discovery-technical > summary::before { content: '›'; display: inline-grid; width: 16px; height: 16px; place-items: center; border: 1px solid rgba(134,211,185,.25); border-radius: 5px; color: #8bdcb9; line-height: 1; transform: rotate(0deg); transition: transform .16s ease; }
.discovery-technical[open] > summary::before { transform: rotate(90deg); }
.discovery-review-controls { display: grid; grid-template-columns: minmax(160px,220px) minmax(280px,1fr) auto auto; align-items: end; gap: 10px; margin-top: 14px; }
.discovery-review-controls form { display: contents; }
.discovery-review-controls label { display: flex; min-width: 0; flex-direction: column; gap: 5px; color: #91aaa2; font-size: 11px; font-weight: 650; }
.discovery-review-controls input,
.discovery-review-controls select,
.discovery-review-controls button { width: 100%; min-height: 34px; }
.discovery-review-controls .discovery-suggestion-form button { width: auto; min-width: 150px; }
/* Workspace defaults intentionally stay conservative; these equal-specificity
   refinements keep the shared header/body contract effective inside the glass
   workspace as well. */
.discovery-module .discovery-clean-table th.cell-left,
.discovery-module .discovery-clean-table td.cell-left { text-align: left; }
.discovery-module .discovery-clean-table th.cell-center,
.discovery-module .discovery-clean-table td.cell-center { text-align: center; }
.discovery-module .discovery-clean-table th.cell-action,
.discovery-module .discovery-clean-table td.cell-action { text-align: center; }
.discovery-module .discovery-clean-table .col-game { width: 19%; }
.discovery-module .discovery-clean-table .col-client { width: 13%; }
.discovery-module .discovery-clean-table .col-started { width: 16%; }
.discovery-module .discovery-clean-table .col-status { width: 12%; }
.discovery-module .discovery-clean-table .col-isolation { width: 14%; }
.discovery-module .discovery-clean-table .col-count { width: 9%; }
.discovery-module .discovery-clean-table .col-action { width: 8%; }
.discovery-module .discovery-live-domains-table .col-domain { width: 35%; }
.discovery-module .discovery-live-domains-table .col-count { width: 10%; }
.discovery-module .discovery-live-domains-table .col-seen { width: 16%; }
.discovery-module .discovery-live-domains-table .col-status { width: 13%; }
.discovery-module .discovery-live-domains-table .col-attribution { width: 16%; }
.discovery-module .discovery-live-domains-table .col-action { width: 10%; }
.discovery-module .discovery-suggestions-table .col-domain { width: 22%; }
.discovery-module .discovery-suggestions-table .col-game { width: 15%; }
.discovery-module .discovery-suggestions-table .col-confidence { width: 12%; }
.discovery-module .discovery-suggestions-table .col-status { width: 12%; }
.discovery-module .discovery-suggestions-table .col-reason { width: 29%; }
.discovery-module .discovery-suggestions-table .col-action { width: 10%; }
.discovery-module .discovery-session-domains-table .col-domain { width: 25%; }
.discovery-module .discovery-session-domains-table .col-status { width: 13%; }
.discovery-module .discovery-session-domains-table .col-confidence { width: 12%; }
.discovery-module .discovery-session-domains-table .col-reason { width: 30%; }
.discovery-module .discovery-session-domains-table .col-seen { width: 12%; }
.discovery-module .discovery-session-domains-table .col-action { width: 8%; }
@media (max-width: 900px) {
  .discovery-review-controls { grid-template-columns: minmax(150px, 1fr) minmax(190px, 2fr); }
  .discovery-review-controls > form:first-child > button { grid-column: 1; }
  .discovery-review-controls > form:last-child > button { grid-column: 2; justify-self: end; width: auto; min-width: 150px; }
}
.session-section { margin-top: var(--space-4); }
.session-detail-page { min-width: 0; }
.session-detail-page .session-summary-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin: 0 0 var(--space-3); }
.session-detail-page .session-summary-card { display: grid; min-height: 76px; align-content: center; gap: 3px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7, 20, 15, .48); }
.session-detail-page .session-summary-card.is-live { border-color: rgba(54, 203, 145, .42); background: linear-gradient(145deg, rgba(22, 73, 53, .62), rgba(7, 20, 15, .48)); }
.session-detail-page .session-summary-card.is-required { border-color: rgba(241, 188, 80, .30); }
.session-detail-page .session-summary-card > span:first-child { color: var(--muted); font-size: 10px; font-weight: 700; }
.session-detail-page .session-summary-card > strong { color: var(--text); font-size: 23px; line-height: 1; font-variant-numeric: tabular-nums; }
.session-detail-page .session-summary-card small { color: var(--muted); font-size: 9px; }
.session-detail-page .session-refresh-row { display: flex; align-items: center; gap: 7px; margin-top: 2px; min-width: 0; }
.session-detail-page .session-refresh-row .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-detail-page .session-domain-head { align-items: flex-end; gap: 12px; }
.session-detail-page .session-domain-filters { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 0 0 8px; }
.session-detail-page .session-filter { min-height: 29px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(7, 20, 15, .45); color: var(--muted); font-size: 10px; font-weight: 720; cursor: pointer; }
.session-detail-page .session-filter:hover, .session-detail-page .session-filter.active { border-color: rgba(54, 203, 145, .46); background: var(--accent-soft); color: var(--text); }
.session-detail-page .session-table { overflow-x: auto; }
.session-detail-page .session-table table { min-width: 900px; table-layout: fixed; }
.session-detail-page .session-table th, .session-detail-page .session-table td { vertical-align: middle; }
.session-detail-page .session-table th:nth-child(1), .session-detail-page .session-table td:nth-child(1) { width: 18%; }
.session-detail-page .session-table th:nth-child(2), .session-detail-page .session-table td:nth-child(2) { width: 15%; }
.session-detail-page .session-table th:nth-child(3), .session-detail-page .session-table td:nth-child(3) { width: 13%; }
.session-detail-page .session-table th:nth-child(4), .session-detail-page .session-table td:nth-child(4) { width: 19%; }
.session-detail-page .session-table th:nth-child(5), .session-detail-page .session-table td:nth-child(5) { width: 18%; }
.session-detail-page .session-table th:nth-child(6), .session-detail-page .session-table td:nth-child(6) { width: 10%; }
.session-detail-page .session-table th:nth-child(7), .session-detail-page .session-table td:nth-child(7) { width: 7%; }
.session-detail-page .session-confirmed-routes { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--text-soft); font-size: 11px; }
.session-detail-page .session-confirmed-routes ul { display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 7px 0 0; padding: 0; list-style: none; }
.session-detail-page .session-confirmed-routes li { color: #baf5d5; font-size: 10px; }
.session-detail-page .session-other-suggestions { margin-top: 9px; }
.session-detail-page .session-other-suggestions > summary { color: var(--muted); font-size: 10px; cursor: pointer; }
.session-detail-page .session-other-suggestions .table-wrap { margin-top: 8px !important; }
.domain-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.domain-detail-item { display: grid; gap: 3px; min-width: 0; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.domain-detail-item.full { grid-column: 1 / -1; }
.domain-detail-item span { color: var(--muted); font-size: 10px; }
.domain-detail-item strong, .domain-detail-item pre { overflow-wrap: anywhere; margin: 0; font-size: 11px; }
.domain-detail-item pre { white-space: pre-wrap; color: var(--text-soft); font-family: ui-monospace, monospace; }
.queue-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.queue-heading h2 { margin: 0 0 3px; font-size: 21px; }
.queue-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.queue-badge { padding: 5px 8px; border: 1px solid rgba(241, 188, 80, .28); border-radius: 7px; background: var(--warning-soft); color: #ffd77e; font-size: 10px; }
.queue-stat { transition: border-color .16s ease, background .16s ease; }
.queue-stat:hover { border-color: var(--line-strong); background: var(--surface-subtle); }
.queue-filter { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; padding: 10px 11px; }
.queue-filter label { color: var(--muted); font-size: 10px; }
.queue-filter input, .queue-filter select { width: auto; min-width: 100px; min-height: 33px; padding: 6px 8px; font-size: 11px; }
.queue-filter input[type="search"] { min-width: 185px; }
.queue-table table { min-width: 860px; }
.queue-table .confidence { color: #ddf8eb; font-weight: 800; }
.suggestion-detail .card h2 { margin-top: 0; font-size: 16px; }

/* Discovery family alignment: one rhythm for list, inbox, detail, and queue. */
.discovery-page > .notice,
.discovery-page > .error { margin-bottom: var(--fa-space-3); }
.discovery-page .queue-heading { margin-bottom: var(--fa-space-3); }
.discovery-page .queue-heading h2 { margin: 0 0 3px; font-size: 21px; line-height: 1.2; }
.discovery-page .queue-heading p { margin: 0; color: var(--fa-text-muted); font-size: 11px; }
.discovery-page .queue-badge { align-self: center; }
.discovery-page .queue-filter { margin-bottom: var(--fa-space-2); }
.discovery-page .queue-table table { min-width: 860px; }
.discovery-page .queue-table th,
.discovery-page .queue-table td { padding: 11px 12px; }
.discovery-page .session-info-grid,
.discovery-page .domain-detail-grid { gap: var(--fa-space-3); }
.discovery-page .detail-list > div { padding: 9px 0; }
.discovery-page .session-result-summary { margin-top: var(--fa-space-3); }
.discovery-page .discovery-actions { flex-wrap: wrap; }
.discovery-page .discovery-table-shell .empty { min-height: 120px; display: grid; place-items: center; }
.discovery-page .discovery-form { margin-inline: auto; }
.discovery-page .discovery-run-summary { box-shadow: none; }

/* Charts and node management kept consistent with the shell. */
.period-tabs { display: grid; width: min(420px, 100%); grid-template-columns: repeat(6, 1fr); overflow: hidden; margin: 2px auto 18px; border: 1px solid var(--line); border-radius: 7px; }
.period-tabs button { min-height: 31px; padding: 5px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 11px; }
.period-tabs button.active { background: var(--accent-strong); color: white; }
.usage-chart { display: grid; place-items: center; gap: 14px; }
.donut { position: relative; display: grid; width: 220px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--donut-segments, rgba(144, 190, 170, .16)); }
.donut::after { position: absolute; inset: 48px; border-radius: 50%; background: #0d2019; content: ''; }
.donut-center { position: relative; z-index: 1; display: grid; gap: 2px; text-align: center; }
.donut-center strong { font-size: 21px; }
.node-legend { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.legend-item, .legend-name, .node-item summary, .read-only-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.legend-item { color: var(--text-soft); font-size: 11px; }
.legend-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.legend-name { min-width: 0; justify-content: flex-start; }
.legend-name > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-item > strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.node-item { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(7, 20, 15, .5); }
.node-item summary { display: grid; grid-template-columns: minmax(100px, 1fr) auto auto 18px; padding: 10px 11px; cursor: pointer; }
.node-role { padding: 3px 6px; border-radius: 999px; background: var(--surface-subtle); color: var(--text-soft); font-size: 10px; }
.node-editor { padding: 11px; border-top: 1px solid var(--line); }
.read-only-row { grid-column: 1 / -1; padding: 8px 9px; border-radius: 7px; background: var(--surface-subtle); color: var(--text-soft); font-size: 11px; }
.node-actions { display: flex; grid-column: 1 / -1; gap: 8px; }
.node-empty { padding: 24px; color: var(--muted); text-align: center; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 1180px) {
  .stats, .discovery-stat-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .session-result-grid { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .session-detail-page .session-summary-strip { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}
@media (max-width: 920px) {
  .falcon-admin-shell-inner { min-height: var(--fa-shell-header-mobile-height); }
  .falcon-admin-shell-header { min-height: var(--fa-shell-header-mobile-height); }
  .split, .domain-editor-layout { grid-template-columns: 1fr; }
  .overview-stats { grid-template-columns: 1fr 1fr; }
  .session-info-grid { grid-template-columns: 1fr 1fr; }
  .game-stat-strip, .profile-summary-grid { grid-template-columns: 1fr 1fr; }
  .session-detail-page .session-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body { font-size: 13px; }
  .main { padding: 18px 14px 36px; }
  .top, .page-head, .discovery-top, .session-header, .queue-heading, .discovery-nav, .users-heading, .users-toolbar { flex-direction: column; align-items: stretch; }
  .top .actions, .discovery-actions { justify-content: flex-start; }
  .falcon-admin-shell-inner { padding-inline: 14px; }
  .falcon-admin-menu { position: fixed; top: var(--fa-shell-header-mobile-height); right: 12px; left: auto; width: min(var(--fa-menu-width), calc(100vw - 24px)); }
  .stats, .discovery-stat-grid, .overview-stats, .session-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .compact-form-grid, .secondary-form-grid, .session-info-grid, .session-advanced-body, .domain-detail-grid { grid-template-columns: 1fr; }
  .field.full, .domain-detail-item.full { grid-column: auto; }
  .form-actions { align-items: stretch; }
  .form-actions .btn, .form-actions button { flex: 1; }
  .discovery-tabs { width: 100%; }
  .discovery-tabs a { flex: 1; min-width: 0; }
  .discovery-tabs small { display: none; }
  .session-meta { width: 100%; }
  .session-detail-page .session-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .falcon-admin-overlay-layer, .falcon-admin-overlay-runtime, .falcon-admin-overlay-viewport { padding: 8px; }
  .user-modal, .panel-modal, .domain-detail-modal, .confirm-modal, .panel-popout-shell, .panel-popout-shell.narrow, .management-popout-shell, .management-popout-shell.management-medium { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .games-popout-content, .management-popout-body { padding: 13px; }
  .game-compact-card { grid-template-columns: 1fr; }
  .domain-compact-row { grid-template-columns: minmax(180px, 1fr) 58px; }
  .domain-tags { grid-column: 1 / -1; }
  .node-legend { grid-template-columns: 1fr; }
  .queue-filter input, .queue-filter select, .queue-filter input[type="search"] { width: 100%; }
}

/* Secondary administration surfaces. These rules are intentionally scoped
   to management pages and never alter the accepted Users/Discovery content. */
.panel-popout-shell:not(.narrow) > .games-popout-content { max-height: none; overflow: visible; }
.panel-popout-runtime .panel-popout-shell,
.panel-popout-fallback .panel-popout-shell { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.node-usage-modal {
  width: min(1420px, calc(100vw - 40px));
  height: auto;
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.secondary-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 4px 0 20px;
}
.secondary-page-head,
.secondary-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.secondary-page-head { margin-bottom: 16px; }
.secondary-page-head h1 { margin: 2px 0 3px; font-size: clamp(20px, 2vw, 26px); line-height: 1.25; }
.secondary-page-head p { margin: 0; font-size: 11px; }
.secondary-head-actions { display: flex; align-items: center; gap: 8px; }
.secondary-surface {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 39, 30, .86), rgba(7, 20, 15, .82));
  box-shadow: var(--shadow-sm);
}
.secondary-section-head { align-items: center; margin-bottom: 12px; }
.secondary-section-head h2 { margin: 0; font-size: 16px; }
.secondary-section-head .hint { margin: 3px 0 0; }
.secondary-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.secondary-notice {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(62, 203, 145, .36);
  border-radius: var(--radius-sm);
  background: rgba(19, 90, 61, .22);
}
.secondary-notice strong { font-size: 13px; }
.secondary-notice p { margin: 4px 0 0; }
.secondary-notice textarea { width: 100%; min-height: 52px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(3, 13, 9, .74); color: #b6f1d3; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; resize: vertical; }
.node-list { gap: 7px; }
.node-management-page .node-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(5, 20, 14, .62);
}
.node-management-page .node-item-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(88px, .55fr) 112px 46px 32px;
  align-items: center;
  min-height: 58px;
  gap: 12px;
  padding: 9px 12px;
}
.node-item-identity { display: flex; min-width: 0; align-items: center; gap: 10px; }
.node-status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px rgba(96, 118, 110, .13); }
.node-item-connected .node-status-dot { background: var(--success); box-shadow: 0 0 0 3px rgba(115, 222, 177, .13); }
.node-item-pending .node-status-dot { background: var(--warning); box-shadow: 0 0 0 3px rgba(239, 189, 87, .13); }
.node-item-offline .node-status-dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(242, 126, 137, .13); }
.node-item-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.node-item-meta { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.node-role { justify-self: start; width: max-content; max-width: 100%; padding: 3px 8px; border-radius: 999px; background: var(--surface-subtle); color: var(--text-soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
.node-state { display: inline-flex; width: max-content; min-height: 24px; align-items: center; padding: 2px 9px; border: 1px solid transparent; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.node-state-connected { border-color: rgba(115, 222, 177, .35); background: var(--success-soft); color: var(--success); }
.node-state-pending { border-color: rgba(239, 189, 87, .38); background: var(--warning-soft); color: var(--warning); }
.node-state-offline { border-color: rgba(242, 126, 137, .35); background: var(--danger-soft); color: var(--danger); }
.node-state-disabled { border-color: var(--line); background: rgba(96, 118, 110, .12); color: var(--muted); }
.node-toggle-form { margin: 0; }
.node-toggle { display: inline-flex; width: 38px; height: 22px; align-items: center; padding: 0; border: 0; background: transparent; }
.node-toggle-track { position: relative; display: block; width: 34px; height: 20px; padding: 1px; border: 1px solid #5d756c; border-radius: 999px; background: #3a5048; }
.node-toggle-knob { position: absolute; top: 1px; left: 1px; width: 16px; height: 16px; border-radius: 50%; background: #dbe9e3; transition: transform .16s ease; }
.node-toggle.is-on .node-toggle-track { border-color: var(--accent); background: var(--accent-strong); }
.node-toggle.is-on .node-toggle-knob { transform: translateX(14px); }
.node-item-details { position: relative; align-self: stretch; min-width: 28px; }
.node-item-details > summary { display: grid; width: 28px; height: 100%; min-height: 36px; place-items: center; list-style: none; color: var(--muted); cursor: pointer; }
.node-item-details > summary::-webkit-details-marker { display: none; }
.node-details-chevron { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transition: transform .16s ease; }
.node-item-details[open] .node-details-chevron { transform: rotate(180deg); }
.node-item-details[open] { grid-column: 1 / -1; }
.node-item-details[open] > summary { position: absolute; top: -51px; inset-inline-end: 0; }
.node-details-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 16px; margin: 2px 0 0; padding: 12px 40px 9px; border-top: 1px solid var(--line); background: rgba(7, 19, 14, .44); }
.node-details-grid > div { display: grid; min-width: 0; gap: 2px; }
.node-details-grid span { color: var(--muted); font-size: 10px; }
.node-details-grid strong { overflow: hidden; color: var(--text-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.node-item-actions { display: flex; justify-content: flex-start; padding: 0 40px 11px; }
.node-item-actions form { margin: 0; }
.node-toggle-placeholder { display: block; width: 38px; height: 22px; }
.node-legacy-disclosure { margin-top: 12px; }
.node-legacy-disclosure > summary { min-height: 44px; }
.node-legacy-disclosure .node-list { padding: 0 16px 16px; }
.secondary-form-surface { max-width: 760px; margin-inline: auto; }
.secondary-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.secondary-form-grid .field { margin: 0; }
.secondary-form-advanced { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(7, 20, 15, .32); }
.secondary-form-advanced > summary { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 0 12px; color: var(--text-soft); cursor: pointer; list-style: none; }
.secondary-form-advanced > summary::-webkit-details-marker { display: none; }
.secondary-form-advanced[open] > summary { border-bottom: 1px solid var(--line); }
.secondary-form-advanced > .field { padding: 10px 12px 12px; }
.secondary-form-actions { display: flex; justify-content: flex-start; }
.secondary-form-actions .btn { min-width: 220px; }
.dns-node-list { display: grid; gap: 8px; }
.dns-node-row { display: grid; grid-template-columns: minmax(210px, 1.2fr) max-content max-content minmax(120px, .8fr) minmax(190px, 1fr) auto; align-items: center; gap: 10px; min-height: 66px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(5, 20, 14, .58); }
.dns-node-row.is-primary { border-color: rgba(77, 211, 154, .34); background: linear-gradient(145deg, rgba(19, 74, 52, .45), rgba(6, 21, 15, .66)); }
.dns-node-identity { display: grid; min-width: 0; gap: 3px; }
.dns-node-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dns-node-identity .mono { color: var(--muted); font-size: 10px; }
.dns-node-meta { display: grid; min-width: 0; gap: 2px; }
.dns-node-meta span { color: var(--muted); font-size: 9px; }
.dns-node-meta strong { overflow: hidden; color: var(--text-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.secondary-empty { padding: 28px 12px; color: var(--muted); text-align: center; }
.secondary-disclosure { padding: 0; }
.secondary-disclosure > summary { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 0 16px; color: var(--text-soft); font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; }
.secondary-disclosure > summary::-webkit-details-marker { display: none; }
.secondary-disclosure > summary .node-details-chevron { color: var(--muted); }
.secondary-disclosure[open] > summary .node-details-chevron { transform: rotate(180deg); }
.secondary-disclosure-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.secondary-disclosure-body > .hint { margin: 12px 0; }
.secondary-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.secondary-table { width: 100%; min-width: 700px; border-collapse: collapse; }
.secondary-table th, .secondary-table td { height: 48px; padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; white-space: nowrap; }
.secondary-table th { color: var(--muted); font-size: 10px; font-weight: 750; }
.secondary-table td { color: var(--text-soft); font-size: 11px; }
.secondary-table tr:last-child td { border-bottom: 0; }
.secondary-row-actions { display: flex; align-items: center; gap: 6px; }
.dns-role-badge { display: inline-flex; width: max-content; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; background: var(--surface-subtle); color: var(--text-soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
.dns-infrastructure-page .secondary-surface { margin-top: 14px; }
@media (max-width: 760px) {
  .secondary-page { padding-inline: 0; }
  .secondary-notice { grid-template-columns: 1fr; }
  .node-management-page .node-item-main { grid-template-columns: minmax(180px, 1fr) auto 42px 28px; gap: 8px; }
  .node-management-page .node-role { display: none; }
  .dns-node-row { grid-template-columns: minmax(0, 1fr) max-content max-content; }
  .dns-node-row .dns-node-meta { display: none; }
  .dns-node-row .secondary-row-actions { grid-column: 1 / -1; }
  .node-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 16px; }
  .node-item-actions { padding-inline: 16px; }
  .node-item-details[open] > summary { inset-inline-end: 0; }
}

/* Final sessions track override follows legacy discovery rules. */
.discovery-module[data-page="sessions"] .discovery-sessions-table { width: 100%; min-width: 760px; table-layout: fixed; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-select { width: 42px; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-game { width: 22%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-client { width: 12%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-started { width: 17%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-state { width: 16%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-captured { width: 12%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-action { width: 21%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table td { height: 48px; }
.discovery-module[data-page="sessions"] .session-runtime-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.discovery-module[data-page="sessions"] .session-operational-empty { min-height: 0; margin-top: 8px; padding: 15px 12px; border: 1px dashed var(--line); border-radius: 7px; background: rgba(7, 20, 15, .28); font-size: 11px; }

/* Phone sessions remain a complete operator view instead of hiding the
   action column beyond a wide horizontal table. */
@media (max-width: 600px) {
  .discovery-module[data-page="sessions"] .discovery-table-scroll { overflow-x: hidden; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table { display: block; min-width: 0; table-layout: auto; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table thead { display: none; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table tbody { display: grid; gap: 7px; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table tbody tr { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 5px 7px; padding: 9px 7px; border: 1px solid var(--line); border-radius: 7px; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table tbody tr[hidden] { display: none; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table td { display: block; height: auto; min-width: 0; padding: 0; border: 0; text-align: left; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table td:nth-child(1) { grid-column: 1; grid-row: 1 / span 3; align-self: start; padding-top: 2px; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table td:nth-child(3) { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 10px; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table td:nth-child(4) { grid-column: 2; grid-row: 3; color: var(--muted); font-size: 10px; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table td:nth-child(5) { grid-column: 3; grid-row: 1 / span 2; justify-self: end; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table td:nth-child(6) { grid-column: 3; grid-row: 3; justify-self: end; color: var(--text-soft); }
  .discovery-module[data-page="sessions"] .discovery-sessions-table td:nth-child(7) { grid-column: 1 / -1; grid-row: 4; }
  .discovery-module[data-page="sessions"] .discovery-session-actions { justify-content: flex-start; flex-wrap: wrap; gap: 5px; }
  .discovery-module[data-page="sessions"] .discovery-session-actions .fa-admin-button { flex: 0 0 auto; }

  .global-routes-table { min-width: 0; table-layout: fixed; }
  .global-routes-table .route-domain { width: auto; }
  .global-routes-table .route-match,
  .global-routes-table .route-exit,
  .global-routes-table th:nth-child(2), .global-routes-table td:nth-child(2),
  .global-routes-table th:nth-child(3), .global-routes-table td:nth-child(3) { display: none; }
  .global-routes-table .route-status { width: 76px; }
  .global-routes-table .route-actions { width: 104px; }
  .global-routes-table th, .global-routes-table td { height: 43px; padding: 7px 9px; }
  .global-routes-table th.route-status,
  .global-routes-table td:nth-child(4),
  .global-routes-table th.route-actions,
  .global-routes-table td:nth-child(5) { display: table-cell; }
  .global-routes-table .route-domain-cell { max-width: 100%; }
  .global-route-actions { align-items: stretch; flex-direction: column; gap: 3px; }
  .global-route-actions .btn { width: 100%; padding-inline: 4px; }
}

/* Sessions list: one state column, with runtime detail only when it exists. */
.discovery-module[data-page="sessions"] .discovery-sessions-table { width: 100%; min-width: 760px; table-layout: fixed; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-select { width: 42px; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-game { width: 22%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-client { width: 12%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-started { width: 17%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-state { width: 16%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-captured { width: 12%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-action { width: 21%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table td { height: 48px; }
.discovery-module[data-page="sessions"] .session-runtime-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.discovery-module[data-page="sessions"] .session-operational-empty { min-height: 0; margin-top: 8px; padding: 15px 12px; border: 1px dashed var(--line); border-radius: 7px; background: rgba(7, 20, 15, .28); font-size: 11px; }

/* Lightweight operations view; intentionally scoped so existing pages keep
   their established geometry and visual treatment. */
.operations-page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(10, 27, 21, .82);
  box-shadow: var(--shadow);
}
.operations-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.operations-heading h1 { margin: 4px 0 0; font-size: clamp(20px, 2.5vw, 28px); }
.operations-heading .hint { margin: 5px 0 0; }
.operations-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.operations-card {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 24, 19, .72);
}
.operations-card-overall { border-color: var(--line-strong); }
.operations-card strong { font-size: 20px; line-height: 1.1; }
.operations-card small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.operations-label { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.operations-state-healthy { color: var(--accent); }
.operations-state-degraded { color: #e9d748; }
.operations-state-critical { color: #ff6872; }
.operations-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
}
@media (max-width: 900px) {
  .operations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .operations-page { padding: 16px; }
  .operations-heading { align-items: flex-start; }
  .operations-grid { grid-template-columns: 1fr; }
  .operations-footnote { display: grid; }
}

/* Sessions workspace: keep this compact shell isolated from the other
   Discovery views and from the shared Users styling. */
.sessions-workspace {
  width: 100%;
  min-width: 0;
  padding: 18px 20px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(16, 38, 31, .84), rgba(7, 19, 14, .72));
  box-shadow: var(--shadow-sm);
}
.sessions-workspace > .discovery-nav {
  margin: -18px -20px var(--fa-space-4);
  border-width: 0 0 1px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: rgba(7, 20, 15, .22);
  box-shadow: none;
}
.sessions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 14px;
  direction: rtl;
}
.sessions-header h2 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.sessions-header p { margin: 4px 0 0; font-size: 11px; }
.sessions-header .btn { flex: 0 0 auto; min-width: 104px; }
.sessions-workspace > .notice,
.sessions-workspace > .error { margin-bottom: 14px; }
.sessions-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  direction: rtl;
}
.sessions-metric {
  display: grid;
  min-height: 76px;
  align-content: center;
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 20, 15, .42);
}
.sessions-metric.is-focus { border-color: rgba(54, 203, 145, .42); background: linear-gradient(145deg, rgba(22, 73, 53, .68), rgba(7, 20, 15, .48)); }
.sessions-metric span { color: var(--muted); font-size: 10px; font-weight: 700; }
.sessions-metric strong { direction: ltr; color: var(--text); font-size: 21px; line-height: 1; letter-spacing: -.02em; }
.sessions-table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(4, 14, 10, .38); }
.sessions-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
  border-collapse: collapse;
  direction: rtl;
}
.sessions-col-game { width: 22%; }
.sessions-col-client { width: 14%; }
.sessions-col-status { width: 12%; }
.sessions-col-isolation { width: 14%; }
.sessions-col-number { width: 9%; }
.sessions-col-started { width: 17%; }
.sessions-col-action { width: 7%; }
.sessions-table th,
.sessions-table td { height: 58px; padding: 10px 12px; text-align: right; vertical-align: middle; }
.sessions-table th { position: static; background: rgba(12, 29, 23, .74); font-size: 10px; }
.sessions-table td { font-size: 11px; }
.sessions-table tbody tr { border-bottom: 1px solid var(--line); transition: background .16s ease, opacity .16s ease; }
.sessions-table tbody tr:last-child { border-bottom: 0; }
.sessions-table tbody tr:hover { background: rgba(46, 94, 75, .12); }
.sessions-table tbody tr.is-older { opacity: .68; }
.sessions-table tbody tr.is-older:hover { opacity: .9; }
.sessions-table .sessions-game,
.sessions-table .sessions-client,
.sessions-table .sessions-started { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sessions-table .sessions-game strong { display: block; overflow: hidden; direction: ltr; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.sessions-table .sessions-client,
.sessions-table .sessions-started span { direction: ltr; unicode-bidi: isolate; }
.sessions-table .sessions-number { direction: ltr; text-align: center; font-variant-numeric: tabular-nums; }
.sessions-table .sessions-number strong { font-size: 13px; }
.sessions-table .sessions-badge { min-width: 78px; min-height: 24px; padding-inline: 8px; }
.sessions-table .sessions-action { text-align: center; }
.sessions-table .sessions-action .btn { width: 62px; min-height: 30px; padding: 5px 8px; }
.sessions-modal-layer { z-index: var(--fa-z-modal); }
.sessions-start-form {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(12, 29, 23, .96);
  box-shadow: var(--shadow);
}
.sessions-start-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.sessions-start-head h2 { margin: 2px 0 0; font-size: 19px; line-height: 1.2; }
.sessions-start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sessions-start-grid .field:last-child { grid-column: 1 / -1; max-width: calc(50% - 6px); }
.sessions-start-actions { display: flex; justify-content: flex-start; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sessions-start-actions button { min-width: 82px; }

@media (max-width: 920px) {
  .sessions-workspace > .discovery-nav { margin-inline: -14px; }
}
@media (max-width: 680px) {
  .sessions-workspace { padding: 14px; }
  .sessions-header { align-items: stretch; flex-direction: column; }
  .sessions-header .btn { width: 100%; }
  .sessions-metrics { grid-template-columns: 1fr; }
  .sessions-table { min-width: 820px; }
  .sessions-start-grid { grid-template-columns: 1fr; }
  .sessions-start-grid .field:last-child { grid-column: auto; max-width: none; }
}

/* Games is a management pop-out over the Users page. Keep the page readable
   beneath it while retaining the same restrained overlay treatment as the
   Discovery overlays. */
.panel-popout-runtime > .panel-popout-backdrop,
.panel-popout-fallback > .panel-popout-backdrop {
  background: rgba(2, 9, 7, .52) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.discovery-overlay-runtime {
  position: fixed;
  inset: 0;
  z-index: var(--fa-z-discovery-overlay);
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 48px);
}
.discovery-overlay-runtime[hidden] { display: none; }
.discovery-overlay-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(2, 9, 7, .72);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.discovery-overlay-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1420px, 100%);
  height: min(90vh, 900px);
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(10, 27, 21, .96);
  box-shadow: var(--shadow);
}
.discovery-overlay-head {
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 51, 39, .72), rgba(10, 27, 21, .9));
}
.discovery-overlay-head h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.discovery-overlay-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.discovery-overlay-close { flex: 0 0 auto; }
.discovery-overlay-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  scrollbar-gutter: stable;
}
.discovery-overlay-body.busy { opacity: .62; pointer-events: none; }
.discovery-overlay-body > .discovery-nav,
.discovery-overlay-body > .discovery-top,
.discovery-overlay-body > .queue-heading { display: none !important; }
.discovery-overlay-body .sessions-workspace > .discovery-nav { display: none !important; }
.discovery-overlay-body > .sessions-workspace {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.discovery-overlay-body .sessions-header { margin-top: 0; }
.discovery-overlay-body .sessions-header > div { display: none; }
.discovery-overlay-body .sessions-modal-layer { z-index: 90; }
.discovery-overlay-body .sessions-table-shell,
.discovery-overlay-body .table-wrap { max-width: 100%; }
.discovery-overlay-body .card.queue-filter,
.discovery-overlay-body .queue-filter { margin-top: 0; }
.discovery-overlay-body .sessions-start-form { max-height: calc(100vh - 64px); }
@media (max-width: 680px) {
  .discovery-overlay-runtime { padding: 10px; }
  .discovery-overlay-shell { width: 100%; height: calc(100vh - 20px); max-height: none; border-radius: var(--radius); }
  .discovery-overlay-head { min-height: 56px; padding: 11px 13px; }
  .discovery-overlay-head h2 { font-size: 17px; }
  .discovery-overlay-body { padding: 12px; }
}

/* Final Discovery workspace: one wide glass layer over the existing Users
   surface. The workspace owns direction, width, scroll, and table geometry. */
.falcon-discovery-workspace {
  z-index: var(--fa-z-discovery-overlay, 1200);
  padding: 20px;
  direction: ltr;
}
.falcon-discovery-workspace-backdrop {
  all: unset;
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: rgba(2, 9, 7, .54);
  backdrop-filter: blur(16px) saturate(112%);
  -webkit-backdrop-filter: blur(16px) saturate(112%);
}
.falcon-discovery-workspace-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  width: min(1680px, calc(100vw - 40px));
  height: min(920px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border: 1px solid rgba(134, 211, 185, .3);
  border-radius: 14px;
  background: rgba(5, 24, 18, .84);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .34);
  backdrop-filter: blur(18px) saturate(118%);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
}
.falcon-discovery-workspace-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(134, 211, 185, .16);
  background: rgba(7, 30, 23, .42);
}
.falcon-discovery-workspace-close {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(134, 211, 185, .24);
  border-radius: 7px;
  background: rgba(7, 20, 15, .48);
  color: #d9eee6;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.falcon-discovery-workspace-close:hover { border-color: rgba(104, 217, 176, .62); background: rgba(74, 190, 151, .14); }
.falcon-discovery-workspace-body { min-height: 0; overflow-x: hidden; overflow-y: auto; direction: ltr; scrollbar-gutter: stable; }
.falcon-discovery-workspace-body[aria-busy="true"] { cursor: progress; }
.falcon-discovery-workspace-loading,
.discovery-workspace-error { display: grid; min-height: 180px; place-items: center; padding: 30px; color: #b9d9cd; font-size: 13px; text-align: center; }
.discovery-workspace-error { color: #ffd7dc; }
.falcon-discovery-workspace-body > .discovery-module { width: 100%; max-width: none; min-height: 100%; margin: 0; padding: 24px 28px 36px; direction: ltr !important; text-align: left; }
.falcon-discovery-workspace-body > .discovery-module * { direction: ltr; }
.falcon-discovery-workspace-body .discovery-module-nav,
.falcon-discovery-workspace-body .discovery-kicker { display: none !important; }
.falcon-discovery-workspace-body .discovery-page-head,
.falcon-discovery-workspace-body .discovery-detail-head { direction: ltr; align-items: center; }
.falcon-discovery-workspace-body .discovery-detail-head > .discovery-status { margin-top: 0; }
.falcon-discovery-workspace-body .discovery-head-note { display: block; margin-top: 5px; color: #8ea9a1; font-size: 11px; }
.falcon-discovery-workspace-body .discovery-back { color: #9ae5c6 !important; }
.falcon-discovery-workspace-body .fa-admin-button--secondary,
.falcon-discovery-workspace-body .discovery-filter { color: #d2e8df; }
.falcon-discovery-workspace-body .discovery-filter:hover,
.falcon-discovery-workspace-body .discovery-filter.active { color: #f0fff8; }
.falcon-discovery-workspace-body .discovery-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.falcon-discovery-workspace-body .discovery-metrics:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.falcon-discovery-workspace-body .discovery-clean-table { table-layout: fixed; }
.falcon-discovery-workspace-body .discovery-clean-table th,
.falcon-discovery-workspace-body .discovery-clean-table td { overflow: hidden; text-overflow: ellipsis; text-align: left; }
.falcon-discovery-workspace-body .discovery-clean-table th { vertical-align: middle; }
.falcon-discovery-workspace-body .discovery-clean-table td { line-height: 1.35; }
.falcon-discovery-workspace-body .discovery-clean-table .number-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.falcon-discovery-workspace-body .discovery-clean-table .col-action { width: 10%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-count { width: 10%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-isolation { width: 13%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-status { width: 12%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-started { width: 15%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-client { width: 14%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-game { width: 16%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-attribution { width: 16%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-seen { width: 15%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-domain { width: 29%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-reason { width: 31%; }
.falcon-discovery-workspace-body .discovery-clean-table .col-confidence { width: 11%; }
.falcon-discovery-workspace-body .discovery-live-domains-table .col-domain { width: 37%; }
.falcon-discovery-workspace-body .discovery-suggestions-table .col-domain { width: 20%; }
.falcon-discovery-workspace-body .discovery-table-scroll { overflow-x: auto; overflow-y: visible; }
.falcon-discovery-workspace-body .discovery-clean-table td > strong,
.falcon-discovery-workspace-body .discovery-clean-table td > a { min-width: 0; }
.falcon-discovery-workspace-body .discovery-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.falcon-discovery-workspace-body .discovery-more { flex: 0 0 auto; }
@media (max-width: 900px) {
  .falcon-discovery-workspace { padding: 12px; }
  .falcon-discovery-workspace-panel { width: calc(100vw - 24px); height: calc(100vh - 24px); max-height: calc(100vh - 24px); }
  .falcon-discovery-workspace-body > .discovery-module { padding: 20px 18px 30px; }
  .falcon-discovery-workspace-body .discovery-metrics,
  .falcon-discovery-workspace-body .discovery-metrics:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .falcon-discovery-workspace { padding: 8px; }
  .falcon-discovery-workspace-panel { width: calc(100vw - 16px); height: calc(100vh - 16px); max-height: calc(100vh - 16px); border-radius: 10px; }
  .falcon-discovery-workspace-body > .discovery-module { padding: 16px 13px 24px; }
  .falcon-discovery-workspace-body .discovery-page-head,
  .falcon-discovery-workspace-body .discovery-detail-head { align-items: flex-start; flex-direction: column; }
  .falcon-discovery-workspace-body .discovery-page-head > .fa-admin-button,
  .falcon-discovery-workspace-body .discovery-page-head > .discovery-status { align-self: flex-start; }
}

/* Final mobile contract.  Desktop geometry above remains the source of truth;
   these rules only remove viewport overflow and give every compact surface a
   usable touch/scroll boundary at phone widths. */
@media (max-width: 760px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .falcon-admin-shell-inner { padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right)); }
  .falcon-admin-shell-controls { gap: 6px; }
  .falcon-admin-language-trigger { min-width: 76px; padding-inline: 7px; }
  .falcon-admin-menu {
    max-height: calc(100dvh - var(--fa-shell-header-mobile-height) - 16px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .falcon-admin-menu-row { min-height: 44px; height: 44px; }
  .falcon-admin-menu-subrow { min-height: 40px; height: 40px; }

  .falcon-admin-overlay-layer,
  .falcon-admin-overlay-runtime,
  .falcon-admin-overlay-viewport { padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .falcon-admin-overlay-panel,
  .user-modal, .panel-modal, .domain-detail-modal, .confirm-modal,
  .panel-popout-shell, .management-popout-shell {
    width: min(100%, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .falcon-admin-overlay-panel { overflow: hidden auto; }
  .modal-head, .popout-head, .management-popout-head, .discovery-overlay-head { min-width: 0; }
  .popout-head-actions, .management-popout-head .actions { flex-wrap: wrap; }
  .popout-head-actions .btn { flex: 1 1 auto; }

  .table-wrap, .secondary-table-wrap, .sessions-table-shell,
  .discovery-table-shell, .discovery-table-scroll,
  .falcon-discovery-workspace-body .discovery-table-scroll,
  .games-popout-content .learned-endpoint-list { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  :where(body.falcon-admin-shell) table { min-width: 680px; }
  .discovery-clean-table { min-width: 720px; }
  .secondary-table { min-width: 680px; }
  .sessions-table { min-width: 820px; }

  .top, .page-head, .discovery-top, .secondary-page-head, .secondary-section-head,
  .session-header, .queue-heading, .users-heading, .users-toolbar { min-width: 0; }
  .top > *, .page-head > *, .discovery-top > *, .secondary-page-head > *, .secondary-section-head > * { min-width: 0; max-width: 100%; }
  .form-grid, .compact-form-grid, .secondary-form-grid, .session-info-grid,
  .session-advanced-body, .domain-detail-grid, .discovery-form-grid { grid-template-columns: 1fr; }
  .game-detail-content .compact-form-grid select { min-width: 0; max-width: 100%; }
  .field.full, .domain-detail-item.full { grid-column: auto; }
  .form-actions, .compact-actions, .secondary-row-actions, .profile-commandbar,
  .discovery-form-actions, .discovery-dialog-actions { align-items: stretch; flex-wrap: wrap; }
  .form-actions .btn, .form-actions button, .compact-actions .btn, .compact-actions button,
  .profile-commandbar > .btn, .profile-commandbar > form, .secondary-row-actions form { flex: 1 1 132px; min-width: 0; }
  .profile-commandbar > form { width: 100%; }
  .game-profile-enabled { align-self: start; }

  .game-compact-card { grid-template-columns: 1fr; }
  .game-card-actions { width: 100%; }
  .game-card-actions > *, .game-card-actions .btn { flex: 1 1 120px; min-width: 0; }
  .domain-compact-row { grid-template-columns: minmax(0, 1fr) 62px; }
  .domain-tags { grid-column: 1 / -1; min-width: 0; }
  .domain-ports { min-width: 0; }

  .node-management-page .node-item-main { grid-template-columns: minmax(0, 1fr) 32px 24px; gap: 7px; }
  .node-management-page .node-role,
  .node-management-page .protocol-capabilities { display: none; }
  .node-item-details { grid-column: 1 / -1; }
  .node-details-grid { grid-template-columns: 1fr; padding-inline: 14px; }
  .node-item-actions { padding-inline: 14px; }
  .dns-node-row { grid-template-columns: minmax(0, 1fr) max-content; }
  .dns-node-row .dns-node-meta { display: none; }
  .dns-node-row .secondary-row-actions { grid-column: 1 / -1; }
  .secondary-row-actions form, .secondary-row-actions button { width: 100%; }

  .discovery-module-nav, .discovery-page-head, .discovery-detail-head { min-width: 0; }
  .discovery-filter-form, .discovery-inline-form, .discovery-probe-form { align-items: stretch; }
  .discovery-filter-form input, .discovery-filter-form select,
  .discovery-inline-form input, .discovery-inline-form select,
  .discovery-probe-form input, .discovery-probe-form select { min-width: 0; width: 100%; }
  .discovery-review-controls { grid-template-columns: 1fr; }
  .discovery-review-controls > form:last-child > button,
  .discovery-review-controls .discovery-suggestion-form button { width: 100%; min-width: 0; }
  .discovery-more form { position: fixed; right: 8px; left: 8px; top: auto; min-width: 0; max-width: none; }
  .discovery-meta-grid { grid-template-columns: 1fr; }
  .sessions-metrics, .session-result-grid, .profile-summary-grid { grid-template-columns: 1fr 1fr; }
  .sessions-start-grid { grid-template-columns: 1fr; }
  .sessions-start-grid .field:last-child { grid-column: auto; max-width: none; }
  .node-legend { grid-template-columns: 1fr; }
  .legend-item { min-width: 0; }
}

@media (max-width: 420px) {
  .main { padding-inline: 10px; }
  .falcon-admin-menu { right: 8px; width: calc(100vw - 16px); max-width: calc(100vw - 16px); }
  .falcon-admin-language-trigger { min-width: 70px; }
  .falcon-admin-language-trigger svg { display: none; }
  .sessions-metrics, .session-result-grid, .profile-summary-grid, .stats,
  .discovery-metrics, .discovery-stat-grid { grid-template-columns: 1fr; }
  .operations-grid { grid-template-columns: 1fr; }
  .compact-actions .btn, .compact-actions button, .form-actions .btn, .form-actions button { flex-basis: 100%; }
  .discovery-module { padding-inline: 8px; }
  .falcon-discovery-workspace-body > .discovery-module { padding-inline: 8px; }
  .discovery-filter-bar, .discovery-module-tabs { width: 100%; }
  .discovery-filter, .discovery-module-tabs a { flex: 1 1 120px; justify-content: center; }
  .discovery-table-shell > table, .discovery-clean-table { min-width: 680px; }
  .game-detail-content .game-profile-enabled-copy { white-space: normal; }
}

/* Discovery V2 operator workspace: compact infrastructure-panel layout. */
.discovery-v2-page { width: 100%; max-width: 1680px; margin: 0 auto; padding-bottom: 24px; }
.discovery-v2-topbar { display: grid; grid-template-columns: minmax(260px, 1.2fr) minmax(320px, 1fr) auto; align-items: center; gap: 18px; min-height: 62px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.discovery-v2-identity { display: flex; min-width: 0; align-items: center; gap: 14px; }
.discovery-v2-identity .discovery-back { flex: 0 0 auto; }
.discovery-v2-identity h2 { margin: 2px 0 0; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.discovery-v2-identity h2 span { color: var(--muted); font-weight: 500; }
.discovery-v2-topbar-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.discovery-v2-fact { display: grid; min-width: 0; gap: 3px; }
.discovery-v2-fact small, .discovery-v2-stagebar small { color: var(--muted); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.discovery-v2-fact strong { overflow: hidden; color: var(--text-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.discovery-v2-topbar-actions, .discovery-v2-toolbar-actions, .discovery-v2-stage-actions, .discovery-v2-new-stage { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.discovery-v2-topbar-actions form, .discovery-v2-stage-actions form { display: contents; }
.discovery-v2-topbar .fa-admin-button, .discovery-v2-page .fa-admin-button { min-height: 32px; padding: 0 11px; font-size: 11px; }
.discovery-v2-terminal, .discovery-v2-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 13px; border: 1px solid rgba(255, 196, 88, .3); border-radius: var(--radius-sm); background: rgba(93, 61, 12, .18); color: var(--text-soft); font-size: 12px; }
.discovery-v2-terminal span, .discovery-v2-empty span, .discovery-v2-muted { color: var(--muted); font-size: 11px; }
.discovery-v2-start, .discovery-v2-current-test, .discovery-v2-workbar { margin-top: 10px; padding: 13px 14px; }
.discovery-v2-section-heading, .discovery-v2-domain-head, .discovery-v2-bundle-review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.discovery-v2-section-heading h3, .discovery-v2-domain-head h3 { margin: 1px 0 0; font-size: 14px; }
.discovery-v2-section-heading > .discovery-v2-muted { max-width: 52%; text-align: right; }
.discovery-v2-start-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) minmax(180px, 1fr) auto; align-items: end; gap: 9px; margin-top: 12px; }
.discovery-v2-start-form label, .discovery-v2-new-stage { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; }
.discovery-v2-start-form label > span { color: var(--muted); font-weight: 400; text-transform: none; }
.discovery-v2-page input, .discovery-v2-page select, .discovery-v2-page textarea { min-height: 32px; border-radius: 6px; font-size: 12px; }
.discovery-v2-start-form textarea { min-height: 32px; height: 32px; resize: vertical; }
.discovery-v2-stagebar { display: grid; grid-template-columns: minmax(220px, 1.45fr) minmax(220px, 1.35fr) 90px 100px 120px; gap: 1px; margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); box-shadow: var(--shadow-sm); }
.discovery-v2-stage-main, .discovery-v2-stage-item { display: flex; min-width: 0; min-height: 70px; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 13px; background: var(--surface); }
.discovery-v2-stage-main { border-left: 2px solid var(--accent); }
.discovery-v2-stage-main strong, .discovery-v2-stage-item strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.discovery-v2-stage-main span, .discovery-v2-stage-item span { color: var(--muted); font-size: 10px; }
.discovery-v2-stage-item b { color: var(--accent); }
.discovery-v2-current-test { border-color: rgba(255, 196, 88, .28); }
.discovery-v2-live-state { color: #ffd88b; font-size: 11px; font-weight: 700; }
.discovery-v2-single-test { display: flex; align-items: center; gap: 11px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.discovery-v2-single-test > strong { max-width: 300px; overflow-wrap: anywhere; }
.discovery-v2-single-test > span { color: var(--muted); font-size: 11px; }
.discovery-v2-feedback { display: flex; align-items: center; gap: 6px; margin: 0 0 0 auto; padding: 0; border: 0; }
.discovery-v2-feedback form { display: contents; }
.discovery-v2-bundle-review { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.discovery-v2-bundle-review-head strong { font-size: 12px; }
.discovery-v2-bundle-review-head span { color: var(--accent); font-size: 11px; font-weight: 700; }
.discovery-v2-bundle-list { display: grid; gap: 4px; max-height: 180px; margin-top: 8px; overflow: auto; }
.discovery-v2-bundle-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) 78px; align-items: center; gap: 10px; min-height: 34px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.07); border-radius: 5px; background: rgba(0,0,0,.14); }
.discovery-v2-bundle-row strong { min-width: 0; overflow-wrap: anywhere; font-size: 11px; }
.discovery-v2-bundle-row small { color: var(--muted); font-size: 10px; text-align: right; }
.discovery-v2-route-label { color: var(--text-soft); font-size: 11px; }
.discovery-v2-workbar { background: rgba(4, 17, 14, .45); }
.discovery-v2-active-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 5px; max-height: 120px; margin-top: 9px; overflow: auto; }
.discovery-v2-active-list[hidden] { display: none; }
.discovery-v2-active-chip { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 2px 8px; align-items: center; padding: 6px 8px; border: 1px solid rgba(93, 220, 169, .18); border-radius: 5px; background: rgba(0,0,0,.14); }
.discovery-v2-active-chip strong { min-width: 0; overflow-wrap: anywhere; font-size: 11px; }
.discovery-v2-active-chip .discovery-status { justify-self: end; }
.discovery-v2-active-chip small { grid-column: 1 / -1; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.discovery-v2-minimizing-note { margin-top: 8px; padding: 7px 9px; border-left: 2px solid #ffd88b; color: #ffd88b; font-size: 11px; }
.discovery-v2-domain-section { margin-top: 10px; }
.discovery-v2-domain-head { margin-bottom: 8px; }
.discovery-v2-live-indicator { color: var(--accent); font-size: 11px; font-weight: 700; }
.discovery-v2-live-indicator i { font-style: normal; font-size: 10px; }
.discovery-v2-live-indicator small { margin-left: 5px; color: var(--muted); font-weight: 400; }
.discovery-v2-domain-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.discovery-v2-search-form, .discovery-v2-toolbar-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.discovery-v2-search-form input { width: min(300px, 28vw); }
.discovery-v2-search-form select { width: 144px; }
.discovery-v2-toolbar-actions { justify-content: flex-end; }
.discovery-v2-toolbar-actions > span { margin-right: 3px; }
.discovery-v2-sound { display: inline-flex; align-items: center; gap: 5px; min-height: 18px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.discovery-v2-sound input, .discovery-v2-selection-bar input, .discovery-v2-table input[type="checkbox"] { width: 14px; height: 14px; min-height: 14px; margin: 0; padding: 0; accent-color: var(--accent); }
.discovery-v2-selection-bar { display: flex; align-items: center; gap: 8px; min-height: 40px; margin-bottom: 8px; padding: 6px 9px; border: 1px solid rgba(93, 220, 169, .28); border-radius: 6px; background: rgba(70, 209, 157, .06); }
.discovery-v2-selection-bar .discovery-v2-select-all { margin-right: auto; }
.discovery-v2-select-all { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 11px; white-space: nowrap; }
.discovery-v2-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.discovery-v2-table { width: 100%; min-width: 1080px; table-layout: fixed; }
.discovery-v2-table .v2-col-check { width: 42px; }
.discovery-v2-table .v2-col-host { width: 24%; }
.discovery-v2-table .v2-col-seen { width: 13%; }
.discovery-v2-table .v2-col-queries { width: 8%; }
.discovery-v2-table .v2-col-evidence { width: 15%; }
.discovery-v2-table .v2-col-state { width: 10%; }
.discovery-v2-table .v2-col-route { width: 19%; }
.discovery-v2-table .v2-col-action { width: 11%; }
.discovery-v2-table th, .discovery-v2-table td { height: 42px; padding: 7px 9px; vertical-align: middle; }
.discovery-v2-table th { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.discovery-v2-table td { font-size: 11px; }
.discovery-v2-table .v2-host-cell strong { display: inline; overflow-wrap: anywhere; font-size: 11px; }
.discovery-v2-table .v2-seen-cell { color: var(--muted); font-size: 10px; }
.discovery-v2-table .discovery-inline-status { display: inline; overflow-wrap: anywhere; line-height: 1.35; }
.discovery-v2-evidence-badge { display: inline-flex; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; }
.discovery-v2-evidence-badge.is-captured { border-color: rgba(245, 158, 11, .4); color: #f59e0b; background: rgba(245, 158, 11, .08); }
.discovery-v2-classification-badge { display: inline-flex; padding: 2px 6px; border-radius: 4px; font-size: 9px; font-weight: 700; text-transform: uppercase; margin-left: 4px; border: 1px solid var(--line); color: var(--muted); }
.discovery-v2-classification-badge.is-strong-route-candidate { border: 1px solid rgba(93, 220, 169, 0.5); color: #5ddca9; background: rgba(70, 209, 157, 0.16); box-shadow: 0 0 6px rgba(93, 220, 169, 0.2); }
.discovery-v2-classification-badge.is-possible-route-candidate { border: 1px solid rgba(96, 165, 250, 0.5); color: #60a5fa; background: rgba(96, 165, 250, 0.16); box-shadow: 0 0 6px rgba(96, 165, 250, 0.2); }
.discovery-v2-classification-badge.is-temporary-route { border: 1px solid rgba(192, 132, 252, 0.5); color: #c084fc; background: rgba(192, 132, 252, 0.16); }
.discovery-v2-classification-badge.is-already-routed { border: 1px solid rgba(45, 212, 191, 0.5); color: #2dd4bf; background: rgba(45, 212, 191, 0.16); }
.discovery-v2-classification-badge.is-direct { border: 1px solid rgba(156, 163, 175, 0.4); color: #9ca3af; background: rgba(156, 163, 175, 0.1); }
.discovery-v2-classification-badge.is-current-exit-not-useful { border: 1px solid rgba(248, 113, 113, 0.4); color: #f87171; background: rgba(248, 113, 113, 0.1); }
.discovery-v2-classification-badge.is-unresolved { border: 1px solid var(--line); color: var(--muted); opacity: 0.8; }
.discovery-v2-classification-badge.is-noise { border: 1px solid rgba(107, 114, 128, 0.3); color: #6b7280; background: rgba(107, 114, 128, 0.08); opacity: 0.6; }
.discovery-v2-history-marker { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 3px; color: #a78bfa; background: rgba(167, 139, 250, 0.12); border: 1px solid rgba(167, 139, 250, 0.3); font-size: 9px; font-style: normal; letter-spacing: .04em; }
.discovery-v2-evidence-detail { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.discovery-v2-table td form { display: inline; }
.discovery-v2-table .fa-admin-button--compact { min-height: 27px; padding: 0 8px; font-size: 10px; }
.discovery-v2-empty-row { padding: 24px 10px; color: var(--muted); text-align: center; }
.discovery-v2-load-more { display: block; margin: 9px auto 0; }
.discovery-v2-stage-actions { margin-top: 10px; }
.discovery-v2-stage-actions .discovery-v2-muted { color: var(--muted); }
.discovery-v2-new-stage { grid-template-columns: minmax(180px, 260px) minmax(180px, 300px) auto; align-items: end; margin-top: 10px; padding: 10px 0 0; border-top: 1px solid var(--line); }
.discovery-v2-review { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.72); }
.discovery-v2-review[hidden] { display: none; }
.discovery-v2-review-card { width: min(740px, 100%); max-height: min(700px, 90vh); overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 18px 55px rgba(0,0,0,.42); }
.discovery-v2-review-note { margin: 10px 0; color: var(--muted); font-size: 11px; }
.discovery-v2-review-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.4fr) 130px; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.discovery-v2-review-row strong { overflow-wrap: anywhere; font-size: 11px; }
.discovery-v2-review-row small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.discovery-v2-review-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 13px; }
.discovery-module[data-page="sessions"] { max-width: 1680px; margin: 0 auto; }
.discovery-module[data-page="sessions"] .discovery-page-head { margin-bottom: 10px; }
.discovery-module[data-page="sessions"] .discovery-page-subtitle { margin-top: 3px; }
.discovery-session-filters { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.discovery-session-filters button { min-height: 27px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.discovery-session-filters button:hover, .discovery-session-filters button.is-active { border-color: rgba(93, 220, 169, .35); background: rgba(70, 209, 157, .08); color: var(--accent); }
.discovery-session-filters .discovery-count { margin-left: 4px; }
.discovery-module[data-page="sessions"] .discovery-metrics { margin: 10px 0; }
.discovery-module[data-page="sessions"] .discovery-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.discovery-module[data-page="sessions"] .discovery-surface { padding: 12px 13px; }
.discovery-module[data-page="sessions"] .discovery-surface-head { margin-bottom: 8px; }
.discovery-module[data-page="sessions"] .discovery-clean-table th, .discovery-module[data-page="sessions"] .discovery-clean-table td { padding: 7px 8px; }
.discovery-module[data-page="sessions"] .discovery-sessions-table th { overflow: visible; text-overflow: clip; white-space: normal; line-height: 1.2; }
.discovery-module[data-page="sessions"] .discovery-session-type { display: block; margin-top: 3px; color: var(--accent); font-size: 10px; }
.discovery-module[data-page="sessions"] tr[data-session-mode="legacy"] .discovery-session-type { color: var(--muted); }
.discovery-module[data-page="sessions"] .fa-admin-button--compact { min-height: 27px; padding: 0 8px; font-size: 10px; }
.discovery-module[data-page="sessions"] input[type="checkbox"] { width: 14px; height: 14px; min-height: 14px; margin: 0; padding: 0; accent-color: var(--accent); }
.discovery-module[data-page="sessions"] .discovery-sessions-table { min-width: 0; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-select { width: 3%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-game { width: 15%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-client { width: 9%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-started { width: 12%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-status { width: 8%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-isolation { width: 10%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-count { width: 7%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-action { width: 16%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table td.cell-action { overflow: visible; }
.discovery-module[data-page="sessions"] .discovery-session-actions { display:inline-flex; align-items:center; justify-content:center; gap:6px; flex-wrap:nowrap; white-space:nowrap; }
.discovery-module[data-page="sessions"] .discovery-session-actions .fa-admin-button { flex:0 0 auto; }
.discovery-module[data-page="sessions"] .discovery-session-continue { border-color:rgba(93,220,169,.28); background:rgba(31,92,67,.72); color:#b8f1d7; }
.discovery-v2-live-indicator.is-history { color: var(--muted); }
.discovery-v2-live-indicator.is-history i { color: var(--muted); }
.discovery-v2-flash { display: inline-flex; align-items: center; min-height: 24px; margin-top: 6px; padding: 4px 9px; border: 1px solid rgba(93, 220, 169, .24); border-radius: 5px; background: rgba(70, 209, 157, .07); color: var(--accent); font-size: 11px; }
.discovery-v2-flash[hidden] { display: none; }
.discovery-v2-toolbar-actions .discovery-v2-feedback { min-width: 0; color: var(--accent); font-size: 10px; }
.discovery-v2-target-value { display: flex; min-width: 0; align-items: center; gap: 7px; }
.discovery-v2-target-value strong { flex: 1 1 auto; min-width: 0; }
.discovery-v2-inline-action { flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 10px; font-weight: 700; cursor: pointer; }
.discovery-v2-inline-action:hover { color: var(--text); text-decoration: underline; }
.discovery-v2-target-editor { display: flex; align-items: end; gap: 7px; margin-top: 6px; padding: 7px 9px; border: 1px solid rgba(93, 220, 169, .22); border-radius: 6px; background: rgba(70, 209, 157, .045); }
.discovery-v2-target-editor[hidden] { display: none; }
.discovery-v2-target-editor label { display: grid; flex: 1 1 420px; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; }
.discovery-v2-target-editor input { width: 100%; }
.discovery-v2-stage-target-controls .fa-admin-button[disabled] { cursor: not-allowed; opacity: .42; }
.discovery-v2-stage-target-controls .discovery-v2-muted { max-width: 420px; }

@media (max-width: 1100px) {
  .discovery-v2-topbar { grid-template-columns: 1fr auto; }
  .discovery-v2-topbar-facts { grid-column: 1 / -1; grid-row: 2; }
  .discovery-v2-stagebar { grid-template-columns: minmax(180px, 1.4fr) minmax(200px, 1.2fr) repeat(3, minmax(80px, 1fr)); }
  .discovery-v2-start-form { grid-template-columns: 1fr 1.2fr 1fr; }
  .discovery-v2-start-form > button { grid-column: 3; justify-self: end; }
}
@media (max-width: 760px) {
  .discovery-v2-topbar, .discovery-v2-topbar-facts, .discovery-v2-stagebar, .discovery-v2-start-form, .discovery-v2-new-stage { grid-template-columns: 1fr; }
  .discovery-v2-topbar-facts { grid-column: auto; grid-row: auto; }
  .discovery-v2-topbar-actions { justify-content: flex-start; }
  .discovery-v2-stage-main, .discovery-v2-stage-item { min-height: 58px; }
  .discovery-v2-start-form > button { grid-column: auto; justify-self: stretch; }
  .discovery-v2-domain-toolbar { align-items: stretch; flex-direction: column; }
  .discovery-v2-search-form input, .discovery-v2-search-form select { width: auto; flex: 1 1 150px; }
  .discovery-v2-toolbar-actions { justify-content: flex-start; }
  .discovery-v2-section-heading, .discovery-v2-domain-head { align-items: flex-start; flex-direction: column; }
  .discovery-v2-section-heading > .discovery-v2-muted { max-width: none; text-align: left; }
  .discovery-v2-single-test { align-items: flex-start; flex-direction: column; }
  .discovery-v2-feedback { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .discovery-v2-bundle-row { grid-template-columns: 1fr 1fr; }
  .discovery-v2-bundle-row small { grid-column: 1 / -1; text-align: left; }
  .discovery-v2-selection-bar { align-items: flex-start; flex-wrap: wrap; }
  .discovery-v2-selection-bar .discovery-v2-select-all { width: 100%; }
  .discovery-v2-review-row { grid-template-columns: 1fr; gap: 5px; }
  .discovery-v2-target-editor { align-items: stretch; flex-direction: column; }
}

/* Secondary surface polish.  These classes are intentionally page-owned so
   the accepted Users geometry and the Discovery workspace remain untouched. */
.secondary-page {
  direction: rtl;
  text-align: right;
}
.secondary-page-head {
  min-width: 0;
  align-items: center;
}
.secondary-page-head > div:first-child { min-width: 0; }
.secondary-page-head .eyebrow { display: block; margin-bottom: 5px; }
.secondary-page-head h1 { letter-spacing: -.025em; }
.secondary-page-head p { max-width: 700px; }
.secondary-head-actions { flex-wrap: wrap; }
.secondary-head-actions .btn { white-space: nowrap; }

.dashboard-page { max-width: 1440px; }
.dashboard-heading {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(19, 67, 49, .68), rgba(8, 25, 19, .72) 62%);
  box-shadow: var(--shadow-sm);
}
.dashboard-heading h1 { margin-bottom: 2px; }
.dashboard-heading .muted { margin: 0; }
.dashboard-heading-actions { gap: 8px; }
.dashboard-stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard-stat {
  position: relative;
  min-width: 0;
  min-height: 116px;
  align-content: center;
  gap: 5px;
  overflow: hidden;
  padding: 16px 18px;
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(16, 47, 36, .86), rgba(7, 22, 16, .78));
  box-shadow: var(--shadow-sm);
}
.dashboard-stat::after {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 116px;
  height: 116px;
  border: 1px solid rgba(112, 224, 180, .14);
  border-radius: 50%;
  content: '';
  box-shadow: 0 0 0 14px rgba(112, 224, 180, .04), 0 0 0 28px rgba(112, 224, 180, .025);
  pointer-events: none;
}
.dashboard-stat-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.dashboard-stat strong {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.dashboard-stat small { color: var(--faint); font-size: 10px; }
.dashboard-stat--active { border-color: rgba(72, 214, 155, .36); background: linear-gradient(145deg, rgba(24, 88, 61, .72), rgba(7, 27, 19, .8)); }
.dashboard-stat--active strong { color: var(--success); }
.dashboard-stat--usage strong { font-size: clamp(18px, 1.65vw, 25px); white-space: nowrap; }
.dashboard-surface { margin-top: 0; }
.dashboard-section-head { align-items: center; }
.dashboard-section-head h2 { font-size: 17px; }
.dashboard-table-wrap { background: rgba(4, 14, 10, .32); }
.dashboard-table { width: 100%; min-width: 780px; table-layout: fixed; }
.dashboard-table th,
.dashboard-table td { height: 58px; padding: 10px 14px; }
.dashboard-table th { background: rgba(12, 29, 23, .58); }
.dashboard-table td:first-child a { color: var(--text); font-weight: 750; }
.dashboard-table td:first-child a:hover { color: var(--accent); }
.dashboard-table td:nth-child(3),
.dashboard-table td:nth-child(4),
.dashboard-table td:nth-child(5) { white-space: nowrap; }

.secondary-filter-surface {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 31, 24, .68);
  box-shadow: var(--shadow-sm);
}
.secondary-filter-field { display: grid; min-width: 0; gap: 5px; }
.secondary-filter-field label { font-size: 11px; }
.secondary-filter-field input,
.secondary-filter-field select { min-height: var(--fa-control-height); }
.secondary-filter-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.secondary-filter-actions > * { white-space: nowrap; }
.plans-list-surface,
.subscriptions-list-surface { margin-top: 0; }
.plans-table { min-width: 980px; }
.subscriptions-table { min-width: 1120px; }
.secondary-table td.table-primary { min-width: 180px; white-space: normal; }
.table-primary { color: var(--text); font-weight: 740; }
.table-secondary { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.secondary-table td.table-actions-cell { min-width: 150px; }
.secondary-table .table-actions-cell .actions { justify-content: flex-start; }
.empty-action { margin-top: 12px; }

.record-form-page { max-width: 960px; }
.record-form-page .secondary-form-surface { max-width: 840px; margin-top: 0; }
.record-form-card { box-shadow: var(--shadow-sm); }
.record-form-card .form-grid { row-gap: 16px; }
.record-form-card .field > label { font-size: 11px; }
.record-form-card .field > .hint { min-height: 40px; padding: 9px 10px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: rgba(7, 20, 15, .3); }
.record-form-card .form-actions { margin-top: 4px; }
.record-form-card .form-actions button,
.record-form-card .form-actions .btn { min-width: 128px; }

.nodes-overview-page { max-width: 1440px; }
.nodes-overview-page .secondary-surface { margin-top: 0; }
.nodes-overview-table { min-width: 980px; }
.nodes-overview-table td.table-primary { white-space: nowrap; }

.login-wrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(33, 125, 89, .16), transparent 34%);
}
.login-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.login-orb-primary { top: 12%; right: 16%; width: 260px; height: 260px; border: 1px solid rgba(70, 209, 157, .12); box-shadow: 0 0 0 24px rgba(70, 209, 157, .025), 0 0 0 48px rgba(70, 209, 157, .018); }
.login-orb-secondary { bottom: 10%; left: 17%; width: 180px; height: 180px; border: 1px solid rgba(119, 171, 255, .1); }
.login-card { position: relative; z-index: 1; padding: 30px; background: linear-gradient(145deg, rgba(15, 40, 31, .96), rgba(8, 22, 17, .94)); }
.login-mark { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 18px; border: 1px solid rgba(93, 220, 169, .42); border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 22px; font-weight: 800; letter-spacing: -.08em; }
.login-card .eyebrow { display: block; margin-bottom: 5px; }
.login-card h1 { margin-bottom: 3px; }
.login-card > .muted { margin: 0; }
.login-error { margin-top: 16px; }
.login-password-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; }
.login-card .login-password-control input { min-width: 0; }
.login-card .login-password-toggle { width: auto; min-width: 62px; min-height: var(--fa-control-height); margin: 0; padding: 0 10px; border-color: var(--line); background: var(--surface-subtle); color: var(--text-soft); font-size: 11px; }
.login-card .login-password-toggle:hover { color: var(--accent); }
.login-card .login-submit { margin-top: 20px; }
.login-security-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; color: var(--muted); font-size: 10px; }
.login-security-note span { color: var(--accent); font-size: 8px; }

.discovery-v2-page .discovery-v2-safety { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(420px, 1.5fr); gap: 20px; }
.discovery-v2-page .discovery-v2-safety p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.discovery-v2-page .discovery-v2-start p { max-width: 760px; color: var(--muted); line-height: 1.7; }
.discovery-form-inline, .discovery-v2-summary-actions, .discovery-v2-feedback, .discovery-v2-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.discovery-form-inline label { color: var(--text-soft); font-size: 12px; }
.discovery-form-inline input, .discovery-v2-summary-actions input { min-width: 180px; }
.discovery-v2-summary-actions form { display: flex; gap: 6px; align-items: center; }
.discovery-v2-active { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px; border: 1px solid rgba(255, 196, 88, .32); border-radius: 8px; background: rgba(93, 61, 12, .2); }
.discovery-v2-active > strong { color: #ffd88b; }
.discovery-v2-feedback { margin-left: auto; }
.discovery-v2-bundle-note { margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.discovery-v2-table { min-width: 940px; }
.discovery-v2-table td small, .discovery-v2-table th small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.discovery-v2-recommendation { display: inline-flex; min-width: 72px; justify-content: center; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-soft); font-size: 10px; }
.discovery-v2-recommendation.high { border-color: rgba(93, 220, 169, .42); color: var(--accent); }
.discovery-v2-recommendation.medium { border-color: rgba(119, 171, 255, .42); color: #a9c6ff; }
.discovery-v2-recommendation.direct { border-color: rgba(93, 220, 169, .25); color: #9adbbd; }
.discovery-v2-recommendation.unavailable { border-color: rgba(255, 113, 113, .35); color: #ff9d9d; }
.discovery-page-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.discovery-selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid rgba(255, 113, 113, .28); border-radius: 8px; background: rgba(93, 19, 25, .18); color: var(--text-soft); }
.discovery-selection-bar[hidden] { display: none; }
.discovery-selection-bar strong { color: var(--text); }
.discovery-sessions-table .col-select { width: 42px; }
.discovery-sessions-table td.cell-action { white-space: nowrap; }
.discovery-sessions-table td.cell-action .fa-admin-button + .fa-admin-button { margin-left: 5px; }
.discovery-v2-brief { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.discovery-v2-brief > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(4, 17, 14, .4); }
.discovery-v2-brief span:not(.mono), .discovery-v2-brief small { display: block; color: var(--muted); font-size: 11px; }
.discovery-v2-brief strong { display: block; margin: 4px 0; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.discovery-v2-context { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.discovery-v2-counters { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 11px; }
.discovery-v2-counters strong { color: var(--text); }
.discovery-v2-counters [data-v2-refresh-feedback] { color: var(--accent); }
.discovery-v2-attempt-state { font-weight: 700; }
.discovery-v2-failed-actions { display: flex; align-items: center; gap: 6px; }
.discovery-v2-help { margin-top: 14px; color: var(--muted); font-size: 11px; }
.discovery-v2-help summary { cursor: pointer; color: var(--text-soft); }
.discovery-v2-help p { max-width: 780px; margin: 8px 0 0; line-height: 1.7; }
.discovery-v2-route-ready { color: var(--accent); }
.discovery-v2-route-applying { color: #ffd88b; }
.discovery-v2-route-failed { color: #ff9d9d; }
.discovery-v2-target { display: grid; gap: 4px; margin-top: 14px; padding: 12px 14px; border-left: 2px solid var(--accent); background: rgba(70, 209, 157, .06); }
.discovery-v2-target span, .discovery-v2-target small { color: var(--muted); font-size: 11px; }
.discovery-v2-target strong { color: var(--text); font-size: 14px; line-height: 1.6; }
.discovery-v2-target-action { margin-top: 14px; }
.discovery-v2-active-bundle, .discovery-v2-current-bundle { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(4, 17, 14, .45); }
.discovery-v2-current-bundle { border-color: rgba(93, 220, 169, .38); }
.discovery-v2-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.discovery-v2-panel-head h3 { margin: 0; }
.discovery-v2-panel-head span { color: var(--muted); font-size: 11px; }
.discovery-v2-bundle-list { display: grid; gap: 7px; margin-top: 10px; }
.discovery-v2-bundle-item { display: grid; grid-template-columns: minmax(180px, 1.5fr) auto minmax(170px, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 6px; background: rgba(0,0,0,.14); }
.discovery-v2-bundle-item small { color: var(--muted); font-size: 10px; }
.discovery-v2-bundle-kind, .discovery-v2-confirmed { color: var(--accent); font-size: 11px; }
.discovery-v2-confirmed { color: #ffd88b; }
.discovery-v2-minimizing-note { margin-top: 14px; padding: 10px 12px; color: #ffd88b; border: 1px solid rgba(255,196,88,.28); border-radius: 7px; }
.discovery-v2-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.discovery-v2-toolbar form { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.discovery-v2-toolbar input, .discovery-v2-toolbar select { min-width: 180px; }
.discovery-v2-select-all, .discovery-v2-sound { display: inline-flex; width: max-content; min-height: 18px; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.discovery-v2-select-all input[type="checkbox"], .discovery-v2-sound input[type="checkbox"] { width: 14px; height: 14px; min-height: 14px; margin: 0; padding: 0; accent-color: var(--accent); }
.discovery-v2-selection-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.discovery-v2-selection-bar strong { margin-right: auto; color: var(--text); }
.discovery-v2-host-select { display: flex; min-width: 0; align-items: center; gap: 8px; }
.discovery-v2-host-select input { flex: 0 0 auto; }
.discovery-v2-host-select .mono { min-width: 0; overflow-wrap: anywhere; }
.discovery-v2-new-marker { display: inline-block; margin-left: 6px; padding: 2px 5px; border-radius: 3px; color: #8fd5ff; background: rgba(97,175,255,.12); font-size: 9px; font-style: normal; letter-spacing: .08em; }
.discovery-v2-load-more { display: block; margin: 12px auto 0; }
.discovery-v2-review { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.72); }
.discovery-v2-review[hidden] { display: none; }
.discovery-v2-review-card { width: min(760px, 100%); max-height: min(760px, 90vh); overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 18px 55px rgba(0,0,0,.42); }
.discovery-v2-review-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(130px, 1fr) 220px; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.discovery-v2-review-row small { color: var(--muted); }
.discovery-v2-review-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Final Discovery workspace pass: keep the data surface dense and make
   selection/action state obvious without adding a component dependency. */
.discovery-v2-page input[type="checkbox"],
.discovery-module[data-page="sessions"] input[type="checkbox"] {
  appearance: none;
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(178, 198, 207, .52);
  border-radius: 4px;
  background: rgba(3, 15, 19, .66);
  vertical-align: middle;
  cursor: pointer;
}
.discovery-v2-page input[type="checkbox"]:checked,
.discovery-module[data-page="sessions"] input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}
.discovery-v2-page input[type="checkbox"]:checked::after,
.discovery-module[data-page="sessions"] input[type="checkbox"]:checked::after {
  display: block;
  color: #06221a;
  content: "✓";
  font-size: 11px;
  font-weight: 900;
  line-height: 13px;
  text-align: center;
}
.discovery-v2-page input[type="checkbox"]:focus-visible,
.discovery-module[data-page="sessions"] input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(93, 220, 169, .72);
  outline-offset: 2px;
}
.discovery-v2-page input[type="checkbox"]:disabled,
.discovery-module[data-page="sessions"] input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .38;
}
.discovery-v2-table tbody tr.is-selected > td {
  background: rgba(70, 209, 157, .105);
  border-top-color: rgba(93, 220, 169, .24);
  border-bottom-color: rgba(93, 220, 169, .24);
}
.discovery-v2-table tbody tr.is-selected > td:first-child {
  box-shadow: inset 2px 0 0 var(--accent);
}
.discovery-v2-table tbody tr.v2-active-row > td {
  background: rgba(93, 220, 169, .035);
}
.discovery-v2-table tbody tr.is-selected > td {
  background: rgba(70, 209, 157, .105);
}
.discovery-v2-table tbody tr.is-selected .discovery-v2-new-marker {
  display: none;
}
.discovery-v2-search-tools,
.discovery-v2-search-form {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.discovery-v2-search-form input[type="search"] {
  width: min(300px, 30vw);
}
.discovery-v2-search-form select {
  width: 142px;
}
.discovery-v2-flash {
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 9px;
  border: 1px solid rgba(93, 220, 169, .24);
  border-radius: 5px;
  background: rgba(70, 209, 157, .07);
  color: var(--accent);
  font-size: 11px;
}
.discovery-v2-review-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.discovery-v2-review-card > form {
  display: flex;
  min-height: 0;
  flex-direction: column;
}
.discovery-v2-review-card [data-v2-review-rows] {
  min-height: 0;
  max-height: min(500px, 57vh);
  overflow: auto;
  padding-right: 2px;
}
.discovery-v2-review-row {
  grid-template-columns: minmax(190px, 1.3fr) minmax(150px, 1fr) minmax(200px, 1.1fr) 28px;
  min-height: 52px;
  padding: 7px 0;
}
.discovery-v2-review-evidence,
.discovery-v2-review-action {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.discovery-v2-review-evidence span,
.discovery-v2-review-action span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.discovery-v2-review-evidence strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
}
.discovery-v2-review-action select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  font-size: 11px;
}
.discovery-v2-review-remove {
  width: 21px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 16px;
}
.discovery-v2-review-remove:hover,
.discovery-v2-review-remove:focus-visible {
  border-color: rgba(255, 126, 126, .55);
  color: #ff9a9a;
}
.discovery-v2-review-actions {
  position: sticky;
  bottom: 0;
  margin: 0 -16px -16px;
  padding: 11px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

@media (max-width: 760px) {
  .discovery-v2-search-form input[type="search"] { width: min(100%, 260px); flex: 1 1 190px; }
  .discovery-v2-review-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .discovery-v2-review-evidence,
  .discovery-v2-review-action { grid-column: 1; }
  .discovery-v2-review-remove { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}

@media (max-width: 1180px) {
  .dashboard-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .secondary-page-head { align-items: stretch; flex-direction: column; }
  .secondary-head-actions { width: 100%; }
  .secondary-head-actions .btn { flex: 1 1 140px; }
  .dashboard-heading { padding: 16px; }
  .dashboard-heading-actions { justify-content: stretch; }
  .secondary-filter-surface { grid-template-columns: 1fr; align-items: stretch; }
  .secondary-filter-actions { align-items: stretch; }
  .secondary-filter-actions > * { flex: 1 1 140px; text-align: center; }
  .record-form-page .secondary-form-surface { padding: 14px; }
  .record-form-card .form-actions { align-items: stretch; }
  .record-form-card .form-actions button,
  .record-form-card .form-actions .btn { flex: 1 1 140px; }
  .discovery-v2-page .discovery-v2-safety { grid-template-columns: 1fr; }
  .discovery-v2-brief { grid-template-columns: 1fr; }
  .discovery-v2-context { grid-column: auto; line-height: 1.7; }
  .discovery-v2-feedback { margin-left: 0; width: 100%; }
  .discovery-v2-failed-actions { width: 100%; }
  .discovery-v2-toolbar { align-items: stretch; flex-direction: column; }
  .discovery-v2-toolbar form { width: 100%; }
  .discovery-v2-toolbar input, .discovery-v2-toolbar select { min-width: 0; flex: 1 1 130px; }
  .discovery-v2-bundle-item { grid-template-columns: 1fr 1fr; }
  .discovery-v2-bundle-item small { grid-column: 1 / -1; }
  .discovery-v2-review-row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .dashboard-stat-grid { grid-template-columns: 1fr; }
  .dashboard-stat { min-height: 96px; }
  .dashboard-heading-actions,
  .secondary-filter-actions { display: grid; grid-template-columns: 1fr; }
  .login-card { padding: 24px 20px; }
  .login-password-control { grid-template-columns: 1fr; }
  .login-card .login-password-toggle { width: 100%; }
}

/* Keep these final overrides after the legacy Discovery declarations above. */
.discovery-v2-review-row {
  grid-template-columns: minmax(190px, 1.3fr) minmax(150px, 1fr) minmax(200px, 1.1fr) 28px;
  min-height: 52px;
  padding: 7px 0;
}
.discovery-v2-review-evidence,
.discovery-v2-review-action {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.discovery-v2-review-evidence span,
.discovery-v2-review-action span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.discovery-v2-review-evidence strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
}
.discovery-v2-review-action select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  font-size: 11px;
}
.discovery-v2-review-remove {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 22px;
}
.discovery-v2-review-remove:hover,
.discovery-v2-review-remove:focus-visible {
  border-color: rgba(255, 126, 126, .55);
  color: #ff9a9a;
}
.discovery-v2-review-card [data-v2-review-rows] {
  min-height: 0;
  max-height: min(500px, 57vh);
  overflow: auto;
}
.discovery-v2-review-actions {
  position: sticky;
  bottom: 0;
  margin: 0 -16px -16px;
  padding: 11px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
@media (max-width: 760px) {
  .discovery-v2-review-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .discovery-v2-review-evidence,
  .discovery-v2-review-action { grid-column: 1; }
  .discovery-v2-review-remove { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}

/* Final Discovery design pass.  Keep the operator surface data-first: one
   hierarchy, one control height, and no instructional copy in the way. */
.discovery-v2-page .fa-admin-button {
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  white-space: nowrap;
}
.discovery-v2-topbar {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr) auto;
  gap: 16px;
  min-height: 58px;
  padding: 9px 12px;
}
.discovery-v2-identity { gap: 12px; }
.discovery-v2-identity h2 { margin: 0; font-size: 16px; }
.discovery-v2-topbar-facts { grid-template-columns: minmax(64px, .7fr) minmax(120px, 1fr) minmax(205px, 1.55fr); gap: 10px; }
.discovery-v2-topbar-actions { justify-content: flex-end; }
.discovery-v2-flash { min-height: 22px; margin-top: 6px; padding: 3px 8px; }
.discovery-v2-start { max-width: 860px; margin-inline: auto; }
.discovery-v2-start .discovery-v2-section-heading { justify-content: flex-start; }
.discovery-v2-start-form { grid-template-columns: minmax(170px, 1.05fr) minmax(150px, .9fr) minmax(190px, 1.15fr) auto; margin-top: 10px; }
.discovery-v2-stagebar {
  grid-template-columns: minmax(190px, 1.15fr) minmax(370px, 2.25fr) 84px 108px 112px;
}
.discovery-v2-stage-main, .discovery-v2-stage-item { min-height: 78px; padding: 9px 12px; }
.discovery-v2-stage-main { gap: 3px; }
.discovery-v2-stage-item { gap: 4px; }
.discovery-v2-target-item { min-width: 0; }
.discovery-v2-target-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.discovery-v2-target-value > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discovery-v2-target-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.discovery-v2-target-actions form { display: contents; }
.discovery-v2-target-actions .fa-admin-button { min-height: 29px; padding-inline: 9px; }
.discovery-v2-target-editor { margin-top: 6px; }
.discovery-v2-current-test { padding: 11px 13px; }
.discovery-v2-current-test > .discovery-v2-section-heading h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discovery-v2-single-test { display: grid; grid-template-columns: minmax(230px, 1.15fr) minmax(220px, .9fr) minmax(345px, 1.35fr); gap: 12px; min-width: 0; }
.discovery-v2-single-test > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discovery-v2-single-test .discovery-v2-feedback { justify-self: end; }
.discovery-v2-attempt-hosts {
  display: flex;
  min-width: 0;
  max-height: 50px;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: 4px;
  overflow-x: hidden;
  overflow-y: auto;
}
.discovery-v2-attempt-hosts > strong {
  flex: 0 0 auto;
  max-width: 100%;
  padding: 3px 5px;
  overflow-wrap: normal;
  border: 1px solid rgba(255, 177, 86, .22);
  border-radius: 4px;
  background: rgba(135, 76, 25, .14);
  color: var(--text);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}
.discovery-v2-feedback { gap: 7px; }
.discovery-v2-feedback .fa-admin-button { min-height: 31px; }
.discovery-v2-bundle-review { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; align-items: center; }
.discovery-v2-bundle-review-head, .discovery-v2-bundle-list { grid-column: 1 / -1; }
.discovery-v2-bundle-review-head { min-height: 0; }
.discovery-v2-bundle-list { max-height: 156px; margin-top: 0; }
.discovery-v2-bundle-row { grid-template-columns: minmax(210px, 1.15fr) minmax(0, 1fr) minmax(150px, .8fr); min-height: 32px; }
.discovery-v2-bundle-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discovery-v2-bundle-review > [data-v2-bundle-feedback] { grid-column: 1; margin: 0; }
.discovery-v2-cancel-bundle { grid-column: 2; }
.discovery-v2-cancel-bundle .fa-admin-button { border-color: rgba(255, 177, 86, .38); background: rgba(135, 76, 25, .42); color: #ffd39d; }
.discovery-v2-cancel-bundle .fa-admin-button:hover { border-color: rgba(255, 177, 86, .7); background: rgba(160, 88, 25, .58); }
.discovery-v2-workbar { padding: 11px 13px; }
.discovery-v2-workbar .discovery-v2-section-heading { justify-content: flex-start; }
.discovery-v2-active-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); max-height: 104px; margin-top: 7px; }
.discovery-v2-active-chip {
  min-height: 31px;
  padding: 5px 8px;
  cursor: pointer;
  text-align: left;
}
.discovery-v2-active-chip:hover { border-color: rgba(93, 220, 169, .42); background: rgba(70, 209, 157, .07); }
.discovery-v2-active-chip.is-selected {
  border-color: rgba(93, 220, 169, .76);
  background: rgba(70, 209, 157, .14);
  box-shadow: inset 2px 0 0 var(--accent);
}
.discovery-v2-active-chip:focus-visible {
  outline: 2px solid rgba(93, 220, 169, .72);
  outline-offset: 2px;
}
.discovery-v2-active-chip:disabled { cursor: not-allowed; }
.discovery-v2-active-chip small { font-size: 9px; }
.discovery-v2-working-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.discovery-v2-working-actions[hidden] { display: none; }
.discovery-v2-working-actions > strong { margin-right: auto; color: var(--text); font-size: 11px; }
.discovery-v2-working-actions .fa-admin-button { min-height: 30px; padding-inline: 10px; }
.discovery-v2-domain-head { margin-bottom: 7px; }
.discovery-v2-domain-head > div { min-width: 0; }
.discovery-v2-domain-head h3 { font-size: 14px; }
.discovery-v2-domain-toolbar { align-items: center; margin-bottom: 7px; }
.discovery-v2-search-form { flex-wrap: nowrap; }
.discovery-v2-search-form input[type="search"] { width: min(290px, 25vw); }
.discovery-v2-search-form select { width: 126px; }
.discovery-v2-sound { min-height: 32px; padding-inline: 2px; }
.discovery-v2-toolbar-actions { flex-wrap: nowrap; }
.discovery-v2-toolbar-actions .fa-admin-button { min-height: 32px; }
.discovery-v2-selection-bar { min-height: 38px; margin-bottom: 7px; padding: 5px 8px; }
.discovery-v2-selection-bar .fa-admin-button { min-height: 30px; }
.discovery-v2-clear-button:hover, .discovery-v2-clear-button:focus-visible { border-color: rgba(255, 126, 126, .62); background: rgba(137, 49, 62, .45); color: #ffe6e9; }
.discovery-v2-table tbody tr.v2-active-row { opacity: .58; }
.discovery-v2-table tbody tr.v2-active-row:hover { opacity: .72; }
.discovery-v2-table tbody tr.v2-active-row > td { background: rgba(93, 220, 169, .025); }
.discovery-v2-table tbody tr.is-selected { opacity: 1; }
.discovery-v2-table tbody tr.is-selected > td { background: rgba(70, 209, 157, .11); }
.discovery-v2-page input[type="checkbox"],
.discovery-module[data-page="sessions"] input[type="checkbox"] { border-radius: 4px; }
.discovery-v2-page input[type="checkbox"]:checked,
.discovery-module[data-page="sessions"] input[type="checkbox"]:checked {
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 6 2.4 2.4L10 2.8' fill='none' stroke='%2306221a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 11px 11px;
}
.discovery-v2-review-card { width: min(860px, 100%); max-height: min(720px, 90vh); padding: 15px; }
.discovery-v2-review-card > .discovery-v2-section-heading { flex: 0 0 auto; }
.discovery-v2-review-card > form { flex: 1 1 auto; }
.discovery-v2-review-columns, .discovery-v2-review-row { grid-template-columns: 28px minmax(220px, 1.35fr) minmax(170px, 1fr) minmax(230px, 1.2fr); align-items: center; column-gap: 10px; }
.discovery-v2-review-columns { display: grid; margin-top: 12px; padding: 0 0 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.discovery-v2-review-row { min-height: 48px; padding: 6px 0; }
.discovery-v2-review-row > strong { grid-column: 2; min-width: 0; }
.discovery-v2-review-remove { grid-column: 1; grid-row: 1; width: 21px; height: 18px; font-size: 14px; line-height: 16px; }
.discovery-v2-review-evidence { grid-column: 3; }
.discovery-v2-review-action { grid-column: 4; }
.discovery-v2-review-actions { flex: 0 0 auto; justify-content: flex-end; gap: 8px; margin: 0 -15px -15px; padding: 10px 15px 15px; }
.discovery-v2-review-actions .fa-admin-button { min-width: 112px; }
.discovery-module[data-page="sessions"] .discovery-page-head { margin-bottom: 8px; }
.discovery-module[data-page="sessions"] .discovery-surface-head h3 { font-size: 14px; }
.discovery-v2-selection-bar[hidden] { display: none !important; }
.discovery-v2-clear-button[hidden] { display: none !important; }
.discovery-start-session-form { max-width: 860px; margin-inline: auto; }
.discovery-v2-review-columns span { min-width: 0; }
.discovery-v2-exit-switch { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; }
.discovery-v2-exit-switch { min-width: 0; }
.discovery-v2-exit-switch select { width: min(150px, calc(100% - 48px)); min-width: 0; min-height: 29px; padding: 3px 7px; }
.discovery-v2-exit-switch .fa-admin-button { min-height: 29px; padding-inline: 8px; }
.discovery-v2-exit-rollback { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 6px; color: #ffb17a; font-size: 11px; }
.discovery-v2-profile-action { display: flex; justify-content: flex-end; margin-top: 8px; }
.discovery-v2-profile-action form { margin: 0; }
.game-profile-rule-list .domain-compact-row { align-items: center; }
.profile-rule-actions { justify-content: flex-end; flex-wrap: nowrap; gap: 5px; }
.profile-rule-actions .btn, .profile-rule-actions button { min-height: 29px; }

@media (max-width: 1180px) {
  .discovery-v2-topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .discovery-v2-topbar-facts { grid-column: 1 / -1; grid-row: 2; }
  .discovery-v2-stagebar { grid-template-columns: minmax(180px, 1.05fr) minmax(320px, 1.9fr) repeat(3, minmax(78px, 1fr)); }
  .discovery-v2-single-test { grid-template-columns: minmax(180px, 1fr) minmax(150px, .8fr) max-content; }
  .discovery-v2-single-test .discovery-v2-feedback { grid-column: 1 / -1; justify-self: start; margin-top: 2px; }
  .discovery-v2-search-form input[type="search"] { width: min(260px, 23vw); }
}
@media (max-width: 760px) {
  .discovery-v2-topbar, .discovery-v2-topbar-facts, .discovery-v2-stagebar, .discovery-v2-start-form { grid-template-columns: 1fr; }
  .discovery-v2-topbar-facts { grid-column: auto; grid-row: auto; }
  .discovery-v2-topbar-actions { justify-content: flex-start; }
  .discovery-v2-stage-main, .discovery-v2-stage-item { min-height: 64px; }
  .discovery-v2-target-value { grid-template-columns: 1fr; align-items: start; }
  .discovery-v2-target-actions { flex-wrap: wrap; }
  .discovery-v2-domain-toolbar { align-items: stretch; flex-direction: column; }
  .discovery-v2-search-form { flex-wrap: wrap; }
  .discovery-v2-search-form input[type="search"], .discovery-v2-search-form select { width: auto; flex: 1 1 150px; }
  .discovery-v2-toolbar-actions { justify-content: flex-start; flex-wrap: wrap; }
  .discovery-v2-bundle-review { grid-template-columns: 1fr; }
  .discovery-v2-bundle-review > [data-v2-bundle-feedback], .discovery-v2-cancel-bundle { grid-column: 1; }
  .discovery-v2-feedback { width: 100%; flex-wrap: wrap; margin-left: 0; }
  .discovery-v2-feedback .fa-admin-button { flex: 1 1 120px; }
  .discovery-v2-selection-bar { align-items: center; flex-wrap: wrap; }
  .discovery-v2-selection-bar .discovery-v2-select-all { width: auto; margin-right: auto; }
  .discovery-v2-review-columns { display: none; }
  .discovery-v2-review-row { grid-template-columns: 28px minmax(0, 1fr); row-gap: 4px; }
  .discovery-v2-review-row > strong, .discovery-v2-review-evidence, .discovery-v2-review-action { grid-column: 2; }
  .discovery-v2-review-remove { grid-row: 1 / span 3; align-self: center; }
  .discovery-v2-review-actions { justify-content: stretch; }
  .discovery-v2-review-actions .fa-admin-button { flex: 1 1 0; min-width: 0; }
  .discovery-v2-exit-switch { flex-wrap: wrap; }
  .discovery-v2-exit-switch select { width: 100%; }
  .discovery-v2-exit-rollback { justify-content: flex-start; flex-wrap: wrap; }
  .profile-rule-actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* Game Profile lifecycle surfaces.  These rules share the Discovery panel's
   compact controls and keep the profile page a configuration table rather
   than a second dashboard design. */
.game-detail-content .profile-summary-line {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--line);
}
.game-detail-content .profile-summary-line > div {
  display: grid;
  min-width: 0;
  min-height: 58px;
  align-content: center;
  gap: 2px;
  padding: 8px 10px;
  background: rgba(7, 20, 15, .72);
}
.game-detail-content .profile-summary-line small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.game-detail-content .profile-summary-line strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-detail-content .profile-usage-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0 0 10px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(9, 24, 18, .42);
}
.game-detail-content .profile-usage-title {
  margin-right: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.game-detail-content .profile-usage-period {
  display: inline-flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  min-width: 74px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 10px;
  text-decoration: none;
}
.game-detail-content .profile-usage-period strong { color: var(--text); font-size: 11px; white-space: nowrap; }
.game-detail-content .profile-usage-period:hover,
.game-detail-content .profile-usage-period.active { border-color: var(--line-strong); background: rgba(64, 201, 130, .10); color: var(--text); }
.game-detail-content .profile-commandbar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(9, 24, 18, .56);
}
.game-detail-content .profile-commandbar .import-main { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; }
.game-detail-content .profile-commandbar > .btn,
.game-detail-content .profile-commandbar .import-main > .btn { min-height: 32px; }
.game-detail-content .profile-rule-counts { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.game-detail-content .profile-rule-counts span { padding: 3px 6px; border: 1px solid var(--line); border-radius: 999px; }
.game-detail-content .profile-rule-table { min-width: 980px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(7, 20, 15, .26); }
.game-detail-content .profile-rule-table-head,
.game-detail-content .profile-rule-table-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) minmax(78px, .62fr) minmax(126px, .9fr) minmax(76px, .55fr) minmax(96px, .72fr) minmax(220px, 1.05fr);
  align-items: center;
  gap: 10px;
  min-width: 980px;
  padding: 8px 10px;
}
.game-detail-content .profile-rule-table-head { color: var(--muted); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.game-detail-content .profile-rule-table-row { min-height: 47px; border-bottom: 1px solid rgba(130, 190, 162, .11); color: var(--text-soft); font-size: 11px; }
.game-detail-content .profile-rule-table-row:last-child { border-bottom: 0; }
.game-detail-content .profile-rule-table-row > * { min-width: 0; }
.game-detail-content .profile-rule-table-row > strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.game-detail-content .profile-rule-usage { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.game-detail-content .profile-rule-actions { justify-content: flex-end; }
.game-detail-content .popout-head { align-items: center; }
.game-detail-content .popout-head-actions { align-items: center; flex-wrap: nowrap; }
.game-detail-content .popout-head-actions > form { display: flex; margin: 0; }
.game-detail-content .popout-head-actions > .btn,
.game-detail-content .popout-head-actions > form > .btn,
.game-detail-content .popout-head-actions > form > button { min-height: 30px; }
.game-detail-content .popout-head-actions > .popout-close { width: 30px; height: 30px; }
.game-detail-content .profile-state-history { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.game-detail-content .profile-state-event { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(180px, 1fr); gap: 10px; padding: 7px 10px; border-bottom: 1px solid rgba(130, 190, 162, .11); font-size: 11px; }
.game-detail-content .profile-state-event:last-child { border-bottom: 0; }
.game-detail-content .profile-state-event span { color: var(--muted); }
.game-detail-content .profile-history-panel .profile-revision-list { display: grid; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow-x: auto; overflow-y: visible; }
.game-detail-content .profile-revision-row { display: grid; grid-template-columns: 125px 170px minmax(200px, 1fr) 90px 90px; align-items: center; gap: 10px; min-width: 700px; min-height: 42px; padding: 6px 10px; border-bottom: 1px solid rgba(130, 190, 162, .11); font-size: 11px; }
.game-detail-content .profile-revision-row:last-child { border-bottom: 0; }
.game-detail-content .profile-revision-row > span { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.game-detail-content .profile-revision-row form { margin: 0; }
.game-detail-content .profile-rule-table .compact-empty { grid-column: 1 / -1; min-width: 0; }
.discovery-v2-changeset { padding: 11px 13px; }
.discovery-v2-changeset-list { display: grid; max-height: 170px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.discovery-v2-changeset-row { display: grid; grid-template-columns: 112px minmax(220px, 1.4fr) minmax(180px, 1fr); align-items: center; gap: 10px; min-height: 36px; padding: 5px 9px; border-bottom: 1px solid rgba(130, 190, 162, .11); font-size: 11px; }
.discovery-v2-changeset-row:last-child { border-bottom: 0; }
.discovery-v2-change-kind { color: var(--accent); font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.discovery-v2-changeset-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Core operator surfaces: one deliberate LTR track definition per list. */
.falcon-admin-menu-subrow { direction: ltr; justify-content: flex-start; gap: 9px; padding: 0 12px; text-align: left; }
.falcon-admin-menu-subicon { display: grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; color: var(--muted); }
.falcon-admin-menu-subicon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.falcon-admin-menu-subrow:hover .falcon-admin-menu-subicon, .falcon-admin-menu-subrow:focus-visible .falcon-admin-menu-subicon { color: var(--accent); }
.management-popout-shell { overflow: auto; }
.management-popout-body { max-height: none; overflow: visible; }

.game-profile-list { --game-profile-columns: minmax(250px, 1.25fr) 100px 125px 170px minmax(340px, 1fr); display: grid; gap: 6px; direction: ltr; }
.game-profile-grid { display: grid; grid-template-columns: var(--game-profile-columns); align-items: center; column-gap: 12px; }
.game-profile-list-head { min-height: 27px; padding: 0 14px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.game-profile-list-head > :not(:first-child) { text-align: center; }
.game-profile-select-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.game-profile-select-head > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-profile-select { display: flex; min-width: 0; align-items: center; gap: 8px; }
.game-profile-select .game-card-profile-name { min-width: 0; }
.game-profile-bulk-bar { grid-column: 1 / -1; justify-content: flex-end; margin-bottom: 0; }
.game-profile-bulk-bar strong { margin-right: 0; }
.game-profile-list input.game-profile-select[type="checkbox"] {
  appearance: none;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(178, 198, 207, .52);
  border-radius: 4px;
  background: rgba(3, 15, 19, .66);
  vertical-align: middle;
  cursor: pointer;
}
.game-profile-list input.game-profile-select[type="checkbox"]:checked {
  border-color: var(--accent);
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 6 2.4 2.4L10 2.8' fill='none' stroke='%2306221a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 11px 11px;
}
.game-profile-list input.game-profile-select[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(93, 220, 169, .72);
  outline-offset: 2px;
}
.game-profile-list input.game-profile-select[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .38;
}
.game-profile-list .game-compact-card.is-selected {
  border-color: rgba(93, 220, 169, .24);
  background: rgba(70, 209, 157, .11);
  box-shadow: inset 2px 0 0 var(--accent);
}
.game-compact-card { min-height: 48px; gap: 12px; padding: 7px 14px; border-radius: 7px; }
.game-card-main, .game-card-status, .game-card-route-count, .game-card-updated, .game-card-actions { min-width: 0; }
.game-card-profile-name { display: block; overflow: hidden; color: var(--text); font-size: 13px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.game-card-status, .game-card-route-count, .game-card-updated { display: flex; align-items: center; justify-content: center; text-align: center; }
.game-card-route-count { color: var(--accent) !important; font-size: 14px; font-variant-numeric: tabular-nums; }
.game-card-route-count strong { font-size: 14px; }
.game-card-updated { color: var(--muted) !important; font-size: 10px; white-space: nowrap; }
.game-card-actions { justify-content: center; }
.game-card-secondary-actions > summary { min-width: 27px; justify-content: center; font-size: 18px; line-height: 1; }
.game-card-advanced-menu { top: calc(100% + 6px); right: 0; }

.node-management-row { position: relative; overflow: visible; border: 1px solid var(--line); border-radius: 7px; background: rgba(5, 20, 14, .62); }
.node-management-grid { display: grid; grid-template-columns: minmax(145px, 1.15fr) 100px minmax(135px, .95fr) 95px 100px 145px minmax(245px, 1.55fr); align-items: center; min-height: 56px; gap: 10px; padding: 8px 12px; direction: ltr; }
.node-list-head { min-height: 28px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.node-list-head > :not(:first-child) { text-align: center; }
.node-identity, .node-address, .node-last-seen, .node-capabilities, .node-row-actions { min-width: 0; }
.node-identity { display: grid; gap: 2px; }
.node-identity strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.node-identity small { color: var(--muted); font-size: 9px; }
.node-role-cell, .node-status-cell, .node-capabilities, .node-last-seen { display: flex; justify-content: center; }
.node-address, .node-last-seen { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.node-capabilities { gap: 5px; flex-wrap: wrap; }
.node-capability { color: var(--muted); font-size: 10px; white-space: nowrap; }
.node-capability.is-ready { color: var(--accent); }
.node-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.node-row-actions form { display: flex; margin: 0; }
.node-row-actions .btn { min-height: 27px; padding: 4px 7px; font-size: 10px; }
.node-details, .node-more { position: relative; display: inline-flex; }
.node-details > summary, .node-more > summary { display: inline-flex; min-height: 27px; align-items: center; justify-content: center; gap: 4px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-soft); font-size: 10px; cursor: pointer; list-style: none; white-space: nowrap; }
.node-details > summary::-webkit-details-marker, .node-more > summary::-webkit-details-marker { display: none; }
.node-details > summary:hover, .node-more > summary:hover, .node-details[open] > summary, .node-more[open] > summary { border-color: var(--line-strong); background: var(--surface-subtle); }
.node-details-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 4; display: grid; width: min(700px, calc(100vw - 42px)); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 16px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(10, 25, 20, .99); box-shadow: var(--shadow); }
.node-details-panel > div { display: grid; min-width: 0; gap: 2px; }
.node-details-panel span { color: var(--muted); font-size: 9px; }
.node-details-panel strong { overflow: hidden; color: var(--text-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.node-more > summary { min-width: 26px; padding-inline: 5px; font-size: 17px; line-height: 1; }
.node-more form { position: absolute; top: calc(100% + 6px); right: 0; z-index: 4; padding: 5px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(10, 25, 20, .99); box-shadow: var(--shadow); }
.node-more form .btn { width: max-content; }
.node-list-filters { display: flex; align-items: center; gap: 5px; margin-bottom: 9px; }
.node-list-filters button { min-height: 27px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.node-list-filters button:hover, .node-list-filters button.is-active { border-color: rgba(93, 220, 169, .35); background: rgba(70, 209, 157, .08); color: var(--accent); }
.node-list-filters button span { margin-left: 3px; color: var(--faint); font-variant-numeric: tabular-nums; }
.node-register-surface { max-width: 520px; }
.node-register-form { display: grid; gap: 13px; }
.node-register-form .field { margin: 0; }
.node-register-help { margin: -2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.node-register-form .secondary-form-actions { justify-content: flex-start; margin-top: 2px; }
.node-register-form .secondary-form-actions .btn { min-width: 150px; }
.node-created-notice { grid-template-columns: minmax(180px, .75fr) minmax(0, 1.25fr); }
.install-command { display: grid; grid-template-columns: 1fr auto; gap: 5px 7px; align-items: center; }
.install-command label { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.install-command textarea { min-height: 50px; }
.install-command .btn { grid-column: 2; grid-row: 2; }
.global-routes-intro { margin: -7px 0 12px; color: var(--muted); font-size: 11px; }
.global-routes-page .secondary-surface { margin-top: 12px; }
.global-routes-table th, .global-routes-table td { text-align: left; }
.global-routes-table th:not(:first-child), .global-routes-table td:not(:first-child) { text-align: center; }
.global-routes-table .route-domain { width: 34%; }
.global-routes-table .route-match { width: 22%; }
.global-routes-table .route-exit { width: 17%; }
.global-routes-table .route-status { width: 12%; }
.global-routes-table .route-actions { width: 15%; }
.global-routes-table .route-domain-cell { overflow: hidden; text-overflow: ellipsis; }
.global-route-actions { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.global-route-form { display: grid; grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 1fr) minmax(180px, 1fr) auto; align-items: end; gap: 10px; }
.global-route-form .field { margin: 0; }
.global-route-submit { padding-bottom: 1px; }
.game-detail-content .popout-head { align-items: center; }
.game-detail-content .popout-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: nowrap; white-space: nowrap; }
.game-detail-content .popout-head-actions .btn { min-height: 29px; padding: 4px 8px; font-size: 10px; }
.game-detail-content .profile-rule-table-head,
.game-detail-content .profile-rule-table-row { --profile-rule-columns: minmax(170px, 1.05fr) 78px minmax(112px, .78fr) 78px 108px minmax(220px, 1.3fr); grid-template-columns: var(--profile-rule-columns); }

/* Final LTR geometry for the English operator surfaces.  The inherited
   application direction is RTL for the legacy locale, but these pages are
   deliberately authored as left-to-right information tables. */
.games-popout-content,
.node-management-page,
.global-routes-page { direction: ltr; text-align: left; }
.global-routes-table { direction: ltr; }

/* Keep every desktop profile cell on the shared list tracks.  An older card
   rule narrowed the card to two columns, which caused the five cells to wrap
   into a vertical stack. */
@media (min-width: 761px) {
  .game-profile-list .game-compact-card {
    grid-template-columns: var(--game-profile-columns);
    gap: 12px;
  }
}

/* Storage Health is intentionally a compact operational readout, not a
   second dashboard.  The overlay owns vertical scrolling; tables own only
   their necessary horizontal overflow. */
.storage-health-modal { width: min(1120px, calc(100vw - 32px)); }
.storage-health-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.storage-health-body { display: grid; gap: 12px; min-width: 0; }
.storage-health-loading, .storage-health-error { padding: 30px 12px; color: var(--muted); text-align: center; }
.storage-health-error { color: #ffb7bf; }
.storage-health-warning { padding: 9px 11px; border: 1px solid rgba(255, 196, 88, .28); border-left: 3px solid #e4a942; border-radius: 6px; background: rgba(126, 85, 20, .16); color: #ffd98f; font-size: 11px; }
.storage-health-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.storage-health-summary > div { display: grid; gap: 4px; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: rgba(8, 25, 19, .46); }
.storage-health-summary span, .storage-health-section h2 { color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
.storage-health-summary strong { overflow: hidden; color: var(--text); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.storage-health-section { min-width: 0; }
.storage-health-section h2 { margin: 0 0 7px; color: var(--accent); }
.storage-health-meta { margin: -1px 0 7px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.storage-health-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: rgba(7, 20, 15, .32); }
.storage-health-table-wrap table { min-width: 0 !important; table-layout: fixed; }
.storage-health-table-wrap th, .storage-health-table-wrap td { height: 36px !important; padding: 7px 9px !important; font-size: 10px !important; }
.storage-health-table-wrap th:nth-child(1) { width: 52%; }
.storage-health-table-wrap th:not(:first-child), .storage-health-table-wrap td:not(:first-child) { text-align: center !important; white-space: nowrap; }
.storage-health-table-wrap td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.storage-health-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
@media (max-width: 680px) {
  .storage-health-modal { width: calc(100vw - 16px); }
  .storage-health-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storage-health-columns { grid-template-columns: minmax(0, 1fr); }
  .storage-health-table-wrap table { min-width: 520px !important; }
}

/* Node Usage analytics: data-first layout.  The three tables intentionally
   use shared row/header grid tracks so the numbers sit directly below their
   labels at every desktop width. */
.node-usage-modal {
  width: min(1240px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 18px;
  overflow: hidden;
}
.node-usage-modal > .modal-head { flex: 0 0 auto; margin-bottom: 13px; }
.node-usage-modal .modal-title { align-items: center; }
.node-usage-modal .modal-title h1 { margin: 0; color: var(--accent); font-size: 17px; letter-spacing: .08em; }
.node-usage-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 10px; font-weight: 500; }
.node-usage-analytics {
  min-height: 0;
  overflow: hidden auto;
  padding: 1px 1px 3px;
  overscroll-behavior: contain;
}
.node-usage-total {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(64, 201, 130, .28);
  border-radius: var(--radius-sm);
  background: rgba(17, 84, 57, .2);
}
.node-usage-total-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.node-usage-total strong { color: var(--text); font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1; }
.node-usage-total-note { color: var(--muted); font-size: 10px; text-align: right; }
.node-usage-breakdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.node-usage-section:first-child { grid-column: 1 / -1; }
.node-usage-section { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(5, 20, 14, .48); }
.node-usage-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.node-usage-section-head h2 { margin: 0; color: var(--text-soft); font-size: 11px; letter-spacing: .08em; }
.node-usage-section-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.node-usage-table-scroll { max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.node-usage-table { width: 100%; min-width: 0; direction: ltr; }
.node-usage-node-table { --usage-grid: minmax(220px, 1.65fr) repeat(4, minmax(86px, .65fr)); }
.node-usage-games-table { --usage-grid: minmax(0, 1fr) minmax(105px, .42fr) minmax(82px, .34fr); }
.node-usage-domains-table { --usage-grid: minmax(190px, 1.2fr) minmax(170px, 1fr) minmax(100px, .5fr) minmax(82px, .35fr); }
.node-usage-table-row { display: grid; grid-template-columns: var(--usage-grid); align-items: center; min-height: 40px; gap: 10px; border-bottom: 1px solid rgba(129, 164, 148, .13); color: var(--text-soft); font-size: 11px; font-variant-numeric: tabular-nums; }
.node-usage-table-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-usage-table-head { min-height: 28px; border-bottom-color: var(--line-strong); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.node-usage-table-row > span:not(:first-child) { text-align: center; }
.node-usage-table-row .usage-identity { color: var(--text); text-align: left; }
.node-usage-table-row .usage-profile { color: var(--text-soft); text-align: left; }
.node-usage-empty-row { display: block; min-height: 48px; padding: 16px 0; border-bottom: 0; color: var(--muted); font-size: 10px; text-align: left; }
.node-usage-footnote { margin: 12px 1px 0; color: var(--faint); font-size: 9px; }
@media (max-width: 760px) {
  .node-usage-modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 13px; overflow-x: hidden; overflow-y: auto; }
  .node-usage-modal .node-usage-analytics { overflow: visible; }
  .node-usage-modal > .modal-head { margin-bottom: 11px; }
  .node-usage-modal .modal-title h1 { font-size: 15px; }
  .node-usage-total { grid-template-columns: 1fr auto; gap: 5px 10px; }
  .node-usage-total strong { grid-column: 1; grid-row: 2; font-size: 20px; }
  .node-usage-total-note { grid-column: 2; grid-row: 2; align-self: end; }
  .node-usage-breakdowns { grid-template-columns: 1fr; gap: 10px; }
  .node-usage-section:first-child { grid-column: auto; }
  .node-usage-section { padding: 11px; }
  .node-usage-table-scroll { overflow-x: hidden; }
  .node-usage-table { min-width: 0; }
  .node-usage-table-head { display: none; }
  .node-usage-table-row { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 50px; gap: 8px 12px; padding: 8px 0; }
  .node-usage-table-row > span { overflow: visible; white-space: normal; }
  .node-usage-table-row > span::before { display: block; margin-bottom: 2px; color: var(--faint); content: attr(data-label); font-size: 8px; font-weight: 800; letter-spacing: .06em; }
  .node-usage-table-row .usage-identity { grid-column: 1 / -1; font-weight: 700; }
  .node-usage-table-row .usage-profile { overflow-wrap: anywhere; text-align: left !important; }
  .node-usage-empty-row { display: block; min-height: 42px; padding: 14px 0; }
  .node-usage-empty-row::before { display: none; content: none; }
  .node-usage-footnote { line-height: 1.45; }
}

@media (max-width: 760px) {
  .game-profile-list .game-compact-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .game-profile-list .game-card-main { grid-column: 1; grid-row: 1; }
  .game-profile-list .game-card-status { grid-column: 2; grid-row: 1; }
  .game-profile-list .game-card-route-count { grid-column: 1; grid-row: 2; justify-content: flex-start; }
  .game-profile-list .game-card-updated { grid-column: 2; grid-row: 2; justify-content: flex-end; }
  .game-profile-list .game-card-actions { grid-column: 1 / -1; grid-row: 3; }
}

/* The menu is also an English LTR operator surface: icon, label, then the
   disclosure affordance. */
.falcon-admin-menu,
.falcon-admin-menu-row { direction: ltr; }
.falcon-admin-menu-row { text-align: left; }
.falcon-admin-menu-subrow { padding-left: 12px; padding-right: 42px; }

/* A full-screen Admin overlay owns its content scroll.  Locking the page
   beneath it prevents the mobile document scrollbar from competing with the
   visible workspace/panel scrollbar. */
html:has(.falcon-admin-overlay-layer:not([hidden])),
body:has(.falcon-admin-overlay-layer:not([hidden])) { overflow: hidden; }

@media (max-width: 760px) {
  .game-profile-list-head { display: none; }
  .game-profile-list .game-profile-list-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 18px;
    padding: 0 10px;
  }
  .game-profile-list .game-profile-list-head > :not(:first-child) { display: none; }
  .game-profile-list .game-profile-select-head > span { display: none; }
  .game-profile-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 9px; }
  .game-compact-card { padding: 9px 10px; }
  .game-card-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .game-card-actions .btn { min-height: 29px; }
  .game-card-route-count, .game-card-updated { justify-content: flex-end; }
  .node-list-head { display: none; }
  .node-management-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 9px; padding: 10px; }
  .node-role-cell, .node-address, .node-capabilities, .node-last-seen { justify-content: flex-start; }
  .node-address { grid-column: 1 / -1; }
  .node-row-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .node-details-panel { position: fixed; top: auto; right: 14px; bottom: 14px; left: 14px; width: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .node-created-notice { grid-template-columns: 1fr; }
  .global-route-form { grid-template-columns: 1fr; }
  .global-route-submit { padding-bottom: 0; }
}

@media (max-width: 760px) {
  .game-detail-content .profile-summary-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-detail-content .profile-usage-strip { flex-wrap: wrap; }
  .game-detail-content .profile-usage-title { flex: 0 0 100%; margin: 0 0 1px; }
  .game-detail-content .profile-usage-period { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .game-detail-content .profile-commandbar { align-items: stretch; flex-wrap: wrap; }
  .game-detail-content .profile-commandbar .import-main { width: 100%; margin-right: 0; }
  .game-detail-content .profile-commandbar > .btn { flex: 1 1 120px; }
  .game-detail-content .profile-rule-counts { flex-wrap: wrap; }
  .discovery-v2-changeset-row { grid-template-columns: 90px minmax(0, 1fr); }
  .discovery-v2-changeset-row > :last-child { grid-column: 2; }
}

/* Profile lifecycle controls: compact, aligned, and secondary to the
   profile name.  The picker is deliberately scoped so the rest of Admin
   keeps its established layout. */
.game-compact-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 8px 10px;
}
.game-list-title { margin: 0; color: var(--accent); font-size: 14px !important; font-weight: 780; letter-spacing: .08em; }
.game-card-title-row { gap: 5px; }
.game-card-title-row strong { font-size: 13px; line-height: 1.25; }
.game-card-meta { gap: 12px; margin-top: 4px; }
.game-card-meta span { padding: 0; border-radius: 0; background: transparent; font-size: 9px; }
.game-card-route-count { color: var(--text-soft) !important; }
.game-card-updated { color: var(--muted) !important; }
.game-card-meta b { color: var(--accent); font-size: 10px; }
.game-card-actions {
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
  direction: ltr;
}
.game-card-actions > form { display: flex; margin: 0; }
.game-card-actions .btn {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1;
}
.game-card-secondary-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.game-card-secondary-actions > summary {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
  list-style: none;
}
.game-card-secondary-actions > summary::before,
.game-card-secondary-actions[open] > summary::before { content: none !important; display: none; }
.game-card-secondary-actions > summary::marker { content: ''; }
.game-card-secondary-actions > summary::-webkit-details-marker { display: none; }
.game-card-secondary-actions[open] > summary,
.game-card-secondary-actions > summary:hover {
  border-color: var(--line);
  background: var(--surface-subtle);
  color: var(--text-soft);
}
.game-card-advanced-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 3;
  min-width: 112px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(10, 25, 20, .99);
  box-shadow: var(--shadow);
}
.game-card-secondary-actions .discovery-upload-form { display: inline-flex; margin: 0; }
.game-card-secondary-actions .discovery-pick { min-height: 26px; }
.profile-discovery-picker {
  position: fixed;
  inset: 0;
  z-index: var(--fa-z-nested-modal, 80);
  display: grid;
  place-items: center;
  padding: 16px;
}
.profile-discovery-picker-card {
  width: min(430px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(10, 25, 20, .98);
  box-shadow: var(--shadow);
}
.profile-discovery-picker-card .modal-head { margin: -16px -16px 12px; padding: 12px 14px; }
.profile-discovery-picker-game {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(7, 20, 15, .48);
}
.profile-discovery-picker-game span,
.profile-discovery-picker-game small { color: var(--muted); font-size: 10px; }
.profile-discovery-picker-game strong { color: var(--text); font-size: 14px; }
.profile-discovery-picker-form { display: grid; gap: 12px; }
.profile-discovery-picker-form select { width: 100%; min-width: 0; }
.profile-discovery-picker-actions { display: flex; justify-content: flex-end; gap: 6px; }
@media (max-width: 760px) {
  .game-compact-card { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .game-card-main { min-width: 0; }
  .game-card-title-row strong { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
  .game-card-actions { grid-column: 1; width: 100%; min-width: 0; justify-content: flex-start; flex-wrap: wrap; }
  .game-card-secondary-actions .game-card-advanced-menu { left: 0; right: auto; }
  .game-card-actions { justify-content: flex-start; flex-wrap: wrap; }
  .game-card-actions > *, .game-card-actions .btn { flex: 0 0 auto; }
  .game-card-secondary-actions { justify-self: start; }
  .profile-discovery-picker { padding: 8px; }
  .profile-discovery-picker-card { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
}

/* Final operator polish: keep short profile panels in the first viewport and
   make the dense Sessions table scroll horizontally on phones instead of
   collapsing its headers and action controls into unreadable slivers. */
@media (min-width: 761px) {
  .panel-popout-fallback,
  .panel-popout-runtime { align-items: flex-start; padding-top: calc(var(--fa-shell-header-height) + 16px); padding-bottom: 16px; }
}

@media (max-width: 680px) {
  .discovery-module[data-page="sessions"] .discovery-table-scroll { overflow-x: auto; overflow-y: visible; padding-inline: 0; overscroll-behavior-x: contain; }
  .discovery-module[data-page="sessions"] .discovery-sessions-table { min-width: 920px; }
}

@media (max-width: 760px) {
  .game-detail-content .popout-head { align-items: flex-start; flex-wrap: wrap; }
  .game-detail-content .game-detail-title { flex: 1 1 100%; width: 100%; }
  .game-detail-content .popout-head-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

@media (min-width: 761px) and (max-height: 760px) {
  .falcon-discovery-workspace-body > .discovery-module { padding-bottom: 28px; }
}

@media (min-width: 601px) {
  .falcon-discovery-workspace-panel:has(.discovery-module[data-page="sessions"]) { height: auto; }
}

@media (max-width: 600px) {
  .falcon-discovery-workspace-panel:has(.discovery-module[data-page="sessions"]) { height: auto; max-height: calc(100vh - 16px); }
}

/* Final Sessions geometry override; kept last so legacy discovery rules cannot
   restore the retired Phase/Isolation/Needs Route tracks. */
.discovery-module[data-page="sessions"] .discovery-sessions-table { width: 100%; min-width: 760px; table-layout: fixed; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-select { width: 42px; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-game { width: 22%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-client { width: 12%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-started { width: 17%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-state { width: 16%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-captured { width: 12%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table .col-action { width: 21%; }
.discovery-module[data-page="sessions"] .discovery-sessions-table td { height: 48px; }
.discovery-module[data-page="sessions"] .session-runtime-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.discovery-module[data-page="sessions"] .session-operational-empty { min-height: 0; margin-top: 8px; padding: 15px 12px; border: 1px dashed var(--line); border-radius: 7px; background: rgba(7, 20, 15, .28); font-size: 11px; }

/* Keep the phone reflow last so the legacy fixed table track cannot restore a
   760px layout after these card-like session rows are declared. */
@media (max-width: 600px) {
  .discovery-module[data-page="sessions"] .discovery-sessions-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }
  .discovery-module[data-page="sessions"] .discovery-sessions-table td {
    height: auto !important;
  }
  .global-routes-page .global-routes-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
}

/* Confirmation checkbox rows read as explicit operator ack, not body text. */
.confirm-check { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; color: var(--fa-text-soft); font-size: 12px; line-height: 1.45; }
.confirm-check input[type="checkbox"] { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.confirm-check:hover { color: #fff; }

/* Nested card-in-card forms keep the parent rhythm. */
.card.nested-card { margin-top: var(--fa-space-3); background: rgba(7, 21, 16, .54); }
.card.nested-card > h3 { margin: 0 0 var(--fa-space-2); font-size: 13px; }

/* Game Profile domain surface: compact operator controls and one six-column
   information track shared by the list and Open Profile view. */
.game-detail-content .profile-default-exit-form {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.game-detail-content .profile-default-exit-form > label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.game-detail-content .profile-default-exit-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.game-detail-content .profile-default-exit-controls select {
  min-width: 0;
  width: min(170px, 100%);
  max-width: 220px;
  padding: 4px 7px;
  font-size: 10px;
}
.game-detail-content .profile-default-exit-controls button {
  flex: 0 0 auto;
}
.game-detail-content .profile-default-exit-cell {
  min-width: 0;
}
.game-detail-content .profile-publication-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: -5px 0 10px;
  color: var(--muted);
  font-size: 9px;
}
.game-detail-content .profile-publication-summary strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.game-detail-content .profile-domain-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.game-detail-content .profile-domain-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.game-detail-content .profile-domain-heading h3 {
  margin: 0;
}
.game-detail-content .profile-domain-counts {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.game-detail-content .profile-domain-counts span {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .03em;
}
.game-detail-content .profile-domain-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.game-detail-content .profile-domain-search input {
  width: min(240px, 32vw);
  min-width: 130px;
  padding: 6px 8px;
}
.game-detail-content .profile-table-sort {
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.game-detail-content .profile-table-sort:hover,
.game-detail-content .profile-table-sort[aria-pressed="true"] {
  border-color: var(--line-strong);
  background: rgba(64, 201, 130, .10);
  color: var(--text);
}
.game-detail-content .profile-rule-table {
  min-width: 860px;
  overflow-x: auto;
}
.game-detail-content .profile-rule-table-head,
.game-detail-content .profile-rule-table-row {
  --profile-rule-columns: minmax(190px, 1.35fr) minmax(76px, .55fr) 72px minmax(150px, 1fr) 82px minmax(220px, 1.45fr);
  grid-template-columns: var(--profile-rule-columns);
  min-width: 860px;
}
.game-detail-content .profile-rule-table-row .decision-chip,
.game-detail-content .profile-rule-table-row .runtime-chip {
  justify-self: start;
}
.game-detail-content .profile-exit-value {
  display: grid;
  min-width: 0;
  gap: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-detail-content .profile-exit-value small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-detail-content .profile-rule-actions {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}
.game-detail-content .profile-rule-actions form {
  margin: 0;
}
@media (max-width: 760px) {
  .game-detail-content .profile-domain-head {
    align-items: stretch;
    flex-direction: column;
  }
  .game-detail-content .profile-domain-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .game-detail-content .profile-domain-search {
    flex: 1 1 180px;
  }
  .game-detail-content .profile-domain-search input {
    width: 100%;
    min-width: 0;
  }
  .game-detail-content .profile-default-exit-controls select {
    width: 100%;
    max-width: none;
  }
  .game-detail-content .profile-default-exit-controls {
    align-items: stretch;
  }
  .game-detail-content .profile-default-exit-cell {
    grid-column: 1 / -1;
  }
}

.game-detail-content .profile-runtime-warning {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin: 8px 0 0;
  padding: 4px 8px;
  border: 1px solid rgba(247, 190, 88, .32);
  border-radius: 999px;
  background: rgba(247, 190, 88, .10);
  color: #f4cf83;
  font-size: 10px;
  font-weight: 750;
}
.game-detail-content .profile-rule-table-row .decision-chip,
.game-detail-content .profile-rule-table-row .profile-state-chip {
  width: max-content;
  max-width: 100%;
}
.game-detail-content .profile-state-chip {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: max-content;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.1;
  white-space: nowrap;
}
.game-detail-content .profile-state-chip.enabled {
  border-color: rgba(97, 216, 162, .28);
  background: var(--success-soft);
  color: #8bf0c3;
}
.game-detail-content .profile-state-chip.disabled {
  border-color: rgba(242, 126, 137, .27);
  background: var(--danger-soft);
  color: #ffabb3;
}
.game-detail-content .profile-state-chip.temporary {
  border-color: rgba(133, 183, 255, .25);
  background: rgba(67, 102, 145, .22);
  color: #b4d3ff;
}
/* Game Profile Spec Kit preview: page-owned geometry and controls.  The
   parent selectors only match shells containing one of these two workspace
   roots; shared overlay behavior remains unchanged for every other surface. */
.panel-popout-game-list,
.panel-popout-game-detail,
.panel-popout-shell:has(> .game-list-workspace),
.panel-popout-shell:has(> [data-game-detail-workspace]) {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(1420px, calc(100vw - 40px));
  height: min(900px, calc(100vh - 96px));
  max-height: calc(100vh - 96px);
  overflow: hidden;
}
.panel-popout-fallback:has(.game-list-workspace),
.panel-popout-fallback:has([data-game-detail-workspace]),
.panel-popout-runtime:has(.game-list-workspace),
.panel-popout-runtime:has([data-game-detail-workspace]) {
  align-items: center;
  padding: 20px;
}

.game-list-workspace,
[data-game-detail-workspace] {
  box-sizing: border-box;
  display: flex;
  min-width: 0;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.game-list-workspace .popout-head {
  flex: 0 0 auto;
}
.game-list-workspace .game-list-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}
.game-list-workspace .game-list-heading .game-list-title {
  margin: 0;
  white-space: nowrap;
}
.game-list-workspace .game-profile-search {
  display: flex;
  width: min(250px, 28vw);
  min-width: 150px;
  margin: 0;
}
.game-list-workspace .game-profile-search-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7, 20, 15, .58);
  color: var(--text);
  font-size: 11px;
}
.game-list-workspace .game-profile-search-input::placeholder { color: var(--muted); }
.game-list-workspace .game-profile-search-input:focus-visible { border-color: var(--line-strong); outline: 2px solid rgba(93, 220, 169, .22); outline-offset: 1px; }
.game-list-workspace .game-list-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding-inline-end: 2px;
  scrollbar-gutter: stable;
}
.game-list-workspace .game-profile-list {
  min-width: 0;
  --game-profile-columns: minmax(250px, 1.25fr) 100px 125px 170px minmax(340px, 1fr);
}
.game-list-workspace .game-profile-list [hidden] { display: none; }
.game-list-workspace .game-list-filter-empty { margin: 8px 0; text-align: center; }

.game-detail-content[data-game-detail-workspace] .game-detail-top {
  min-width: 0;
  flex: 0 0 auto;
}
.game-detail-content[data-game-detail-workspace] .game-detail-body {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding-inline-end: 2px;
  scrollbar-gutter: stable;
}
.game-detail-content[data-game-detail-workspace] .game-detail-title h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.25;
}
.game-detail-content[data-game-detail-workspace] .game-detail-title { display: flex; min-width: 0; align-items: center; gap: 10px; }
.game-detail-content[data-game-detail-workspace] .game-detail-back { flex: 0 0 auto; color: var(--text-soft); font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.game-detail-content[data-game-detail-workspace] .game-detail-back:hover { color: var(--text); }
.game-detail-content[data-game-detail-workspace] .profile-summary-line {
  grid-template-columns: minmax(88px, .72fr) minmax(230px, 1.8fr) repeat(3, minmax(100px, 1fr));
  gap: 1px;
  margin: 0 0 6px;
}
.game-detail-content[data-game-detail-workspace] .profile-summary-line > div {
  min-height: 56px;
  padding: 7px 9px;
}
.game-detail-content[data-game-detail-workspace] .profile-default-exit-form {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.game-detail-content[data-game-detail-workspace] .profile-default-exit-form > label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.game-detail-content[data-game-detail-workspace] .profile-default-exit-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}
.game-detail-content[data-game-detail-workspace] .profile-default-exit-controls select {
  min-width: 0;
  height: 30px;
  flex: 1 1 auto;
  padding: 5px 8px;
  font-size: 10px;
}
.game-detail-content[data-game-detail-workspace] .profile-default-exit-controls .small {
  min-height: 30px;
  flex: 0 0 auto;
  padding-inline: 9px;
}
.game-detail-content[data-game-detail-workspace] .profile-publication-summary {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 10px;
}
.game-detail-content[data-game-detail-workspace] .profile-publication-summary strong { color: var(--text); font-variant-numeric: tabular-nums; }
.game-detail-content[data-game-detail-workspace] .profile-usage-strip {
  display: grid;
  width: min(460px, 100%);
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 3px;
  margin: 0 0 7px;
  padding: 4px 6px;
}
.game-detail-content[data-game-detail-workspace] .profile-usage-period {
  min-width: 0;
  padding: 4px 7px;
}
.game-detail-content[data-game-detail-workspace] .profile-commandbar {
  min-width: 0;
  margin: 0 0 8px;
  padding: 6px;
  gap: 5px;
  flex-wrap: wrap;
}
.game-detail-content[data-game-detail-workspace] .profile-commandbar > .btn { min-height: 30px; padding: 4px 8px; }
.game-detail-content[data-game-detail-workspace] .game-detail-body > .compact-section { margin-top: 0; }

.game-detail-content[data-game-detail-workspace] .profile-rule-counts { gap: 5px; }
.game-detail-content[data-game-detail-workspace] .profile-rule-counts span { padding: 3px 6px; }
.game-detail-content[data-game-detail-workspace] .profile-rule-table {
  min-width: 0;
  overflow-x: auto;
}
.game-detail-content[data-game-detail-workspace] .profile-rule-table-head,
.game-detail-content[data-game-detail-workspace] .profile-rule-table-row {
  --profile-rule-columns: minmax(250px, 1.75fr) minmax(88px, .55fr) minmax(120px, .75fr) minmax(150px, 1fr) minmax(185px, 1.15fr);
  grid-template-columns: var(--profile-rule-columns);
  min-width: 800px;
  gap: 10px;
  padding: 7px 10px;
}
.game-detail-content[data-game-detail-workspace] .profile-rule-table-head > :nth-child(2) { text-align: right; }
.game-detail-content[data-game-detail-workspace] .profile-rule-table-head > :nth-child(3) { text-align: center; }
.game-detail-content[data-game-detail-workspace] .profile-rule-table-head > :nth-child(4) { text-align: left; }
.game-detail-content[data-game-detail-workspace] .profile-rule-table-head > :nth-child(5) { text-align: right; }
.game-detail-content[data-game-detail-workspace] .profile-rule-table-row { min-height: 43px; }
.game-detail-content[data-game-detail-workspace] .profile-rule-table-row > strong,
.game-detail-content[data-game-detail-workspace] .profile-rule-table-row > .profile-exit-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-detail-content[data-game-detail-workspace] .profile-rule-usage {
  overflow: hidden;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-detail-content[data-game-detail-workspace] .profile-routing-cell {
  display: flex;
  min-width: 0;
  justify-content: center;
}
.game-detail-content[data-game-detail-workspace] .game-route-chip {
  display: inline-flex;
  width: max-content;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.1;
  white-space: nowrap;
}
.game-detail-content[data-game-detail-workspace] .game-route-chip--active { border-color: rgba(75, 218, 157, .38); background: rgba(34, 157, 105, .18); color: #8ceac2; }
.game-detail-content[data-game-detail-workspace] .game-route-chip--inactive { border-color: rgba(227, 174, 54, .38); background: rgba(154, 107, 24, .18); color: #ffd47c; }
.game-detail-content[data-game-detail-workspace] .profile-exit-value { color: var(--text-soft); font-size: 10px; }
.game-detail-content[data-game-detail-workspace] .profile-rule-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}
.game-detail-content[data-game-detail-workspace] .profile-rule-actions form { display: flex; margin: 0; }
.game-detail-content[data-game-detail-workspace] .profile-rule-actions .game-profile-action { min-height: 28px; padding: 4px 8px; font-size: 10px; }
.game-detail-content[data-game-detail-workspace] .profile-rule-actions .game-profile-action--blocked:disabled { cursor: not-allowed; opacity: .48; }
.game-detail-content[data-game-detail-workspace] .profile-rule-table .compact-empty { grid-column: 1 / -1; min-width: 0; }

@media (max-width: 1100px) {
  .game-detail-content[data-game-detail-workspace] .profile-summary-line { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .game-detail-content[data-game-detail-workspace] .profile-default-exit-cell { grid-column: span 2; }
}

@media (max-width: 760px) {
  .panel-popout-game-list,
  .panel-popout-game-detail,
  .panel-popout-shell:has(> .game-list-workspace),
  .panel-popout-shell:has(> [data-game-detail-workspace]) {
    width: calc(100vw - 16px);
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
  }
  .game-list-workspace .game-list-heading { align-items: stretch; flex-direction: column; gap: 6px; }
  .game-list-workspace .game-profile-search { width: min(260px, 100%); min-width: 0; }
  .game-detail-content[data-game-detail-workspace] .profile-summary-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-detail-content[data-game-detail-workspace] .profile-default-exit-cell { grid-column: auto; }
  .game-detail-content[data-game-detail-workspace] .profile-usage-strip { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-detail-content[data-game-detail-workspace] .profile-usage-period { min-width: 0; }
}

/* Login entry point only. Post-login management surfaces do not use these classes. */
body.falcon-login-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #06120e;
  color: #f2fff9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.falcon-login-page * { box-sizing: border-box; }
.falcon-login-page button, .falcon-login-page input { font: inherit; }
.falcon-login-language {
  position: fixed;
  z-index: 2;
  top: 24px;
  right: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(137, 226, 183, .2);
  border-radius: 999px;
  background: rgba(8, 31, 23, .78);
}
.falcon-login-language form { display: contents; }
.falcon-login-language-option {
  min-width: 58px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8fa99d;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.falcon-login-language-option:hover,
.falcon-login-language-option:focus-visible,
.falcon-login-language-option.is-active { outline: none; background: #1d9e68; color: #f4fff9; }
.falcon-login-shell {
  display: flex;
  min-height: 100vh;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(72px, 11vh, 118px) 24px 48px;
}
.falcon-login-form {
  display: flex;
  width: min(268px, calc(100vw - 48px));
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.falcon-login-logo {
  display: block;
  width: 50px;
  height: 50px;
  margin: 0 auto 12px;
  object-fit: contain;
}
.falcon-login-form h1 {
  margin: 0;
  color: #f2fff9;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -.03em;
  line-height: 30px;
  text-align: center;
}
.falcon-login-subtitle { margin: 8px 0 7px; color: #91afa1; font-size: 15px; line-height: 23px; text-align: center; }
.falcon-login-error {
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 117, 117, .45);
  border-radius: 10px;
  background: rgba(126, 35, 42, .24);
  color: #ffb6b6;
  font-size: 13px;
  line-height: 1.5;
  text-align: start;
}
.falcon-login-field { margin: 0 0 14px; }
.falcon-login-field label { display: block; margin: 0 0 5px; color: #c6ded2; font-size: 13px; line-height: 16px; font-weight: 700; }
.falcon-login-field input {
  display: block;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(137, 226, 183, .24);
  border-radius: 10px;
  outline: 0;
  background: #0b2119;
  color: #f2fff9;
  font-size: 14px;
  line-height: 20px;
  caret-color: #58d99b;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.falcon-login-field input::placeholder { color: #6d887c; }
.falcon-login-field input:focus { border-color: #45cd8d; background: #0d281f; box-shadow: 0 0 0 3px rgba(69, 205, 141, .14); }
.falcon-login-submit {
  display: inline-flex;
  width: 100%;
  height: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 0;
  padding: 8px 14px;
  border: 1px solid #35bd7c;
  border-radius: 10px;
  background: #1d9e68;
  color: #f4fff9;
  cursor: pointer;
  font-size: 15px;
  line-height: 20px;
  font-weight: 750;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.falcon-login-submit:hover, .falcon-login-submit:focus-visible { border-color: #61e5a5; outline: 0; background: #25b978; }
.falcon-login-submit:active { transform: translateY(1px); }
.falcon-login-submit svg { width: 19px; height: 19px; flex: 0 0 auto; }
html[dir="rtl"] .falcon-login-language { right: auto; left: 28px; }
@media (max-width: 560px) {
.falcon-login-language { top: 16px; right: 16px; }
  html[dir="rtl"] .falcon-login-language { right: auto; left: 16px; }
  .falcon-login-shell { padding: clamp(64px, 11vh, 96px) 20px 36px; }
}

/* Telegram settings surface: scoped page styling only. */
.telegram-settings-page {
  display: grid;
  width: 100%;
  max-width: 980px;
  gap: 14px;
  margin: 0 auto;
  padding: 4px 0 22px;
}
.management-popout-body .telegram-settings-page { max-width: none; margin: 0; padding: 0; }
.telegram-settings-header { padding: 2px 2px 3px; }
.telegram-settings-eyebrow { display: block; margin-bottom: 5px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.telegram-settings-header h1 { margin: 0 0 5px; color: var(--text); font-size: clamp(22px, 2.3vw, 29px); line-height: 1.2; letter-spacing: -.03em; }
.telegram-settings-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.telegram-settings-form { display: grid; gap: 14px; }
.telegram-settings-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 39, 30, .9), rgba(7, 20, 15, .84));
  box-shadow: var(--shadow-sm);
}
.telegram-settings-card-head { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.telegram-settings-card-head h2 { margin: 0; color: var(--text); font-size: 16px; line-height: 1.25; }
.telegram-settings-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.telegram-settings-card-icon { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border: 1px solid rgba(67, 213, 151, .25); border-radius: 9px; background: rgba(24, 116, 78, .24); color: var(--accent); font-size: 17px; }
.telegram-settings-control-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.telegram-settings-control-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 61px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.telegram-settings-control-copy { display: grid; min-width: 0; gap: 4px; }
.telegram-settings-control-copy > span, .telegram-settings-report-row > span { color: var(--text-soft); font-size: 12px; font-weight: 720; }
.telegram-settings-control-copy small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.telegram-settings-control-value { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; }
.telegram-settings-toggle-state { min-width: 52px; color: var(--muted); font-size: 10px; font-weight: 700; text-align: end; }
.telegram-settings-control-row:has(input:checked) .telegram-settings-toggle-state,
.telegram-settings-report-row:has(input:checked) .telegram-settings-toggle-state { color: var(--success); }
.telegram-settings-duration-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; }
.telegram-settings-duration-row label { color: var(--text-soft); font-size: 11px; font-weight: 700; }
.telegram-settings-duration { width: 116px; min-height: 34px; }
.telegram-settings-save-row { display: flex; min-height: 42px; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.telegram-settings-feedback { flex: 1 1 auto; color: var(--success); font-size: 11px; line-height: 1.4; }
.telegram-settings-feedback.is-error { color: var(--danger); }
.telegram-settings-feedback[hidden] { display: block; visibility: hidden; }
.telegram-settings-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; border-top: 1px solid var(--line); }
.telegram-settings-report-row { display: flex; min-width: 0; min-height: 52px; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.telegram-settings-report-row .telegram-settings-control-value { gap: 8px; }
.telegram-settings-report-row .telegram-settings-toggle-state { min-width: 45px; }
.telegram-settings-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.telegram-settings-status-grid > div, .telegram-settings-diagnostics-grid > div { display: grid; min-width: 0; gap: 4px; padding: 11px 12px; border: 1px solid rgba(118, 160, 142, .14); border-radius: var(--radius-sm); background: rgba(5, 20, 14, .42); }
.telegram-settings-status-grid span, .telegram-settings-diagnostics-grid span { color: var(--muted); font-size: 10px; }
.telegram-settings-status-grid strong, .telegram-settings-diagnostics-grid strong { overflow: hidden; color: var(--text-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.telegram-settings-status-badge { display: inline-flex; width: max-content; min-height: 24px; align-items: center; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; font-weight: 750; line-height: 18px; white-space: nowrap; }
.telegram-settings-status-badge.is-healthy { border-color: rgba(115, 222, 177, .35); background: var(--success-soft); color: var(--success); }
.telegram-settings-status-badge.is-warning { border-color: rgba(239, 189, 87, .36); background: var(--warning-soft); color: var(--warning); }
.telegram-settings-status-badge.is-error { border-color: rgba(242, 126, 137, .35); background: var(--danger-soft); color: var(--danger); }
.telegram-settings-inline-error { margin: 11px 0 0; color: var(--danger); font-size: 11px; line-height: 1.45; }
.telegram-settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 13px; }
.telegram-settings-actions form { margin: 0; }
.telegram-settings-topic-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.telegram-settings-topic-row { display: flex; min-width: 0; min-height: 42px; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid rgba(118, 160, 142, .14); border-radius: var(--radius-sm); background: rgba(5, 20, 14, .42); }
.telegram-settings-topic-row > span:first-child { overflow: hidden; color: var(--text-soft); font-size: 11px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.telegram-settings-topic-row .telegram-settings-status-badge { flex: 0 0 auto; }
.telegram-settings-diagnostics { padding: 0; }
.telegram-settings-diagnostics > summary { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 0 17px; color: var(--text-soft); font-size: 12px; font-weight: 750; cursor: pointer; list-style: none; }
.telegram-settings-diagnostics > summary::-webkit-details-marker { display: none; }
.telegram-settings-diagnostics-chevron { color: var(--muted); font-size: 16px; transition: transform .16s ease; }
.telegram-settings-diagnostics[open] .telegram-settings-diagnostics-chevron { transform: rotate(180deg); }
.telegram-settings-diagnostics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 17px 17px; }
.telegram-settings-diagnostics-wide { grid-column: 1 / -1; }
@media (max-width: 680px) {
  .telegram-settings-page { padding-inline: 0; }
  .telegram-settings-card { padding: 14px; }
  .telegram-settings-status-grid, .telegram-settings-topic-list, .telegram-settings-report-grid, .telegram-settings-diagnostics-grid { grid-template-columns: 1fr; }
  .telegram-settings-diagnostics-wide { grid-column: auto; }
  .telegram-settings-duration-row { align-items: stretch; flex-direction: column; gap: 7px; }
  .telegram-settings-duration { width: 100%; }
  .telegram-settings-save-row { align-items: stretch; flex-direction: column; }
  .telegram-settings-save-row .fa-admin-button { width: 100%; }
}
