/* Typography: Syne + DM Mono (ValidadorRegistros). Loaded via Google Fonts in HTML. */

:root {
  /* Mapped from KontroliD-ValidadorRegistros/styles.css :root */
  --bg: #0d0f12;                 /* Validador --bg */
  --bg-2: #13161b;               /* Validador --bg2 */
  --bg-3: #1a1e25;               /* Validador --bg3 */
  --ink: #e8eaf0;                /* Validador --text */
  --muted: #9aa0b6;              /* Validador --text2 */
  --muted-3: #626a83;            /* Validador --text3 */
  --line: rgba(255, 255, 255, 0.08);   /* Validador --border */
  --line-strong: rgba(255, 255, 255, 0.16); /* Validador --border2 */
  --accent: #00e5a0;             /* Validador --green (primary) */
  --accent-ink: #0d0f12;         /* Validador primary button text on green */
  --accent-dim: rgba(0, 229, 160, 0.12); /* Validador --green-dim */
  --ok: #00e5a0;                 /* Validador --green */
  --ok-dim: rgba(0, 229, 160, 0.12);
  --warn: #ffbd58;               /* Validador --amber */
  --warn-dim: rgba(255, 189, 88, 0.12); /* Validador --amber-dim */
  --bad: #ff6868;                /* Validador --red */
  --bad-dim: rgba(255, 104, 104, 0.12); /* Validador --red-dim */
  --info: #64a9ff;               /* Validador --blue */
  --info-dim: rgba(100, 169, 255, 0.12); /* Validador --blue-dim */
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --sans: "Syne", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --radius: 0.65rem;
  --radius-sm: 0.35rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
}
::selection {
  background: rgba(0, 229, 160, 0.28);
  color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 40;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 0.75rem; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.85rem 1rem;
  padding: 0.8rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  display: block;
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.brand-text { display: grid; line-height: 1.05; }
.eyebrow, .kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.brand-name {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.02rem;
}
.nav {
  display: flex;
  gap: 0.15rem;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.7rem 0.85rem;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav a:hover {
  color: var(--ink);
  background: var(--bg-2);
}
.nav a[aria-current="page"] {
  background: transparent;
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.nav a[aria-current="page"]:hover {
  color: var(--accent);
  background: var(--bg-2);
  filter: none;
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.45rem 0 2.4rem;
}
.page-head { margin-bottom: 1rem; }
.page-head h1, .auth-hero h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.7rem, 2.4vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.12;
}
.lede {
  margin: 0.4rem 0 0;
  max-width: 42rem;
  color: var(--muted);
}
.lede a { color: var(--accent); }

.foot {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.2rem 0 1.6rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
}

h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
.panel-head h2, .panel-head h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 1.02rem;
}
.panel-note {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  max-width: 38rem;
}

.status {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.status::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.4rem;
  border-radius: 50%;
  flex: none;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.status.ok { border-color: rgba(0, 229, 160, 0.3); }
.status.ok::before { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-dim); }
.status.warn { border-color: rgba(255, 189, 88, 0.35); }
.status.warn::before { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-dim); }
.status.bad { border-color: rgba(255, 104, 104, 0.35); }
.status.bad::before { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-dim); }
.status[data-loading]::before { animation: pulse 1.1s ease infinite; }

.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: none;
}
.panel + .panel { margin-top: 1rem; }
.split > .panel { margin-top: 0; }
.panel-head, .head-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}
.panel-head { padding: 0.95rem 1.1rem; border-bottom: 1px solid var(--line); }
.head-actions { justify-content: flex-end; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 36rem; }
th, td {
  text-align: left;
  padding: 0.8rem 1rem;
  vertical-align: middle;
}
th {
  color: var(--muted-3);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg);
}
td { border-top: 1px solid var(--line); color: var(--muted); }
tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
tr.is-selected td { background: var(--accent-dim); color: var(--ink); }
tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.is-bad td { background: var(--bad-dim); }
td.quiet, .quiet { color: var(--muted); }
td.clip { max-width: 22rem; }
td.clip span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.muted { color: var(--muted); }
.pad .muted, .empty .muted, .hint { padding: 0; }

code, .mono {
  font-family: var(--mono);
  font-size: 0.84em;
}
code {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.08em 0.38em;
}
.id-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.id-link:hover { text-decoration: underline; }
.id-link code { color: inherit; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.45rem;
  border-radius: 0.2rem;
  border: 0;
  background: var(--bg-3);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge.ok {
  color: var(--ok);
  border-color: transparent;
  background: var(--ok-dim);
}
.badge.warn {
  color: var(--warn);
  border-color: transparent;
  background: var(--warn-dim);
}
.badge.bad {
  color: var(--bad);
  border-color: transparent;
  background: var(--bad-dim);
}

.empty {
  padding: 2.2rem 1.2rem 2rem;
  text-align: center;
}
.empty::before {
  content: "◈";
  display: block;
  margin: 0 auto 0.75rem;
  color: var(--muted-3);
  font-size: 1.6rem;
  opacity: 0.7;
  border: 0;
  background: none;
  width: auto;
  height: auto;
}
.empty-title { margin: 0; font-weight: 600; color: var(--muted); }
.empty .muted { display: block; margin-top: 0.25rem; color: var(--muted-3); }
.empty-action { display: flex; justify-content: center; padding: 0 1rem 1.35rem; }
#forms-list th:first-child,
#forms-list td:first-child { width: 5.5rem; text-align: center; }

.skeleton { display: grid; gap: 0.55rem; padding: 1rem 1.1rem 0.2rem; }
.skeleton span {
  display: block;
  height: 0.72rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.2s ease infinite;
}
.skeleton span:nth-child(2) { width: 78%; }
.skeleton span:nth-child(3) { width: 56%; }

button, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button-link:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
button.ghost, a.ghost, .button-link.ghost {
  background: var(--bg-3);
  color: var(--muted);
  border-color: var(--line-strong);
  font-weight: 600;
}
button.ghost:hover, a.ghost:hover, .button-link.ghost:hover {
  background: var(--bg-3);
  border-color: var(--muted);
  color: var(--ink);
  filter: none;
}
button.row-action {
  min-height: 2.1rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.8rem;
}
button.row-action.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  line-height: 1;
}
button.row-action.icon-btn .icon {
  width: 1rem;
  height: 1rem;
  display: block;
  flex-shrink: 0;
}
button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

label {
  display: grid;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}
input:not([type="checkbox"]):not([type="radio"]), select {
  width: 100%;
  min-height: 2.4rem;
  font: inherit;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  outline: none;
}
input::placeholder { color: var(--muted-3); }
input:hover, select:hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--line-strong)); }
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 160, 0.1);
}
input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
  justify-self: center;
}
.toolbar, .inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.toolbar label, .inline-form label { min-width: min(100%, 14rem); flex: 1; }
.toolbar .hint {
  flex: 1 1 100%;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.stack-form {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem 1.15rem 1.2rem;
}
.form-actions, .pad-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.pad-actions { padding: 0 1.15rem 1.2rem; }
fieldset {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
}
legend {
  padding: 0 0.3rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}
.disclosure { border-top: 1px solid var(--line); padding-top: 0.35rem; }
.disclosure summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding: 0.4rem 0.1rem 0.7rem;
}
.disclosure summary::marker { color: var(--accent); }
.cred-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}
.cred-grid legend { grid-column: 1 / -1; }
.cred-grid button { justify-self: start; }
.hint, .callout {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.hint {
  color: var(--muted-3);
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.hint.is-warn {
  color: var(--warn);
  border-color: rgba(255, 189, 88, 0.3);
  background: var(--warn-dim);
}
.callout {
  color: var(--warn);
  border: 1px solid rgba(255, 189, 88, 0.28);
  background: var(--warn-dim);
}
.callout.bad {
  color: var(--bad);
  border-color: rgba(255, 104, 104, 0.35);
  background: var(--bad-dim);
}
.template-fixed { color: var(--ink); }
.template-fixed.is-warn {
  color: var(--warn);
  border-color: rgba(255, 189, 88, 0.3);
  background: var(--warn-dim);
}
.template-fixed p { margin: 0.35rem 0 0; }
.template-fixed p:first-child { margin-top: 0; }
.template-fixed .fixed-list { margin: 0.25rem 0 0.55rem; padding-left: 1.15rem; }
.template-fixed .fixed-list li { margin: 0.12rem 0; }

.steps {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 0 auto;
  min-width: 9.2rem;
  scroll-snap-align: start;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.steps li::after {
  content: "";
  flex: 1 1 1.25rem;
  height: 1px;
  min-width: 0.8rem;
  background: var(--line-strong);
}
.steps li:last-child::after { display: none; }
.steps li.is-current { color: var(--ink); }
.steps li.is-current::after,
.steps li.is-done::after { background: rgba(0, 229, 160, 0.45); }
.steps li.is-done { color: var(--ok); }
.step-index {
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.steps li.is-current .step-index {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.steps li.is-done .step-index {
  position: relative;
  color: transparent;
  border-color: rgba(0, 229, 160, 0.45);
  background: var(--ok-dim);
}
.steps li.is-done .step-index::after {
  content: "";
  position: absolute;
  left: 0.58rem;
  top: 0.32rem;
  width: 0.32rem;
  height: 0.55rem;
  border: solid var(--ok);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check { display: flex; gap: 0.5rem; align-items: center; color: var(--ink); font-weight: 600; }
.mode-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  align-items: center;
}
.mode-fieldset legend { flex: 1 0 100%; padding: 0; }
.pad { padding: 1.05rem 1.15rem 0.3rem; }
.summary {
  display: grid;
  grid-template-columns: minmax(8.5rem, 13rem) 1fr;
  gap: 0.7rem 1rem;
  margin: 0 0 1rem;
}
.summary dt { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.summary dd { margin: 0; }
.plan-heading {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.plan-checks { margin: 0.85rem 0 0; }
.detail-section { padding: 0.35rem 1.15rem 1.1rem; }
.detail-section h3 {
  margin: 0.35rem 0 0.65rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-3);
}
.step-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.step-log li {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.step-log li strong { font-weight: 700; }
.step-log li.ok { border-color: rgba(0, 229, 160, 0.3); }
.step-log li.bad { border-color: rgba(255, 104, 104, 0.35); }
.step-log li.warn { border-color: rgba(255, 189, 88, 0.35); }
.step-title { flex: 1; }
.log-scroll {
  max-height: 28rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.http-log {
  min-width: 52rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
}
.http-log th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-2);
}
.http-log td { white-space: nowrap; }
.http-log td.note {
  white-space: pre-wrap;
  min-width: 14rem;
  max-width: 28rem;
}
.http-log code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 1em;
}
.method { font-weight: 500; letter-spacing: 0.04em; }
.method.ok, .code-pill.ok { color: var(--ok); }
.method.warn { color: var(--warn); }
.method.bad, .code-pill.bad { color: var(--bad); }
.code-block, pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.45;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  overflow-x: auto;
}
.log-note { margin: 0.55rem 0 0; }

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: start;
}

.page-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem 0;
}
.page-auth main {
  width: min(980px, calc(100% - 2rem));
  margin: 0;
  padding: 0;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  min-height: 34rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.auth-hero {
  padding: 2.4rem 2.1rem;
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(0, 229, 160, 0.14), transparent 60%),
    linear-gradient(165deg, var(--bg-3), var(--bg) 70%);
}
.auth-hero .mark { margin-bottom: 1.4rem; }
.auth-hero h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.auth-hero .lede { color: var(--muted); }
.auth-points {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}
.auth-points li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--muted);
}
.auth-points li::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.auth-panel {
  padding: 2.2rem 1.8rem;
  display: grid;
  align-content: center;
  gap: 0.35rem;
  background: var(--bg-2);
}
.auth-panel h2 { font-size: 1.45rem; letter-spacing: -0.03em; }
.auth-panel .stack-form { padding: 0.4rem 0 0; }
.auth-panel .status { margin-top: 0.6rem; }
.auth-panel button[type="submit"] { width: 100%; margin-top: 0.25rem; }

tr.project-forms > td {
  background: rgba(0, 0, 0, 0.28);
  padding: 0.35rem 0.85rem 1rem;
}
tr.project-forms:hover > td { background: rgba(0, 0, 0, 0.28); }
.nested-forms table { min-width: 0; }
.nested-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0.45rem;
}
.nested-head h3 {
  margin: 0;
  font-size: 0.95rem;
}
.progress {
  display: grid;
  grid-template-columns: minmax(5.5rem, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  min-width: 7.5rem;
}
.progress-block { margin: 0 0 1rem; max-width: 28rem; }
.progress-track {
  height: 0.45rem;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
}
.progress-fill.ok { background: var(--ok, var(--accent)); }
.progress-fill.bad { background: var(--bad); }
.progress-fill.run { background: var(--accent); }
.progress-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.progress-live {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.progress-live.progress-block { margin: 0 0 1rem; }
.retry-box {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.xls-choices { display: grid; gap: 0.75rem; }
.xls-choice {
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}
.xls-choice:first-child { border-top: 0; padding-top: 0; }
.xls-notice { margin: 0.25rem 0 0.4rem; }
.choice-pills, .bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}
.bulk-actions { margin-bottom: 0.65rem; }
.choice-pills label { display: inline-flex; gap: 0.35rem; align-items: center; }
.wizard-step:not([hidden]) { animation: rise 0.28s ease; }

.credentials-bank { width: 100%; }
.credentials-bank .table-wrap { width: 100%; }
.row-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}
td.col-actions { width: 1%; white-space: nowrap; padding-block: 0.35rem; }
button.danger-text {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 45%, var(--line-strong));
}
button.danger-text:hover {
  color: var(--ink);
  border-color: var(--bad);
  background: var(--bad-dim);
  filter: none;
}
button.danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #140808;
}
button.danger:hover { filter: brightness(1.06); }
.field-hint {
  margin: 0.35rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted-3);
}
.modal-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal[hidden] { display: none !important; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 10, 0.72);
  backdrop-filter: blur(4px);
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(28rem, calc(100vw - 2rem));
  max-height: min(90vh, 40rem);
  overflow: auto;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise 0.22s ease;
}
.modal-dialog-sm { width: min(24rem, calc(100vw - 2rem)); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.modal-body { padding: 1.1rem 1.15rem 1.25rem; }
.modal-body.stack-form { padding-top: 1rem; }
button.icon-close {
  min-height: 2.1rem;
  min-width: 2.1rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@keyframes pulse {
  50% { opacity: 0.35; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.check-grid {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.check-grid legend {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.check-list {
  display: grid;
  gap: 0.4rem;
  max-height: 16rem;
  overflow: auto;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-3);
}
.check-list .check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0;
}
.check-list .quiet {
  display: block;
  color: var(--muted-3);
  font-size: 0.78rem;
}
.mono-block {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  resize: vertical;
}
.toolbar .check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .top { flex-wrap: wrap; padding: 0.7rem 0.8rem; }
  .brand { margin-right: auto; }
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
  }
  .split, .auth-layout, .cred-grid, .summary { grid-template-columns: 1fr; }
  .summary dd { margin-bottom: 0.35rem; }
  .form-actions, .pad-actions { justify-content: stretch; }
  .form-actions button, .pad-actions button, .cred-grid button { width: 100%; }
  .row-actions { justify-content: flex-end; }
  .row-actions button.icon-btn { flex: 0 0 auto; }
  .foot { flex-direction: column; padding-bottom: 1.2rem; }
  .auth-hero, .auth-panel { padding: 1.4rem 1.15rem; }
  .page-auth { padding: 0.6rem 0; }
  main, .foot, .page-auth main { width: min(1120px, calc(100% - 1.2rem)); }
  .panel-head { flex-wrap: wrap; }
  .head-actions { width: 100%; }
  .head-actions button { width: 100%; }
}

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