@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root{
  --bg:            #0a0a0b;
  --bg-panel:      #101012;
  --surface:       #17171a;
  --surface-hover: #1e1e22;
  --surface-raised:#1b1b1f;
  --border:        #29292e;
  --border-strong: #3a3a41;
  --text:        #f3f2ef;
  --text-dim:    #a3a2ab;
  --text-faint:  #6c6b74;
  --accent:       #ff5a1f;
  --accent-hover: #ff7440;
  --accent-soft:  rgba(255, 90, 31, 0.14);
  --accent-line:  rgba(255, 90, 31, 0.35);
  --success:      #3ddc84;
  --success-soft: rgba(61, 220, 132, 0.14);
  --danger:       #e0483f;
  --danger-soft:  rgba(224, 72, 63, 0.14);
  --warning:      #f0a63e;
  --warning-soft: rgba(240, 166, 62, 0.16);
  --radius-sm: 7px; --radius-md: 12px; --radius-lg: 18px; --radius-pill: 999px;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Space Grotesk', 'Inter', sans-serif;
  --sidebar-w: 264px; --topbar-h: 68px;
  --shadow-card: 0 1px 0 rgba(255,255,255,.02) inset, 0 10px 30px rgba(0,0,0,.35);
  --shadow-pop:  0 20px 50px rgba(0,0,0,.5);
}
body.light{
  --bg:#f7f6f3; --bg-panel:#ffffff; --surface:#ffffff; --surface-hover:#f3f1ec; --surface-raised:#ffffff;
  --border:#ececea; --border-strong:#dddad2;
  --text:#17171a; --text-dim:#66636d; --text-faint:#9c99a2;
  --shadow-card: 0 1px 2px rgba(23,23,26,.04), 0 8px 24px rgba(23,23,26,.05);
  --shadow-pop:  0 20px 50px rgba(23,23,26,.14);
}
*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{ margin:0; background:var(--bg); color:var(--text); font-family:var(--font-body); font-size:15px; line-height:1.5; -webkit-font-smoothing:antialiased; transition:background .2s ease,color .2s ease; }
h1,h2,h3,h4{ font-family:var(--font-display); font-weight:600; line-height:1.2; margin:0 0 6px; letter-spacing:-0.01em; }
p{ margin:0 0 12px; color:var(--text-dim); }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; }
img{ max-width:100%; display:block; }
::selection{ background:var(--accent-soft); color:var(--accent); }
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.icon{ width:18px; height:18px; flex-shrink:0; }
.icon-sm{ width:15px; height:15px; }

.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:11px 20px; border-radius:var(--radius-sm); border:1px solid transparent; font-size:14px; font-weight:600; transition:background .15s ease,border-color .15s ease,transform .1s ease,color .15s ease; white-space:nowrap; }
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--accent); color:#fff; }
.btn-primary:hover{ background:var(--accent-hover); }
.btn-secondary{ background:var(--surface-raised); border-color:var(--border-strong); color:var(--text); }
.btn-secondary:hover{ background:var(--surface-hover); }
.btn-sm{ padding:8px 14px; font-size:13px; }
.btn-block{ width:100%; }
.btn-lg{ padding:13px 22px; font-size:15px; }
.btn[data-done="true"]{ background:var(--success-soft); color:var(--success); border-color:transparent; }

.field{ margin-bottom:18px; }
.field label{ display:block; font-size:13px; font-weight:600; color:var(--text-dim); margin-bottom:8px; }
.field input,.field textarea{ width:100%; background:var(--surface); border:1px solid var(--border-strong); color:var(--text); padding:12px 14px; border-radius:var(--radius-sm); font-size:14.5px; font-family:inherit; transition:border-color .15s ease,background .15s ease; }
.field input:focus,.field textarea:focus{ outline:none; border-color:var(--accent); background:var(--surface-hover); }
.field input::placeholder,.field textarea::placeholder{ color:var(--text-faint); }
.field .hint{ font-size:12px; color:var(--text-faint); margin-top:6px; }

.login-shell{ min-height:100vh; display:grid; grid-template-columns:1.05fr 1fr; }
.login-brandside{ position:relative; background:radial-gradient(120% 120% at 15% 10%, #1a1310 0%, #0a0a0b 55%); padding:56px; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; border-right:1px solid var(--border); }
.login-brandside::before{ content:""; position:absolute; inset:0; background-image:var(--contour-lines); opacity:.5; pointer-events:none; }
.brand-mark{ display:flex; align-items:center; gap:12px; position:relative; z-index:1; }
.brand-mark .crest{ width:38px; height:38px; }
.brand-mark .wordmark{ font-family:var(--font-display); font-weight:700; font-size:19px; letter-spacing:-0.01em; }
.brand-mark .wordmark small{ display:block; font-family:var(--font-body); font-weight:500; font-size:11.5px; color:var(--text-faint); letter-spacing:.03em; }
.login-quote{ position:relative; z-index:1; max-width:420px; }
.login-quote .kicker{ color:var(--accent); font-weight:700; font-size:12.5px; letter-spacing:.03em; margin-bottom:14px; display:block; }
.login-quote h2{ font-size:30px; color:#fff; margin-bottom:14px; }
.login-quote p{ color:var(--text-dim); font-size:15px; }
.login-formside{ display:flex; align-items:center; justify-content:center; padding:40px 32px; }
.login-card{ width:100%; max-width:380px; }
.login-card h1{ font-size:24px; margin-bottom:6px; }
.login-card .sub{ color:var(--text-dim); font-size:14.5px; margin-bottom:32px; }
.login-foot{ margin-top:24px; text-align:center; font-size:13px; color:var(--text-faint); }
.login-foot a{ color:var(--accent); font-weight:600; }
.login-note{ margin-top:28px; border:1px dashed var(--border-strong); border-radius:var(--radius-sm); padding:12px 14px; font-size:12.5px; color:var(--text-faint); line-height:1.5; }
.form-row-between{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.checkbox-row{ display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--text-dim); }
.checkbox-row input{ accent-color:var(--accent); width:15px; height:15px; }
.link-muted{ font-size:13.5px; color:var(--text-dim); }
.link-muted:hover{ color:var(--accent); }

.app-shell{ display:flex; min-height:100vh; }
.sidebar{ width:var(--sidebar-w); flex-shrink:0; background:var(--bg-panel); border-right:1px solid var(--border); display:flex; flex-direction:column; position:fixed; top:0; left:0; bottom:0; z-index:40; transition:transform .2s ease; }
.sidebar-head{ padding:22px 22px 18px; border-bottom:1px solid var(--border); }
.segmented{ display:inline-flex; background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-pill); padding:3px; gap:2px; }
.segmented button{ padding:8px 16px; border-radius:var(--radius-pill); font-size:13px; font-weight:700; color:var(--text-dim); white-space:nowrap; }
.segmented button.active{ background:var(--text); color:var(--bg); }
.segmented-block{ display:flex; width:100%; }
.segmented-block button{ flex:1; text-align:center; padding:7px 10px; font-size:12.5px; }
.sidebar-nav{ padding:14px 12px; flex:1; overflow-y:auto; }
.nav-label{ font-size:11px; font-weight:700; letter-spacing:.06em; color:var(--text-faint); padding:14px 12px 8px; }
.nav-item{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:var(--radius-sm); color:var(--text-dim); font-size:14px; font-weight:500; margin-bottom:2px; transition:background .12s ease,color .12s ease; cursor:pointer; }
.nav-item .icon{ color:var(--text-faint); }
.nav-item:hover{ background:var(--surface-hover); color:var(--text); }
.nav-item:hover .icon{ color:var(--text); }
.nav-item.active{ background:var(--accent-soft); color:var(--accent); }
.nav-item.active .icon{ color:var(--accent); }
.nav-item .lock{ margin-left:auto; color:var(--text-faint); }
.nav-item .nav-dot{ margin-left:auto; width:8px; height:8px; border-radius:99px; background:var(--accent); flex-shrink:0; }
.sidebar-foot{ padding:16px 22px 22px; border-top:1px solid var(--border); }
.sidebar-foot .progress-mini-label{ display:flex; justify-content:space-between; font-size:12px; color:var(--text-faint); margin-bottom:8px; }
.user-chip{ display:flex; align-items:center; gap:10px; cursor:default; }
.user-chip .avatar{ width:34px; height:34px; font-size:12px; }
.user-chip-info{ flex:1; min-width:0; }
.user-chip-info .name{ font-size:13.5px; font-weight:700; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.user-chip-info .role{ font-size:11.5px; color:var(--text-faint); }
.user-chip .chevron{ color:var(--text-faint); flex-shrink:0; }

.main-col{ margin-left:var(--sidebar-w); flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar{ height:var(--topbar-h); border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; padding:0 28px; gap:20px; position:sticky; top:0; background:var(--bg); z-index:30; }
.topbar-search{ flex:1; max-width:360px; position:relative; }
.topbar-search input{ width:100%; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-pill); padding:9px 16px 9px 38px; color:var(--text); font-size:13.5px; }
.topbar-search .icon{ position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--text-faint); }
.topbar-actions{ display:flex; align-items:center; gap:10px; }
.icon-btn{ width:38px; height:38px; border-radius:var(--radius-pill); display:flex; align-items:center; justify-content:center; background:var(--surface); border:1px solid var(--border); color:var(--text-dim); position:relative; }
.icon-btn:hover{ background:var(--surface-hover); color:var(--text); }
.icon-btn .badge-dot{ position:absolute; top:-3px; right:-3px; background:var(--accent); color:#fff; font-size:10px; font-weight:700; min-width:16px; height:16px; border-radius:99px; display:flex; align-items:center; justify-content:center; border:2px solid var(--bg); }
.avatar{ width:38px; height:38px; border-radius:99px; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; border:1px solid var(--accent-line); flex-shrink:0; }
.menu-toggle{ display:none; }
.content{ flex:1; padding:32px; max-width:1180px; width:100%; }

.card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-card); }
.stat-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.stat-card{ padding:20px 22px; position:relative; }
.stat-card .stat-label{ font-size:12.5px; color:var(--text-faint); font-weight:600; margin-bottom:10px; display:flex; align-items:center; gap:6px; padding-right:36px; }
.stat-card .stat-value{ font-family:var(--font-display); font-size:28px; font-weight:700; }
.stat-card .stat-value span{ margin-left:6px; font-size:15px; color:var(--text-faint); font-family:var(--font-body); font-weight:500; }
.stat-icon{ position:absolute; top:18px; right:18px; width:36px; height:36px; border-radius:99px; background:var(--surface-raised); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--text-dim); }
.stat-icon .icon{ width:16px; height:16px; }
.stat-icon.accent{ background:var(--accent-soft); color:var(--accent); border-color:transparent; }
.page-head{ margin-bottom:26px; }
.page-head .eyebrow{ color:var(--accent); font-weight:700; font-size:12.5px; letter-spacing:.02em; margin-bottom:8px; display:block; }
.page-head h1{ font-size:26px; }
.page-head .desc{ color:var(--text-dim); font-size:14.5px; max-width:560px; }
.page-head-flex{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.page-head-flex .page-head{ margin-bottom:0; }

.filter-bar{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:20px; }
.search-pill{ position:relative; flex:1; min-width:200px; max-width:320px; }
.search-pill .icon{ position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--text-faint); }
.search-pill input{ width:100%; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-pill); padding:9px 16px 9px 38px; color:var(--text); font-size:13.5px; font-family:inherit; }
.search-pill input:focus{ outline:none; border-color:var(--accent); }
.select-wrap{ position:relative; }
.select-wrap select{ appearance:none; -webkit-appearance:none; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-pill); padding:9px 32px 9px 16px; color:var(--text); font-size:13px; font-weight:600; font-family:inherit; }
.select-wrap::after{ content:""; position:absolute; right:13px; top:50%; width:8px; height:8px; border:1.5px solid var(--text-faint); border-top:none; border-left:none; transform:translateY(-65%) rotate(45deg); pointer-events:none; }

.pill{ display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:99px; font-size:12px; font-weight:700; white-space:nowrap; }
.pill-quente{ background:var(--danger-soft); color:var(--danger); }
.pill-morno{ background:var(--warning-soft); color:var(--warning); }
.pill-frio{ background:var(--surface-raised); color:var(--text-faint); border:1px solid var(--border-strong); }
.pill-ativo, .pill-concluido, .pill-publicado{ background:var(--success-soft); color:var(--success); }
.pill-risco{ background:var(--warning-soft); color:var(--warning); }
.pill-inativo{ background:var(--surface-raised); color:var(--text-faint); border:1px solid var(--border-strong); }

.table-card{ padding:0; overflow:hidden; }
.table-card-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 22px; flex-wrap:wrap; }
.table-card-head .count + .btn{ margin-left:auto; }
.table-card-head h3{ font-size:15.5px; margin:0; }
.table-card-head .count{ font-size:12.5px; color:var(--text-faint); }
.table-wrap{ overflow-x:auto; }
.admin-table{ width:100%; border-collapse:collapse; font-size:13.5px; }
.admin-table th{ text-align:left; font-size:10.5px; letter-spacing:.05em; color:var(--text-faint); font-weight:700; text-transform:uppercase; padding:0 22px 12px; white-space:nowrap; }
.admin-table td{ padding:14px 22px; border-top:1px solid var(--border); white-space:nowrap; }
.admin-table td.num{ text-align:right; font-variant-numeric:tabular-nums; font-weight:700; }
.admin-table tr.tint-risco td{ background:var(--warning-soft); }
.admin-table tr.tint-concluido td{ background:var(--success-soft); }
.cell-user{ display:flex; align-items:center; gap:10px; }
.cell-user .avatar{ width:32px; height:32px; font-size:11.5px; }
.cell-user .meta{ min-width:0; }
.cell-user .meta .nome{ font-weight:600; color:var(--text); }
.cell-user .meta .sub{ font-size:12px; color:var(--text-faint); }
.mini-progress{ display:flex; align-items:center; gap:8px; min-width:90px; }
.mini-progress .progress-track{ width:60px; }

.admin-placeholder{ padding:60px 30px; text-align:center; }
.admin-placeholder .ph-icon{ width:56px; height:56px; border-radius:99px; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; margin:0 auto 18px; }
.admin-placeholder .ph-icon .icon{ width:24px; height:24px; }
.admin-placeholder h2{ font-size:18px; margin-bottom:8px; }
.admin-placeholder p{ max-width:380px; margin:0 auto; }
.back-link{ display:inline-flex; align-items:center; gap:6px; color:var(--text-faint); font-size:13.5px; font-weight:600; margin-bottom:16px; cursor:pointer; }
.back-link:hover{ color:var(--accent); }
.progress-track{ width:100%; height:8px; border-radius:99px; background:var(--border); overflow:hidden; }
.progress-track.thin{ height:6px; }
.progress-fill{ height:100%; border-radius:99px; background:linear-gradient(90deg,var(--accent),#ffab8a); transition:width .4s ease; }
.progress-fill.mini{ background:var(--accent); }

.continue-card{ display:flex; align-items:center; gap:22px; padding:22px 24px; margin-bottom:16px; cursor:pointer; }
.continue-thumb{ width:108px; height:72px; border-radius:var(--radius-sm); background:linear-gradient(135deg,#241a14,#150f0c); border:1px solid var(--border-strong); display:flex; align-items:center; justify-content:center; flex-shrink:0; position:relative; }
.continue-thumb .icon{ color:var(--accent); width:22px; height:22px; }
.continue-body{ flex:1; min-width:0; }
.continue-body .tag{ font-size:11.5px; font-weight:700; color:var(--text-faint); letter-spacing:.04em; margin-bottom:4px; }
.continue-body h3{ font-size:17px; margin-bottom:8px; }
.continue-meta{ display:flex; align-items:center; gap:12px; }
.continue-meta .progress-track{ max-width:220px; }
.continue-meta .pct{ font-size:12.5px; color:var(--text-faint); font-weight:600; white-space:nowrap; }
.continue-row{ display:flex; gap:14px; overflow-x:auto; padding-bottom:6px; margin-bottom:24px; }
.continue-mini{ flex:0 0 240px; padding:16px; cursor:pointer; }
.continue-mini h4{ font-size:14px; margin-bottom:10px; }
.continue-mini .pct-label{ font-size:11.5px; color:var(--text-faint); font-weight:600; margin-top:6px; display:block; }

.cat-tag{ display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:700; letter-spacing:.03em; color:var(--text-faint); text-transform:uppercase; }
.cat-tag::before{ content:""; width:7px; height:7px; border-radius:99px; background:var(--c,var(--accent)); flex-shrink:0; }

.section-title{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.section-title h2{ font-size:16px; }
.section-title .see-all{ font-size:13px; font-weight:600; color:var(--accent); cursor:pointer; }
.course-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:18px; }
.course-card{ overflow:hidden; transition:border-color .15s ease,transform .15s ease; cursor:pointer; display:block; }
.course-card:hover{ border-color:var(--border-strong); transform:translateY(-2px); }
.course-cover{ aspect-ratio:16/9; position:relative; background:radial-gradient(120% 140% at 100% 0%,rgba(255,90,31,.25),transparent 60%),linear-gradient(160deg,#1b1512,#0f0d0c); border-bottom:1px solid var(--border); }
.course-cover::after{ content:""; position:absolute; inset:0; background-image:var(--contour-lines); opacity:.35; }
.course-cover .cover-badge{ position:absolute; top:14px; left:16px; background:rgba(10,10,11,.7); backdrop-filter:blur(4px); border:1px solid var(--border-strong); font-size:11px; font-weight:700; letter-spacing:.03em; padding:5px 10px; border-radius:var(--radius-pill); z-index:1; }
.course-cover .cover-badge.done{ left:auto; right:16px; background:rgba(61,220,132,.18); border-color:rgba(61,220,132,.4); color:var(--success); }
.course-body{ padding:18px 20px 20px; }
.course-body h3{ font-size:16.5px; margin-bottom:6px; }
.course-body .course-desc{ font-size:13.5px; margin-bottom:16px; }
.course-progress-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.course-progress-row .pct{ font-size:12.5px; font-weight:700; color:var(--accent); }

.chip-row{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:22px; }
.chip{ padding:8px 16px; border-radius:var(--radius-pill); background:var(--surface); border:1px solid var(--border); font-size:13px; font-weight:600; color:var(--text-dim); cursor:pointer; transition:.15s; white-space:nowrap; display:inline-flex; align-items:center; gap:7px; }
.chip:hover{ background:var(--surface-hover); color:var(--text); }
.chip.active{ background:var(--accent-soft); border-color:var(--accent-line); color:var(--accent); }
.chip .dot{ width:7px; height:7px; border-radius:99px; flex-shrink:0; background:var(--c,var(--text-faint)); }

.modulo{ margin-bottom:14px; overflow:hidden; }
.modulo-head{ display:flex; align-items:center; gap:16px; padding:18px 20px; cursor:pointer; user-select:none; }
.modulo-num{ width:34px; height:34px; border-radius:var(--radius-sm); background:var(--surface-raised); border:1px solid var(--border-strong); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:700; font-size:13px; color:var(--text-dim); flex-shrink:0; }
.modulo-info{ flex:1; min-width:0; }
.modulo-info h3{ font-size:15.5px; margin-bottom:3px; }
.modulo-info .modulo-desc{ font-size:12.5px; color:var(--text-faint); margin:0; }
.modulo-meta{ display:flex; align-items:center; gap:16px; flex-shrink:0; }
.modulo-count{ font-size:12.5px; color:var(--text-faint); font-weight:600; white-space:nowrap; }
.modulo-chevron{ color:var(--text-faint); transition:transform .2s ease; }
.modulo.open .modulo-chevron{ transform:rotate(180deg); }
.modulo-body{ max-height:0; overflow:hidden; transition:max-height .28s ease; border-top:1px solid transparent; }
.modulo.open .modulo-body{ border-top-color:var(--border); }
.aula-row{ display:flex; align-items:center; gap:14px; padding:14px 20px 14px 24px; border-top:1px solid var(--border); transition:background .12s ease; cursor:pointer; }
.aula-row:first-child{ border-top:none; }
.aula-row:hover{ background:var(--surface-hover); }
.aula-status{ width:26px; height:26px; border-radius:99px; flex-shrink:0; display:flex; align-items:center; justify-content:center; border:1.5px solid var(--border-strong); color:transparent; }
.aula-row[data-status="concluida"] .aula-status{ background:var(--success-soft); border-color:transparent; color:var(--success); }
.aula-row[data-status="progresso"] .aula-status{ border-color:var(--accent); color:var(--accent); }
.aula-info{ flex:1; min-width:0; }
.aula-info .titulo{ font-size:14px; font-weight:500; color:var(--text); }
.aula-row[data-status="concluida"] .aula-info .titulo{ color:var(--text-dim); }
.aula-duracao{ font-size:12.5px; color:var(--text-faint); flex-shrink:0; font-variant-numeric:tabular-nums; }
.aula-arrow{ color:var(--text-faint); flex-shrink:0; }
.aula-row:hover .aula-arrow{ color:var(--accent); }

.aula-layout{ display:grid; grid-template-columns:1fr 320px; gap:28px; align-items:flex-start; }
.player-wrap{ aspect-ratio:16/9; background:#000; border-radius:var(--radius-lg); border:1px solid var(--border); position:relative; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.player-wrap .placeholder-inner{ text-align:center; color:var(--text-faint); }
.player-wrap .play-badge{ width:64px; height:64px; border-radius:99px; background:var(--accent-soft); border:1.5px solid var(--accent-line); display:flex; align-items:center; justify-content:center; margin:0 auto 14px; }
.player-wrap .play-badge .icon{ width:24px; height:24px; color:var(--accent); }
.player-wrap .placeholder-label{ font-size:12.5px; font-weight:600; letter-spacing:.03em; }
.player-wrap .placeholder-sub{ font-size:11.5px; color:var(--text-faint); margin-top:4px; }
.aula-header-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin:22px 0 8px; }
.aula-breadcrumb{ font-size:12.5px; color:var(--text-faint); font-weight:600; margin-bottom:6px; }
.aula-header-row h1{ font-size:22px; }
.aula-actions{ display:flex; align-items:center; gap:10px; flex-shrink:0; }
.aula-desc{ font-size:14.5px; color:var(--text-dim); max-width:640px; margin-bottom:26px; }
.nav-pager{ display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid var(--border); padding-top:20px; }
.pager-btn{ display:flex; align-items:center; gap:10px; max-width:46%; cursor:pointer; }
.pager-btn.next{ margin-left:auto; text-align:right; flex-direction:row-reverse; }
.pager-btn .pager-label{ font-size:11px; color:var(--text-faint); font-weight:700; letter-spacing:.03em; display:block; }
.pager-btn .pager-title{ font-size:13.5px; font-weight:600; color:var(--text); }
.pager-btn:hover .pager-title{ color:var(--accent); }
.pager-btn.disabled{ opacity:.35; pointer-events:none; }
.sidebar-lessons{ padding:18px; position:sticky; top:92px; max-height:calc(100vh - 120px); overflow:auto; }
.sidebar-lessons h4{ font-size:12px; letter-spacing:.03em; color:var(--text-faint); font-weight:700; margin-bottom:14px; padding:0 4px; }
.mini-aula{ display:flex; align-items:center; gap:10px; padding:10px 8px; border-radius:var(--radius-sm); font-size:13px; margin-bottom:2px; cursor:pointer; }
.mini-aula:hover{ background:var(--surface-hover); }
.mini-aula.active{ background:var(--accent-soft); }
.mini-aula.active .mini-titulo{ color:var(--accent); font-weight:600; }
.mini-status{ width:18px; height:18px; border-radius:99px; flex-shrink:0; border:1.5px solid var(--border-strong); display:flex; align-items:center; justify-content:center; color:transparent; }
.mini-aula[data-status="concluida"] .mini-status{ background:var(--success-soft); border-color:transparent; color:var(--success); }
.mini-aula[data-status="progresso"] .mini-status{ border-color:var(--accent); color:var(--accent); }
.mini-titulo{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-dim); }
.mini-dur{ font-size:11.5px; color:var(--text-faint); flex-shrink:0; }
.empty-note{ padding:40px 20px; text-align:center; color:var(--text-faint); font-size:13.5px; }

.widget-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:24px; }
.widget-card{ padding:20px 22px; }
.widget-card .widget-label{ font-size:11.5px; font-weight:700; color:var(--text-faint); letter-spacing:.03em; margin-bottom:14px; display:flex; align-items:center; gap:8px; }
.widget-body{ display:flex; align-items:center; gap:16px; }
.event-date-badge{ width:46px; height:46px; border-radius:var(--radius-sm); background:var(--accent-soft); color:var(--accent); display:flex; flex-direction:column; align-items:center; justify-content:center; font-family:var(--font-display); flex-shrink:0; }
.event-date-badge .day{ font-size:16px; font-weight:700; line-height:1; }
.event-date-badge .mon{ font-size:9px; font-weight:700; text-transform:uppercase; }
.widget-title{ font-size:14.5px; font-weight:600; margin-bottom:4px; }
.widget-sub{ font-size:12.5px; color:var(--text-faint); }
.widget-card .btn{ margin-top:14px; }
.badge-icon-sm{ width:46px; height:46px; border-radius:99px; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; flex-shrink:0; }

.event-row{ display:flex; align-items:center; gap:16px; padding:18px 20px; border-top:1px solid var(--border); flex-wrap:wrap; }
.event-row:first-child{ border-top:none; }
.event-info{ flex:1; min-width:200px; }
.event-info h4{ font-size:14.5px; margin-bottom:5px; }
.event-meta{ font-size:12.5px; color:var(--text-faint); display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.event-status-pill{ font-size:11px; font-weight:700; padding:4px 10px; border-radius:99px; white-space:nowrap; }
.event-status-pill.upcoming{ background:var(--accent-soft); color:var(--accent); }
.event-status-pill.past{ background:var(--surface-raised); color:var(--text-faint); border:1px solid var(--border-strong); }

.post-composer{ display:flex; gap:12px; padding:18px 20px; margin-bottom:20px; align-items:flex-start; }
.post-composer textarea{ width:100%; min-height:52px; background:var(--surface-raised); border:1px solid var(--border-strong); border-radius:var(--radius-sm); padding:12px 14px; color:var(--text); font-family:inherit; font-size:14px; line-height:1.5; resize:vertical; transition:border-color .15s ease; }
.post-composer textarea::placeholder{ color:var(--text-faint); }
.post-composer textarea:focus{ outline:none; border-color:var(--accent); background:var(--surface-hover); }
.post-composer-actions{ display:flex; justify-content:flex-end; margin-top:10px; }
.post-card{ padding:18px 20px; margin-bottom:14px; }
.post-head{ display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.post-head .avatar{ width:36px; height:36px; font-size:12px; }
.post-author{ font-size:13.5px; font-weight:700; }
.post-meta{ font-size:12px; color:var(--text-faint); }
.post-tag{ margin-left:auto; }
.post-text{ font-size:14px; color:var(--text); margin-bottom:14px; }
.post-actions{ display:flex; gap:20px; }
.post-action{ display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--text-faint); font-weight:600; cursor:pointer; }
.post-action:hover{ color:var(--accent); }
.post-action.liked{ color:var(--accent); }

.xp-card{ display:flex; align-items:center; gap:24px; padding:24px; margin-bottom:24px; flex-wrap:wrap; }
.xp-badge{ width:64px; height:64px; border-radius:99px; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:700; font-size:20px; flex-shrink:0; border:1px solid var(--accent-line); }
.xp-info{ flex:1; min-width:200px; }
.xp-info .progress-track{ max-width:320px; margin-top:8px; }
.streak-pill{ display:inline-flex; align-items:center; gap:6px; background:var(--accent-soft); color:var(--accent); font-size:13px; font-weight:700; padding:8px 14px; border-radius:var(--radius-pill); }
.badge-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; }
.badge-card{ padding:20px; text-align:center; }
.badge-card.locked{ opacity:.45; }
.badge-icon{ width:48px; height:48px; border-radius:99px; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; margin:0 auto 12px; }
.badge-card.locked .badge-icon{ background:var(--surface-raised); color:var(--text-faint); }
.badge-card h4{ font-size:13.5px; margin-bottom:4px; }
.badge-card p{ font-size:11.5px; margin:0; }

.cert-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:18px; }
.cert-card{ padding:0; overflow:hidden; cursor:pointer; transition:transform .15s ease,border-color .15s ease; }
.cert-card:hover{ transform:translateY(-2px); border-color:var(--border-strong); }
.cert-card.locked{ cursor:default; }
.cert-card.locked:hover{ transform:none; }
.cert-preview{ aspect-ratio:1.7/1; background:linear-gradient(135deg,#1b1512,#0f0d0c); border-bottom:1px solid var(--border); display:flex; flex-direction:column; align-items:center; justify-content:center; position:relative; gap:8px; }
.cert-preview::after{ content:""; position:absolute; inset:0; background-image:var(--contour-lines); opacity:.3; }
.cert-preview .icon{ width:30px; height:30px; color:var(--accent); position:relative; z-index:1; }
.cert-preview span{ position:relative; z-index:1; font-size:11px; font-weight:700; letter-spacing:.05em; color:var(--text-faint); }
.cert-body{ padding:16px 18px 18px; }
.cert-body h4{ font-size:14.5px; margin-bottom:6px; }
.cert-locked-note{ font-size:12px; color:var(--text-faint); display:flex; align-items:center; gap:6px; margin-top:6px; }

.modal-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.65); z-index:100; display:flex; align-items:center; justify-content:center; padding:24px; }
.modal-overlay.hidden{ display:none; }
.modal-cert{ background:#0f0d0c; border:1px solid var(--border-strong); border-radius:var(--radius-lg); width:100%; max-width:600px; padding:52px 40px; text-align:center; position:relative; box-shadow:var(--shadow-pop); }
.modal-cert::before{ content:""; position:absolute; inset:10px; border:1px solid var(--accent-line); border-radius:calc(var(--radius-lg) - 6px); pointer-events:none; }
.modal-cert .crest{ width:36px; height:36px; margin:0 auto 18px; }
.modal-cert .kicker{ color:var(--accent); font-weight:700; font-size:12px; letter-spacing:.05em; margin-bottom:18px; }
.modal-cert h2{ color:#fff; font-size:24px; margin-bottom:6px; }
.modal-cert .cert-course{ color:var(--accent); font-size:18px; font-weight:700; margin:14px 0; }
.modal-cert .cert-date{ font-size:12.5px; color:var(--text-faint); margin-top:18px; }
.modal-close{ position:absolute; top:14px; right:14px; width:34px; height:34px; border-radius:99px; background:var(--surface); border:1px solid var(--border); color:var(--text-dim); display:flex; align-items:center; justify-content:center; }
body.light .modal-cert{ background:#fff; }
body.light .modal-cert h2{ color:var(--text); }

.settings-grid{ display:grid; grid-template-columns:2fr 1fr; gap:20px; align-items:start; }
.settings-card{ padding:24px; margin-bottom:20px; }
.settings-card h3{ font-size:15px; margin-bottom:18px; }
.toggle-row{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-top:1px solid var(--border); gap:16px; }
.toggle-row:first-child{ border-top:none; padding-top:0; }
.toggle-row .t-title{ font-size:13.5px; font-weight:600; color:var(--text); }
.toggle-row .t-sub{ font-size:12px; color:var(--text-faint); }
.toggle{ width:42px; height:24px; border-radius:99px; background:var(--border-strong); position:relative; flex-shrink:0; transition:background .15s; }
.toggle.on{ background:var(--accent); }
.toggle .knob{ width:18px; height:18px; border-radius:99px; background:#fff; position:absolute; top:3px; left:3px; transition:left .15s; }
.toggle.on .knob{ left:21px; }
.account-row{ display:flex; justify-content:space-between; padding:10px 0; font-size:13.5px; border-top:1px solid var(--border); }
.account-row:first-child{ border-top:none; }
.account-row span:first-child{ color:var(--text-faint); }
.account-row span:last-child{ font-weight:600; }

.toast-wrap{ position:fixed; bottom:24px; right:24px; z-index:200; display:flex; flex-direction:column; gap:10px; }
.toast{ background:var(--surface-raised); border:1px solid var(--border-strong); border-radius:var(--radius-sm); padding:14px 18px; display:flex; align-items:center; gap:12px; box-shadow:var(--shadow-pop); font-size:13.5px; font-weight:600; min-width:260px; animation:toast-in .25s ease; }
.toast .icon{ color:var(--success); flex-shrink:0; }
@keyframes toast-in{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:translateY(0); } }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:var(--bg); }
::-webkit-scrollbar-thumb{ background:var(--border-strong); border-radius:99px; border:2px solid var(--bg); background-clip:padding-box; }
::-webkit-scrollbar-thumb:hover{ background:var(--text-faint); }
*{ scrollbar-color: var(--border-strong) var(--bg); scrollbar-width:thin; }

.notif-wrap{ position:relative; }
.notif-panel{ position:absolute; top:calc(100% + 10px); right:0; width:320px; max-width:88vw; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-pop); z-index:50; overflow:hidden; }
.notif-panel-head{ padding:15px 18px; border-bottom:1px solid var(--border); font-weight:700; font-size:13.5px; }
.notif-list{ max-height:340px; overflow-y:auto; }
.notif-item{ padding:13px 18px; border-top:1px solid var(--border); display:flex; gap:10px; align-items:flex-start; }
.notif-item:first-child{ border-top:none; }
.notif-item.clicavel{ cursor:pointer; }
.notif-item.clicavel:hover{ background:var(--surface-hover); }
.notif-item .dot-unread{ width:7px; height:7px; border-radius:99px; background:var(--accent); margin-top:6px; flex-shrink:0; }
.notif-item .dot-unread.lida{ background:transparent; }
.notif-item .txt strong{ display:block; font-size:13px; margin-bottom:2px; }
.notif-item .txt p{ font-size:12.5px; margin:0 0 4px; }
.notif-item .txt .tempo{ font-size:11px; color:var(--text-faint); }
.notif-empty{ padding:30px 18px; text-align:center; font-size:13px; color:var(--text-faint); }

.avaliacao-aula{ padding:22px 24px; margin-bottom:26px; }
.avaliacao-aula h4{ font-size:14.5px; margin-bottom:14px; }
.estrelas{ display:flex; gap:6px; margin-bottom:16px; }
.estrela{ width:28px; height:28px; padding:0; color:var(--border-strong); transition:color .1s ease, transform .1s ease; }
.estrela svg{ width:100%; height:100%; }
.estrela:hover{ transform:scale(1.08); }
.estrela.ativa{ color:var(--accent); }
.avaliacao-aula textarea{ width:100%; min-height:70px; background:var(--surface-raised); border:1px solid var(--border-strong); border-radius:var(--radius-sm); padding:12px 14px; color:var(--text); font-family:inherit; font-size:14px; resize:vertical; margin-bottom:12px; }
.avaliacao-aula textarea:focus{ outline:none; border-color:var(--accent); }

.banner-carousel{ position:relative; margin-bottom:24px; }
.banner-track{ display:flex; overflow-x:auto; scroll-snap-type:x mandatory; border-radius:var(--radius-lg); scrollbar-width:none; border:1px solid var(--border); }
.banner-track::-webkit-scrollbar{ display:none; }
.banner-slide{ flex:0 0 100%; scroll-snap-align:start; aspect-ratio:4/1; display:flex; flex-direction:column; justify-content:center; padding:5% 6%; color:#fff; position:relative; overflow:hidden; }
.banner-slide::after{ content:""; position:absolute; inset:0; background-image:var(--contour-lines); opacity:.3; pointer-events:none; }
.banner-eyebrow{ font-size:11.5px; font-weight:700; letter-spacing:.05em; opacity:.9; position:relative; z-index:1; }
.banner-title{ font-family:var(--font-display); font-size:clamp(16px,2.4vw,26px); font-weight:700; margin:4px 0 8px; position:relative; z-index:1; }
.banner-cta{ font-size:13px; font-weight:700; position:relative; z-index:1; }
.banner-dots{ display:flex; justify-content:center; gap:6px; margin-top:10px; }
.banner-dot{ width:7px; height:7px; border-radius:99px; background:var(--border-strong); cursor:pointer; transition:width .15s ease,background .15s ease; }
.banner-dot.active{ background:var(--accent); width:18px; }

.avatar-upload-row{ display:flex; align-items:center; gap:16px; margin-bottom:22px; }
.avatar-lg{ width:64px; height:64px; font-size:20px; overflow:hidden; flex-shrink:0; }
.avatar-lg img{ width:100%; height:100%; object-fit:cover; border-radius:inherit; }
#avatar-iniciais{ cursor:pointer; overflow:hidden; }
#avatar-iniciais img{ width:100%; height:100%; object-fit:cover; border-radius:inherit; }

:root{ --contour-lines:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23ff5a1f' stroke-width='1'%3E%3Ccircle cx='60' cy='340' r='60'/%3E%3Ccircle cx='60' cy='340' r='120'/%3E%3Ccircle cx='60' cy='340' r='180'/%3E%3Ccircle cx='60' cy='340' r='240'/%3E%3Ccircle cx='60' cy='340' r='300'/%3E%3C/g%3E%3C/svg%3E"); }

@media (max-width:980px){ .aula-layout{ grid-template-columns:1fr; } .sidebar-lessons{ position:static; max-height:none; } .stat-row{ grid-template-columns:1fr 1fr; } .widget-row{ grid-template-columns:1fr; } .settings-grid{ grid-template-columns:1fr; } }
@media (max-width:860px){ .login-shell{ grid-template-columns:1fr; } .login-brandside{ display:none; } }
@media (max-width:760px){ .sidebar{ transform:translateX(-100%); } .sidebar.open{ transform:translateX(0); box-shadow:var(--shadow-pop); } .main-col{ margin-left:0; } .menu-toggle{ display:flex; } .topbar{ padding:0 16px; } .topbar-search{ display:none; } .content{ padding:20px; } .stat-row{ grid-template-columns:1fr; } .continue-card{ flex-direction:column; align-items:flex-start; } .continue-thumb{ width:100%; height:80px; } .aula-header-row{ flex-direction:column; } .aula-actions{ width:100%; } .aula-actions .btn{ flex:1; } .backdrop{ display:block; } }
.backdrop{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:35; }
.backdrop.show{ display:block; }
.hidden{ display:none !important; }

/* ============================================================
   Componentes de administração: drawer, confirmação, ações
   ============================================================ */
.drawer-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:150; display:flex; justify-content:flex-end; opacity:0; transition:opacity .18s ease; }
.drawer-overlay.aberto{ opacity:1; }
.drawer{ width:460px; max-width:92vw; background:var(--bg-panel); border-left:1px solid var(--border); height:100%; display:flex; flex-direction:column; transform:translateX(20px); transition:transform .18s ease; box-shadow:var(--shadow-pop); }
.drawer-overlay.aberto .drawer{ transform:translateX(0); }
.drawer-head{ padding:20px 22px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.drawer-head h3{ font-size:16.5px; margin:0; }
.drawer-sub{ font-size:12.5px; color:var(--text-faint); margin:4px 0 0; }
.drawer-head .modal-close{ position:static; }
.drawer-body{ padding:22px; flex:1; overflow-y:auto; }
.drawer-foot{ padding:16px 22px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:10px; }

.campo-cor{ display:flex; align-items:center; gap:12px; }
.campo-cor input[type=color]{ width:48px; height:38px; border:1px solid var(--border-strong); border-radius:var(--radius-sm); background:var(--surface); padding:3px; cursor:pointer; }
.campo-cor span{ font-size:12.5px; color:var(--text-faint); }
.campo-imagem{ display:flex; align-items:center; gap:14px; }
.previa-imagem{ width:88px; height:56px; border-radius:var(--radius-sm); border:1px dashed var(--border-strong); background:var(--surface-raised); background-size:cover; background-position:center; flex-shrink:0; }
.previa-imagem.tem-imagem{ border-style:solid; }

.confirm-card{ max-width:400px; width:100%; padding:26px; }
.confirm-card h3{ font-size:16.5px; margin-bottom:8px; }
.confirm-card p{ font-size:14px; margin-bottom:22px; }
.confirm-acoes{ display:flex; justify-content:flex-end; gap:10px; }
.btn-perigo{ background:var(--danger); color:#fff; }
.btn-perigo:hover{ filter:brightness(1.08); }

.acoes-linha{ display:flex; gap:6px; justify-content:flex-end; }
.btn-icone{ width:32px; height:32px; border-radius:var(--radius-sm); border:1px solid var(--border); background:var(--surface); color:var(--text-dim); display:flex; align-items:center; justify-content:center; }
.btn-icone:hover{ background:var(--surface-hover); color:var(--text); }
.btn-icone.perigo:hover{ color:var(--danger); border-color:var(--danger); }

.aviso-previa{ position:sticky; top:var(--topbar-h); z-index:29; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 18px; background:var(--accent-soft); border:1px solid var(--accent-line); border-radius:var(--radius-sm); margin-bottom:22px; font-size:13.5px; font-weight:600; color:var(--accent); flex-wrap:wrap; }

@media (max-width:560px){ .drawer{ width:100%; max-width:100%; } }

/* ---------------- Administração › Conteúdos ---------------- */
.ligacao-tabela{ font:inherit; font-weight:600; color:var(--text); padding:0; text-align:left; }
.ligacao-tabela:hover{ color:var(--accent); }
.sub-celula{ font-size:12px; color:var(--text-faint); }
.amostra-cor{ display:inline-block; width:16px; height:16px; border-radius:5px; border:1px solid var(--border-strong); vertical-align:middle; }

.modulo-admin{ margin-bottom:14px; overflow:hidden; }
.modulo-admin-head{ display:flex; align-items:center; gap:16px; padding:18px 20px; flex-wrap:wrap; }
.aulas-admin{ border-top:1px solid var(--border); }
.aula-admin{ display:flex; align-items:center; gap:14px; padding:12px 20px 12px 24px; border-top:1px solid var(--border); }
.aula-admin:first-child{ border-top:none; }
.aula-admin-num{ font-size:12px; font-weight:700; color:var(--text-faint); font-variant-numeric:tabular-nums; min-width:28px; }
.aula-admin-info{ flex:1; min-width:0; }
.aula-admin-info .titulo{ display:block; font-size:14px; font-weight:500; }
.btn-nova-aula{ display:block; width:100%; padding:12px 20px; border-top:1px dashed var(--border-strong); font-size:13px; font-weight:600; color:var(--text-dim); text-align:left; }
.btn-nova-aula:hover{ color:var(--accent); background:var(--surface-hover); }
.btn-icone[disabled]{ opacity:.3; pointer-events:none; }

/* ---------------- Administração › Banners e Eventos ---------------- */
.mini-banner{ width:64px; height:36px; border-radius:6px; border:1px solid var(--border-strong); flex-shrink:0; }
.admin-table .event-date-badge{ width:40px; height:40px; }
.admin-table .event-date-badge .day{ font-size:14px; }

/* Linha de 3 estatísticas (respeita as media queries, ao contrário de um style inline) */
.stat-row.tres{ grid-template-columns:repeat(3,1fr); }
@media (max-width:980px){ .stat-row.tres{ grid-template-columns:1fr 1fr; } }
@media (max-width:760px){ .stat-row.tres{ grid-template-columns:1fr; } }

/* Campo de seleção múltipla do drawer */
.checklist{ display:flex; flex-direction:column; gap:6px; max-height:230px; overflow-y:auto; border:1px solid var(--border-strong); border-radius:var(--radius-sm); padding:8px; background:var(--surface); }
.checklist-item{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:var(--radius-sm); font-size:13.5px; cursor:pointer; }
.checklist-item:hover{ background:var(--surface-hover); }
.checklist-item.escolhido{ background:var(--accent-soft); color:var(--accent); font-weight:600; }
.checklist-item input{ accent-color:var(--accent); width:15px; height:15px; }

/* Pré-visualização do certificado no painel */
.cert-previa-wrap{ display:flex; justify-content:center; margin-bottom:24px; }
.cert-previa{ max-width:560px; width:100%; position:relative; }
.cert-assinatura{ margin-top:26px; display:flex; flex-direction:column; align-items:center; gap:2px; position:relative; z-index:1; }
.cert-assinatura .linha{ width:160px; height:1px; background:var(--border-strong); margin-bottom:8px; }
.cert-assinatura strong{ font-size:13.5px; }
.cert-assinatura .cargo{ font-size:11.5px; color:var(--text-faint); }

/* ---------------- Administração › Moderação ---------------- */
.celula-texto{ white-space:normal; max-width:340px; font-size:13px; color:var(--text-dim); }
.estrelas-mini{ display:inline-flex; gap:2px; }
.estrelas-mini span{ width:14px; height:14px; color:var(--border-strong); display:inline-flex; }
.estrelas-mini span.cheia{ color:var(--accent); }
.estrelas-mini svg{ width:100%; height:100%; }

/* Cursos fora do plano do aluno */
.course-card.bloqueado{ cursor:default; }
.course-card.bloqueado:hover{ transform:none; }
.course-card.bloqueado .course-cover{ opacity:.55; }
.course-cover .cadeado{ position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); color:var(--text-dim); z-index:1; }
.oferta-linha{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; padding-top:14px; border-top:1px solid var(--border); }
.oferta-preco{ font-family:var(--font-display); font-size:18px; font-weight:700; }
.oferta-preco span{ font-size:12px; color:var(--text-faint); font-family:var(--font-body); font-weight:500; }

/* ============================================================
   Fase 7 — Aparência, Configurações, Integrações, Relatórios
   ============================================================ */
.logo-imagem{ object-fit:contain; border-radius:8px; }

/* Aparência */
.amostra-cor.grande{ width:44px; height:44px; border-radius:10px; display:block; margin-bottom:10px; }
.previa-login{ padding:28px; margin-bottom:22px; }
.previa-marca{ display:flex; align-items:center; gap:10px; margin-bottom:22px; }
.previa-login h3{ font-size:22px; line-height:1.3; margin:10px 0 10px; max-width:34ch; }
.previa-login p{ color:var(--text-dim); font-size:14px; max-width:52ch; }
.previa-botoes{ display:flex; gap:10px; margin-top:20px; flex-wrap:wrap; }
.previa-botoes .btn{ opacity:.85; cursor:default; }
.paleta-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; padding:20px; }
.paleta-grid strong{ display:block; font-size:13.5px; }
.paleta-grid .sub-celula{ display:block; }

/* Configurações */
.grelha-toggles{ display:grid; grid-template-columns:repeat(2,1fr); gap:0 28px; }
.grelha-toggles .toggle-row{ border-top:1px solid var(--border); }
.grelha-toggles .toggle-row:nth-child(-n+2){ border-top:none; padding-top:0; }
.toggle-row .t-icone{ width:34px; height:34px; border-radius:9px; background:var(--surface-hover); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--text-dim); flex-shrink:0; }
.toggle-row .t-icone .icon{ width:17px; height:17px; }
.toggle-row .t-icone + div{ flex:1; min-width:0; }
.toggle{ cursor:pointer; }
.toggle.bloqueado{ opacity:.5; cursor:not-allowed; }
.atalhos-config{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px; padding:16px; }
.atalho{ display:flex; align-items:center; gap:14px; padding:14px; border:1px solid var(--border); border-radius:var(--radius); cursor:pointer; transition:border-color .15s, background .15s; }
.atalho:hover{ border-color:var(--accent-line); background:var(--surface-hover); }
.atalho strong{ display:block; font-size:13.5px; }
.atalho .sub-celula{ display:block; }
.linha-acoes{ display:flex; gap:10px; flex-wrap:wrap; }
/* Cartão de conteúdo simples nas páginas de configuração. */
.card.painel{ padding:20px; margin-bottom:22px; }
.card + .section-title{ margin-top:26px; }

/* Integrações */
.lista-integracoes{ padding:6px 20px; margin-bottom:22px; }
.integracao{ display:flex; align-items:center; gap:16px; padding:18px 0; border-top:1px solid var(--border); }
.integracao:first-child{ border-top:none; }
.integracao-info{ flex:1; min-width:0; }
.integracao-info strong{ display:block; font-size:14px; margin-bottom:2px; }
.integracao-info .sub-celula{ display:block; word-break:break-word; }
.bloco-codigo{ display:block; padding:12px 14px; background:var(--surface-hover); border:1px solid var(--border); border-radius:10px; font-size:12.5px; word-break:break-all; color:var(--text-dim); }
.previa-player{ margin-top:16px; aspect-ratio:16/9; max-width:100%; border-radius:var(--radius); overflow:hidden; background:#000; border:1px solid var(--border); }
.previa-player iframe{ width:100%; height:100%; border:0; display:block; }
.player-embed{ position:absolute; inset:0; width:100%; height:100%; border:0; }

/* Relatórios */
.barra-linha{ display:flex; align-items:center; gap:14px; padding:9px 20px; }
.barra-rotulo{ width:150px; font-size:13px; font-weight:600; flex-shrink:0; }
.barra-track{ flex:1; height:8px; border-radius:99px; background:var(--surface-hover); border:1px solid var(--border); overflow:hidden; }
.barra-fill{ height:100%; background:var(--accent); border-radius:99px; }
.barra-valor{ width:34px; text-align:right; font-size:13px; font-weight:700; color:var(--text-dim); flex-shrink:0; }
.relatorio-duplo{ margin-top:22px; display:grid; grid-template-columns:repeat(2,1fr); gap:16px; margin-bottom:22px; }
.relatorio-duplo .card{ padding-bottom:14px; }

/* Assistente */
.aviso-honesto{ display:flex; gap:14px; align-items:flex-start; padding:18px 20px; margin-bottom:18px; border-color:var(--accent-line); }
.aviso-honesto .icon{ color:var(--accent); flex-shrink:0; margin-top:2px; }
.aviso-honesto strong{ display:block; font-size:13.5px; margin-bottom:4px; }
.aviso-honesto p{ margin:0; font-size:13px; color:var(--text-dim); }
.ia-controlos{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; padding:20px; margin-bottom:16px; }
.ia-resultado{ padding:0 0 18px; }
.ia-resultado textarea{ width:100%; margin:0 0 16px; padding:18px 20px; background:transparent; border:none; border-top:1px solid var(--border); border-bottom:1px solid var(--border); color:var(--text); font-family:inherit; font-size:13.5px; line-height:1.65; resize:vertical; }
.ia-resultado textarea:focus{ outline:none; background:var(--surface-hover); }
.ia-resultado .linha-acoes{ padding:0 20px; }

/* Apoio nas definições do aluno */
.bloco-apoio{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px; margin-top:16px; flex-wrap:wrap; }

@media (max-width: 900px){
  .paleta-grid{ grid-template-columns:repeat(2,1fr); }
  .grelha-toggles, .atalhos-config, .relatorio-duplo, .ia-controlos{ grid-template-columns:1fr; }
  .grelha-toggles .toggle-row:nth-child(2){ border-top:1px solid var(--border); padding-top:14px; }
  .barra-rotulo{ width:110px; }
}

/* ============================================================
   Conteúdos — páginas de curso e de aula
   ============================================================ */
.form-page{ max-width:1080px; }
.form-topo{ padding-bottom:20px; border-bottom:1px solid var(--border); margin-bottom:28px; }
.form-topo h1{ font-size:28px; }
.form-topo .eyebrow{ display:block; font-size:11.5px; font-weight:700; letter-spacing:.06em; color:var(--text-faint); margin-bottom:8px; }
.form-secao{ display:grid; grid-template-columns:300px 1fr; gap:32px; margin-bottom:32px; }
.form-secao-desc h3{ font-size:16px; margin-bottom:8px; }
.form-secao-desc p{ font-size:13.5px; color:var(--text-faint); line-height:1.6; }
.form-card{ padding:24px; }
.form-card .field:last-of-type{ margin-bottom:18px; }
.campo-linha{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.campo-linha.nome-sigla{ grid-template-columns:1fr 120px; }
.rotulo-solto{ display:block; font-size:13px; font-weight:600; color:var(--text-dim); margin-bottom:8px; }

.check-card{ display:flex; align-items:flex-start; gap:12px; padding:14px 16px; border:1px solid var(--border); border-radius:var(--radius); margin-top:12px; cursor:pointer; transition:border-color .15s, background .15s; }
.check-card:hover{ border-color:var(--border-strong); }
.check-card.marcado{ border-color:var(--accent-line); background:var(--accent-soft); }
.check-card .check-quadro{ width:18px; height:18px; border-radius:5px; border:1.5px solid var(--border-strong); display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px; color:transparent; }
.check-card.marcado .check-quadro{ background:var(--accent); border-color:var(--accent); color:#fff; }
.check-card .check-quadro .icon{ width:12px; height:12px; }
.check-card strong{ display:block; font-size:13.5px; }
.check-card span{ display:block; font-size:12.5px; color:var(--text-faint); margin-top:2px; }

.upload-box{ position:relative; border:1px dashed var(--border-strong); border-radius:var(--radius); min-height:240px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:20px; text-align:center; background-size:cover; background-position:center; }
.upload-box.pequena{ min-height:150px; }
.upload-box.sem-fundo{ min-height:180px; }
.upload-box .upload-dica{ font-size:13px; color:var(--text-faint); max-width:34ch; }
.upload-box.tem-imagem .upload-dica{ display:none; }
.upload-box.tem-imagem .upload-acoes{ background:rgba(10,10,11,.72); padding:8px; border-radius:var(--radius-sm); backdrop-filter:blur(4px); }
.upload-acoes{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }

.form-rodape{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding-top:22px; border-top:1px solid var(--border); }
.form-rodape-acoes{ display:flex; gap:10px; flex-wrap:wrap; margin-left:auto; }
.btn-texto{ color:var(--text-dim); }
.btn-texto:hover{ color:var(--text); }
.btn-contorno{ background:transparent; border-color:var(--accent); color:var(--accent); }
.btn-contorno:hover{ background:var(--accent-soft); }
.btn-perigo-suave{ background:transparent; border-color:var(--border-strong); color:var(--danger); }
.btn-perigo-suave:hover{ background:var(--danger-soft); }

/* Gestão de conteúdo */
.gestao-head{ display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; padding-bottom:20px; border-bottom:1px solid var(--border); margin-bottom:24px; }
.gestao-head h2{ font-size:19px; }
.gestao-head p{ margin:0; font-size:13.5px; color:var(--text-faint); }
.gestao-acoes{ display:flex; gap:10px; flex-wrap:wrap; }
.gestao-grid{ display:grid; grid-template-columns:320px 1fr; gap:24px; align-items:start; }
.curso-resumo{ position:relative; }
.curso-resumo-capa{ aspect-ratio:16/9; border-radius:var(--radius-lg); border:1px solid var(--border); background:linear-gradient(160deg,#1b1512,#0f0d0c); background-size:cover; background-position:center; display:flex; align-items:center; justify-content:center; margin-bottom:16px; position:relative; }
.curso-resumo-capa .sigla-grande{ font-family:var(--font-display); font-size:34px; font-weight:700; color:var(--accent); letter-spacing:.04em; }
.curso-resumo-capa .cover-badge{ position:absolute; top:12px; left:12px; background:rgba(10,10,11,.75); border:1px solid var(--border-strong); font-size:10.5px; font-weight:700; padding:4px 9px; border-radius:var(--radius-pill); }
.curso-resumo h3{ font-size:19px; margin-bottom:4px; }
.curso-resumo-sub{ font-size:13.5px; color:var(--text-dim); margin-bottom:10px; }
.curso-resumo-meta{ font-size:12.5px; color:var(--text-faint); margin-bottom:14px; }
.curso-resumo-meta .cat-ligacao{ font-weight:600; margin-left:8px; }
.curso-resumo-pct{ display:block; text-align:right; font-size:12px; font-weight:700; color:var(--text-faint); margin:6px 0 16px; }
.curso-resumo .btn-block{ width:100%; }
.ligacao-vendas{ display:block; text-align:center; margin-top:12px; font-size:12.5px; color:var(--text-faint); }
.ligacao-vendas:hover{ color:var(--accent); }

.modulo-acordeao{ margin-bottom:14px; overflow:hidden; }
.modulo-acordeao-head{ display:flex; align-items:center; gap:14px; padding:18px 20px; cursor:pointer; }
.modulo-acordeao-head:hover{ background:var(--surface-hover); }
.modulo-acordeao-head .chevron{ color:var(--text-faint); transition:transform .15s; transform:rotate(-90deg); }
.modulo-acordeao.aberto .modulo-acordeao-head .chevron{ transform:none; }
.modulo-acordeao-titulo{ flex:1; min-width:0; }
.modulo-acordeao-titulo h3{ font-size:15px; margin:0; }
.modulo-acordeao-titulo p{ margin:2px 0 0; font-size:12.5px; color:var(--text-faint); }
.modulo-count{ font-size:12px; font-weight:600; color:var(--text-faint); white-space:nowrap; }
.modulo-acordeao-corpo{ display:none; border-top:1px solid var(--border); padding:8px 12px 12px; }
.modulo-acordeao.aberto .modulo-acordeao-corpo{ display:block; }
.aula-linha{ display:flex; align-items:center; gap:14px; padding:10px 8px; border-radius:var(--radius-sm); cursor:pointer; }
.aula-linha:hover{ background:var(--surface-hover); }
.aula-linha-capa{ width:56px; aspect-ratio:16/9; border-radius:6px; background:var(--surface-hover); border:1px solid var(--border); background-size:cover; background-position:center; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:var(--text-faint); flex-shrink:0; }
.aula-linha-info{ flex:1; min-width:0; }
.aula-linha-info .titulo{ display:block; font-size:13.5px; font-weight:600; }
.aula-duracao{ font-size:12px; color:var(--text-faint); white-space:nowrap; }

.menu-flutuante{ position:absolute; z-index:200; min-width:190px; background:var(--surface-raised); border:1px solid var(--border-strong); border-radius:var(--radius); box-shadow:var(--shadow-pop); padding:6px; }
.menu-flutuante button{ display:block; width:100%; text-align:left; padding:9px 12px; border-radius:var(--radius-sm); font-size:13.5px; color:var(--text); }
.menu-flutuante button:hover{ background:var(--surface-hover); }
.menu-flutuante button.perigo{ color:var(--danger); }
.menu-flutuante button:disabled{ opacity:.4; cursor:not-allowed; }

/* Editor de aula */
.aula-form-grid{ display:grid; grid-template-columns:1fr 340px; gap:32px; margin-bottom:26px; }
.editor-abas{ display:inline-flex; gap:2px; background:var(--bg-panel); border:1px solid var(--border); border-radius:var(--radius-sm); padding:4px; margin-bottom:14px; flex-wrap:wrap; }
.editor-abas button{ display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border-radius:var(--radius-sm); font-size:13.5px; font-weight:600; color:var(--text-faint); }
.editor-abas button .icon{ width:16px; height:16px; }
.editor-abas button.active{ background:var(--surface-hover); color:var(--text); }
.editor-caixa{ overflow:hidden; }
.editor-toolbar{ display:flex; flex-wrap:wrap; gap:2px; padding:8px 10px; border-bottom:1px solid var(--border); }
.editor-toolbar button{ min-width:32px; height:32px; border-radius:var(--radius-sm); color:var(--text-dim); font-size:14px; display:inline-flex; align-items:center; justify-content:center; }
.editor-toolbar button:hover{ background:var(--surface-hover); color:var(--text); }
.editor-toolbar button svg{ width:17px; height:17px; }
.editor-area{ min-height:340px; padding:20px 22px; font-size:14.5px; line-height:1.7; outline:none; }
.editor-area:empty::before{ content:"Escreve aqui o conteúdo da aula..."; color:var(--text-faint); }
.editor-area h3{ font-size:18px; margin:18px 0 8px; }
.editor-area ul{ list-style:disc; padding-left:22px; margin:10px 0; }
.editor-area pre{ background:var(--surface-hover); border:1px solid var(--border); border-radius:8px; padding:12px 14px; font-size:13px; overflow-x:auto; }
.editor-area img{ border-radius:10px; margin:12px 0; }
.editor-caixa.ecra-inteiro{ position:fixed; inset:20px; z-index:300; overflow-y:auto; box-shadow:var(--shadow-pop); }
.editor-caixa.ecra-inteiro .editor-area{ min-height:calc(100vh - 160px); }
.tabela-conteudo{ width:100%; border-collapse:collapse; margin:12px 0; }
.tabela-conteudo td{ border:1px solid var(--border-strong); padding:8px 10px; font-size:13.5px; }

.lista-ficheiros{ display:flex; flex-direction:column; gap:8px; }
.ficheiro-linha{ display:flex; align-items:center; gap:14px; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); }
.ficheiro-linha .icon{ color:var(--text-faint); }
.ficheiro-info{ flex:1; min-width:0; }
.ficheiro-info strong{ display:block; font-size:13.5px; }
.ficheiro-info .sub-celula{ display:block; word-break:break-all; }

.quiz-bloco{ border:1px solid var(--border); border-radius:var(--radius); padding:16px; margin-bottom:12px; }
.quiz-bloco-head{ display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.quiz-num{ width:24px; height:24px; border-radius:99px; background:var(--accent-soft); color:var(--accent); font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.quiz-pergunta{ flex:1; background:transparent; border:none; border-bottom:1px solid var(--border); color:var(--text); font-family:inherit; font-size:14.5px; font-weight:600; padding:6px 0; }
.quiz-pergunta:focus{ outline:none; border-color:var(--accent); }
.quiz-opcoes{ display:flex; flex-direction:column; gap:8px; margin-bottom:10px; }
.quiz-opcao{ display:flex; align-items:center; gap:10px; padding:8px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); }
.quiz-opcao.certa{ border-color:rgba(61,220,132,.45); background:var(--success-soft); }
.quiz-opcao input[type=radio]{ accent-color:var(--success); width:15px; height:15px; flex-shrink:0; }
.quiz-texto{ flex:1; background:transparent; border:none; color:var(--text); font-family:inherit; font-size:13.5px; }
.quiz-texto:focus{ outline:none; }

/* Aula do aluno: texto, materiais e quiz */
.conteudo-aula{ padding:24px; margin-bottom:20px; font-size:14.5px; line-height:1.75; }
.conteudo-aula h3{ font-size:18px; margin:20px 0 8px; }
.conteudo-aula h3:first-child{ margin-top:0; }
.conteudo-aula ul{ list-style:disc; padding-left:22px; margin:10px 0; }
.conteudo-aula p{ color:var(--text-dim); }
.conteudo-aula img{ border-radius:10px; margin:14px 0; }
.conteudo-aula pre{ background:var(--surface-hover); border:1px solid var(--border); border-radius:8px; padding:12px 14px; font-size:13px; overflow-x:auto; }
.conteudo-aula table{ width:100%; border-collapse:collapse; margin:12px 0; }
.conteudo-aula td{ border:1px solid var(--border-strong); padding:8px 10px; font-size:13.5px; }

.materiais-aula{ padding:20px 22px; margin-bottom:20px; }
.materiais-aula h4{ font-size:14px; margin-bottom:14px; }
.material-linha{ display:flex; align-items:center; gap:14px; width:100%; text-align:left; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); margin-bottom:8px; color:var(--text); transition:border-color .15s, background .15s; }
.material-linha:hover{ border-color:var(--accent-line); background:var(--surface-hover); }
.material-linha .icon{ color:var(--text-faint); }
.material-info{ flex:1; min-width:0; }
.material-info strong{ display:block; font-size:13.5px; }

.quiz-aula{ padding:22px; margin-bottom:20px; }
.quiz-aula h4{ font-size:14px; margin-bottom:16px; }
.quiz-pergunta-aluno{ margin-bottom:20px; }
.quiz-enunciado{ display:flex; align-items:flex-start; gap:10px; font-size:14.5px; font-weight:600; color:var(--text); margin-bottom:10px; }
.quiz-opcoes-aluno{ display:flex; flex-direction:column; gap:8px; }
.quiz-opcao-aluno{ text-align:left; padding:11px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); font-size:13.5px; color:var(--text); transition:border-color .15s, background .15s; }
.quiz-opcao-aluno:hover:enabled{ border-color:var(--accent-line); background:var(--surface-hover); }
.quiz-opcao-aluno.certa{ border-color:rgba(61,220,132,.5); background:var(--success-soft); color:var(--success); }
.quiz-opcao-aluno.errada{ border-color:rgba(224,72,63,.5); background:var(--danger-soft); color:var(--danger); }
.quiz-opcao-aluno:disabled{ cursor:default; }
.quiz-resultado{ padding:12px 14px; border-radius:var(--radius-sm); background:var(--surface-hover); font-size:13.5px; font-weight:600; }
.quiz-resultado.tudo-certo{ background:var(--success-soft); color:var(--success); }

.course-cover.com-capa{ background-size:cover; background-position:center; }
.course-cover.com-capa::after{ opacity:0; }

@media (max-width: 1000px){
  .form-secao, .gestao-grid, .aula-form-grid{ grid-template-columns:1fr; gap:18px; }
  .form-secao-desc p{ max-width:60ch; }
}
@media (max-width: 640px){
  .campo-linha, .campo-linha.nome-sigla{ grid-template-columns:1fr; }
  .form-rodape-acoes{ width:100%; }
  .form-rodape-acoes .btn{ flex:1; }
  .editor-abas{ width:100%; }
  .editor-abas button{ flex:1; justify-content:center; padding:8px 6px; }
}

/* Cursos em cartões no painel — o mesmo cartão que o aluno vê */
.contagem-grelha{ font-size:12.5px; color:var(--text-faint); margin-bottom:14px; }
.course-legenda{ font-size:12.5px; color:var(--text-faint); }
.chip .chip-n{ margin-left:6px; font-size:11.5px; font-weight:700; color:var(--text-faint); }
.chip.active .chip-n{ color:inherit; opacity:.7; }
.cover-badge.estado{ left:auto; right:16px; color:var(--warning); border-color:rgba(240,166,62,.45); background:var(--warning-soft); }
.course-card-acoes{ position:absolute; bottom:10px; right:10px; display:flex; gap:6px; opacity:0; transition:opacity .15s ease; z-index:2; }
.course-card:hover .course-card-acoes,
.course-card-acoes:focus-within{ opacity:1; }
.course-card-acoes .btn-icone{ background:rgba(10,10,11,.78); border:1px solid var(--border-strong); backdrop-filter:blur(4px); }
body.light .course-card-acoes .btn-icone{ background:rgba(255,255,255,.9); }
@media (hover: none){ .course-card-acoes{ opacity:1; } }

/* Código de incorporação do vídeo */
.campo-codigo{ font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12.5px; line-height:1.6; white-space:pre; overflow-x:auto; }
.estado-embed{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:11px 14px; border-radius:var(--radius-sm); background:var(--surface-hover); border:1px solid var(--border); font-size:12.5px; color:var(--text-faint); }
.estado-embed code{ font-size:12px; word-break:break-all; color:var(--text-dim); }
.estado-embed .icon{ width:14px; height:14px; flex-shrink:0; }
.estado-embed.bom{ background:var(--success-soft); border-color:rgba(61,220,132,.35); color:var(--success); }
.estado-embed.bom code{ color:inherit; opacity:.85; }
.estado-embed.mau{ background:var(--warning-soft); border-color:rgba(240,166,62,.4); color:var(--warning); }
.player-wrap.previa{ max-width:520px; }
.passos{ list-style:decimal; padding-left:20px; margin:0 0 14px; }
.passos li{ font-size:13.5px; color:var(--text-dim); margin-bottom:8px; line-height:1.6; }
.passos li strong{ color:var(--text); }

/* ============================================================
   Hero do curso, vitrine, trilha, eventos e chat
   ============================================================ */

/* Seta em círculo — acompanha o tamanho do texto onde está */
.seta-circulo{ width:1em; height:1em; vertical-align:-0.12em; flex-shrink:0; }

/* Hero do curso */
.curso-hero{ position:relative; overflow:hidden; margin-bottom:28px; background:linear-gradient(160deg,#1b1512,#0f0d0c); background-size:cover; background-position:center; }
.curso-hero::before{ content:""; position:absolute; inset:0; background-image:var(--contour-lines); opacity:.16; }
.curso-hero.com-capa::after{ content:""; position:absolute; inset:0; background:linear-gradient(100deg, var(--bg-panel) 0%, rgba(16,16,18,.92) 42%, rgba(16,16,18,.25) 100%); }
body.light .curso-hero{ background:linear-gradient(160deg,#fff,#f3f1ec); }
body.light .curso-hero.com-capa::after{ background:linear-gradient(100deg, #ffffff 0%, rgba(255,255,255,.94) 42%, rgba(255,255,255,.3) 100%); }
.curso-hero-conteudo{ position:relative; z-index:1; padding:40px 42px; max-width:620px; }
.curso-hero h1{ font-size:30px; margin:8px 0 10px; }
.curso-hero-desc{ font-size:15px; color:var(--text-dim); margin-bottom:16px; max-width:52ch; }
.curso-hero-meta{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; font-size:13px; color:var(--text-faint); margin-bottom:6px; }
.curso-hero-meta strong{ color:var(--accent); font-weight:600; }
.curso-hero-turma{ font-size:12.5px; color:var(--text-faint); margin:6px 0 0; }
.curso-hero-progresso{ display:flex; align-items:center; gap:14px; margin:20px 0 22px; max-width:420px; }
.curso-hero-progresso .progress-track{ flex:1; }
.curso-hero-progresso span{ font-size:12.5px; font-weight:700; color:var(--accent); }
.curso-hero-acoes{ display:flex; gap:10px; flex-wrap:wrap; }

/* Vitrine */
.course-card.vitrine{ cursor:pointer; }
.course-card.vitrine:hover{ transform:translateY(-2px); border-color:var(--accent-line); }
.course-card.vitrine .btn-block{ width:100%; margin-top:14px; gap:6px; }
.course-card.bloqueado.vitrine .course-cover{ opacity:.7; }

/* Trilha no Início */
.trilha-card{ padding:22px 24px; margin-bottom:24px; }
.trilha-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.trilha-head h3{ font-size:16px; margin:6px 0 2px; }
.trilha-passos{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; }
.trilha-passo{ display:flex; align-items:center; gap:14px; padding:11px 12px; border-radius:var(--radius-sm); cursor:pointer; transition:background .15s; }
.trilha-passo:hover{ background:var(--surface-hover); }
.trilha-num{ width:26px; height:26px; border-radius:99px; background:var(--accent-soft); color:var(--accent); font-size:12.5px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.trilha-passo.concluido .trilha-num{ background:var(--success-soft); color:var(--success); }
.trilha-txt{ flex:1; min-width:0; }
.trilha-txt strong{ display:block; font-size:14px; }
.trilha-pct{ font-size:12.5px; font-weight:700; color:var(--text-faint); }

/* Onboarding */
.onboarding-overlay{ align-items:center; }
.onboarding-card{ width:100%; max-width:560px; padding:32px; max-height:88vh; overflow-y:auto; }
.onb-passos{ display:flex; gap:6px; margin-bottom:20px; }
.onb-passos span{ flex:1; height:3px; border-radius:99px; background:var(--border-strong); }
.onb-passos span.feito{ background:var(--accent); }
.onboarding-card h2{ font-size:23px; margin:8px 0 8px; }
.onb-sub{ font-size:14px; color:var(--text-dim); margin-bottom:22px; }
.onb-opcoes{ display:flex; flex-direction:column; gap:10px; margin-bottom:26px; }
.onb-opcao{ display:flex; align-items:center; gap:12px; width:100%; text-align:left; padding:15px 16px; border:1px solid var(--border); border-radius:var(--radius); color:var(--text); transition:border-color .15s, background .15s; }
.onb-opcao:hover{ border-color:var(--border-strong); background:var(--surface-hover); }
.onb-opcao.escolhida{ border-color:var(--accent); background:var(--accent-soft); }
.onb-opcao-txt{ flex:1; min-width:0; }
.onb-opcao-txt strong{ display:block; font-size:14px; }
.onb-opcao-txt span{ display:block; font-size:12.5px; color:var(--text-faint); margin-top:2px; }
.onb-check{ width:20px; height:20px; border-radius:99px; border:1.5px solid var(--border-strong); display:flex; align-items:center; justify-content:center; color:transparent; flex-shrink:0; }
.onb-opcao.escolhida .onb-check{ background:var(--accent); border-color:var(--accent); color:#fff; }
.onb-check .icon{ width:12px; height:12px; }
.onb-acoes{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.onb-acoes .btn-primary:disabled{ opacity:.45; cursor:not-allowed; }
.onb-trilha{ list-style:none; margin:0 0 26px; padding:0; display:flex; flex-direction:column; gap:10px; counter-reset:t; }
.onb-trilha li{ display:flex; align-items:center; gap:14px; padding:12px; border:1px solid var(--border); border-radius:var(--radius); }
.onb-trilha-capa{ width:64px; aspect-ratio:16/9; border-radius:7px; background:var(--surface-hover); border:1px solid var(--border); background-size:cover; background-position:center; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:var(--accent); flex-shrink:0; }
.onb-trilha-txt strong{ display:block; font-size:14px; }
.onb-trilha-txt span{ display:block; font-size:12.5px; color:var(--text-faint); }

/* Eventos que abrem para baixo */
/* Anula o antigo layout em linha: agora a linha é um filho, não o cartão. */
.event-row{ display:block; padding:0; border-top:1px solid var(--border); }
.event-row:first-child{ border-top:none; }
.event-linha{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:16px 20px; cursor:pointer; }
.event-linha:hover{ background:var(--surface-hover); }
.event-chevron{ color:var(--text-faint); transition:transform .15s; flex-shrink:0; }
.event-row.aberto .event-chevron{ transform:rotate(180deg); }
.event-detalhe{ display:none; padding:0 20px 20px 76px; }
.event-row.aberto .event-detalhe{ display:block; }
.event-detalhe-corpo{ border-left:2px solid var(--accent-line); padding-left:18px; }
.event-descricao{ font-size:13.5px; color:var(--text-dim); margin-bottom:16px; max-width:64ch; }
.event-campos{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:14px; margin-bottom:18px; }
.event-campos .rotulo{ display:block; font-size:11px; font-weight:700; letter-spacing:.05em; color:var(--text-faint); margin-bottom:3px; }
.event-campos strong{ font-size:13.5px; font-weight:600; }
.event-campos strong.confirmada{ color:var(--success); }
.event-acoes{ display:flex; gap:10px; flex-wrap:wrap; }
.event-acoes .btn{ gap:6px; }

/* Comunidade em formato de conversa */
.chat{ display:flex; flex-direction:column; overflow:hidden; }
.chat-mensagens{ min-height:300px; max-height:min(60vh, 560px); overflow-y:auto; padding:18px 20px; display:flex; flex-direction:column; gap:2px; }
.msg{ display:flex; gap:12px; padding:5px 10px; border-radius:var(--radius-sm); transition:background .15s; }
.msg:hover{ background:var(--surface-hover); }
.msg:not(.agrupada){ margin-top:14px; }
.msg.fixada{ background:var(--accent-soft); border:1px solid var(--accent-line); margin-bottom:10px; }
.msg.realcada{ background:var(--warning-soft); }
.msg-avatar{ width:38px; flex-shrink:0; }
.msg-corpo{ flex:1; min-width:0; }
.msg-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:3px; }
.msg-autor{ font-size:13.5px; font-weight:700; }
.msg.minha .msg-autor{ color:var(--accent); }
.msg-tempo{ font-size:11.5px; color:var(--text-faint); }
.msg-pin{ font-size:10px; padding:2px 8px; }
.msg-texto{ font-size:14px; color:var(--text-dim); margin:0; white-space:pre-wrap; word-break:break-word; }
.msg-citada{ display:flex; align-items:center; gap:8px; width:100%; text-align:left; font-size:12.5px; color:var(--text-faint); padding:3px 0 5px; }
.msg-citada::before{ content:""; width:18px; height:10px; border-left:2px solid var(--border-strong); border-top:2px solid var(--border-strong); border-top-left-radius:6px; flex-shrink:0; margin-left:4px; }
.msg-citada-autor{ font-weight:700; color:var(--text-dim); }
.msg-citada span:last-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.msg-citada:hover{ color:var(--accent); }
.msg-imagem{ display:block; margin-top:8px; border-radius:10px; overflow:hidden; border:1px solid var(--border); max-width:340px; }
.msg-imagem img{ display:block; width:100%; }
.msg-ficheiro{ display:flex; align-items:center; gap:12px; margin-top:8px; padding:11px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text); max-width:340px; text-align:left; }
.msg-ficheiro:hover{ border-color:var(--accent-line); background:var(--surface); }
.msg-ficheiro .icon{ color:var(--text-faint); }
.anexo-info{ flex:1; min-width:0; }
.anexo-info strong{ display:block; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.msg-acoes{ display:flex; gap:4px; margin-top:6px; opacity:0; transition:opacity .15s; }
.msg:hover .msg-acoes, .msg.fixada .msg-acoes{ opacity:1; }
.msg-accao{ display:inline-flex; align-items:center; gap:6px; padding:4px 9px; border-radius:var(--radius-pill); font-size:12px; font-weight:600; color:var(--text-faint); }
.msg-accao:hover{ background:var(--surface); color:var(--text); }
.msg-accao.liked{ color:var(--accent); }
@media (hover: none){ .msg-acoes{ opacity:1; } }

.chat-composer{ border-top:1px solid var(--border); padding:14px 20px 16px; background:var(--bg-panel); }
.chat-resposta-a{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 12px; margin-bottom:10px; border-radius:var(--radius-sm); background:var(--surface-hover); font-size:12.5px; color:var(--text-faint); }
.chat-resposta-a span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-caixa{ display:flex; align-items:flex-end; gap:10px; }
.chat-caixa textarea{ flex:1; resize:none; min-height:42px; max-height:160px; padding:11px 14px; background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--radius-sm); color:var(--text); font-family:inherit; font-size:14px; line-height:1.5; }
.chat-caixa textarea:focus{ outline:none; border-color:var(--accent); }
.chat-caixa .avatar{ width:34px; height:34px; font-size:12px; margin-bottom:4px; }
.chat-caixa .btn-icone{ margin-bottom:4px; }
.chat-fechado{ border-top:1px solid var(--border); padding:16px 20px; font-size:13.5px; color:var(--text-dim); }
.anexo-chip{ display:flex; align-items:center; gap:12px; padding:10px 12px; margin-bottom:10px; border:1px solid var(--border); border-radius:var(--radius-sm); }
.anexo-chip img{ width:44px; height:44px; object-fit:cover; border-radius:6px; }
.anexo-chip .icon{ color:var(--text-faint); }

@media (max-width: 720px){
  .curso-hero-conteudo{ padding:26px 22px; }
  .curso-hero h1{ font-size:24px; }
  .curso-hero.com-capa::after{ background:linear-gradient(180deg, rgba(16,16,18,.82) 0%, rgba(16,16,18,.95) 60%); }
  body.light .curso-hero.com-capa::after{ background:linear-gradient(180deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,.96) 60%); }
  .event-detalhe{ padding-left:20px; }
  .onboarding-card{ padding:24px 20px; }
  .chat-mensagens{ padding:14px 12px; }
}

/* Arranque e avisos de entrada */
#view-arranque{ min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--bg); }
.arranque-caixa{ text-align:center; }
.arranque-caixa .crest{ width:52px; height:52px; margin:0 auto 18px; animation:pulsar 1.6s ease-in-out infinite; }
.arranque-caixa p{ font-size:14px; color:var(--text-dim); max-width:38ch; line-height:1.6; }
@keyframes pulsar{ 0%,100%{ opacity:.4 } 50%{ opacity:1 } }
.login-aviso{ margin-top:18px; padding:12px 14px; border-radius:var(--radius-sm); font-size:13px; line-height:1.55; }
.login-aviso.erro{ background:var(--danger-soft); border:1px solid rgba(224,72,63,.35); color:var(--danger); }
.login-aviso.nota{ background:var(--accent-soft); border:1px solid var(--accent-line); color:var(--accent); }

/* Aviso de escrita que não chegou ao servidor */
.barra-falha{ position:fixed; left:0; right:0; bottom:0; z-index:400; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:14px 20px; background:var(--danger-soft); border-top:1px solid rgba(224,72,63,.4); color:var(--danger); font-size:13px; backdrop-filter:blur(6px); }
.barra-falha strong{ display:block; font-weight:600; opacity:.85; margin-top:2px; }

/* Etiqueta de acesso do evento: gratuito, exclusivo ou pago. */
.etiqueta-acesso{ font-size:11px; font-weight:600; letter-spacing:.04em; text-transform:uppercase;
  padding:2px 8px; border-radius:99px; border:1px solid currentColor; }
.etiqueta-acesso.gratuito { color:var(--success); }
.etiqueta-acesso.exclusivo{ color:var(--accent); }
.etiqueta-acesso.pago     { color:var(--text-dim); }

/* Campo que a aplicacao preenche sozinha: mostra-se, nao se escreve. */
.campo-lido{ padding:11px 13px; border:1px dashed var(--border-strong); border-radius:10px;
  background:var(--surface-raised); color:var(--text-dim); font-weight:600; font-size:14px; }
