/* ============================================================================
   Pulse admin panel — restyle in Pulse house style (dark + cyan).
   DROP-IN replacement for pulse-license-current/admin/admin.css.

   Scope: LOOK ONLY. No DOM ids/classes are renamed here — this file targets the
   exact hooks admin.js/index.html already use (#admin-token, #license-form,
   #policy, #notice, #result, #history-*, .error, .secondary, .compact, table…).
   Do NOT change admin.js or the API contract; this is purely presentational.

   Palette + type mirror the Pulse site (styles.css / navisworks-launch-preview.css):
   bg #020305, cyan accent #6FD2FF, Archivo (display) + JetBrains Mono (labels).

   Fonts: the site self-hosts Archivo + JetBrains Mono (GDPR-safe, no CDN). To use
   them here, copy the site's fonts/ + a fonts.css into admin/ and add
   <link rel="stylesheet" href="/admin/fonts.css"> to index.html (Codex: adjust the
   @font-face url() paths to be relative to /admin/). Until then the stack falls back
   to system fonts gracefully — no layout shift, just different glyphs.
   ============================================================================ */

:root {
  color-scheme: dark;

  --bg:            #020305;
  --bg-band:       #07090c;
  --card-bg:       #080a0e;
  --card-border:   rgba(228, 238, 246, 0.16);
  --hairline:      rgba(228, 238, 246, 0.13);

  --accent:        #6fd2ff;   /* cyan */
  --accent-soft:   #9be0ff;
  --accent-glow:   rgba(111, 210, 255, 0.13);

  --text-head:     #f0f5f9;
  --text-card:     #eaf2f8;
  --text-body:     #b9c6d0;
  --text-muted:    #8e9ca8;

  --danger:        #ff9b91;
  --danger-bg:     rgba(255, 155, 145, 0.10);
  --ok:            #7fe0b0;
  --warn:          #ffd487;

  --font-display:  'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius:        14px;
  --radius-sm:     9px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 82% -8%, rgba(111, 210, 255, 0.06), transparent 55%),
    var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding: 40px 20px 72px;
}

.wrap, main, .container { /* whatever the outer container is; harmless if unused */
  max-width: 960px;
  margin: 0 auto;
}

/* ---- Header / eyebrow / titles ------------------------------------------- */

.eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

h1 {
  color: var(--text-head);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05;
  margin: 0 0 6px;
}

h2 {
  color: var(--text-head);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 18px;
  margin: 0 0 14px;
}

p { color: var(--text-body); }
a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  margin: 0 0 22px;
}

.login-screen {
  min-height: calc(100vh - 112px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
}

.login-brand {
  max-width: 560px;
}

.login-brand h1 {
  font-size: clamp(34px, 6vw, 64px);
}

#app-shell[hidden] {
  display: none;
}

.login-screen[hidden] {
  display: none;
}

.panel-nav,
.filters,
.form-grid,
.wizard {
  display: grid;
  gap: 14px;
}

.panel-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  max-width: 520px;
}

.panel-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text-body);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: none;
  text-decoration: none;
}

.panel-nav a span {
  display: block;
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel-nav a.active {
  border-color: rgba(111, 210, 255, 0.55);
  background: rgba(111, 210, 255, 0.10);
  color: var(--accent-soft);
}

.panel-nav a.active span {
  color: var(--accent);
}

.logout-button {
  justify-self: start;
  min-width: 120px;
}

.filters {
  grid-template-columns: minmax(240px, 1.45fr) repeat(3, minmax(150px, 1fr));
  align-items: end;
  margin: 18px 0 16px;
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.018);
}

.form-grid,
.wizard {
  grid-template-columns: 1fr;
}

.login-card {
  border-color: rgba(111, 210, 255, 0.22);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin: 0 0 12px;
}

.section-head p {
  max-width: 420px;
  margin: 0;
}

.history-summary {
  display: grid;
  justify-items: end;
  gap: 8px;
  max-width: 360px;
}

.license-count {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid rgba(127, 224, 176, 0.35);
  border-radius: 999px;
  background: rgba(127, 224, 176, 0.10);
  color: var(--ok);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-picker {
  min-width: 220px;
  margin: 0;
}

.issue-card {
  border-color: rgba(111, 210, 255, 0.16);
}

.panel[hidden],
.login-card[hidden] {
  display: none;
}

/* ---- Cards --------------------------------------------------------------- */

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 0 0 20px;
  backdrop-filter: blur(2px);
}

/* ---- Forms --------------------------------------------------------------- */

label {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin: 0 0 7px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-card);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder,
textarea::placeholder { color: #9ba9b5; opacity: 1; }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select:disabled,
input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.static-field {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}

.static-field span {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.static-field strong {
  display: block;
  color: var(--text-card);
  font-family: var(--font-body);
  font-size: 15px;
}

.static-field small {
  display: block;
  color: var(--text-muted);
  margin-top: 6px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

select option {
  background: #f7fbff;
  color: #101820;
}

select option:checked {
  background: #8fc8f4;
  color: #071016;
}

.field, .row, .form-row { margin: 0 0 16px; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }

/* ---- Buttons ------------------------------------------------------------- */

button {
  appearance: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #020305;
  transition: filter 0.15s ease, transform 0.05s ease, background 0.15s ease;
}

button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

/* Ghost / secondary buttons (admin.js adds .secondary to some action buttons). */
button.secondary,
.secondary {
  background: transparent;
  border-color: rgba(111, 210, 255, 0.45);
  color: var(--accent-soft);
}
button.secondary:hover { background: rgba(111, 210, 255, 0.08); filter: none; }
button.secondary.warning {
  border-color: rgba(255, 212, 135, 0.45);
  color: var(--warn);
}
button.secondary.warning:hover { background: rgba(255, 212, 135, 0.09); }
button.secondary.danger {
  /* Keep destructive actions readable even inside the dense license table.
     An outline alone made "Revoca" too easy to lose against the dark surface. */
  border-color: var(--danger);
  background: var(--danger);
  color: #020305;
}
button.secondary.danger:hover {
  background: #ffb0a8;
  color: #020305;
  filter: none;
}
button.secondary.success {
  border-color: var(--ok);
  background: var(--ok);
  color: #020305;
}
button.secondary.success:hover { background: #a1efc4; color: #020305; filter: none; }
button.success {
  background: var(--ok);
  color: #020305;
}
button.danger {
  background: var(--danger);
  color: #020305;
}

/* Compact buttons in table action cells (admin.js adds .compact). */
button.compact,
.compact {
  padding: 7px 13px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: 8px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(111, 210, 255, 0.35);
  background: rgba(111, 210, 255, 0.06);
  color: var(--accent-soft);
  font-size: 13px;
  letter-spacing: 0;
}

.icon-button:hover {
  background: rgba(111, 210, 255, 0.14);
  filter: none;
}

/* ---- Notice / result ----------------------------------------------------- */

#notice,
#result {
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  margin: 14px 0 0;
  font-size: 13px;
}

#result {
  background: rgba(111, 210, 255, 0.06);
  border: 1px solid rgba(111, 210, 255, 0.22);
  color: var(--text-card);
}
#result-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-body); }

/* Error state (admin.js toggles .error on #notice). Preserve this class name. */
#notice.error,
.error {
  background: var(--danger-bg);
  border: 1px solid rgba(255, 155, 145, 0.35);
  color: var(--danger);
}

/* ---- History table ------------------------------------------------------- */

#history-table-wrap {
  overflow-x: auto;                 /* wide table scrolls in its own box */
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
}

#history-table-wrap table {
  table-layout: fixed;
}

/* Keep the working view focused on the information needed to act. Origin and
   creation time remain available in the audit log; omitting them here gives the
   destructive actions a real, always-visible column instead of a clipped edge. */
#history-table-wrap th:nth-child(1) { width: 29%; }
#history-table-wrap th:nth-child(2) { width: 14%; }
#history-table-wrap th:nth-child(3) { width: 14%; }
#history-table-wrap th:nth-child(4) { width: 13%; }
#history-table-wrap th:nth-child(5) { width: 13%; }
#history-table-wrap th:nth-child(6) { width: 17%; }

#history-table-wrap tbody td {
  overflow-wrap: anywhere;
}

#history-table-wrap tbody td:last-child {
  min-width: 148px;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

#history-table-wrap tbody td:last-child .compact {
  width: 100%;
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--bg-band);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-body);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
tbody td:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.key-cell {
  white-space: nowrap;
  min-width: 116px;
}

.key-cell-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

td .key-mask,
.key-mask { font-family: var(--font-mono); color: var(--text-muted); letter-spacing: 0.05em; }

#history-empty { color: var(--text-muted); padding: 18px 2px; }

/* ---- Deploy, distribution and recovery ---------------------------------- */

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.status-grid > div {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--hairline);
}

.status-grid > div:last-child {
  border-right: 0;
}

.status-grid span,
.status-grid strong {
  display: block;
}

.status-grid span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-grid strong {
  margin-top: 8px;
  color: var(--text-card);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.inline-operation-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin: 16px 0;
}

.release-build-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(280px, 1fr) minmax(220px, auto);
  gap: 14px;
  align-items: end;
  margin: 16px 0;
}

.release-build-form-simple {
  grid-template-columns: minmax(180px, 0.8fr) minmax(280px, 1fr) minmax(220px, auto);
}

.release-build-form-simple > button,
.release-build-form-simple > .release-form-action {
  grid-column: auto;
  justify-self: stretch;
}

.release-build-form > button {
  min-width: 220px;
  justify-self: stretch;
}

.release-build-form > label,
.release-build-form > .consent-check {
  margin: 0;
}

.release-status-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 22px 0 10px;
}

.release-status-head .eyebrow { margin: 0; }

.release-status-head h3 {
  margin: 5px 0 0;
  color: var(--text-card);
}

.release-simulation {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(255, 212, 135, 0.38);
  border-radius: var(--radius-sm);
  background: rgba(255, 212, 135, 0.045);
}

.release-simulation .release-status-head { margin: 0 0 12px; }

.simulation-warning {
  margin: 0;
  color: var(--text-body);
  font-size: 12px;
  line-height: 1.55;
}

.simulation-warning strong {
  color: var(--warn);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.simulation-status {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.release-simulation .release-checks { margin-bottom: 0; }

.release-product-flow {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.release-product-flow > h2 { margin-top: 0; }

.release-phase {
  margin: 22px 0 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.release-form-action {
  align-self: end;
}

.release-form-action button { width: auto; }

.navis-release-review {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.navis-release-review > p {
  margin: 0;
  color: var(--text-card);
}

.release-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.release-checks li {
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-size: 12px;
}

.release-checks .is-ok { border-color: rgba(127, 224, 176, 0.35); color: var(--ok); }
.release-checks .is-blocked { border-color: rgba(255, 155, 145, 0.35); color: var(--danger); }

.release-notes {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 12px;
}

.release-safety-hint {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(111, 210, 255, 0.06);
  color: var(--text-body);
  font-size: 12px;
}

.policy-beta-note {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 212, 135, 0.38);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-sm);
  background: rgba(255, 212, 135, 0.06);
  color: var(--text-body);
  font-size: 13px;
}

.policy-beta-note strong { color: var(--warn); }

.release-notes summary {
  cursor: pointer;
  color: var(--text-card);
}

.release-notes label {
  display: grid;
  gap: 8px;
  max-width: 620px;
  margin-top: 12px;
}

.release-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.release-progress li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.release-progress span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 600 12px/1 var(--font-mono);
}

.release-progress strong { color: var(--text-card); font-size: 13px; }
.release-progress small { font-size: 11px; }
.release-progress .is-active { border-color: var(--accent); color: var(--accent); background: rgba(111, 210, 255, .08); }
.release-progress .is-done { border-color: var(--ok); color: var(--ok); }
.release-progress .is-failed { border-color: var(--danger); color: var(--danger); }

.release-technical {
  margin: 10px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.release-technical summary { cursor: pointer; color: var(--text-card); }
.release-technical p { margin: 8px 0 0; }

.release-build-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.release-status-technical { display: none; }

.release-origin-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 16px 0;
}

.release-build-form textarea {
  min-height: 78px;
  resize: vertical;
}

#release-publish-form > .prepared-release-callout,
#release-publish-form > .status-grid,
#navis-release-approval > .prepared-release-callout {
  grid-column: 1 / -1;
}

#release-publish-form > .consent-check {
  grid-column: 1 / -1;
}

#release-publish-form > .confirmation-field {
  grid-column: 1 / 3;
}

#release-publish-form > button {
  grid-column: 3;
  align-self: end;
}

#release-publish-form > .release-technical { grid-column: 1 / -1; }

.prepared-release-callout {
  padding: 18px;
  border: 1px solid rgba(111, 210, 255, 0.62);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: rgba(111, 210, 255, 0.08);
}

.prepared-release-download {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.prepared-release-download:hover,
.prepared-release-download:focus-visible {
  background: rgba(111, 210, 255, 0.14);
  box-shadow: 0 0 0 3px rgba(111, 210, 255, 0.18);
}

.prepared-release-callout .eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
}

.prepared-release-callout h3 {
  margin: 0;
  color: var(--text-card);
  font-size: 16px;
}

.prepared-release-callout p:last-child {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.release-test-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.secondary-action {
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font: 600 12px/1.2 var(--font-mono);
  text-decoration: none;
}

.secondary-action:hover {
  background: rgba(111, 210, 255, 0.08);
}

.primary-download {
  border-color: var(--accent);
  background: rgba(111, 210, 255, 0.12);
}

.release-channel-downloads {
  color: var(--text-muted);
  font-size: 13px;
}

.release-channel-downloads summary {
  cursor: pointer;
  color: var(--text-card);
  font-weight: 600;
}

.release-channel-downloads p {
  margin: 10px 0;
}

.distribution-dates {
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
}

.recovery-form {
  grid-template-columns: minmax(240px, 1.3fr) minmax(260px, 1fr) auto;
}

.recovery-workbench {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

.recovery-workbench-heading h3 {
  margin: 0;
  color: var(--text-card);
  font-size: 17px;
}

.recovery-workbench-heading > p:last-child {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.component-picker {
  display: flex;
  min-height: 47px;
  gap: 18px;
  align-items: center;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}

.component-picker legend {
  padding: 0 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.consent-check {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  margin: 0;
  letter-spacing: 0;
  text-transform: none;
}

.consent-check input {
  flex: 0 0 auto;
}

.approval-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 0.7fr) auto;
  gap: 16px;
  align-items: end;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.approval-bar > .consent-check {
  align-self: center;
}

.confirmation-field {
  display: grid;
  gap: 7px;
}

.confirmation-help {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
}

#deploy-panel .table-wrap tbody td:last-child {
  display: table-cell;
}

.state-ok {
  color: var(--ok);
  font-family: var(--font-mono);
}

.state-error {
  color: var(--danger);
  font-family: var(--font-mono);
}

/* ---- Status + policy badges (OPTIONAL, additive) -------------------------
   admin.js renders state text via labelForState() and the policy code as text.
   IF Codex wraps those in a <span class="badge badge--state ..."> the classes
   below style them. Data-driven so unknown states/policies still get a neutral
   pill — no fragile hardcoding. Purely additive: plain text still works.

   Suggested usage (Codex, in admin.js, no contract change):
     `<span class="badge badge--${item.state}">${labelForState(item)}</span>`
     `<span class="badge badge--policy">${item.policyCode}</span>`
   -------------------------------------------------------------------------- */

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-body);
  white-space: nowrap;
}

/* State colours — keyed on the six backend states (unchanged contract). */
.badge--delivered          { color: var(--ok);     border-color: rgba(127, 224, 176, 0.35); background: rgba(127, 224, 176, 0.10); }
.badge--delivery_pending   { color: var(--warn);   border-color: rgba(255, 212, 135, 0.35); background: rgba(255, 212, 135, 0.10); }
.badge--pending            { color: var(--warn);   border-color: rgba(255, 212, 135, 0.30); background: rgba(255, 212, 135, 0.08); }
.badge--processing         { color: var(--accent); border-color: rgba(111, 210, 255, 0.30); background: rgba(111, 210, 255, 0.08); }
.badge--awaiting_recipient { color: var(--accent-soft); border-color: rgba(155, 224, 255, 0.30); background: rgba(155, 224, 255, 0.07); }
.badge--blocked            { color: var(--danger); border-color: rgba(255, 155, 145, 0.35); background: var(--danger-bg); }
.badge--license-active     { color: var(--ok);     border-color: rgba(127, 224, 176, 0.35); background: rgba(127, 224, 176, 0.10); }
.badge--license-suspended  { color: var(--warn);   border-color: rgba(255, 212, 135, 0.35); background: rgba(255, 212, 135, 0.10); }
.badge--license-revoked    { color: var(--danger); border-color: rgba(255, 155, 145, 0.35); background: var(--danger-bg); }

/* Policy pill — one accent style; the 4 Navis slugs share it, so a new slug from
   the backend needs no CSS change (rule: no fragile per-slug hardcoding). */
.badge--policy {
  color: var(--accent-soft);
  border-color: rgba(111, 210, 255, 0.28);
  background: rgba(111, 210, 255, 0.06);
}

/* ---- Responsive (desktop / tablet) --------------------------------------- */

@media (max-width: 720px) {
  body { padding: 24px 14px 56px; }
  .card { padding: 20px 18px; }
  .hero,
  .section-head,
  .login-screen {
    grid-template-columns: 1fr;
  }
  .section-head {
    display: grid;
  }
  .history-summary {
    justify-items: start;
  }
  .panel-nav,
  .filters {
    grid-template-columns: 1fr;
    border-radius: var(--radius);
  }
  .status-grid,
  .inline-operation-form,
  .release-build-form,
  .release-checks,
  .release-progress,
  .simulation-status,
  .distribution-dates,
  .recovery-form,
  .approval-bar {
    grid-template-columns: 1fr;
  }
  .status-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }
  .status-grid > div:last-child {
    border-bottom: 0;
  }
  .component-picker {
    align-items: flex-start;
    flex-direction: column;
  }
  .release-status-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .section-head {
    display: block;
  }
  .product-picker {
    min-width: 0;
    margin-top: 16px;
  }
  thead th, tbody td { padding: 10px 11px; }
}
