/* ── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: #FFFFFF;
}

/* ── Design Tokens — Dark Theme ─────────────────────────────────────────────── */
:root {
  --cyan:       #3FD8DD;
  --blue:       #124CED;
  --grad:       linear-gradient(135deg, #3FD8DD 0%, #124CED 100%);
  --bg:         #07090F;
  --card:       #111827;
  --card-2:     #161F35;
  --border:     rgba(255, 255, 255, 0.08);
  --border-sel: rgba(63, 216, 221, 0.5);
  --text:       #FFFFFF;
  --muted:      #9CA3AF;
  --sel-bg:     rgba(18, 76, 237, 0.12);

  /* Perfis */
  --dia-bg: rgba(18, 76, 237, 0.15);  --dia-c: #3FD8DD;  --dia-b: rgba(63, 216, 221, 0.4);
  --tra-bg: rgba(14, 116, 144, 0.15); --tra-c: #22D3EE;  --tra-b: rgba(34, 211, 238, 0.4);
  --ini-bg: rgba(217, 119, 6, 0.15);  --ini-c: #FBBF24;  --ini-b: rgba(251, 191, 36, 0.4);

  /* Status */
  --novo-bg: rgba(18, 76, 237, 0.15); --novo-c: #93C5FD;
  --atd-bg:  rgba(217, 119, 6, 0.15); --atd-c:  #FCD34D;
  --agu-bg:  rgba(194, 65, 12, 0.15); --agu-c:  #FCA5A5;
  --fch-bg:  rgba(16, 185, 129, 0.15);--fch-c:  #6EE7B7;
  --per-bg:  rgba(75, 85, 99, 0.2);   --per-c:  #6B7280;

  /* Feedback */
  --error:        #F87171;
  --error-bg:     rgba(248, 113, 113, 0.1);
  --error-border: rgba(248, 113, 113, 0.3);
  --success:      #6EE7B7;
  --whatsapp:     #25D366;
}

/* ── Page ────────────────────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Quiz Container ──────────────────────────────────────────────────────────── */
#quiz-container {
  width: 100%;
  max-width: 344px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 480px) {
  body { justify-content: center; padding: 40px 16px 52px; }
  #quiz-container { flex: unset; }
}

/* ── Screen shared ───────────────────────────────────────────────────────────── */
.screen-card {
  flex: 1;
  padding: 36px 22px 28px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Radial glow */
.screen-card::before {
  content: '';
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(63,216,221,0.12) 0%, rgba(18,76,237,0.06) 50%, transparent 70%);
  pointer-events: none;
}

/* ── Logo SVG ───────────────────────────────────────────────────────────────── */
.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.logo svg {
  width: 88px;
  height: 44px;
  filter: drop-shadow(0 0 12px rgba(63,216,221,0.35));
}
.logo-wordmark { display: flex; flex-direction: column; align-items: center; }
.logo-metodo {
  font-size: 9px; font-weight: 500; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--muted);
}
.logo-name {
  font-size: 26px; font-weight: 900; letter-spacing: -0.02em; line-height: 1;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── S1: Welcome ────────────────────────────────────────────────────────────── */
#screen-welcome {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 0;
}

.welcome-title {
  font-size: 22px; font-weight: 800; line-height: 1.2;
  color: var(--text); margin-bottom: 10px;
  position: relative; z-index: 1;
}
.welcome-title em {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.doctor-credit {
  font-size: 11px; color: var(--muted);
  text-align: center; margin-bottom: 18px;
  letter-spacing: 0.01em; position: relative; z-index: 1;
}
.welcome-subtitle {
  font-size: 13.5px; color: var(--muted);
  line-height: 1.7; text-align: center;
  max-width: 260px; margin-bottom: 32px;
  position: relative; z-index: 1;
}
.welcome-subtitle strong { color: var(--text); font-weight: 600; }

/* ── S2: Quiz ───────────────────────────────────────────────────────────────── */
#screen-quiz {
  display: flex; flex-direction: column;
  padding: 26px 18px 20px;
  background: var(--bg);
  flex: 1;
}

.progress-wrap { margin-bottom: 24px; }
.progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.progress-label, .progress-pct {
  font-size: 10px; color: var(--muted); font-weight: 500;
}
.progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 9999px;
  transition: width 0.35s ease;
  width: 0%;
}

.quiz-question {
  font-size: 15px; font-weight: 700; line-height: 1.4;
  text-align: center; color: var(--text); margin-bottom: 20px;
}

.options-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

.option-card {
  display: flex; align-items: center; gap: 11px;
  width: 100%; min-height: 52px; padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px; color: var(--muted);
  cursor: pointer; text-align: left; line-height: 1.35;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-family: inherit;
}
.option-card:hover {
  border-color: rgba(63, 216, 221, 0.3);
  color: var(--text);
}
.option-card.selected {
  border-color: var(--cyan);
  background: var(--sel-bg);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(63,216,221,0.3), 0 0 16px rgba(63,216,221,0.08);
}
.option-letter {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.option-card.selected .option-letter {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}

/* ── Botões ─────────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--grad);
  color: #fff; border: none;
  border-radius: 50px; height: 52px; width: 100%;
  font-family: inherit; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(18, 76, 237, 0.4);
  transition: opacity 0.2s;
}
.btn-primary:hover:not(:disabled) { opacity: 0.9; }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
  cursor: default;
}

.btn-arrow {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.btn-primary:disabled .btn-arrow { display: none; }

.btn-back {
  background: none; border: none;
  color: var(--muted); font-family: inherit;
  font-size: 11px; padding: 10px 0;
  align-self: flex-start; margin-top: 6px;
  cursor: pointer; min-height: 44px;
}
.btn-back:hover { color: var(--cyan); }

.btn-whatsapp {
  background: var(--whatsapp); color: #fff;
  border-radius: 50px; height: 48px;
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  text-decoration: none; border: none;
  transition: opacity 0.2s;
}
.btn-whatsapp:hover { opacity: 0.9; }
.btn-whatsapp svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-link {
  background: none; border: none;
  color: var(--muted); font-family: inherit;
  font-size: 11px; text-align: center;
  padding: 4px; cursor: pointer;
  width: 100%;
}
.btn-link:hover { color: var(--cyan); }

/* ── S3: Form ───────────────────────────────────────────────────────────────── */
#screen-form {
  display: flex; flex-direction: column;
  padding: 26px 18px 20px; gap: 18px;
  background: var(--bg);
}

.form-title    { font-size: 20px; font-weight: 800; color: var(--text); }
.form-subtitle { font-size: 13px; color: var(--muted); line-height: 1.5; }

.fields { display: flex; flex-direction: column; gap: 12px; }

.field-wrap { display: flex; flex-direction: column; gap: 4px; }
.field-label {
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.field-optional { font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 4px; text-transform: none; letter-spacing: 0; }
.field-input {
  height: 46px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.field-input::placeholder { color: rgba(255,255,255,0.2); }
.field-input:focus { border-color: var(--cyan); }
.field-error {
  font-size: 10.5px; color: var(--error);
  min-height: 1em;
}

.lgpd-wrap { display: flex; align-items: flex-start; gap: 10px; }
.lgpd-check {
  width: 18px; height: 18px;
  accent-color: var(--cyan);
  flex-shrink: 0; margin-top: 2px; cursor: pointer;
}
.lgpd-text { font-size: 11px; color: var(--muted); line-height: 1.55; }
.lgpd-text a { color: var(--cyan); text-underline-offset: 2px; }

.form-error-box {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 10px; padding: 10px 14px;
  font-size: 12px; color: var(--error);
}

/* ── S4: Loading ────────────────────────────────────────────────────────────── */
#screen-loading {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 28px;
  overflow: hidden;
}
#screen-loading::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(18,76,237,0.25) 0%, rgba(63,216,221,0.1) 40%, transparent 70%);
  pointer-events: none;
}
.loading-logo {
  width: 80px; height: 40px;
  position: relative; z-index: 1;
  filter: drop-shadow(0 0 16px rgba(63,216,221,0.5));
}
.loading-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px; font-weight: 600;
  text-align: center; position: relative; z-index: 1;
}
.loading-track {
  width: 200px; height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px; overflow: hidden;
  position: relative; z-index: 1;
}
#loading-bar-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 9999px;
  width: 0%;
  transition: width 1.5s ease;
}

/* ── Resultado ──────────────────────────────────────────────────────────────── */
#result-container {
  width: 100%;
  max-width: 344px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 480px) {
  #result-container { flex: unset; }
}

.result-card {
  flex: 1; background: var(--bg);
  padding: 22px 18px 20px;
  display: flex; flex-direction: column; gap: 13px;
  position: relative; overflow: hidden;
}
.result-card::before {
  content: '';
  position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(63,216,221,0.1) 0%, rgba(18,76,237,0.05) 50%, transparent 70%);
  pointer-events: none;
}

/* Doctor section */
.doc-section {
  display: flex; align-items: center; gap: 10px;
  position: relative; z-index: 1;
}
.doc-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.doc-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.doc-spec { font-size: 10px; color: var(--muted); }

/* Profile header */
.prof-header { position: relative; z-index: 1; }

.result-badge {
  display: inline-block;
  padding: 3px 10px; border-radius: 9999px;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 6px; border: 1px solid;
}
.result-badge[data-perfil="candidato_diamante"] {
  background: var(--dia-bg); color: var(--dia-c); border-color: var(--dia-b);
}
.result-badge[data-perfil="em_transformacao"] {
  background: var(--tra-bg); color: var(--tra-c); border-color: var(--tra-b);
}
.result-badge[data-perfil="iniciante"] {
  background: var(--ini-bg); color: var(--ini-c); border-color: var(--ini-b);
}

.result-subtitulo {
  font-size: 13px; font-weight: 700; line-height: 1.3;
}
.result-subtitulo[data-perfil="candidato_diamante"] { color: var(--dia-c); }
.result-subtitulo[data-perfil="em_transformacao"]   { color: var(--tra-c); }
.result-subtitulo[data-perfil="iniciante"]           { color: var(--ini-c); }

.result-texto {
  font-size: 11px; color: var(--muted); line-height: 1.65;
  position: relative; z-index: 1;
}

.result-bullets {
  list-style: none;
  display: flex; flex-direction: column; gap: 7px;
  position: relative; z-index: 1;
}
.result-bullets li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 11px; color: rgba(255,255,255,0.75); line-height: 1.5;
}
.result-bullets li::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  flex-shrink: 0; margin-top: 5px;
}
#result-bullets[data-perfil="candidato_diamante"] li::before { background: var(--dia-c); }
#result-bullets[data-perfil="em_transformacao"]   li::before { background: var(--tra-c); }
#result-bullets[data-perfil="iniciante"]           li::before { background: var(--ini-c); }

.disclaim-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
  font-size: 8.5px; color: var(--muted);
  line-height: 1.6; font-style: italic;
  position: relative; z-index: 1;
}

.result-cta { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }

.result-no-data {
  text-align: center; padding: 40px 20px;
  color: var(--muted); font-size: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.result-no-data a { color: var(--cyan); }

/* ── Footer CFM ──────────────────────────────────────────────────────────────── */
#disclaimer-cfm {
  width: 100%;
  max-width: 344px;
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  font-size: 8.5px; color: var(--muted);
  text-align: center; line-height: 1.5;
  background: var(--card);
}

/* ── [hidden] ────────────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ADMIN PANEL — dark theme
   ═══════════════════════════════════════════════════════════════════════════════ */

body.panel-page {
  display: block;
  background: var(--bg);
  min-height: 100dvh;
}

#panel-container {
  max-width: 1100px; margin: 0 auto;
  padding: 22px 24px 48px;
}

/* Header */
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.panel-title {
  font-size: 20px; font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Stats bar */
.stats-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 18px;
  display: flex; flex-direction: column; align-items: center; min-width: 86px;
}
.stat-value { font-size: 24px; font-weight: 900; line-height: 1; color: var(--text); }
.stat-value.grad { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-value.amber { color: #FBBF24; }
.stat-value.green { color: #6EE7B7; }
.stat-value.muted { color: #4B5563; }
.stat-label {
  font-size: 9px; color: var(--muted); margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* Filters */
.filter-bar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-select {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 0 10px; height: 33px;
  font-family: inherit; font-size: 12px; color: var(--muted); cursor: pointer;
}

/* Table */
.table-wrap {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
table { width: 100%; border-collapse: collapse; font-size: 12px; }
thead tr { background: rgba(255,255,255,0.03); }
th {
  padding: 9px 13px; text-align: left;
  font-weight: 600; color: #4B5563;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td {
  padding: 11px 13px; border-bottom: 1px solid var(--border);
  color: rgba(255,255,255,0.8); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr.highlight td { background: rgba(18,76,237,0.04); }
td.lead-name { font-weight: 600; color: var(--cyan); cursor: pointer; }
td.lead-name:hover { text-decoration: underline; }

/* Badges */
.badge-perfil {
  display: inline-block; padding: 2px 9px;
  border-radius: 9999px; font-size: 10px; font-weight: 700;
  border: 1px solid; white-space: nowrap;
}
.badge-perfil.candidato_diamante { background: var(--dia-bg); color: var(--dia-c); border-color: var(--dia-b); }
.badge-perfil.em_transformacao   { background: var(--tra-bg); color: var(--tra-c); border-color: var(--tra-b); }
.badge-perfil.iniciante          { background: var(--ini-bg); color: var(--ini-c); border-color: var(--ini-b); }

.badge-status {
  display: inline-block; padding: 2px 9px;
  border-radius: 9999px; font-size: 10px; font-weight: 600; white-space: nowrap;
}
.badge-status.novo                { background: var(--novo-bg); color: var(--novo-c); }
.badge-status.em_atendimento      { background: var(--atd-bg);  color: var(--atd-c); }
.badge-status.aguardando_resposta { background: var(--agu-bg);  color: var(--agu-c); }
.badge-status.fechado_convertido  { background: var(--fch-bg);  color: var(--fch-c); }
.badge-status.perdido             { background: var(--per-bg);  color: var(--per-c); }

/* Buttons */
.btn-sm {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 0 14px; height: 34px;
  font-family: inherit; font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s;
}
.btn-sm:hover { background: rgba(255,255,255,0.1); }
.btn-sm.primary {
  background: var(--grad); color: #fff; border-color: transparent;
  font-weight: 600; box-shadow: 0 2px 12px rgba(18,76,237,0.35);
}
.btn-sm.primary:hover { opacity: 0.9; }
.btn-sm.danger { color: var(--error); border-color: var(--error-border); }
.btn-sm.danger:hover { background: var(--error-bg); }

.btn-act {
  background: rgba(63,216,221,0.1);
  border: 1px solid rgba(63,216,221,0.3);
  color: var(--cyan);
  border-radius: 6px; padding: 3px 9px;
  font-size: 10px; font-weight: 600; font-family: inherit; cursor: pointer;
}

/* Table status messages */
.table-status-msg {
  padding: 24px; text-align: center;
  font-size: 13px; color: var(--muted);
}
.table-status-msg.error { color: var(--error); background: var(--error-bg); }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 16px; font-size: 12px; color: var(--muted);
}

/* ── Modal — slide-in from right ─────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  display: flex; justify-content: flex-end;
}
.modal {
  background: var(--card);
  width: 420px; min-height: 100vh;
  border-left: 1px solid var(--border);
  padding: 22px 20px 32px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
  position: relative;
}
.modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; }
.modal-title  { font-size: 15px; font-weight: 800; color: var(--text); }
.modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted); cursor: pointer;
}

.modal-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #4B5563; margin-bottom: 3px;
}
.modal-value       { font-size: 13px; color: var(--text); font-weight: 500; }
.modal-value.muted { font-size: 11px; color: var(--muted); }

.modal-divider { height: 1px; background: var(--border); }

.qa-list { display: flex; flex-direction: column; gap: 7px; }
.qa-q { font-size: 10px; color: var(--muted); }
.qa-a { font-size: 12px; color: var(--text); font-weight: 500; margin-top: 2px; }

.status-history { display: flex; flex-direction: column; gap: 6px; }
.status-history-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 11px; color: var(--muted);
}
.hist-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad); flex-shrink: 0; margin-top: 3px;
  box-shadow: 0 0 6px rgba(63,216,221,0.5);
}

.status-select {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 8px; padding: 0 10px; height: 36px;
  font-family: inherit; font-size: 12px; color: var(--text); width: 100%;
}

.modal-error {
  font-size: 11.5px; color: var(--error);
  background: var(--error-bg); border: 1px solid var(--error-border);
  border-radius: 8px; padding: 10px 12px;
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: auto; }

/* ── Login ───────────────────────────────────────────────────────────────────── */
body.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100dvh; background: var(--bg);
}
.login-card {
  width: 100%; max-width: 360px;
  background: var(--card);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 20px;
  position: relative; overflow: hidden;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad);
}
.login-title    { font-size: 20px; font-weight: 900; text-align: center; color: var(--text); }
.login-subtitle { font-size: 13px; color: var(--muted); text-align: center; }
.login-error {
  font-size: 12px; color: var(--error);
  background: var(--error-bg); border: 1px solid var(--error-border);
  border-radius: 8px; padding: 10px 12px; text-align: center;
}

/* ── Config ──────────────────────────────────────────────────────────────────── */
.config-card {
  max-width: 480px; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; display: flex; flex-direction: column; gap: 18px;
}
.config-success {
  font-size: 12px; color: var(--success);
  background: rgba(110,231,183,0.1); border: 1px solid rgba(110,231,183,0.3);
  border-radius: 8px; padding: 10px 12px;
}
