/* ========================================
   LOGIN PAGE STYLES
   ======================================== */

.login-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    overflow-x: hidden;
}

.login-content {
    background: linear-gradient(180deg, #1a1f2e 0%, #252d3d 100%);
    margin: 8% auto;
    padding: 0;
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 1px rgba(59, 130, 246, 0.3);
    overflow: hidden;
    text-align: center;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.login-header {
    background: linear-gradient(135deg, #1e2838 0%, #2a3547 100%);
    color: white;
    padding: 50px 40px 40px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.login-header h2 {
    color: white;
    margin-bottom: 12px;
    font-size: 2.2em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-header p {
    opacity: 0.9;
    font-size: 1em;
    color: #9ca3af;
    font-weight: 400;
}

.login-body {
    padding: 50px 40px;
}

.login-form {
    width: 100%;
    margin: 0 auto;
}

.login-form .form-group {
    margin-bottom: 24px;
    text-align: left;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #e4e7eb;
    font-size: 0.9em;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.login-form input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1em;
    background: rgba(37, 45, 61, 0.6);
    color: #e4e7eb;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.login-form input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(37, 45, 61, 0.9);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.login-form input::placeholder {
    color: #6b7280;
    font-size: 0.95em;
}

.login-error {
    display: none;
    margin-top: 20px;
    padding: 14px 18px;
    background: rgba(45, 31, 31, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.5);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 0.9em;
    backdrop-filter: blur(10px);
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 35px 0;
    color: #6b7280;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(61, 74, 92, 0.5);
}

.login-divider span {
    padding: 0 20px;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-login {
    width: 100%;
    padding: 16px 35px;
    font-size: 1em;
    font-weight: 600;
    margin: 0 auto;
    display: block;
    border-radius: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.login-form .btn-login {
    margin-top: 8px;
}

/* ========================================
   RESPONSIVE DESIGN FOR LOGIN
   ======================================== */

/* Prevent iOS zoom on inputs */
input[type="text"],
input[type="password"],
input[type="email"] {
    font-size: 16px !important;
}

/* Tablet and below (768px and down) */
@media screen and (max-width: 768px) {
    .login-content {
        width: 95%;
        margin: 5% auto;
        border-radius: 16px;
    }
    
    .login-header {
        padding: 35px 25px 30px;
    }
    
    .login-header h2 {
        font-size: 1.8em;
    }
    
    .login-header p {
        font-size: 0.95em;
    }
    
    .login-body {
        padding: 35px 25px;
    }
    
    .login-form .form-group {
        margin-bottom: 20px;
    }
    
    .login-form input {
        padding: 14px 16px;
    }
    
    .btn-login {
        padding: 14px 30px;
    }
    
    .login-divider {
        margin: 30px 0;
    }
}

/* Mobile (480px and down) */
@media screen and (max-width: 480px) {
    .login-modal {
        padding: 0;
    }
    
    .login-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .login-header {
        padding: 30px 20px 25px;
    }
    
    .login-header h2 {
        font-size: 1.6em;
        margin-bottom: 10px;
    }
    
    .login-header p {
        font-size: 0.9em;
    }
    
    .login-body {
        padding: 30px 20px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .login-form .form-group {
        margin-bottom: 18px;
    }
    
    .login-form .form-group label {
        font-size: 0.85em;
        margin-bottom: 8px;
    }
    
    .login-form input {
        padding: 14px 15px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    .btn-login {
        padding: 14px 25px;
        font-size: 0.95em;
        border-radius: 10px;
    }
    
    .login-error {
        padding: 12px 15px;
        font-size: 0.85em;
        margin-top: 15px;
    }
    
    .login-divider {
        margin: 25px 0;
    }
    
    .login-divider span {
        padding: 0 15px;
        font-size: 0.8em;
    }
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .login-form input {
        min-height: 52px;
        padding: 16px;
    }
    
    .btn-login {
        min-height: 52px;
        padding: 16px;
    }
    
    .login-form input:focus {
        border-width: 2px;
    }
}

/* Landscape mobile */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .login-content {
        margin: 2% auto;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .login-header {
        padding: 25px 30px 20px;
    }
    
    .login-header h2 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }
    
    .login-header p {
        font-size: 0.85em;
    }
    
    .login-body {
        padding: 25px 30px;
    }
    
    .login-form .form-group {
        margin-bottom: 15px;
    }
    
    .login-divider {
        margin: 20px 0;
    }
}

/* Large tablets (769px to 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .login-content {
        max-width: 520px;
    }
}

/* Desktop (1025px and up) */
@media screen and (min-width: 1025px) {
    .login-content {
        margin: 8% auto;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .login-header::before {
        animation: none;
    }
    
    .login-form input,
    .btn-login {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .login-content {
        border: 2px solid #3b82f6;
    }
    
    .login-form input {
        border: 2px solid #3d4a5c;
    }
    
    .login-form input:focus {
        border: 2px solid #3b82f6;
    }
}
