:root {
    --ink: #17212b;
    --muted: #667085;
    --line: #d8dee8;
    --surface: #ffffff;
    --soft: #f5f7fb;
    --accent: #176f6b;
    --accent-2: #b45309;
    --danger: #b42318;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: Arial, Helvetica, sans-serif;
}

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

body.marketing-page {
    background: #ffffff;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    padding: 22px;
    background: #102027;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: #d9f0ec;
    color: #0f554f;
    font-weight: 800;
    border-radius: 8px;
}

.brand small, .sidebar-foot a { color: #b6c7cc; display: block; margin-top: 4px; }

nav { display: grid; gap: 8px; }

nav a {
    padding: 11px 12px;
    border-radius: 8px;
    color: #e7f0f2;
}

nav a:hover { background: rgba(255,255,255,.1); }

.sidebar-foot { margin-top: auto; font-size: 14px; }

.shell {
    margin-left: 260px;
    padding: 32px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.public-shell {
    display: block;
    min-height: auto;
    padding: 0;
}

.marketing-hero {
    position: relative;
    min-height: 88vh;
    overflow: hidden;
    background: #123139;
    color: #fff;
    isolation: isolate;
}

.marketing-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(8, 23, 29, .32);
    z-index: -1;
}

.hero-scene {
    position: absolute;
    inset: 0 0 0 36%;
    z-index: -2;
    background: #dfe9ea;
}

.screen {
    position: absolute;
    border: 1px solid rgba(255,255,255,.45);
    background: rgba(255,255,255,.78);
    box-shadow: 0 28px 80px rgba(0,0,0,.28);
    backdrop-filter: blur(2px);
}

.screen-main {
    width: min(720px, 58vw);
    height: 430px;
    right: 5vw;
    top: 18vh;
    border-radius: 8px;
    padding: 22px;
    transform: rotate(-2deg);
}

.screen-side {
    right: 46vw;
    bottom: 11vh;
    width: 210px;
    min-height: 118px;
    border-radius: 8px;
    padding: 20px;
    color: #123139;
}

.screen-side b {
    display: block;
    font-size: 42px;
}

.screen-side span {
    color: #496169;
    font-weight: 700;
}

.screen-bar {
    height: 48px;
    border-radius: 8px;
    background: #123139;
    margin-bottom: 18px;
}

.screen-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.screen-grid span {
    height: 82px;
    border-radius: 8px;
    background: #edf6f4;
    border: 1px solid #cce2de;
}

.screen-lines {
    display: grid;
    gap: 12px;
}

.screen-lines i {
    height: 20px;
    border-radius: 999px;
    background: #cfdadd;
}

.screen-lines i:nth-child(2) { width: 84%; }
.screen-lines i:nth-child(3) { width: 70%; }
.screen-lines i:nth-child(4) { width: 92%; }

.marketing-nav {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px clamp(20px, 5vw, 72px);
}

.marketing-nav > div {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 800;
}

.public-brand .brand-mark {
    background: #f5fbfa;
}

.nav-button, .button-link, .ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 800;
}

.nav-button, .button-link {
    background: #ffffff;
    color: #123139;
}

.ghost-link {
    border: 1px solid rgba(255,255,255,.58);
    color: #fff;
}

.hero-copy {
    position: relative;
    z-index: 1;
    width: min(720px, 92vw);
    padding: clamp(70px, 12vh, 130px) clamp(20px, 5vw, 72px) 90px;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(52px, 9vw, 112px);
    line-height: .94;
    letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
    max-width: 620px;
    color: #d8e8ea;
    font-size: 21px;
    line-height: 1.45;
}

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

.marketing-band {
    padding: 74px clamp(20px, 5vw, 72px);
    background: #fff;
}

.marketing-band.alt {
    background: #f2f6f6;
}

.section-head {
    max-width: 760px;
    margin-bottom: 30px;
}

.section-head h2, .marketing-cta h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.feature-grid article, .role-strip article {
    border-top: 3px solid var(--accent);
    padding-top: 18px;
}

.feature-grid span {
    color: var(--accent);
    font-weight: 800;
}

.feature-grid h3, .role-strip h3 {
    margin: 12px 0 8px;
    font-size: 22px;
}

.feature-grid p, .role-strip p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.role-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.pack-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pack-cloud span {
    padding: 14px 16px;
    border: 1px solid #c9d9dc;
    border-radius: 8px;
    background: #f8fbfb;
    font-weight: 800;
}

.marketing-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 60px clamp(20px, 5vw, 72px);
    background: #123139;
    color: #fff;
}

.login-panel {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 34px;
    align-items: center;
}

.login-panel h1 {
    font-size: 44px;
    line-height: 1.08;
    margin: 0 0 16px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.muted, .hint { color: var(--muted); }

.hint { font-size: 13px; line-height: 1.45; }

.card, .panel, .metric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(16, 32, 39, .05);
}

.card, .panel { padding: 22px; }

.form { display: grid; gap: 16px; }

.form h2 { margin: 0; }

label {
    display: grid;
    gap: 8px;
    color: #344054;
    font-weight: 700;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    font: inherit;
}

textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    font: inherit;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

button {
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    padding: 13px 16px;
    font-weight: 800;
    cursor: pointer;
}

.secondary-button {
    background: #eaf3f1;
    color: #123139;
}

.muted-button {
    background: #eaf3f1;
    color: #123139;
    width: fit-content;
}

.toggle-form {
    margin: 0;
}

.wide-form {
    max-width: 760px;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    background: #fff1f0;
    color: var(--danger);
    border: 1px solid #ffccc7;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}

.page-head h1 { margin: 0; font-size: 30px; }

.pill, .status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid #b8ddd8;
    background: #edf8f6;
    color: #0f554f;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

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

.metric { padding: 18px; }
.metric span { color: var(--muted); display: block; margin-bottom: 8px; }
.metric strong { font-size: 34px; }
.metric.warning strong { color: var(--accent-2); }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.panel h2, .card h2 { margin: 0; font-size: 20px; }
.panel-head a { color: var(--accent); font-weight: 800; }

.list { display: grid; gap: 10px; }

.row {
    min-height: 62px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.row span { color: var(--muted); display: block; margin-top: 4px; }
.score { font-size: 22px; font-weight: 800; color: var(--accent) !important; }

.agent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.agent {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.agent span { display: block; color: var(--muted); margin-top: 6px; }

.timeline { display: grid; gap: 10px; }
.timeline p { margin: 0; color: var(--muted); }

.lesson-panel p {
    font-size: 18px;
    line-height: 1.65;
}

.lesson-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.qa-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.qa-item p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.qa-item .answer {
    color: var(--ink);
    background: #edf8f6;
    border-radius: 8px;
    padding: 12px;
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 12px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.course-card, .module-card { display: grid; gap: 12px; align-content: start; }
.course-card p, .module-card p { margin: 0; color: var(--muted); line-height: 1.5; }

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 840px;
}

th, td {
    border-bottom: 1px solid var(--line);
    padding: 13px 10px;
    text-align: left;
    vertical-align: top;
}

th { color: #475467; font-size: 13px; }

@media (max-width: 980px) {
    .sidebar {
        position: static;
        width: auto;
        min-height: auto;
    }
    .shell { margin: 0; padding: 20px; }
    .login-panel, .split, .metric-grid, .cards, .agent-grid { grid-template-columns: 1fr; }
    .login-panel h1 { font-size: 34px; }
    .page-head { display: grid; }
    .row, .inline-form { display: grid; grid-template-columns: 1fr; }
    .marketing-nav { align-items: flex-start; }
    .marketing-nav > div { flex-wrap: wrap; justify-content: flex-end; }
    .screen-main {
        width: 92vw;
        right: -34vw;
        top: 28vh;
        opacity: .55;
    }
    .screen-side { display: none; }
    .feature-grid, .role-strip { grid-template-columns: 1fr; }
    .marketing-cta { display: grid; }
}
