﻿/* ============================================================
   LOGIN PAGE STYLES
   ============================================================ */

:root {
    --auth-primary: #4f46e5;
    --auth-accent: #7c3aed;
}

/* Theme Fallbacks */
html[data-theme="light"], html:not([data-theme]) {
    --auth-bg: #f1f5f9;
    --auth-card: #ffffff;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
}

html[data-theme="dark"], html[data-theme="cyber"], html[data-theme="coffee"], html[data-theme="arctic"] {
    --auth-bg: #0f172a;
    --auth-card: #1e293b;
    --auth-text: #f8fafc;
    --auth-muted: #94a3b8;
    --auth-border: #334155;
}

html[data-theme="blue"] {
    --auth-bg: #eef4ff;
    --auth-card: #ffffff;
    --auth-text: #0c1e3e;
    --auth-muted: #475569;
    --auth-border: #dbeafe;
}

html[data-theme="purple"] {
    --auth-bg: #faf5ff;
    --auth-card: #ffffff;
    --auth-text: #1e1b4b;
    --auth-muted: #6b21a8;
    --auth-border: #f3e8ff;
}

html[data-theme="green"] {
    --auth-bg: #f0fdf4;
    --auth-card: #ffffff;
    --auth-text: #052e16;
    --auth-muted: #166534;
    --auth-border: #dcfce7;
}

html[data-theme="orange"] {
    --auth-bg: #fff7ed;
    --auth-card: #ffffff;
    --auth-text: #431407;
    --auth-muted: #9a3412;
    --auth-border: #ffedd5;
}

html[data-theme="rose"] {
    --auth-bg: #fff1f2;
    --auth-card: #ffffff;
    --auth-text: #4c0519;
    --auth-muted: #9f1239;
    --auth-border: #ffe4e6;
}

body.auth-body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background-color: var(--auth-bg);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background-color 0.3s ease;
}

/* Main Card Container */
.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 580px;
    background: var(--auth-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--auth-border);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* ============================================================
   LEFT SIDE: Branding Panel
   ============================================================ */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-accent) 100%);
    padding: 50px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

    /* Decorative background circles */
    .login-left::before, .login-left::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        animation: float 8s ease-in-out infinite;
    }

    .login-left::before {
        width: 300px;
        height: 300px;
        top: -100px;
        left: -100px;
    }

    .login-left::after {
        width: 400px;
        height: 400px;
        bottom: -150px;
        right: -100px;
        animation-delay: -4s;
    }

.left-content {
    position: relative;
    z-index: 2;
}

.brand-logo {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    margin-bottom: 32px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.login-left h2 {
    font-weight: 800;
    font-size: 34px;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.login-left p {
    opacity: 0.9;
    font-size: 15px;
    line-height: 1.6;
    max-width: 90%;
}

.left-footer {
    font-size: 12px;
    opacity: 0.7;
}

/* ============================================================
   RIGHT SIDE: Form Panel
   ============================================================ */
.login-right {
    flex: 1.15;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--auth-card);
}

.login-title {
    color: var(--auth-text);
    font-weight: 800;
    font-size: 28px;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: var(--auth-muted);
    font-size: 14.5px;
    margin-bottom: 36px;
}

.form-label {
    color: var(--auth-text);
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}

.form-control {
    border-radius: 10px;
    padding: 14px 16px;
    background: var(--auth-bg);
    border: 1px solid var(--auth-border);
    color: var(--auth-text);
    font-size: 14px;
    transition: all 0.2s ease;
}

    .form-control:focus {
        background: var(--auth-card);
        border-color: var(--auth-primary);
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
        color: var(--auth-text);
    }

    .form-control::placeholder {
        color: var(--auth-muted);
        opacity: 0.5;
    }

.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    border-color: var(--auth-primary);
}

.form-check-label {
    color: var(--auth-muted);
    font-size: 13.5px;
    font-weight: 500;
}

.btn-login {
    background: var(--auth-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-weight: 700;
    font-size: 15px;
    width: 100%;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

    .btn-login:hover {
        background: var(--auth-accent);
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
    }

    .btn-login:active {
        transform: translateY(0);
    }

/* Validation Errors */
.validation-summary-errors ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.validation-summary-errors li {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: shake 0.4s ease-in-out;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 850px) {
    .login-wrapper {
        flex-direction: column;
        min-height: auto;
        max-width: 480px;
    }

    .login-left {
        padding: 40px 30px;
    }

        .login-left h2 {
            font-size: 28px;
        }

    .login-right {
        padding: 40px 30px;
    }

    .login-left::after, .login-left::before {
        display: none;
    }
}
