/* ===== CL ACADEMY — identidade branco + roxo ===== */
:root {
  --roxo-950: #1E0A45;
  --roxo-900: #2E1065;
  --roxo-800: #4C1D95;
  --roxo-700: #5B21B6;
  --roxo: #6D28D9;
  --roxo-500: #8B5CF6;
  --roxo-300: #C4B5FD;
  --roxo-100: #EDE7FE;
  --roxo-50: #F7F4FF;
  --ink: #1B1530;
  --ink-2: #3A3352;
  --muted: #6E6787;
  --line: #ECE7F6;
  --bg: #FFFFFF;
  --surface: #FBFAFF;
  --ok: #15803D;
  --ok-bg: #E8F7EE;
  --warn: #B45309;
  --warn-bg: #FEF3E2;
  --danger: #DC2626;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(46, 16, 101, .06), 0 8px 24px rgba(46, 16, 101, .07);
  --shadow-lg: 0 20px 50px rgba(46, 16, 101, .18);
  --max: 1240px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }
.ic { width: 1.1em; height: 1.1em; flex: none; }
[hidden] { display: none !important; }

/* ===== Marca ===== */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--roxo-500), var(--roxo-800));
  color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 6px 16px rgba(109, 40, 217, .35);
}
.brand-text { font-size: 15px; letter-spacing: .22em; color: var(--roxo-800); }
.brand.light .brand-text { color: #fff; }
.brand.light .brand-mark { background: #fff; color: var(--roxo-700); box-shadow: none; }
.brand-img { height: 38px; width: auto; }

/* ===== Botões ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--roxo); color: #fff; box-shadow: 0 8px 20px rgba(109, 40, 217, .28); }
.btn.primary:hover:not(:disabled) { background: var(--roxo-700); }
.btn.white { background: #fff; color: var(--roxo-800); }
.btn.white:hover { background: var(--roxo-50); }
.btn.ghost { background: #fff; color: var(--roxo-700); border-color: var(--roxo-100); }
.btn.ghost:hover { border-color: var(--roxo-300); background: var(--roxo-50); }
.btn.done { background: var(--ok-bg); color: var(--ok); border-color: #CBEBD7; }
.btn.danger { background: #fff; color: var(--danger); border-color: #F8D4D4; }
.btn.danger:hover { background: #FFF5F5; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--roxo); font-weight: 700; }
.link-btn:hover { text-decoration: underline; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--roxo-300); color: var(--roxo); background: var(--roxo-50); }
.icon-btn.del:hover { color: var(--danger); border-color: #F8D4D4; background: #FFF5F5; }
.icon-btn:disabled { opacity: .35; pointer-events: none; }

/* ===== Telas centrais / loader ===== */
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--surface); }
.loader .brand-mark { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .7; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--roxo-100); border-top-color: var(--roxo); animation: spin .8s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Login ===== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px;
  background: radial-gradient(1200px 600px at 110% 110%, rgba(196, 181, 253, .35), transparent 60%),
              radial-gradient(700px 500px at -10% -10%, rgba(139, 92, 246, .55), transparent 60%),
              linear-gradient(145deg, var(--roxo-950), var(--roxo-800) 60%, var(--roxo));
  display: flex; flex-direction: column;
}
.auth-art-in { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }
.auth-art h1 { font-size: clamp(34px, 4vw, 54px); font-weight: 800; margin-top: auto; max-width: 13ch; letter-spacing: -.035em; }
.auth-art p { margin-top: 18px; max-width: 42ch; color: rgba(255, 255, 255, .78); font-size: 16px; }
.auth-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.auth-tags span { border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .9); }
.auth-ring { position: absolute; right: -120px; top: 12%; width: 420px; height: 420px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .14); }
.auth-ring.r2 { right: -40px; top: 22%; width: 260px; height: 260px; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 28px; font-weight: 800; }
.auth-card .sub { color: var(--muted); margin: 8px 0 26px; }
.auth-switch { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-mobile-brand { display: none; margin-bottom: 28px; }

/* ===== Formulários ===== */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.field small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.input, .field input:not([type=checkbox]):not([type=file]), .field textarea, .field select {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface); outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; }
.field input:focus, .field textarea:focus, .comment-form textarea:focus {
  border-color: var(--roxo-500); background: #fff; box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
}
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.form-msg { font-size: 13.5px; margin: -4px 0 14px; padding: 10px 14px; border-radius: 10px; background: #FFF1F1; color: #B42318; }
.form-msg.ok { background: var(--ok-bg); color: var(--ok); }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; cursor: pointer; margin-bottom: 18px; }
.switch input { width: 18px; height: 18px; accent-color: var(--roxo); }

/* ===== Topo ===== */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: var(--max); margin: 0 auto; height: 70px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.nav { display: flex; gap: 6px; }
.nav a { position: relative; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.nav a:hover { color: var(--roxo-700); background: var(--roxo-50); }
.nav a.on { color: var(--roxo-700); background: var(--roxo-100); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--roxo); color: #fff; font-size: 11px; font-weight: 800; }
.user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--roxo-100); color: var(--roxo-700); font-weight: 800; font-size: 13px; flex: none; }
.user-name { font-weight: 700; font-size: 14px; }
.user .link-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin-left: 6px; }
.user .link-btn:hover { color: var(--roxo); text-decoration: none; }

.main { max-width: var(--max); margin: 0 auto; padding: 28px 24px 80px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--roxo); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 14px; margin-bottom: 18px; }
.back:hover { color: var(--roxo); }

/* ===== Progresso ===== */
.pbar { height: 6px; border-radius: 99px; background: var(--roxo-100); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--roxo-500), var(--roxo)); transition: width .5s ease; }
.pbar.lg { height: 9px; }
.pbar.on-dark { background: rgba(255, 255, 255, .2); }
.pbar.on-dark i { background: #fff; }
.pmeta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 8px; }

/* ===== Home ===== */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; color: #fff; padding: 44px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
  background: radial-gradient(800px 400px at 100% 0%, rgba(196, 181, 253, .35), transparent 60%),
              linear-gradient(135deg, var(--roxo-950), var(--roxo-800) 55%, var(--roxo-500));
}
.hero::after { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .12); left: -120px; bottom: -220px; }
.hero .eyebrow { color: var(--roxo-300); }
.hero h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; margin-top: 10px; letter-spacing: -.035em; }
.hero p.lead { color: rgba(255, 255, 255, .78); margin-top: 12px; max-width: 46ch; font-size: 16px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-chips span { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; }
.hero-chips b { font-size: 15px; }
.continue {
  position: relative; z-index: 1; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 22px; padding: 22px; backdrop-filter: blur(8px);
}
.continue .eyebrow { color: #fff; opacity: .8; font-size: 11px; }
.continue h3 { font-size: 20px; margin: 8px 0 4px; font-weight: 800; }
.continue .next { color: rgba(255, 255, 255, .78); font-size: 14px; display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.continue .pmeta { color: rgba(255, 255, 255, .78); }
.continue .btn { margin-top: 18px; }

.row-head { display: flex; align-items: baseline; justify-content: space-between; margin: 44px 0 18px; }
.row-head h2 { font-size: 24px; font-weight: 800; }
.row-head span { color: var(--muted); font-weight: 600; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.ccard { display: flex; flex-direction: column; gap: 14px; }
.ccover { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--roxo-100); box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.ccover img { width: 100%; height: 100%; object-fit: cover; }
.ccard:hover .ccover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.ccover .play {
  position: absolute; inset: auto 14px 14px auto; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--roxo); box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
  opacity: 0; transform: translateY(8px); transition: .25s ease;
}
.ccard:hover .play { opacity: 1; transform: none; }
.ctag { position: absolute; top: 12px; right: 12px; background: #fff; color: var(--ok); font-size: 11.5px; font-weight: 800; padding: 5px 10px; border-radius: 999px; display: inline-flex; gap: 5px; align-items: center; }
.ctag.draft { color: var(--warn); }
.ccard h3 { font-size: 16px; font-weight: 800; }

.cover-fallback { position: absolute; inset: 0; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; }
.cover-fallback.v0 { background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.25), transparent 45%), linear-gradient(160deg, var(--roxo-500), var(--roxo-900)); }
.cover-fallback.v1 { background: radial-gradient(circle at 20% 80%, rgba(255,255,255,.22), transparent 45%), linear-gradient(200deg, #A78BFA, var(--roxo-700)); }
.cover-fallback.v2 { background: radial-gradient(circle at 70% 70%, rgba(196,181,253,.4), transparent 50%), linear-gradient(160deg, var(--roxo-900), var(--roxo-950)); }
.cover-fallback.v3 { background: linear-gradient(170deg, #fff 0 38%, var(--roxo) 38% 100%); color: var(--roxo-900); }
.cover-fallback.v3 .cf-title { color: #fff; }
.cf-brand { font-size: 10.5px; font-weight: 800; letter-spacing: .24em; opacity: .85; }
.cf-title { font-size: 23px; font-weight: 800; line-height: 1.08; letter-spacing: -.03em; }

.empty { text-align: center; padding: 60px 24px; border: 1.5px dashed var(--roxo-100); border-radius: var(--radius); color: var(--muted); background: var(--surface); }
.empty h3 { color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }

/* ===== Página do curso ===== */
.course-hero { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: end; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.course-hero .ccover { box-shadow: var(--shadow-lg); }
.course-hero h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; margin: 10px 0 12px; letter-spacing: -.035em; }
.course-hero .lead { color: var(--muted); font-size: 16px; max-width: 62ch; white-space: pre-line; }
.ch-stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 22px 0 14px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.ch-stats span { display: inline-flex; gap: 7px; align-items: center; }
.ch-stats .ic { color: var(--roxo); }
.ch-progress { max-width: 460px; }
.ch-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.modules { margin-top: 36px; display: grid; gap: 18px; }
.mod { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.mod-head { display: flex; align-items: center; gap: 16px; padding: 18px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.mod-num { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; color: var(--roxo); text-transform: uppercase; white-space: nowrap; }
.mod-head h3 { font-size: 17px; font-weight: 800; flex: 1; }
.mod-count { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.lesson-list { list-style: none; margin: 0; padding: 6px; }
.lrow { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; transition: background .15s; }
.lrow:hover { background: var(--roxo-50); }
.lcheck { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800; border: 1.5px solid var(--roxo-100); color: var(--roxo); background: #fff; }
.lrow.done .lcheck { background: var(--roxo); border-color: var(--roxo); color: #fff; }
.ltitle { flex: 1; font-weight: 600; }
.ldur { color: var(--muted); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.lrow.current { background: var(--roxo-100); }
.lrow.current .ltitle { color: var(--roxo-800); font-weight: 800; }

/* ===== Aula ===== */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--roxo-950); box-shadow: var(--shadow-lg); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: rgba(255, 255, 255, .75); padding: 24px; }
.player-empty .ic { width: 42px; height: 42px; margin: 0 auto 12px; color: var(--roxo-300); }
.lesson-bar { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; margin-top: 24px; }
.lesson-bar h1 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; margin-top: 8px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.lesson-desc { margin-top: 24px; color: var(--ink-2); white-space: pre-line; font-size: 15.5px; }
.material { margin-top: 20px; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-weight: 700; transition: .15s; }
.material:hover { border-color: var(--roxo-300); background: var(--roxo-50); }
.material .mi { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--roxo-100); color: var(--roxo); }
.material small { display: block; color: var(--muted); font-weight: 500; }

.lesson-side { position: sticky; top: 90px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; max-height: calc(100vh - 110px); display: flex; flex-direction: column; }
.side-head { padding: 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.side-head h3 { font-size: 16px; font-weight: 800; margin: 6px 0 14px; }
.side-body { overflow-y: auto; padding: 8px; }
.side-mod { margin-bottom: 6px; }
.side-mod > summary { list-style: none; cursor: pointer; padding: 12px 12px; border-radius: 10px; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.side-mod > summary::-webkit-details-marker { display: none; }
.side-mod > summary:hover { background: var(--surface); }
.side-mod > summary .mod-num { font-size: 10.5px; }
.side-mod > summary .chev { margin-left: auto; transition: transform .2s; color: var(--muted); }
.side-mod[open] > summary .chev { transform: rotate(180deg); }
.side-mod .lesson-list { padding: 0 0 6px; }
.side-mod .lrow { padding: 9px 12px; gap: 10px; font-size: 14px; }
.side-mod .lcheck { width: 24px; height: 24px; font-size: 10.5px; }

/* ===== Comentários ===== */
.comments { margin-top: 36px; }
.comments h2 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.comments h2 .badge { background: var(--roxo-100); color: var(--roxo-700); }
.comment-form { display: flex; gap: 14px; margin: 20px 0 26px; }
.comment-form .box { flex: 1; }
.comment-form textarea { width: 100%; min-height: 80px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); outline: none; resize: vertical; transition: .15s; }
.comment-form .row-between { margin-top: 10px; }
.comment-form small { color: var(--muted); }
.comment { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.comment .who { display: flex; align-items: baseline; gap: 10px; }
.comment .who b { font-size: 14.5px; }
.comment .who time { color: var(--muted); font-size: 12.5px; }
.comment .body { margin-top: 4px; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.comment .content { flex: 1; min-width: 0; }
.comment .link-btn { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.comment .link-btn:hover { color: var(--danger); }
.no-comments { color: var(--muted); padding: 18px 0; border-top: 1px solid var(--line); }

/* ===== Certificado ===== */
.cert-page { max-width: 1000px; margin: 0 auto; }
.cert-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; }
.cert-actions .back { margin: 0; }
.cert-wrap { width: fit-content; max-width: 100%; margin: 0 auto; overflow-x: auto; border-radius: 6px; box-shadow: var(--shadow-lg); }
.cert {
  position: relative; width: 1000px; aspect-ratio: 297 / 210; margin: 0 auto; background: #fff; overflow: hidden;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cert::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 14px; background: linear-gradient(90deg, var(--roxo-900), var(--roxo), var(--roxo-500)); }
.cert-side { position: absolute; right: 0; top: 0; bottom: 0; width: 230px; background: linear-gradient(170deg, var(--roxo-800), var(--roxo-950)); }
.cert-side::after { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%; border: 2px solid rgba(255,255,255,.14); right: -150px; top: 120px; }
.cert-seal { position: absolute; right: 115px; bottom: 90px; transform: translateX(50%); width: 150px; height: 150px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; color: var(--roxo-800); box-shadow: 0 0 0 8px rgba(255,255,255,.18); }
.cert-seal b { display: block; font-size: 34px; letter-spacing: .02em; line-height: 1; }
.cert-seal span { display: block; font-size: 10px; font-weight: 800; letter-spacing: .24em; margin-top: 6px; }
.cert-in { position: absolute; left: 70px; right: 300px; top: 70px; bottom: 60px; display: flex; flex-direction: column; }
.cert-kicker { font-size: 13px; font-weight: 800; letter-spacing: .32em; color: var(--roxo); margin-top: 46px; }
.cert-title { font-size: 46px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); margin-top: 6px; }
.cert-intro { margin-top: 30px; color: var(--muted); font-size: 16px; }
.cert-name { font-size: 40px; font-weight: 800; color: var(--roxo-700); letter-spacing: -.02em; margin-top: 6px; padding-bottom: 14px; border-bottom: 2px solid var(--roxo-100); }
.cert-text { margin-top: 18px; font-size: 16.5px; color: var(--ink-2); line-height: 1.6; max-width: 54ch; }
.cert-text strong { color: var(--ink); }
.cert-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.cert-sign { min-width: 220px; text-align: center; font-size: 13px; color: var(--muted); }
.cert-sign b { display: block; color: var(--ink); font-size: 15px; }
.cert-sign .line { display: block; border-top: 1.5px solid var(--ink); margin-bottom: 8px; }
.cert-code { font-size: 12px; color: var(--muted); text-align: right; }
.cert-code b { color: var(--ink-2); font-family: ui-monospace, Menlo, monospace; letter-spacing: .08em; }
.locked { text-align: center; max-width: 520px; margin: 40px auto; padding: 48px 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.locked .ic { width: 44px; height: 44px; color: var(--roxo); margin: 0 auto 14px; }
.locked h2 { font-size: 22px; margin-bottom: 8px; }
.locked p { color: var(--muted); }
.locked .pbar { margin: 22px auto 0; max-width: 300px; }

/* ===== Pendente ===== */
.pending-card { max-width: 480px; background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 40px; text-align: center; box-shadow: var(--shadow); }
.pending-card .brand { justify-content: center; margin-bottom: 30px; }
.pending-icon { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px; background: var(--roxo-100); color: var(--roxo); }
.pending-icon .ic { width: 32px; height: 32px; }
.pending-card h1 { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.pending-card p { color: var(--muted); }
.pending-card .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }

/* ===== Painel admin ===== */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.admin-head h1 { font-size: 32px; font-weight: 800; margin-top: 6px; }
.tabs { display: inline-flex; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; gap: 4px; }
.tabs button { border: 0; background: none; padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.tabs button.on { background: #fff; color: var(--roxo-700); box-shadow: var(--shadow); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpi { padding: 18px 20px; }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi b { display: block; font-size: 28px; font-weight: 800; color: var(--roxo-800); margin-top: 4px; letter-spacing: -.02em; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.person { display: flex; align-items: center; gap: 12px; }
.person small { display: block; color: var(--muted); font-size: 12.5px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.wait { background: var(--warn-bg); color: var(--warn); }
.status.adm { background: var(--roxo-100); color: var(--roxo-700); }
.mini-progress { min-width: 140px; }
.mini-progress .pmeta { margin-top: 6px; }
.actions-cell { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }

.course-admin-list { display: grid; gap: 12px; }
.ca-item { display: flex; align-items: center; gap: 16px; padding: 14px; }
.ca-thumb { position: relative; width: 60px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; flex: none; background: var(--roxo-100); }
.ca-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ca-thumb .cf-title { font-size: 9px; }
.ca-thumb .cf-brand { display: none; }
.ca-thumb .cover-fallback { padding: 6px; }
.ca-info { flex: 1; min-width: 0; }
.ca-info h3 { font-size: 16px; font-weight: 800; }
.ca-info p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.ca-tools { display: flex; gap: 6px; align-items: center; }

.ed-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ed-head > div { display: flex; gap: 8px; }
.ed-course { display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding: 24px; }
.ed-cover { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.ed-cover .ccover { box-shadow: none; border: 1px solid var(--line); }
.ed-cover small { color: var(--muted); font-size: 12px; text-align: center; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ed-modules-head { display: flex; justify-content: space-between; align-items: center; margin: 34px 0 14px; }
.ed-modules-head h2 { font-size: 22px; font-weight: 800; }
.ed-mod { margin-bottom: 14px; overflow: hidden; }
.ed-mod-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ed-mod-head h3 { flex: 1; font-size: 16px; font-weight: 800; }
.ed-lesson { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.ed-lesson:last-child { border-bottom: 0; }
.ed-lesson .ltitle { font-size: 14.5px; }
.vtag { font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--roxo-50); color: var(--roxo-700); white-space: nowrap; }
.vtag.none { background: var(--warn-bg); color: var(--warn); }
.ed-empty { padding: 16px; color: var(--muted); font-size: 14px; }
.ed-mod-foot { padding: 10px 16px; }
.tools { display: flex; gap: 6px; }

/* ===== Modal ===== */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(30, 10, 69, .45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .18s ease; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 22px; padding: 26px; box-shadow: var(--shadow-lg); animation: pop .2s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-head h2 { font-size: 21px; font-weight: 800; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.hint { display: flex; gap: 10px; padding: 12px 14px; background: var(--roxo-50); border-radius: 12px; font-size: 13px; color: var(--ink-2); margin: -4px 0 16px; }
.hint .ic { color: var(--roxo); margin-top: 2px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 80; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--roxo-950); color: #fff; padding: 13px 20px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); transition: .25s ease; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.err { background: #B42318; }
.toast a { color: var(--roxo-300); font-weight: 800; margin-left: 6px; text-decoration: underline; }

/* ===== Responsivo ===== */
@media (max-width: 1020px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-side { position: static; max-height: none; }
  .hero { grid-template-columns: 1fr; padding: 32px; }
}
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-mobile-brand { display: inline-flex; }
  .course-hero { grid-template-columns: 1fr; gap: 24px; }
  .course-hero .ccover { width: 180px; }
  .ed-course { grid-template-columns: 1fr; }
  .ed-cover { max-width: 200px; }
}
@media (max-width: 640px) {
  .topbar-in { padding: 0 16px; gap: 12px; height: 62px; }
  .brand-text { display: none; }
  .user-name { display: none; }
  .nav a { padding: 8px 10px; font-size: 13.5px; }
  .main { padding: 20px 16px 64px; }
  .hero { padding: 26px 22px; border-radius: 22px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cf-title { font-size: 18px; }
  .lesson-bar { flex-direction: column; }
  .lesson-bar .btn { width: 100%; }
  .lesson-nav .btn { flex: 1; padding: 0 12px; }
  .comment-form > .avatar { display: none; }
  .mod-head { flex-wrap: wrap; padding: 16px; gap: 6px 12px; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .ca-item { flex-wrap: wrap; }
  .pending-card { padding: 30px 22px; }
}

/* ===== Impressão do certificado ===== */
@page { size: A4 landscape; margin: 0; }
@media print {
  html, body { background: #fff; }
  .topbar, .no-print, .toast, #modal-root { display: none !important; }
  .main { padding: 0; max-width: none; }
  .cert-page { max-width: none; }
  .cert-wrap { box-shadow: none; border-radius: 0; overflow: visible; }
  .cert { width: 297mm; height: 210mm; aspect-ratio: auto; zoom: 1; }
}
