/* Feedback sem Defesa — design system da área de membros
   Paleta rodbrites: fundo #14120F, creme #F4EFE6, apoio #B8AD99, destaque #E0B45C
   Shell claro + tela de aula escura (body.theme-dark) */

:root {
    --bg: #F4EFE6;
    --surface: #FBF8F2;
    --surface-2: #EBE4D6;
    --border: #E5DDCD;
    --border-strong: #E0D8C7;
    --text: #14120F;
    --body: #4C4740;
    --muted: #6B6560;
    --meta: #8A8175;
    --accent: #E0B45C;
    --accent-ink: #14120F;
    --ink: #14120F;
    --ink-hover: #2A251E;
    --danger: #A03A3A;
    --radius: 18px;
    --radius-sm: 12px;
    --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --shadow: 0 12px 28px rgba(20, 18, 15, 0.09);
}

body.theme-dark {
    --bg: #14120F;
    --surface: #1C1915;
    --surface-2: #262218;
    --border: #262218;
    --border-strong: #302B23;
    --text: #F4EFE6;
    --body: #D8D0C1;
    --muted: #B8AD99;
    --meta: #8A8175;
    --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 12px; }
h2 { font-size: 22px; margin: 32px 0 14px; }
p { text-wrap: pretty; }
a { color: var(--text); text-decoration: none; }
a:hover { color: #9a7422; }

/* metadado: caixa alta com tracking — nunca para a ideia */
.eyebrow, .progress-label, .breadcrumb, .course-card-label, .topnav-group {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--meta);
}

/* ---------- topnav ---------- */
.topnav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 16px clamp(20px, 5vw, 48px);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}
.topnav .brand { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.topnav-links { display: flex; gap: 16px; align-items: center; }
.topnav-links a { font-size: 14px; color: var(--muted); }
.topnav-links a:hover { color: var(--text); }
.topnav-user { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; font-size: 13px; color: var(--muted); }
.topnav-avatar {
    width: 40px; height: 40px; border-radius: 999px;
    background: var(--ink); color: #F4EFE6;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; letter-spacing: 0.04em; flex-shrink: 0;
}
body.theme-dark .topnav-avatar { background: #F4EFE6; color: #14120F; }

.streak-chip {
    display: inline-flex; align-items: center; gap: 9px;
    border: 1px solid var(--border-strong); border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.streak-chip strong { color: var(--text); }
.streak-chip svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

/* ---------- layout ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: clamp(28px, 4vw, 48px) clamp(20px, 5vw, 48px) 120px; }
.container-wide { max-width: 1240px; }
.container-auth { max-width: none; margin: 0; padding: 0; }

/* ---------- botões ---------- */
button, .btn {
    font-family: inherit;
    font-size: 15px;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 14px 24px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
button, .btn-primary { background: var(--ink); color: #F4EFE6; }
button:hover, .btn-primary:hover { background: var(--ink-hover); color: #F4EFE6; }
body.theme-dark button, body.theme-dark .btn-primary { background: #F4EFE6; color: #14120F; }
body.theme-dark button:hover { background: #E4DCCC; }
button:disabled { opacity: 0.55; cursor: default; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: transparent; border-color: var(--text); color: var(--text); }

/* botão de ícone — 44px de área de toque */
.btn-icon {
    width: 46px; height: 46px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }
.btn-icon svg { width: 18px; height: 18px; }
.btn-icon-sm { width: 38px; height: 38px; }
.btn-icon-sm svg { width: 16px; height: 16px; }
.btn-send {
    width: 52px; height: 52px; padding: 0; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: var(--accent-ink); border: none;
}
.btn-send:hover { background: var(--accent); transform: scale(1.05); }

.icon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0; }

/* ---------- marcar como concluída ---------- */
.complete-toggle {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 9px 22px 9px 10px;
    background: transparent; color: var(--text);
    border: 1px solid var(--border-strong);
    margin: 0;
}
.complete-toggle:hover { background: transparent; border-color: var(--accent); color: var(--text); }
.complete-icon {
    width: 28px; height: 28px; border-radius: 999px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--meta);
    color: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.complete-icon svg { width: 15px; height: 15px; }
.complete-toggle.is-complete { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.complete-toggle.is-complete:hover { background: var(--accent); }
.complete-toggle.is-complete .complete-icon { background: var(--ink); border-color: var(--ink); color: var(--accent); animation: pop 0.28s ease; }
@keyframes pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ---------- notas pessoais ---------- */
.btn-icon.is-active { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.notes-panel {
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: var(--radius); padding: 18px; margin: 0 0 24px;
}
.notes-panel[hidden] { display: none; }
.notes-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.notes-status { font-size: 11px; color: var(--meta); }
.notes-panel textarea {
    width: 100%; min-height: 108px; resize: vertical;
    background: var(--bg); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: 14px;
    color: var(--text); font-size: 15px; line-height: 1.6; font-family: inherit;
}
.notes-panel textarea:focus { outline: none; border-color: var(--accent); }
.notes-export { margin: 10px 0 0; font-size: 12px; }
.notes-export a { color: var(--meta); text-decoration: underline; }
.notes-export a:hover { color: var(--text); }

/* ---------- formulários / auth ---------- */
.auth-split { display: flex; flex-wrap: wrap; min-height: 100vh; }
.auth-aside {
    flex: 1 1 420px; background: #14120F; color: #F4EFE6;
    padding: clamp(40px, 6vw, 72px);
    display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.auth-aside .eyebrow { color: #B8AD99; }
.auth-quote { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.24; max-width: 15em; }
.auth-quote em { color: var(--accent); }
.auth-panel { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: clamp(32px, 5vw, 64px); }
.auth-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 20px; }
.auth-box h1 { margin: 0; font-size: 34px; }
.auth-box p { margin: 0; color: var(--muted); font-size: 15px; }
.auth-email { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--meta); }

form label {
    display: flex; flex-direction: column; gap: 7px;
    margin-bottom: 14px;
    font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--meta);
}
form input, form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    letter-spacing: normal;
    text-transform: none;
}
form input:focus, form textarea:focus { outline: none; border-color: var(--text); }
.auth-box button { width: 100%; }
.auth-forgot { text-align: center; font-size: 13px; }
.auth-forgot a { color: var(--muted); text-decoration: underline; }
.auth-forgot a:hover { color: var(--text); }

.alert {
    background: rgba(160, 58, 58, 0.08);
    border: 1px solid rgba(160, 58, 58, 0.25);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin: 0;
}
.alert-ok {
    background: rgba(224, 180, 92, 0.12);
    border-color: rgba(224, 180, 92, 0.35);
    color: var(--accent-ink);
}
body.theme-dark .alert-ok { color: var(--text); }

/* ---------- perfil ---------- */
.profile-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
    max-width: 480px;
}
.profile-card h2 { margin: 0 0 16px; font-size: 18px; }
.profile-card form { display: flex; flex-direction: column; gap: 4px; }
.checkbox-label {
    flex-direction: row !important; align-items: center; gap: 10px !important;
    text-transform: none !important; letter-spacing: normal !important;
    font-size: 14px !important; color: var(--body) !important;
    margin-bottom: 14px;
}
.checkbox-label input { width: auto; padding: 0; }

/* ---------- progresso ---------- */
.progress-bar { width: 100%; max-width: 380px; height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress-bar-small { max-width: none; height: 4px; }
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s ease; }
.progress-label { display: block; margin-top: 8px; }

/* ---------- voltar ---------- */
.back-link { margin: 0 0 28px; }
.back-link a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--meta); }
.back-link a:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; }

/* ---------- placeholders de imagem ---------- */
.thumb-ph {
    background-color: var(--surface-2);
    background-image: repeating-linear-gradient(135deg, rgba(20, 18, 15, 0.05) 0 8px, transparent 8px 16px);
    display: flex; align-items: flex-end; padding: 10px;
}
body.theme-dark .thumb-ph { background-image: repeating-linear-gradient(135deg, rgba(244, 239, 230, 0.05) 0 8px, transparent 8px 16px); }
.thumb-ph span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; color: var(--meta); }
.module-thumb-placeholder { align-items: center; justify-content: center; color: var(--meta); font-size: 13px; }

/* ---------- cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 360px)); gap: 22px; }
.course-card {
    display: block; background: var(--surface);
    border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.course-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.course-card-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.course-card-body strong { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.course-card-cta { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.course-card-cta svg { width: 16px; height: 16px; }

.course-hero { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 40px); align-items: center; margin-bottom: 48px; }
.course-hero img, .course-hero .thumb-ph { flex: 0 0 240px; width: 240px; aspect-ratio: 1; border-radius: 20px; object-fit: cover; }
.course-hero-text { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.course-hero-text h1 { margin: 0; }
.course-hero-text p { margin: 0; color: var(--muted); max-width: 46ch; }

/* continuar de onde parou */
.continue-btn {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 14px;
    padding: 12px 12px 12px 20px; text-align: left;
    background: var(--ink); color: #F4EFE6;
}
.continue-btn:hover { background: var(--ink-hover); color: #F4EFE6; }
.continue-btn span { display: block; }
.continue-btn .continue-label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #B8AD99; margin-bottom: 2px; }
.continue-btn .continue-play {
    width: 38px; height: 38px; border-radius: 999px; flex-shrink: 0;
    background: var(--accent); color: var(--accent-ink);
    display: flex; align-items: center; justify-content: center;
}
.continue-btn .continue-play svg { width: 16px; height: 16px; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.module-card {
    display: flex; flex-direction: column; gap: 14px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.module-card-thumb { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); object-fit: cover; }
.module-card-body { display: flex; flex-direction: column; gap: 8px; }
.module-card-body strong { font-family: var(--serif); font-size: 19px; font-weight: 400; }

/* certificado */
.cert-card {
    display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
    background: #14120F; color: #F4EFE6;
    border-radius: 20px; padding: 24px clamp(20px, 3vw, 32px); margin-top: 32px;
}
.cert-card .cert-icon {
    width: 46px; height: 46px; border-radius: 999px; flex-shrink: 0;
    border: 1px solid #3A362E; color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.cert-card-body { flex: 1 1 260px; }
.cert-card-body strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 400; margin-bottom: 4px; }
.cert-card-body span { font-size: 13px; color: #B8AD99; }
.cert-card .progress-bar { flex: 0 0 160px; background: #302B23; }
.cert-btn { background: #E0B45C; color: #14120F; border: none; padding: 13px 22px; font-size: 15px; }
.cert-btn:hover { background: #E8C378; color: #14120F; }

/* ---------- aula ---------- */
.module-layout { display: flex; flex-wrap: wrap; gap: clamp(24px, 3vw, 36px); align-items: flex-start; }
.module-main { flex: 1 1 520px; min-width: 0; }
.module-main h1 { margin: 8px 0 24px; }

.video-embed { position: relative; padding-top: 56.25%; margin: 0 0 8px; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.video-player { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #000; display: block; }
.video-placeholder { color: var(--meta); font-size: 13px; }
.lesson-hero { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); display: block; }

.lesson-desc { display: block; color: var(--body); font-size: 16px; line-height: 1.72; max-width: 62ch; margin: 0 0 8px; }

.material-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.material-list li {
    display: flex; align-items: center; gap: 14px;
    border: 1px solid var(--border); border-radius: 14px;
    padding: 12px 14px;
    transition: border-color 0.18s ease;
}
.material-list li:hover { border-color: var(--border-strong); }
.material-tag {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    background: var(--surface); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-family: ui-monospace, Menlo, monospace; font-size: 10px;
}
.material-list a { flex: 1; min-width: 0; font-size: 14px; color: var(--text); }
.material-list a:hover { color: var(--text); }
.material-list .btn-icon-sm { pointer-events: none; }

/* sidebar */
.module-sidebar {
    flex: 1 1 320px; max-width: 380px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px;
    position: sticky; top: 92px;
}
body.theme-dark .module-sidebar { background: #1A1712; }
.sidebar-module { border-bottom: 1px solid var(--border); }
.sidebar-module:last-child { border-bottom: none; }
.sidebar-module-header {
    width: 100%; display: flex; align-items: center; gap: 12px;
    background: none; border: none; border-radius: var(--radius-sm);
    padding: 13px 10px; text-align: left; color: var(--text);
}
.sidebar-module-header:hover { background: var(--surface-2); color: var(--text); }
.sidebar-module-icon { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; flex-shrink: 0; }
.sidebar-module-info { flex: 1; min-width: 0; }
.sidebar-module-info strong { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.sidebar-module-progress { display: flex; align-items: center; gap: 8px; }
.progress-percent { font-size: 11px; color: var(--meta); flex-shrink: 0; }
.sidebar-module-chevron { flex-shrink: 0; color: var(--meta); display: flex; transition: transform 0.2s ease; }
.sidebar-module-chevron svg { width: 16px; height: 16px; }
.sidebar-module-header.open .sidebar-module-chevron { transform: rotate(180deg); }

.sidebar-lesson-list { list-style: none; margin: 0; padding: 0 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-lesson {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    color: var(--muted); font-size: 13px; line-height: 1.4;
}
.sidebar-lesson:hover { background: var(--surface-2); color: var(--text); }
.sidebar-lesson.active { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.sidebar-lesson img, .sidebar-lesson-thumb-placeholder {
    width: 58px; aspect-ratio: 16 / 9; object-fit: cover;
    border-radius: 8px; flex-shrink: 0;
    background-color: var(--surface-2);
    background-image: repeating-linear-gradient(135deg, rgba(244, 239, 230, 0.05) 0 6px, transparent 6px 12px);
}
.sidebar-lesson-title { flex: 1; min-width: 0; }
.sidebar-lesson-check {
    width: 20px; height: 20px; border-radius: 999px; flex-shrink: 0;
    background: var(--accent); color: var(--accent-ink);
    display: flex; align-items: center; justify-content: center;
}
.sidebar-lesson-check svg { width: 12px; height: 12px; }

/* ---------- comentários ---------- */
.comments { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 24px; }
.comments h2 { margin-top: 0; }
.comment-tabs {
    display: inline-flex; flex-wrap: wrap; gap: 4px;
    background: var(--surface-2); border-radius: 999px; padding: 4px; border: none; margin-bottom: 12px;
}
.comment-tab {
    background: transparent; border: none; color: var(--muted);
    padding: 9px 18px; font-size: 13px; border-radius: 999px;
}
.comment-tab:hover { background: transparent; color: var(--text); }
.comment-tab.active { background: var(--bg); color: var(--text); }
body.theme-dark .comment-tab.active { background: #F4EFE6; color: #14120F; }
.comment-tab-sub { display: none; }
.comment-hint { font-size: 12px; color: var(--meta); margin: 0 0 20px; }

.chat-messages {
    display: flex; flex-direction: column; gap: 20px;
    max-height: 60vh; overflow-y: auto;
    margin-bottom: 20px; padding: 0;
    background: none; border: none;
}
.chat-msg { display: flex; gap: 14px; }
.chat-avatar {
    width: 38px; height: 38px; border-radius: 999px; flex-shrink: 0;
    background: var(--surface); border: 1px solid var(--border-strong);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.chat-msg-body { flex: 1; min-width: 0; }
.chat-msg strong { font-size: 14px; font-weight: 500; }
.chat-msg-admin .chat-avatar { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chat-admin-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    vertical-align: middle;
}
.chat-time { font-size: 11px; color: var(--meta); margin-left: 10px; }
.chat-msg p { margin: 4px 0 0; font-size: 15px; line-height: 1.6; color: var(--body); white-space: pre-wrap; }

.chat-msg-reply {
    margin-left: 48px;
    padding-left: 14px;
    border-left: 2px solid var(--accent);
}
.chat-msg-reply .chat-avatar { width: 30px; height: 30px; font-size: 10px; }

.chat-form { display: flex; gap: 12px; align-items: flex-end; }
.chat-form textarea {
    flex: 1; min-height: 52px; max-height: 140px; resize: vertical;
    border-radius: 16px; padding: 15px 16px;
}
.chat-form textarea:focus { border-color: var(--accent); }

/* ---------- certificado ---------- */
.container-cert { max-width: 1100px; }
.cert-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.cert-toolbar .back-link { margin: 0; }
.cert-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cert-hint { font-size: 12px; color: var(--meta); max-width: 34ch; }

.cert-sheet {
    container-type: inline-size;
    width: 100%;
    aspect-ratio: 297 / 210;
    padding: 2.2%;
    background: #FBF8F2;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 18px 40px rgba(20, 18, 15, 0.12);
    color: #14120F;
    overflow: hidden;
}
.cert-frame {
    height: 100%;
    border: 1px solid #D8CDB6;
    padding: 4.4cqw 5.4cqw;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative;
}
.cert-frame::before {
    content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 0.6cqw;
    background: #E0B45C;
}
.cert-top { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; }
.cert-slot {
    display: flex; align-items: center; justify-content: center;
    background-color: #F1EADC;
    background-image: repeating-linear-gradient(135deg, rgba(20, 18, 15, 0.06) 0 6px, transparent 6px 12px);
    border-radius: 0.6cqw;
}
.cert-slot span {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1cqw; letter-spacing: 0.06em; color: #8A8175;
}
.cert-logo-company { width: 16cqw; height: 4.4cqw; object-fit: contain; object-position: left center; flex-shrink: 0; }
.cert-logo-course { width: 7.6cqw; height: 7.6cqw; object-fit: contain; object-position: center; margin: 0 auto 0.2cqw; }
.cert-eyebrow { font-size: 1.15cqw; letter-spacing: 0.22em; text-transform: uppercase; color: #8A8175; }
.cert-middle { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.6cqw; }
.cert-lead { font-size: 1.5cqw; letter-spacing: 0.1em; text-transform: uppercase; color: #8A8175; margin: 0; }
.cert-name {
    font-family: var(--serif); font-size: 6.2cqw; line-height: 1.05;
    margin: 0 auto; width: 72cqw; max-width: 100%;
    border-bottom: 1px solid #E0B45C; padding-bottom: 1.4cqw;
}
/* largura pensada para o texto fechar em no máximo 2 linhas */
.cert-body { font-family: var(--serif); font-size: 2.1cqw; line-height: 1.45; margin: 0 auto; max-width: 66ch; text-wrap: balance; }
.cert-body em { font-style: italic; }
.cert-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 2cqw; }
.cert-bottom-left { flex: 1 1 0; min-width: 0; }
.cert-signature { display: block; width: 24cqw; height: 6.2cqw; object-fit: contain; object-position: center bottom; margin: 0 auto -0.8cqw; }
.cert-slot.cert-signature { width: 26cqw; }
.cert-sign { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5cqw; width: 32cqw; }
.cert-sign-line { display: block; width: 100%; height: 1px; background: #14120F; margin-bottom: 0.8cqw; }
.cert-sign strong { font-family: var(--serif); font-size: 2cqw; font-weight: 400; }
.cert-sign span { font-size: 1.15cqw; letter-spacing: 0.18em; text-transform: uppercase; color: #8A8175; }
.cert-code { flex: 1 1 0; min-width: 0; text-align: right; display: flex; flex-direction: column; gap: 0.4cqw; }
.cert-code span { font-size: 1.05cqw; letter-spacing: 0.18em; text-transform: uppercase; color: #8A8175; }
.cert-code strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5cqw; font-weight: 400; }

@media print {
    @page { size: A4 landscape; margin: 0; }
    body { background: #fff; }
    .topnav, .cert-toolbar, .whatsapp-fab { display: none !important; }
    .container, .container-cert { max-width: none; margin: 0; padding: 0; }
    .cert-sheet { width: 297mm; height: 210mm; aspect-ratio: auto; border: none; border-radius: 0; box-shadow: none; }
}

/* ---------- whatsapp ---------- */
.whatsapp-fab {
    position: fixed; right: 20px; bottom: 20px;
    width: 56px; height: 56px; border-radius: 999px;
    background: var(--ink); color: #F4EFE6;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 40;
    transition: transform 0.18s ease;
}
.whatsapp-fab:hover { transform: scale(1.06); color: #F4EFE6; }
body.theme-dark .whatsapp-fab { background: #F4EFE6; color: #14120F; }
.whatsapp-fab svg { width: 26px; height: 26px; }

@media (max-width: 700px) {
    .course-hero img, .course-hero .thumb-ph { flex-basis: 160px; width: 160px; }
    .module-sidebar { position: static; max-width: none; }
    .continue-btn { align-self: stretch; }
}
