/* ==========================================================
   CareerPilot Authentication
   ========================================================== */

:root {
    --auth-primary: #2f6fed;
    --auth-primary-dark: #2158ca;
    --auth-bg: #eef4fa;
    --auth-surface: #ffffff;
    --auth-soft: #f7f9fc;
    --auth-text: #152033;
    --auth-muted: #637089;
    --auth-border: #dbe4ef;
    --auth-success: #12835b;
    --auth-danger: #c8364a;
    --auth-shadow: 0 28px 80px rgba(24, 53, 92, 0.12);
}

* {
    box-sizing: border-box;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 8% 15%, rgba(47, 111, 237, 0.12), transparent 34%),
        radial-gradient(circle at 94% 90%, rgba(36, 189, 143, 0.10), transparent 30%),
        var(--auth-bg);
    color: var(--auth-text);
    font-family: "Inter", sans-serif;
}

.auth-header {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 5vw;
    border-bottom: 1px solid rgba(219, 228, 239, 0.85);
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(16px);
}

.auth-logo {
    color: var(--auth-primary);
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
}

.auth-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--auth-muted);
    font-size: 13px;
    font-weight: 600;
}

.auth-header-link,
.auth-theme-button {
    min-height: 42px;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    background: var(--auth-surface);
    color: var(--auth-text);
    font: inherit;
    font-weight: 800;
}

.auth-header-link {
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    text-decoration: none;
}

.auth-theme-button {
    width: 46px;
    cursor: pointer;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.75fr);
    width: min(1280px, calc(100% - 36px));
    min-height: calc(100vh - 126px);
    margin: 28px auto;
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 28px;
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
}

.auth-visual {
    display: flex;
    align-items: center;
    padding: clamp(36px, 6vw, 84px);
    background:
        linear-gradient(135deg, rgba(47, 111, 237, 0.98), rgba(28, 75, 175, 0.96));
    color: #ffffff;
}

.auth-visual-content {
    max-width: 630px;
}

.auth-eyebrow {
    margin: 0;
    color: inherit;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.auth-visual h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
}

.auth-visual > .auth-visual-content > p:not(.auth-eyebrow) {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.72;
}

.auth-benefit-list {
    display: grid;
    gap: 16px;
    margin-top: 34px;
}

.auth-benefit-list > div {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: center;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.09);
}

.auth-benefit-list span {
    font-size: 26px;
}

.auth-benefit-list p {
    margin: 0;
    color: rgba(255, 255, 255, 0.90);
    font-weight: 600;
    line-height: 1.5;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 5vw, 66px);
}

.auth-card-heading .auth-eyebrow {
    color: var(--auth-primary);
}

.auth-card-heading h2 {
    margin: 10px 0 10px;
    font-size: clamp(30px, 4vw, 42px);
}

.auth-card-heading > p:last-child {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 30px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field label {
    font-size: 13px;
    font-weight: 800;
}

.auth-field input {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: var(--auth-soft);
    color: var(--auth-text);
    font: inherit;
    outline: none;
}

.auth-field input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    padding-right: 74px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    min-width: 55px;
    min-height: 36px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-primary);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.auth-primary-button {
    min-height: 54px;
    margin-top: 2px;
    border: 1px solid var(--auth-primary);
    border-radius: 12px;
    background: var(--auth-primary);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.auth-primary-button:hover {
    background: var(--auth-primary-dark);
}

.auth-primary-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.auth-message {
    min-height: 0;
    padding: 0;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.auth-message:not(:empty) {
    padding: 12px 14px;
    border: 1px solid currentColor;
    background: rgba(47, 111, 237, 0.04);
}

.auth-card-footer {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--auth-border);
}

.auth-card-footer p {
    margin: 0;
    color: var(--auth-muted);
}

.auth-card-footer a {
    color: var(--auth-primary);
    font-weight: 800;
    text-decoration: none;
}

.auth-back-link {
    width: fit-content;
    font-size: 13px;
}

body.dark-mode {
    --auth-bg: #0c1526;
    --auth-surface: #152238;
    --auth-soft: #101c30;
    --auth-text: #f6f8fc;
    --auth-muted: #aebbd0;
    --auth-border: #2b3b55;
    --auth-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

body.dark-mode .auth-header {
    background: rgba(12, 21, 38, 0.92);
}

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

    .auth-visual {
        min-height: 360px;
    }
}

@media (max-width: 620px) {
    .auth-header {
        padding-inline: 18px;
    }

    .auth-header-actions > span {
        display: none;
    }

    .auth-shell {
        width: calc(100% - 20px);
        margin: 10px auto 24px;
        border-radius: 20px;
    }

    .auth-visual {
        min-height: auto;
        padding: 34px 24px;
    }

    .auth-visual h1 {
        font-size: 36px;
    }

    .auth-benefit-list {
        display: none;
    }

    .auth-card {
        padding: 32px 22px;
    }
}
