﻿/* =========================
   AUTH RESET
========================= */

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

    body.auth-bg {
        min-height: 100vh;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden;
        background: #ffffff !important;
        font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }

/* =========================
   AUTH LAYOUT
========================= */

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(460px, 48%) 1fr;
    background: #ffffff;
}

/* =========================
   LEFT BRAND PANEL
========================= */

.auth-brand-panel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 72px;
    color: var(--text-main);
    background: radial-gradient(circle at 12% 12%, rgba(79,70,229,0.16), transparent 30%), radial-gradient(circle at 82% 76%, rgba(14,165,233,0.15), transparent 34%), linear-gradient(135deg, #ffffff 0%, #f8fafc 52%, #eef4ff 100%);
    border-right: 1px solid rgba(226,232,240,0.9);
}

    .auth-brand-panel::before {
        content: "";
        position: absolute;
        width: 540px;
        height: 540px;
        right: -190px;
        top: 80px;
        border-radius: 999px;
        background: radial-gradient(circle, rgba(79,70,229,0.10), transparent 68%);
        pointer-events: none;
    }

    .auth-brand-panel::after {
        content: "";
        position: absolute;
        width: 460px;
        height: 460px;
        left: -170px;
        bottom: -170px;
        border-radius: 999px;
        background: radial-gradient(circle, rgba(14,165,233,0.13), transparent 68%);
        pointer-events: none;
    }

.auth-brand-content {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

/* =========================
   BRAND LOGO / EYEBROW
========================= */

.auth-brand-logo {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), #4338ca);
    border: 1px solid rgba(79,70,229,0.18);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .01em;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(79,70,229,0.20);
    transition: transform .15s ease, box-shadow .15s ease;
}

    .auth-brand-logo:hover {
        color: #ffffff !important;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 14px 28px rgba(79,70,229,0.26);
    }

.auth-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-top: 54px;
    margin-bottom: 18px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(79,70,229,0.08);
    border: 1px solid rgba(79,70,229,0.14);
    color: var(--primary) !important;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .02em;
    box-shadow: 0 12px 26px rgba(79,70,229,0.08);
}

/* =========================
   LEFT PANEL TYPOGRAPHY
========================= */

.auth-brand-title {
    max-width: 620px;
    margin: 0 0 20px;
    color: var(--text-main) !important;
    font-size: clamp(36px, 3.7vw, 54px);
    line-height: 1.06;
    letter-spacing: -0.052em;
    font-weight: 950;
    text-wrap: balance;
}

.auth-brand-text {
    max-width: 560px;
    margin: 0;
    color: var(--text-muted) !important;
    font-size: 17px;
    line-height: 1.72;
    font-weight: 550;
}

/* =========================
   FEATURE LIST
========================= */

.auth-feature-list {
    position: relative;
    display: grid;
    gap: 14px;
    max-width: 560px;
    margin-top: 38px;
}

.auth-feature-item {
    position: relative;
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(226,232,240,0.95);
    box-shadow: 0 18px 46px rgba(15,23,42,0.065), inset 0 1px 0 rgba(255,255,255,0.80);
    backdrop-filter: blur(10px);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .auth-feature-item:hover {
        transform: translateY(-2px);
        border-color: rgba(79,70,229,0.20);
        box-shadow: 0 22px 52px rgba(15,23,42,0.085), inset 0 1px 0 rgba(255,255,255,0.88);
    }

    .auth-feature-item > span {
        width: 42px;
        height: 42px;
        border-radius: 15px;
        background: radial-gradient(circle at top left, rgba(255,255,255,0.95), transparent 48%), rgba(79,70,229,0.11);
        position: relative;
        box-shadow: inset 0 0 0 1px rgba(79,70,229,0.10);
    }

        .auth-feature-item > span::after {
            content: "";
            position: absolute;
            left: 14px;
            top: 12px;
            width: 13px;
            height: 8px;
            border-left: 2px solid var(--primary);
            border-bottom: 2px solid var(--primary);
            transform: rotate(-45deg);
        }

    .auth-feature-item strong {
        display: block;
        color: var(--text-main) !important;
        font-size: 15px;
        font-weight: 900;
        letter-spacing: -0.012em;
        margin-bottom: 5px;
    }

    .auth-feature-item small {
        display: block;
        color: var(--text-muted) !important;
        font-size: 12px;
        line-height: 1.55;
        font-weight: 650;
    }

/* =========================
   RIGHT FORM PANEL
========================= */

.auth-main-panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
    background: #ffffff !important;
    background-image: none !important;
    border-left: 1px solid rgba(226,232,240,0.85);
}

    .auth-main-panel::before,
    .auth-main-panel::after {
        display: none !important;
        content: none !important;
    }

.auth-mobile-brand {
    position: absolute;
    top: 22px;
    left: 22px;
}

/* =========================
   AUTH CARD
========================= */

.auth-form-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 34px;
    border: 1px solid rgba(226,232,240,0.95);
    border-radius: 28px;
    background: #ffffff !important;
    box-shadow: 0 18px 45px rgba(15,23,42,0.075);
}

.auth-card-header {
    margin-bottom: 26px;
}

.auth-card-logo {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), #4338ca);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(79,70,229,0.20);
}

    .auth-card-logo:hover {
        color: #ffffff !important;
        text-decoration: none;
    }

.auth-card h2 {
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.auth-card p {
    max-width: 350px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
    font-weight: 600;
}

/* =========================
   AUTH FORM ELEMENTS
========================= */

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-field {
    margin-bottom: 0;
}

.auth-card .form-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-card .form-control {
    min-height: 46px;
    border-radius: 14px;
    border-color: rgba(203,213,225,0.9);
    background: #ffffff;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
}

    .auth-card .form-control:focus {
        background: #ffffff;
        border-color: rgba(79,70,229,0.55);
        box-shadow: 0 0 0 4px rgba(79,70,229,0.10);
    }

.auth-card .form-check-label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 650;
}

.auth-card .form-check-input {
    border-color: rgba(148,163,184,0.75);
}

    .auth-card .form-check-input:checked {
        background-color: var(--primary);
        border-color: var(--primary);
    }

.auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: -2px;
    margin-bottom: 2px;
}

.auth-submit-btn {
    margin-top: 4px;
}

.auth-card .btn-primary {
    min-height: 46px;
    border-radius: 14px !important;
    font-size: 14px;
    font-weight: 850;
    box-shadow: 0 14px 28px rgba(79,70,229,0.22);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

    .auth-card .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 34px rgba(79,70,229,0.28);
    }

    .auth-card .btn-primary:disabled {
        transform: none;
        opacity: .75;
        cursor: not-allowed;
    }

.auth-bottom-link {
    margin-top: 2px;
    text-align: center;
}

.auth-card a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

    .auth-card a:hover {
        color: var(--primary-hover);
        text-decoration: none;
    }

.auth-alert {
    margin-bottom: 20px;
}

.auth-card .alert {
    border-radius: 16px;
    border: none;
    font-size: 13px;
    font-weight: 700;
}

/* =========================
   PASSWORD TOGGLE
========================= */

.password-toggle {
    position: absolute;
    right: 14px;
    top: 39px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

    .password-toggle:hover {
        background: #f1f5f9;
        color: var(--primary);
    }

/* =========================
   AUTH STATE PAGES
========================= */

.auth-state-card {
    max-width: 460px;
}

.auth-state-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.auth-state-icon-danger {
    background: rgba(239,68,68,0.10);
    color: #dc2626;
    box-shadow: 0 18px 34px rgba(239,68,68,0.14);
}

.auth-state-actions {
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1199.98px) {
    .auth-shell {
        grid-template-columns: minmax(420px, 46%) 1fr;
    }

    .auth-brand-panel {
        padding: 56px;
    }

    .auth-brand-title {
        font-size: clamp(34px, 3.7vw, 50px);
    }
}

@media (max-width: 991.98px) {
    .auth-shell {
        display: block;
        min-height: 100vh;
    }

    .auth-brand-panel {
        display: none !important;
    }

    .auth-main-panel {
        min-height: 100vh;
        padding: 92px 20px 40px;
        border-left: none;
    }

    .auth-card {
        max-width: 430px;
    }

    .auth-mobile-brand .auth-brand-logo {
        background: linear-gradient(135deg, var(--primary), #4338ca);
        border-color: transparent;
        box-shadow: 0 10px 22px rgba(79,70,229,0.20);
    }
}

@media (max-width: 575.98px) {
    .auth-main-panel {
        padding-left: 16px;
        padding-right: 16px;
    }

    .auth-card {
        padding: 26px 22px;
        border-radius: 24px;
    }

        .auth-card h2 {
            font-size: 24px;
        }

    .auth-form-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}