:root {
  --ink: #29232a;
  --muted: #6d626d;
  --plum: #54284f;
  --plum-dark: #361733;
  --rose: #b85e67;
  --clay: #c77755;
  --cream: #f8f1e8;
  --cream-deep: #eee1d1;
  --paper: #fffdf9;
  --sage: #73836b;
  --line: #e8ded5;
  --success: #23664e;
  --danger: #9d3b45;
  --shadow: 0 18px 55px rgba(54, 23, 51, .11);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.65 "Avenir Next", Avenir, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
h1, h2, h3 { margin: 0 0 .65em; color: var(--plum-dark); font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.08; }
h1 { font-size: clamp(2.7rem, 6vw, 5.7rem); letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 3.5vw, 3.25rem); letter-spacing: -.025em; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1rem; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 40px)); }
.section { padding-block: 90px; }
.eyebrow { margin: 0 0 16px; color: var(--clay); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lead { max-width: 700px; color: #504650; font-size: clamp(1.1rem, 2vw, 1.35rem); }
.text-link { color: var(--plum); font-weight: 750; }
.text-link:hover { color: var(--rose); }

.site-header { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid rgba(84,40,79,.09); background: rgba(255,253,249,.95); backdrop-filter: blur(14px); }
.nav-wrap { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 58px; height: 52px; flex: 0 0 auto; object-fit: contain; }
.brand strong { display: block; color: var(--plum-dark); font: 1.15rem Georgia, serif; }
.brand small { display: block; color: var(--muted); font-size: .61rem; letter-spacing: .1em; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 23px; color: #4c424b; font-size: .91rem; font-weight: 650; }
.main-nav a:hover, .link-button:hover { color: var(--rose); }
.main-nav form { margin: 0; }
.link-button { padding: 0; border: 0; color: inherit; background: none; cursor: pointer; font-weight: inherit; }
.nav-admin { color: var(--plum) !important; }
.nav-toggle { display: none; border: 0; background: none; font-size: 1.5rem; }

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 23px; border: 1px solid var(--plum); border-radius: 999px; color: #fff; background: var(--plum); cursor: pointer; font-weight: 750; transition: transform .2s, background .2s; }
.button:hover { background: var(--plum-dark); transform: translateY(-1px); }
.button-small { min-height: 39px; padding: 8px 17px; font-size: .88rem; }
.button-ghost { color: var(--plum); background: transparent; }
.button-ghost:hover { color: #fff; }
.button-light { border-color: var(--paper); color: var(--plum-dark); background: var(--paper); }
.button-full { width: 100%; margin-top: 20px; }
.button[disabled] { cursor: not-allowed; opacity: .45; transform: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button-row.center { justify-content: center; }

.hero { overflow: hidden; padding: 80px 0 96px; background: radial-gradient(circle at 85% 25%, #ead1c4 0 14%, transparent 35%), var(--cream); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 70px; }
.hero-copy h1 em { color: var(--rose); font-weight: 400; }
.hero-note { margin-top: 28px; color: var(--muted); font-size: .89rem; }
.hero-note span { color: var(--clay); }
.hero-art { min-height: 510px; }
.hero-logo-art { display: grid; place-items: center; overflow: hidden; padding: 30px; border: 1px solid rgba(84,40,79,.13); border-radius: 45% 45% 24px 24px; background: #fff; box-shadow: var(--shadow); }
.hero-logo-art img { width: min(100%, 530px); height: auto; object-fit: contain; }
.trust-strip { border-block: 1px solid var(--line); background: var(--paper); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-grid div { padding: 28px; border-right: 1px solid var(--line); text-align: center; }
.trust-grid div:last-child { border: 0; }
.trust-grid strong { display: block; color: var(--plum); font: 1.35rem Georgia, serif; }
.trust-grid span { color: var(--muted); font-size: .78rem; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.course-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 30px rgba(54,23,51,.06); transition: transform .25s, box-shadow .25s; }
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.course-cover { display: grid; aspect-ratio: 16 / 10; place-items: center; overflow: hidden; color: var(--paper); background: linear-gradient(145deg, var(--plum), var(--rose)); font-size: 3rem; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-card-body { padding: 27px; }
.course-card-body h3 { margin-bottom: 5px; }
.course-subtitle { color: var(--rose); font-size: .88rem; font-weight: 700; }
.course-card-body > p:last-of-type { min-height: 76px; color: var(--muted); font-size: .92rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .86rem; }
.manifesto { padding-block: 100px; color: #f8eee7; background: var(--plum-dark); }
.manifesto h2 { color: #fff; }
.manifesto .eyebrow { color: #dfa889; }
.manifesto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.manifesto .prose { color: #e4d6df; font-size: 1.12rem; }
.manifesto .text-link { color: #f1bea1; }
.cta-panel { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-bottom: 90px; padding-inline: 55px; border-radius: 30px; color: #fff; background: linear-gradient(125deg, var(--rose), var(--plum)); }
.cta-panel h2 { max-width: 760px; color: #fff; }
.cta-panel .eyebrow { color: #f7d3c2; }

.page-hero, .dashboard-hero { padding: 82px 0; color: #f5e9ed; background: var(--plum-dark); }
.page-hero.compact { padding: 58px 0; }
.page-hero h1, .dashboard-hero h1 { max-width: 860px; color: #fff; font-size: clamp(2.7rem, 5vw, 4.7rem); }
.page-hero p:not(.eyebrow), .dashboard-hero p:not(.eyebrow) { max-width: 680px; color: #d9cad4; font-size: 1.1rem; }
.dashboard-hero { background: linear-gradient(120deg, var(--plum-dark), #6a365e); }
.about-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 80px; align-items: start; }
.about-portrait { position: sticky; top: 120px; margin: 0; }
.about-portrait img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 220px 220px 24px 24px; box-shadow: var(--shadow); }
.about-portrait figcaption { margin-top: 14px; color: var(--plum); font-size: .78rem; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .14em; }
.prose { color: #514851; }
.prose-large { font-size: 1.08rem; line-height: 1.85; }
.prose h2 { margin-top: 1.4em; }
.empty-state { max-width: 720px; margin-inline: auto; padding: 65px 30px; text-align: center; }
.empty-state > span { display: block; margin-bottom: 20px; color: var(--clay); font: 3rem Georgia, serif; }
.episode-list { display: grid; gap: 18px; }
.episode-card { display: grid; grid-template-columns: 1fr 360px; align-items: center; gap: 30px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; }
.episode-card h2 { margin: 4px 0; font-size: 1.6rem; }
.episode-card time { color: var(--clay); font-size: .8rem; font-weight: 700; }
.episode-card audio { width: 100%; }

.auth-page { min-height: 75vh; padding: 70px 20px; background: linear-gradient(140deg, var(--cream), #f3e6e2); }
.auth-card, .form-card, .payment-card { width: min(540px, 100%); margin-inline: auto; padding: 38px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.auth-intro { margin-bottom: 28px; text-align: center; }
.auth-intro h1 { font-size: 2.55rem; }
form label { display: block; margin: 17px 0 7px; font-size: .87rem; font-weight: 750; }
form input:not([type="checkbox"]), form textarea, form select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #cfc3c8; border-radius: 10px; color: var(--ink); background: #fff; }
form textarea { resize: vertical; }
form input:focus, form textarea:focus, form select:focus { outline: 3px solid rgba(184,94,103,.14); border-color: var(--rose); }
form small { display: block; margin-top: 5px; color: var(--muted); }
form span.field-validation-error, .validation { color: var(--danger); font-size: .84rem; }
.validation ul { margin: 0 0 20px; padding-left: 20px; }
.label-row { display: flex; align-items: end; justify-content: space-between; }
.label-row a { color: var(--plum); font-size: .82rem; font-weight: 700; }
.check { display: flex; align-items: center; gap: 8px; }
.auth-switch { margin: 25px 0 0; text-align: center; color: var(--muted); font-size: .9rem; }
.auth-switch a { color: var(--plum); font-weight: 750; }

.student-course-list { display: grid; gap: 24px; }
.student-course-card { display: grid; grid-template-columns: 300px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.student-course-card > div:last-child { padding: 34px; }
.student-cover { min-height: 230px; background: var(--plum); }
.student-cover img { width: 100%; height: 100%; object-fit: cover; }
.master-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.master-card { display: grid; grid-template-columns: 190px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.master-card > div:last-child { padding: 25px; }
.master-thumb { position: relative; min-height: 220px; background: var(--cream); }
.master-thumb img { width: 100%; height: 100%; object-fit: cover; }
.master-thumb span { position: absolute; inset: 50% auto auto 50%; display: grid; width: 50px; height: 50px; place-items: center; border-radius: 50%; color: #fff; background: rgba(84,40,79,.9); transform: translate(-50%,-50%); }

.course-detail-hero { padding: 75px 0; background: var(--cream); }
.course-detail-grid { display: grid; grid-template-columns: 1.1fr .7fr; align-items: center; gap: 75px; }
.course-detail-hero h1 { font-size: clamp(3.2rem, 6vw, 5.4rem); }
.course-detail-subtitle { color: var(--rose); font: italic 1.45rem Georgia, serif; }
.detail-cover { position: relative; overflow: hidden; min-height: 390px; border-radius: 210px 210px 22px 22px; background: var(--plum); box-shadow: var(--shadow); }
.detail-cover img { width: 100%; height: 390px; object-fit: cover; }
.detail-cover > div { position: absolute; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; color: #fff; background: rgba(54,23,51,.9); }
.detail-cover strong { font: 1.8rem Georgia, serif; }
.detail-cover span { font-size: .77rem; }
.status-note { margin-top: 24px; padding: 13px 16px; border-radius: 10px; color: var(--success); background: #e8f3ed; }
.content-two-cols { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; }
.syllabus { padding: 34px; border-radius: var(--radius); background: var(--cream); }
.syllabus h2 { font-size: 2rem; }
.syllabus ol { margin: 0; padding: 0; list-style: none; }
.syllabus li { display: grid; grid-template-columns: 38px 1fr 20px; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid #dfd0c2; }
.syllabus li > span { color: var(--clay); font-size: .78rem; font-weight: 800; }
.syllabus li strong, .syllabus li small { display: block; }
.syllabus li small { color: var(--rose); }
.syllabus li.locked { color: #918891; opacity: .68; }

.lesson-shell { display: grid; grid-template-columns: 315px 1fr; min-height: calc(100vh - 78px); }
.lesson-sidebar { padding: 34px 24px; color: #e7dbe3; background: var(--plum-dark); }
.lesson-sidebar h2 { color: #fff; font-size: 1.55rem; }
.back-link { display: inline-block; margin-bottom: 35px; color: #dcb9cb; font-size: .85rem; }
.lesson-sidebar ol { margin: 24px 0; padding: 0; list-style: none; }
.lesson-sidebar li a { display: flex; gap: 10px; padding: 13px 12px; border-radius: 10px; font-size: .86rem; line-height: 1.3; }
.lesson-sidebar li a:hover, .lesson-sidebar li.active a { color: #fff; background: rgba(255,255,255,.1); }
.lesson-sidebar li span { color: #d3997c; font-size: .7rem; font-weight: 800; }
.lesson-main { width: min(100%, 1100px); padding: 55px clamp(25px, 5vw, 75px); }
.lesson-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.lesson-heading h1 { font-size: clamp(2.3rem, 4vw, 3.8rem); }
.badge { padding: 7px 12px; border-radius: 999px; color: var(--plum); background: var(--cream-deep); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.video-frame { position: relative; overflow: hidden; margin: 30px 0; padding-bottom: 56.25%; border-radius: 18px; background: #130e13; box-shadow: var(--shadow); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 28px 0; }
.lesson-actions form { margin: 0; }
.completed-mark { color: var(--success); font-weight: 800; }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 45px; padding-top: 24px; border-top: 1px solid var(--line); font-weight: 700; }
.lesson-nav a:last-child { text-align: right; }
.checkout-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 35px; align-items: start; }
.checkout-grid .payment-card, .checkout-grid .form-card { width: 100%; margin: 0; }
.pix-payment-options { display: grid; gap: 24px; margin: 26px 0; }
.pix-qr-code { padding: 22px; text-align: center; color: var(--ink); background: #fffaf7; border: 1px solid #eadbd5; border-radius: 18px; }
.pix-qr-title, .pix-alternative { margin: 0 0 14px; color: #61295a; font-weight: 700; }
.pix-qr-code img { display: block; width: min(230px, 100%); height: auto; margin: 0 auto 12px; background: #fff; image-rendering: crisp-edges; }
.pix-qr-code small { display: block; max-width: 330px; margin: 0 auto; line-height: 1.45; }
.pix-key-details dl { margin-bottom: 0; }
.payment-card { color: #eee2e9; background: var(--plum-dark); }
.payment-card .eyebrow { color: #dfa889; }
.price { margin-bottom: 25px; color: #fff; font: 3.2rem Georgia, serif; }
.payment-card dl { padding: 20px; border-radius: 12px; background: rgba(255,255,255,.08); }
.payment-card dt { color: #d5bac9; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.payment-card dd { margin: 2px 0 16px; color: #fff; }
.copy-value { overflow-wrap: anywhere; font-family: monospace; }

.flash { margin-top: 18px; padding: 13px 18px; border-radius: 10px; }
.flash-success { color: var(--success); background: #e6f2eb; }
.flash-error { color: var(--danger); background: #f8e6e8; }
.site-footer { margin-top: 60px; padding: 55px 0; color: #d9cbd3; background: #241321; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 30px; }
.footer-grid strong { color: #fff; font: 1.4rem Georgia, serif; }
.footer-grid p { font-size: .86rem; }
.footer-links { display: flex; gap: 22px; font-size: .88rem; }
.footer-copy { grid-column: 1 / -1; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.1); }

/* Administração */
.admin-body { background: #f5f3f1; }
.admin-shell { display: grid; grid-template-columns: 245px 1fr; min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px; color: #d9cdd7; background: #2e192c; }
.admin-sidebar .brand { padding: 0 8px 28px; color: #fff; }
.admin-sidebar .brand strong { color: #fff; }
.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav a { padding: 11px 13px; border-radius: 9px; font-size: .88rem; }
.admin-sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.09); }
.admin-main { min-width: 0; padding: 34px clamp(20px,4vw,55px); }
.admin-topbar { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.admin-topbar h1 { font-size: 2.3rem; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric-card, .panel { padding: 24px; border: 1px solid #e1dcda; border-radius: 14px; background: #fff; }
.metric-card strong { display: block; color: var(--plum); font: 2.3rem Georgia, serif; }
.metric-card span { color: var(--muted); font-size: .8rem; }
.panel { margin-top: 24px; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th, .admin-table td { padding: 13px 10px; border-bottom: 1px solid #ebe6e2; text-align: left; vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .05em; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.admin-link { color: var(--plum); font-weight: 750; }
.admin-form { max-width: 850px; }
.admin-form .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-form .check { margin: 20px 0; }
.upload-box { margin: 20px 0; padding: 18px; border: 1px dashed #cdbfc7; border-radius: var(--radius-sm); background: #fcfaf9; }
.upload-box input[type="file"] { background: white; }
.upload-box small { display: block; margin-top: 8px; color: var(--muted); }
.admin-cover-preview { display: block; width: min(280px, 100%); aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); margin: 8px 0; }
.course-picker { border: 1px solid #e3dbdf; border-radius: var(--radius-sm); padding: 16px; margin: 20px 0; }
.course-picker legend { padding: 0 8px; font-weight: 700; }
.course-picker .check { padding: 10px 0; border-bottom: 1px solid #eee8eb; }
.course-picker .check:last-child { border-bottom: 0; }
.course-picker small { display: block; color: var(--muted); }
.button-link { border: 0; padding: 0; background: transparent; cursor: pointer; font: inherit; }
.rich-toolbar { display: flex; gap: 6px; padding: 8px; border: 1px solid #cfc3c8; border-bottom: 0; border-radius: 10px 10px 0 0; background: #f6f2ef; }
.rich-toolbar button { border: 1px solid #d6ceca; border-radius: 6px; background: #fff; cursor: pointer; }
.rich-editor { min-height: 300px; padding: 16px; border: 1px solid #cfc3c8; border-radius: 0 0 10px 10px; background: #fff; }
.switch-list { display: grid; gap: 9px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.status { padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.status-Pending { color: #75511d; background: #fbefd4; }.status-Approved { color: var(--success); background: #def0e7; }.status-Rejected { color: var(--danger); background: #f7e1e3; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 78px; right: 20px; display: none; width: min(330px, calc(100% - 40px)); align-items: stretch; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); flex-direction: column; }
  .main-nav.open { display: flex; }
  .hero-grid, .course-detail-grid, .content-two-cols, .about-grid { grid-template-columns: 1fr; }
  .about-portrait { position: relative; top: auto; width: min(100%, 560px); margin-inline: auto; }
  .hero-art { min-height: 430px; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .master-grid { grid-template-columns: 1fr; }
  .lesson-shell { grid-template-columns: 1fr; }
  .lesson-sidebar { position: relative; height: auto; }
  .admin-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 200px 1fr; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 1180px); }
  .section { padding-block: 62px; }
  .hero { padding-top: 55px; }.hero-grid { gap: 25px; }.hero-art { min-height: 340px; }.hero-logo-art { padding: 18px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }.trust-grid div:nth-child(2) { border-right: 0; }
  .course-grid, .manifesto-grid, .checkout-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .cta-panel { align-items: start; margin-inline: 14px; padding: 40px 25px; flex-direction: column; }
  .episode-card, .student-course-card, .master-card { grid-template-columns: 1fr; }
  .student-cover, .master-thumb { min-height: 200px; }
  .auth-card, .form-card, .payment-card { padding: 27px 20px; }
  .lesson-main { padding-inline: 18px; }.lesson-actions { align-items: stretch; flex-direction: column; }.lesson-actions .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }.footer-links { flex-wrap: wrap; }.footer-copy { grid-column: auto; }
  .admin-shell { display: block; }.admin-sidebar { position: relative; width: 100%; height: auto; }.admin-sidebar nav { grid-template-columns: repeat(2, 1fr); }.admin-main { padding: 24px 14px; }.admin-cards { grid-template-columns: 1fr 1fr; }.admin-form .grid-2 { grid-template-columns: 1fr; }
}
