:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8ef;
  --text: #142033;
  --muted: #64748b;
  --primary: #1f4e79;
  --primary-ink: #ffffff;
  --primary-soft: #e8f0f8;
  --green: #15803d;  --green-soft: #e7f6ec;
  --red: #b91c1c;    --red-soft: #fdecec;
  --amber: #b45309;  --amber-soft: #fdf3e2;
  --blue: #1d4ed8;   --blue-soft: #e8efff;
  --purple: #7c3aed; --purple-soft: #f1ebff;
  --wa: #1fa855;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.wa:hover { filter: brightness(1.05); }
.btn.danger { color: var(--red); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.link { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }
.icon-btn { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-2); }

label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=search], input:not([type]), select, textarea {
  width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit;
}
textarea { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
input[type=file] { font: inherit; width: 100%; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- Pills, tags ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }

/* ---------- App shell ---------- */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: #0f2238; color: #cbd5e1; display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand strong { color: #fff; display: block; font-size: 14px; line-height: 1.2; }
.brand small { color: #8aa0b8; font-size: 11px; }
.logo { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: none; border: 1px solid rgba(255,255,255,.15); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #cbd5e1; font-weight: 500; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.ni { width: 18px; text-align: center; opacity: .85; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; font-size: 13px; }
.sidebar-foot a, .sidebar-foot .link { color: #8aa0b8; text-align: left; }
.main { padding: 28px 32px 60px; max-width: 1200px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-block; margin-bottom: 8px; font-size: 13px; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-2-1 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.grid-2 > .card + .card, .grid-2-1 > .card + .card, .grid-2-1 > div > .card + .card { margin-top: 0; }
.stack > * + * { margin-top: 16px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.stat.green .value { color: var(--green); } .stat.red .value { color: var(--red); } .stat.amber .value { color: var(--amber); }

.empty { padding: 22px; text-align: center; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; }

/* lists */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.list-item:first-child { border-top: 0; padding-top: 2px; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.date-block { width: 52px; flex: none; text-align: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); padding: 6px 0; }
.date-block .m { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.date-block .d { font-size: 20px; font-weight: 700; line-height: 1.1; }
.type-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }

.progress { height: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress > div { height: 100%; background: var(--primary); border-radius: 999px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); padding: 5px 12px; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 280px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab.active { color: var(--text); border-bottom-color: var(--primary); }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.steps li:first-child { border-top: 0; }
.steps li.done .step-label { color: var(--muted); }
.steps li.done .lbl { text-decoration: line-through; }
.steps .step-label { flex: 1; }
.steps .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; flex: none; font-size: 11px; color: #fff; }
.steps li.done .tick { background: var(--green); border-color: var(--green); }
.steps li.missing .tick { border-color: var(--amber); }
.steps .del { visibility: hidden; }
.steps li:hover .del { visibility: visible; }

.stage-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 16px 0 6px; }
.stage { text-align: center; font-size: 12px; color: var(--muted); }
.stage .bar { height: 6px; border-radius: 999px; background: var(--border); margin-bottom: 6px; }
.stage.done .bar { background: var(--green); }
.stage.current .bar { background: var(--primary); }
.stage.current { color: var(--text); font-weight: 600; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.timeline li::after { content: ''; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-size: 12px; color: var(--muted); }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; padding: 4px 0; }
.cal .day { min-height: 76px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 6px; background: var(--surface); cursor: pointer; text-align: left; font: inherit; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal .day:hover { border-color: var(--primary); }
.cal .day.other { opacity: .4; }
.cal .day.today .num { background: var(--primary); color: #fff; border-radius: 999px; padding: 0 6px; }
.cal .day.selected { outline: 2px solid var(--primary); }
.cal .num { font-size: 12px; font-weight: 600; align-self: flex-start; }
.cal .ev { font-size: 11px; border-radius: 4px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal.wide { max-width: 760px; }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.doc-paper { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 18px; white-space: pre-wrap; font-size: 13px; max-height: 300px; overflow: auto; margin-bottom: 14px; }
.sig-pad { width: 100%; height: 160px; border: 2px dashed var(--border); border-radius: 10px; background: #fff; touch-action: none; display: block; cursor: crosshair; }
.sig-img { max-width: 260px; height: 80px; object-fit: contain; border-bottom: 1px solid var(--text); display: block; }
.notice { background: var(--amber-soft); color: var(--amber); padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.info { background: var(--primary-soft); color: var(--primary); padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.code { font-family: ui-monospace, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; font-weight: 600; letter-spacing: .05em; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .2s; pointer-events: none; z-index: 60; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.bars .bar-row { display: grid; grid-template-columns: 120px 1fr 70px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.bars .track { height: 10px; background: var(--red-soft); border-radius: 999px; overflow: hidden; }
.bars .fill { height: 100%; background: var(--green); }

/* ---------- Public / marketing / auth ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; max-width: 1100px; margin: 0 auto; gap: 12px; }
.topbar .brand { padding: 0; }
.topbar .brand strong { color: var(--text); }
.topbar .brand small { color: var(--muted); }
.hero { max-width: 1100px; margin: 0 auto; padding: 48px 24px 32px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 40px; letter-spacing: -.02em; }
.hero p.lead { font-size: 17px; color: var(--muted); margin: 14px 0 24px; }
.features { max-width: 1100px; margin: 0 auto; padding: 16px 24px 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.features .card h3 { margin-bottom: 6px; }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 40px rgba(16,24,40,.08); padding: 18px; }
.auth-wrap { max-width: 880px; margin: 20px auto 60px; padding: 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-wrap.single { max-width: 480px; grid-template-columns: 1fr; }
.demo-hint { font-size: 12px; color: var(--muted); margin-top: 10px; }

.firm-hero { color: #fff; padding: 56px 24px 64px; }
.firm-hero .inner { max-width: 1000px; margin: 0 auto; }
.firm-hero h1 { font-size: 36px; }
.firm-hero p { opacity: .9; max-width: 640px; margin-top: 10px; font-size: 16px; }
.firm-body { max-width: 1000px; margin: -36px auto 60px; padding: 0 24px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.services { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.services li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-weight: 500; }

/* client portal */
.portal-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.portal-bar .topbar { padding: 12px 24px; }
.portal { max-width: 1000px; margin: 0 auto; padding: 24px 24px 60px; }
.next-appt { display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, var(--primary), #2d6aa3); color: #fff; border-radius: var(--radius); padding: 18px; margin-top: 16px; flex-wrap: wrap; }
.next-appt .date-block { background: rgba(255,255,255,.16); color: #fff; }
.next-appt .grow { flex: 1; min-width: 200px; }
.next-appt .btn { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .grid-2-1, .hero, .firm-body, .auth-wrap { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; gap: 8px; overflow-x: auto; z-index: 10; }
  .sidebar .brand { padding: 0; } .sidebar .brand div { display: none; }
  .sidebar nav { flex-direction: row; }
  .sidebar nav a { padding: 8px 10px; white-space: nowrap; }
  .sidebar-foot { margin: 0 0 0 auto; flex-direction: row; white-space: nowrap; }
  .sidebar-foot a { display: none; }
  .main { padding: 20px 16px 60px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 24px 16px; } .hero h1 { font-size: 30px; }
  .topbar { padding: 12px 16px; }
  .portal { padding: 16px 16px 60px; }
  .firm-body { padding: 0 16px; }
  .services { grid-template-columns: 1fr; }
  .stage-track { grid-template-columns: repeat(3, 1fr); }
  .cal .day { min-height: 48px; } .cal .ev { font-size: 0; height: 6px; padding: 0; }
  .row { flex-direction: column; gap: 0; }
  .kv { grid-template-columns: 100px 1fr; }
  .bars .bar-row { grid-template-columns: 90px 1fr 60px; }
}

.topbar .row > *, .page-head .row > * { flex: none; }
@media (max-width: 520px) { .topbar .btn.primary, .topbar .btn.wa { display: none; } }
.appt-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.list-item:has(.date-block) { align-items: flex-start; }

/* language switch */
.lang-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); flex: none; }
.lang-toggle button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; padding: 6px 10px; cursor: pointer; color: var(--muted); }
.lang-toggle button.active { background: var(--primary); color: #fff; }
.lang-toggle.dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); align-self: flex-start; }
.lang-toggle.dark button { color: #cbd5e1; }
.lang-toggle.dark button.active { background: rgba(255,255,255,.9); color: #0f2238; }
@media (max-width: 760px) { .hide-sm { display: none; } }

/* questionnaire */
.intake-sec { margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--primary); }
.card-head + .intake-sec, .card > .intake-sec:first-of-type { border-top: 0; padding-top: 0; }
.intake-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.intake-grid .wide { grid-column: 1 / -1; }
.intake-kv { grid-template-columns: minmax(150px, 38%) 1fr; gap: 8px 16px; }
@media (max-width: 760px) { .intake-grid { grid-template-columns: 1fr; } .intake-kv { grid-template-columns: 1fr; gap: 2px; } .intake-kv dd { margin-bottom: 8px; } }

@media print {
  body { background: #fff; }
  .sidebar, .tabs, .page-head .actions, .back, .no-print, .stage-track { display: none !important; }
  .app-shell { display: block; } .main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
}
.main { min-width: 0; }
.demo-cta { max-width: 1052px; margin: 0 auto 60px; padding: 24px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.demo-cta h2 { font-size: 20px; margin-bottom: 4px; }
@media (max-width: 1100px) { .demo-cta { margin: 0 24px 60px; } }
@media (max-width: 760px) { .demo-cta { margin: 0 16px 40px; } }

/* attachments */
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.attach { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 6px; padding: 3px 8px; font: inherit; font-size: 12px; cursor: pointer; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach:hover { border-color: var(--primary); }
.attach.on-dark { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; }
.steps li.done .step-label .attach { text-decoration: none; }
.steps .step-label { min-width: 0; }
.step-attach { padding: 0 8px; flex: none; }
/* accounts */
.secret-wrap { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.secret, .mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; }

/* TuTramiteRD brand */
.brand-logo { background: #002d62 !important; }
.brand-rd { color: #ce1126; }
.sidebar .brand-rd, .firm-hero .brand-rd { color: #ff6b7d; }
.site-foot { max-width: 1052px; margin: 0 auto; padding: 18px 24px 40px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
@media (max-width: 1100px) { .site-foot { margin: 0 24px; padding: 18px 0 40px; } }
@media (max-width: 760px) { .site-foot { margin: 0 16px; } }
@media (max-width: 760px) {
  .hero .row { gap: 10px; }
  .hero .btn.lg { width: 100%; }
  .demo-cta .row { gap: 10px; width: 100%; }
  .demo-cta .btn.lg { width: 100%; }
}
@media (max-width: 760px) { .row > * { flex: none; } }

/* loading & auth */
.boot { min-height: 60vh; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
body.busy { cursor: progress; }
body.busy .btn.primary { opacity: .6; pointer-events: none; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
