:root {
  /* Cores da logo */
  --logo-blue-1: #1d9cd1;
  --logo-blue-2: #1e7bb4;
  --logo-blue-3: #1c5896;
  --logo-orange-1: #f69125;
  --logo-orange-2: #f47629;
  --logo-orange-3: #f26230;
  --grad-blue: linear-gradient(135deg, var(--logo-blue-1) 0%, var(--logo-blue-2) 50%, var(--logo-blue-3) 100%);
  --grad-orange: linear-gradient(135deg, var(--logo-orange-1) 0%, var(--logo-orange-2) 55%, var(--logo-orange-3) 100%);
  --grad-brand: linear-gradient(120deg, var(--logo-blue-1) 0%, var(--logo-blue-3) 70%, #163f73 100%);

  /* Papéis de cor: no tema laranja o principal é laranja e o destaque é azul (no azul, o contrário). */
  --grad-primary: var(--grad-orange);
  --grad-accent: var(--grad-blue);
  --primary-c: var(--logo-orange-2);
  --primary-d: #c94f1f;
  --accent-c: var(--logo-blue-2);
  --accent-d: var(--logo-blue-3);
  --grad-brand: linear-gradient(120deg, var(--logo-orange-1) 0%, var(--logo-orange-3) 60%, #c94f1f 100%);
  --hero-shadow: rgba(201, 79, 31, .35);

  /* Tema laranja */
  --bg: #fff1e4;
  --bg-grad: radial-gradient(1200px 520px at 0% -10%, #ffcfa6 0%, transparent 60%), radial-gradient(900px 420px at 100% 0%, #cde7f7 0%, transparent 55%), linear-gradient(180deg, #fff1e4 0%, #ffe6d0 100%);
  --surface: #fffaf5;
  --surface-2: #fdebdb;
  --border: #f4d2b6;
  --text: #13243a;
  --muted: #6a5d58;
  --brand: #e2621f;
  --brand-dark: #b9481a;
  --ok: #1fa95b;
  --ok-dark: #16824a;
  --ok-bg: #e2f6e8;
  --bad: #e5484d;
  --bad-dark: #b8343a;
  --bad-bg: #fde8e6;
  --warn: #f47629;
  --gold: #f69125;
  --gold-dark: #d4561f;
  --sql: #1d9cd1;
  --excel: #1f9d55;
  --pbi: #f69125;
  --locked: #e9c9ae;
  --term-bg: #0d1b2e;
  --term-text: #e3eefa;
  --topbar-bg: rgba(255, 244, 233, .85);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(120, 55, 15, .07), 0 6px 20px rgba(120, 55, 15, .09);
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
/* Tema azul (substitui o modo escuro): azul-noite nas cores da logo */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grad-primary: var(--grad-blue); --grad-accent: var(--grad-orange);
    --primary-c: var(--logo-blue-2); --primary-d: var(--logo-blue-3); --accent-c: var(--logo-orange-2); --accent-d: #c94f1f;
    --grad-brand: linear-gradient(120deg, var(--logo-blue-1) 0%, var(--logo-blue-3) 70%, #163f73 100%); --hero-shadow: rgba(28, 88, 150, .35);
    --bg: #0b1d33;
    --bg-grad: radial-gradient(1100px 520px at 0% -10%, rgba(29, 156, 209, .28) 0%, transparent 60%), radial-gradient(800px 420px at 100% 0%, rgba(244, 118, 41, .16) 0%, transparent 55%), linear-gradient(180deg, #0c2340 0%, #0a1a2f 100%);
    --surface: #10294a; --surface-2: #163459; --border: #23477a; --text: #eaf3fc; --muted: #9db9d8;
    --brand: #3aaee3; --brand-dark: #1e7bb4; --ok-bg: #0f3a33; --bad-bg: #3d1f2e; --locked: #2c4a72;
    --term-bg: #071426; --topbar-bg: rgba(12, 35, 64, .82);
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 10, 30, .35);
    color-scheme: dark;
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  --grad-primary: var(--grad-blue); --grad-accent: var(--grad-orange);
    --primary-c: var(--logo-blue-2); --primary-d: var(--logo-blue-3); --accent-c: var(--logo-orange-2); --accent-d: #c94f1f;
    --grad-brand: linear-gradient(120deg, var(--logo-blue-1) 0%, var(--logo-blue-3) 70%, #163f73 100%); --hero-shadow: rgba(28, 88, 150, .35);
    --bg: #0b1d33;
  --bg-grad: radial-gradient(1100px 520px at 0% -10%, rgba(29, 156, 209, .28) 0%, transparent 60%), radial-gradient(800px 420px at 100% 0%, rgba(244, 118, 41, .16) 0%, transparent 55%), linear-gradient(180deg, #0c2340 0%, #0a1a2f 100%);
  --surface: #10294a; --surface-2: #163459; --border: #23477a; --text: #eaf3fc; --muted: #9db9d8;
  --brand: #3aaee3; --brand-dark: #1e7bb4; --ok-bg: #0f3a33; --bad-bg: #3d1f2e; --locked: #2c4a72;
  --term-bg: #071426; --topbar-bg: rgba(12, 35, 64, .82);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 10, 30, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); background-image: var(--bg-grad); background-attachment: fixed; color: var(--text);
  font: 500 16px/1.5 'Nunito', system-ui, sans-serif;
  overflow-x: hidden;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; font-weight: 900; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .6em; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); padding: .05em .35em; border-radius: 6px; }
pre.code { font-family: var(--mono); font-size: .85rem; background: var(--term-bg); color: var(--term-text); padding: 12px 14px; border-radius: 10px; overflow-x: auto; white-space: pre-wrap; margin: .5em 0; }
kbd { font-family: var(--mono); font-size: .72rem; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 0 .4em; color: var(--muted); background: var(--surface); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--topbar-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--logo-blue-1), var(--logo-blue-3) 55%, var(--logo-orange-2)); opacity: .9; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.2rem; color: var(--text); }
.logo-img { height: 26px; width: auto; display: block; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; font-size: .95rem; box-shadow: 0 3px 0 var(--brand-dark); }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.nav a { color: var(--muted); font-weight: 800; padding: 8px 9px; border-radius: 10px; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.top-stats { display: flex; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-weight: 900; background: var(--surface-2); color: var(--text); }
.pill-streak svg { color: var(--warn); }
.pill-xp svg { color: var(--gold); }
.pill-user svg { color: var(--gold); }
body.focus-mode .topbar { display: none; }

/* ---------- Layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 28px 16px 64px; }
.page.narrow { max-width: 720px; }
.page-head { margin-bottom: 20px; }
.center-head { text-align: center; }
.section-title { margin: 32px 0 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Botões ---------- */
.btn {
  --c: var(--brand); --d: var(--brand-dark);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; font-size: .9rem;
  padding: 12px 20px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--c); color: #fff; box-shadow: 0 4px 0 var(--d);
  transition: transform .06s, box-shadow .06s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--d); }
.btn:disabled { --c: var(--locked); --d: var(--locked); color: var(--muted); cursor: not-allowed; filter: none; }
.btn:disabled:active { transform: none; }
.btn-primary { --c: var(--ok); --d: var(--ok-dark); }
.btn-secondary { --c: var(--brand); --d: var(--brand-dark); }
.btn-premium { --c: var(--gold); --d: var(--gold-dark); color: #3a2a00; }
.btn-danger { --c: var(--bad); --d: var(--bad-dark); }
.btn-ghost { background: var(--surface); color: var(--text); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border); }
.btn-ghost:active { box-shadow: 0 0 0 var(--border); }
.btn-sm { padding: 8px 14px; font-size: .78rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn kbd { background: transparent; color: inherit; border-color: currentColor; opacity: .7; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--muted); font-size: 1.3rem; font-weight: 900; }
.icon-btn:hover { background: var(--surface-2); }

.tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.tag-premium { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold-dark); }

.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 10px 0 4px; }
.bar-fill { height: 100%; background: var(--accent, var(--ok)); border-radius: inherit; }

/* ---------- Início ---------- */
.home-top { display: grid; gap: 16px; grid-template-columns: 2fr 1fr; }
.streak-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.streak-flame { color: var(--locked); }
.streak-flame.on { color: var(--warn); }
.streak-num { font-size: 2.2rem; font-weight: 900; line-height: 1; }
.streak-num span { font-size: 1rem; color: var(--muted); }
.streak-bar { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; }
.streak-day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.streak-dot { width: 100%; aspect-ratio: 1; max-width: 34px; border-radius: 8px; background: var(--surface-2); border: 2px solid var(--border); }
.streak-day.perfect .streak-dot { background: var(--ok); border-color: var(--ok-dark); }
.streak-day.error .streak-dot { background: var(--bad); border-color: var(--bad-dark); }
.streak-day.pending .streak-dot { border-style: dashed; border-color: var(--warn); }
.streak-lbl { font-size: .68rem; color: var(--muted); }
.streak-legend { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; background: var(--surface-2); border: 1px solid var(--border); }
.lg.perfect { background: var(--ok); border-color: var(--ok); }
.lg.error { background: var(--bad); border-color: var(--bad); }
.streak-msg { margin: 12px 0 0; font-weight: 700; }

.stats-card { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
.stats-card .btn, .stats-card .premium-badge { grid-column: 1 / -1; }
.stats-wide { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin: 16px 0; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 700; }
.premium-badge { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 10px; border-radius: 12px; font-weight: 900; color: var(--gold-dark); background: color-mix(in srgb, var(--gold) 15%, transparent); }

.track-card { display: flex; flex-direction: column; border-top: 6px solid var(--accent); }
.track-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; color: #fff; background: var(--accent); margin-bottom: 12px; }
.track-icon.big { width: 72px; height: 72px; border-radius: 20px; flex: none; }
.track-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.feature-card { display: flex; gap: 16px; align-items: center; color: var(--text); transition: transform .15s; }
.feature-card:hover, .deck-card:hover { transform: translateY(-2px); }
.feature-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); flex: none; }
.feature-card h3 { margin-bottom: .2em; }
.feature-card p { margin: 0; }

/* ---------- Trilha ---------- */
.track-banner { display: flex; gap: 18px; align-items: center; padding: 24px; border-radius: var(--radius); background: var(--accent); color: #fff; box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 70%, #000); margin-bottom: 28px; }
.track-banner .track-icon { background: rgba(255, 255, 255, .2); margin: 0; }
.track-banner h1 { margin-bottom: .1em; }
.track-banner p { margin: 0 0 .2em; opacity: .95; }
.module { margin-bottom: 36px; }
.module-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.module-head h2 { margin: 0; }
.module-head p { margin: 0; }
.path { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 26px; }
.path-step { display: flex; flex-direction: column; align-items: center; transform: translateX(var(--x)); position: relative; max-width: 220px; }
.node { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; color: #fff; transition: transform .1s; }
.node.done { background: var(--accent); box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 65%, #000); }
.node.open { background: var(--accent); box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 65%, #000), 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); animation: pulse 1.8s infinite; }
.node.locked, .node.premium { background: var(--locked); box-shadow: 0 6px 0 color-mix(in srgb, var(--locked) 75%, #000); color: var(--surface); }
a.node:active { transform: translateY(4px); }
.node-label { margin-top: 10px; font-weight: 800; font-size: .9rem; text-align: center; }
.path-start { position: absolute; top: -34px; background: var(--surface); border: 2px solid var(--border); padding: 2px 12px; border-radius: 10px; font-weight: 900; font-size: .8rem; color: var(--accent); text-transform: uppercase; white-space: nowrap; }
@keyframes pulse { 50% { box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 65%, #000), 0 0 0 12px color-mix(in srgb, var(--accent) 10%, transparent); } }
.module-locked .node-label { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .node.open { animation: none; } * { transition: none !important; } }

/* ---------- Lição ---------- */
.lesson { min-height: 100vh; display: flex; flex-direction: column; }
.lesson-top, .flash-top { max-width: 1000px; width: 100%; margin: 0 auto; padding: 16px; display: flex; align-items: center; gap: 14px; }
.progress { flex: 1; height: 16px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent, var(--ok)); border-radius: inherit; transition: width .35s ease; }
.lesson-count { font-weight: 800; color: var(--muted); min-width: 44px; text-align: right; }
.lesson-body { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 200px; }
.ex-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ex-q { font-size: clamp(1.15rem, 3vw, 1.45rem); font-weight: 800; margin-bottom: 22px; text-wrap: pretty; }
.ex-q code { font-size: .85em; }
.exercise.locked .ex-area { pointer-events: none; }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  font: inherit; font-weight: 700; color: var(--text);
  padding: 14px 16px; border-radius: 14px; cursor: pointer;
  background: var(--surface); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border);
}
.option:hover { background: var(--surface-2); }
.option.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); box-shadow: 0 3px 0 var(--brand); }
.option kbd { flex: none; }
.input { font: inherit; width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); color: var(--text); }
.input:focus { border-color: var(--brand); outline: none; }
.input-lg { font-family: var(--mono); font-size: 1.1rem; padding: 16px; }
.build-answer { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.build-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { font-family: var(--mono); font-size: .9rem; font-weight: 600; padding: 9px 13px; border-radius: 12px; cursor: pointer; background: var(--surface); color: var(--text); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border); }
.chip.used { color: transparent; background: var(--surface-2); box-shadow: none; cursor: default; }
.editor {
  width: 100%; min-height: 150px; resize: vertical; display: block;
  font: 500 .95rem/1.55 var(--mono); padding: 14px; border-radius: 12px; tab-size: 2;
  background: var(--term-bg); color: var(--term-text); border: 2px solid transparent; caret-color: var(--ok);
}
.editor:focus { outline: none; border-color: var(--brand); }
.editor-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.sql-out { margin-top: 8px; }
.sql-error { font-family: var(--mono); font-size: .85rem; color: var(--bad); background: var(--bad-bg); padding: 10px 12px; border-radius: 10px; }
.ok-msg { color: var(--ok); font-weight: 800; }
.hint-box { background: color-mix(in srgb, var(--gold) 14%, transparent); padding: 10px 14px; border-radius: 12px; margin-bottom: 10px; }
.schema-toggle { margin-bottom: 10px; }
.schema-toggle summary { cursor: pointer; font-weight: 800; color: var(--brand); }
.schema-toggle .schema { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }

.lesson-foot { position: fixed; bottom: 0; left: 0; right: 0; border-top: 2px solid var(--border); background: var(--surface); }
.foot-inner { max-width: 1000px; margin: 0 auto; padding: 18px 16px; display: flex; align-items: center; gap: 16px; justify-content: flex-end; }
.feedback { flex: 1; max-height: 40vh; overflow-y: auto; }
.feedback:empty { display: none; }
.lesson-foot.is-correct { background: var(--ok-bg); border-color: transparent; }
.lesson-foot.is-wrong { background: var(--bad-bg); border-color: transparent; }
.is-correct .fb-title { color: var(--ok); font-size: 1.25rem; }
.is-wrong .fb-title { color: var(--bad); font-size: 1.25rem; }
.is-wrong .btn-check { --c: var(--bad); --d: var(--bad-dark); }
.fb-answer { font-weight: 700; margin: 4px 0; }
.fb-answer pre.code { margin: 4px 0; }
.fb-exp { font-size: .92rem; }
.fb-note { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.btn-check { min-width: 160px; }

.finish { text-align: center; padding-top: 40px; }
.finish-badge { width: 110px; height: 110px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; font-size: 3.2rem; color: #fff; background: var(--ok); box-shadow: 0 6px 0 var(--ok-dark); }
.finish-badge.perfect { background: var(--gold); box-shadow: 0 6px 0 var(--gold-dark); }
.finish-stats { display: flex; justify-content: center; gap: 14px; margin: 24px 0; flex-wrap: wrap; }
.finish-stats .stat { border: 2px solid var(--border); border-radius: 14px; padding: 12px 18px; min-width: 120px; }
.finish-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Tabela de resultado ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; max-height: 360px; }
table.result { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: .82rem; }
table.result th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-weight: 600; }
table.result th, table.result td { padding: 6px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.result tr:last-child td { border-bottom: 0; }
.null { color: var(--muted); font-style: italic; }

/* ---------- Terminal ---------- */
.terminal-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr) 240px; gap: 16px; align-items: start; }
.term-list { padding: 10px; max-height: calc(100vh - 140px); overflow-y: auto; position: sticky; top: 76px; }
.term-group-title { font-weight: 900; font-size: .8rem; text-transform: uppercase; color: var(--muted); padding: 12px 8px 6px; display: flex; gap: 6px; align-items: center; }
.term-item { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border-radius: 10px; color: var(--text); font-size: .85rem; font-weight: 700; }
.term-item:hover { background: var(--surface-2); }
.term-item.active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.term-item.is-locked { opacity: .5; }
.term-check { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; background: var(--surface-2); color: var(--muted); }
.term-check.ok { background: var(--ok); color: #fff; }
.term-q { line-height: 1.35; }
.term-main { min-width: 0; }
.term-prompt { margin-bottom: 12px; }
.term-question { font-size: 1.05rem; }
.terminal { border-radius: 14px; overflow: hidden; background: var(--term-bg); box-shadow: var(--shadow); }
.terminal-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: color-mix(in srgb, var(--term-bg) 80%, #fff); }
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.terminal-bar .dot:nth-child(2) { background: #febc2e; }
.terminal-bar .dot:nth-child(3) { background: #28c840; }
.terminal-title { color: #9a9cb0; font-family: var(--mono); font-size: .78rem; margin-left: 8px; }
.editor-term { border-radius: 0; min-height: 200px; }
.term-out { margin-top: 4px; }
.verify { padding: 12px 14px; border-radius: 12px; margin-bottom: 10px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.verify.ok { background: var(--ok-bg); color: var(--ok-dark); }
.verify.bad { background: var(--bad-bg); color: var(--bad); }
.term-history { margin-top: 12px; padding: 12px 16px; }
.term-history summary { cursor: pointer; font-weight: 800; }
.history-item { display: block; width: 100%; text-align: left; font: .8rem var(--mono); padding: 6px 8px; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item:hover { background: var(--surface-2); }
.term-schema { position: sticky; top: 76px; max-height: calc(100vh - 140px); overflow-y: auto; }
.schema-table { margin-bottom: 12px; }
.schema-table ul { list-style: none; margin: 0; padding: 0 0 0 4px; }
.schema-table li { display: flex; justify-content: space-between; gap: 6px; font-size: .78rem; }
.schema-table li span { color: var(--muted); font-family: var(--mono); font-size: .7rem; white-space: nowrap; }
.schema-name, .schema-col { font: inherit; border: 0; background: none; padding: 1px 0; cursor: pointer; color: var(--text); text-align: left; }
.schema-name { font-family: var(--mono); font-weight: 600; color: var(--brand); font-size: .9rem; }
.schema-col { font-family: var(--mono); }
.schema-name:hover, .schema-col:hover { text-decoration: underline; }

/* ---------- Abas e terminal DAX ---------- */
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.tab { padding: 8px 18px; border-radius: 10px; font: inherit; font-weight: 900; color: var(--muted); border: 0; background: none; cursor: pointer; }
.tab.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.group-pick { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 800; flex-wrap: wrap; }
.input-sm { padding: 6px 10px; width: auto; max-width: 100%; font-size: .9rem; }
.dax-card { display: inline-flex; flex-direction: column; gap: 2px; padding: 14px 20px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); }
.dax-card strong { font-size: 1.8rem; font-weight: 900; }
table.result.matrix td.num, table.result.matrix th.num { text-align: right; }
table.result.matrix tr.total td { font-weight: 900; border-top: 2px solid var(--border); background: var(--surface-2); }
.warn-msg { color: var(--warn); font-weight: 700; margin-top: 6px; }
.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 0 4px; }
.link-btn:hover { color: var(--bad); }
.schema-col.mine { color: var(--brand); }

/* ---------- Flashcards ---------- */
.deck-card { color: var(--text); border-top: 6px solid var(--accent); transition: transform .15s; }
.deck-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: #fff; margin-bottom: 12px; }
.deck-due { display: inline-block; margin-top: 4px; font-weight: 900; font-size: .85rem; color: var(--warn); }
.deck-due.none { color: var(--ok); }
.flash-page { max-width: 720px; }
.flash-top { padding: 0 0 18px; }
.flash-stage { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.flashcard { width: 100%; max-width: 560px; aspect-ratio: 3 / 2; perspective: 1200px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--text); }
.flash-inner { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.flashcard.flipped .flash-inner { transform: rotateY(180deg); }
.flash-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 22px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; background: var(--surface); border: 2px solid var(--border); box-shadow: 0 6px 0 var(--border); }
.flash-back { transform: rotateY(180deg); border-color: var(--accent); box-shadow: 0 6px 0 var(--accent); }
.flash-label { font-size: .75rem; font-weight: 900; text-transform: uppercase; color: var(--accent); }
.flash-text { font-size: clamp(1.1rem, 3.4vw, 1.6rem); font-weight: 800; }
.flash-back .flash-text { font-size: clamp(1rem, 2.8vw, 1.25rem); font-weight: 700; }
.flash-actions { display: flex; gap: 12px; }

/* ---------- Planos ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; gap: 20px; margin-bottom: 24px; }
.plan { position: relative; text-align: center; padding: 28px 24px; }
.plan h3 { display: flex; align-items: center; justify-content: center; gap: 6px; }
.plan h3 svg { color: var(--gold); }
.plan-featured { border: 3px solid var(--gold); }
.plan-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #3a2a00; font-weight: 900; font-size: .75rem; padding: 3px 12px; border-radius: 999px; text-transform: uppercase; white-space: nowrap; }
.price { font-size: 2.4rem; font-weight: 900; margin: 8px 0 4px; }
.price span { font-size: 1rem; color: var(--muted); }
.compare { max-width: 700px; margin: 0 auto; overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.compare-table th, .compare-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: center; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table .ok { color: var(--ok); }
.modal { border: 0; border-radius: var(--radius); padding: 0; background: var(--surface); color: var(--text); width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal::backdrop { background: rgba(10, 10, 20, .5); }
.modal-body { padding: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.demo-warn { font-size: .85rem; background: color-mix(in srgb, var(--gold) 15%, transparent); padding: 10px 12px; border-radius: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: .9rem; }
.form-card { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-card .field { flex: 1; min-width: 200px; }
.danger-zone { margin-top: 16px; border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.page.narrow > .card + .card { margin-top: 16px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .terminal-grid { grid-template-columns: 1fr; }
  .term-list, .term-schema { position: static; max-height: 300px; }
  .term-schema .schema { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
  .term-main { order: -1; }
}
@media (max-width: 820px) {
  .home-top { grid-template-columns: 1fr; }
  .topbar-inner { flex-wrap: wrap; gap: 8px 12px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .top-stats { margin-left: auto; }
}
@media (max-width: 560px) {
  .page { padding-top: 20px; }
  .streak-bar { gap: 3px; }
  .streak-lbl { display: none; }
  .path-step { transform: translateX(calc(var(--x) * .5)); }
  .track-banner { flex-direction: column; align-items: flex-start; }
  .foot-inner { flex-direction: column; align-items: stretch; }
  .btn-check { width: 100%; }
  .finish-stats .stat { min-width: 0; flex: 1; }
  .pill-user { display: none; }
}

.theme-btn { border: 0; cursor: pointer; font: inherit; font-size: 1rem; min-width: 38px; justify-content: center; }
.theme-btn:hover { filter: brightness(.95); }
.notice { margin-bottom: 18px; padding: 12px 16px; border-radius: 14px; font-weight: 700; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }

.sound-toggle { border: 0; background: none; cursor: pointer; font-size: 1.1rem; }

/* ---------- Animações de feedback ---------- */
.option.is-right { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 3px 0 var(--ok); animation: title-pop .35s ease-out; }
.option.is-bad { border-color: var(--bad); background: var(--bad-bg); box-shadow: 0 3px 0 var(--bad); }
.lesson-foot.is-correct, .lesson-foot.is-wrong { animation: foot-up .25s ease-out; }
@keyframes foot-up { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.fb-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 8px; border-radius: 50%; background: var(--ok); color: #fff; font-size: .95rem; vertical-align: -4px; animation: badge-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes badge-pop { 0% { transform: scale(0) rotate(-45deg); } 100% { transform: scale(1) rotate(0); } }
.is-correct .fb-title { display: inline-block; animation: title-pop .35s ease-out; }
@keyframes title-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.confetti { position: fixed; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; z-index: 50; animation: confetti .75s ease-out forwards; }
@keyframes confetti { 0% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 30px)) rotate(var(--rot)) scale(.6); opacity: 0; } }
.exercise.shake { animation: shake .35s ease-in-out; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
  .lesson-foot.is-correct, .lesson-foot.is-wrong, .fb-badge, .option.is-right, .is-correct .fb-title, .exercise.shake { animation: none; }
}

/* ---------- Tentativas ---------- */
.fb-tries { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 800; font-size: .85rem; color: var(--bad); }
.fb-tries .try { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bad); }
.fb-tries .try.used { background: var(--bad); }
.fb-tries span:last-child { margin-left: 4px; font-weight: 700; }

/* ---------- Retenção: escudo, meta, nível, desafio do dia ---------- */
.streak-day.shielded .streak-dot { background: var(--sql); border-color: color-mix(in srgb, var(--sql) 70%, #000); }
.lg.shielded { background: var(--sql); border-color: var(--sql); }
.goal { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.goal-ring { --size: 64px; flex: none; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .9rem;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 78% 100%), conic-gradient(var(--warn) calc(var(--pct) * 1%), var(--surface-2) 0); }
.goal-text { flex: 1; min-width: 0; }
.bar.thin { height: 6px; margin: 6px 0 0; }
.bar.thin .bar-fill { background: var(--gold); }
.daily { display: flex; align-items: center; gap: 14px; margin-top: 16px; border-left: 6px solid var(--warn); flex-wrap: wrap; }
.daily.done { border-left-color: var(--ok); }
.daily-icon { font-size: 1.8rem; }
.daily-body { flex: 1; min-width: 200px; }
.locked-card { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; border-color: color-mix(in srgb, var(--gold) 50%, var(--border)); }
.locked-card > div { flex: 1; min-width: 200px; }
.deck-card.is-locked { opacity: .6; }
.feature-icon { font-size: 1.6rem; }

/* ---------- Avisos (toast) ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 700; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); animation: toast-in .3s ease-out; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
body.focus-mode .toasts { bottom: 120px; }

/* ---------- Assinatura ---------- */
.plans { grid-template-columns: repeat(auto-fit, minmax(230px, 300px)); }
.guarantee { margin: -8px 0 24px; font-size: .95rem; }
.perks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 960px; margin: 0 auto 24px; }
.perk { display: flex; gap: 12px; align-items: flex-start; padding: 16px; }
.perk p { margin: 2px 0 0; }
.perk-icon { font-size: 1.6rem; }
.premium-status { display: flex; align-items: center; gap: 12px; max-width: 700px; margin: 0 auto 24px; flex-wrap: wrap; }
.premium-status > div { flex: 1; }
.premium-status svg { color: var(--gold); }

/* ---------- Perfil: meta e conquistas ---------- */
.chip-btn { font: inherit; font-size: .85rem; font-weight: 800; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.chip-btn:hover { border-color: var(--brand); }
.chip-btn.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.goal-options { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.badges { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 8px; border-radius: 14px; border: 2px dashed var(--border); filter: grayscale(1); opacity: .55; }
.badge.on { filter: none; opacity: 1; border-style: solid; border-color: color-mix(in srgb, var(--gold) 60%, var(--border)); background: color-mix(in srgb, var(--gold) 8%, var(--surface)); }
.badge-icon { font-size: 1.8rem; }

/* ---------- Simulado ---------- */
.exam-timer { font-weight: 900; padding: 4px 10px; border-radius: 10px; background: var(--surface-2); }
.exam-timer.low { color: var(--bad); background: var(--bad-bg); }
.btn-skip { margin-right: auto; }
.finish-badge:not(.perfect) { font-size: 1.8rem; }
.exam-review { display: grid; gap: 8px; text-align: left; max-width: 760px; margin: 0 auto; }
.exam-item { padding: 12px 16px; }
.exam-item summary { cursor: pointer; font-weight: 700; }
.exam-item .fb-answer { margin-top: 8px; }
.exam-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: .8rem; margin-right: 6px; background: var(--bad); }
.exam-item.ok .exam-mark { background: var(--ok); }

/* ---------- Tutor ---------- */
.tutor-page { max-width: 860px; }
.ai-badge { font-weight: 800; font-size: .85rem; color: var(--muted); }
.ai-badge.on { color: var(--ok); }
.chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-log { height: min(58vh, 560px); overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 8px; align-items: flex-end; }
.msg.me { justify-content: flex-end; }
.msg-avatar { font-size: 1.4rem; }
.msg-bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); line-height: 1.5; overflow-wrap: anywhere; }
.msg.me .msg-bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot .msg-bubble { border-bottom-left-radius: 4px; }
.msg-bubble pre.code { font-size: .8rem; }
.chat-opt { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; font: inherit; font-weight: 700; margin-top: 6px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.chat-opt:hover:not(:disabled) { border-color: var(--brand); }
.chat-opt:disabled { cursor: default; opacity: .7; }
.chat-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chat-answer { margin-top: 8px; font-weight: 700; }
.chat-link { margin-top: 8px; }
.chat-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 18px; border-top: 1px solid var(--border); }
.chat-form { display: flex; gap: 8px; padding: 12px 18px 18px; }
.chat-form .input { flex: 1; }
.chat-preview { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; opacity: .8; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
@media (max-width: 560px) { .msg-bubble { max-width: 92%; } .chat-log { height: 60vh; } }

/* =====================================================================
   Redesign com as cores da logo (degradês azul e laranja)
   ===================================================================== */
.btn, .btn-secondary { --c: var(--primary-c); --d: var(--primary-d); background-image: var(--grad-primary); }
.btn-primary { --c: var(--primary-c); --d: var(--primary-d); background-image: var(--grad-primary); }
.btn-premium { --c: var(--accent-c); --d: var(--accent-d); background-image: var(--grad-accent); color: #fff; }
.btn-danger { background-image: none; }
.btn-ghost, .btn:disabled { background-image: none; }
.btn:not(:disabled):hover { filter: brightness(1.08) saturate(1.05); }
/* Na lição, verde e vermelho continuam indicando acerto e erro */
.lesson .btn-check { --c: var(--ok); --d: var(--ok-dark); background-image: linear-gradient(135deg, #2bc46d, var(--ok) 60%, var(--ok-dark)); }
.lesson .is-wrong .btn-check { --c: var(--bad); --d: var(--bad-dark); background-image: linear-gradient(135deg, #f0646a, var(--bad) 60%, var(--bad-dark)); }
.lesson .btn-check:disabled { --c: var(--locked); --d: var(--locked); color: var(--muted); background-image: none; }
.path-step:has(.path-start) { margin-top: 26px; }
.lesson .btn-skip { background-image: none; }

.nav a.active { color: #fff; background: var(--grad-primary); box-shadow: 0 2px 8px rgba(30, 123, 180, .35); }
.pill { background: color-mix(in srgb, var(--surface-2) 85%, transparent); border: 1px solid var(--border); }
.pill-streak svg { color: var(--logo-orange-2); }
.pill-xp svg { color: var(--logo-orange-1); }

.card { background-image: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0)); }
a.card:hover, .track-card:hover { box-shadow: 0 10px 30px rgba(19, 70, 130, .16); }

/* Banner de boas-vindas */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 30px 28px; margin-bottom: 20px; color: #fff; background: var(--grad-brand); box-shadow: 0 12px 34px var(--hero-shadow); }
.hero::before, .hero::after { content: ""; position: absolute; bottom: -2px; background: rgba(255, 255, 255, .12); clip-path: polygon(0 100%, 50% 0, 100% 100%); pointer-events: none; }
.hero::before { right: 8%; width: 280px; height: 170px; }
.hero::after { right: -40px; width: 220px; height: 120px; background: rgba(246, 145, 37, .35); }
.hero h1 { color: #fff; margin-bottom: .2em; position: relative; }
.hero p { color: rgba(255, 255, 255, .88); position: relative; max-width: 560px; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; position: relative; }
.hero-chips span { padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); }
.hero-chips .hot { background: var(--grad-accent); border-color: transparent; }

/* Trilhas */
.track-card { border-top: 0; position: relative; overflow: hidden; }
.track-card::before, .deck-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #fff)); }
.deck-card { border-top: 0; position: relative; overflow: hidden; }
.track-icon, .deck-icon { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 75%, #000)); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.track-banner { background: linear-gradient(130deg, color-mix(in srgb, var(--accent) 75%, #fff) 0%, var(--accent) 45%, color-mix(in srgb, var(--accent) 65%, #0b1d33) 100%); }
.track-banner .track-icon { background: rgba(255, 255, 255, .2); box-shadow: none; }
.bar-fill, .progress-fill { background: linear-gradient(90deg, color-mix(in srgb, var(--accent, var(--brand)) 60%, #fff), var(--accent, var(--brand))); }
.bar.thin .bar-fill { background: var(--grad-accent); }
.node.done, .node.open { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 65%, #fff), var(--accent) 60%, color-mix(in srgb, var(--accent) 80%, #000)); }

/* Sequência e destaques */
.streak-flame.on { color: var(--logo-orange-2); filter: drop-shadow(0 4px 10px rgba(244, 118, 41, .45)); }
.streak-day.perfect .streak-dot { background: linear-gradient(160deg, #39d27f, var(--ok)); }
.notice { background: linear-gradient(120deg, color-mix(in srgb, var(--logo-blue-1) 14%, var(--surface)), color-mix(in srgb, var(--logo-orange-1) 12%, var(--surface))); border-color: color-mix(in srgb, var(--logo-blue-1) 30%, transparent); }
.feature-icon { background: linear-gradient(140deg, color-mix(in srgb, var(--logo-blue-1) 22%, var(--surface)), color-mix(in srgb, var(--logo-blue-3) 18%, var(--surface))); }
.daily { border-left: 0; position: relative; overflow: hidden; padding-left: 26px; }
.daily::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--grad-accent); }
.daily.done::before { background: linear-gradient(180deg, #39d27f, var(--ok-dark)); }

/* Assinatura e conclusões */
.plan-featured { border: 3px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-accent) border-box; }
.plan-flag { background: var(--grad-accent); color: #fff; }
.price { background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.premium-badge { color: var(--logo-orange-3); background: linear-gradient(120deg, color-mix(in srgb, var(--logo-orange-1) 18%, transparent), color-mix(in srgb, var(--logo-orange-3) 12%, transparent)); }
.finish-badge.perfect { background: var(--grad-accent); box-shadow: 0 6px 0 var(--accent-d); }
.finish-badge:not(.perfect) { background: linear-gradient(160deg, #39d27f, var(--ok)); }
.terminal { box-shadow: 0 10px 30px rgba(7, 20, 38, .35); }
.terminal-bar { background: linear-gradient(90deg, #0f2a4a, #0b1f38); }
.msg.me .msg-bubble { background: var(--grad-primary); }

/* No tema azul, o preço em azul escuro perde contraste */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .price { background: linear-gradient(135deg, #8fd8f7, #3aaee3); -webkit-background-clip: text; background-clip: text; } }
:root[data-theme="dark"] .price { background: linear-gradient(135deg, #8fd8f7, #3aaee3); -webkit-background-clip: text; background-clip: text; }
@media (max-width: 560px) { .hero { padding: 22px 18px; } .hero::before { width: 180px; height: 110px; right: 0; } .hero::after { display: none; } }

/* ---------- Limites do plano grátis ---------- */
.quota { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 8px 12px; border-radius: 12px; font-size: .85rem; font-weight: 700; background: color-mix(in srgb, var(--logo-blue-1) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--logo-blue-1) 30%, transparent); }
.quota.empty { background: color-mix(in srgb, var(--logo-orange-2) 14%, var(--surface)); border-color: color-mix(in srgb, var(--logo-orange-2) 40%, transparent); }
.quota a { font-weight: 900; white-space: nowrap; }
.limit-msg { padding: 12px 14px; border-radius: 12px; font-weight: 700; background: color-mix(in srgb, var(--logo-orange-2) 14%, var(--surface)); }
.quota-note { margin-top: 4px; }
.paywall { text-align: center; padding: 32px 24px; max-width: 560px; margin: 20px auto; }
.paywall-icon { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; background: var(--grad-accent); box-shadow: 0 8px 24px rgba(244, 118, 41, .35); }
.paywall-perks { list-style: none; padding: 0; margin: 16px auto; display: inline-flex; flex-direction: column; gap: 6px; text-align: left; font-weight: 700; }
.compare-table td .small { color: var(--muted); }

/* ---------- Tradutor QP (exclusivo) ---------- */
.exclusive { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 900; color: #fff; background: var(--grad-accent); box-shadow: 0 4px 12px rgba(244, 118, 41, .35); }
.hero-rosetta .exclusive { position: relative; margin-bottom: 10px; }
.rosetta-flow { display: flex; align-items: center; gap: 10px; margin-top: 14px; position: relative; flex-wrap: wrap; }
.rosetta-flow span { padding: 6px 14px; border-radius: 12px; font-weight: 900; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); }
.rosetta-flow b { font-size: 1.3rem; }
.rosetta-search { margin-bottom: 16px; }
.rosetta-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.rosetta-card h3 { margin: 0; }
.rosetta-card p { margin: 0; }
.rosetta-peek { margin-top: auto; display: block; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv { align-self: flex-start; font-size: .72rem; font-weight: 900; padding: 2px 10px; border-radius: 999px; }
.lv-novato { color: #fff; background: linear-gradient(135deg, #39d27f, var(--ok-dark)); }
.lv-inter { color: #fff; background: var(--grad-primary); }
.rosetta-head { margin: 10px 0 16px; display: flex; flex-direction: column; gap: 8px; }
.rosetta-head h1 { margin: 0; }
.match-badge { align-self: flex-start; padding: 8px 14px; border-radius: 12px; font-weight: 900; background: var(--surface-2); color: var(--muted); }
.match-badge.ok { color: #fff; background: linear-gradient(135deg, #39d27f, var(--ok-dark)); box-shadow: 0 6px 18px rgba(31, 169, 91, .35); animation: title-pop .4s ease-out; }
.match-badge.warn { color: #fff; background: var(--grad-accent); }
.rosetta-cols { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool { display: flex; flex-direction: column; gap: 8px; min-width: 0; position: relative; overflow: hidden; }
.tool::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; }
.tool-excel::before { background: linear-gradient(90deg, #1f9d55, #6fd39a); }
.tool-sql::before { background: linear-gradient(90deg, var(--logo-blue-3), var(--logo-blue-1)); }
.tool-dax::before { background: var(--grad-accent); }
.tool-head { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.05rem; }
.tool-dot { width: 12px; height: 12px; border-radius: 50%; }
.tool-excel .tool-dot { background: #1f9d55; }
.tool-sql .tool-dot { background: var(--logo-blue-1); }
.tool-dax .tool-dot { background: var(--logo-orange-2); }
.tool pre.code { margin: 0; font-size: .78rem; }
.tool-out { margin-top: auto; }
.rosetta-tip { margin: 14px 0; font-size: .95rem; }
.rosetta-practice { margin-bottom: 16px; }
.rosetta-practice .head-row { margin-bottom: 8px; }
.rosetta-practice h2 { margin: 0; }
.schema-hint code { font-size: .78rem; }
.practice-out { margin-top: 8px; display: grid; gap: 8px; }
.rosetta-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rosetta-promo { display: block; margin-top: 16px; color: var(--text); position: relative; overflow: hidden; border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, var(--logo-blue-1), var(--logo-blue-3), var(--logo-orange-2)) border-box; }
.rosetta-promo-body { display: flex; align-items: center; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.rosetta-promo-body > div { flex: 1; min-width: 240px; }
.rosetta-promo h2 { margin: 0 0 4px; }
.rosetta-promo p { margin: 0; }
@media (max-width: 1000px) { .rosetta-cols { grid-template-columns: 1fr; } }

/* ---------- Tradutor QP: tradutor livre, mapa de cores e dicionário ---------- */
.live-form { display: flex; gap: 10px; margin-top: 16px; position: relative; flex-wrap: wrap; }
.live-input { flex: 1; min-width: 240px; font-family: var(--mono); font-size: 1rem; padding: 14px 16px; border: 0; color: #13243a; background: rgba(255, 255, 255, .95); box-shadow: 0 6px 20px rgba(0, 0, 0, .15); }
.live-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; position: relative; align-items: center; font-size: .82rem; font-weight: 800; }
.ex-chip { font: 600 .74rem var(--mono); padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.ex-chip:hover { background: rgba(255, 255, 255, .26); }
.live-result { margin: 16px 0; }
.live-card { display: grid; gap: 14px; }
.live-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-chip { font-size: .75rem; font-weight: 900; padding: 3px 10px; border-radius: 999px; background: var(--term-bg); }
.live-value { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.live-value strong { font-size: 1.5rem; font-weight: 900; }
.live-notes { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.live-error { border-color: color-mix(in srgb, var(--logo-orange-2) 50%, var(--border)); }
/* Cores dos papéis (pensadas para o fundo escuro dos blocos de código) */
.r-fn { color: #7cc7ff; font-weight: 700; }
.r-val { color: #6be3a0; font-weight: 700; }
.r-c1 { color: #ffb067; font-weight: 700; }
.r-c2 { color: #ff8fc7; font-weight: 700; }
.r-c3 { color: #7fe7e0; font-weight: 700; }
.r-c4 { color: #ffe37a; font-weight: 700; }
.r-op { color: #c3a6ff; }
.r-join { color: #9fb3c8; font-style: italic; }
.code-wrap { position: relative; }
.copy-btn { position: absolute; top: 6px; right: 6px; font: 800 .7rem 'Nunito', sans-serif; padding: 3px 9px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #e3eefa; cursor: pointer; opacity: .75; }
.copy-btn:hover { opacity: 1; }
.code-wrap pre.code { padding-right: 70px; }
.rosetta-progress { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.rosetta-progress > div { flex: 1; min-width: 240px; }
.rosetta-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.rosetta-tools .input { flex: 1; min-width: 240px; }
.rc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rc-done { display: inline-flex; gap: 4px; }
.rosetta-card.is-done { border-color: color-mix(in srgb, var(--ok) 55%, var(--border)); }
.dict-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.dict-wrap { max-height: none; border: 0; }
.dict td { vertical-align: top; }
.dict code { white-space: normal; }
.dict .dx { color: #1f9d55; } .dict .ds { color: var(--logo-blue-2); } .dict .dd { color: var(--logo-orange-3); }
.practice-status { display: inline-flex; gap: 4px; margin-left: 6px; }

/* Código sem ligaduras: ">=" aparece como o aluno digita, não como "≥" */
code, pre, kbd, .editor, .input-lg, .live-input, .ex-chip, .chip, table.result { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.dict th, .dict td { text-align: left; }
.dict .ds { color: var(--logo-blue-1); }

/* ---------- Encontre o erro ---------- */
.bug-pick { display: grid; gap: 12px; margin-bottom: 16px; }
.bug-pick-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bug-pick-row > span:first-child { min-width: 86px; font-weight: 800; }
.bug-list { display: grid; gap: 10px; }
.bug-item { display: flex; align-items: center; gap: 14px; color: var(--text); transition: transform .15s; }
.bug-item:hover { transform: translateY(-2px); }
.bug-item.is-locked { opacity: .6; }
.bug-item-body { flex: 1; min-width: 0; }
.bug-item-body p { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bug-item .term-check { width: 30px; height: 30px; font-size: .85rem; font-weight: 900; }
.back-link { display: inline-block; margin-bottom: 10px; font-weight: 800; }
.bug-page h1 { margin: 8px 0 16px; }
.bug-label { margin: 14px 0 4px; font-size: .75rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bug-sheet { margin-top: 10px; max-width: 520px; }
.bug-sheet th { background: var(--surface-2); text-align: center; }
.bug-step h3 { display: flex; align-items: center; gap: 10px; }
.step-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; font-weight: 900; }
.bug-step.is-locked { opacity: .6; }
.bug-step.is-locked .step-n { background: var(--muted); }
.bug-step .option:disabled { cursor: default; }
.bug-step .option:disabled:not(.is-right):not(.is-bad) { opacity: .55; }
.bug-feedback { margin-top: 10px; }
.bad-msg { color: var(--bad); font-weight: 800; }
.editor-formula { min-height: 64px; }
.bug-finish { margin-top: 16px; padding-top: 28px; }
.bug-exp { text-align: left; margin: 14px auto 0; max-width: 620px; padding: 12px 14px; border-radius: 12px; background: var(--ok-bg); border-left: 4px solid var(--ok); color: var(--text); line-height: 1.55; }
.chat-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
@media (max-width: 560px) { .bug-item { flex-wrap: wrap; } .bug-item-body p { white-space: normal; } }
/* Com oito itens no menu, a barra quebra em duas linhas antes de apertar. */
@media (max-width: 1160px) {
  .topbar-inner { flex-wrap: wrap; gap: 8px 12px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .top-stats { margin-left: auto; }
}

/* ---------- Aula antes dos exercícios ---------- */
.aula-player { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.aula-audio { width: 100%; }
.aula-video { width: 100%; border-radius: 14px; margin-bottom: 14px; background: #000; }
.aula-text { font-size: 1.05rem; line-height: 1.7; text-wrap: pretty; }
.aula-text pre.code { margin: .8em 0; font-size: .9rem; }
.aula-modal { width: min(720px, calc(100vw - 24px)); }
.aula-modal .modal-body { max-height: 82vh; overflow-y: auto; }

/* ---------- Contas e painel do master ---------- */
.auth-page .auth-tabs { display: flex; margin: 0 auto 16px; width: fit-content; }
.form-error { color: var(--bad); font-weight: 800; }
.pill-login { background: var(--grad-primary, var(--brand)); color: #fff; border-color: transparent; }
.view-pill { font-size: .8rem; white-space: nowrap; border-color: var(--gold); }
.pw-form { display: grid; gap: 10px; margin-top: 10px; max-width: 420px; }
.view-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; border-color: color-mix(in srgb, var(--gold) 50%, var(--border)); }
.view-options { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-page .stats-card { margin-bottom: 12px; }
.admin-table td, .admin-table th { white-space: nowrap; }
.admin-table .input-sm { min-width: 150px; }
.topbar.two-rows .topbar-inner { flex-wrap: wrap; gap: 8px 12px; }
.topbar.two-rows .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
.topbar.two-rows .top-stats { margin-left: auto; }

/* ---------- Confirmação de apagar progresso ---------- */
.reset-modal { width: min(520px, calc(100vw - 24px)); }
.reset-list { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.reset-list li { display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--bad-bg); }
.reset-list li > span { font-size: 1.3rem; }
.reset-list li div { display: flex; flex-direction: column; }

/* ---------- Nivelamento ---------- */
.placement-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; border-left: 6px solid var(--accent, var(--brand)); }
.placement-card > div:nth-child(2) { flex: 1; min-width: 220px; }
.placement-card p { margin: 2px 0 0; }
.placement-icon { font-size: 1.8rem; }
.placement-rules { text-align: left; max-width: 520px; margin: 16px auto 0; display: grid; gap: 8px; padding-left: 20px; }

/* ---------- Revisão espaçada ---------- */
.daily.spaced { border-left-color: var(--brand); }
.spaced-list { list-style: none; padding: 0; margin: 0 auto 14px; max-width: 560px; display: grid; gap: 8px; text-align: left; }
.spaced-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--border); border-radius: 12px; }
.spaced-list li > div { flex: 1; display: flex; flex-direction: column; }
.spaced-list li.ok .exam-mark { background: var(--ok); }

/* ---------- Cronograma de estudos ---------- */
.week-nav { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day-col { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 150px; }
.day-col header { display: flex; justify-content: space-between; align-items: baseline; font-size: .8rem; font-weight: 800; color: var(--muted); padding: 2px 4px 4px; }
.day-col.today { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.day-col.today header { color: var(--brand); }
.day-col.past { opacity: .8; }
.plan-item { display: flex; align-items: flex-start; gap: 6px; padding: 7px 8px; border-radius: 10px; background: color-mix(in srgb, var(--c, var(--brand)) 14%, var(--surface)); border-left: 4px solid var(--c, var(--brand)); color: var(--text); font-size: .85rem; }
.plan-item.rev { border-left-style: dashed; }
.plan-item.done { opacity: .55; }
.plan-item.done strong { text-decoration: line-through; }
.plan-item.late { outline: 1px dashed var(--bad); }
.plan-item.qp { --c: var(--ok); }
.plan-body { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: break-word; hyphens: auto; line-height: 1.3; }
.plan-actions { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.plan-check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--ok); cursor: pointer; }
.plan-item .link-btn { opacity: .6; padding: 0 2px; }
.plan-item .link-btn:hover { opacity: 1; }
.day-add { margin-top: auto; border: 1px dashed var(--border); background: none; color: var(--muted); border-radius: 10px; padding: 4px; cursor: pointer; font: inherit; font-weight: 900; }
.day-add:hover { border-color: var(--brand); color: var(--brand); }
.schedule-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; align-items: start; }
.timer-clock { font-size: 2.6rem; font-weight: 900; letter-spacing: .02em; margin: 4px 0 8px; }
.course-bars { display: grid; gap: 6px; margin-top: 12px; }
.course-bar { display: grid; grid-template-columns: 90px 1fr auto; gap: 8px; align-items: center; font-size: .82rem; }
.course-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month-head { text-align: center; font-size: .72rem; font-weight: 900; color: var(--muted); }
.month-day { aspect-ratio: 1; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.month-day.out { opacity: .35; }
.month-day.in-week { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.month-day.today { color: var(--brand); font-weight: 900; }
.month-day.has, .month-legend .has { background: color-mix(in srgb, var(--brand) 35%, var(--surface-2)); }
.month-day.all-done, .month-legend .all-done { background: color-mix(in srgb, var(--ok) 45%, var(--surface-2)); }
.month-legend { margin-top: 8px; display: flex; gap: 12px; align-items: center; }
.month-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 4px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.inline-form .field { flex: 1; }
.course-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.course-list li { display: flex; align-items: center; gap: 8px; }
.course-list li span { flex: 1; }
.course-list i { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.plan-modal { width: min(540px, calc(100vw - 24px)); }
.plan-modal .modal-body { display: grid; gap: 10px; }
.form-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.check-row { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
@media (max-width: 900px) { .week-grid { grid-template-columns: 1fr; } .day-col { min-height: 0; } .form-row { grid-template-columns: 1fr; } }

/* ---------- Por que a alternativa está errada ---------- */
.fb-why { margin: 6px 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 70%, transparent); border-left: 4px solid var(--bad); font-weight: 600; }
.fb-why strong { font-weight: 900; }

/* ---------- Cronograma: cronômetro, painel do dia e histórico ---------- */
.schedule-top { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.4fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.timer-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.timer-head h3 { margin: 0; }
.timer-card.running { border-color: var(--ok); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 30%, transparent); }
.timer-card.paused { border-color: var(--warn); }
.timer-card .timer-clock { font-size: 3.2rem; }
.timer-setup { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.day-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 12px 0; }
.day-stats .stat { border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.day-stats .stat-value { font-size: 1.25rem; }
.log-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.log-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.log-list i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.log-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.manual-log summary { cursor: pointer; font-weight: 800; color: var(--brand); }
.log-form { display: grid; grid-template-columns: 1.4fr .7fr 1.2fr auto; gap: 8px; align-items: end; margin-top: 10px; }
.history-card { grid-column: 1 / -1; }
.day-pick { all: unset; display: flex; justify-content: space-between; align-items: baseline; width: 100%; cursor: pointer; box-sizing: border-box; }
.day-pick:hover { color: var(--brand); }
.day-pick:focus-visible { outline: 2px solid var(--brand); border-radius: 6px; }
.day-col.selected { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); border-color: var(--brand); }
.day-time { font-size: .72rem; font-weight: 900; color: var(--ok); padding: 0 4px; }
.month-day.selected { outline: 2px solid var(--brand); font-weight: 900; }
.month-day.studied { box-shadow: inset 0 -4px 0 var(--ok); }
.month-legend .studied { background: var(--surface-2); box-shadow: inset 0 -4px 0 var(--ok); }
@media (max-width: 900px) { .schedule-top { grid-template-columns: 1fr; } .log-form, .timer-setup { grid-template-columns: 1fr; } }

/* ---------- Projeto de fim de módulo ---------- */
.project-card { display: flex; align-items: center; gap: 14px; margin-top: 18px; color: var(--text); border-left: 6px solid var(--accent, var(--brand)); transition: transform .15s; }
a.project-card:hover { transform: translateY(-2px); }
.project-card.locked, .project-card.premium { opacity: .7; }
.project-icon { font-size: 1.8rem; }
.project-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.project-brief .ex-meta { justify-content: center; }
.project-text { text-align: left; max-width: 620px; margin: 14px auto; line-height: 1.6; }
.project-wrap { padding: 14px 16px; border-radius: 12px; background: var(--ok-bg); border-left: 4px solid var(--ok); }
.project-story { margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--accent, var(--brand)); line-height: 1.5; }
.lesson-foot .btn-solution { margin-right: 8px; }

/* ---------- Resumo da semana ---------- */
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 110px; margin: 12px 0 4px; }
.week-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.week-bar span { width: 100%; max-width: 46px; min-height: 4px; border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--brand) 45%, var(--surface-2)); }
.week-bar.goal span { background: var(--ok); }
.week-bar b { font-size: .75rem; color: var(--muted); }
.week-bar.today b { color: var(--brand); }

/* ---------- Menu: grupo "Praticar" ---------- */
.nav-group { position: relative; }
.nav-group-btn { font: inherit; font-weight: 800; color: var(--muted); padding: 8px 9px; border: 0; border-radius: 10px; background: none; cursor: pointer; white-space: nowrap; }
.nav-group-btn:hover { background: var(--surface-2); color: var(--text); }
.nav-group.active > .nav-group-btn { color: #fff; background: var(--grad-primary, var(--brand)); }
.nav-group-items { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 210px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); flex-direction: column; gap: 2px; }
.nav-group.open .nav-group-items { display: flex; }
.nav-group-items a { display: block; }
/* Em telas estreitas o menu rola de lado, então os itens do grupo aparecem direto, sem a caixa suspensa. */
@media (max-width: 1160px) {
  .nav-group { display: contents; }
  .nav-group-btn { display: none; }
  .nav-group-items { display: contents; }
}

/* ---------- Painel do master: evolução por semana ---------- */
.admin-chart { --c1: #1e7bb4; --c2: #e2621f; }
:root[data-theme="dark"] .admin-chart { --c1: #1d9cd1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .admin-chart { --c1: #1d9cd1; } }
.wk-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.wk-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.wk-legend .c1, .wk-bar.c1 { background: var(--c1); }
.wk-legend .c2, .wk-bar.c2 { background: var(--c2); }
.wk-plot { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; height: 200px; padding-top: 22px; border-bottom: 1px solid var(--border); }
.wk-group { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.wk-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.wk-bar { position: relative; width: 42%; max-width: 26px; min-height: 2px; border-radius: 4px 4px 0 0; }
.wk-bar:hover { filter: brightness(1.15); }
.wk-bar b { position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); font-size: .75rem; font-weight: 800; color: var(--text); }
.wk-label { text-align: center; font-size: .75rem; color: var(--muted); padding: 4px 0; margin-bottom: -26px; }
.wk-table { margin-top: 32px; }
.wk-table summary { cursor: pointer; font-weight: 800; color: var(--brand); margin-bottom: 8px; }

/* ---------- Segurança da conta ---------- */
.security-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.security-box h4 { margin: 0 0 8px; }
.twofa-setup { margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.twofa-key, .twofa-codes { font-size: 1rem; letter-spacing: .06em; user-select: all; }

/* ---------- Termos e Política de privacidade ---------- */
.legal-body h2 { font-size: 1.05rem; margin: 22px 0 8px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { line-height: 1.6; }
.legal-body ul { padding-left: 20px; margin: 0 0 8px; }
.legal-body li + li { margin-top: 6px; }
.check-line { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 12px; cursor: pointer; }
.check-line input { margin-top: 3px; flex: none; }
.site-footer { text-align: center; font-size: .85rem; color: var(--muted); padding: 24px 16px 32px; }
.site-footer a { color: inherit; }
body.focus-mode .site-footer { display: none; }

/* ---------- Escolha do pagamento ---------- */
.pay-options { display: grid; gap: 10px; margin: 12px 0; }
.pay-option { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; cursor: pointer; border: 2px solid var(--border); font: inherit; color: inherit; }
.pay-option:hover, .pay-option:focus-visible { border-color: var(--brand); }
.pay-page #card-brick { min-height: 120px; }
