@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
    --auth-bg: #f3f5f9;
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-line: #e2e8f0;
    --auth-accent: #1d4ed8;
    --auth-accent-2: #1e3a8a;
    --auth-card: #ffffff;
    --auth-radius: 1.25rem;
    --auth-pad: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--auth-ink);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(900px 420px at 0% 0%, #dbeafe 0%, transparent 55%),
        radial-gradient(700px 360px at 100% 10%, #e0e7ff 0%, transparent 50%),
        var(--auth-bg);
}

.auth-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.85rem max(0.85rem, env(safe-area-inset-bottom));
}

.auth-shell {
    width: 100%;
    max-width: 980px;
    margin: auto;
    display: grid;
    gap: 0.85rem;
}

.auth-aside {
    display: none;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    background: var(--auth-card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--auth-radius);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    padding: var(--auth-pad);
}

.auth-brand {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 0.85rem;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
    color: var(--auth-accent);
    font-size: 1.2rem;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--auth-accent);
    margin-bottom: 0.35rem;
}

.auth-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0;
}

.auth-sub {
    color: var(--auth-muted);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
    margin: 0.25rem 0 0;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.4rem;
}

.input-group-text {
    background: #f8fafc;
    border-color: var(--auth-line);
    color: #64748b;
}

.form-control,
.form-check-input {
    border-color: var(--auth-line);
}

.form-control {
    min-height: 2.85rem;
    font-size: 1rem;
    font-weight: 500;
}

.form-control:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.12);
}

.form-text {
    font-size: 0.78rem;
    color: var(--auth-muted);
}

.btn {
    font-weight: 700;
    letter-spacing: -0.01em;
    border-radius: 0.8rem;
}

.btn-primary {
    --bs-btn-bg: var(--auth-accent);
    --bs-btn-border-color: var(--auth-accent);
    --bs-btn-hover-bg: var(--auth-accent-2);
    --bs-btn-hover-border-color: var(--auth-accent-2);
    min-height: 2.9rem;
}

.btn-outline-secondary,
.btn-outline-primary {
    min-height: 2.75rem;
    font-weight: 600;
}

.auth-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-top: 1rem;
}

.auth-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.65rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.8rem;
    border: 1px solid var(--auth-line);
    background: #f8fafc;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.auth-link:hover,
.auth-link:focus {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--auth-accent);
    text-decoration: none;
}

.auth-link-accent {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--auth-accent);
}

.auth-quiet {
    border: 0;
    background: transparent;
    color: #475569;
    font-weight: 600;
    font-size: 0.9rem;
    min-height: 2.5rem;
}

.auth-quiet:hover {
    color: var(--auth-accent);
    background: #f8fafc;
}

.otp-input {
    letter-spacing: 0.42rem;
    font-size: 1.35rem;
    font-weight: 800;
    text-align: center;
}

.auth-alert {
    display: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0.8rem;
}

.panel { display: none; }
.panel.active { display: block; }

.cf-box {
    min-height: 65px;
    overflow: auto;
}

.auth-steps {
    display: grid;
    gap: 0.7rem;
    margin: 1.1rem 0 0;
}

.auth-step {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.auth-step i {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.55rem;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

.auth-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.9rem;
}

.auth-chip {
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
}

.auth-done-icon {
    width: 3.4rem;
    height: 3.4rem;
    margin: 0 auto 0.75rem;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: var(--auth-accent);
    font-size: 1.6rem;
}

.auth-toggle {
    border-color: var(--auth-line);
    background: #fff;
    color: #64748b;
}

.auth-mobile-intro {
    display: block;
    margin: -0.15rem 0 1.1rem;
    padding: 0.85rem 0.9rem;
    border-radius: 0.95rem;
    background: linear-gradient(160deg, #1e3a8a, #2563eb);
    color: #eff6ff;
}

.auth-mobile-intro ol {
    margin: 0.55rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.45;
}

@media (min-width: 768px) {
    .auth-mobile-intro { display: none; }

    .auth-wrap {
        align-items: center;
        padding: 1.5rem;
    }

    .auth-shell {
        grid-template-columns: 1fr 1.05fr;
        background: rgba(255, 255, 255, 0.55);
        border: 1px solid rgba(226, 232, 240, 0.8);
        border-radius: 1.6rem;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
        overflow: hidden;
        backdrop-filter: blur(10px);
    }

    .auth-shell-single {
        grid-template-columns: 1fr;
        max-width: 460px;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .auth-aside {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 2rem 1.75rem;
        color: #e2e8f0;
        background:
            linear-gradient(165deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.05)),
            linear-gradient(160deg, #1e3a8a, #1d4ed8 55%, #2563eb);
    }

    .auth-aside h2 {
        font-size: 1.7rem;
        font-weight: 800;
        letter-spacing: -0.03em;
        color: #fff;
        margin: 0.2rem 0 0.55rem;
    }

    .auth-aside p {
        margin: 0;
        color: #dbeafe;
        font-weight: 500;
        line-height: 1.5;
    }

    .auth-card {
        max-width: none;
        margin: 0;
        border: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 2rem 1.85rem;
    }

    .auth-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 380px) {
    :root { --auth-pad: 1rem; }
    .auth-title { font-size: 1.28rem; }
    .auth-link { font-size: 0.84rem; }
}
