:root {
    --auth-ink: #172033;
    --auth-muted: #64748b;
    --auth-line: #e2e8f0;
    --auth-soft: #f8fafc;
    --auth-primary: #7c3aed;
    --auth-primary-dark: #6d28d9;
    --auth-success: #059669;
}

* {
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 18%, rgba(124, 58, 237, 0.14), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(14, 165, 233, 0.12), transparent 26%),
        linear-gradient(135deg, #f8fafc 0%, #eef2ff 48%, #f8fafc 100%);
    color: var(--auth-ink);
}

.auth-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 520px);
    align-items: center;
    gap: 32px;
    padding: 32px 0;
}

.auth-panel {
    min-height: 620px;
    border-radius: 28px;
    padding: 36px;
    background: linear-gradient(160deg, #111827 0%, #1f2937 54%, #312e81 100%);
    color: #fff;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.auth-panel::after {
    content: "";
    position: absolute;
    inset: auto -120px -140px auto;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-brand,
.auth-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-brand img,
.auth-mobile-brand img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    object-fit: cover;
}

.auth-panel-copy {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-panel h1 {
    margin: 22px 0 16px;
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: 1.02;
    font-weight: 900;
}

.auth-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    line-height: 1.75;
}

.auth-panel-points {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
}

.auth-panel-points div {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.88);
    font-weight: 650;
}

.auth-panel-points i {
    color: #c4b5fd;
}

.auth-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    padding: clamp(24px, 4vw, 42px);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(14px);
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 24px;
}

.auth-card h2 {
    margin: 0 0 8px;
    font-size: 1.85rem;
    font-weight: 850;
    color: var(--auth-ink);
}

.auth-card .subtitle {
    color: var(--auth-muted);
    font-size: 0.96rem;
    margin-bottom: 28px;
}

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

.form-label {
    font-weight: 700;
    color: #334155;
    font-size: 0.86rem;
    margin-bottom: 8px;
}

.input-group {
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.input-group-text {
    background: var(--auth-soft);
    border: 1px solid var(--auth-line);
    border-right: 0;
    border-radius: 14px 0 0 14px;
    color: #94a3b8;
    min-width: 46px;
    justify-content: center;
}

.form-control {
    border-radius: 14px;
    padding: 0.82rem 0.95rem;
    border: 1px solid var(--auth-line);
    color: var(--auth-ink);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-group .form-control {
    border-left: 0;
    border-radius: 0 14px 14px 0;
}

.form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.input-group:focus-within .input-group-text {
    border-color: var(--auth-primary);
    color: var(--auth-primary);
    background: #fff;
}

.form-text {
    color: var(--auth-muted);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.btn-primary {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
    border-radius: 14px;
    padding: 0.86rem 1rem;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--auth-primary-dark);
    border-color: var(--auth-primary-dark);
}

.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 750;
}

.auth-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: #94a3b8;
    font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--auth-line);
}

.alert {
    border-radius: 14px;
}

.auth-duplicate-card {
    border-radius: 18px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 18px;
}

.btn.btn-loading {
    pointer-events: none;
    opacity: 0.75;
}

.auth-magic-link-icon {
    color: var(--auth-primary);
}

@media (max-width: 900px) {
    .auth-shell {
        display: block;
        width: min(540px, calc(100% - 24px));
        padding: 22px 0;
    }

    .auth-panel {
        display: none;
    }

    .auth-mobile-brand {
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .auth-card {
        border-radius: 18px;
        padding: 22px;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }
}
