/* ========================================
   LOGIN PAGE STYLES
   ======================================== */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --accent: #f59e0b;
    --success: #10b981;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.login-page .footer {
    position: absolute;
    bottom: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-align: center;
    z-index: 100;
}

/* Animated Background Shapes */
body.login-page::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -400px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

body.login-page::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -300px;
    left: -150px;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Login Container - More Compact */
.login-wrapper {
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 840px;
    width: 100%;
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s ease-out;
}

/* ... existing keyframes ... */

/* Left Side - Brand/Illustration */
.login-brand {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1.5rem 2rem;
    /* Reduced padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
}

.login-brand::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    z-index: 0;
}

.brand-logo {
    width: 80px;
    /* Slightly smaller for more compact feel */
    height: auto;
    margin-bottom: 1.5rem;
    /* 3D Effect for Logo: White appearance + 3D perspective shadow */
    filter: brightness(0) invert(1) drop-shadow(0 15px 15px rgba(0, 0, 0, 0.3));
    transform: perspective(500px) rotateX(10deg);
    animation: pulse3d 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes pulse3d {

    0%,
    100% {
        transform: perspective(500px) rotateX(5deg) translateY(0);
        filter: brightness(0) invert(1) drop-shadow(0 10px 10px rgba(0, 0, 0, 0.2));
    }

    50% {
        transform: perspective(500px) rotateX(15deg) translateY(-8px);
        filter: brightness(0) invert(1) drop-shadow(0 25px 25px rgba(0, 0, 0, 0.4));
    }
}

.brand-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.app-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.glow-text {
    font-size: 2.2rem;
    /* Reduced from 3.5rem */
    font-weight: 900;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.divider {
    width: 40px;
    height: 3px;
    background: var(--accent);
    margin: 15px 0;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.brand-content .description {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    line-height: 1.4;
    margin-bottom: 20px;
    max-width: 280px;
}

.kanwil-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
    transition: all 0.3s ease;
}

.kanwil-badge:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.kanwil-badge i {
    font-size: 1.2rem;
    color: var(--accent);
}

.kanwil-badge span {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    color: rgba(255, 255, 255, 0.9);
}

.brand-features {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    /* Reduced gap */
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    /* Reduced from 0.9rem */
    opacity: 0.9;
}

.feature-item i {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

/* Right Side - Login Form */
.login-form-container {
    flex: 1;
    padding: 2rem 2.5rem;
    /* Reduced padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 1.5rem;
    /* Reduced from 2.5rem */
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-page .form-group {
    margin-bottom: 1.5rem;
}

.login-page .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.login-page .form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.login-page .form-control:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
    outline: none;
}

.login-page .form-control::placeholder {
    color: #cbd5e1;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-page .footer {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    text-align: center;
    z-index: 100;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive Design Enhanced */
@media (max-width: 992px) {
    .login-wrapper {
        max-width: 760px;
    }

    .glow-text {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    body.login-page {
        padding: 1rem;
        justify-content: flex-start;
    }

    .login-wrapper {
        flex-direction: column;
        max-width: 480px;
        border-radius: 20px;
        margin-top: 2rem;
    }

    .login-brand {
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    .brand-logo {
        width: 70px;
        margin-bottom: 1rem;
    }

    .glow-text {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .divider {
        margin: 12px 0;
    }

    .brand-content .description {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    .brand-features {
        display: none;
        /* Hide features on small mobile */
    }

    .kanwil-badge {
        padding: 8px 15px;
        margin-top: 5px;
    }

    .kanwil-badge span {
        font-size: 0.75rem;
    }

    .login-form-container {
        padding: 2rem 1.5rem;
    }

    .form-header {
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .login-page .footer {
        position: relative;
        bottom: auto;
        margin-top: 2rem;
        padding-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .glow-text {
        font-size: 1.5rem;
    }

    .login-wrapper {
        margin-top: 1rem;
    }
}