/* =====================================================================
   LMS — área do aluno (mobile-first)
   ===================================================================== */
:root {
  --bg: #0a0a0f;
  --bg-elev: #111118;
  --surface: #16161f;
  --surface-2: #1e1e29;
  --surface-3: #282836;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #f4f4f7;
  --text-2: #c9c9d3;
  --muted: #8e8e9d;
  --success: #22c55e;
  --warning: #f5b301;
  --danger: #ef4444;
  --overlay: 10, 10, 15;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 60px;
  --tabbar-h: 64px;
  --gutter: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f5f8;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f0f4;
  --surface-3: #e5e5ec;
  --border: rgba(10, 10, 30, .08);
  --border-strong: rgba(10, 10, 30, .16);
  --text: #111118;
  --text-2: #33333f;
  --muted: #6b6b7a;
  --overlay: 245, 245, 248;
  --shadow: 0 10px 30px rgba(20, 20, 50, .12);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --bg: #f5f5f8; --bg-elev: #fff; --surface: #fff; --surface-2: #f0f0f4; --surface-3: #e5e5ec;
    --border: rgba(10,10,30,.08); --border-strong: rgba(10,10,30,.16); --text: #111118; --text-2: #33333f;
    --muted: #6b6b7a; --overlay: 245, 245, 248; --shadow: 0 10px 30px rgba(20,20,50,.12); color-scheme: light;
  }
}
@media (min-width: 768px) { :root { --gutter: 32px; --header-h: 68px; } }
@media (min-width: 1280px) { :root { --gutter: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
}
@media (min-width: 1024px) { body { padding-bottom: 0; } }
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }
.container { padding-inline: var(--gutter); max-width: 1600px; margin-inline: auto; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.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: .55rem;
  min-height: 46px; padding: 0 1.25rem; border-radius: 12px; border: 1px solid transparent;
  font-weight: 650; font-size: .95rem; white-space: nowrap; transition: transform .15s, background .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(var(--brand-rgb), .35); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-light { background: #fff; color: #111; }
.btn-light:hover { background: #e9e9ee; }
.btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .22); }
.btn-soft { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-soft:hover { background: var(--surface-3); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 .9rem; font-size: .85rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 0 1.75rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-icon { width: 46px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%;
  background: transparent; border: 0; color: var(--text); position: relative; font-size: 1.05rem;
}
.icon-btn:hover { background: var(--surface-2); }
.badge-dot {
  position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center;
}

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: calc(var(--header-h) + var(--safe-t)); padding-top: var(--safe-t);
  display: flex; align-items: center; gap: 1rem; padding-inline: var(--gutter);
  background: rgba(var(--overlay), .86); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border); transition: background .3s, border-color .3s;
}
.site-header.is-transparent { position: fixed; inset: 0 0 auto 0; background: linear-gradient(to bottom, rgba(0,0,0,.65), transparent); border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; }
.site-header.is-transparent .icon-btn, .site-header.is-transparent .nav-links a { color: #fff; }
.site-header.is-transparent.scrolled { background: rgba(var(--overlay), .92); border-color: var(--border); color: var(--text); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.site-header.is-transparent.scrolled .icon-btn, .site-header.is-transparent.scrolled .nav-links a { color: var(--text); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; flex-shrink: 0; }
.brand img { height: 30px; width: auto; }
@media (min-width: 768px) { .brand img { height: 36px; } }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .95rem; }
.nav-links { display: none; gap: .25rem; margin-left: 1.25rem; }
.nav-links a { padding: .5rem .85rem; border-radius: 10px; color: var(--text-2); font-weight: 550; font-size: .92rem; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); font-weight: 700; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
.header-avatar { margin-left: .35rem; border: 0; background: none; padding: 2px; border-radius: 50%; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-initials { display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; font-size: .8rem; }
.avatar-lg { width: 84px; height: 84px; font-size: 1.6rem; }
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }

/* Busca no header (desktop) */
.header-search { display: none; position: relative; }
.header-search input {
  width: 240px; height: 40px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface-2);
  padding: 0 1rem 0 2.4rem; outline: none; transition: width .25s, border-color .2s;
}
.header-search input:focus { width: 300px; border-color: rgba(var(--brand-rgb), .6); }
.header-search i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
@media (min-width: 1024px) { .header-search { display: block; } .only-mobile { display: none !important; } }
@media (max-width: 1023px) { .only-desktop { display: none !important; } }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: .4rem; display: none; z-index: 60; color: var(--text);
}
.dropdown.open .dropdown-menu { display: block; animation: pop .16s ease-out; }
.dropdown-menu a, .dropdown-menu button.menu-item {
  display: flex; align-items: center; gap: .75rem; width: 100%; padding: .65rem .8rem; border-radius: 10px; font-size: .92rem;
  background: none; border: 0; text-align: left; color: var(--text);
}
.dropdown-menu a:hover, .dropdown-menu button.menu-item:hover { background: var(--surface-2); }
.dropdown-menu i { width: 18px; text-align: center; color: var(--muted); }
.dropdown-head { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem .8rem; border-bottom: 1px solid var(--border); margin-bottom: .35rem; }
.dropdown-head strong { display: block; font-size: .95rem; }
.dropdown-head small { color: var(--muted); }
.menu-sep { height: 1px; background: var(--border); margin: .35rem 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

.notif-menu { width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; padding: 0; }
.notif-menu .notif-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-elev); }
.notif-item { display: flex; gap: .8rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: rgba(var(--brand-rgb), .07); }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(var(--brand-rgb), .15); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.notif-item strong { font-size: .88rem; display: block; line-height: 1.3; }
.notif-item small { color: var(--muted); font-size: .78rem; }
.notif-empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------------
   Tab bar inferior (mobile/tablet)
   --------------------------------------------------------------------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 55; height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(var(--overlay), .94);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-top: 1px solid var(--border);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: .68rem; font-weight: 600; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.tabbar a i { font-size: 1.15rem; }
.tabbar a.active { color: var(--text); }
.tabbar a.active i { color: var(--brand); }
@media (min-width: 1024px) { .tabbar { display: none; } }

/* ---------------------------------------------------------------------
   Hero (carrossel de destaque)
   --------------------------------------------------------------------- */
.hero { position: relative; height: min(88svh, 760px); min-height: 520px; overflow: hidden; background: #000; color: #fff; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; transform: scale(1.04); transition: transform 8s ease-out; }
.hero-slide.active .hero-bg { transform: scale(1); }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 2%, rgba(0,0,0,.55) 38%, rgba(0,0,0,.15) 70%, rgba(0,0,0,.45) 100%);
}
@media (min-width: 768px) {
  .hero-bg::after { background: linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 40%, transparent 70%), linear-gradient(to top, var(--bg) 0%, transparent 35%); }
}
.hero-content {
  position: absolute; inset: auto 0 0 0; padding: 0 var(--gutter) 3.2rem; max-width: 720px;
  display: flex; flex-direction: column; gap: .9rem;
}
@media (min-width: 768px) { .hero-content { bottom: 18%; padding-bottom: 0; } }
.hero-kicker { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.85); }
.hero-kicker .pill { background: var(--brand); color: #fff; padding: .2rem .55rem; border-radius: 6px; letter-spacing: .04em; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.8rem); font-weight: 800; text-shadow: 0 2px 30px rgba(0,0,0,.4); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; font-size: .88rem; color: rgba(255,255,255,.85); font-weight: 500; }
.hero-meta i { opacity: .8; margin-right: .3rem; }
.hero-desc { color: rgba(255,255,255,.82); font-size: .95rem; max-width: 560px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 768px) { .hero-desc { font-size: 1.05rem; } }
.hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .3rem; }
.hero-actions .btn-primary { flex: 1 1 auto; }
@media (min-width: 768px) { .hero-actions .btn-primary { flex: 0 0 auto; } }
.hero-dots { position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
@media (min-width: 768px) { .hero-dots { left: auto; right: var(--gutter); transform: none; bottom: 18%; } }
.hero-dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; background: rgba(255,255,255,.4); padding: 0; transition: width .3s, background .3s; }
.hero-dots button.active { width: 24px; background: #fff; }
.hero-progress { margin-top: .2rem; display: flex; align-items: center; gap: .75rem; font-size: .82rem; color: rgba(255,255,255,.85); }
.hero-progress .bar { width: 140px; }

/* Barra de progresso */
.bar { height: 4px; background: rgba(255,255,255,.2); border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .4s; }
.bar.on-surface { background: var(--surface-3); }
.bar.lg { height: 8px; }

/* ---------------------------------------------------------------------
   Carrosséis (linhas estilo Netflix)
   --------------------------------------------------------------------- */
.rows { position: relative; z-index: 2; padding-bottom: 2rem; }
.hero + .rows { margin-top: -1.5rem; }
@media (min-width: 768px) { .hero + .rows { margin-top: -6rem; } }
.row { margin-bottom: 2rem; }
@media (min-width: 768px) { .row { margin-bottom: 2.75rem; } }
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-inline: var(--gutter); margin-bottom: .85rem; }
.row-head h2 { font-size: 1.12rem; font-weight: 750; }
@media (min-width: 768px) { .row-head h2 { font-size: 1.35rem; } }
.row-head p { color: var(--muted); font-size: .82rem; margin-top: .2rem; }
.row-head a.see-all { color: var(--muted); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.row-head a.see-all:hover { color: var(--text); }
.row-track-wrap { position: relative; }
.row-track {
  display: grid; grid-auto-flow: column; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 4px var(--gutter) 12px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > * { scroll-snap-align: start; }
@media (min-width: 768px) { .row-track { gap: 14px; } }
.row-track.cards-wide { grid-auto-columns: 78%; }
.row-track.cards-poster { grid-auto-columns: 42%; }
.row-track.cards-continue { grid-auto-columns: 84%; }
@media (min-width: 600px) { .row-track.cards-wide { grid-auto-columns: 46%; } .row-track.cards-poster { grid-auto-columns: 28%; } .row-track.cards-continue { grid-auto-columns: 58%; } }
@media (min-width: 1024px) { .row-track.cards-wide { grid-auto-columns: calc((100% - 3 * 14px - 2 * var(--gutter)) / 4); } .row-track.cards-poster { grid-auto-columns: calc((100% - 5 * 14px - 2 * var(--gutter)) / 6); } .row-track.cards-continue { grid-auto-columns: calc((100% - 2 * 14px - 2 * var(--gutter)) / 3); } }
@media (min-width: 1600px) { .row-track.cards-wide { grid-auto-columns: calc((100% - 4 * 14px - 2 * var(--gutter)) / 5); } }
.row-arrow {
  display: none; position: absolute; top: 4px; bottom: 12px; width: calc(var(--gutter) - 6px); border: 0; z-index: 4;
  background: rgba(var(--overlay), .7); color: var(--text); font-size: 1.3rem; opacity: 0; transition: opacity .2s;
}
.row-arrow.prev { left: 0; border-radius: 0 8px 8px 0; }
.row-arrow.next { right: 0; border-radius: 8px 0 0 8px; }
@media (hover: hover) and (min-width: 1024px) { .row-arrow { display: block; } .row-track-wrap:hover .row-arrow { opacity: 1; } }

/* Cards */
.card { position: relative; display: block; border-radius: var(--radius-sm); -webkit-tap-highlight-color: transparent; }
.card-media { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); aspect-ratio: 16 / 9; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-poster .card-media { aspect-ratio: 2 / 3; }
.card-media .ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, rgba(var(--brand-rgb), .55), rgba(var(--brand-2-rgb), .55)); color: #fff; font-weight: 800; font-size: 1.05rem; text-align: center; padding: 1rem; }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6), transparent 45%); pointer-events: none; }
.card-tags { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; z-index: 2; }
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .5rem; border-radius: 6px; font-size: .68rem; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tag-brand { background: var(--brand); }
.tag-free { background: var(--success); }
.tag-done { background: rgba(34, 197, 94, .9); }
.card-play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; opacity: 0; transition: opacity .2s; }
.card-play span { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.92); color: #111; display: grid; place-items: center; font-size: 1rem; padding-left: 3px; box-shadow: var(--shadow); }
.card:hover .card-play { opacity: 1; }
.card-continue .card-play, .card-lesson .card-play { opacity: 1; }
.card-progress { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 2; }
.card-body { padding: .6rem .15rem 0; }
.card-title { font-weight: 650; font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { color: var(--muted); font-size: .78rem; margin-top: .2rem; display: flex; gap: .55rem; flex-wrap: wrap; }
.card-overlay-title { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; color: #fff; font-weight: 800; font-size: 1rem; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.card-poster .card-overlay-title { font-size: .95rem; }
.card-poster .card-media::after { background: linear-gradient(to top, rgba(0,0,0,.85), transparent 55%); }
.card-price { font-weight: 700; color: var(--text); }

/* Grid (catálogo, meus cursos) */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.grid.grid-wide { grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); } .grid.grid-wide { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(5, 1fr); gap: 18px; } .grid.grid-wide { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1440px) { .grid { grid-template-columns: repeat(6, 1fr); } .grid.grid-wide { grid-template-columns: repeat(4, 1fr); } }

/* ---------------------------------------------------------------------
   Páginas internas
   --------------------------------------------------------------------- */
.page { padding-top: 1.25rem; padding-bottom: 3rem; }
@media (min-width: 768px) { .page { padding-top: 2rem; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; }
.page-head p { color: var(--muted); margin-top: .35rem; }
.chips { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: .5rem 1rem; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); font-size: .85rem; font-weight: 600; color: var(--text-2); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-pad { padding: 1.25rem; }
@media (min-width: 768px) { .panel-pad { padding: 1.75rem; } }
.empty { text-align: center; padding: 3.5rem 1rem; color: var(--muted); }
.empty i { font-size: 2.4rem; margin-bottom: 1rem; opacity: .6; }
.empty h3 { color: var(--text); margin-bottom: .4rem; }
.search-big { position: relative; margin-bottom: 1rem; }
.search-big input { width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); padding: 0 1rem 0 2.9rem; font-size: 1rem; outline: none; }
.search-big input:focus { border-color: rgba(var(--brand-rgb), .6); }
.search-big i { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------------------------------------------------------------------
   Página do curso
   --------------------------------------------------------------------- */
.course-hero { position: relative; color: #fff; background: #000; overflow: hidden; }
.course-hero .hero-bg::after { background: linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.35) 100%); }
@media (min-width: 900px) { .course-hero .hero-bg::after { background: linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 45%, transparent 80%), linear-gradient(to top, var(--bg) 0%, transparent 40%); } }
.course-hero-inner { position: relative; z-index: 2; padding: calc(var(--header-h) + var(--safe-t) + 9rem) var(--gutter) 2rem; max-width: 780px; display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 900px) { .course-hero-inner { padding-top: calc(var(--header-h) + 6rem); padding-bottom: 4rem; min-height: 620px; justify-content: flex-end; } }
.course-hero h1 { font-size: clamp(1.9rem, 6vw, 3.4rem); font-weight: 800; }
.course-hero .subtitle { color: rgba(255,255,255,.85); font-size: 1rem; max-width: 620px; }
.back-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: rgba(255,255,255,.9); font-size: .92rem; }
.course-progress { display: flex; align-items: center; gap: .8rem; font-size: .85rem; font-weight: 600; }
.course-progress .bar { width: 180px; }
.price-box { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.price-box .price { font-size: 1.6rem; font-weight: 800; }
.price-box .old { text-decoration: line-through; color: rgba(255,255,255,.6); }
.price-box small { color: rgba(255,255,255,.75); }

.course-layout { display: grid; gap: 1.5rem; padding-top: 1.5rem; padding-bottom: 3rem; }
@media (min-width: 1024px) { .course-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 2.5rem; } }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { flex-shrink: 0; background: none; border: 0; padding: .85rem 1rem; font-weight: 650; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .93rem; display: inline-flex; align-items: center; gap: .45rem; }
.tabs button.active, .tabs a.active { color: var(--text); border-color: var(--brand); }
.tabs .count { background: var(--surface-3); color: var(--text-2); border-radius: 10px; padding: 0 .45rem; font-size: .72rem; line-height: 1.5; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.module { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: .75rem; overflow: hidden; }
.module-head { display: flex; align-items: center; gap: .9rem; padding: 1rem; width: 100%; background: none; border: 0; text-align: left; -webkit-tap-highlight-color: transparent; }
.module-num { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.module-num.done { background: rgba(34,197,94,.15); color: var(--success); }
.module-info { flex: 1; min-width: 0; }
.module-info strong { display: block; font-size: .98rem; }
.module-info .meta { display: flex; align-items: center; gap: .6rem; margin-top: .35rem; font-size: .78rem; color: var(--muted); }
.module-info .bar { width: 110px; }
.module-chevron { color: var(--muted); transition: transform .25s; }
.module.open .module-chevron { transform: rotate(180deg); }
.module-body { display: none; border-top: 1px solid var(--border); }
.module.open .module-body { display: block; }
.module-lock { font-size: .78rem; color: var(--warning); display: inline-flex; align-items: center; gap: .35rem; }

.lesson-item { display: flex; align-items: center; gap: .85rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); position: relative; -webkit-tap-highlight-color: transparent; }
.lesson-item:last-child { border-bottom: 0; }
.lesson-item:hover { background: var(--surface-2); }
.lesson-item.current { background: rgba(var(--brand-rgb), .1); }
.lesson-item.current::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.lesson-item.locked { opacity: .62; }
.lesson-thumb { position: relative; width: 96px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--surface-3); flex-shrink: 0; }
.lesson-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lesson-thumb .ico { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .9rem; background: rgba(0,0,0,.25); }
.lesson-thumb .dur { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.75); color: #fff; font-size: .66rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.lesson-thumb .bar { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0; height: 3px; }
.lesson-thumb.vertical-badge::after { content: "\f3cd"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 5px; top: 4px; font-size: .7rem; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.lesson-text { flex: 1; min-width: 0; }
.lesson-text strong { display: block; font-size: .9rem; font-weight: 600; line-height: 1.3; }
.lesson-text small { color: var(--muted); font-size: .76rem; display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .2rem; }
.lesson-text small.lock { color: var(--warning); }
.lesson-status { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; font-size: .7rem; flex-shrink: 0; color: transparent; }
.lesson-status.done { background: var(--success); border-color: var(--success); color: #fff; }
.lesson-status.lock { border: 0; color: var(--muted); font-size: .85rem; }

.side-card { position: sticky; top: calc(var(--header-h) + 1rem); display: flex; flex-direction: column; gap: 1rem; }
.stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.stat-list div { background: var(--surface-2); border-radius: 12px; padding: .8rem; }
.stat-list strong { display: block; font-size: 1.1rem; }
.stat-list span { font-size: .75rem; color: var(--muted); }
.instructor { display: flex; gap: .9rem; align-items: center; }
.rich { color: var(--text-2); line-height: 1.75; font-size: .97rem; overflow-wrap: anywhere; }
.rich h1, .rich h2, .rich h3 { color: var(--text); margin: 1.5rem 0 .6rem; }
.rich p { margin: 0 0 1rem; }
.rich a { color: var(--brand); text-decoration: underline; }
.rich img { border-radius: 12px; margin: 1rem 0; height: auto; }
.rich ul, .rich ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.rich iframe { width: 100%; aspect-ratio: 16/9; height: auto; border-radius: 12px; border: 0; }
.rich table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.rich td, .rich th { border: 1px solid var(--border); padding: .5rem .75rem; }
.rich figure { margin: 1rem 0; }
.rich figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
.learn-list { display: grid; gap: .6rem; padding: 0; list-style: none; margin: 0; }
@media (min-width: 700px) { .learn-list { grid-template-columns: 1fr 1fr; } }
.learn-list li { display: flex; gap: .65rem; color: var(--text-2); }
.learn-list li i { color: var(--success); margin-top: .3rem; }

/* ---------------------------------------------------------------------
   Player da aula
   --------------------------------------------------------------------- */
.lesson-page { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .lesson-page { grid-template-columns: minmax(0, 1fr) 400px; min-height: calc(100vh - var(--header-h)); } }
.lesson-main { min-width: 0; }
@media (min-width: 1024px) { .lesson-main { padding: 1.5rem 2rem 3rem; } }
.player-wrap { position: sticky; top: calc(var(--header-h) + var(--safe-t)); z-index: 20; background: #000; }
@media (min-width: 768px) { .player-wrap { position: relative; top: 0; } }
@media (min-width: 1024px) { .player-wrap { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); } }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player iframe, .player video, .player > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Reels / TikTok / Shorts — 9:16 */
.player-wrap.vertical { background: #000; display: flex; justify-content: center; }
.player-wrap.vertical .player { aspect-ratio: 9 / 16; width: auto; height: min(78svh, 760px); max-width: 100%; }
@media (max-width: 767px) { .player-wrap.vertical { position: relative; top: 0; } .player-wrap.vertical .player { height: auto; width: 100%; max-height: none; } }
@media (min-width: 1024px) { .player-wrap.vertical { background: radial-gradient(ellipse at center, #1a1a22 0%, #000 70%); padding: 1rem 0; } .player-wrap.vertical .player { border-radius: 14px; overflow: hidden; } }
.player-wrap.vertical .player.instagram { aspect-ratio: auto; height: auto; min-height: 640px; }
.player-wrap.vertical .player.instagram iframe { position: relative; min-height: 640px; height: 100%; }
.player-locked { position: relative; aspect-ratio: 16/9; display: grid; place-items: center; text-align: center; color: #fff; background: #000; overflow: hidden; }
.player-locked .hero-bg { filter: blur(14px) brightness(.4); }
.player-locked .content { position: relative; z-index: 2; padding: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: .8rem; max-width: 460px; }
.player-locked .lock-ico { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 1.5rem; }
.resume-toast { position: absolute; left: 12px; bottom: 56px; z-index: 5; background: rgba(0,0,0,.8); color: #fff; padding: .55rem .9rem; border-radius: 10px; font-size: .82rem; display: flex; gap: .7rem; align-items: center; }
.resume-toast button { background: var(--brand); color: #fff; border: 0; border-radius: 7px; padding: .3rem .65rem; font-weight: 700; font-size: .78rem; }

.lesson-head { padding: 1rem var(--gutter) 0; }
@media (min-width: 1024px) { .lesson-head { padding: 1.25rem 0 0; } }
.crumb { font-size: .8rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.crumb a:hover { color: var(--text); }
.lesson-head h1 { font-size: clamp(1.25rem, 3.6vw, 1.85rem); font-weight: 800; margin-top: .35rem; }
.lesson-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: 1rem var(--gutter); border-bottom: 1px solid var(--border); }
@media (min-width: 1024px) { .lesson-actions { padding: 1rem 0; } }
.lesson-actions .grow { flex: 1; }
.btn-complete.done { background: rgba(34,197,94,.14); color: var(--success); border-color: rgba(34,197,94,.35); }
.stars { display: inline-flex; gap: 2px; }
.stars button { background: none; border: 0; padding: 4px 2px; color: var(--surface-3); font-size: 1.1rem; transition: transform .15s; }
.stars button.on { color: #f5b301; }
.stars button:hover { transform: scale(1.15); }
.xp-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .65rem; border-radius: 8px; background: rgba(var(--brand-rgb), .12); color: var(--brand); font-weight: 700; font-size: .8rem; }
.lesson-tabs-wrap { padding: 0 var(--gutter) 2rem; }
@media (min-width: 1024px) { .lesson-tabs-wrap { padding: 0 0 2rem; } }
.lesson-tabs-wrap .tabs { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
@media (min-width: 768px) { .lesson-tabs-wrap .tabs { position: static; margin-inline: 0; padding-inline: 0; } }
.nav-lessons { display: flex; gap: .5rem; }

.lesson-side { border-left: 1px solid var(--border); background: var(--bg-elev); display: none; }
@media (min-width: 1024px) { .lesson-side { display: flex; flex-direction: column; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); } }
.lesson-side-head { padding: 1.1rem 1.1rem .8rem; border-bottom: 1px solid var(--border); }
.lesson-side-head strong { display: block; font-size: 1rem; }
.lesson-side-scroll { overflow-y: auto; flex: 1; padding: .75rem; }
.lesson-side .module { margin-bottom: .6rem; }
.lesson-side .lesson-thumb { width: 84px; }
.side-search { position: relative; margin-top: .75rem; }
.side-search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); padding: 0 .9rem 0 2.2rem; outline: none; font-size: .88rem; }
.side-search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; }

/* Materiais */
.materials { display: grid; gap: .6rem; }
.material { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.material:hover { border-color: rgba(var(--brand-rgb), .5); }
.material .ico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--brand-rgb), .12); color: var(--brand); flex-shrink: 0; font-size: 1.05rem; }
.material .ico.link { background: rgba(var(--brand-2-rgb), .14); color: var(--brand-2); }
.material strong { display: block; font-size: .92rem; overflow-wrap: anywhere; }
.material small { color: var(--muted); font-size: .76rem; }
.material .go { margin-left: auto; color: var(--muted); }

/* Anotações */
.note-form { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.25rem; }
.note-form textarea, .comment-form textarea, .field textarea {
  width: 100%; min-height: 96px; resize: vertical; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  padding: .85rem 1rem; outline: none; line-height: 1.5;
}
.note-form textarea:focus, .comment-form textarea:focus { border-color: rgba(var(--brand-rgb), .6); }
.note-form .row-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.check-inline { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--text-2); }
.note { padding: .9rem 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin-bottom: .6rem; }
.note-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; font-size: .78rem; color: var(--muted); }
.note-time { background: rgba(var(--brand-rgb), .14); color: var(--brand); border: 0; padding: .2rem .55rem; border-radius: 6px; font-weight: 700; font-size: .75rem; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; }
.note-del { margin-left: auto; background: none; border: 0; color: var(--muted); padding: .2rem .4rem; }
.note-del:hover { color: var(--danger); }

/* Comentários */
.comment { display: flex; gap: .8rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment .body { flex: 1; min-width: 0; }
.comment .who { font-size: .86rem; font-weight: 700; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.comment .who small { font-weight: 500; color: var(--muted); }
.comment .txt { margin-top: .3rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; color: var(--text-2); }
.comment .replies { margin-top: .4rem; padding-left: .25rem; }
.comment .replies .comment { border-bottom: 0; padding: .6rem 0; }
.comment .reply-btn { background: none; border: 0; color: var(--muted); font-size: .8rem; font-weight: 600; padding: .4rem 0 0; }
.staff-badge { background: var(--brand); color: #fff; font-size: .65rem; padding: .1rem .45rem; border-radius: 5px; font-weight: 700; }
.comment-form { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.comment-form textarea { min-height: 70px; }

/* ---------------------------------------------------------------------
   Formulários / auth
   --------------------------------------------------------------------- */
.auth-wrap { min-height: 100svh; display: grid; place-items: center; padding: 1.5rem var(--gutter); position: relative; overflow: hidden; }
.auth-wrap::before { content: ""; position: absolute; inset: 0; background: radial-gradient(800px 500px at 15% 10%, rgba(var(--brand-rgb), .22), transparent 60%), radial-gradient(700px 500px at 90% 90%, rgba(var(--brand-2-rgb), .2), transparent 60%); }
.auth-card { position: relative; width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2rem 1.5rem; box-shadow: var(--shadow); }
@media (min-width: 500px) { .auth-card { padding: 2.5rem 2.25rem; } }
.auth-card .brand { justify-content: center; margin-bottom: 1.5rem; }
.auth-card h1 { font-size: 1.5rem; text-align: center; }
.auth-card .lead { text-align: center; color: var(--muted); margin: .4rem 0 1.5rem; font-size: .92rem; }
.auth-foot { text-align: center; margin-top: 1.25rem; font-size: .9rem; color: var(--muted); }
.auth-foot a { color: var(--brand); font-weight: 600; }
body.auth-body { padding-bottom: 0; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.input, .field input, .field select {
  width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  padding: 0 1rem; outline: none; font-size: 16px; /* evita zoom no iOS */ transition: border-color .2s;
}
.input:focus, .field input:focus, .field select:focus { border-color: rgba(var(--brand-rgb), .7); }
.field small { color: var(--muted); font-size: .78rem; }
.form-grid { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.alert { padding: .85rem 1rem; border-radius: 12px; font-size: .9rem; margin-bottom: 1rem; display: flex; gap: .6rem; align-items: flex-start; }
.alert-success { background: rgba(34,197,94,.12); color: #16a34a; border: 1px solid rgba(34,197,94,.3); }
.alert-error { background: rgba(239,68,68,.12); color: #ef4444; border: 1px solid rgba(239,68,68,.3); }
.alert-info { background: rgba(var(--brand-2-rgb), .12); color: var(--brand-2); border: 1px solid rgba(var(--brand-2-rgb), .3); }
.alert-warning { background: rgba(245,179,1,.12); color: #c48f00; border: 1px solid rgba(245,179,1,.3); }
:root[data-theme="dark"] .alert-success { color: #4ade80; }

/* ---------------------------------------------------------------------
   Prova
   --------------------------------------------------------------------- */
.quiz { max-width: 820px; margin: 0 auto; }
.quiz-top { position: sticky; top: calc(var(--header-h) + var(--safe-t)); z-index: 15; background: rgba(var(--overlay), .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: .85rem 0; margin-bottom: 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 1rem; }
.quiz-top .bar { flex: 1; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; display: inline-flex; align-items: center; gap: .4rem; }
.timer.low { color: var(--danger); }
.question { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
@media (min-width: 768px) { .question { padding: 1.6rem; } }
.question-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .78rem; color: var(--muted); margin-bottom: .6rem; font-weight: 600; }
.question .enunciado { font-size: 1.02rem; font-weight: 600; margin-bottom: 1rem; line-height: 1.55; }
.option { display: flex; align-items: flex-start; gap: .8rem; padding: .9rem 1rem; border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: .55rem; cursor: pointer; transition: border-color .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.option:hover { border-color: var(--border-strong); }
.option input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.option:has(input:checked) { border-color: var(--brand); background: rgba(var(--brand-rgb), .08); }
.option.correct { border-color: var(--success); background: rgba(34,197,94,.1); }
.option.wrong { border-color: var(--danger); background: rgba(239,68,68,.08); }
.option .mark { margin-left: auto; font-size: .78rem; font-weight: 700; }
.question textarea { width: 100%; min-height: 160px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); padding: .9rem 1rem; outline: none; resize: vertical; }
.feedback-box { margin-top: .8rem; padding: .85rem 1rem; border-radius: 10px; background: var(--surface-2); font-size: .9rem; color: var(--text-2); }
.feedback-box strong { color: var(--text); }
.result-hero { text-align: center; padding: 2rem 1rem; }
.score-ring { --p: 0; width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 1.25rem; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--surface) 79%, transparent 80% 100%), conic-gradient(var(--ring, var(--brand)) calc(var(--p) * 1%), var(--surface-3) 0); }
.score-ring strong { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.score-ring small { display: block; color: var(--muted); font-size: .8rem; text-align: center; }
.status-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 20px; font-weight: 700; font-size: .82rem; }
.status-pill.ok { background: rgba(34,197,94,.14); color: var(--success); }
.status-pill.fail { background: rgba(239,68,68,.12); color: var(--danger); }
.status-pill.wait { background: rgba(245,179,1,.14); color: var(--warning); }
.attempts { width: 100%; border-collapse: collapse; font-size: .9rem; }
.attempts td, .attempts th { padding: .7rem .5rem; border-bottom: 1px solid var(--border); text-align: left; }
.attempts th { color: var(--muted); font-weight: 600; font-size: .78rem; }
.quiz-intro { display: grid; gap: 1rem; }
.quiz-rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .quiz-rules { grid-template-columns: repeat(4, 1fr); } }
.quiz-rules div { background: var(--surface-2); border-radius: 12px; padding: .9rem; text-align: center; }
.quiz-rules strong { display: block; font-size: 1.25rem; }
.quiz-rules span { font-size: .75rem; color: var(--muted); }

/* ---------------------------------------------------------------------
   Conquistas / perfil
   --------------------------------------------------------------------- */
.profile-hero { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.level-card { background: linear-gradient(135deg, rgba(var(--brand-rgb), .9), rgba(var(--brand-2-rgb), .9)); color: #fff; border-radius: 18px; padding: 1.4rem; position: relative; overflow: hidden; }
.level-card::after { content: "\f091"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; right: -10px; bottom: -30px; font-size: 9rem; opacity: .12; }
.level-card .lvl { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.level-card .bar { background: rgba(255,255,255,.25); margin-top: .8rem; }
.level-card .bar > span { background: #fff; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 768px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; }
.kpi i { color: var(--brand); }
.kpi strong { display: block; font-size: 1.5rem; font-weight: 800; margin-top: .35rem; }
.kpi span { font-size: .78rem; color: var(--muted); }
.trophies { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .trophies { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .trophies { grid-template-columns: repeat(5, 1fr); } }
.trophy { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.25rem 1rem; text-align: center; position: relative; }
.trophy .medal { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto .8rem; display: grid; place-items: center; font-size: 1.6rem; color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.trophy strong { display: block; font-size: .92rem; }
.trophy small { color: var(--muted); font-size: .76rem; display: block; margin-top: .25rem; }
.trophy.locked .medal { background: var(--surface-3) !important; color: var(--muted); box-shadow: none; }
.trophy.locked strong { color: var(--muted); }
.ranking li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.ranking { list-style: none; margin: 0; padding: 0; }
.ranking .pos { width: 28px; font-weight: 800; color: var(--muted); text-align: center; }
.ranking li.me { background: rgba(var(--brand-rgb), .08); border-radius: 10px; padding-inline: .5rem; }
.ranking .xp { margin-left: auto; font-weight: 700; font-size: .88rem; }

/* Certificado (lista) */
.cert-card { display: flex; gap: 1rem; align-items: center; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.cert-card .ico { width: 54px; height: 54px; border-radius: 12px; background: linear-gradient(135deg, #f5b301, #f97316); display: grid; place-items: center; color: #fff; font-size: 1.4rem; flex-shrink: 0; }
.cert-card .info { flex: 1; min-width: 0; }
.cert-card strong { display: block; }
.cert-card small { color: var(--muted); }

/* ---------------------------------------------------------------------
   Toasts & modais
   --------------------------------------------------------------------- */
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); display: flex; flex-direction: column; gap: .5rem; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
@media (min-width: 1024px) { .toasts { left: auto; right: 24px; transform: none; bottom: 24px; } }
.toast { pointer-events: auto; display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow); animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2); }
.toast .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--brand-rgb), .15); color: var(--brand); flex-shrink: 0; }
.toast.trophy-toast .ico { color: #fff; }
.toast strong { display: block; font-size: .9rem; }
.toast small { color: var(--muted); font-size: .8rem; }
.toast.error .ico { background: rgba(239,68,68,.15); color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; transform: none; } }
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.6); display: none; align-items: flex-end; justify-content: center; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-backdrop.open { display: flex; }
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 1rem; } }
.modal { background: var(--bg-elev); width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 1.5rem var(--gutter) calc(1.5rem + var(--safe-b)); max-height: 90svh; overflow-y: auto; animation: sheetUp .3s ease-out; }
@media (min-width: 640px) { .modal { border-radius: 20px; padding: 1.75rem; } }
.modal h3 { font-size: 1.2rem; margin-bottom: .5rem; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Celebração de conclusão */
.celebrate { text-align: center; }
.celebrate .big { font-size: 3.5rem; margin-bottom: .5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem var(--gutter); color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.site-footer a:hover { color: var(--text); }

/* Lista "Meus cursos" com progresso */
.my-course { display: flex; gap: .9rem; align-items: center; padding: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.my-course .thumb { width: 120px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--surface-3); }
.my-course .thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-course .info { flex: 1; min-width: 0; }
.my-course strong { display: block; line-height: 1.3; }
.my-course .bar { margin-top: .55rem; }
.my-course small { color: var(--muted); font-size: .78rem; }
@media (min-width: 640px) { .my-course .thumb { width: 170px; } }
.list-stack { display: grid; gap: .75rem; }
@media (min-width: 1024px) { .list-stack.two { grid-template-columns: 1fr 1fr; } }

/* Validação pública do certificado */
.verify { max-width: 640px; margin: 2rem auto; }
.verify .ok { color: var(--success); font-size: 3rem; }

/* Header compacto em telas estreitas (iPhone SE/mini/padrão) */
.brand { min-width: 0; }
.brand > span:not(.brand-mark) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand img { max-width: 46vw; object-fit: contain; object-position: left center; }
@media (max-width: 480px) {
  .site-header { gap: .5rem; }
  .header-actions .icon-btn { width: 38px; height: 38px; font-size: 1rem; }
  .header-actions .btn-sm { padding: 0 .75rem; }
  .brand { font-size: .95rem; }
}

/* ---------------------------------------------------------------------
   Pré-lançamento ("Em breve")
   --------------------------------------------------------------------- */
.soon-hero { position: relative; color: #fff; background: #000; overflow: hidden; }
.soon-hero .hero-bg::after { background: linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,.25) 75%, rgba(0,0,0,.55) 100%); }
.soon-poster-mobile { position: absolute; inset: 0; background-size: cover; background-position: center top; display: none; }
.soon-poster-mobile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.1) 80%, rgba(0,0,0,.5) 100%); }
@media (max-width: 767px) { .soon-poster-mobile { display: block; } }
@media (min-width: 1024px) { .soon-hero .hero-bg::after { background: linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.2) 100%), linear-gradient(to top, var(--bg) 0%, transparent 35%); } }
.soon-hero-inner { position: relative; z-index: 2; padding: calc(var(--header-h) + var(--safe-t) + 12rem) var(--gutter) 2rem; display: grid; gap: 2rem; max-width: 1600px; margin: 0 auto; }
@media (min-width: 1024px) { .soon-hero-inner { grid-template-columns: minmax(0, 1fr) 420px; align-items: end; padding-top: calc(var(--header-h) + 5rem); padding-bottom: 4rem; min-height: min(92vh, 880px); } }
.soon-copy { display: flex; flex-direction: column; gap: .95rem; max-width: 720px; }
.soon-copy h1 { font-size: clamp(2.2rem, 8vw, 4.4rem); font-weight: 800; text-shadow: 0 2px 30px rgba(0,0,0,.45); }
.soon-kicker { display: flex; align-items: center; gap: .7rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.85); flex-wrap: wrap; }
.soon-pill { display: inline-flex; align-items: center; gap: .45rem; background: var(--brand); color: #fff; padding: .35rem .75rem; border-radius: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; box-shadow: 0 6px 20px rgba(var(--brand-rgb), .45); }
.soon-pill i { animation: ring 2.4s ease-in-out infinite; transform-origin: 50% 0; }
.soon-pill.sm { font-size: .68rem; padding: .25rem .55rem; box-shadow: none; }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }
.soon-date { font-size: 1.1rem; color: rgba(255,255,255,.9); }
.soon-date strong { color: #fff; }
.soon-pitch { font-size: 1.02rem; color: rgba(255,255,255,.85); max-width: 600px; }
@media (min-width: 768px) { .soon-pitch { font-size: 1.12rem; } }
.countdown { display: flex; gap: .5rem; }
.countdown div { min-width: 64px; padding: .6rem .5rem; border-radius: 12px; text-align: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.countdown strong { display: block; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown span { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.75); }
.soon-proof { display: flex; align-items: center; gap: .75rem; font-size: .9rem; color: rgba(255,255,255,.85); }
.soon-avatars { display: flex; }
.soon-avatars .avatar { border: 2px solid #000; margin-left: -8px; }
.soon-avatars .avatar:first-child { margin-left: 0; }
.soon-card { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); border-radius: 20px; padding: 1.4rem; box-shadow: var(--shadow); }
@media (min-width: 1024px) { .soon-card { padding: 1.75rem; } .only-mobile-soon { display: none !important; } }
@media (max-width: 1023px) { .only-desktop-soon { display: none !important; } }
.soon-form-head { margin-bottom: 1.1rem; }
.soon-form-head h3 { font-size: 1.35rem; margin: .6rem 0 .35rem; }
.soon-form-head p { color: var(--muted); font-size: .9rem; }
.soon-form .field { margin-bottom: .8rem; }
.soon-form textarea { width: 100%; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); padding: .8rem 1rem; outline: none; resize: vertical; font-size: 16px; min-height: 84px; }
.soon-form textarea:focus { border-color: rgba(var(--brand-rgb), .7); }
.soon-consent { font-size: .8rem; color: var(--muted); align-items: flex-start; margin: .2rem 0 1rem; line-height: 1.4; }
.soon-consent input { margin-top: .15rem; accent-color: var(--brand); width: 17px; height: 17px; flex-shrink: 0; }
.soon-safe { display: block; text-align: center; color: var(--muted); font-size: .76rem; margin-top: .7rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.soon-done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: .5rem 0; }
.soon-done-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; font-size: 1.9rem; box-shadow: 0 10px 30px rgba(34,197,94,.4); animation: pop .4s ease-out; }
.soon-done h3 { font-size: 1.4rem; }
.soon-done p { color: var(--muted); font-size: .92rem; }
.soon-share { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; align-items: center; font-size: .82rem; color: var(--muted); margin: .4rem 0; }
.soon-share span { width: 100%; }
.soon-body { display: grid; gap: 1.5rem; padding-top: 1.5rem; padding-bottom: 3rem; max-width: 980px; }
@media (min-width: 1024px) { .soon-body { margin-left: max(var(--gutter), calc((100vw - 1600px) / 2 + var(--gutter))); padding-left: 0; } }
.soon-h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.tag-soon { background: var(--brand); }
.staff-bar { position: fixed; z-index: 58; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 24px); padding: .55rem .9rem; border-radius: 14px; background: rgba(20,20,28,.92); color: #fff; font-size: .82rem; box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.staff-bar a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1024px) { .staff-bar { bottom: 18px; } }
