/* ===================================
   LOGIN PAGE STYLES
   Modern, Secure & Beautiful Design
   =================================== */

/* ===== VARIABLES ===== */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-light: rgba(59, 130, 246, 0.15);
    --success-color: #10b981;
    --error-color: #f87171;
    --warning-color: #fbbf24;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --background-primary: #020617;
    --background-secondary: rgba(15, 23, 42, 0.45);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #3b82f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #020617;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* ===== BACKGROUND ANIMATION ===== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: float var(--duration, 20s) infinite alternate ease-in-out;
}

.floating-element:nth-child(1) {
    top: -10%;
    left: -10%;
    width: 450px;
    height: 450px;
    background: rgba(59, 130, 246, 0.35); /* Brand Blue */
}

.floating-element:nth-child(2) {
    bottom: -10%;
    right: -10%;
    width: 550px;
    height: 550px;
    background: rgba(99, 102, 241, 0.3); /* Indigo */
}

.floating-element:nth-child(3) {
    top: 60%;
    left: -20%;
    width: 380px;
    height: 380px;
    background: rgba(147, 51, 234, 0.25); /* Purple */
}

.floating-element:nth-child(4) {
    top: 20%;
    right: 15%;
    width: 320px;
    height: 320px;
    background: rgba(59, 130, 246, 0.2);
}

@keyframes float {
    0% {
        transform: translateY(0px) scale(1) rotate(0deg);
    }
    100% {
        transform: translateY(-40px) scale(1.1) rotate(45deg);
    }
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: var(--background-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== LOGIN HEADER ===== */
.login-header {
    background: transparent;
    padding: 40px 35px 15px;
    text-align: center;
    position: relative;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-lg);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

.logo-container:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.login-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 0.85rem;
    opacity: 0.5;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===== LOGIN FORM ===== */
.login-form-container {
    padding: 15px 35px 40px;
}

.form-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: var(--primary-color);
    font-size: 0.85rem;
    width: 16px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: var(--transition);
    background: rgba(15, 23, 42, 0.6) !important;
    color: #ffffff !important;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
    background: rgba(15, 23, 42, 0.8) !important;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.text-muted, small.text-muted, .form-group small {
    color: #94a3b8 !important;
}

/* Chrome/Safari Autofill Styles Override */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-background-clip: text;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: inset 0 0 20px 20px rgba(15, 23, 42, 0.95) !important;
}

/* Mobile App-Style Optimizations */
@media (max-width: 768px) {
    body {
        padding: 16px;
        background: #020617;
    }
    
    .login-card {
        border-radius: var(--radius-xl);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }
    
    .form-control {
        font-size: 16px;
        padding: 14px;
        border-radius: var(--radius-md);
    }
}

/* ===== PASSWORD INPUT ===== */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ===== FORM OPTIONS ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    position: relative;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.2);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    font-weight: bold;
}

.forgot-password {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: #ffffff;
    text-decoration: none;
}

.footer-link {
    color: var(--text-muted) !important;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.footer-link:hover {
    color: #ffffff !important;
}

.signup-link {
    color: #60a5fa !important;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.signup-link:hover {
    color: #ffffff !important;
}

/* ===== LOGIN BUTTON ===== */
.login-btn {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark), #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert i {
    font-size: 1rem;
}

/* ===== LOGIN FOOTER ===== */
.login-footer {
    background: rgba(0, 0, 0, 0.15);
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }
    
    .login-card {
        border-radius: var(--radius-lg);
    }
    
    .login-header {
        padding: 30px 25px 10px;
    }
    
    .login-form-container {
        padding: 10px 25px 30px;
    }
    
    .login-footer {
        padding: 15px 25px;
    }
}