:root {
    --ink: #080808;
    --paper: #f4f4f4;
    --panel: #ffffff;
    --line: #d8d8d8;
    --red: #ff1f1f;
    --red-dark: #c90000;
    --green: #0b8f59;
    --blue: #245d95;
    --muted: #646464;
    --shadow: 0 14px 34px rgba(0, 0, 0, .10);
    --radius: 3px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(0,0,0,.06) 0 42px, transparent 42px) top left / 260px 260px no-repeat,
        linear-gradient(315deg, rgba(255,31,31,.10) 0 34px, transparent 34px) bottom right / 240px 240px no-repeat,
        var(--paper);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font: inherit; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 11px 12px;
    background: #fff;
    color: var(--ink);
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(255,31,31,.18);
    border-color: var(--red);
}
label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    background:
        linear-gradient(135deg, #1a1a1a 0 54px, transparent 54px) top left / 160px 160px no-repeat,
        linear-gradient(315deg, var(--red) 0 18px, transparent 18px) bottom right / 96px 96px no-repeat,
        #050505;
    color: #fff;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    border-right: 4px solid var(--red);
}
.brand {
    background: #000;
    border: 1px solid #252525;
    border-radius: var(--radius);
    padding: 10px;
    position: relative;
}
.brand::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 42px;
    height: 7px;
    background: var(--red);
}
.brand img { height: 72px; width: 100%; object-fit: contain; }
.sidebar nav {
    display: grid;
    gap: 4px;
}
.sidebar nav a {
    color: #e8e8e8;
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.sidebar nav a.active, .sidebar nav a:hover {
    background: #fff;
    color: #111;
    border-left-color: var(--red);
}
.user-box {
    margin-top: auto;
    border-top: 1px solid #2c2c2c;
    padding-top: 16px;
    display: grid;
    gap: 5px;
}
.user-box small { color: #bfbfbf; }
.user-box a { color: var(--red); font-size: 13px; font-weight: 800; }

.shell {
    margin-left: 248px;
    padding: 28px;
    min-height: 100vh;
    position: relative;
    overflow-x: clip;
}
.shell::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    width: 210px;
    height: 210px;
    background:
        linear-gradient(135deg, transparent 0 38%, rgba(0,0,0,.08) 38% 45%, transparent 45%),
        linear-gradient(135deg, transparent 0 58%, rgba(255,31,31,.20) 58% 65%, transparent 65%);
    pointer-events: none;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--ink);
    position: relative;
}
.topbar::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 150px;
    height: 3px;
    background: var(--red);
}
h1, h2, h3, p { margin-top: 0; }
h1 {
    font-size: 32px;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0;
}
h2 { font-size: 19px; margin-bottom: 0; text-transform: uppercase; }
h3 { font-size: 17px; text-transform: uppercase; }
.eyebrow {
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
}

.btn, button.btn {
    border: 0;
    border-radius: var(--radius);
    padding: 11px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 900;
    text-transform: uppercase;
}
.btn.primary {
    background: var(--red);
    color: #fff;
    box-shadow: inset 0 -3px 0 rgba(0,0,0,.22);
}
.btn.ghost { border: 1px solid var(--ink); background: #fff; }
.btn.light { background: #fff; color: #111; }
.btn.full { width: 100%; }
.icon-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: var(--radius);
    background: var(--ink);
    color: #fff;
    cursor: pointer;
}

.panel, .metric, .login-card, .hero-panel, .lead-form {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
}
.panel::before, .metric::before, .login-card::before, .hero-panel::before, .lead-form::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 78px;
    height: 4px;
    background: var(--red);
}
.panel { padding: 20px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.panel-head a, .panel-head span {
    color: var(--red);
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
}
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.metric { padding: 18px; border-bottom: 3px solid var(--ink); }
.metric span, .metric small, .muted-text { color: var(--muted); }
.metric strong { display: block; font-size: 31px; margin: 8px 0; }

.grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.wide-left { grid-template-columns: 1.1fr .9fr; }
.form-grid, .phase-form fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.span-2 { grid-column: 1 / -1; }
.phase-form { display: grid; gap: 18px; }
fieldset {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}
legend {
    font-weight: 900;
    color: var(--red);
    padding: 0 8px;
    text-transform: uppercase;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
thead { background: #0b0b0b; color: #fff; }
th, td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    vertical-align: top;
}
th {
    font-size: 12px;
    text-transform: uppercase;
}
td small { display: block; color: var(--muted); margin-top: 3px; }
.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}
.inline-form input { width: 80px; }
.checkout-row-form {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 230px;
}
.checkout-row-form input {
    width: 120px;
}
.checkout-row-form .btn {
    padding: 10px 12px;
}
.checkout-cell {
    display: grid;
    gap: 8px;
}
.mini-link {
    color: var(--red);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    border-radius: var(--radius);
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    background: #e8e8e8;
    color: #333;
    border-left: 3px solid #999;
}
.badge.ok { background: #e4f5ed; color: var(--green); border-left-color: var(--green); }
.badge.warn { background: #fff2d6; color: #8a5c00; border-left-color: #d59700; }
.badge.info { background: #e5eef8; color: var(--blue); border-left-color: var(--blue); }
.badge.danger { background: #ffe3e3; color: var(--red-dark); border-left-color: var(--red); }

.list { display: grid; gap: 10px; }
.list-row {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border-left: 4px solid var(--ink);
}
.list-row small { display: block; color: var(--muted); margin-top: 4px; }
.list-row.clickable:hover { border-color: var(--red); border-left-color: var(--red); }
.list-row.stacked { align-items: stretch; flex-direction: column; }

.timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.timeline span {
    background: #111;
    color: #fff;
    border-radius: var(--radius);
    padding: 13px 10px;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    border-bottom: 4px solid var(--red);
}
.timeline.vertical { grid-template-columns: 1fr; }

.kanban {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 14px;
    overflow-x: auto;
}
.kanban-col {
    background: #eeeeee;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    min-height: 360px;
}
.deal-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    border-left: 4px solid var(--red);
    padding: 12px;
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}
.deal-card span, .deal-card small { color: var(--muted); }
.deal-card a { color: var(--red); font-weight: 900; text-transform: uppercase; }

.crm-guide {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 18px;
}
.crm-guide p {
    max-width: 760px;
    margin-bottom: 0;
    color: #3f3f3f;
}
.crm-kanban {
    grid-template-columns: repeat(6, minmax(270px, 1fr));
    align-items: stretch;
    padding-bottom: 12px;
}
.kanban-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    border-bottom: 3px solid #050505;
    padding-bottom: 10px;
}
.kanban-head span {
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: #fff;
    font-weight: 900;
}
.kanban-dropzone {
    display: grid;
    gap: 12px;
    min-height: 500px;
    align-content: start;
}
.kanban-col.drag-over {
    border-color: var(--red);
    box-shadow: inset 0 0 0 2px rgba(255,31,31,.28);
}
.crm-card {
    cursor: grab;
    user-select: none;
}
.crm-card.dragging {
    opacity: .55;
}
.deal-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
}
.checkout-card-form {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    display: grid;
    gap: 9px;
}
.checkout-card-form input {
    min-height: 40px;
}
.checkout-box {
    display: grid;
    gap: 9px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}
.checkout-box > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}
.checkout-box input {
    min-height: 38px;
    font-size: 12px;
    font-weight: 700;
}
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: #050505;
    color: #fff;
    border-left: 5px solid var(--red);
    padding: 14px 16px;
    z-index: 20;
    box-shadow: var(--shadow);
    max-width: 360px;
    font-weight: 800;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.class-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: #fff;
    border-top: 4px solid var(--red);
}
.class-card > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}
.class-card small { color: var(--muted); }
dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 0;
}
dt { color: var(--muted); }
dd { margin: 0; font-weight: 900; }

.segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.segmented button {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: var(--radius);
    padding: 8px 10px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 800;
}
.segmented .selected {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.chat-panel { min-height: 560px; }
.chat-box {
    display: grid;
    gap: 12px;
    max-height: 330px;
    overflow: auto;
    padding-right: 6px;
}
.message {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    border-left: 4px solid var(--red);
}
.message p { margin: 6px 0; }
.message small { color: var(--muted); }
.reply-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.public-page main { min-height: 100vh; }
.hero {
    min-height: 92vh;
    background:
        linear-gradient(135deg, #050505 0 74px, var(--red) 74px 92px, transparent 92px) top left / 360px 360px no-repeat,
        linear-gradient(315deg, #050505 0 72px, var(--red) 72px 91px, transparent 91px) bottom right / 360px 360px no-repeat,
        linear-gradient(90deg, #f8f8f8 0%, #fff 54%, #efefef 100%);
    color: var(--ink);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 34px;
    align-items: center;
    padding: 54px clamp(22px, 6vw, 86px);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    top: 13%;
    right: 10%;
    width: min(560px, 48vw);
    height: 120px;
    border-top: 5px solid rgba(0,0,0,.88);
    border-radius: 50% 50% 0 0;
    transform: skewX(-14deg);
    opacity: .08;
}
.hero::after {
    content: "";
    position: absolute;
    right: 13%;
    top: 25%;
    width: 80px;
    height: 5px;
    background: var(--red);
    box-shadow: -165px 96px 0 rgba(255,31,31,.70);
}
.hero-copy, .hero-panel { position: relative; z-index: 1; }
.hero-logo {
    width: 260px;
    margin-bottom: 28px;
    background: #050505;
    padding: 10px;
    border-radius: var(--radius);
    border-right: 6px solid var(--red);
}
.hero h1 {
    font-size: clamp(42px, 7vw, 84px);
    line-height: .92;
    max-width: 880px;
    color: #050505;
    letter-spacing: 0;
}
.fecar {
    color: var(--red);
    font-style: italic;
}
.hero p {
    color: #3f3f3f;
    max-width: 690px;
    font-size: 18px;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-panel {
    color: var(--ink);
    padding: 18px;
    display: grid;
    gap: 12px;
    border-bottom: 4px solid var(--ink);
}
.slot {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
}
.slot b { color: var(--red); }
.public-section, .lead-band {
    padding: 54px clamp(22px, 6vw, 86px);
}
.section-heading { max-width: 720px; margin-bottom: 22px; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.feature-grid article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-top: 4px solid var(--red);
    padding: 18px;
}
.lead-band {
    display: grid;
    grid-template-columns: minmax(260px, .45fr) minmax(680px, 1.15fr);
    gap: 34px;
    align-items: start;
    background:
        linear-gradient(135deg, rgba(0,0,0,.90) 0 70px, var(--red) 70px 88px, transparent 88px) top left / 280px 280px no-repeat,
        #efefef;
    border-top: 4px solid #050505;
}
.lead-copy {
    padding-top: 18px;
    max-width: 420px;
}
.lead-copy h2 {
    font-size: clamp(30px, 4vw, 54px);
    line-height: .96;
}
.lead-copy p {
    color: #424242;
    line-height: 1.55;
    max-width: 460px;
}
.lead-form {
    padding: 18px;
    display: grid;
    gap: 12px;
}
.enrollment-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    padding: 30px;
    border: 6px solid #050505;
    box-shadow: none;
}
.enrollment-form label {
    color: #1f2e45;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 0;
}
.enrollment-form input,
.enrollment-form select,
.enrollment-form textarea {
    min-height: 54px;
    border: 2px solid #cbd0d7;
    background: #fbfbfb;
    font-size: 18px;
    border-radius: 0;
}
.enrollment-form select {
    background-color: #e8e8ec;
}
.enrollment-form textarea {
    min-height: 92px;
}
.field-full {
    grid-column: 1 / -1;
}
.class-highlight {
    background:
        linear-gradient(315deg, var(--red) 0 28px, transparent 28px) top right / 120px 70px no-repeat,
        #030303;
    color: #fff;
    padding: 22px 20px;
    border-left: 4px solid var(--red);
}
.class-highlight-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: start;
}
.class-highlight h3 {
    margin-bottom: 8px;
    color: #fff;
    font-size: 22px;
}
.class-highlight-head strong {
    background: var(--red);
    color: #fff;
    padding: 7px 11px;
    white-space: nowrap;
    text-transform: lowercase;
}
.class-highlight p {
    color: #e3e3e3;
    margin-bottom: 12px;
}
.class-times {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.class-times span {
    border: 1px solid #4d4d4d;
    padding: 8px 10px;
    font-weight: 900;
    font-size: 14px;
}
.class-highlight b {
    display: block;
    color: var(--red);
    font-size: 28px;
    font-weight: 900;
}
.enrollment-submit {
    grid-column: 1 / -1;
    min-height: 66px;
    font-size: 19px;
    letter-spacing: 0;
    gap: 12px;
}
.enrollment-form .notice {
    grid-column: 1 / -1;
}
.enrollment-submit span {
    font-size: 24px;
    line-height: 1;
}

.center-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, #202020 0 74px, var(--red) 74px 92px, transparent 92px) top left / 360px 360px no-repeat,
        linear-gradient(315deg, #202020 0 74px, var(--red) 74px 92px, transparent 92px) bottom right / 360px 360px no-repeat,
        #050505;
}
.login-card {
    width: min(460px, 100%);
    padding: 24px;
    display: grid;
    gap: 14px;
}
.login-logo {
    height: 92px;
    width: 100%;
    object-fit: contain;
    background: #000;
    border-radius: var(--radius);
    padding: 8px;
    border-right: 6px solid var(--red);
}
.setup-card p { color: var(--muted); }
.demo-credentials {
    display: grid;
    gap: 4px;
    background: #f2f2f2;
    border: 1px solid var(--line);
    border-left: 4px solid var(--red);
    border-radius: var(--radius);
    padding: 12px;
}
.notice {
    border-radius: var(--radius);
    padding: 12px;
    font-weight: 800;
}
.notice.ok, .setup-alert { background: #e4f5ed; color: var(--green); }
.notice.danger { background: #ffe3e3; color: var(--red-dark); }
.setup-alert {
    margin: 0 0 20px;
    padding: 14px;
    border-radius: var(--radius);
}

.lp-list { display: grid; gap: 10px; }
.lp-list a {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-left: 4px solid var(--red);
    padding: 14px;
    display: grid;
    gap: 5px;
    background: #fff;
}
.lp-list span { color: var(--muted); }
.certificate-preview object {
    width: 100%;
    height: 520px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.certificate-card {
    margin-top: 18px;
    background:
        linear-gradient(135deg, #242424 0 42px, var(--red) 42px 54px, transparent 54px) top left / 170px 170px no-repeat,
        #050505;
    color: #fff;
    border-radius: var(--radius);
    padding: 20px;
    display: grid;
    gap: 8px;
    text-align: center;
    border-bottom: 4px solid var(--red);
}
.certificate-card img {
    height: 88px;
    width: 100%;
    object-fit: contain;
}
.certificate-card strong { color: var(--red); font-size: 24px; }
.certificate-card small { color: #d9d9d9; }

.checkout-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, .7fr) minmax(520px, 760px);
    gap: 42px;
    align-items: center;
    padding: 54px clamp(22px, 6vw, 86px);
    background:
        radial-gradient(circle at 15% 12%, rgba(0, 185, 111, .12), transparent 28%),
        linear-gradient(135deg, #00b86b 0 76px, #06d889 76px 96px, transparent 96px) top left / 360px 360px no-repeat,
        #f5f7f8;
}
.kiwify-lockup {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #dfe8e4;
    padding: 12px 14px;
    margin-bottom: 28px;
    box-shadow: 0 10px 30px rgba(0, 80, 48, .08);
}
.kiwify-wordmark {
    width: 168px;
    height: 44px;
    object-fit: contain;
}
.kiwify-lockup span {
    border-left: 1px solid #dfe8e4;
    padding-left: 14px;
    color: #00a866;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
}
.checkout-brand h1 {
    font-size: clamp(44px, 6vw, 76px);
    line-height: .94;
    color: #10231b;
}
.checkout-brand p {
    color: #42554e;
    max-width: 520px;
    line-height: 1.6;
}
.checkout-brand .eyebrow {
    color: #00a866;
}
.checkout-method-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
    background: #10231b;
    color: #fff;
    padding: 14px;
    max-width: 420px;
    border-left: 5px solid #00b86b;
}
.checkout-method-brand img {
    width: 112px;
    height: 52px;
    object-fit: contain;
    background: #050505;
    padding: 6px;
}
.checkout-method-brand small {
    display: block;
    color: #b8d9cb;
}
.checkout-card {
    background: #fff;
    border: 1px solid #dfe8e4;
    padding: 30px;
    position: relative;
    box-shadow: 0 24px 55px rgba(0, 80, 48, .14);
}
.checkout-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 5px;
    background: #00b86b;
}
.checkout-summary {
    display: grid;
    gap: 14px;
}
.checkout-secure-head {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #f1fbf6;
    border-color: #c8efdc !important;
    border-left-color: #00b86b !important;
}
.checkout-secure-head img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}
.checkout-secure-head span {
    color: #5e746b;
}
.checkout-summary > div {
    border: 1px solid #dfe8e4;
    border-left: 4px solid #00b86b;
    padding: 14px;
    display: grid;
    gap: 4px;
}
.checkout-summary > .checkout-secure-head {
    display: flex;
}
.checkout-summary small,
.checkout-summary span {
    color: var(--muted);
}
.checkout-summary small {
    text-transform: uppercase;
    font-weight: 900;
}
.checkout-summary strong {
    font-size: 20px;
}
.checkout-total {
    background: #10231b;
    color: #fff;
}
.checkout-total small {
    color: #d9d9d9;
}
.checkout-total strong {
    color: #00e08a;
    font-size: 34px;
}
.checkout-payment {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}
.checkout-payment input {
    min-height: 54px;
    border: 2px solid #d4e4dc;
    background: #f7faf8;
    border-radius: 0;
    font-size: 18px;
    font-weight: 800;
}
.checkout-payment .btn.primary {
    background: #00b86b;
    color: #fff;
}
.checkout-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.payment-approved {
    display: grid;
    gap: 16px;
}
.payment-approved > span {
    background: #e4f5ed;
    color: #008c55;
    border-left: 4px solid #00b86b;
    padding: 10px 12px;
    font-weight: 900;
    text-transform: uppercase;
    display: flex;
    gap: 10px;
    align-items: center;
}
.payment-approved > span img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.payment-approved h2 {
    font-size: 30px;
}

@media (max-width: 1040px) {
    .sidebar {
        position: static;
        width: auto;
        min-height: auto;
    }
    .sidebar nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .shell { margin-left: 0; }
    .metric-grid, .feature-grid, .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero, .lead-band, .grid-two, .wide-left, .checkout-page { grid-template-columns: 1fr; }
    .lead-copy { max-width: 760px; }
}

@media (max-width: 680px) {
    .shell { padding: 18px; }
    .topbar, .panel-head, .list-row, .crm-guide { align-items: stretch; flex-direction: column; }
    .metric-grid, .feature-grid, .cards-grid, .form-grid, .phase-form fieldset, .enrollment-form { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .field-full, .enrollment-submit, .enrollment-form .notice { grid-column: auto; }
    .sidebar nav { grid-template-columns: 1fr; }
    .hero { padding: 32px 20px; }
    .hero h1 { font-size: 40px; }
    .lead-band, .public-section { padding: 34px 20px; }
    .enrollment-form { padding: 20px; border-width: 4px; }
    .class-highlight-head { flex-direction: column; }
    .checkout-page { padding: 34px 20px; }
    .checkout-card { padding: 20px; border-width: 4px; }
    .checkout-mini-grid { grid-template-columns: 1fr; }
    .kanban { grid-template-columns: 1fr; }
}


/* ===== Gestão de turmas ===== */
button:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }
.link-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--red);
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
}
.shell > .notice { margin-bottom: 14px; }

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--ink);
}
.tabs a {
    padding: 11px 16px;
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--muted);
    display: inline-flex;
    gap: 8px;
    align-items: center;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { background: var(--ink); color: #fff; }
.tabs a b {
    background: var(--red);
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    text-transform: none;
}

.collapsible { margin-bottom: 20px; }
.collapsible summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.collapsible summary::-webkit-details-marker { display: none; }
.collapsible summary span { color: var(--red); font-weight: 900; font-size: 13px; text-transform: uppercase; }
.collapsible[open] summary { margin-bottom: 18px; }
.collapsible[open] summary span { visibility: hidden; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-3 { grid-column: 1 / -1; }

.turma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.turma-card {
    background: #fff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--red);
    box-shadow: var(--shadow);
    padding: 18px;
    display: grid;
    gap: 16px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.turma-card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0,0,0,.14); }
.turma-card.status-planejada { border-top-color: var(--blue); }
.turma-card.status-em_andamento { border-top-color: #d59700; }
.turma-card.status-concluida, .turma-card.status-cancelada { border-top-color: #999; opacity: .8; }
.turma-card header { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.turma-card header strong { font-size: 18px; text-transform: uppercase; display: block; }
.turma-card header small { color: var(--muted); display: block; margin-top: 4px; }
.turma-card footer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.turma-card .go { margin-left: auto; color: var(--red); font-weight: 900; font-size: 12px; text-transform: uppercase; }
.turma-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.turma-stats div { border-left: 3px solid var(--line); padding-left: 10px; }
.turma-stats dt { font-size: 12px; text-transform: uppercase; }
.turma-stats dd { font-size: 17px; margin-top: 2px; }

.occupancy-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.occupancy-label b { color: var(--red); }
.bar { height: 8px; background: #ececec; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ink), var(--red)); }
.bar.small { height: 5px; margin: 6px 0 2px; }
.metric .bar { margin: 4px 0 8px; }
.metric strong.metric-text { font-size: 22px; text-transform: uppercase; }

.chip {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    background: #f1f1f1;
    border-left: 3px solid var(--ink);
    padding: 4px 7px;
}
.chip.warn { background: #fff2d6; border-left-color: #d59700; color: #8a5c00; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-bar input { flex: 1 1 220px; width: auto; }
.filter-bar select { flex: 0 1 220px; width: auto; }

label.check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}
label.check input, .inline-form label.check input { width: auto; }
.inline-form select { min-width: 170px; }
.inline-form.wide { flex-wrap: wrap; margin-bottom: 16px; }
.inline-form.wide input:not([type="date"]) { flex: 1 1 260px; width: auto; }
.inline-form.wide input[type="date"], .inline-form.wide select { width: auto; }
.inline-form.wide p { margin: 0; flex: 1; }

.credit-pill {
    display: inline-flex;
    min-width: 34px;
    height: 30px;
    padding: 0 8px;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: #fff;
    font-weight: 900;
    border-right: 4px solid var(--red);
}
.credit-pill.empty { background: #ffe3e3; color: var(--red-dark); }
.credit-delta { font-weight: 900; font-size: 13px; padding: 4px 8px; white-space: nowrap; }
.credit-delta.out { background: #ffe3e3; color: var(--red-dark); }
.credit-delta.in { background: #e4f5ed; color: var(--green); }

.turma-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.turma-hero p { color: var(--muted); margin: 8px 0 0; }
.turma-hero-title { display: flex; gap: 12px; align-items: center; }
.turma-hero-title h2 { font-size: 26px; }
.turma-hero .segmented button { font-size: 12px; padding: 7px 10px; }
.back-link { color: var(--red); font-weight: 900; font-size: 12px; text-transform: uppercase; }

.info-list { grid-template-columns: 170px 1fr; gap: 10px 14px; margin-bottom: 14px; }
.info-list dd { font-weight: 700; }
.info-list.inline { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; }
.info-list.inline dt { font-size: 12px; text-transform: uppercase; }
.info-list.inline dd { margin-right: 10px; }

.list-row.alert { border-left-color: var(--red); background: #fff8f8; }
.list-row.done { opacity: .6; }
.list-row.done strong { text-decoration: line-through; }
.list-row.selected { border-color: var(--red); border-left-color: var(--red); background: #fff8f8; }
.list-row .grow { flex: 1; }

.grid-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.compact-form { display: grid; gap: 10px; align-content: start; }
.compact-form h3, .compact-form h4 { margin: 0; }
.compact-form h4 { font-size: 13px; text-transform: uppercase; color: var(--red); }
.compact-form p { margin: 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wide-right { grid-template-columns: .8fr 1.2fr; }

.table-wrap.overflow-visible { overflow: visible; }
tr.row-muted td { opacity: .55; }
td small.note { color: #8a5c00; font-style: italic; }
td .mini-link { display: inline-block; margin-top: 4px; }
.manage-cell { position: relative; text-align: right; width: 1%; }
.manage summary { list-style: none; padding: 8px 12px; font-size: 12px; }
.manage summary::-webkit-details-marker { display: none; }
.manage[open] summary { background: var(--ink); color: #fff; }
.manage-panel {
    position: absolute;
    right: 10px;
    top: calc(100% - 6px);
    z-index: 10;
    width: 380px;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--red);
    box-shadow: 0 20px 50px rgba(0,0,0,.2);
    padding: 16px;
    display: grid;
    gap: 16px;
    text-align: left;
}
.manage-panel form + form { border-top: 1px solid var(--line); padding-top: 14px; }

.attendance th small { display: block; color: #bbb; font-weight: 400; text-transform: none; margin: 3px 0; }
.attendance th .link-btn { color: #ff8080; font-size: 11px; }
.check-cell { text-align: center; }
.check-cell input { width: 20px; height: 20px; accent-color: var(--red); cursor: pointer; }
.table-wrap + .btn.primary { margin-top: 14px; }

.danger-zone { border-color: #f3c5c5; }

/* Chat com créditos */
.chat-context {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.chat-context > div { background: #f6f6f6; padding: 10px; display: grid; gap: 4px; align-content: start; }
.chat-context small { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 900; }
.chat-box { max-height: 420px; }
.message.staff { border-left-color: var(--ink); background: #fafafa; margin-left: 28px; }
.message.student { margin-right: 28px; }
.message.highlight { box-shadow: 0 0 0 2px var(--red); }
.message-head, .message-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.charge-form { display: flex; align-items: center; gap: 8px; }
.charge-form label { display: flex; align-items: center; gap: 6px; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.charge-form input { width: 64px; padding: 5px 8px; }
.reply-tools { display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; }
.reply-tools > label { min-width: 180px; }
.credit-picker { display: grid; gap: 7px; }
.credit-picker > span { font-size: 13px; font-weight: 800; }
.credit-picker .segmented { align-items: center; }
.credit-picker .segmented button { min-width: 42px; }
.credit-picker input { width: 72px; padding: 8px; }

.turma-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.turma-banner .eyebrow { margin-bottom: 4px; }

.checkout-turma { color: var(--ink) !important; font-weight: 800; }
.checkout-edit summary { cursor: pointer; font-size: 12px; font-weight: 900; text-transform: uppercase; color: var(--muted); }
.checkout-edit[open] { display: grid; gap: 8px; }
.checkout-row-form select { min-width: 220px; }

@media (max-width: 1040px) {
    .grid-three, .form-grid.three, .wide-right { grid-template-columns: 1fr; }
    .chat-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .manage-panel { position: static; width: auto; margin-top: 8px; }
    .table-wrap.overflow-visible { overflow-x: auto; }
    .info-list { grid-template-columns: 1fr; }
    .message.staff, .message.student { margin: 0; }
}


/* ===== Modal de sucesso da LP ===== */
.success-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(5, 5, 5, .72);
    backdrop-filter: blur(3px);
    animation: modal-fade .25s ease;
}
.success-modal.closing { animation: modal-fade .2s ease reverse forwards; }
.success-modal-card {
    position: relative;
    width: min(480px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: #fff;
    border-top: 6px solid var(--red);
    padding: 34px 30px 28px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    animation: modal-pop .35s cubic-bezier(.2, 1.3, .4, 1);
}
.success-modal-card::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 70px;
    height: 70px;
    background: linear-gradient(315deg, #050505 0 22px, var(--red) 22px 30px, transparent 30px);
    pointer-events: none;
}
.success-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
}
.success-modal-close:hover { color: var(--red); }
.success-check { width: 78px; height: 78px; margin: 0 auto 16px; }
.success-check svg { width: 100%; height: 100%; fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.success-check circle { stroke: var(--red); stroke-dasharray: 151; stroke-dashoffset: 151; animation: modal-draw .6s .15s ease forwards; }
.success-check path { stroke: #050505; stroke-dasharray: 36; stroke-dashoffset: 36; animation: modal-draw .35s .65s ease forwards; }
.success-modal-card h2 { font-size: 28px; margin-bottom: 10px; }
.success-modal-card > p:not(.eyebrow) { color: #4a4a4a; line-height: 1.55; margin-bottom: 18px; }
.success-summary { display: grid; gap: 8px; margin-bottom: 18px; text-align: left; }
.success-summary div {
    background: #050505;
    color: #fff;
    padding: 12px 14px;
    border-left: 4px solid var(--red);
    display: grid;
    gap: 2px;
}
.success-summary small { color: #bdbdbd; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.success-summary span { color: #d9d9d9; font-size: 13px; }
.success-steps { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; text-align: left; }
.success-steps li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.success-steps b {
    width: 26px;
    height: 26px;
    flex: none;
    display: inline-grid;
    place-items: center;
    background: var(--red);
    color: #fff;
    font-size: 13px;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes modal-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
    .success-modal, .success-modal-card, .success-check circle, .success-check path { animation: none; stroke-dashoffset: 0; }
}
@media (max-width: 680px) {
    .success-modal-card { padding: 28px 20px 22px; }
    .success-modal-card h2 { font-size: 24px; }
}


/* ===== Certificado oficial ===== */
.cert-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}
.cert-sheet {
    position: relative;
    container-type: inline-size;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
    border: 1px solid var(--line);
    background: #fff;
    overflow: hidden;
}
.cert-sheet img { width: 100%; height: auto; display: block; }
.cert-sheet span {
    position: absolute;
    transform: translate(-50%, -80%);
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 700;
    color: #0e0e0e;
    white-space: nowrap;
    line-height: 1;
}
.cert-name { font-size: 3.33cqw; letter-spacing: .14cqw; }
.cert-date { font-size: 1.78cqw; letter-spacing: .06cqw; }
.cert-code { font-size: .78cqw; letter-spacing: .07cqw; color: #737373 !important; }
.cert-ready {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-left: 4px solid var(--green);
}
.cert-ready .eyebrow { color: var(--green); margin-bottom: 4px; }
.cert-actions, .cert-links { display: flex; gap: 10px; flex-wrap: wrap; }
.cert-links .mini-link { margin-top: 0; }
.portal-cert { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr); gap: 20px; align-items: center; }
.portal-cert .cert-actions { margin-top: 14px; }
@media (max-width: 1040px) {
    .cert-layout, .portal-cert { grid-template-columns: 1fr; }
}
