:root {
  --bg: #0b0b0f;
  --surface: #15151c;
  --surface-2: #1e1e27;
  --surface-3: #2a2a35;
  --line: rgba(255, 255, 255, 0.07);
  --text: #f4f4f6;
  --muted: #8d8d9a;
  --faint: #5d5d6a;
  --accent: #b8f35a;
  --accent-ink: #0f1405;
  --danger: #ff5d5d;
  --protein: #ff8a65;
  --carbs: #ffd166;
  --fat: #6ec1ff;
  --radius: 22px;
  --radius-sm: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { min-height: 100dvh; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
svg.ic { width: 22px; height: 22px; flex: none; }

/* ---------- Estrutura principal ---------- */
#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(var(--safe-t) + 12px) 16px calc(var(--safe-b) + 120px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 18px;
}
.brand { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.brand span { color: var(--accent); }
.topbar .date { color: var(--muted); font-size: 14px; margin-top: 2px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--text);
}
.icon-btn:active { transform: scale(0.94); }

h2.section {
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin: 26px 4px 10px;
}

/* ---------- Cartão das calorias ---------- */
.hero {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
}
.hero .label { color: var(--muted); font-size: 14px; }
.hero .big {
  font-size: 64px; font-weight: 800; letter-spacing: -0.045em; line-height: 1;
  margin: 8px 0 4px;
}
.hero .big small { font-size: 18px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.hero .sub { color: var(--muted); font-size: 15px; }
.hero .sub b { color: var(--text); font-weight: 600; }
.hero.over .sub b { color: var(--danger); }

.bar {
  height: 14px; border-radius: 99px; background: var(--surface-3);
  overflow: hidden; margin-top: 18px;
}
.bar > i {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: var(--accent);
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero.over .bar > i { background: var(--danger); }

.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.macro { background: var(--surface); border-radius: var(--radius-sm); padding: 14px 12px 12px; }
.macro .name { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.macro .name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.macro .val { font-size: 19px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; }
.macro .val small { font-size: 13px; color: var(--muted); font-weight: 500; }
.macro .bar { height: 6px; margin-top: 10px; }
.macro .bar > i { background: var(--c); }

/* ---------- Refeições ---------- */
.meal-group { margin-top: 6px; }
.meal-group h3 {
  font-size: 15px; font-weight: 600; margin: 18px 4px 8px;
  display: flex; justify-content: space-between; color: var(--text);
}
.meal-group h3 span { color: var(--muted); font-weight: 500; }
.meal {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 10px 14px 10px 10px; margin-bottom: 8px;
}
.meal:active { background: var(--surface-2); }
.thumb {
  width: 64px; height: 64px; border-radius: 12px; flex: none;
  background: var(--surface-3) center / cover no-repeat;
  display: grid; place-items: center; color: var(--muted);
}
.meal .info { flex: 1; min-width: 0; }
.meal .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meal .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.meal .kcal { font-weight: 700; font-size: 17px; text-align: right; white-space: nowrap; }
.meal .kcal small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }

.empty {
  text-align: center; padding: 36px 24px; color: var(--muted);
  border: 1.5px dashed var(--surface-3); border-radius: var(--radius);
  margin-top: 8px;
}
.empty .emoji { font-size: 40px; margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }

/* ---------- Barra inferior com o botão de câmera ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 0 16px calc(var(--safe-b) + 12px);
  pointer-events: none;
}
.dock-inner {
  max-width: 520px; margin: 0 auto; height: 76px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: rgba(21, 21, 28, 0.88);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 26px;
  pointer-events: auto;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 600; color: var(--faint); height: 100%; justify-content: center;
}
.tab.active { color: var(--text); }
.fab {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  margin-top: -34px;
  box-shadow: 0 10px 30px rgba(184, 243, 90, 0.28), 0 0 0 6px var(--bg);
  transition: transform 0.15s;
}
.fab svg { width: 36px; height: 36px; }
.fab:active { transform: scale(0.93); }

/* ---------- Histórico ---------- */
.streak {
  background: var(--surface); border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
}
.streak .big { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.streak .txt { color: var(--muted); font-size: 14px; }
.dots { display: flex; gap: 6px; margin-top: 8px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.dots i.ok { background: var(--accent); }
.dots i.over { background: var(--danger); }

.day {
  width: 100%; text-align: left; display: block;
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 8px;
}
.day:active { background: var(--surface-2); }
.day .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.day .when { font-weight: 600; }
.day .total { color: var(--muted); font-size: 14px; margin-top: 2px; }
.day .total b { color: var(--text); }
.day .bar { height: 6px; margin-top: 12px; }
.day.over .bar > i { background: var(--danger); }
.badge {
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; white-space: nowrap;
  background: rgba(184, 243, 90, 0.13); color: var(--accent);
}
.badge.over { background: rgba(255, 93, 93, 0.14); color: var(--danger); }

/* ---------- Camadas (telas por cima) ---------- */
.layer {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateY(24px); opacity: 0;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s;
}
.layer.open { transform: none; opacity: 1; }
.layer-inner { max-width: 520px; margin: 0 auto; min-height: 100%; position: relative; }

.sheet-layer {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0); transition: background 0.25s;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-layer.open { background: rgba(0, 0, 0, 0.6); }
.sheet {
  width: 100%; max-width: 520px;
  background: var(--surface); border-radius: 28px 28px 0 0;
  padding: 10px 16px calc(var(--safe-b) + 18px);
  transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet-layer.open .sheet { transform: none; }
.grabber { width: 40px; height: 5px; border-radius: 99px; background: var(--surface-3); margin: 0 auto 16px; }
.sheet h3 { margin: 0 4px 14px; font-size: 18px; }
.sheet .opt {
  width: 100%; display: flex; align-items: center; gap: 14px;
  background: var(--surface-2); border-radius: 18px; padding: 16px; margin-bottom: 10px;
  text-align: left; font-weight: 600; font-size: 17px;
}
.sheet .opt small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.sheet .opt .ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-3);
}
.sheet .opt.primary .ico { background: var(--accent); color: var(--accent-ink); }
.sheet .opt:active { background: var(--surface-3); }

/* ---------- Topo das telas por cima ---------- */
.layer-head {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 10px) 16px 10px;
}
.layer-head.float { position: absolute; left: 0; right: 0; }
.layer-head h1 { font-size: 17px; margin: 0; font-weight: 700; }
.glass { background: rgba(11, 11, 15, 0.55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* ---------- Foto protagonista ---------- */
.photo-hero {
  position: relative; height: 46vh; min-height: 280px; max-height: 460px;
  background: var(--surface) center / cover no-repeat;
}
.photo-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,15,0.35) 0%, rgba(11,11,15,0) 30%, rgba(11,11,15,0) 60%, var(--bg) 100%);
}
.text-hero {
  padding: calc(var(--safe-t) + 70px) 20px 10px;
}
.text-hero blockquote {
  margin: 0; padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); font-size: 18px; line-height: 1.45;
}

/* ---------- Analisando ---------- */
.analyzing { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.analyzing .stage {
  position: relative; flex: 1; overflow: hidden;
  background: var(--surface) center / cover no-repeat;
}
.analyzing .stage::before {
  content: ""; position: absolute; inset: 0; background: rgba(11, 11, 15, 0.35);
}
.scanline {
  position: absolute; left: 0; right: 0; height: 120px;
  background: linear-gradient(180deg, rgba(184,243,90,0) 0%, rgba(184,243,90,0.25) 85%, rgba(184,243,90,0.9) 100%);
  animation: scan 2.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes scan { 0% { top: -120px; } 100% { top: 100%; } }
.corners { position: absolute; inset: 18%; }
.corners i { position: absolute; width: 34px; height: 34px; border: 3px solid var(--accent); }
.corners i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.corners i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.corners i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.corners i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.corners { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(0.96); opacity: 0.7; } }

.analyzing .panel { padding: 26px 24px calc(var(--safe-b) + 30px); text-align: center; }
.analyzing .panel h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.analyzing .step { color: var(--muted); min-height: 22px; transition: opacity 0.3s; }
.pulse-dots { display: inline-flex; gap: 6px; margin-top: 18px; }
.pulse-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pd 1.2s infinite; }
.pulse-dots i:nth-child(2) { animation-delay: 0.15s; }
.pulse-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pd { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 1; transform: none; } }

.analyzing.text-mode .stage { background: none; display: grid; place-items: center; padding: 24px; }
.analyzing.text-mode .stage::before { display: none; }
.analyzing.text-mode blockquote {
  position: relative; overflow: hidden;
  margin: 0; padding: 22px; border-radius: var(--radius); background: var(--surface);
  font-size: 19px; line-height: 1.45; max-width: 440px;
}
.analyzing.text-mode blockquote::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(184,243,90,0.14) 50%, transparent 70%);
  background-size: 250% 100%; animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }

.error-card { text-align: center; }
.error-card .emoji { font-size: 44px; }
.error-card p { color: var(--muted); margin: 6px 0 22px; }

/* ---------- Revisão ---------- */
.review-body { padding: 0 16px calc(var(--safe-b) + 130px); margin-top: -70px; position: relative; z-index: 2; }
.review-body .name-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.review-body h2:not(.section) { font-size: 26px; margin: 0; letter-spacing: -0.025em; line-height: 1.15; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 9px 14px; border-radius: 99px; font-size: 14px; font-weight: 600;
  background: var(--surface); color: var(--muted);
}
.chip.on { background: var(--text); color: var(--bg); }

.total-card {
  margin-top: 16px; background: var(--surface); border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.total-card .k { font-size: 40px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.total-card .k small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.mini-macros { display: grid; gap: 4px; font-size: 14px; }
.mini-macros div { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.mini-macros div::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.mini-macros span { color: var(--muted); }

.item {
  background: var(--surface); border-radius: var(--radius-sm); padding: 14px 14px 12px 16px; margin-bottom: 8px;
  transition: opacity 0.2s, transform 0.2s;
}
.item.removing { opacity: 0; transform: translateX(30px); }
.item .top { display: flex; align-items: flex-start; gap: 10px; }
.item .nm { flex: 1; font-weight: 600; font-size: 16px; }
.item .kc { font-weight: 700; white-space: nowrap; }
.item .del { width: 32px; height: 32px; margin: -6px -6px 0 0; border-radius: 50%; display: grid; place-items: center; color: var(--faint); }
.item .del:active { color: var(--danger); background: var(--surface-2); }
.item .del svg { width: 18px; height: 18px; }
.item .bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.item .mc { font-size: 13px; color: var(--muted); }
.item .mc b { font-weight: 600; }
.stepper { display: flex; align-items: center; background: var(--surface-2); border-radius: 99px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.stepper button:active { background: var(--surface-3); }
.stepper button svg { width: 16px; height: 16px; }
.stepper .q { display: flex; align-items: baseline; justify-content: center; gap: 4px; min-width: 92px; padding: 0 2px; }
.stepper .q-input {
  width: 46px; background: none; border: 0; outline: 0; text-align: right;
  font-weight: 700; font-size: 16px; padding: 0;
}
.stepper .q-input:focus { color: var(--accent); }
.stepper .u { font-size: 13px; color: var(--muted); white-space: nowrap; }
.review-body.no-photo { margin-top: 16px; }

.note { font-size: 14px; color: var(--muted); background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 8px; }
.disclaimer { font-size: 12px; color: var(--faint); text-align: center; margin: 18px 12px 0; line-height: 1.5; }

.bottom-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 16px 16px calc(var(--safe-b) + 14px);
  background: linear-gradient(180deg, rgba(11,11,15,0) 0%, var(--bg) 35%);
}
.bottom-cta .inner { max-width: 488px; margin: 0 auto; }

.btn {
  width: 100%; height: 58px; border-radius: 18px; font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: var(--accent-ink);
  transition: transform 0.12s, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.danger { background: rgba(255, 93, 93, 0.12); color: var(--danger); }
.btn + .btn { margin-top: 10px; }

/* ---------- Formulários ---------- */
.form-wrap { padding: 8px 20px calc(var(--safe-b) + 120px); }
.form-wrap.standalone { padding-top: calc(var(--safe-t) + 28px); }
.welcome h1 { font-size: 34px; letter-spacing: -0.035em; margin: 6px 0 6px; line-height: 1.1; }
.welcome h1 span { color: var(--accent); }
.welcome p { color: var(--muted); margin: 0 0 8px; }
.field { margin-top: 22px; }
.field > label, .field > .lbl { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 8px 2px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--surface); padding: 5px; border-radius: 16px; }
.seg button { height: 44px; border-radius: 12px; font-weight: 600; color: var(--muted); font-size: 15px; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.input {
  display: flex; align-items: center; background: var(--surface); border-radius: 16px; padding: 0 14px;
  height: 56px; border: 1.5px solid transparent;
}
.input:focus-within { border-color: var(--surface-3); }
.input input {
  width: 100%; min-width: 0; background: none; border: 0; outline: 0; font-size: 20px; font-weight: 700;
}
.input span { color: var(--muted); font-size: 14px; margin-left: 4px; }
.row3 .lbl-sm { font-size: 13px; color: var(--muted); margin: 0 0 6px 2px; display: block; white-space: nowrap; }
.row3 .lbl-sm small { color: var(--faint); }
.input.center { padding: 0 8px; }
.input.center input { text-align: center; font-size: 22px; }
.choice {
  width: 100%; text-align: left; background: var(--surface); border-radius: 16px; padding: 14px 16px; margin-bottom: 8px;
  border: 1.5px solid transparent; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.choice b { display: block; font-weight: 600; }
.choice small { color: var(--muted); font-size: 13px; }
.choice .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface-3); flex: none; }
.choice.on { border-color: var(--accent); }
.choice.on .radio { border: 7px solid var(--accent); }
.form-error { color: var(--danger); font-size: 14px; margin-top: 14px; min-height: 20px; }

.target-hero { text-align: center; padding: 10px 0 4px; }
.target-hero .big { font-size: 64px; font-weight: 800; letter-spacing: -0.045em; line-height: 1; margin-top: 8px; }
.target-hero .big small { font-size: 18px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.targets-edit { display: grid; gap: 10px; margin-top: 18px; }
.targets-edit .input .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 10px; flex: none; }
.targets-edit .input .t { color: var(--muted); font-size: 15px; font-weight: 500; flex: 1; }
.targets-edit .input input { text-align: right; width: 90px; flex: none; }
.link-btn { color: var(--accent); font-weight: 600; font-size: 15px; padding: 8px 0; }

textarea.big-text {
  width: 100%; min-height: 150px; resize: none; border: 1.5px solid transparent; outline: 0;
  background: var(--surface); border-radius: var(--radius); padding: 18px; font-size: 18px; line-height: 1.45;
}
textarea.big-text:focus { border-color: var(--surface-3); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.examples button { font-size: 14px; padding: 9px 13px; border-radius: 99px; background: var(--surface); color: var(--muted); }

/* ---------- Detalhe ---------- */
.detail-body { padding: 0 16px calc(var(--safe-b) + 40px); margin-top: -60px; position: relative; z-index: 2; }
.detail-body.no-photo { margin-top: 0; }
.detail-body .kicker { color: var(--muted); font-size: 14px; }
.detail-item { display: flex; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.detail-item:last-child { border-bottom: 0; }
.detail-item .q { color: var(--muted); font-size: 14px; }
.list-card { background: var(--surface); border-radius: var(--radius); padding: 2px 14px; margin-top: 12px; }

/* ---------- Aviso rápido ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 110px); z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px;
  padding: 12px 18px; border-radius: 99px; transition: all 0.25s; white-space: nowrap;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

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

/* ---------- Portaria: entrar e código ---------- */
.auth { max-width: 440px; margin: 0 auto; }
.auth-title { font-size: 32px; letter-spacing: -0.03em; margin: 28px 0 8px; line-height: 1.1; }
.auth .muted b { color: var(--text); word-break: break-all; }
.auth-form { margin-top: 18px; }
.auth-form .field { margin-top: 0; }
.auth-form .input input { font-size: 18px; font-weight: 600; }
.auth-form .input:has(input[aria-invalid="true"]) { border-color: var(--danger); }
.auth-form .btn { margin-top: 14px; }
.field-error { color: var(--danger); font-size: 14px; margin: 8px 2px 0; min-height: 0; }
.field-error:empty { display: none; }
.hint { color: var(--muted); font-size: 14px; text-align: center; margin: 12px 0 0; min-height: 20px; }
.small { font-size: 14px; }
.auth > .small { margin-top: 18px; }
.notice {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; line-height: 1.45;
  background: var(--surface); border: 1px solid var(--line);
}
.notice.erro { background: rgba(255, 93, 93, 0.1); border-color: rgba(255, 93, 93, 0.35); color: #ffb3b3; }
.notice.ok { background: rgba(184, 243, 90, 0.08); border-color: rgba(184, 243, 90, 0.3); color: var(--accent); }
.notice a { color: inherit; font-weight: 700; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-box {
  width: 100%; min-width: 0; height: 64px; border-radius: 14px; text-align: center;
  font-size: 28px; font-weight: 800; background: var(--surface); border: 1.5px solid transparent; outline: 0;
  caret-color: var(--accent);
}
.otp-box:focus { border-color: var(--accent); }
.account {
  background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px;
  display: grid; gap: 6px; word-break: break-all;
}

/* ---------- Assinatura ---------- */
.benefits { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.benefits li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; }
.benefits li span { font-size: 20px; line-height: 1.2; }
.price-card { margin-top: 18px; text-align: center; background: var(--surface); border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 18px; }
.price-card .price { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.price-card .price small { font-size: 16px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
/* O aviso de cobrança: mesmo tamanho do texto normal, sempre antes do botão. */
.terms { font-size: 16px; line-height: 1.5; color: var(--text); margin: 18px 2px 0; }
.plans .btn { margin-top: 14px; }
.center { text-align: center; }
.small.center { margin-top: 14px; }
.center-link { text-align: center; margin-top: 8px; }
.muted-link { color: var(--muted); }
.spinner {
  width: 46px; height: 46px; margin: 40px auto 0; border-radius: 50%;
  border: 4px solid var(--surface-3); border-top-color: var(--accent); animation: spin 0.9s linear infinite;
}
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
[data-actions] .btn { margin-top: 12px; }
[data-sub] .btn { margin-bottom: 4px; }
[data-sub] .account a { justify-self: start; }

/* ---------- Mudança de endereço ---------- */
.move-progress { margin-top: 20px; }
.move-progress .bar { margin-top: 0; }
.move-progress .bar > i { transition: width 0.3s ease; }
.steps { margin: 18px 0 20px; padding-left: 22px; display: grid; gap: 10px; line-height: 1.5; }
.steps li::marker { color: var(--accent); font-weight: 700; }
