:root {
    --bg: #080a0d;
    --panel: #11161b;
    --panel-2: #171d24;
    --panel-3: #202732;
    --text: #f5f7fb;
    --muted: #8e9aac;
    --line: #29313d;
    --red: #f04444;
    --green: #20c783;
    --cyan: #2db7ff;
    --amber: #f2b84b;
    --shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #0b0e12 0%, var(--bg) 42%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

input,
select,
textarea {
    font-size: 16px;
}

.auth-screen {
    display: grid;
    place-items: center;
    padding: 32px;
}

.auth-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 420px;
    width: min(1040px, 100%);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background-image:
        linear-gradient(90deg, rgba(8, 10, 13, .38) 0%, rgba(8, 10, 13, .74) 52%, rgba(8, 10, 13, .94) 100%),
        linear-gradient(135deg, rgba(240, 68, 68, .28), rgba(45, 183, 255, .12), rgba(32, 199, 131, .12)),
        url("../../../imagens/img_hero_bg.png");
    background-position: center, center, center right;
    background-size: cover, cover, cover;
    background-repeat: no-repeat;
    box-shadow: var(--shadow);
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 56px;
    background:
        linear-gradient(180deg, rgba(8, 10, 13, .04), rgba(0, 0, 0, .74)),
        linear-gradient(135deg, rgba(240, 68, 68, .26), rgba(32, 199, 131, .12));
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: #f5f7fb;
    color: #080a0d;
    font-weight: 900;
}

.brand-mark.small {
    width: 34px;
    height: 34px;
    margin: 0;
    font-size: 13px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-brand h1,
.page-heading h1,
.hero-panel h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.05;
}

.auth-copy {
    max-width: 520px;
    color: #d7dde7;
    font-size: 18px;
    line-height: 1.55;
}

.auth-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
    background: rgba(8, 10, 13, .88);
    backdrop-filter: blur(2px);
}

.form-header h2 {
    margin: 0 0 24px;
    font-size: 28px;
}

.stack-form {
    display: grid;
    gap: 18px;
}

.stack-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.stack-form input,
.topbar-search input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0f1318;
    color: var(--text);
    outline: none;
}

.stack-form input {
    min-height: 48px;
    padding: 0 14px;
    font-size: 16px;
}

.stack-form input:focus,
.topbar-search input:focus {
    border-color: rgba(45, 183, 255, .72);
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.primary-button {
    background: var(--red);
    color: #fff;
}

.primary-button:disabled,
.primary-button.loading {
    opacity: .72;
    cursor: wait;
}

.primary-button.compact,
.ghost-button {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
}

.ghost-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
}

.ghost-button.disabled {
    color: var(--muted);
    cursor: default;
}

.auth-links,
.auth-links a {
    color: var(--muted);
}

.login-preview-products {
    display: grid;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.login-preview-products > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.login-preview-products div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.login-preview-products strong {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .05);
    font-size: 13px;
}

.preview-email-button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.preview-email-button:hover {
    border-color: rgba(45, 183, 255, .72);
}

.admin-link-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.auth-links a:hover,
.section-title a,
.buy-link {
    color: var(--cyan);
}

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #d9e2ed;
    background: rgba(255, 255, 255, .05);
    font-size: 14px;
    line-height: 1.45;
}

.alert.success {
    border-color: rgba(32, 199, 131, .45);
}

.alert.danger {
    border-color: rgba(240, 68, 68, .55);
}

.app-screen {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    background: var(--bg);
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 18px;
    border-right: 1px solid var(--line);
    background: #07090c;
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    font-weight: 900;
}

.sidebar-close {
    display: none;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .05);
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.sidebar-close:hover,
.sidebar-close:focus-visible {
    border-color: rgba(45, 183, 255, .72);
    outline: none;
}

.sidebar-backdrop {
    display: none;
}

.side-nav {
    display: grid;
    gap: 6px;
    margin-top: 34px;
}

.side-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
}

.side-nav a.active,
.side-nav a:hover {
    background: var(--panel-2);
    color: var(--text);
}

.sidebar-footer {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(240, 68, 68, .44);
    border-radius: 8px;
    background: rgba(240, 68, 68, .1);
    color: #ff8d8d;
    font-weight: 900;
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
    border-color: rgba(240, 68, 68, .72);
    background: rgba(240, 68, 68, .18);
    color: #fff;
    outline: none;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
}

.app-main {
    min-width: 0;
}

.free-class-bar {
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: #087a30;
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

.free-class-bar[hidden] {
    display: none;
}

.free-class-bar-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 10px 38px;
}

.free-class-bar-close {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(0, 0, 0, .18);
    color: rgba(255, 255, 255, .82);
    font-weight: 900;
    cursor: pointer;
}

.free-class-bar-close:hover,
.free-class-bar-close:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, .36);
    outline: none;
}

.free-class-bar-message {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 12px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.free-class-bar-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 16px;
    border-radius: 8px;
    background: #fff;
    color: #142017;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.free-class-bar-cta:hover,
.free-class-bar-cta:focus-visible {
    background: #edf5ee;
    outline: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: auto minmax(220px, 520px) auto;
    gap: 18px;
    align-items: center;
    min-height: 78px;
    padding: 0 38px;
    border-bottom: 1px solid rgba(41, 49, 61, .8);
    background: rgba(8, 10, 13, .88);
    backdrop-filter: blur(16px);
}

.icon-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.menu-button {
    display: none;
}

.menu-button span {
    width: 20px;
    height: 2px;
    background: var(--text);
}

.topbar-search {
    position: relative;
}

.topbar-search input {
    min-height: 42px;
    padding: 0 16px 0 42px;
    font-size: 16px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 14px;
    height: 14px;
    border: 2px solid var(--muted);
    border-radius: 50%;
    transform: translateY(-50%);
}

.search-icon::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -5px;
    width: 7px;
    height: 2px;
    background: var(--muted);
    transform: rotate(45deg);
}

.topbar-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.bell-button span {
    width: 16px;
    height: 18px;
    border: 2px solid var(--text);
    border-radius: 9px 9px 5px 5px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding-right: 10px;
    border-radius: 999px;
    background: var(--panel);
}

.user-chip span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--green);
    border-radius: 50%;
    background: #222a34;
    font-weight: 900;
}

.content-shell {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 34px 38px 70px;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: end;
    min-height: 310px;
    padding: 38px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background-image:
        linear-gradient(90deg, rgba(8, 10, 13, .98) 0%, rgba(8, 10, 13, .84) 42%, rgba(8, 10, 13, .5) 100%),
        linear-gradient(135deg, rgba(240, 68, 68, .34), rgba(45, 183, 255, .18), rgba(32, 199, 131, .16)),
        url("../../../imagens/img_hero_bg.png");
    background-position: center, center, center right;
    background-size: cover, cover, cover;
    background-repeat: no-repeat;
}

.hero-panel p {
    max-width: 720px;
    color: #d8dee8;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hero-metrics article {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
}

.hero-metrics strong {
    display: block;
    font-size: 36px;
}

.hero-metrics span {
    color: var(--muted);
    font-size: 13px;
}

.study-strip,
.section-block,
.page-heading {
    margin-top: 34px;
}

.materials-section {
    margin-top: 58px;
}

.materials-hero + .materials-section {
    margin-top: 44px;
}

.study-strip h2,
.section-title h2,
.page-heading h1 {
    margin: 0;
}

.continue-grid,
.product-row,
.catalog-grid {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.continue-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.continue-card,
.product-card,
.catalog-card,
.material-item,
.empty-state {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.continue-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 112px;
    padding: 18px;
    overflow: hidden;
}

.continue-card.with-cover {
    grid-template-columns: 132px minmax(0, 1fr);
}

.continue-cover,
.product-cover,
.material-cover,
.product-thumb.cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.continue-cover {
    width: 112px;
    height: 76px;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.play-button {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, .84);
}

.play-button::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 5px;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 17px solid #161b22;
}

.continue-card small,
.product-card span,
.catalog-body span,
.material-item span {
    color: var(--muted);
    font-size: 13px;
}

.continue-card strong,
.product-card h3,
.catalog-card h3,
.material-item h3 {
    display: block;
    margin: 6px 0 0;
    color: var(--text);
    font-size: 18px;
}

.progress-line {
    display: block;
    height: 4px;
    margin-top: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, .18);
}

.progress-line i {
    display: block;
    height: 100%;
    background: #fff;
}

.tone-1 {
    background: linear-gradient(135deg, rgba(240, 68, 68, .55), rgba(45, 183, 255, .22)), var(--panel-2);
}

.tone-2 {
    background: linear-gradient(135deg, rgba(45, 183, 255, .52), rgba(242, 184, 75, .22)), var(--panel-2);
}

.tone-3 {
    background: linear-gradient(135deg, rgba(32, 199, 131, .48), rgba(240, 68, 68, .18)), var(--panel-2);
}

.tone-4 {
    background: linear-gradient(135deg, rgba(242, 184, 75, .46), rgba(45, 183, 255, .18)), var(--panel-2);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.section-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.split-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.inline-sync-form {
    margin: 0;
}

.sync-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.sync-button:hover,
.sync-button:focus-visible {
    border-color: rgba(45, 183, 255, .72);
    outline: none;
}

.sync-button:disabled {
    opacity: .72;
    cursor: wait;
}

.refresh-icon {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    fill: currentColor;
    transform-origin: center;
}

.sync-button.loading .refresh-icon {
    animation: spin .8s linear infinite;
}

.hero-sync-form {
    display: inline-flex;
}

.sync-button-accent {
    border-color: rgba(45, 183, 255, .42);
    background: rgba(45, 183, 255, .1);
}

.method-upsell {
    display: grid;
    gap: 20px;
    padding: 28px;
    border: 1px solid rgba(45, 183, 255, .28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(240, 68, 68, .12), rgba(45, 183, 255, .12), rgba(32, 199, 131, .08)),
        var(--panel);
}

.method-upsell-copy {
    display: grid;
    gap: 8px;
    max-width: 860px;
}

.method-upsell-copy h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1.1;
}

.method-upsell-copy p:not(.eyebrow) {
    margin: 0;
    color: #d8dee8;
    line-height: 1.55;
}

.method-video-box {
    width: min(850px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    background: #050608;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .32);
}

.method-upsell-actions {
    display: flex;
    justify-content: center;
}

.method-upsell-cta {
    min-height: 50px;
    padding: 0 24px;
    letter-spacing: 0;
}

.access-sync-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(0, 0, 0, .78);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(10px);
    transition: opacity .18s ease;
}

.access-sync-overlay[hidden] {
    display: none;
}

.access-sync-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.access-sync-modal {
    display: grid;
    justify-items: center;
    width: min(420px, 100%);
    gap: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: #11161b;
    box-shadow: var(--shadow);
    text-align: center;
}

.access-sync-modal strong {
    font-size: 20px;
}

.access-sync-modal p {
    max-width: 320px;
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255, 255, 255, .18);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.product-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 110px;
    padding: 18px;
}

.product-thumb {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.product-thumb.cover {
    width: 66px;
    height: 66px;
    border-radius: 6px;
}

.locked-thumb {
    position: relative;
    background: repeating-linear-gradient(135deg, #202732, #202732 8px, #171d24 8px, #171d24 16px);
    color: #c9d1dc;
}

.locked {
    border-color: rgba(142, 154, 172, .34);
    background: color-mix(in srgb, var(--panel) 86%, #747d88 14%);
}

.locked-media {
    position: relative;
    overflow: hidden;
    background: #11161b;
}

.locked-media img,
.locked .catalog-art .product-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) brightness(.46) contrast(.88);
    opacity: .62;
}

.locked-media::after,
.locked .catalog-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(203, 210, 218, .22), rgba(38, 43, 51, .72)),
        rgba(15, 19, 24, .42);
    pointer-events: none;
}

.locked-media-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 50%;
    background: rgba(8, 10, 13, .78);
    color: #fff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .36);
    transform: translate(-50%, -50%);
}

.locked-media-badge.large {
    width: 52px;
    height: 52px;
}

.locked-media-badge.standalone {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
}

.locked-media-badge svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.locked-media-badge.large svg {
    width: 26px;
    height: 26px;
}

.buy-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 800;
}

.buy-link.muted {
    color: var(--muted);
}

.catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-card {
    overflow: hidden;
}

.catalog-art {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    font-weight: 900;
    overflow: hidden;
}

.catalog-art .product-cover {
    aspect-ratio: 16 / 9;
}

.catalog-body {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.catalog-body p,
.material-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.materials-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 28px;
    align-items: center;
    min-height: 260px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(8, 10, 13, .96), rgba(8, 10, 13, .62)),
        linear-gradient(135deg, rgba(240, 68, 68, .38), rgba(45, 183, 255, .16), rgba(32, 199, 131, .12));
}

.materials-hero h1 {
    margin: 0;
    font-size: 40px;
    line-height: 1.08;
}

.materials-hero p {
    max-width: 760px;
    color: #d8dee8;
    line-height: 1.6;
}

.materials-hero-cover {
    width: 220px;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .32);
}

.back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
}

.section-description {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.material-library-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.study-material-card,
.exam-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    overflow: hidden;
}

.study-material-card {
    display: grid;
    min-height: 100%;
}

.material-card-cover {
    display: block;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: #0e1217;
}

.material-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
}

.study-material-card:hover .material-card-cover img {
    transform: scale(1.035);
}

.material-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.material-card-body span,
.exam-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.material-card-body h3,
.exam-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.material-card-body p,
.exam-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.material-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.exam-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.exam-card {
    display: grid;
    gap: 16px;
    align-content: space-between;
    padding: 18px;
}

.pdf-reader-shell {
    display: grid;
    gap: 20px;
}

.pdf-reader-header {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(8, 10, 13, .96), rgba(8, 10, 13, .7)),
        linear-gradient(135deg, rgba(240, 68, 68, .24), rgba(45, 183, 255, .12));
}

.pdf-reader-header h1 {
    max-width: 980px;
    margin: 0;
    font-size: 34px;
    line-height: 1.12;
}

.pdf-reader-header p:not(.eyebrow) {
    max-width: 760px;
    margin: 12px 0 0;
    color: #d8dee8;
    line-height: 1.55;
}

.pdf-viewer {
    width: 100%;
    height: min(78vh, 860px);
    min-height: 620px;
    padding: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #07090c;
}

.pdf-status {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0 0 12px;
    padding: 14px 16px;
    border: 1px solid rgba(45, 183, 255, .24);
    border-radius: 8px;
    background: rgba(12, 17, 23, .94);
    color: #dce8f8;
    font-weight: 800;
}

.pdf-status.is-error {
    border-color: rgba(240, 68, 68, .42);
    color: #ffd7d7;
}

.pdf-pages {
    display: grid;
    gap: 14px;
}

.pdf-page {
    width: 100%;
    display: flex;
    justify-content: center;
}

.pdf-page canvas {
    max-width: 100%;
    height: auto !important;
    background: #fff;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .36);
}

.pdf-reader-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.materials-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.support-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.material-item {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
}

.file-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #eef2f7;
    color: #0c1117;
    font-weight: 900;
    font-size: 13px;
}

.material-cover {
    width: 72px;
    height: 72px;
    border-radius: 8px;
}

.empty-state {
    padding: 24px;
    color: var(--muted);
}

.validation-state {
    display: grid;
    gap: 8px;
    min-height: 112px;
    align-content: center;
}

.validation-state strong {
    color: var(--text);
}

.validation-state span {
    color: var(--muted);
}

.empty-state.wide {
    grid-column: 1 / -1;
}

@media (max-width: 1120px) {
    .continue-grid,
    .product-row,
    .catalog-grid,
    .material-library-grid,
    .exam-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .auth-shell,
    .app-screen {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: 280px;
        padding: 34px;
    }

    .auth-card {
        padding: 28px;
    }

    .sidebar {
        position: fixed;
        z-index: 20;
        width: 260px;
        max-width: calc(100vw - 64px);
        transform: translateX(-100%);
        transition: transform .2s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: grid;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 19;
        display: block;
        border: 0;
        background: rgba(0, 0, 0, .58);
        opacity: 0;
        cursor: pointer;
        backdrop-filter: blur(3px);
        transition: opacity .18s ease;
    }

    .sidebar-backdrop[hidden] {
        display: none;
    }

    .sidebar-backdrop.visible {
        opacity: 1;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .menu-button {
        display: grid;
    }

    .topbar {
        grid-template-columns: auto 1fr;
        padding: 0 18px;
    }

    .free-class-bar-content {
        align-items: flex-start;
        padding: 10px 18px;
    }

    .free-class-bar-message {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }

    .topbar-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
        padding-bottom: 14px;
    }

    .content-shell {
        padding: 24px 18px 56px;
    }

    .hero-panel,
    .materials-hero {
        padding: 26px;
    }

    .materials-hero {
        grid-template-columns: 1fr;
    }

    .materials-hero-cover {
        width: 180px;
    }
}

@media (max-width: 640px) {
    .auth-screen {
        padding: 14px;
    }

    .auth-brand h1,
    .page-heading h1,
    .hero-panel h1 {
        font-size: 34px;
    }

    .pdf-reader-header h1 {
        font-size: 28px;
    }

    .pdf-viewer {
        min-height: 520px;
        height: 74vh;
        padding: 10px;
    }

    .continue-grid,
    .product-row,
    .catalog-grid,
    .support-panel,
    .material-library-grid,
    .exam-grid {
        grid-template-columns: 1fr;
    }

    .continue-card,
    .product-card,
    .material-item {
        grid-template-columns: 1fr;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .materials-hero h1 {
        font-size: 32px;
    }

    .materials-hero-cover {
        width: 150px;
    }

    .method-upsell {
        padding: 20px;
    }

    .method-upsell-copy h2 {
        font-size: 26px;
    }

    .method-upsell-cta {
        width: 100%;
        text-align: center;
    }

    .split-heading,
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-actions {
        flex-wrap: wrap;
    }

    .inline-sync-form {
        width: 100%;
    }

    .sync-button {
        width: 100%;
    }

    .material-item .primary-button {
        width: 100%;
    }
}
