:root {
  /* Mesma identidade da página de vendas (landing.css) */
  --bg: #EEF1F4;
  --surface: #FFFFFF;
  --ink: #14202B;
  --muted: #5B6B7A;
  --line: #D5DDE5;
  --brand: #0F6B5C;
  --brand-dark: #14202B;
  --brand-soft: #E2F0EC;
  --accent: #FFD23F;
  --accent-soft: #FFF4C7;
  --ok: #0F7A4A;
  --ok-soft: #DFF3E8;
  --warn: #8A5A00;
  --warn-soft: #FFF1C9;
  --bad: #C0362C;
  --bad-soft: #FBE6E4;
  --radius: 16px;
  --shadow: none;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; font-family: var(--display); }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.shell { max-width: 520px; margin: 0 auto; min-height: 100vh; padding: 0 16px 104px; }

a:focus-visible, button:focus-visible, .input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Header */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 14px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--bg) 75%, transparent);
}
.logo { display: flex; align-items: center; gap: 10px; font: 800 22px var(--display); letter-spacing: -.03em; text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: var(--ink); font-size: 14px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--ink); white-space: nowrap;
}

.topbar .chip { background: var(--ink); color: var(--accent); font-size: 13px; padding: 6px 12px; }

/* Cards */
.stack { display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 2px 2px; }
.section-title a { font-size: 13px; font-weight: 600; text-decoration: none; }

.balance {
  background: var(--ink); color: #fff; border: 0; padding: 22px;
}
.balance .label { opacity: .8; font-size: 13px; font-weight: 500; }
.balance .amount { font: 800 44px/1.1 var(--display); letter-spacing: -.04em; margin: 4px 0 16px; color: var(--accent); }
.balance-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.balance-row div { background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 10px 12px; }
.balance-row b { display: block; font-size: 16px; }
.balance-row span { font-size: 12px; opacity: .8; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font: 800 20px var(--display); }
.stat span { font-size: 12px; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 800; cursor: pointer;
  background: var(--ink); color: #fff; text-decoration: none; transition: transform .1s, box-shadow .1s;
}
.btn:active { transform: scale(.98); }
.btn:disabled, .btn.accent:disabled { background: var(--line); color: var(--muted); box-shadow: none; transform: none; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.accent { background: var(--accent); color: var(--ink); box-shadow: 0 0 0 2px var(--ink), 4px 4px 0 0 var(--ink); margin: 0 4px 4px 0; }
.btn.accent:active { transform: translate(3px, 3px); box-shadow: 0 0 0 2px var(--ink), 1px 1px 0 0 var(--ink); }
.btn.accent.block { width: calc(100% - 4px); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Tasks */
.task-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--line); border: 6px solid var(--line); border-radius: 14px; }
.task {
  display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px;
  background: var(--surface); cursor: pointer; font-weight: 700;
  text-decoration: none; color: var(--ink); transition: background .15s;
}
.task:hover { background: var(--accent-soft); }
.task:active { background: var(--accent); }
.task .emoji { font-size: 26px; }
.task small { color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filters button { border: 1px solid var(--line); background: var(--surface); padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.filters button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Lists */
.list { display: grid; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); font-size: 20px; flex: none; }
.item .main { flex: 1; min-width: 0; }
.item .main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .end { text-align: right; flex: none; }

.status { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; display: inline-block; }
.status.analise, .status.processando { background: var(--warn-soft); color: var(--warn); }
.status.aprovado, .status.pago { background: var(--ok-soft); color: var(--ok); }
.status.reprovado { background: var(--bad-soft); color: var(--bad); }

.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty .emoji { font-size: 34px; display: block; margin-bottom: 6px; }

/* Forms */
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px;
  outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }

.drop {
  display: grid; place-items: center; text-align: center; gap: 6px; padding: 26px 16px;
  border: 2px dashed var(--line); border-radius: 16px; cursor: pointer; background: var(--surface);
}
.drop:hover { border-color: var(--ink); }
.drop input { display: none; }
.preview video { width: 100%; border-radius: 14px; background: #000; max-height: 260px; }
.estimate { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--brand-soft); border-radius: 12px; margin-top: 10px; }
.estimate b { font-size: 18px; color: var(--brand); }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }

ul.rules { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }

.steps { display: grid; gap: 12px; counter-reset: s; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step::before {
  counter-increment: s; content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%;
  border-radius: 8px; background: var(--accent); color: var(--ink); font-weight: 800; display: grid; place-items: center; font-size: 13px;
}

/* Auth */
.hero { padding: 36px 4px 18px; }
.hero h1 { font-size: 32px; margin: 18px 0 8px; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 60%, var(--accent) 60%); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--line); padding: 4px; border-radius: 14px; margin-bottom: 12px; }
.tabs button { border: 0; background: transparent; padding: 10px; border-radius: 10px; font-weight: 700; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.progress { position: relative; height: 34px; border-radius: 10px; background: var(--brand-soft); overflow: hidden; }
.progress[hidden] { display: none; }
.progress div { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brand); opacity: .25; transition: width .2s; }
.progress span { position: relative; display: grid; place-items: center; height: 100%; font-size: 13px; font-weight: 700; color: var(--brand); }

/* Bottom nav */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.nav-inner { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(6, 1fr); }
.nav a {
  display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600;
  color: var(--muted); text-decoration: none; padding: 4px 0;
}
.nav a .i { font-size: 20px; line-height: 1; padding: 3px 8px; filter: grayscale(1); opacity: .7; }
.nav a.on { color: var(--ink); font-weight: 800; }
.nav a.on .i { background: var(--accent); border-radius: 8px; }
.nav a.on .i { filter: none; opacity: 1; }

/* Modal and toast */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--surface); border-radius: var(--radius); padding: 16px; width: 100%; max-width: 520px; display: grid; gap: 12px; }
.modal-box video { width: 100%; border-radius: 12px; background: #000; max-height: 60vh; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); z-index: 40;
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Acesso pago e treinamento */
.paywall { text-align: left; }
.paywall h1 { font-size: 24px; line-height: 1.2; }
.lesson { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.lesson:last-child { border-bottom: 0; }
.lesson:disabled { cursor: default; }
.lesson .ico { font: 800 16px var(--display); background: var(--accent); color: var(--ink); }
.lesson:disabled .ico { background: var(--bg); color: var(--muted); }
.lesson .main b { white-space: normal; }
.lesson-player { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.lesson-player iframe, .lesson-player video { width: 100%; height: 100%; border: 0; max-height: none; }
