/* ── Tokens ───────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --accent:        #2563eb;
  --accent-hover:  #1d4ed8;
  --accent-light:  #eff6ff;
  --success:       #16a34a;
  --success-light: #f0fdf4;
  --error:         #dc2626;
  --error-light:   #fef2f2;
  --warning:       #d97706;
  --warning-light: #fffbeb;

  --bg:            #f8fafc;
  --surface:       #ffffff;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  --text:          #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;

  --sidebar-bg:    #0f172a;
  --sidebar-text:  #cbd5e1;
  --sidebar-hover: #1e293b;
  --sidebar-active:#2563eb;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', monospace;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }
/* Elements toggled via the [hidden] attribute set display:flex/grid on their own
   class, which ties CSS specificity with the UA [hidden] rule; force it to win. */
[hidden] { display: none !important; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600; border: 1.5px solid transparent;
  transition: background .15s, box-shadow .15s, transform .1s;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(.98); }
.btn--primary  { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-sm); }
.btn--ghost    { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: var(--bg); }
.btn--danger   { background: transparent; border-color: #fca5a5; color: var(--error); }
.btn--danger:hover { background: var(--error-light); }
.btn--full     { width: 100%; justify-content: center; }
.btn--sm       { padding: 6px 12px; font-size: .8rem; }
.btn--lg       { padding: 14px 28px; font-size: 1rem; }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; margin-bottom: 16px;
}
.alert--success { background: var(--success-light); color: var(--success); border: 1px solid #bbf7d0; }
.alert--error   { background: var(--error-light);   color: var(--error);   border: 1px solid #fecaca; }
.alert--toast {
  position: fixed; top: 20px; right: 24px; z-index: 999;
  box-shadow: var(--shadow); animation: slideIn .25s ease;
}
@keyframes slideIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 999px; font-size: .75rem; font-weight: 600;
}
.badge--blue   { background: var(--accent-light); color: var(--accent); }
.badge--green  { background: var(--success-light); color: var(--success); }
.badge--red    { background: var(--error-light); color: var(--error); }
.badge--orange { background: var(--warning-light); color: var(--warning); }
.badge--gray   { background: #f1f5f9; color: var(--text-secondary); }

/* ── Forms ───────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 18px; }
.field--row    { flex-direction: row; gap: 20px; align-items: flex-start; }
.field--half   { flex: 1; }
.field__label  { font-size: .825rem; font-weight: 600; color: var(--text); }
.field__hint   { font-size: .775rem; color: var(--text-muted); }
.field__input  {
  padding: 9px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .875rem; font-family: var(--font);
  background: var(--surface); color: var(--text); transition: border .15s;
  width: 100%;
}
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.field__input:disabled { background: var(--bg); color: var(--text-muted); cursor: not-allowed; opacity: .7; }
.field__textarea { resize: vertical; min-height: 90px; }
input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .85; }
input::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.description-toolbar { display: flex; gap: 6px; margin: 0 0 6px; }
.description-toolbar__button {
  min-width: 30px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: .8rem; line-height: 1; padding: 6px 8px;
}
.description-toolbar__button:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.field__select   { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* Global select styling — ensures all <select> elements match the dark theme */
select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
}
select option {
  background: var(--surface);
  color: var(--text);
}
input[type="file"] {
  font-size: .85rem;
  color: var(--text-secondary);
}
input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
input[type="file"]::file-selector-button:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-sm);
}
input[type="file"]::-webkit-file-upload-button {
  margin-right: 10px;
  padding: 6px 12px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
input[type="file"]::-webkit-file-upload-button:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-sm);
}
.required { color: var(--error); }
.field--checkbox { justify-content: flex-end; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.checkbox-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }

/* ── Tables ──────────────────────────────────────────────────── */
.data-table-wrapper { overflow-x: auto; margin-top: 14px; border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th { text-align: left; padding: 10px 14px; font-size: .775rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 1.5px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.data-table tr.hidden { display: none; }
@media (max-width: 1024px) {
  .data-table { font-size: .8rem; }
  .data-table th { padding: 8px 10px; }
  .data-table td { padding: 10px; }
}
@media (max-width: 768px) {
  .data-table-wrapper { margin: 12px -14px 0; }
  .data-table { font-size: .75rem; }
  .data-table th { padding: 6px 8px; font-size: .7rem; }
  .data-table td { padding: 8px; }
  .data-table td .btn { padding: 4px 6px; font-size: .7rem; }
}

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination-controls {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  margin-top: 16px; padding: 12px; background: var(--bg); border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.pagination-size { display: flex; align-items: center; gap: 8px; }
.pagination-size select { padding: 6px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .875rem; }
.pagination-nav { display: flex; gap: 4px; align-items: center; }
.pagination-btn { padding: 6px 12px; border: 1.5px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); font-size: .875rem; cursor: pointer; transition: background .15s; }
.pagination-btn:hover { background: var(--bg); }
.pagination-btn:disabled { opacity: .5; cursor: not-allowed; }
.pagination-info { font-size: .875rem; color: var(--text-secondary); white-space: nowrap; }

/* ── Sortable table headers ──────────────────────────────────────── */
.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable-th:hover { color: var(--text); }
.sortable-th .sort-arrow { margin-left: 6px; opacity: .35; font-size: .7rem; }
.sortable-th .sort-arrow::after { content: '\2195'; }
.sortable-th[aria-sort="ascending"] .sort-arrow { opacity: 1; }
.sortable-th[aria-sort="ascending"] .sort-arrow::after { content: '\2191'; }
.sortable-th[aria-sort="descending"] .sort-arrow { opacity: 1; }
.sortable-th[aria-sort="descending"] .sort-arrow::after { content: '\2193'; }

.actions-cell { display: flex; gap: 6px; align-items: center; }
.mono { font-family: var(--mono); font-size: .825rem; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px; backdrop-filter: blur(4px);
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 32px; max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg); animation: modalIn .2s ease;
  text-align: center;
}
.modal--wide { max-width: 760px; text-align: left; }
@keyframes modalIn { from { opacity:0; transform:scale(.95) translateY(8px); } to { opacity:1; transform:none; } }
.modal__icon  { font-size: 2.5rem; margin-bottom: 12px; }
.modal__title { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.modal__body  { color: var(--text-secondary); margin-bottom: 24px; }
.modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal__header h3 { font-size: 1rem; font-weight: 700; }
.modal__close { background: none; border: none; font-size: 1.1rem; color: var(--text-muted); padding: 4px 8px; border-radius: var(--radius-sm); }
.modal__close:hover { background: var(--bg); }
.code-block { background: #0f172a; color: #e2e8f0; font-family: var(--mono); font-size: .8rem; padding: 20px; border-radius: var(--radius); overflow: auto; max-height: 480px; white-space: pre-wrap; word-break: break-all; }

/* OIDC modal: keep usable across common Windows viewport sizes */
#oidcIntegrationModal {
  align-items: flex-start;
  overflow-y: auto;
}
.modal--oidc {
  width: min(900px, calc(100vw - 32px));
  max-width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  text-align: left;
}
.modal--oidc .modal__header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#oidcIntegrationForm {
  overflow-y: auto;
  padding-right: 4px;
}
.oidc-modal__actions {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
}

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
  width: 22px; height: 22px; border: 2.5px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state p { margin-bottom: 16px; }

/* ────────────────────────────────────────────────────────────── */
/*  AUTH PAGES                                                    */
/* ────────────────────────────────────────────────────────────── */
.auth-page { background: var(--bg); }
.auth-shell {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 40px 36px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-card__logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 28px; justify-content: center;
}
.auth-card__brand { font-size: 1.1rem; font-weight: 700; }
.auth-card__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; text-align: center; }
.auth-card__sub   { font-size: .875rem; color: var(--text-muted); text-align: center; margin-bottom: 20px; }
.auth-form .btn--primary { margin-top: 6px; padding: 12px; }
.oidc-login-list { display: flex; flex-direction: column; gap: 8px; }
.oidc-login-btn { justify-content: center; gap: 10px; }
.oidc-login-btn__logo {
  width: 96px;
  height: 48px;
  border-radius: 4px;
  object-fit: contain;
  flex: 0 0 96px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .35);
  padding: 3px;
}

/* ────────────────────────────────────────────────────────────── */
/*  ADMIN LAYOUT                                                  */
/* ────────────────────────────────────────────────────────────── */
.admin-page { background: var(--bg); }
.admin-shell {
  display: flex; min-height: 100vh;
}
.admin-shell--form { display: block; }

/* Sidebar */
.sidebar {
  width: 220px; min-height: 100vh; background: var(--sidebar-bg);
  display: flex; flex-direction: column; padding: 20px 0;
  position: sticky; top: 0; flex-shrink: 0;
  height: 100vh;
  overflow: hidden;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px 24px; font-size: .95rem; font-weight: 700;
  color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 8px;
}
.sidebar__nav {
  list-style: none;
  padding: 0 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.sidebar__link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-size: .875rem; font-weight: 500;
  transition: background .15s, color .15s; text-decoration: none;
}
.sidebar__link:hover, .sidebar__link.active { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.sidebar__link.active { background: var(--sidebar-active); color: #fff; }

.sidebar__section { margin-top: 4px; }
.sidebar__section-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--sidebar-text);
  font-size: .875rem; font-weight: 500; text-align: left;
  transition: background .15s, color .15s;
}
.sidebar__section-btn:hover,
.sidebar__section-btn[aria-expanded="true"] {
  background: var(--sidebar-hover); color: #fff;
}
.sidebar__section-arrow { margin-left: auto; transition: transform .15s ease; }
.sidebar__section-btn[aria-expanded="true"] .sidebar__section-arrow { transform: rotate(180deg); }

.sidebar__submenu {
  list-style: none; margin: 6px 0 0; padding: 4px 0 0 24px;
  border-left: 1px solid rgba(148, 163, 184, .25);
}
.sidebar__sublink {
  display: block; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-size: .82rem; font-weight: 500;
  text-decoration: none; transition: background .15s, color .15s;
}
.sidebar__sublink:hover,
.sidebar__sublink.active { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.sidebar__sublink.active { box-shadow: inset 2px 0 0 var(--sidebar-active); }

.sidebar__preview, .sidebar__logout {
  margin: 4px 10px 0; padding: 10px 12px;
  border-radius: var(--radius-sm); font-size: .8rem;
  color: var(--sidebar-text); text-decoration: none; display: block;
}
.sidebar__preview:hover { background: var(--sidebar-hover); text-decoration: none; color: #fff; }
.sidebar__session {
  margin: 8px 10px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, .25);
  background: rgba(148, 163, 184, .08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar__session-label {
  color: var(--sidebar-text);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sidebar__session-user {
  color: #fff;
  font-size: .84rem;
  line-height: 1.2;
}
.sidebar__session-role {
  color: var(--sidebar-text);
  font-size: .78rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sidebar__session-role::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, .2);
}
.sidebar__session-role--administrator::before {
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, .22);
}
.sidebar__session-role--power-user::before {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .22);
}
.sidebar__session-role--viewer::before {
  background: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, .22);
}
.sidebar__logout { margin-top: auto; color: #f87171; }
.sidebar__logout:hover { background: rgba(248,113,113,.1); text-decoration: none; }
.icon { width: 16px; height: 16px; flex-shrink: 0; }

/* Main content area */
.admin-main { flex: 1; padding: 32px; overflow: auto; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.panel-header h2 { font-size: 1.3rem; font-weight: 700; }

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.oidc-manager {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
}
.oidc-manager__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 8px;
}
.oidc-manager__actions .btn {
  min-height: 30px;
}
.oidc-manager__actions .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.oidc-manager #oidcIntegrationSelect {
  min-height: 36px;
}
.oidc-manager #oidcManagerSelectionStatus {
  margin-top: 2px;
  margin-bottom: 12px;
}
.oidc-integration-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.oidc-integration-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.oidc-integration-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.oidc-integration-item--active {
  border-color: var(--border-strong);
  box-shadow: inset 2px 0 0 var(--border-strong);
}
.oidc-integration-item--selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: inset 2px 0 0 var(--accent);
}
.oidc-integration-item__title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}
.oidc-integration-item__meta {
  font-size: .78rem;
  color: var(--text-muted);
}
[data-theme="dark"] .oidc-integration-item--selected {
  border-color: var(--accent);
  background: rgba(59, 130, 246, .16);
}
.oidc-logo-thumb {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
  border: 1px solid var(--border);
  background: #fff;
}

/* Step cards */
.steps-list { display: flex; flex-direction: column; gap: 10px; }
.step-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  transition: box-shadow .15s;
}
.step-card:hover { box-shadow: var(--shadow-sm); }
.step-card--section { flex-wrap: wrap; }
.step-card--inactive { opacity: .6; }
.step-card__drag { cursor: grab; color: var(--text-muted); font-size: 1.1rem; user-select: none; }
.step-card__order {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-light); color: var(--accent);
  font-size: .8rem; font-weight: 700; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.step-card__body    { flex: 1; min-width: 0; }
.step-card__title   { font-weight: 600; margin-bottom: 2px; }
.step-card__desc    { font-size: .85rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-card__meta    { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.step-card__actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 32px; text-align: center; margin-bottom: 24px;
  background: var(--bg); transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: var(--accent-light); }
.upload-zone p { color: var(--text-muted); font-size: .9rem; margin-top: 8px; }
.link-label { color: var(--accent); cursor: pointer; font-weight: 600; }

/* Settings grid */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.settings-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 24px; }
.settings-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.settings-save-status { min-height: 1.25em; margin-top: 8px; color: var(--text-muted); font-size: .8rem; }
.settings-save-status--success { color: var(--success); }
.settings-save-status--error { color: var(--error); }
@media (max-width: 768px) {
  .settings-card { padding: 18px; }
  .settings-card h3 { font-size: .95rem; margin-bottom: 12px; }
  .settings-card h4 { font-size: .85rem; }
}
.logo-preview { margin-bottom: 12px; }
.logo-preview img { max-height: 80px; border-radius: var(--radius-sm); margin-bottom: 10px; }
.upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.upload-row .btn { flex: 0 0 auto; }
.logo-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.logo-upload__choose {
  margin: 0;
}
.logo-upload__filename {
  min-width: 0;
  max-width: 220px;
  font-size: .85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 520px) {
  .upload-row .btn { width: 100%; justify-content: center; }
  .logo-upload__filename { max-width: 100%; width: 100%; }
}
@media (max-width: 980px) {
  #oidcIntegrationForm .cert-upload-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .modal--oidc {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 14px 14px 12px;
  }
  .oidc-modal__issuer-row,
  .oidc-modal__secret-row {
    flex-direction: column;
    align-items: stretch;
  }
  .oidc-modal__issuer-row .btn,
  .oidc-modal__secret-row .btn,
  .oidc-modal__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
@media (max-height: 780px) {
  .modal--oidc {
    max-height: calc(100vh - 8px);
  }
}
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form .field__input { flex: 1; min-width: 120px; }
@media (max-width: 1024px) {
  .inline-form { gap: 8px; }
  .inline-form .btn { padding: 6px 10px; font-size: .75rem; }
}
@media (max-width: 768px) {
  .inline-form { flex-direction: column; align-items: stretch; gap: 8px; }
  .inline-form .field { width: 100%; margin-bottom: 0; }
  .inline-form .field__input { width: 100%; }
  .inline-form .field__select { width: 100%; }
  .inline-form .btn { width: 100%; justify-content: center; }
}

/* Form page */
.form-page { max-width: 620px; margin: 0 auto; padding: 32px; }
.form-page__header { margin-bottom: 28px; }
.back-link { font-size: .85rem; color: var(--text-muted); display: block; margin-bottom: 8px; }
.back-link:hover { color: var(--accent); text-decoration: none; }
.form-page__header h1 { font-size: 1.5rem; font-weight: 700; }
.step-form .form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 28px; }

/* Step editor */
.step-editor { max-width: 1240px; margin: 0 auto; padding: 28px 32px 0; }
.step-editor__header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 20px; }
.step-editor__header .back-link { flex-basis: 100%; margin-bottom: 0; }
.step-editor__header h1 { font-size: 1.4rem; font-weight: 700; }
.step-editor__context { font-size: .8rem; color: var(--text-muted); }
.step-editor__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.step-editor__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.step-editor__side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.step-editor .field--row { flex-wrap: wrap; gap: 12px 16px; }
.step-editor .field--row > .field { margin-bottom: 0; min-width: 160px; }
.se-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 20px; }
.se-card > .field:last-child, .se-card > .field--row:last-child { margin-bottom: 0; }
.se-card--compact { padding: 16px; }
.se-card__title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.se-card__intro { display: block; margin-bottom: 12px; }
.se-card__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.se-card__header .se-card__title { margin-bottom: 0; }
.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 6px; }
.segmented__option { position: relative; }
.segmented__option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented__option span {
  display: block; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 600; text-align: center; color: var(--text-secondary); cursor: pointer;
}
.segmented__option input:checked + span { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.segmented__option input:focus-visible + span { box-shadow: 0 0 0 3px rgba(37,99,235,.25); }
.segmented__option input:disabled + span { opacity: .5; cursor: not-allowed; }
.segmented--sm { display: inline-flex; gap: 4px; margin: 0; }
.segmented--sm button {
  padding: 4px 10px; font-size: .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary);
}
.segmented--sm button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.content-block, .step-editor .action-row {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); padding: 12px; margin-bottom: 10px;
}
.step-editor .action-row:last-child { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.step-editor .action-row.is-dragging { opacity: .5; }
.content-block__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.content-block__summary { flex: 1; font-size: .8rem; color: var(--text-muted); }
.content-rows { display: flex; flex-direction: column; }
.content-row__grip { padding-top: 0; }
.content-row.is-dragging { opacity: .5; }
.user-step__block-text { margin-top: 12px; }
.step-divider { border: 0; border-top: 1px solid var(--border-strong); margin: 12px 0; }

/* Step content blocks (shared by end-user page and admin preview) */
.user-step.user-step--rich { align-items: flex-start; }
.user-step--rich .user-step__action { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.user-step__illustration[data-zoomable] { cursor: zoom-in; }
.step-block { margin-top: 12px; }
hr.step-block { margin-bottom: 0; }
.step-block--top-none { margin-top: 0; }
.step-block--top-sm { margin-top: 6px; }
.step-block--top-md { margin-top: 18px; }
.step-block--top-lg { margin-top: 32px; }
.step-block--bottom-none { margin-bottom: 0; }
.step-block--bottom-sm { margin-bottom: 6px; }
.step-block--bottom-md { margin-bottom: 18px; }
.step-block--bottom-lg { margin-bottom: 32px; }
.step-block--text { color: var(--text); font-size: .95rem; line-height: 1.6; }
.step-block--heading { color: var(--text); font-size: 1.05rem; font-weight: 700; }
.step-block strong { font-weight: 700; }
.step-callout { display: flex; gap: 10px; padding: 10px 14px; border: 1px solid; border-radius: var(--radius-sm); color: var(--text); font-size: .92rem; line-height: 1.55; }
.step-callout--info { background: var(--accent-light); border-color: var(--accent); }
.step-callout--warning { background: var(--warning-light); border-color: var(--warning); }
.step-callout--tip { background: var(--success-light); border-color: var(--success); }
.step-figure { margin-left: 0; margin-right: 0; max-width: min(100%, 680px); }
.step-figure--sm { max-width: min(100%, 240px); }
.step-figure--md { max-width: min(100%, 480px); }
.step-figure--lg { max-width: min(100%, 720px); }
.step-figure--full { max-width: 100%; }
.step-figure--center { margin-left: auto; margin-right: auto; text-align: center; }
.step-figure__img {
  display: block; max-width: 100%; height: auto; cursor: zoom-in;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm);
}
.step-figure--sm .step-figure__img, .step-figure--md .step-figure__img,
.step-figure--lg .step-figure__img, .step-figure--full .step-figure__img { width: 100%; }
.step-figure--center .step-figure__img { margin: 0 auto; }
.step-figure__caption { margin-top: 6px; font-size: .8rem; color: var(--text-muted); }
.step-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.step-pair > .step-block { margin-top: 0; }
@media (max-width: 720px) { .step-pair { grid-template-columns: 1fr; } }
.step-zoom {
  position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center;
  padding: 32px; background: rgba(0, 0, 0, .85); cursor: zoom-out;
}
.step-zoom img { max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; }
.step-zoom__close {
  position: absolute; top: 14px; right: 18px; border: 0; background: none; color: #fff; font-size: 1.4rem; cursor: pointer;
}
.content-options { margin-top: 8px; font-size: .8rem; }
.content-options summary { cursor: pointer; color: var(--text-secondary); font-weight: 600; }
.content-options__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.content-options__grid label { display: flex; flex-direction: column; gap: 4px; color: var(--text-secondary); }
.content-options__grid .checkbox-label { flex-direction: row; align-items: center; }
.content-options__wide { grid-column: 1 / -1; }
.add-block { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 12px; }
.add-block__label { display: block; margin-bottom: 8px; font-size: .9rem; font-weight: 600; color: var(--text-secondary); }
.add-block__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  color: var(--text); padding: 5px 14px; font-size: .8rem;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.se-toggles { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 4px; }
.step-preview {
  width: 100%; margin: 0 auto; padding: 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg); transition: max-width .2s;
}
.step-preview--mobile { max-width: 240px; }
.step-preview__title { font-weight: 700; margin-bottom: 4px; }
.step-preview__placeholder { color: var(--text-muted); }
.step-preview__badge { display: inline-block; margin-bottom: 6px; font-size: .7rem; font-weight: 600; color: var(--accent); }
.step-preview .user-step__desc { font-size: .8rem; }
.step-preview__img { max-height: 140px; object-fit: contain; margin-top: 8px; border: 1px solid var(--border); border-radius: 6px; }
.step-preview__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.se-checks { list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: .8rem; }
.se-checks li::before { content: '\2713'; margin-right: 6px; font-weight: 700; color: var(--success); }
.se-checks li.is-warning::before { content: '!'; color: var(--warning); }
.step-editor__footer {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  margin: 20px -32px 0; padding: 14px 32px; background: var(--surface); border-top: 1.5px solid var(--border);
}
.step-editor__status { flex: 1; font-size: .8rem; color: var(--text-muted); }
.step-editor__status.is-dirty { color: var(--warning); }
.match-preview__count { margin: 8px 0 12px; font-size: .9rem; }
.match-preview__table { max-height: 420px; overflow: auto; }
@media (max-width: 960px) {
  .step-editor__grid { grid-template-columns: 1fr; }
  .step-editor__side { position: static; }
}

/* Experience editor */
.exp-editor { padding-bottom: 32px; }
.exp-editor__nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.exp-editor__nav a {
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px;
  font-size: .8rem; font-weight: 600; color: var(--text-secondary); background: var(--surface);
}
.exp-editor__nav a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.exp-editor .se-card { scroll-margin-top: 16px; }
.exp-dirty { font-size: .75rem; font-weight: 600; color: var(--warning); }
.exp-card__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.exp-danger { border-color: var(--error); }
.exp-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.exp-card__titles { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.exp-card__name { font-size: 1.05rem; font-weight: 700; }
.exp-card__name a { color: var(--text); }
.exp-card__name a:hover { color: var(--accent); text-decoration: none; }
.exp-card__slug { font-family: var(--mono); font-size: .78rem; color: var(--text-muted); }
.exp-card__desc { margin-top: 6px; font-size: .88rem; color: var(--text-secondary); }
.exp-card__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 10px; font-size: .82rem; color: var(--text-secondary); }
.exp-card__stats strong { color: var(--text); }
.exp-card__tag { padding: 1px 8px; border-radius: 999px; background: rgba(124, 58, 237, .18); color: #a78bfa; font-size: .72rem; font-weight: 700; }
.exp-card .exp-card__actions { margin-top: 12px; }
.chip--static { cursor: default; }
.chip--static:hover { border-color: var(--border-strong); color: var(--text); }
.exp-howto { gap: 8px; }
.exp-howto li::before { content: '\2192'; color: var(--accent); }
.section-row__fields { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; }
.section-row__fields label { display: flex; flex-direction: column; gap: 4px; }
.section-row__steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.section-row__steps .chip { text-decoration: none; }
.step-chip {
  display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); font-size: .8rem; overflow: hidden;
}
.step-chip a { padding: 5px 10px 5px 14px; color: var(--text); text-decoration: none; }
.step-chip a:hover { color: var(--accent); }
.step-chip__delete {
  align-self: stretch; padding: 0 10px; border: 0; border-left: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-size: .9rem; line-height: 1;
}
.step-chip__delete:hover:not(:disabled) { background: var(--error-light); color: var(--error); }
.step-chip__delete:disabled { opacity: .4; cursor: not-allowed; }
.chip--muted { opacity: .55; }
.chip--add { border-style: dashed; color: var(--accent); }
.section-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.section-row__spacer { flex: 1; }
.section-row__rule { margin-top: 10px; }
.section-row.is-removed { opacity: .5; border-style: dashed; }
.section-row.is-new { border-color: var(--accent); }
@media (max-width: 720px) { .section-row__fields { grid-template-columns: 1fr; } }
.banner-row { display: flex; align-items: center; gap: 10px; }
.banner-row__body { flex: 1; min-width: 0; }
.banner-row__text { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner-row.is-editing { border-color: var(--accent); }
.banner-row.is-off { opacity: .65; }
.banner-editor { margin-top: 12px; }
.banner-types { margin: 0 0 14px 18px; display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--text-secondary); }
.banner-types strong { color: var(--text); }
.banner-editor__window { display: block; margin: -4px 0 12px; }
.exp-preview {
  width: 100%; margin: 0 auto; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font-size: .8rem; transition: max-width .2s;
}
.exp-preview[data-theme="light"] {
  color-scheme: light; --accent: #2563eb; --accent-light: #eff6ff;
  --bg: #f8fafc; --surface: #ffffff; --border: #e2e8f0; --border-strong: #cbd5e1;
  --text: #0f172a; --text-secondary: #475569; --text-muted: #94a3b8;
}
.exp-preview--mobile { max-width: 240px; }
.exp-preview__status { padding: 6px 10px; background: var(--warning-light); color: var(--warning); font-weight: 600; font-size: .72rem; }
.exp-preview__header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.exp-preview__logo { max-height: 28px; max-width: 80px; object-fit: contain; }
.exp-preview__title { font-weight: 700; font-size: .9rem; }
.exp-preview__subtitle { color: var(--text-secondary); font-size: .72rem; }
.exp-preview__body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.exp-preview__banner { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 6px; color: #fff; }
.exp-preview__banner > span { font-size: .72rem; opacity: .9; }
.exp-preview__banner.is-editing { outline: 2px dashed var(--accent); outline-offset: 2px; }
.exp-preview__section { margin-top: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.exp-preview__step { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.exp-preview__num {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent-light); color: var(--accent); font-size: .65rem; font-weight: 700;
}
.exp-preview__empty { padding: 7px 9px; border: 1px dashed var(--border-strong); border-radius: 6px; color: var(--text-muted); }
.exp-preview__tag {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: rgba(124, 58, 237, .18);
  color: #a78bfa; font-size: .62rem; font-weight: 700; letter-spacing: 0; text-transform: none; vertical-align: middle;
}
.exp-preview__banner .exp-preview__tag { background: rgba(255, 255, 255, .25); color: #fff; }
.exp-preview__note { display: block; margin-top: 8px; }

/* ────────────────────────────────────────────────────────────── */
/*  USER PAGE                                                     */
/* ────────────────────────────────────────────────────────────── */
.user-page { background: var(--bg); }
.user-shell { min-height: 100vh; display: flex; flex-direction: column; }

.user-header {
  background: var(--surface); border-bottom: 1.5px solid var(--border);
  padding: 20px 40px; position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; row-gap: 12px;
}
.user-header__inner { display: flex; align-items: center; gap: 20px; max-width: 900px; margin: 0 auto; flex: 1 1 280px; min-width: 0; }
.user-header__text { min-width: 0; }
.user-header__info { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; font-size: .9rem; margin-left: auto; }
.user-info { display: flex; align-items: center; gap: 6px; }
.user-info__label { font-weight: 600; color: var(--text-secondary); }
.user-info__value { color: var(--accent); font-weight: 700; }
.user-info--clickable { cursor: pointer; border-radius: var(--radius-sm); padding: 4px 8px; margin: -4px -8px; transition: background .15s; }
.user-info--clickable:hover, .user-info--clickable:focus-visible { background: var(--accent-light); outline: none; }
.user-logo { height: 72px; width: auto; object-fit: contain; }
.user-title { font-size: 1.4rem; font-weight: 700; }
.user-subtitle { font-size: .875rem; color: var(--text-muted); }
.user-logout-btn {
  background: transparent; border: 1.5px solid var(--border); color: var(--text-primary);
  padding: 8px 16px; border-radius: var(--radius-md); font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.user-logout-btn:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-light);
}

.user-main { flex: 1; padding: 40px 24px 48px; }
.steps-container { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.steps-loading { display: flex; align-items: center; gap: 12px; color: var(--text-muted); padding: 40px; justify-content: center; }

/* User step cards */
.user-step {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 28px;
  display: flex; align-items: center; gap: 24px;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s;
}
.user-step:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.user-step__number {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-light); color: var(--accent);
  font-size: .95rem; font-weight: 700; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.user-step__body { flex: 1; }
.user-step__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.user-step__desc  { font-size: .9rem; color: var(--text-secondary); }
.user-step__desc strong { color: var(--text); font-weight: 700; }
.user-step__action { flex-shrink: 0; }
.user-step__illustration, .step-image-preview {
  display: block; max-width: min(100%, 680px); max-height: 420px; object-fit: contain;
  margin-top: 12px; border-radius: 6px; border: 1px solid var(--border);
}
.user-step.user-step--group { display: block; padding: 0; overflow: hidden; }
.user-step__group-heading { list-style: none; display: flex; align-items: center; gap: 18px; padding: 20px 24px; cursor: pointer; }
.user-step__group-heading::-webkit-details-marker, .user-substep__heading::-webkit-details-marker { display: none; }
.user-step__group-heading .user-step__body { min-width: 0; }
.user-step__group-heading .user-step__title { display: block; }
.user-step__group-content { padding: 0 24px 22px 82px; }
.user-step__chevron { width: 9px; height: 9px; border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary); transform: rotate(45deg); flex: 0 0 9px; margin-right: 6px; }
[open] > summary .user-step__chevron { transform: rotate(225deg); }
.user-substeps { margin-top: 16px; border-top: 1px solid var(--border); }
.user-substep { border-bottom: 1px solid var(--border); }
.user-substep__heading { list-style: none; display: flex; gap: 12px; align-items: center; min-height: 54px; cursor: pointer; font-weight: 600; font-size: .92rem; }
.user-substep__heading > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.user-substep__number { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.user-substep__check { color: var(--success); visibility: hidden; }
.user-substep.user-step--success .user-substep__check { visibility: visible; }
.user-substep__body { padding: 2px 20px 18px 28px; }
.step-card__substeps { flex-basis: 100%; margin: 0 0 0 58px; padding: 8px 0 4px 16px; border-left: 2px solid var(--border); }
.substep-row { display: flex; gap: 8px; align-items: center; min-height: 42px; padding: 5px 0; font-size: .875rem; }
.substep-row__drag { cursor: grab; color: var(--text-muted); }
.substep-row__number { flex: 0 0 20px; color: var(--text-muted); }
.substep-row__title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.substep-row__controls { display: flex; flex-shrink: 0; gap: 4px; align-items: center; }
.substep-row__controls .btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 520px) { .step-card__substeps { margin-left: 0; } }
.illustration-tools { display: grid; gap: 16px; margin: 0 0 26px; }
.illustration-upload-layout { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 10px; align-items: stretch; }
.illustration-upload-drop { position: relative; display: flex; min-height: 94px; padding: 12px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border: 1.5px dashed var(--border-strong); border-radius: 6px; color: var(--text-secondary); text-align: center; cursor: pointer; }
.illustration-upload-drop:hover, .illustration-upload-drop--over { border-color: var(--accent); background: var(--accent-light); }
.illustration-upload-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.illustration-upload-drop strong { color: var(--accent); }
.illustration-upload-drop__filename { max-width: 100%; color: var(--text-muted); font-size: .75rem; overflow-wrap: anywhere; }
.illustration-upload-drop__input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.illustration-upload-fields { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 8px; }
.illustration-upload-fields .field__input { flex: 1 1 150px; min-width: 0; }
.illustration-upload-fields .btn { flex-shrink: 0; }
.illustration-tool__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.illustration-tool__row .field__input { flex: 1 1 180px; min-width: 0; }
.illustration-tool__row .btn { flex-shrink: 0; }
.illustration-collection { margin: 0 0 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.illustration-collection > summary { cursor: pointer; font-weight: 700; padding: 4px 0 12px; }
.illustration-collection > summary .field__hint { margin-left: 8px; }
.illustration-collection__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.illustration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; padding-bottom: 16px; }
.illustration-item { min-width: 0; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 10px; }
.illustration-item > a { display: block; aspect-ratio: 4 / 3; background: var(--bg); margin-bottom: 10px; }
.illustration-item img { display: block; width: 100%; height: 100%; object-fit: contain; }
.illustration-item form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.illustration-item .field__input { width: 100%; min-width: 0; }
.illustration-item .field__hint { display: block; margin-top: 8px; }
@media (max-width: 640px) { .illustration-upload-layout { grid-template-columns: 1fr; } }
.user-substep__body .user-step__action { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.user-step--group .user-step__availability { margin-top: 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .user-step__group-heading { padding: 16px; gap: 12px; }
  .user-step__group-content { padding: 0 16px 18px; }
  .user-substep__body { padding-left: 12px; padding-right: 0; }
}
.qr-step-action { display: flex; align-items: center; gap: 12px; }
.qr-step-action__image { width: 116px; height: 116px; padding: 6px; background: #fff; border-radius: var(--radius-sm); }
.qr-step-action--disabled { opacity: .65; pointer-events: none; filter: grayscale(1); }
.qr-resource-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.qr-resource-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.qr-resource-card__image { width: 96px; height: 96px; padding: 5px; flex: 0 0 96px; background: #fff; border-radius: var(--radius-sm); }
.qr-resource-card__image--unavailable { display: grid; place-items: center; background: var(--bg); color: var(--text-muted); font-size: 1.35rem; }
.qr-resource-card__body { min-width: 0; flex: 1; }
.qr-resource-card__body h3 { font-size: .95rem; margin-bottom: 2px; }
.qr-resource-card__body p { color: var(--text-secondary); font-size: .825rem; margin-bottom: 4px; }
.qr-resource-card__url { display: block; font-family: var(--mono); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }

/* Step states */
.user-step--running { border-color: var(--accent); background: var(--accent-light); }
.user-step--success { border-color: #86efac; background: var(--success-light); }
.user-step--error   { border-color: #fca5a5; background: var(--error-light); }
.user-step--unavailable { opacity: .62; background: var(--bg); border-color: var(--border); }
.user-step--unavailable:hover { box-shadow: var(--shadow-sm); border-color: var(--border); }
.user-step--unavailable .user-step__number { background: var(--border); color: var(--text-muted); }
.user-step--unavailable .btn { filter: grayscale(1); opacity: .65; cursor: not-allowed; }
.user-step__availability { color: var(--text-muted); display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; margin-top: 8px; }
.user-step--security { border-color: var(--accent); background: var(--accent-light); margin-bottom: 16px; }
.security-checklist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.security-checklist li { display: flex; align-items: center; gap: 10px; font-size: .875rem; flex-wrap: wrap; }
.security-checklist__status { font-weight: 600; flex-shrink: 0; }
.security-checklist__status--done { color: var(--success); }
.security-checklist__status--pending { color: var(--text-secondary); }
.security-checklist__hint { font-size: .8rem; color: var(--text-muted); font-style: italic; }
.user-step__status  { font-size: .8rem; font-weight: 600; margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.user-step__status--success { color: var(--success); }
.user-step__status--error   { color: var(--error); }

.user-footer { padding: 20px 40px; text-align: center; font-size: .8rem; color: var(--text-muted); border-top: 1px solid var(--border); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .user-header { padding: 12px 16px; align-items: stretch; gap: 10px; }
  .user-header__inner { flex: 1 1 100%; margin: 0; max-width: none; gap: 12px; }
  .user-logo { height: 48px; max-width: 46%; }
  .user-title { font-size: 1.1rem; line-height: 1.25; }
  .user-subtitle { font-size: .8rem; line-height: 1.35; }
  .user-header__info { width: 100%; margin-left: 0; gap: 8px 14px; font-size: .8rem; }
  .user-info { min-width: 0; }
  .user-info__value { overflow-wrap: anywhere; }
  .user-logout-btn { margin-left: auto; padding: 6px 12px; }
}

@media (max-width: 720px) {
  .sidebar { width: 180px; }
  .admin-main { padding: 20px; }
  .user-main { padding: 20px; }
  .banner { margin: 10px 20px; padding: 12px 16px; }
  .cutover-banner { margin: 10px 20px 14px; padding: 12px 16px; }
  .user-step { flex-direction: column; align-items: flex-start; }
  .qr-step-action { width: 100%; justify-content: space-between; }
  .qr-step-action__image { width: 132px; height: 132px; }
  .qr-resource-list { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .user-header { padding: 10px 12px; }
  .user-logo { height: 40px; }
  .user-title { font-size: 1rem; }
  .user-subtitle { display: none; }
  .user-header__info { align-items: flex-start; }
  .user-info--clickable { flex: 1 1 190px; }
  .user-step { padding: 20px 24px; }
  .user-step__action { width: 100%; }
  .user-step__action > .btn { width: 100%; justify-content: center; }
  .qr-step-action { flex-direction: column; align-items: stretch; gap: 10px; }
  .qr-step-action__image { align-self: center; }
  .qr-step-action .btn { justify-content: center; }
}

@media (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
  .user-header {
    align-items: center;
    flex-wrap: nowrap;
    gap: 14px;
    padding: 8px 16px;
  }
  .user-header__inner {
    flex: 1 1 auto;
    width: auto;
    gap: 10px;
  }
  .user-logo { height: 38px; max-width: 35%; }
  .user-title { font-size: 1rem; white-space: nowrap; }
  .user-subtitle { display: none; }
  .user-header__info {
    flex: 0 1 auto;
    width: auto;
    flex-wrap: nowrap;
    gap: 10px;
    font-size: .75rem;
  }
  .user-info--clickable { flex: 0 1 230px; }
  .user-info__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-logout-btn { margin-left: 0; padding: 5px 10px; }
}

/* ── Banner ───────────────────────────────────────────────────── */
.banner {
  margin: 14px 40px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.banner[hidden] { display: none; }
.banner__inner { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.banner__text { font-size: 1rem; font-weight: 700; color: #fff; }
.banner__sub  { font-size: .875rem; color: rgba(255,255,255,.85); display: flex; align-items: center; gap: 12px; }
.banner--warning { background: linear-gradient(135deg, #b45309, #92400e); }
.banner__link { color: #fff; font-weight: 700; text-decoration: underline; cursor: pointer; }
.banner__dismiss {
  background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff;
  padding: 2px 10px; border-radius: 6px; font-size: .75rem; cursor: pointer;
}
.banner__dismiss:hover { background: rgba(255,255,255,.15); }

/* ── Two-section layout ───────────────────────────────────────── */
.section-block { margin-bottom: 40px; }
.section-block--empty .steps-container { display: none; }
.section-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: 10px;
}
.section-label::before {
  content: ''; display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; background: var(--accent); flex-shrink: 0;
}
.section-block:nth-child(2) .section-label::before { background: var(--success); }

/* Admin section groups */
.section-group { margin-bottom: 32px; }
.experience-group { margin-bottom: 40px; }
.experience-group__name { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 1.05rem; }
.experience-card { text-decoration: none; color: inherit; cursor: pointer; }
.experience-card:hover { border-color: var(--accent); }
.language-switcher { background: transparent; color: inherit; border: 1px solid var(--border, currentColor); border-radius: 6px; padding: 2px 6px; font: inherit; }
.form-page--wide { max-width: 1200px; }
.rule-fieldset { border: 1px solid var(--border, #334155); border-radius: 8px; padding: 12px 14px; }
.rb__mode { display: flex; gap: 16px; margin-bottom: 8px; }
.rb__group { border-left: 3px solid var(--accent); padding: 8px 0 8px 12px; margin: 8px 0; }
.rb__group-head, .rb__row, .rb__add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.rb__row .field__input { width: auto; min-width: 140px; }
.rb__row .rb__values { flex: 1; min-width: 200px; }
.rb__label { font-size: .85rem; color: var(--text-secondary); }
.rb__exclude-toggle { margin-top: 8px; }
.preview-row--hidden td { opacity: .55; }
.banner-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; }
.experience-banners .banner, .section-banner { margin-bottom: 12px; }
.translation-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.translation-toolbar .field__input { width: auto; min-width: 160px; }
.translation-grid td { vertical-align: top; }
.translation-grid__source { white-space: pre-wrap; color: var(--text-secondary); }
.translation-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 0; background: var(--bg, inherit); }
.section-group__label { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-group__name  { font-weight: 600; font-size: .9rem; color: var(--text-secondary); }
.section-pill { display: inline-block; padding: 2px 10px; border-radius: 999px;
                font-size: .75rem; font-weight: 700; }
.section-pill--1 { background: var(--accent-light); color: var(--accent); }
.section-pill--2 { background: var(--success-light); color: var(--success); }
.empty-state-sm  { padding: 16px 0; color: var(--text-muted); font-size: .875rem; }

/* ── Multi-action buttons ─────────────────────────────────────── */
.user-step__action { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.btn--document { background: #7c3aed; color: #fff; border-color: transparent; }
.btn--document:hover { background: #6d28d9; }
.btn--video    { background: #dc2626; color: #fff; border-color: transparent; }
.btn--video:hover { background: #b91c1c; }
.btn--credential { background: #0369a1; color: #fff; border-color: transparent; }
.btn--credential:hover { background: #0284c7; }
.credential-reveal-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.user-step--credential { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; column-gap: 24px; row-gap: 12px; }
.user-step--credential > .user-step__number { grid-column: 1; grid-row: 1 / span 3; }
.user-step--credential > .user-step__body { grid-column: 2; grid-row: 1; min-width: 0; }
.user-step--credential > .user-step__action { grid-column: 2; grid-row: 2; min-width: 0; justify-self: start; }
.user-step--credential > .credential-reveal-box { grid-column: 2; grid-row: 3; width: 100%; min-width: 0; margin-top: 0; }
.user-step--credential .credential-reveal-controls { justify-content: flex-start; }
@media (max-width: 520px) {
  .user-step.user-step--credential { grid-template-columns: 32px minmax(0, 1fr); gap: 10px 14px; }
  .user-step--credential > .user-step__number { width: 32px; height: 32px; }
  .user-step--credential > .user-step__action { flex-wrap: wrap; }
}

/* ── Credential reveal box ── */
.credential-reveal-box {
  margin-top: 12px;
  padding: 14px 18px;
  background: #0c2340;
  border: 1.5px solid #0369a1;
  border-radius: 10px;
  animation: fadeIn .25s ease;
}
.credential-reveal-box__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.credential-reveal-box__row + .credential-reveal-box__row { margin-top: 10px; }
.credential-reveal-box__label { font-size: .8rem; color: #94a3b8; white-space: nowrap; }
.credential-reveal-box__value {
  font-family: 'Courier New', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: .04em;
  user-select: all;
  word-break: break-all;
}
.credential-reveal-box__timer { font-size: .75rem; color: #64748b; margin-left: auto; white-space: nowrap; }
[data-theme="light"] .credential-reveal-box { background: #eff6ff; border-color: #3b82f6; }
[data-theme="light"] .credential-reveal-box__value { color: #1d4ed8; }
[data-theme="light"] .credential-reveal-box__label { color: #475569; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 180px; z-index: 100; overflow: hidden;
}
.dropdown__menu[hidden] { display: none; }
.dropdown__item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 16px; background: none; border: none;
  font-size: .875rem; color: var(--text); text-align: left; cursor: pointer;
}
.dropdown__item:hover { background: var(--bg); }
.dropdown__item:disabled { opacity: .45; cursor: not-allowed; }

/* ── Action builder (step form) ───────────────────────────────── */
.actions-builder { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.actions-builder__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.actions-builder__header h3 { font-size: 1rem; font-weight: 700; }
.action-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.action-row:last-child { border-bottom: none; padding-bottom: 0; }
.action-row__grip { color: var(--text-muted); cursor: grab; padding-top: 10px; font-size: 1rem; }
.action-row__fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.action-row__top { display: flex; gap: 8px; flex-wrap: wrap; }
.action-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 150px; }
.action-field__label { font-size: .75rem; font-weight: 600; color: var(--text-secondary); }
.newlogin-label-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.action-row:not(.action-row--credential) .action-field--newlogin,
.action-row:not(.action-row--credential) .credential-hint { display: none; }
.action-row--credential .action-row__top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.action-row--credential .action-field--type { order: 1; }
.action-row--credential .action-field--mode { order: 2; }
.action-row--credential .action-field--label { order: 3; }
.action-row--credential .action-field--newlogin { order: 4; margin-bottom: 0; }
.csv-template-link { display: block; margin: 2px 0 6px; }
.credential-library .field--row { flex-wrap: wrap; }
.credential-library .field--half { min-width: min(100%, 200px); }
.credential-library .field__input { min-width: 0; }
.action-file-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-file-row .field__select { flex: 1; min-width: 160px; }
.action-file-or  { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }
.action-file-upload { font-size: .8rem; }

/* ── Badges new types ─────────────────────────────────────────── */
.badge--teal   { background: #f0fdfa; color: #0f766e; }
.badge--purple { background: #faf5ff; color: #7c3aed; }
.badge--red    { background: #fef2f2; color: #dc2626; }

/* ── Banner preview (admin settings) ─────────────────────────── */
.banner-preview {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 14px; border-radius: var(--radius);
  margin-top: 12px; text-align: center;
}
.banner-preview strong { color: #fff; font-size: .95rem; }
.banner-preview span   { color: rgba(255,255,255,.85); font-size: .85rem; }

/* ── Settings layout updates ──────────────────────────────────── */
.settings-card--wide { grid-column: 1 / -1; }
.labels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.labels-form, .banner-form { }

/* ═══════════════════════════════════════════════════════════════
   DARK MODE
   Applied via <html data-theme="dark">
   ═══════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  color-scheme: dark;
  --accent:        #3b82f6;
  --accent-hover:  #2563eb;
  --accent-light:  #1e3a5f;
  --success:       #22c55e;
  --success-light: #14291e;
  --error:         #f87171;
  --error-light:   #2d1515;
  --warning:       #fbbf24;
  --warning-light: #2d2010;

  --bg:            #0f172a;
  --surface:       #1e293b;
  --border:        #334155;
  --border-strong: #475569;

  --text:          #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;

  --sidebar-bg:    #020617;
  --sidebar-text:  #94a3b8;
  --sidebar-hover: #1e293b;
  --sidebar-active:#3b82f6;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow:    0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
}

/* Dark mode surface overrides */
[data-theme="dark"] .auth-card          { background: var(--surface); }
[data-theme="dark"] .field__input       { background: #0f172a; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .field__input:focus { border-color: var(--accent); }
[data-theme="dark"] .modal              { background: var(--surface); }
[data-theme="dark"] .step-card          { background: var(--surface); }
[data-theme="dark"] .user-step          { background: var(--surface); }
[data-theme="dark"] .settings-card      { background: var(--surface); }
[data-theme="dark"] .upload-zone        { background: var(--bg); }
[data-theme="dark"] .upload-zone:hover  { background: var(--accent-light); }
[data-theme="dark"] .data-table tr:hover td { background: #0f172a; }
[data-theme="dark"] .dropdown__menu     { background: var(--surface); }
[data-theme="dark"] .dropdown__item:hover { background: var(--bg); }
[data-theme="dark"] .actions-builder    { border-color: var(--border); }
[data-theme="dark"] .user-header        { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .user-footer        { border-color: var(--border); }

/* ── Theme toggle button ──────────────────────────────────────── */
.theme-toggle {
  background: none; border: 1.5px solid var(--border);
  color: var(--text-secondary); border-radius: var(--radius-sm);
  padding: 6px 10px; cursor: pointer; font-size: .8rem;
  display: flex; align-items: center; gap: 6px;
  transition: background .15s, color .15s;
}
.theme-toggle:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar__theme { padding: 8px 10px; }
.user-footer__theme { margin-top: 8px; }

/* ── Cert status badge ────────────────────────────────────────── */
.cert-status { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: .875rem; }
.cert-status__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cert-status__dot--active  { background: var(--success); }
.cert-status__dot--http    { background: var(--text-muted); }
.cert-status__dot--warning { background: var(--warning); }
.cert-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.oidc-claim-mappings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 12px 0 18px; }
@media (max-width: 720px) { .oidc-claim-mappings { grid-template-columns: 1fr; } }

/* ── Agent token section ──────────────────────────────────────── */
.token-display {
  font-family: var(--mono); font-size: .8rem; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; word-break: break-all; margin-bottom: 10px;
  color: var(--text-secondary); user-select: all;
}
.token-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Build status badges ─────────────────────────────────────── */
.build-status-badge { font-size: .75rem; cursor: default; transition: background .3s; }

/* ── Code signing settings sub-cards ────────────────────────── */
.settings-card h4 { font-size: .9rem; font-weight: 700; margin-bottom: 10px; }
[data-theme="dark"] .settings-card { background: var(--surface); border-color: var(--border); }

/* ── Cutover lock overlay ──────────────────────────────────────── */
.section-lock {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 2px solid var(--border-strong);
  border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.section-lock__icon { font-size: 1.6rem; flex-shrink: 0; }
.section-lock__body { flex: 1; }
.section-lock__title { font-weight: 700; font-size: .95rem; margin-bottom: 2px; }
.section-lock__countdown {
  font-size: .85rem; color: var(--text-secondary);
  font-family: var(--mono);
}
.section-lock__countdown strong { color: var(--text); }

/* Locked step cards — visible but greyed, buttons disabled */
.user-step--locked { opacity: .55; pointer-events: none; }
.user-step--locked .btn { cursor: not-allowed !important; }

/* ── Cutover banner ────────────────────────────────────────────── */
.cutover-banner {
  margin: 14px 40px 16px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.cutover-banner__inner {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.cutover-banner__text    { font-size: 1rem; font-weight: 700; color: #fff; }
.cutover-banner__sub     { font-size: .875rem; color: rgba(255,255,255,.85); }
.cutover-banner__countdown {
  font-size: .8rem; color: rgba(255,255,255,.9);
  font-family: var(--mono); margin-top: 2px;
}

/* ── Agent setup page ──────────────────────────────────────────── */
.setup-guide { max-width: 760px; margin: 0 auto; }
.setup-intro {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 28px;
}
.setup-intro p { margin-bottom: 8px; color: var(--text-secondary); }
.setup-intro p:last-child { margin-bottom: 0; }

.setup-step {
  display: flex; gap: 20px; margin-bottom: 28px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.setup-step__num {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff;
  font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.setup-step__body  { flex: 1; }
.setup-step__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.setup-step p      { color: var(--text-secondary); margin-bottom: 8px; line-height: 1.6; }
.setup-tip {
  background: var(--accent-light); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: .875rem; color: var(--text-secondary); margin-top: 12px;
}
.setup-tip strong { color: var(--text); }
kbd {
  background: var(--bg); border: 1.5px solid var(--border-strong);
  border-radius: 4px; padding: 1px 6px; font-size: .8rem; font-family: var(--mono);
}

/* ── Admin agent status card ───────────────────────────────────── */
.agent-build-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
