/* =============================================================
   Fênix Treinamentos e Serviços — design system
   Preto e branco da marca + laranja-fogo como acento pontual
   ============================================================= */
:root {
  --ink: #0a0a0a;
  --ink-2: #1a1a1a;
  --ink-3: #2a2a2a;
  --paper: #ffffff;
  --paper-2: #f5f5f3;
  --paper-3: #ebebe8;
  --line: #deded9;
  --muted: #6b6b66;
  --fire: #e0461b;
  --fire-2: #ff6a33;
  --ember: #ffb020;
  --ok: #1f8a4c;
  --ok-bg: #e6f4ec;
  --bad: #c62828;
  --bad-bg: #fdecea;
  --warn-bg: #fff4e0;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --head: "Montserrat", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.ic { flex-shrink: 0; vertical-align: middle; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.caps { text-transform: uppercase; letter-spacing: .16em; font-family: var(--head); font-weight: 600; font-size: .78rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.3rem; border: 2px solid var(--ink); background: var(--ink); color: #fff; font-family: var(--head); font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer; border-radius: var(--radius); transition: background .15s, color .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--ink-3); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: transparent; color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }
.btn-fire { background: var(--fire); border-color: var(--fire); }
.btn-fire:hover { background: var(--fire-2); border-color: var(--fire-2); }
.btn-sm { padding: .5rem .85rem; font-size: .72rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }

/* ---------- Formulários ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .35rem; }
.input, select.input, textarea.input { width: 100%; padding: .72rem .85rem; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10,10,10,.08); }
textarea.input { min-height: 110px; resize: vertical; }
.grid-form { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 1rem; }
.c12 { grid-column: span 12; } .c8 { grid-column: span 8; } .c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; } .c2 { grid-column: span 2; }
@media (max-width: 720px) { .c8, .c6, .c4, .c3, .c2 { grid-column: span 12; } }
.help { font-size: .78rem; color: var(--muted); margin-top: .3rem; }

/* ---------- Alertas ---------- */
.alert { padding: .85rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border-left: 4px solid; font-size: .92rem; display: flex; gap: .6rem; align-items: flex-start; }
.alert-success { background: var(--ok-bg); border-color: var(--ok); }
.alert-error { background: var(--bad-bg); border-color: var(--bad); }
.alert-info { background: var(--paper-2); border-color: var(--ink); }
.alert-warn { background: var(--warn-bg); border-color: var(--ember); }

/* =============================================================
   SITE PÚBLICO
   ============================================================= */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10,10,10,.96); backdrop-filter: blur(6px); color: #fff; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; }
.brand img { height: 42px; width: auto; }
.brand span { font-family: var(--head); font-weight: 700; font-size: .82rem; letter-spacing: .14em; line-height: 1.2; text-transform: uppercase; }
.brand small { display: block; font-weight: 500; font-size: .62rem; letter-spacing: .22em; opacity: .65; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { text-decoration: none; font-size: .88rem; opacity: .82; }
.nav a:hover { opacity: 1; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: .4rem; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 74px; left: 0; right: 0; background: var(--ink); flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 20px 1.2rem; display: none; border-top: 1px solid var(--ink-3); }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--ink-3); }
  .nav .btn { margin-top: .8rem; }
}

.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10,10,10,.95) 0%, rgba(10,10,10,.82) 45%, rgba(10,10,10,.45) 100%), url("../img/hero.jpg") center/cover no-repeat; }
.hero-cut { position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; background: var(--paper); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.hero .container { position: relative; padding-top: 110px; padding-bottom: 170px; }
.hero-box { display: inline-block; border: 3px solid #fff; padding: 1.6rem 2rem; margin-bottom: 1.8rem; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.9rem); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 0; line-height: 1.08; }
.hero-lead { font-size: 1.15rem; max-width: 560px; opacity: .88; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-mark { position: absolute; right: 4%; top: 50%; transform: translateY(-58%); height: 380px; opacity: .9; }
@media (max-width: 900px) { .hero-mark { display: none; } .hero .container { padding-top: 70px; padding-bottom: 130px; } .hero-box { padding: 1.1rem 1.2rem; } }

.section { padding: 90px 0; }
.section-dark { background: var(--ink); color: #fff; }
.section-gray { background: var(--paper-2); }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--fire); margin-bottom: .8rem; }
.section-dark .muted { color: #a3a39c; }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 900px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }
.service { background: #fff; padding: 2rem 1.6rem; transition: background .2s; }
.service:hover { background: var(--paper-2); }
.service .ic-box { width: 48px; height: 48px; display: grid; place-items: center; background: var(--ink); color: #fff; margin-bottom: 1.1rem; }
.service h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: .4rem; }
.service p { font-size: .9rem; color: var(--muted); margin: 0; }
.nr-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.nr-strip span { border: 1.5px solid var(--ink); padding: .2rem .55rem; font-family: var(--head); font-weight: 700; font-size: .72rem; letter-spacing: .06em; }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 2.5rem; } }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 52px 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--ink-3); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--head); font-weight: 800; font-size: 1.5rem; color: var(--fire); }
.steps h4 { font-size: 1rem; margin: .15rem 0 .2rem; }
.steps p { margin: 0; font-size: .9rem; color: #a3a39c; }

.mock { background: var(--ink-2); border: 1px solid var(--ink-3); padding: 1.4rem; border-radius: 8px; box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.mock-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.mock-xp { font-family: var(--head); font-weight: 800; font-size: 1.6rem; }
.mock-bar { height: 8px; background: var(--ink-3); border-radius: 99px; overflow: hidden; margin: .4rem 0 1.2rem; }
.mock-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--fire), var(--ember)); }
.mock-mod { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border: 1px solid var(--ink-3); margin-bottom: .5rem; font-size: .88rem; border-radius: 4px; }
.mock-mod .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-3); flex-shrink: 0; }
.mock-mod.done .dot { background: var(--ok); }
.mock-mod.cur { border-color: var(--fire); }
.mock-mod.cur .dot { background: var(--fire); }
.mock-mod.lock { opacity: .45; }

.course-card { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); }
.course-card > div { padding: 2.4rem; }
.course-card .cc-dark { background: var(--ink); color: #fff; }
@media (max-width: 820px) { .course-card { grid-template-columns: 1fr; } .course-card > div { padding: 1.6rem; } }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: .6rem; padding: .35rem 0; font-size: .93rem; }
.checklist .ic { color: var(--fire); margin-top: 3px; }
.stat-row { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1.5rem 0; }
.stat-row b { display: block; font-family: var(--head); font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat-row span { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }

.cta-band { border: 3px solid #fff; padding: 2.4rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.3rem, 2.6vw, 1.9rem); text-transform: uppercase; letter-spacing: .06em; margin: 0; }

.site-footer { background: var(--ink); color: #bdbdb6; padding: 60px 0 30px; font-size: .9rem; border-top: 1px solid var(--ink-3); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.site-footer h4 { color: #fff; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { text-decoration: none; display: block; padding: .2rem 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--ink-3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .8rem; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ink); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side .big-mark { position: absolute; right: -60px; bottom: -40px; height: 440px; opacity: .08; }
.auth-side h2 { font-size: 2rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; max-width: 380px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; background: var(--paper-2); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.6rem; font-weight: 800; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); margin-bottom: 1.6rem; }
.auth-tabs a { text-align: center; padding: .65rem; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.auth-tabs a.on { background: var(--ink); color: #fff; }
@media (max-width: 820px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-main { min-height: 100vh; } }
.auth-logo-m { display: none; margin: 0 auto 1.5rem; height: 70px; }
@media (max-width: 820px) { .auth-logo-m { display: block; } }

/* =============================================================
   PAINÉIS (admin / empresa / aluno)
   ============================================================= */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: var(--paper-2); }
.sidebar { background: var(--ink); color: #d6d6d0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 1.3rem 1.2rem; border-bottom: 1px solid var(--ink-3); }
.sidebar .brand img { height: 36px; }
.side-area { padding: 1rem 1.2rem .4rem; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--fire); font-weight: 700; font-family: var(--head); }
.side-nav { flex: 1; padding: .3rem .6rem; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: .75rem; padding: .68rem .75rem; text-decoration: none; font-size: .9rem; border-radius: var(--radius); margin-bottom: 2px; }
.side-nav a:hover { background: var(--ink-2); color: #fff; }
.side-nav a.on { background: #fff; color: var(--ink); font-weight: 600; }
.side-nav .badge { margin-left: auto; }
.side-user { padding: 1rem 1.2rem; border-top: 1px solid var(--ink-3); font-size: .82rem; }
.side-user b { color: #fff; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user a { display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; text-decoration: none; opacity: .75; }
.side-user a:hover { opacity: 1; }
.main { min-width: 0; }
.topbar { display: none; }
.page { padding: 2rem 2.4rem 3rem; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.page-head .crumb { font-size: .8rem; color: var(--muted); margin-bottom: .3rem; }
.page-head .crumb a { text-decoration: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; padding: .7rem 1rem; position: sticky; top: 0; z-index: 40; }
  .topbar img { height: 32px; }
  .topbar button { background: none; border: 0; color: #fff; cursor: pointer; }
  .page { padding: 1.3rem 16px 2.5rem; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; display: none; }
  .scrim.open { display: block; }
}

.card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1.4rem; margin-bottom: 1.4rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head h2, .card h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1.1rem 1.2rem; }
.kpi .caps { color: var(--muted); font-size: .66rem; }
.kpi b { display: block; font-family: var(--head); font-size: 1.9rem; font-weight: 800; margin-top: .3rem; line-height: 1.1; }
.kpi.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi.dark .caps { color: #a3a39c; }

.table-wrap { overflow-x: auto; margin: 0 -1.4rem; padding: 0 1.4rem; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th { text-align: left; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: .6rem .7rem; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.t td { padding: .75rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:hover td { background: var(--paper-2); }
table.t .actions { text-align: right; white-space: nowrap; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .ic { margin: 0 auto .6rem; opacity: .4; }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 99px; font-size: .72rem; font-weight: 600; white-space: nowrap; background: var(--paper-3); color: var(--ink); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: #9a5b00; }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-dark { background: var(--ink); color: #fff; }
.badge-fire { background: var(--fire); color: #fff; }

.progress { height: 8px; background: var(--paper-3); border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .6s ease; }
.progress.fire i { background: linear-gradient(90deg, var(--fire), var(--ember)); }

.notif { display: flex; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border: 0; }
.notif .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fire); margin-top: .45rem; flex-shrink: 0; }
.notif.read .dot { background: var(--line); }
.notif h4 { font-size: .95rem; margin: 0 0 .2rem; font-family: var(--body); }
.notif p { font-size: .88rem; margin: 0 0 .3rem; color: var(--ink-3); }

.course-pick { display: grid; grid-template-columns: 200px 1fr auto; gap: 1.5rem; align-items: center; }
.course-pick .cp-img { background: var(--ink); aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px; }
.course-pick .cp-img img { height: 70%; }
@media (max-width: 820px) { .course-pick { grid-template-columns: 1fr; } .course-pick .cp-img { aspect-ratio: 16/7; } }
.price { font-family: var(--head); font-size: 1.9rem; font-weight: 800; }

.pix-box { background: var(--paper-2); border: 1.5px dashed var(--ink); padding: 1rem 1.2rem; border-radius: 4px; }

.code-result { border: 2px solid; border-radius: 6px; padding: 1.4rem; }
.code-result.ok { border-color: var(--ok); background: var(--ok-bg); }
.code-result.bad { border-color: var(--bad); background: var(--bad-bg); }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: .45rem 1rem; font-size: .92rem; margin: 0; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 600; }
@media (max-width: 600px) { .dl { grid-template-columns: 1fr; } .dl dd { margin-bottom: .5rem; } }

/* =============================================================
   ÁREA DO ALUNO — gamificação
   ============================================================= */
.player { background: var(--ink); color: #fff; border-radius: 8px; padding: 1.6rem; display: grid; grid-template-columns: auto 1fr auto; gap: 1.6rem; align-items: center; margin-bottom: 1.6rem; position: relative; overflow: hidden; }
.player::after { content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(224,70,27,.35), transparent 70%); pointer-events: none; }
.lvl-ring { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.lvl-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.lvl-ring .lvl-num { font-family: var(--head); font-weight: 800; font-size: 1.8rem; line-height: 1; text-align: center; }
.lvl-ring .lvl-num small { display: block; font-size: .55rem; letter-spacing: .2em; opacity: .6; margin-top: 2px; }
.player h2 { font-size: 1.35rem; margin: 0 0 .2rem; }
.player .rank { color: var(--ember); font-family: var(--head); font-weight: 700; letter-spacing: .12em; font-size: .75rem; text-transform: uppercase; }
.player .xp { text-align: right; position: relative; z-index: 1; }
.player .xp b { font-family: var(--head); font-size: 2.3rem; font-weight: 800; line-height: 1; display: block; }
.player .xp span { font-size: .72rem; letter-spacing: .15em; opacity: .7; }
.player .progress { background: var(--ink-3); margin-top: .7rem; max-width: 420px; }
@media (max-width: 700px) { .player { grid-template-columns: auto 1fr; } .player .xp { grid-column: span 2; text-align: left; display: flex; align-items: baseline; gap: .6rem; } }

.trail { display: grid; gap: .8rem; }
.mod { display: grid; grid-template-columns: 56px 1fr auto; gap: 1.1rem; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.mod:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.mod .m-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-3); color: var(--ink); position: relative; }
.mod.done .m-ic { background: var(--ink); color: #fff; }
.mod.done .m-ic::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; border: 2px solid #fff; }
.mod.open { border-color: var(--fire); box-shadow: 0 0 0 4px rgba(224,70,27,.1); }
.mod.open .m-ic { background: var(--fire); color: #fff; animation: pulse 2s infinite; }
.mod.locked { opacity: .55; cursor: not-allowed; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(224,70,27,.45); } 50% { box-shadow: 0 0 0 10px rgba(224,70,27,0); } }
.mod h3 { font-size: 1rem; margin: 0 0 .15rem; font-family: var(--body); font-weight: 700; }
.mod p { margin: 0; font-size: .84rem; color: var(--muted); }
.mod .m-meta { text-align: right; font-size: .78rem; color: var(--muted); }
@media (max-width: 600px) { .mod { grid-template-columns: 44px 1fr; } .mod .m-ic { width: 44px; height: 44px; } .mod .m-meta { grid-column: 2; text-align: left; } }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .8rem; }
.bdg { text-align: center; font-size: .72rem; line-height: 1.3; }
.bdg .hex { width: 64px; height: 70px; margin: 0 auto .45rem; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--paper-3); color: #b5b5ae; }
.bdg.on .hex { background: linear-gradient(160deg, var(--fire), var(--ember)); color: #fff; }
.bdg.off { color: var(--muted); }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.rank-list li:last-child { border: 0; }
.rank-list .pos { width: 26px; height: 26px; border-radius: 50%; background: var(--paper-3); display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex-shrink: 0; }
.rank-list li:nth-child(1) .pos { background: var(--ember); }
.rank-list li.me { font-weight: 700; }
.rank-list .x { margin-left: auto; font-family: var(--head); font-weight: 700; }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* Aula */
.lesson { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 2.4rem clamp(1.2rem, 4vw, 3rem); max-width: 860px; }
.lesson h2 { font-size: 1.35rem; margin: 2rem 0 .7rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.lesson h2:first-child { margin-top: 0; padding-top: 0; border: 0; }
.lesson h3 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }
.lesson p, .lesson li { font-size: 1.02rem; line-height: 1.75; }
.lesson ul, .lesson ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
.lesson li { margin-bottom: .3rem; }
.lesson table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: .92rem; }
.lesson th { background: var(--ink); color: #fff; text-align: left; padding: .6rem .7rem; font-size: .82rem; }
.lesson td { border-bottom: 1px solid var(--line); padding: .6rem .7rem; vertical-align: top; }
.lesson .tip, .lesson .warn, .lesson .key { border-left: 4px solid; padding: .9rem 1.1rem; margin: 1.2rem 0; border-radius: 0 4px 4px 0; font-size: .96rem; }
.lesson .tip { background: var(--paper-2); border-color: var(--ink); }
.lesson .warn { background: var(--bad-bg); border-color: var(--bad); }
.lesson .key { background: var(--warn-bg); border-color: var(--ember); }
.lesson .tip p:last-child, .lesson .warn p:last-child, .lesson .key p:last-child { margin: 0; }
.lesson-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 2px solid var(--ink); }
.fire-tri { display: flex; justify-content: center; margin: 1.4rem 0; }

/* Quiz */
.quiz { max-width: 820px; }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1.6rem; margin-bottom: 1rem; }
.q-num { font-family: var(--head); font-weight: 800; font-size: .72rem; letter-spacing: .18em; color: var(--fire); margin-bottom: .4rem; }
.q-card h3 { font-family: var(--body); font-size: 1.06rem; font-weight: 600; line-height: 1.5; margin-bottom: 1rem; }
.opt { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 6px; margin-bottom: .5rem; cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--ink); }
.opt input { position: absolute; opacity: 0; }
.opt .l { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex-shrink: 0; text-transform: uppercase; }
.opt:has(input:checked) { border-color: var(--ink); background: var(--paper-2); }
.opt:has(input:checked) .l { background: var(--ink); color: #fff; }
.opt:has(input:focus-visible) { outline: 3px solid rgba(224,70,27,.4); }
.quiz-bar { position: sticky; bottom: 0; background: rgba(245,245,243,.95); backdrop-filter: blur(4px); padding: 1rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); }

.result-hero { border-radius: 8px; padding: 2rem; color: #fff; text-align: center; margin-bottom: 1.4rem; position: relative; overflow: hidden; }
.result-hero.win { background: var(--ink); }
.result-hero.lose { background: var(--ink-3); }
.result-hero .score { font-family: var(--head); font-size: 4rem; font-weight: 800; line-height: 1; }
.result-hero .score small { font-size: 1.6rem; opacity: .5; }
.result-hero .xp-pop { display: inline-block; margin-top: .8rem; background: linear-gradient(90deg, var(--fire), var(--ember)); padding: .35rem .9rem; border-radius: 99px; font-weight: 800; font-family: var(--head); letter-spacing: .05em; animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.stars { display: flex; justify-content: center; gap: .3rem; margin: .8rem 0; }
.stars .ic { color: #444; }
.stars .ic.on { color: var(--ember); fill: var(--ember); }
.rv { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--bad); border-radius: 0 8px 8px 0; padding: 1.2rem 1.4rem; margin-bottom: .9rem; }
.rv.ok { border-left-color: var(--ok); }
.rv h4 { font-family: var(--body); font-size: .98rem; font-weight: 600; margin-bottom: .6rem; }
.rv .ans { font-size: .9rem; display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .3rem; }
.rv .ans.wrong { color: var(--bad); }
.rv .ans.right { color: var(--ok); font-weight: 600; }
.rv .exp { margin-top: .7rem; padding: .75rem .9rem; background: var(--paper-2); font-size: .9rem; border-radius: 4px; }

.cert-ready { background: var(--ink); color: #fff; border-radius: 8px; padding: 2rem; display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.cert-ready .t { flex: 1; min-width: 220px; }
.cert-ready h2 { margin: 0 0 .3rem; font-size: 1.4rem; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar, .no-print { display: none !important; } .app { display: block; } }

/* Modo visualização (admin como aluno) */
.preview-bar { position: sticky; top: 0; z-index: 70; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; justify-content: center; padding: .6rem 1rem; background: var(--fire); color: #fff; font-size: .88rem; text-align: center; }
.preview-bar .btn-light:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
