/* Login page — split hero + form panel */

.auth-body {
    min-height: 100vh;
    display: block;
    background: var(--bg-deep);
    overflow-x: hidden;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    animation: authFadeIn 0.6s ease-out;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero panel */
.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem clamp(2rem, 5vw, 4rem);
    background:
        linear-gradient(145deg, #0a1628 0%, #0f2744 42%, #122d4a 100%);
    border-left: 1px solid rgba(245, 158, 11, 0.12);
    overflow: hidden;
}

.auth-hero-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.18) 0%, transparent 42%),
        radial-gradient(circle at 85% 75%, rgba(37, 99, 235, 0.12) 0%, transparent 40%),
        repeating-linear-gradient(
            -12deg,
            transparent,
            transparent 48px,
            rgba(255, 255, 255, 0.015) 48px,
            rgba(255, 255, 255, 0.015) 49px
        );
    pointer-events: none;
}

.auth-hero-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(245, 158, 11, 0.15);
    pointer-events: none;
}

.auth-hero-ring--1 {
    width: min(520px, 80vw);
    height: min(520px, 80vw);
    top: -18%;
    left: -12%;
    animation: authRingSpin 48s linear infinite;
}

.auth-hero-ring--2 {
    width: min(360px, 60vw);
    height: min(360px, 60vw);
    bottom: -10%;
    right: -8%;
    border-color: rgba(255, 255, 255, 0.06);
    animation: authRingSpin 36s linear infinite reverse;
}

@keyframes authRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-hero-content {
    position: relative;
    z-index: 1;
    max-width: 28rem;
}

.auth-hero .brand-logo-img--auth {
    max-width: min(200px, 55vw);
    margin: 0 0 1.25rem;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.auth-hero-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #fde68a 55%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-hero-lead {
    margin: 0 0 2rem;
    color: rgba(232, 237, 244, 0.78);
    font-size: 0.95rem;
    line-height: 1.75;
    font-weight: 400;
}

.auth-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: rgba(232, 237, 244, 0.9);
}

.auth-feature-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--accent);
}

.auth-feature-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.auth-hero-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 2.5rem;
    font-size: 0.75rem;
    color: rgba(139, 156, 179, 0.7);
}

/* Form panel */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    background:
        radial-gradient(ellipse at 70% 30%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
        var(--bg-deep);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: 0;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    background: rgba(20, 29, 40, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    backdrop-filter: blur(12px);
}

.auth-card-header {
    margin-bottom: 1.75rem;
}

.auth-card-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-card-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.auth-field {
    margin-bottom: 1.15rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    right: 0.9rem;
    width: 1.15rem;
    height: 1.15rem;
    color: #6d7f96;
    pointer-events: none;
    z-index: 1;
}

.auth-input-icon svg {
    width: 100%;
    height: 100%;
}

.auth-input {
    padding: 0.75rem 2.75rem 0.75rem 1rem !important;
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    background: rgba(26, 37, 51, 0.8) !important;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input:focus {
    border-color: rgba(245, 158, 11, 0.55) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
    background: var(--bg-elevated) !important;
}

.auth-password-toggle {
    position: absolute;
    left: 0.65rem;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.auth-password-toggle:hover {
    color: var(--accent);
    background: rgba(245, 158, 11, 0.08);
}

.auth-password-toggle svg {
    width: 1.1rem;
    height: 1.1rem;
}

.auth-options {
    margin-bottom: 1.35rem;
}

.auth-check .form-check-input {
    background-color: var(--bg-elevated);
    border-color: var(--border);
}

.auth-check .form-check-input:checked {
    background-color: var(--accent-dim);
    border-color: var(--accent-dim);
}

.auth-check .form-check-label {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.btn-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1208;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 45%, #ea580c 100%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.btn-auth-submit:hover {
    color: #1a1208;
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.45);
    filter: brightness(1.05);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.btn-auth-submit svg {
    width: 1.15rem;
    height: 1.15rem;
}

.auth-alert--error:empty {
    display: none !important;
}

.auth-alert--error {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.auth-demo-card {
    margin-top: 1.5rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(26, 37, 51, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-demo-card summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    list-style: none;
    user-select: none;
}

.auth-demo-card summary::-webkit-details-marker {
    display: none;
}

.auth-demo-card summary::before {
    content: "◂ ";
    display: inline-block;
    transition: transform 0.2s;
    color: var(--accent);
}

.auth-demo-card[open] summary::before {
    transform: rotate(-90deg);
}

.auth-demo-card ul {
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
}

.auth-demo-card li {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-demo-card li:last-child {
    border-bottom: none;
}

.auth-demo-pass {
    margin: 0.5rem 0 0;
}

/* Mobile: stack hero on top */
@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .auth-hero {
        min-height: auto;
        padding: 2rem 1.5rem 1.75rem;
        border-left: none;
        border-bottom: 1px solid rgba(245, 158, 11, 0.1);
    }

    .auth-hero-content {
        max-width: none;
        text-align: center;
    }

    .auth-hero .brand-logo-img--auth {
        margin: 0 auto 1rem;
    }

    .auth-feature-list {
        display: none;
    }

    .auth-hero-footer {
        display: none;
    }

    .auth-hero-ring {
        opacity: 0.5;
    }

    .auth-panel {
        padding: 1.5rem 1.25rem 2rem;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }
}
