/* =========================================
   ULTRA-PREMIUM DESIGN TOKENS
   ========================================= */
:root {
    --brand-blue: #2F62E8;
    --brand-blue-hover: #234BBA;
    --bg-canvas: #FAFAFA;
    --surface: #FFFFFF;
    --text-primary: #0A0A0A;
    --text-secondary: #5E5E5E;
    --text-tertiary: #A1A1A1;
    --border-light: rgba(0, 0, 0, 0.08);
    --border-focus: rgba(47, 98, 232, 0.3);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    /* Modern shadow/glow tokens */
    --shadow-button: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    --glow-focus: 0 0 0 4px rgba(47, 98, 232, 0.1);
    /* Animations */
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* =========================================
   SPLIT LAYOUT ARCHITECTURE
   ========================================= */
.auth-canvas {
    min-height: 100vh;
    display: flex;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--surface);
}

/* LEFT PANE: BRANDING & PRESENTATION */
.auth-presentation {
    flex: 1;
    background-color: #0A0A0A; /* Deep premium black */
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 4rem;
}

/* Premium micro-grid background for dark mode */
.auth-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    z-index: 0;
    pointer-events: none;
}

/* Studio lighting effect for left pane */
.auth-spotlight {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle at top left, rgba(47, 98, 232, 0.15) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 10;
    max-width: 480px;
    margin: auto 0;
}

.brand-headline {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #FFFFFF 0%, #A1A1A1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #A1A1A1;
    font-weight: 400;
}

/* RIGHT PANE: LOGIN AREA */
.auth-main {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    position: relative;
    z-index: 10;
    box-shadow: -20px 0 40px rgba(0,0,0,0.05); /* Soft drop shadow over left pane */
}

/* =========================================
   THE LOGIN SURFACE
   ========================================= */
.auth-surface {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    /* Spring animation reveal */
    animation: surfaceReveal 0.8s var(--ease-spring) forwards;
    opacity: 0;
    transform: translateY(16px);
}

.auth-header {
    margin-bottom: 3rem;
}

.auth-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    margin-bottom: 2rem;
    animation: itemReveal 0.8s var(--ease-spring) 0.1s forwards;
    opacity: 0;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    animation: itemReveal 0.8s var(--ease-spring) 0.15s forwards;
    opacity: 0;
}

.auth-subtitle {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text-tertiary);
    animation: itemReveal 0.8s var(--ease-spring) 0.2s forwards;
    opacity: 0;
}

/* =========================================
   REFINED INPUTS
   ========================================= */
.auth-form-group {
    margin-bottom: 1.5rem;
    animation: itemReveal 0.8s var(--ease-spring) 0.25s forwards;
    opacity: 0;
}

    .auth-form-group:nth-of-type(2) {
        animation-delay: 0.3s;
    }

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--text-tertiary);
    font-size: 1.125rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input {
    width: 100%;
    height: 52px;
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0 1rem 0 3rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: all 0.2s var(--ease-out);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

    .auth-input::placeholder {
        color: var(--text-tertiary);
    }

    .auth-input:hover {
        border-color: rgba(0,0,0,0.15);
    }

    .auth-input:focus {
        outline: none;
        border-color: var(--brand-blue);
        box-shadow: var(--glow-focus);
    }

        .auth-input:focus + .auth-input-icon,
        .auth-input-container:focus-within .auth-input-icon {
            color: var(--brand-blue);
        }

/* =========================================
   PREMIUM BUTTON
   ========================================= */
.auth-btn {
    width: 100%;
    height: 52px;
    margin-top: 1rem;
    background: var(--text-primary);
    color: var(--surface);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: var(--shadow-button);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s var(--ease-out);
    animation: itemReveal 0.8s var(--ease-spring) 0.35s forwards;
    opacity: 0;
}

    .auth-btn:hover:not(:disabled) {
        background: #1A1A1A;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .auth-btn:active:not(:disabled) {
        transform: translateY(0);
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    }

    .auth-btn:disabled {
        background: #E5E5E5;
        color: #999;
        box-shadow: none;
        cursor: not-allowed;
    }

/* =========================================
   LINKS & ALERTS
   ========================================= */
.auth-actions {
    margin-top: 2.5rem;
    animation: itemReveal 0.8s var(--ease-spring) 0.4s forwards;
    opacity: 0;
}

.auth-divider {
    height: 1px;
    background: var(--border-light);
    margin: 1.5rem 0;
}

.auth-link {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.auth-link-primary {
    color: var(--brand-blue);
    font-weight: 500;
}

.auth-link:hover {
    color: var(--text-primary);
}

.auth-link-primary:hover {
    color: var(--brand-blue-hover);
}

.auth-alert {
    background: #FEF2F2;
    border-radius: var(--radius-sm);
    padding: 1rem;
    color: #DC2626;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(220, 38, 38, 0.15);
    animation: slideIn 0.3s var(--ease-out);
}

/* =========================================
   FOOTER (MOVED TO LEFT PANE)
   ========================================= */
.auth-footer {
    position: relative;
    z-index: 10;
    animation: fadeIn 1s ease 0.5s forwards;
    opacity: 0;
}

.auth-footer-text {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #444;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 960px) {
    .auth-canvas {
        flex-direction: column;
    }

    .auth-presentation {
        display: none; /* Hide premium presentation on small screens to prioritize login */
    }

    .auth-main {
        max-width: 100%;
        box-shadow: none;
    }

    .auth-surface {
        padding: 2rem;
    }
}

/* =========================================
   KEYFRAMES
   ========================================= */
@keyframes surfaceReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes itemReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
