/* ════════════════════════════════════════════════════════════
   BSD — Bicego Smile Design · Redesign "Atelier"
   Tema: dark premium · acentos dourados (champanhe) · quiet luxury
   Tokens via CSS variables — diretamente portável para o app vanilla.
   ════════════════════════════════════════════════════════════ */

:root {
  /* ── Fundos (near-black quentes, croma baixíssimo) ── */
  --bg:        #0a0908;   /* página */
  --surface:   #110f0d;   /* cards / painéis */
  --raised:    #18150f;   /* superfícies elevadas */
  --input:     #201c16;   /* inputs / hover */
  --input-2:   #272219;

  /* ── Linhas / bordas ── */
  --line:        #2a2620;
  --line-soft:   #211d18;
  --line-strong: #3a342b;

  /* ── Dourado (champanhe) ── */
  --gold:        #c9a862;
  --gold-light:  #dbbf7a;
  --gold-deep:   #9c8146;
  --gold-grad:   linear-gradient(135deg, #e7d3a1 0%, #cba968 46%, #a8853f 100%);
  --gold-dim:    rgba(201,168,98,.10);
  --gold-hair:   rgba(201,168,98,.22);
  --gold-glow:   rgba(201,168,98,.16);

  /* ── Texto (warm whites) ── */
  --text:    #f2ede2;
  --text-2:  #a59d8e;
  --text-3:  #6c655a;
  --text-4:  #46413a;

  /* ── Estados (suavizados p/ dark luxury) ── */
  --good: #74c98e;  --good-dim: rgba(116,201,142,.10);
  --ok:   #d8b45e;  --ok-dim:   rgba(216,180,94,.10);
  --warn: #e0a94f;  --warn-dim: rgba(224,169,79,.10);
  --bad:  #d9786c;  --bad-dim:  rgba(217,120,108,.10);

  /* ── Forma ── */
  --r-sm: 9px;
  --r:    13px;
  --r-lg: 19px;
  --r-xl: 27px;
  --r-base: 13px;            /* controlado por Tweaks */

  /* ── Densidade (controlada por Tweaks) ── */
  --pad: 30px;
  --gap: 26px;
  --type-scale: 1;

  /* ── Sombras (suaves, quentes) ── */
  --shadow-sm: 0 1px 0 rgba(255,250,240,.02), 0 6px 22px -10px rgba(0,0,0,.7);
  --shadow:    0 1px 0 rgba(255,250,240,.025), 0 20px 50px -24px rgba(0,0,0,.85);
  --shadow-lg: 0 1px 0 rgba(255,250,240,.03), 0 40px 90px -30px rgba(0,0,0,.9);

  --ease: cubic-bezier(.22,.61,.36,1);
  --t: .28s var(--ease);

  /* ── Fontes (controladas por Tweaks) ── */
  --font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, sans-serif;
}

/* dose de dourado — classes aplicadas na raiz */
.gold-discreto  { --gold-dim: rgba(201,168,98,.07); --gold-hair: rgba(201,168,98,.16); }
.gold-generoso  { --gold-dim: rgba(201,168,98,.16); --gold-hair: rgba(201,168,98,.34); --gold-glow: rgba(201,168,98,.26); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* atmosfera de fundo — brilhos dourados muito sutis + grão */
.bsd-root {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 78% -10%, rgba(201,168,98,.05) 0%, transparent 46%),
    radial-gradient(90% 70% at 6% 108%, rgba(201,168,98,.035) 0%, transparent 50%),
    var(--bg);
}
.bsd-root::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 1;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ── Tipografia utilitária ── */
.eyebrow {
  font-family: var(--font-body);
  font-size: calc(11px * var(--type-scale));
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow svg { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; margin-right: 7px; color: var(--gold); }
.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-hair), transparent 62%);
}
.hairline { height: 1px; background: var(--line); border: 0; }

/* ════════════════════════════════════
   SHELL · header
   ════════════════════════════════════ */
.shell { position: relative; z-index: 2; }

.appbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 4vw, 44px);
  height: 74px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}
.appbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-hair) 30%, var(--gold-hair) 70%, transparent);
  opacity: .5;
}

/* monograma */
.brand { display: flex; align-items: center; gap: 14px; }
.monogram {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 11px;
  border: 1px solid var(--gold-hair);
  background:
    linear-gradient(180deg, rgba(201,168,98,.10), rgba(201,168,98,0)),
    var(--raised);
  box-shadow: inset 0 1px 0 rgba(255,240,210,.06);
  position: relative;
}
.monogram span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-text { line-height: 1.15; }
.brand-text .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  color: var(--text);
}
.brand-text .sub {
  font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600;
}

.appbar-right { display: flex; align-items: center; gap: clamp(12px, 2vw, 22px); }

.api-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); letter-spacing: .12em; text-transform: uppercase; }
.api-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: pulse 2.6s var(--ease) infinite; }
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(116,201,142,.4);} 50%{ box-shadow: 0 0 0 5px rgba(116,201,142,0);} }

.user-chip { display: flex; align-items: center; gap: 11px; }
.user-chip .meta { text-align: right; line-height: 1.25; }
.user-chip .meta .hi { font-size: 11px; color: var(--text-3); }
.user-chip .meta .who { font-size: 13px; color: var(--text); font-weight: 500; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  color: var(--gold-light);
  background: var(--raised);
  border: 1px solid var(--gold-hair);
}

/* nav links no header */
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
  padding: 8px 14px; border-radius: 999px; border: 1px solid transparent;
  transition: var(--t);
}
.nav-link:hover { color: var(--text); border-color: var(--line); background: var(--raised); }
.nav-link.ghost { color: var(--text-3); }
.nav-link.ghost:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.nav-link svg { width: 15px; height: 15px; }

/* ════════════════════════════════════
   PAGE
   ════════════════════════════════════ */
.page {
  max-width: 1320px; margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 44px) 90px;
}
.page-head { margin-bottom: clamp(26px, 3vw, 40px); }
.page-head h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: calc(33px * var(--type-scale)); letter-spacing: -.02em;
  color: var(--text); margin-top: 12px; line-height: 1.05;
}
.page-head .lede { color: var(--text-2); font-size: 15px; margin-top: 10px; max-width: 56ch; }

/* ── Tabs (segmento elegante) ── */
.tabs {
  display: inline-flex; gap: 4px; padding: 5px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 999px; margin-bottom: clamp(24px, 3vw, 38px);
}
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 22px; border-radius: 999px; border: 0; background: transparent;
  color: var(--text-3); font-size: 13.5px; font-weight: 500; letter-spacing: .01em;
  cursor: pointer; transition: var(--t);
}
.tab:hover { color: var(--text-2); }
.tab .ti { width: 16px; height: 16px; opacity: .8; }
.tab.active {
  color: #1a1306;
  background: var(--gold-grad);
  box-shadow: 0 6px 18px -8px var(--gold-glow), inset 0 1px 0 rgba(255,245,220,.4);
}
.tab.active .ti { opacity: 1; }

/* ── grid form/result ── */
.work-grid {
  display: grid; grid-template-columns: minmax(380px, 440px) 1fr; gap: var(--gap);
  align-items: start;
}

/* ════════════════════════════════════
   CARD / FORM
   ════════════════════════════════════ */
.card {
  background:
    linear-gradient(180deg, rgba(255,248,235,.018), transparent 120px),
    var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-base);
  box-shadow: var(--shadow-sm);
}
.card.pad { padding: var(--pad); }

.card-head { margin-bottom: 22px; }
.card-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: calc(19px * var(--type-scale)); letter-spacing: -.01em; color: var(--text);
  margin-top: 9px;
}
.card-head p { color: var(--text-3); font-size: 13px; margin-top: 8px; line-height: 1.55; }

.field { margin-bottom: 20px; }
.field > label, .field-label {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--text-2); margin-bottom: 9px; line-height: 1.4;
}
.field-label .opt { color: var(--text-4); font-weight: 500; letter-spacing: 0; }

.control {
  width: 100%; background: var(--input);
  border: 1px solid var(--line); color: var(--text);
  border-radius: var(--r-sm); padding: 12px 14px;
  font-family: var(--font-body); font-size: 14px;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
  outline: none; appearance: none;
}
.control::placeholder { color: var(--text-4); }
.control:hover { border-color: var(--line-strong); }
.control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); background: var(--input-2); }
textarea.control { resize: vertical; min-height: 92px; line-height: 1.55; }

select.control {
  cursor: pointer; padding-right: 38px;
  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='%23c9a862' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select.control option { background: var(--raised); color: var(--text); }
select.control optgroup { color: var(--gold-light); font-weight: 700; font-style: normal; }

.divider { height: 1px; background: var(--line-soft); margin: 24px 0; }

/* ── Upload / vitrine ── */
.dropzone {
  position: relative; display: grid; place-items: center;
  min-height: 168px; padding: 26px;
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(255,255,255,.012) 11px 22px),
    var(--input);
  border: 1px dashed var(--line-strong); border-radius: var(--r);
  cursor: pointer; overflow: hidden; transition: var(--t);
  text-align: center;
}
.dropzone:hover { border-color: var(--gold); background-color: var(--gold-dim); }
.dropzone.tall { min-height: 220px; }
.dropzone .dz-icon { width: 34px; height: 34px; color: var(--gold); opacity: .85; margin: 0 auto 12px; }
.dropzone .dz-title { font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.dropzone .dz-hint { font-size: 11.5px; color: var(--text-4); margin-top: 6px; letter-spacing: .02em; }

/* foto preenchida (placeholder de imagem) */
.photo {
  position: relative; width: 100%; border-radius: var(--r); overflow: hidden;
  background: var(--raised);
  border: 1px solid var(--line);
}
.photo-fill {
  position: relative; aspect-ratio: 4/3;
  background:
    repeating-linear-gradient(135deg, rgba(201,168,98,.05) 0 9px, transparent 9px 18px),
    linear-gradient(180deg, var(--raised), var(--input));
  display: grid; place-items: center;
}
.photo-fill .ph-tag {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: .04em; color: var(--text-3);
  background: rgba(10,9,8,.55); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 999px;
}
/* corner ticks (vitrine) */
.photo .tick { position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--gold-hair); }
.photo .tick.tl { top: 9px; left: 9px; border-right: 0; border-bottom: 0; }
.photo .tick.tr { top: 9px; right: 9px; border-left: 0; border-bottom: 0; }
.photo .tick.bl { bottom: 9px; left: 9px; border-right: 0; border-top: 0; }
.photo .tick.br { bottom: 9px; right: 9px; border-left: 0; border-top: 0; }
.photo .caption {
  position: absolute; left: 11px; bottom: 11px;
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600;
  color: var(--text); background: rgba(10,9,8,.6); border: 1px solid var(--line);
  backdrop-filter: blur(6px); padding: 4px 10px; border-radius: 999px;
}
.photo .x {
  position: absolute; top: 9px; right: 9px; z-index: 4;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10,9,8,.7); border: 1px solid var(--line); color: var(--text-2);
  cursor: pointer; transition: var(--t);
}
.photo .x:hover { color: var(--bad); border-color: var(--bad); }

.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dual .slot-label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); text-align: center; margin-top: 9px; font-weight: 600; }

/* ── tags (chips) ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 12px; color: var(--text-3); cursor: pointer; user-select: none;
  transition: var(--t); background: transparent;
}
.chip:hover { border-color: var(--gold-hair); color: var(--text-2); }
.chip.on { background: var(--gold-dim); border-color: var(--gold); color: var(--gold-light); }

/* checkbox custom */
.check { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.check .box {
  width: 19px; height: 19px; border-radius: 6px; border: 1px solid var(--line-strong);
  background: var(--input); display: grid; place-items: center; transition: var(--t); flex: none;
}
.check .box svg { width: 12px; height: 12px; color: #1a1306; opacity: 0; transform: scale(.6); transition: var(--t); }
.check.on .box { background: var(--gold-grad); border-color: var(--gold); }
.check.on .box svg { opacity: 1; transform: scale(1); }
.check .lbl { font-size: 13px; color: var(--text-2); }

/* ── botões ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: var(--r-sm); cursor: pointer; border: 1px solid transparent;
  font-family: var(--font-body); font-weight: 600; letter-spacing: .01em;
  transition: var(--t);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-gold {
  width: 100%; padding: 14px; font-size: 14.5px;
  color: #1a1306; background: var(--gold-grad);
  box-shadow: 0 10px 28px -12px var(--gold-glow), inset 0 1px 0 rgba(255,245,220,.45);
}
.btn-gold:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 34px -12px var(--gold-glow), inset 0 1px 0 rgba(255,245,220,.5); }
.btn-gold:active:not(:disabled) { transform: translateY(0); }
.btn-gold svg { width: 17px; height: 17px; }
.btn-ghost {
  padding: 11px 18px; font-size: 13px; color: var(--text-2);
  background: var(--raised); border-color: var(--line);
}
.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); }

.submit-wrap { margin-top: 6px; }
.fineprint { font-size: 11px; color: var(--text-4); text-align: center; margin-top: 12px; letter-spacing: .02em; }

/* ════════════════════════════════════
   RESULT PANEL
   ════════════════════════════════════ */
.result {
  position: relative; min-height: 520px;
  background:
    linear-gradient(180deg, rgba(255,248,235,.018), transparent 140px),
    var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-base);
  overflow: hidden; transition: border-color var(--t);
}
.result.has { border-color: var(--gold-hair); }

/* estado vazio */
.empty {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: 16px; padding: 40px; text-align: center;
}
.empty .ring {
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-3);
  background: var(--raised);
}
.empty .ring svg { width: 26px; height: 26px; }
.empty p { color: var(--text-3); font-size: 13.5px; max-width: 30ch; }

/* progress (SSE) */
.progress { padding: var(--pad); }
.progress .eyebrow { margin-bottom: 18px; }
.seglist { display: flex; gap: 7px; margin-bottom: 18px; }
.seg {
  flex: 1; height: 5px; border-radius: 999px; background: var(--input-2); overflow: hidden; position: relative;
}
.seg::after { content: ""; position: absolute; inset: 0; width: 0; background: var(--gold-grad); transition: width .5s var(--ease); }
.seg.done::after { width: 100%; }
.seg.active::after { width: 100%; animation: indet 1.4s var(--ease) infinite; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
@keyframes indet { 0%{ transform: translateX(-100%);} 100%{ transform: translateX(100%);} }
.progress-row { display: flex; align-items: center; justify-content: space-between; }
.progress-row .ph { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--text); }
.progress-row .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-row .clock { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.steps-list { margin-top: 20px; display: grid; gap: 11px; }
.step { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-4); transition: var(--t); }
.step .si { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.step .si svg { width: 11px; height: 11px; }
.step.done { color: var(--text-2); }
.step.done .si { background: var(--gold-dim); border-color: var(--gold); color: var(--gold-light); }
.step.active { color: var(--text); }
.step.active .si { border-color: var(--gold); }

/* conteúdo do resultado */
.result-body { padding: var(--pad); animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.caseid {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 15px; margin-bottom: 22px;
}
.caseid .lab { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.caseid code { font-family: ui-monospace, "SF Mono", monospace; font-size: 12.5px; color: var(--gold-light); }
.caseid .copy { color: var(--text-3); cursor: pointer; transition: var(--t); }
.caseid .copy:hover { color: var(--gold); }
.caseid .copy svg { width: 15px; height: 15px; }

/* compare antes/depois */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 26px; }
.compare.single { grid-template-columns: 1fr 1fr; }

/* seções de texto clínico */
.clinic { }
.clinic section { margin-top: 26px; }
.clinic section:first-child { margin-top: 0; }
.clinic h3 {
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.clinic h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-hair), transparent); }
.clinic p { font-size: 14px; line-height: 1.72; color: var(--text); }
.clinic .diag { color: var(--text-2); }

/* plano por dente */
.teeth { display: grid; gap: 2px; }
.tooth { display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.tooth:last-child { border-bottom: 0; }
.tooth .fdi {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  color: var(--gold-light); min-width: 30px;
  background: var(--gold-dim); border: 1px solid var(--gold-hair); border-radius: 7px;
  text-align: center; padding: 3px 0; flex: none;
}
.tooth .act { font-size: 13.5px; color: var(--text); line-height: 1.55; }
.tooth .act b { color: var(--text); font-weight: 600; }

/* bullets técnicos */
.tlist { display: grid; gap: 10px; }
.tlist li { display: flex; gap: 12px; font-size: 13.5px; color: var(--text-2); line-height: 1.55; list-style: none; }
.tlist li::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--gold); margin-top: 8px; flex: none; transform: rotate(45deg); }
.tlist li b { color: var(--text); font-weight: 600; }

/* pull-quote justificativa */
.justify {
  margin-top: 18px; padding: 16px 20px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  border-left: 2px solid var(--gold); background: var(--raised);
  font-size: 13.5px; color: var(--text-2); font-style: italic; line-height: 1.6;
}

/* ════════════════════════════════════
   SCORE SEAL (nota técnica)
   ════════════════════════════════════ */
.score {
  display: flex; align-items: center; gap: 22px;
  padding: 22px 24px; margin-bottom: 8px;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r);
}
.seal {
  position: relative; width: 104px; height: 104px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
}
.seal svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.seal .val {
  font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1;
  letter-spacing: -.02em; color: var(--seal-color, var(--gold));
}
.seal .max { font-size: 11px; color: var(--text-3); margin-top: 3px; letter-spacing: .04em; }
.score .meta .tier {
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  letter-spacing: -.01em; color: var(--seal-color, var(--gold));
}
.score .meta .lab { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 6px; }
.score .meta .note { font-size: 12.5px; color: var(--text-3); margin-top: 8px; line-height: 1.5; max-width: 30ch; }

/* faixas */
.tier-exc { --seal-color: var(--good); }
.tier-bom { --seal-color: var(--gold-light); }
.tier-med { --seal-color: var(--warn); }
.tier-bx  { --seal-color: var(--bad); }

/* avisos */
.warns { margin-top: 18px; background: var(--warn-dim); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: var(--r-sm); padding: 13px 16px; }
.warns li { list-style: none; display: flex; gap: 10px; font-size: 12.5px; color: var(--warn); line-height: 1.5; padding: 3px 0; }
.warns li svg { width: 14px; height: 14px; flex: none; margin-top: 3px; }

/* ════════════════════════════════════
   LOGIN
   ════════════════════════════════════ */
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  position: relative; z-index: 2;
}
.login-card {
  width: 100%; max-width: 412px; padding: 46px 42px;
  background:
    linear-gradient(180deg, rgba(255,248,235,.022), transparent 160px),
    var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.login-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-hair) 35%, var(--gold-hair) 65%, transparent);
}
.login-brand { text-align: center; margin-bottom: 36px; }
.login-brand .monogram { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 15px; }
.login-brand .monogram span { font-size: 19px; }
.login-brand .name { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--text); letter-spacing: -.01em; }
.login-brand .sub { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--text-3); margin-top: 7px; font-weight: 600; }
.login-brand .div { width: 34px; height: 1px; background: var(--gold-hair); margin: 16px auto 0; }
.login h2 { font-family: var(--font-display); font-weight: 500; font-size: 16px; color: var(--text-2); text-align: center; margin-bottom: 26px; }
.login .control { padding: 13px 15px; }

.magic-sent {
  text-align: center; animation: rise .5s var(--ease) both;
}
.magic-sent .env {
  width: 60px; height: 60px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold);
  background: var(--gold-dim); border: 1px solid var(--gold-hair);
}
.magic-sent .env svg { width: 26px; height: 26px; }
.magic-sent h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--text); margin-bottom: 10px; }
.magic-sent p { font-size: 13px; color: var(--text-3); line-height: 1.6; margin-bottom: 6px; }
.magic-sent p b { color: var(--text); }
.login-foot { margin-top: 26px; text-align: center; font-size: 11px; color: var(--text-4); letter-spacing: .04em; }

/* ════════════════════════════════════
   HISTÓRICO
   ════════════════════════════════════ */
.filters { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 26px; align-items: center; }
.filter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 17px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-3); font-size: 13px; cursor: pointer;
  transition: var(--t); font-weight: 500;
}
.filter:hover { color: var(--text-2); border-color: var(--line-strong); }
.filter.active { color: var(--gold-light); border-color: var(--gold); background: var(--gold-dim); }
.filter .ct { font-size: 11px; color: var(--text-4); }
.filter.active .ct { color: var(--gold); }
.filter svg { width: 14px; height: 14px; }

.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(286px, 1fr)); gap: 18px; }
.hcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; cursor: pointer; transition: var(--t);
  box-shadow: var(--shadow-sm);
}
.hcard:hover { border-color: var(--gold-hair); transform: translateY(-3px); box-shadow: var(--shadow); }
.hcard-imgs { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.hcard-imgs .photo-fill { aspect-ratio: 1; border-radius: 0; }
.hcard-imgs .mid {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10,9,8,.7); border: 1px solid var(--gold-hair); color: var(--gold-light); z-index: 3;
  backdrop-filter: blur(4px);
}
.hcard-imgs .mid svg { width: 13px; height: 13px; }
.hcard-imgs .ba-tag {
  position: absolute; top: 9px; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2); background: rgba(10,9,8,.62); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 999px; font-weight: 600; z-index: 3; backdrop-filter: blur(4px);
}
.hcard-imgs .ba-tag.a { left: 9px; }
.hcard-imgs .ba-tag.b { right: 9px; }
.hcard-meta { padding: 15px 16px; }
.hcard-meta .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.hcard-meta .date { font-size: 11.5px; color: var(--text-3); }
.hcard-meta .matcor { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.hcard-meta .matcor b { color: var(--text); font-weight: 600; }
.hcard-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.minitag { font-size: 10.5px; color: var(--text-3); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }

/* badges tipo/nota no card */
.tagchip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; border: 1px solid;
}
.tagchip svg { width: 12px; height: 12px; }
.tagchip.plan { color: var(--gold-light); border-color: var(--gold-hair); background: var(--gold-dim); }
.tagchip.anal { color: #c4b5fd; border-color: rgba(139,92,246,.32); background: rgba(139,92,246,.10); }
.scorepill {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  padding: 3px 11px; border-radius: 999px; border: 1px solid;
}

/* ════════════════════════════════════
   MODAL
   ════════════════════════════════════ */
.overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background: rgba(6,5,4,.74); backdrop-filter: blur(8px);
  animation: fade .25s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 940px; max-height: 88vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); animation: rise .3s var(--ease) both;
}
.modal-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px var(--pad); background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--text); }
.modal-head .x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--raised); color: var(--text-2); cursor: pointer; display: grid; place-items: center; transition: var(--t); }
.modal-head .x:hover { color: var(--text); border-color: var(--line-strong); }
.modal-body { padding: var(--pad); }

/* ════════════════════════════════════
   TOASTS
   ════════════════════════════════════ */
.toasts { position: fixed; bottom: 26px; right: 26px; z-index: 999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 11px;
  min-width: 240px; max-width: 340px; padding: 13px 16px;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--raised); box-shadow: var(--shadow);
  font-size: 13px; color: var(--text); pointer-events: all;
  animation: toastin .3s var(--ease) both;
}
@keyframes toastin { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastout .3s var(--ease) both; }
@keyframes toastout { to { opacity: 0; transform: translateX(24px); } }
.toast .ic { width: 18px; height: 18px; flex: none; }
.toast.ok .ic { color: var(--good); }
.toast.err .ic { color: var(--bad); }
.toast.info .ic { color: var(--gold); }

/* ════════════════════════════════════
   RESPONSIVO
   ════════════════════════════════════ */
@media (max-width: 980px) {
  .work-grid { grid-template-columns: 1fr; }
  .result { min-height: 0; }
}
@media (max-width: 600px) {
  .appbar { height: 64px; padding: 0 16px; }
  .user-chip .meta { display: none; }
  .brand-text .sub { display: none; }
  :root { --pad: 20px; --gap: 18px; }
  .seal { width: 88px; height: 88px; }
}

/* esconde scrollbar visual ruído mas mantém scroll */
.modal::-webkit-scrollbar { width: 10px; }
.modal::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid var(--surface); }

/* ════════════════════════════════════════════════════════════
   NAV (header) — links múltiplos + estado ativo
   ════════════════════════════════════════════════════════════ */
.appnav { display: flex; align-items: center; gap: 4px; }
.nav-link.active { color: var(--gold-light); border-color: var(--gold-hair); background: var(--gold-dim); }
@media (max-width: 1040px) { .appnav .nav-link span, .appnav { } }
@media (max-width: 920px) {
  .appnav .nav-link { padding: 8px 10px; }
  .appnav .nav-link { font-size: 0; gap: 0; }
  .appnav .nav-link svg { width: 17px; height: 17px; }
}

/* link "voltar" no topo da página */
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0; color: var(--text-3); cursor: pointer;
  font-family: var(--font-body); font-size: 12.5px; letter-spacing: .02em;
  padding: 0; margin-bottom: 18px; transition: var(--t);
}
.back-link:hover { color: var(--gold-light); }
.back-link svg { width: 15px; height: 15px; }

/* ════════════════════════════════════════════════════════════
   ASSINATURA
   ════════════════════════════════════════════════════════════ */
.billing-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--gap);
  align-items: start;
}
@media (max-width: 980px) { .billing-grid { grid-template-columns: 1fr; } }

.plan-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.plan-name-lg {
  font-family: var(--font-display); font-weight: 600; font-size: calc(28px * var(--type-scale));
  letter-spacing: -.02em; color: var(--text); margin-top: 8px; line-height: 1.05;
}

.status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; border: 1px solid;
  flex: none;
}
.status-badge.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 36%, transparent); background: var(--good-dim); }
.status-badge .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status-badge.sm { padding: 4px 9px; font-size: 10px; letter-spacing: .06em; }
.status-badge.sm svg { width: 0; }

.price-row { display: flex; align-items: baseline; gap: 6px; margin: 22px 0 8px; }
.price { font-family: var(--font-display); font-weight: 600; font-size: calc(34px * var(--type-scale)); letter-spacing: -.02em; color: var(--text); }
.per { font-size: 14px; color: var(--text-3); }

/* medidor de uso */
.meter { margin: 24px 0; }
.meter-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.meter-lab { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--text-2); }
.meter-val { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--gold-light); }
.meter-val i { font-style: normal; color: var(--text-3); font-size: 14px; }
.meter-bar { height: 9px; border-radius: 999px; background: var(--input-2); overflow: hidden; border: 1px solid var(--line-soft); }
.meter-bar span { display: block; height: 100%; min-width: 8px; border-radius: 999px; background: var(--gold-grad); box-shadow: 0 0 14px -2px var(--gold-glow); transition: width .8s var(--ease); }
.meter-foot { margin-top: 9px; font-size: 11.5px; color: var(--text-3); letter-spacing: .02em; }

/* lista chave-valor */
.kv { border-top: 1px solid var(--line-soft); margin-top: 4px; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.kv-row span { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.kv-row span svg { width: 15px; height: 15px; color: var(--text-3); }
.kv-row b { font-size: 13.5px; color: var(--text); font-weight: 600; }

.billing-actions { display: flex; flex-direction: column; gap: 11px; margin-top: 24px; }

/* swatches de cor */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 38px; height: 38px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--sw); border: 1px solid var(--line-strong); position: relative; transition: var(--t);
}
.swatch:hover { transform: translateY(-1px); }
.swatch.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }

/* preview do PDF */
.pdf-preview { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px; }
.pdf-head { display: flex; align-items: center; gap: 13px; padding-bottom: 13px; border-bottom: 2px solid var(--gold); position: relative; }
.pdf-logo {
  width: 46px; height: 46px; flex: none; border-radius: 8px; border: 1.5px solid var(--gold);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700;
  font-size: 12px; letter-spacing: .04em; color: var(--gold);
}
.pdf-titles { line-height: 1.3; }
.pdf-titles b { display: block; font-family: var(--font-display); font-size: 14px; color: var(--text); font-weight: 600; }
.pdf-titles span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.pdf-accent { position: absolute; right: 0; top: 4px; width: 26px; height: 6px; border-radius: 999px; }
.pdf-lines { display: grid; gap: 9px; margin-top: 16px; }
.pdf-lines span { height: 7px; border-radius: 999px; background: var(--input-2); }

/* ════════════════════════════════════════════════════════════
   GERENCIAR ASSINATURA
   ════════════════════════════════════════════════════════════ */
.manage-sec { max-width: 1060px; margin: 0 auto 38px; }
.sec-title {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 18px;
}
.sec-title svg { width: 16px; height: 16px; }
.sec-actions { margin-top: 20px; display: flex; justify-content: flex-end; }
.btn.compact { width: auto; padding: 12px 24px; }

/* planos */
.plans-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .plans-row { grid-template-columns: 1fr; } }
.plan-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 26px 24px; cursor: pointer; transition: var(--t);
  display: flex; flex-direction: column;
}
.plan-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.plan-card.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-hair), var(--shadow); }
.plan-card.feat { background: linear-gradient(180deg, var(--gold-dim), transparent 130px), var(--surface); }
.plan-ribbon {
  position: absolute; top: -10px; left: 24px; white-space: nowrap;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  color: #1a1306; background: var(--gold-grad); padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 6px 16px -8px var(--gold-glow);
}
.plan-card.feat { padding-top: 32px; }
.plan-current { position: absolute; top: 22px; right: 22px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.plan-card .plan-name { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); font-weight: 700; }
.plan-card .plan-price { font-family: var(--font-display); font-weight: 600; font-size: 32px; letter-spacing: -.02em; color: var(--text); margin: 14px 0 2px; }
.plan-card .plan-price small { font-size: 13px; color: var(--text-3); font-weight: 400; margin-left: 3px; }
.plan-sims { font-size: 12.5px; color: var(--text-2); padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.plan-feats { list-style: none; display: grid; gap: 11px; margin-bottom: 22px; flex: 1; }
.plan-feats li { display: flex; gap: 10px; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.plan-feats li svg { width: 15px; height: 15px; color: var(--gold); flex: none; margin-top: 2px; }
.plan-pick {
  text-align: center; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  font-size: 13px; font-weight: 600; color: var(--text-2); transition: var(--t);
}
.plan-card:hover .plan-pick { border-color: var(--gold-hair); color: var(--text); }
.plan-pick.on { background: var(--gold-grad); border-color: var(--gold); color: #1a1306; }

/* forma de pagamento */
.pay-row { display: grid; grid-template-columns: 340px 1fr; gap: 26px; align-items: center; }
@media (max-width: 720px) { .pay-row { grid-template-columns: 1fr; } }
.paycard {
  position: relative; border-radius: var(--r); padding: 22px 24px; overflow: hidden;
  background: linear-gradient(135deg, #1c1812, #110f0d);
  border: 1px solid var(--gold-hair);
  box-shadow: var(--shadow);
}
.paycard::before { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--gold-dim), transparent 70%); }
.pc-top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.pc-brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .04em; color: var(--gold-light); }
.pc-top svg { width: 26px; height: 26px; color: var(--gold); opacity: .8; }
.pc-num { font-family: ui-monospace, "SF Mono", monospace; font-size: 18px; letter-spacing: .06em; color: var(--text); margin: 28px 0; position: relative; }
.pc-bot { display: flex; justify-content: space-between; gap: 16px; position: relative; }
.pc-lab { display: block; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-4); margin-bottom: 4px; }
.pc-bot b { font-size: 13px; color: var(--text-2); font-weight: 600; }
.pay-actions { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.pay-actions .btn { width: auto; }

/* faturas */
.invoices { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.inv-head, .inv-row {
  display: grid; grid-template-columns: 1.1fr 2fr 1fr 1fr 44px; gap: 14px; align-items: center;
  padding: 14px 20px;
}
.inv-head { background: var(--raised); border-bottom: 1px solid var(--line); }
.inv-head span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.inv-row { border-bottom: 1px solid var(--line-soft); transition: var(--t); }
.inv-row:last-child { border-bottom: 0; }
.inv-row:hover { background: var(--raised); }
.inv-date { font-size: 13px; color: var(--text-2); }
.inv-desc { font-size: 13.5px; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.inv-desc i { font-style: normal; font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--text-4); }
.inv-val { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--text); }
.inv-dl { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--text-3); cursor: pointer; transition: var(--t); }
.inv-dl:hover { color: var(--gold); border-color: var(--gold-hair); background: var(--gold-dim); }
.inv-dl svg { width: 16px; height: 16px; }
@media (max-width: 680px) {
  .inv-head { display: none; }
  .inv-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .inv-date { order: 2; }
  .inv-desc { order: 1; grid-column: 1 / -1; }
  .inv-val { order: 3; text-align: right; }
  .inv-row > span:nth-child(4) { order: 4; }
  .inv-dl { order: 5; }
}

/* btn danger + zona de risco */
.btn-danger { width: auto; padding: 12px 22px; font-size: 13.5px; color: var(--bad); background: var(--bad-dim); border-color: color-mix(in srgb, var(--bad) 38%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 18%, transparent); border-color: var(--bad); }
.danger {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 22px 24px; border-radius: var(--r);
  border: 1px solid color-mix(in srgb, var(--bad) 24%, var(--line));
  background: var(--surface);
}
.danger-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 6px; }
.danger-title svg { width: 17px; height: 17px; color: var(--bad); }
.danger p { font-size: 12.5px; color: var(--text-3); line-height: 1.5; max-width: 52ch; }
@media (max-width: 600px) { .danger { flex-direction: column; align-items: flex-start; } .btn-danger { width: 100%; } }

/* ════════════════════════════════════════════════════════════
   ESTILO DA CLÍNICA (casos de referência)
   ════════════════════════════════════════════════════════════ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 460px) { .two-col { grid-template-columns: 1fr; } }

/* força da calibração */
.calib { margin-bottom: 22px; }
.calib-list { display: grid; gap: 4px; }
.calib-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.calib-row:last-of-type { border-bottom: 0; }
.calib-name { font-size: 13px; color: var(--text); }
.calib-dots { display: flex; gap: 4px; }
.cd { width: 8px; height: 8px; border-radius: 50%; background: var(--input-2); border: 1px solid var(--line-strong); }
.cd.on { background: var(--gold-grad); border-color: var(--gold); box-shadow: 0 0 8px -1px var(--gold-glow); }
.calib-tag { font-size: 11px; color: var(--text-3); min-width: 56px; text-align: right; }
.calib-tag.strong { color: var(--good); font-weight: 600; }
.calib-hint { font-size: 11.5px; color: var(--text-4); line-height: 1.5; margin-top: 12px; }
.calib-empty { font-size: 13px; color: var(--text-3); }

/* lista de casos */
.ref-list-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ref-count { font-family: var(--font-display); font-size: 12px; color: var(--gold); background: var(--gold-dim); border: 1px solid var(--gold-hair); padding: 2px 10px; border-radius: 999px; }
.ref-galeria { display: grid; grid-template-columns: 1fr; gap: 14px; }
.refcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: var(--t); box-shadow: var(--shadow-sm); }
.refcard:hover { border-color: var(--gold-hair); }
.refcard-imgs { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.refcard-imgs .photo-fill { aspect-ratio: 16/10; border-radius: 0; }
.refcard-imgs .ba-tag {
  position: absolute; top: 9px; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2); background: rgba(10,9,8,.62); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 999px; font-weight: 600; z-index: 3; backdrop-filter: blur(4px);
}
.refcard-imgs .ba-tag.a { left: 9px; }
.refcard-imgs .ba-tag.b { right: 9px; }
.refcard-imgs .mid {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10,9,8,.7); border: 1px solid var(--gold-hair); color: var(--gold-light); z-index: 3; backdrop-filter: blur(4px);
}
.refcard-imgs .mid svg { width: 13px; height: 13px; }
.refcard-meta { padding: 15px 16px; }
.refcard-meta .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.refcard-meta .matcor { font-size: 12.5px; color: var(--text-2); }
.refcard-meta .matcor b { color: var(--text); font-weight: 600; }
.ref-status { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid; flex: none; }
.ref-status svg { width: 12px; height: 12px; }
.ref-status.done { color: var(--good); border-color: color-mix(in srgb, var(--good) 36%, transparent); background: var(--good-dim); }
.ref-status.pending { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 36%, transparent); background: var(--ok-dim); }
.refcard-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.refcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line-soft); }
.ref-date { font-size: 11.5px; color: var(--text-3); }
.ref-del {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-sm);
  background: transparent; border: 1px solid var(--line); color: var(--text-3); cursor: pointer;
  font-size: 12px; font-family: var(--font-body); transition: var(--t);
}
.ref-del:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-dim); }
.ref-del svg { width: 13px; height: 13px; }
.ref-empty { display: grid; place-items: center; gap: 14px; text-align: center; padding: 50px 30px; border: 1px dashed var(--line-strong); border-radius: var(--r); }
.ref-empty .ring { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-3); background: var(--raised); }
.ref-empty .ring svg { width: 24px; height: 24px; }
.ref-empty p { font-size: 13px; color: var(--text-3); max-width: 28ch; }
