:root {
    --cema-navy: #031b3f;
    --cema-navy-2: #082a5a;
    --cema-blue: #0b63f6;
    --cema-gold: #d8a23a;
    --cema-gold-2: #f3c766;
    --cema-white: #ffffff;
    --cema-soft: rgba(255,255,255,0.12);
    --cema-border: rgba(255,255,255,0.18);
    --cema-text: #edf4ff;
    --cema-muted: #aebbd2;
    --cema-error: #fecaca;
    --cema-success: #bbf7d0;
}

* { box-sizing: border-box; }

body.cema-auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--cema-text);
    background:
        radial-gradient(circle at 12% 18%, rgba(216,162,58,.22), transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(11,99,246,.18), transparent 28%),
        linear-gradient(135deg, #021633 0%, #031b3f 45%, #07152a 100%);
    overflow-x: hidden;
}

body.cema-auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.auth-bg-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(4px);
    opacity: .45;
    pointer-events: none;
}

.orb-one {
    width: 520px;
    height: 520px;
    left: -180px;
    top: -160px;
    background: repeating-radial-gradient(circle, rgba(216,162,58,.25) 0 2px, transparent 2px 14px);
}

.orb-two {
    width: 540px;
    height: 540px;
    right: 28%;
    top: 20%;
    background: repeating-radial-gradient(circle, rgba(216,162,58,.16) 0 2px, transparent 2px 13px);
}

.auth-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(430px, 560px);
    gap: 56px;
    width: min(1380px, calc(100% - 80px));
    margin: 0 auto;
    min-height: calc(100vh - 76px);
    align-items: center;
    padding: 48px 0 24px;
}

.auth-brand-panel { padding: 16px 0 0; }

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 56px;
}

.auth-emblem {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 3px solid var(--cema-gold);
    color: var(--cema-gold-2);
    font-size: 46px;
    box-shadow: 0 0 40px rgba(216,162,58,.18);
    position: relative;
}

.auth-emblem::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(216,162,58,.55);
    border-radius: 50%;
}

.auth-brand-logo h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 54px;
    line-height: .85;
    letter-spacing: 4px;
    margin: 0;
    color: var(--cema-gold-2);
}

.auth-brand-logo p {
    margin: 8px 0 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
}

.auth-brand-logo span {
    display: inline-block;
    color: #e5eefb;
    letter-spacing: 7px;
    text-transform: uppercase;
    margin-top: 8px;
    font-size: 14px;
}

.auth-hero-copy h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.08;
    margin: 0;
    font-weight: 500;
}

.auth-hero-copy h2 span { color: var(--cema-gold-2); }
.auth-gold-line { width: 72px; height: 4px; background: var(--cema-gold-2); margin: 26px 0; border-radius: 10px; }
.auth-hero-copy p { font-size: 20px; line-height: 1.6; color: #e6eefb; max-width: 620px; margin: 0 0 32px; }

.auth-benefits { display: grid; gap: 19px; max-width: 650px; }
.auth-benefit-item { display: flex; gap: 18px; align-items: flex-start; }
.auth-benefit-item span {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.18);
    color: var(--cema-gold-2);
    font-size: 30px;
    background: rgba(255,255,255,.04);
}
.auth-benefit-item strong { display: block; font-size: 18px; margin-bottom: 5px; }
.auth-benefit-item p { margin: 0; color: var(--cema-muted); line-height: 1.45; }

.auth-illustration-row {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    min-height: 205px;
    margin-top: 26px;
}
.auth-book-stack {
    width: 150px;
    height: 85px;
    background: linear-gradient(180deg, #0b244e, #06152d);
    border-radius: 12px 12px 5px 5px;
    border-bottom: 8px solid #d8a23a;
    box-shadow: 0 22px 50px rgba(0,0,0,.35);
    position: relative;
}
.auth-book-stack::before {
    content: "";
    position: absolute;
    width: 92px;
    height: 58px;
    background: linear-gradient(135deg, #142d57, #07152a);
    top: -56px;
    left: 30px;
    transform: skew(-18deg);
    border-bottom: 5px solid var(--cema-gold);
}
.auth-laptop-card {
    width: 280px;
    height: 160px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    box-shadow: 0 20px 70px rgba(0,0,0,.35);
    display: grid;
    place-items: center;
    position: relative;
}
.auth-laptop-card div {
    width: 74%;
    height: 52%;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.12);
}
.auth-laptop-card span {
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(216,162,58,.18);
    border: 2px solid var(--cema-gold-2);
    color: var(--cema-gold-2);
    font-size: 28px;
}
.auth-globe {
    width: 155px;
    height: 155px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(243,199,102,.7), transparent 8%),
        radial-gradient(circle at 45% 42%, rgba(216,162,58,.65), transparent 13%),
        linear-gradient(145deg, #163560, #08172c);
    border: 2px solid rgba(216,162,58,.7);
    box-shadow: inset -18px -20px 35px rgba(0,0,0,.35), 0 22px 60px rgba(0,0,0,.38);
}

.auth-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 28px;
    padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,.12);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.auth-metrics strong { display: block; font-size: 22px; color: #fff; }
.auth-metrics span { display: block; color: var(--cema-muted); font-size: 12px; margin-top: 3px; }

.auth-card-panel { display: flex; justify-content: flex-end; }
.auth-form-card {
    width: 100%;
    max-width: 590px;
    min-height: 640px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(12,43,84,.84), rgba(4,24,55,.88));
    box-shadow: 0 32px 90px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
    backdrop-filter: blur(18px);
    padding: 42px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid rgba(255,255,255,.15);
    margin-bottom: 38px;
}
.auth-tabs a {
    text-align: center;
    padding: 8px 8px 22px;
    color: #e5eefb;
    text-decoration: none;
    font-size: 22px;
    position: relative;
}
.auth-tabs a.active { color: var(--cema-gold-2); font-weight: 700; }
.auth-tabs a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 3px;
    background: var(--cema-gold-2);
    border-radius: 20px;
}

.auth-form { display: grid; gap: 20px; }
.auth-input-wrap {
    height: 68px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.23);
    background: rgba(255,255,255,.035);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    color: var(--cema-muted);
}
.auth-input-wrap i { font-size: 25px; color: #c7d2e6; }
.auth-input-wrap input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 17px;
    min-width: 0;
}
.auth-input-wrap input::placeholder { color: #adb9cc; }
.auth-input-wrap:focus-within { border-color: rgba(243,199,102,.75); box-shadow: 0 0 0 4px rgba(216,162,58,.12); }
.auth-password-toggle { border: 0; background: transparent; color: #c7d2e6; cursor: pointer; font-size: 18px; }

.auth-two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-three-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.auth-register-form .auth-input-wrap { height: 60px; }
.auth-register-form .auth-input-wrap input { font-size: 15px; }

.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 12px;
    color: var(--cema-muted);
}
.auth-options-row a, .auth-switch-text a { color: var(--cema-gold-2); text-decoration: none; font-weight: 600; }
.auth-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--cema-muted); }
.auth-check input { display: none; }
.auth-check span {
    width: 25px;
    height: 25px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.30);
    background: rgba(255,255,255,.06);
    display: inline-grid;
    place-items: center;
}
.auth-check input:checked + span { background: var(--cema-gold-2); border-color: var(--cema-gold-2); }
.auth-check input:checked + span::before { content: "✓"; color: #082144; font-weight: 900; }
.auth-terms { font-size: 14px; line-height: 1.4; }

.auth-primary-btn {
    border: 0;
    border-radius: 9px;
    min-height: 64px;
    background: linear-gradient(135deg, #d8a23a, #f3c766);
    color: #06152d;
    font-weight: 800;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(216,162,58,.22);
    transition: transform .2s, box-shadow .2s;
}
.auth-primary-btn:hover { transform: translateY(-2px); box-shadow: 0 24px 44px rgba(216,162,58,.30); }

.auth-social-block { margin-top: 34px; }
.auth-separator { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; color: var(--cema-muted); }
.auth-separator span { height: 1px; background: rgba(255,255,255,.18); }
.auth-social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.auth-social-grid button {
    height: 58px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.04);
    color: #e5eefb;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: .9;
}
.auth-social-grid button i { font-size: 22px; }
.auth-switch-text { text-align: center; color: var(--cema-muted); margin-top: 34px; }
.auth-alert { border-radius: 12px; padding: 13px 15px; margin-bottom: 18px; font-size: 14px; }
.auth-alert-success { background: rgba(34,197,94,.14); color: var(--cema-success); border: 1px solid rgba(34,197,94,.26); }
.auth-alert-error { background: rgba(239,68,68,.13); color: var(--cema-error); border: 1px solid rgba(239,68,68,.25); }
.auth-error { color: var(--cema-error); margin-top: -12px; display: block; }

.auth-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: min(1380px, calc(100% - 80px));
    margin: 0 auto;
    padding: 18px 0 26px;
    color: var(--cema-muted);
    border-top: 1px solid rgba(255,255,255,.12);
}
.auth-footer nav { display: flex; gap: 28px; flex-wrap: wrap; }
.auth-footer a { color: var(--cema-muted); text-decoration: none; }
.auth-footer a:hover { color: var(--cema-gold-2); }

.compact-auth-body { display: grid; place-items: center; padding: 30px; }
.compact-auth-card, .student-placeholder-card {
    position: relative;
    z-index: 2;
    width: min(520px, 100%);
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 26px;
    padding: 38px;
    background: rgba(8,38,78,.86);
    box-shadow: 0 28px 70px rgba(0,0,0,.42);
}
.auth-logo-badge {
    width: 82px;
    height: 82px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--cema-gold), var(--cema-gold-2));
    color: #06152d;
    font-weight: 900;
    margin-bottom: 22px;
}
.compact-auth-card h1, .student-placeholder-card h1 { margin: 0 0 8px; }
.compact-auth-card p, .student-placeholder-card p { color: var(--cema-muted); line-height: 1.6; }
.student-placeholder-body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #031b3f, #07152a);
    color: white;
    font-family: Inter, system-ui, sans-serif;
}

@media (max-width: 1180px) {
    .auth-shell { grid-template-columns: 1fr; gap: 30px; }
    .auth-card-panel { justify-content: center; }
    .auth-form-card { max-width: 720px; }
}

@media (max-width: 720px) {
    .auth-shell, .auth-footer { width: min(100% - 28px, 100%); }
    .auth-shell { padding-top: 24px; }
    .auth-brand-logo { margin-bottom: 30px; }
    .auth-brand-logo h1 { font-size: 40px; }
    .auth-emblem { width: 76px; height: 76px; font-size: 32px; }
    .auth-hero-copy h2 { font-size: 38px; }
    .auth-form-card { padding: 24px; border-radius: 22px; }
    .auth-two-cols, .auth-three-cols, .auth-metrics, .auth-social-grid { grid-template-columns: 1fr; }
    .auth-illustration-row { display: none; }
    .auth-footer { flex-direction: column; align-items: flex-start; }
}
