/* ───────────── Tokens ───────────── */
:root {
  --accent: #f0b90b;
  --accent-ink: #1a1405;
  --accent-text: color-mix(in srgb, var(--accent) 62%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 38%, transparent);

  --bg: #f5f4f1;
  --bg-2: #eceae4;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --line: #e4e1da;
  --line-strong: #cfcbc1;
  --text: #1d1b17;
  --text-2: #57534a;
  --muted: #858074;

  --ok: #157a3c;
  --ok-bg: #e3f4e8;
  --warn: #9a6100;
  --warn-bg: #fdf1d8;
  --bad: #b42318;
  --bad-bg: #fde7e4;
  --info: #1d5fbf;
  --info-bg: #e5eefc;
  --wa: #1fa855;
  --wa-ink: #ffffff;

  --shadow-sm: 0 1px 2px rgba(20, 16, 8, 0.06);
  --shadow: 0 1px 2px rgba(20, 16, 8, 0.05), 0 8px 24px -12px rgba(20, 16, 8, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(20, 16, 8, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-text: color-mix(in srgb, var(--accent) 78%, #fff);
    --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
    --bg: #121211;
    --bg-2: #1a1918;
    --surface: #1c1b19;
    --surface-2: #232220;
    --line: #2f2d2a;
    --line-strong: #43403b;
    --text: #f2f0eb;
    --text-2: #c7c3ba;
    --muted: #8f8a80;
    --ok: #5fd38a;
    --ok-bg: #16301f;
    --warn: #f3bf5a;
    --warn-bg: #33270f;
    --bad: #ff8a7a;
    --bad-bg: #3a1a16;
    --info: #8cb6ff;
    --info-bg: #182640;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px -18px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}

/* ───────────── Base ───────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.18rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 10px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent-line); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 12px; }

.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.78rem; }
.strong { font-weight: 650; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.row { display: flex; gap: 10px; align-items: center; }
.row-wrap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.stack { display: grid; gap: 14px; align-content: start; }
.stack-sm { display: grid; gap: 8px; align-content: start; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ───────────── Superfícies ───────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.card-flat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.card-accent { border-top: 3px solid var(--accent); }
.card-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 2px 10px; }
.section-title h2 { margin: 0; }

.empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.empty .big { font-size: 2rem; display: block; margin-bottom: 6px; }

/* ───────────── Botões ───────────── */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--btn-line);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.06s ease, filter 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { filter: brightness(0.97); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-line: transparent; box-shadow: 0 6px 16px -8px var(--accent); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { --btn-bg: transparent; --btn-line: var(--line-strong); }
.btn-quiet { --btn-bg: transparent; --btn-line: transparent; color: var(--text-2); }
.btn-quiet:hover { background: var(--surface-2); }
.btn-wa { --btn-bg: var(--wa); --btn-fg: var(--wa-ink); --btn-line: transparent; }
.btn-danger { --btn-bg: var(--bad-bg); --btn-fg: var(--bad); --btn-line: transparent; }
.btn-ok { --btn-bg: var(--ok-bg); --btn-fg: var(--ok); --btn-line: transparent; }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: 0.86rem; border-radius: 8px; }
.btn-lg { min-height: 50px; padding: 12px 20px; font-size: 1.02rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn .ico { font-size: 1.05em; line-height: 1; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* ───────────── Formulários ───────────── */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span, .label { font-weight: 600; font-size: 0.9rem; color: var(--text-2); }
.field small, .hint { color: var(--muted); font-size: 0.82rem; }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-group .prefix { padding: 10px 0 10px 12px; color: var(--muted); white-space: nowrap; align-self: center; font-size: 0.92rem; }
.field .input-group input { border: 0 !important; box-shadow: none !important; padding-left: 2px; }
.form-error {
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  margin: 0;
}
.form-ok { background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 10px 12px; font-weight: 600; margin: 0; }
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-weight: 500;
}
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.switch { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background 0.2s ease; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.2s ease; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent-line); outline-offset: 2px; }

.choices { display: grid; gap: 10px; }
.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice strong { display: block; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
  padding: 0;
  background: var(--sw, #999);
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--text); }
.swatch-custom { position: relative; overflow: hidden; background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); }
.swatch-custom input { position: absolute; inset: -8px; opacity: 0; cursor: pointer; width: 60px; height: 60px; }

.logo-drop {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
}
.logo-drop input[type="file"] { display: none; }

/* ───────────── Chips, badges, avisos ───────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 650;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip-bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.chip-info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.chip-accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}
.badge-accent { background: var(--accent); color: var(--accent-ink); }
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--info-bg);
  color: var(--info);
}
.notice > .ico { font-size: 1.2rem; line-height: 1.3; }
.notice p { margin: 0; color: inherit; }
.notice strong { color: inherit; }
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.notice-bad { background: var(--bad-bg); color: var(--bad); }
.notice-ok { background: var(--ok-bg); color: var(--ok); }
.sev { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; margin-top: 6px; }
.sev-high { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.sev-medium { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-bg); }
.sev-low { background: var(--muted); box-shadow: 0 0 0 4px var(--surface-2); }

/* ───────────── Avatar e logo ───────────── */
.avatar {
  --h: 30;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: none;
  font-weight: 800;
  font-size: 0.86rem;
  color: hsl(var(--h) 55% 28%);
  background: hsl(var(--h) 70% 88%);
  letter-spacing: 0.02em;
}
@media (prefers-color-scheme: dark) {
  .avatar { color: hsl(var(--h) 70% 85%); background: hsl(var(--h) 35% 26%); }
}
.avatar-sm { width: 30px; height: 30px; font-size: 0.72rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 1.05rem;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-logo.has-img { background: var(--surface); border: 1px solid var(--line); }
.brand-logo-lg { width: 72px; height: 72px; border-radius: 18px; font-size: 1.6rem; }

/* ───────────── Progresso ───────────── */
.bar { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; position: relative; }
.bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.bar-ok > span { background: var(--ok); }
.bar-lg { height: 12px; }
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 130px 1fr 64px; gap: 12px; align-items: center; font-size: 0.9rem; }
.funnel-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 650; }

.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--bg-2); }
.ring .value { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.ring .inner { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.05; }
.ring .inner b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.ring .inner span { font-size: 0.72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

/* ───────────── Layout: convidado ───────────── */
.guest {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, var(--accent-soft), transparent 60%),
    var(--bg);
}
.guest-card { width: min(460px, 100%); padding: 26px; box-shadow: var(--shadow-lg); }
.guest-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.guest-brand h1 { margin: 0; font-size: 1.35rem; }
.guest-brand p { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.guest-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.powered { margin-top: 18px; font-size: 0.8rem; color: var(--muted); text-align: center; }
.powered a { color: var(--muted); }

/* ───────────── Layout: app ───────────── */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.side-brand { display: flex; gap: 12px; align-items: center; padding: 4px 6px 8px; text-decoration: none; color: inherit; }
.side-brand strong { display: block; line-height: 1.2; }
.side-brand span { font-size: 0.8rem; color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 4px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  min-height: 42px;
}
.nav a .ico { width: 22px; text-align: center; font-size: 1.05rem; }
.nav a .badge { margin-left: auto; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.side-me { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.me-card { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; padding: 6px; border-radius: 10px; }
.me-card:hover { background: var(--surface-2); }
.me-card strong { display: block; font-size: 0.92rem; }
.me-card span { font-size: 0.78rem; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand-logo { width: 34px; height: 34px; border-radius: 9px; font-size: 0.85rem; }
.topbar strong { font-size: 1rem; }
.topbar a { text-decoration: none; color: inherit; min-width: 0; }
.pts-pill {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 0.86rem;
  text-decoration: none;
}
.view { width: 100%; max-width: 1080px; margin: 0 auto; padding: 26px 26px 100px; display: grid; gap: 18px; }
.page-head { display: flex; gap: 14px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom a {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}
.bottom a .ico { font-size: 1.25rem; line-height: 1.1; }
.bottom a .badge { position: absolute; top: 0; left: calc(50% + 6px); height: 18px; min-width: 18px; font-size: 0.66rem; }
.bottom a[aria-current="page"] { color: var(--accent-text); }

.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--bg-2); border-radius: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  flex: none;
  padding: 8px 14px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--text-2);
  font-weight: 650;
  font-size: 0.9rem;
  border: 0;
  background: none;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.tabs [aria-current="page"], .tabs [aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ───────────── Listas ───────────── */
.list { display: grid; }
.list > li, .list > .item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.list > li:last-child, .list > .item:last-child { border-bottom: 0; }
.item-main { flex: 1 1 auto; min-width: 0; }
.item-main strong { display: block; }
.item-main .sub { color: var(--muted); font-size: 0.85rem; }
.item-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.todo {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.todo .todo-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; background: var(--accent-soft); flex: none; }
.todo .item-main { flex: 1 1 200px; }
.todo .item-actions { margin-left: auto; }
.todo-passive { opacity: 0.75; }
.todo-passive .todo-ico { background: var(--bg-2); }

/* ───────────── Herói de pontos ───────────── */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 22px;
  border-radius: 18px;
  background:
    radial-gradient(500px 220px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 1.45rem; margin-bottom: 4px; }
.hero .level-name { font-size: 1.05rem; font-weight: 800; color: var(--accent-text); }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.mini-stat { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 92px; }
.mini-stat b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.mini-stat span { font-size: 0.74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.flame { display: inline-block; animation: flicker 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.12) rotate(3deg); } }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stat { padding: 14px 16px; }
.stat b { display: block; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 0.84rem; font-weight: 600; }
.stat-link { text-decoration: none; color: inherit; transition: border-color 0.15s ease; }
.stat-link:hover { border-color: var(--accent); }
.stat-bad b { color: var(--bad); }
.stat-warn b { color: var(--warn); }

/* ───────────── Tarefas ───────────── */
.task-card { display: grid; gap: 12px; text-decoration: none; color: inherit; transition: border-color 0.15s ease, transform 0.15s ease; }
a.task-card:hover { border-color: var(--accent); }
.task-card h3 { margin: 0; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 750; display: inline-flex; gap: 6px; align-items: center; }
.countdown.soon { color: var(--warn); }
.countdown.over { color: var(--bad); }
.countdown-big { font-size: 1.5rem; letter-spacing: -0.01em; }
.dots { display: flex; gap: 6px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.dot.on { background: var(--ok); }

.check-step {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.check-step .tick {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex: none;
  font-weight: 900;
  color: transparent;
  transition: all 0.2s ease;
}
.check-step.done { background: var(--ok-bg); border-color: transparent; }
.check-step.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.check-step.alert { border-color: var(--warn); }
.check-step .pts { margin-left: auto; font-weight: 800; color: var(--accent-text); font-size: 0.85rem; white-space: nowrap; }

.ward { display: grid; gap: 12px; }
.ward-head { display: flex; gap: 12px; align-items: center; }
.track-line { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.track-line > div { display: grid; gap: 5px; font-size: 0.74rem; color: var(--muted); font-weight: 650; text-align: center; }
.track-line > div::before { content: ""; height: 6px; border-radius: 999px; background: var(--bg-2); }
.track-line > div.on { color: var(--ok); }
.track-line > div.on::before { background: var(--ok); }
.track-line > div.now { color: var(--accent-text); }
.track-line > div.now::before { background: var(--accent); }

/* ───────────── Ranking ───────────── */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; }
.podium .spot { text-align: center; display: grid; gap: 6px; justify-items: center; padding: 16px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.podium .spot .medal { font-size: 1.9rem; }
.podium .spot strong { font-size: 0.95rem; overflow-wrap: anywhere; }
.podium .spot b { font-size: 1.2rem; color: var(--accent-text); }
.podium .first { padding-top: 26px; border-color: var(--accent); box-shadow: 0 16px 40px -24px var(--accent); }
.rank-row { display: grid; grid-template-columns: 38px 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-row .place { font-weight: 800; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.rank-row .pts { font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-row.me { background: var(--accent-soft); border-radius: 12px; border-bottom-color: transparent; }

/* ───────────── Conquistas ───────────── */
.badges { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.badge-card { text-align: center; padding: 16px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 4px; justify-items: center; }
.badge-card .emblem { font-size: 2.1rem; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); margin-bottom: 4px; }
.badge-card.locked { opacity: 0.6; }
.badge-card.locked .emblem { filter: grayscale(1); background: var(--bg-2); }
.badge-card small { color: var(--muted); font-size: 0.78rem; }
.ladder { display: grid; gap: 8px; }
.ladder li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.ladder li .lvl { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); font-weight: 800; font-size: 0.85rem; flex: none; }
.ladder li.reached .lvl { background: var(--accent); color: var(--accent-ink); }
.ladder li.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ledger li { display: flex; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.ledger li:last-child { border-bottom: 0; }
.ledger .delta { font-weight: 850; font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; color: var(--ok); }
.ledger .delta.neg { color: var(--bad); }
.ledger .delta.bonus { color: var(--accent-text); }

/* ───────────── Árvore / cadeia ───────────── */
.tree { display: grid; gap: 6px; }
.tree details { border-left: 2px solid var(--line); margin-left: 14px; padding-left: 12px; }
.tree summary { list-style: none; cursor: pointer; }
.tree summary::-webkit-details-marker { display: none; }
.node {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  margin: 4px 0;
  min-width: 0;
}
.node .grow strong { display: block; font-size: 0.93rem; }
.node .grow .sub { font-size: 0.78rem; color: var(--muted); }
.node.st-done { border-left: 5px solid var(--ok); }
.node.st-progress { border-left: 5px solid var(--info); }
.node.st-waiting { border-left: 5px solid var(--line-strong); }
.node.st-late { border-left: 5px solid var(--warn); background: color-mix(in srgb, var(--warn-bg) 50%, var(--surface)); }
.node.st-broken { border-left: 5px solid var(--bad); background: color-mix(in srgb, var(--bad-bg) 55%, var(--surface)); }
.node.st-out { opacity: 0.55; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg-done { background: var(--ok); }
.lg-progress { background: var(--info); }
.lg-waiting { background: var(--line-strong); }
.lg-late { background: var(--warn); }
.lg-broken { background: var(--bad); }
.mini-steps { display: inline-flex; gap: 3px; }
.mini-steps i { width: 8px; height: 8px; border-radius: 2px; background: var(--bg-2); display: inline-block; }
.mini-steps i.on { background: var(--ok); }

.cone-viz { display: grid; gap: 10px; justify-items: center; padding: 10px 0; }
.cone-level { display: grid; justify-items: center; gap: 6px; width: 100%; }
.cone-level .bar-wrap { height: 34px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-line); display: grid; place-items: center; font-weight: 800; color: var(--accent-text); min-width: 120px; width: 30%; }

/* ───────────── Toast, modal, confete ───────────── */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto;
  background: var(--text);
  color: var(--bg);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
  animation: toast-in 0.25s ease;
}
.toast.pts { background: var(--accent); color: var(--accent-ink); }
.toast.err { background: var(--bad); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

dialog.modal {
  border: 0;
  padding: 0;
  border-radius: 18px;
  width: min(480px, calc(100% - 24px));
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
dialog.modal::backdrop { background: rgba(10, 8, 4, 0.5); backdrop-filter: blur(3px); }
.modal-body { padding: 22px; display: grid; gap: 12px; }
.modal-body h2 { margin: 0; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.modal-hero { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 8px 0; }
.modal-hero .big { font-size: 3.4rem; line-height: 1; animation: pop 0.6s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(0.2); opacity: 0; } }
.secret {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  user-select: all;
}

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.confetti i {
  position: absolute;
  top: -12px;
  left: var(--x);
  width: 9px;
  height: 14px;
  background: var(--c);
  border-radius: 2px;
  opacity: 0.95;
  animation: fall var(--d) cubic-bezier(.25,.6,.4,1) forwards;
  animation-delay: var(--delay);
}
@keyframes fall {
  to { transform: translate(var(--dx), 105vh) rotate(var(--r)); opacity: 0.9; }
}
.float-pts {
  position: fixed;
  z-index: 150;
  pointer-events: none;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--accent-text);
  text-shadow: 0 2px 10px var(--surface);
  animation: float-up 1.2s ease-out forwards;
}
@keyframes float-up { to { transform: translateY(-60px); opacity: 0; } }

.skeleton { display: grid; gap: 14px; }
.skeleton div { height: 90px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ───────────── Plataforma (página inicial / instalação) ───────────── */
.landing { min-height: 100vh; background: radial-gradient(900px 480px at 85% -10%, rgba(240, 185, 11, 0.18), transparent 60%), radial-gradient(800px 420px at -10% 30%, rgba(255, 107, 53, 0.12), transparent 60%), var(--bg); }
.landing-nav { max-width: 1120px; margin: 0 auto; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.landing-nav .brand { display: flex; gap: 10px; align-items: center; font-weight: 850; font-size: 1.08rem; text-decoration: none; color: inherit; }
.landing-hero { max-width: 1120px; margin: 0 auto; padding: 40px 22px 30px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.landing-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 16px; }
.landing-hero .lead { font-size: 1.12rem; color: var(--text-2); max-width: 560px; }
.landing-hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hl { background: linear-gradient(120deg, #f0b90b, #ff6b35); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cone-art { width: 100%; max-width: 420px; justify-self: center; }
.cone-art .n { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.cone-art .n0 { fill: #f0b90b; stroke: none; }
.cone-art .n1 { fill: #ffb347; stroke: none; }
.cone-art .n2 { fill: #ff8c42; stroke: none; }
.cone-art .ln { stroke: var(--line-strong); stroke-width: 1.5; }
.cone-art .pulse { animation: pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.features { max-width: 1120px; margin: 0 auto; padding: 10px 22px 30px; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.feature { padding: 20px; }
.feature .ico { font-size: 1.6rem; margin-bottom: 8px; display: block; }
.steps-band { max-width: 1120px; margin: 0 auto; padding: 10px 22px 60px; }
.steps-band ol { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); counter-reset: s; }
.steps-band li { counter-increment: s; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.steps-band li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--bg); font-weight: 800; margin-bottom: 8px; font-size: 0.85rem; }
.enter-box { display: flex; gap: 8px; margin-top: 14px; max-width: 480px; }
.landing-foot { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 0 16px 40px; }

.wizard { max-width: 1120px; margin: 0 auto; padding: 10px 22px 60px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; }
.wizard-steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.wizard-steps span { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 650; font-size: 0.86rem; color: var(--muted); }
.wizard-steps span i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); font-style: normal; font-weight: 800; font-size: 0.78rem; }
.wizard-steps span.on { color: var(--text); border-color: var(--accent); }
.wizard-steps span.on i, .wizard-steps span.done i { background: var(--accent); color: var(--accent-ink); }
.preview { position: sticky; top: 20px; display: grid; gap: 12px; }
.preview .phone {
  border-radius: 28px;
  border: 8px solid var(--text);
  background: var(--bg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.preview .phone-top { padding: 12px 14px; display: flex; gap: 10px; align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); }
.preview .phone-body { padding: 14px; display: grid; gap: 10px; }
.wizard-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; }
.levels-preview { display: flex; flex-wrap: wrap; gap: 6px; }

/* ───────────── Responsivo ───────────── */
@media (max-width: 980px) {
  .wizard { grid-template-columns: 1fr; }
  .preview { position: static; }
  .landing-hero { grid-template-columns: 1fr; gap: 10px; }
  .cone-art { max-width: 300px; }
  .features { grid-template-columns: 1fr; }
  .steps-band ol { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { display: flex; }
  .bottom { display: grid; }
  .view { padding: 16px 16px 110px; gap: 14px; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .hero .ring { align-self: center; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .funnel-row { grid-template-columns: 96px 1fr 54px; gap: 8px; }
  .toast-wrap { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

@media (max-width: 520px) {
  body { font-size: 14.5px; }
  h1 { font-size: 1.38rem; }
  .card { padding: 15px; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .podium { gap: 8px; }
  .podium .spot { padding: 12px 6px; }
  .steps-band ol { grid-template-columns: 1fr; }
  .item-actions .btn { flex: 1 1 auto; }
  .list > li.wrap-sm { flex-wrap: wrap; }
  .track-line > div { font-size: 0.66rem; }
  .enter-box { flex-direction: column; }
}

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