/* ===== ROOT VARIABLES ===== */
:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --accent: #0f3460;
    --accent-glow: #e94560;
    --accent-glow-soft: rgba(233, 69, 96, 0.15);
    --surface: #ffffff;
    --surface-hover: #f8f9fc;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-light: #adb5bd;
    --border: #e2e8f0;
    --border-focus: #e94560;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    min-height: 100vh;
    overflow: hidden;
}

/* ===== ANIMATED BACKGROUND ===== */
.login-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.bg-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(233, 69, 96, 0.08);
    animation: floatParticle 20s infinite ease-in-out;
}

.particle:nth-child(1) { width: 300px; height: 300px; top: -50px;  left: -80px;  animation-delay: 0s;    }
.particle:nth-child(2) { width: 200px; height: 200px; top: 40%;   right: -60px; animation-delay: -4s;   }
.particle:nth-child(3) { width: 150px; height: 150px; bottom: 10%; left: 20%;    animation-delay: -8s;   }
.particle:nth-child(4) { width: 250px; height: 250px; top: 20%;   left: 40%;    animation-delay: -12s;  }
.particle:nth-child(5) { width: 100px; height: 100px; bottom: 30%; right: 25%;   animation-delay: -6s;   }
.particle:nth-child(6) { width: 180px; height: 180px; top: 60%;   left: 10%;    animation-delay: -16s;  }

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0) scale(1);     opacity: 0.4; }
    25%      { transform: translate(40px, -40px) scale(1.1); opacity: 0.6; }
    50%      { transform: translate(-30px, 50px) scale(0.9); opacity: 0.3; }
    75%      { transform: translate(50px, 20px) scale(1.05); opacity: 0.5; }
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 960px;
    max-width: 100%;
    min-height: 580px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1);       }
}

/* ===== LEFT BRAND PANEL ===== */
.login-brand {
    flex: 0 0 400px;
    background: linear-gradient(160deg, var(--primary) 0%, var(--accent) 60%, #0a1628 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(233, 69, 96, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(15, 52, 96, 0.2)  0%, transparent 50%);
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

/* ===== BRAND LOGO WITH GLOW PULSE ===== */
.brand-logo {
    width: 270px;
    height: 140px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    padding: 16px;
    position: relative;
    animation: logoPulse 3s ease-in-out infinite;
}

.brand-logo::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.4), rgba(233, 69, 96, 0), rgba(233, 69, 96, 0.2));
    opacity: 0;
    animation: glowFlicker 3s ease-in-out infinite;
    z-index: -1;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.1) drop-shadow(0 0 6px rgba(233, 69, 96, 0.3));
    transition: var(--transition);
}

.brand-logo:hover img {
    filter: brightness(1.2) drop-shadow(0 0 12px rgba(233, 69, 96, 0.5));
    transform: scale(1.05);
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.3);  }
    50%      { box-shadow: 0 0 0 14px rgba(233, 69, 96, 0);   }
}

@keyframes glowFlicker {
    0%, 100% { opacity: 0;   }
    30%      { opacity: 0.8; }
    50%      { opacity: 0.3; }
    70%      { opacity: 1;   }
    90%      { opacity: 0.5; }
}

.brand-content h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.brand-content > p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 48px;
    letter-spacing: 3px;
    text-align: center;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(6px);
}

.feature-item i {
    font-size: 16px;
    color: #f9561e;
    width: 20px;
    text-align: center;
}

/* ===== RIGHT FORM PANEL ===== */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 48px;
}

.login-form-content {
    width: 100%;
    max-width: 380px;
}

.form-header {
    margin-bottom: 36px;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* ===== VALIDATION ALERT ===== */
.validation-alert {
    font-size: 13px;
    border: none;
    border-radius: var(--radius);
    padding: 12px 16px;
    background: #fff5f5;
    color: #c53030;
    margin-bottom: 20px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0);   }
    20%      { transform: translateX(-8px); }
    40%      { transform: translateX(8px);  }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px);  }
}

/* ===== FLOATING INPUT GROUPS ===== */
.form-floating-group {
    margin-bottom: 22px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 15px;
    transition: var(--transition);
    z-index: 2;
    pointer-events: none;
}

.form-input {
    width: 100%;
    height: 54px;
    padding: 16px 48px 6px 46px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
}

.form-input:hover {
    border-color: #cbd5e0;
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow-soft);
}

.form-input:focus ~ .input-icon,
.form-input:not(:placeholder-shown) ~ .input-icon {
    color: var(--accent-glow);
}

/* Floating label */
.floating-label {
    position: absolute;
    left: 46px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--text-light);
    pointer-events: none;
    transition: var(--transition);
}

.form-input:focus ~ .floating-label,
.form-input:not(:placeholder-shown) ~ .floating-label {
    top: 6px;
    transform: translateY(0);
    font-size: 11px;
    font-weight: 600;
    color: #f9561e;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 6px;
    font-size: 15px;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--accent-glow);
}

/* Validation text */
.field-validation-text {
    display: block;
    font-size: 12px;
    color: #e53e3e;
    margin-top: 6px;
    padding-left: 4px;
}

/* ===== FORM OPTIONS ===== */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

/* Custom checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.custom-checkbox input:checked ~ .checkmark {
    background: var(--accent-glow);
    border-color: var(--accent-glow);
}

.custom-checkbox input:checked ~ .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: #fff;
}

/* ===== LOGIN BUTTON ===== */
.btn-login {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: var(--radius);
    background-color :#f9561e;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.15) 100%);
    opacity: 0;
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.35);
}

.btn-login:hover::before {
    opacity: 1;
}

.btn-login:active {
    transform: translateY(0);
}

.btn-loader i {
    font-size: 18px;
}

/* ===== FOOTER ===== */
.login-footer {
    text-align: center;
    margin-top: 32px;
}

.login-footer p {
    font-size: 12px;
    color: var(--text-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .login-brand {
        display: none;
    }

    .login-container {
        max-width: 440px;
        min-height: auto;
    }

    .login-form-panel {
        padding: 40px 28px;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 12px;
    }

    .login-form-panel {
        padding: 32px 20px;
    }

    .form-header h2 {
        font-size: 24px;
    }
}