/**
 * Admin Login Styles
 * Professional and secure admin login interface
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Background Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.particles::before {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.particles::after {
    bottom: 10%;
    right: 10%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Main Container */
.admin-login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 25px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.admin-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.admin-logo i {
    font-size: 1.5rem;
    color: white;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 6px;
}

.login-subtitle {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease-out;
}

.alert i {
    margin-right: 12px;
    font-size: 1.2rem;
}

.alert-error {
    background: #fee;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.alert-success {
    background: #f0fff4;
    color: #38a169;
    border: 1px solid #c6f6d5;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.login-form {
    margin-bottom: 20px;
}

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

.form-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-label i {
    margin-right: 8px;
    color: #667eea;
    width: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #a0aec0;
}

/* Password Container */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #4a5568;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #764ba2;
}

.forgot-link i {
    margin-right: 5px;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

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

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.back-link {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link:hover {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 480px) {
    .admin-login-container {
        margin: 15px;
        padding: 20px;
        max-width: 320px;
    }
    
    .login-title {
        font-size: 1.4rem;
    }
    
    .login-subtitle {
        font-size: 0.85rem;
    }
    
    .admin-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .admin-logo i {
        font-size: 1.2rem;
    }
    
    .form-input {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Security Badge */
.security-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #38a169;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(56, 161, 105, 0.3);
}

/* Focus Styles for Accessibility */
.form-input:focus,
.login-btn:focus,
.password-toggle:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .admin-login-container {
        background: white;
        border: 2px solid #000;
    }
    
    .form-input {
        border-color: #000;
    }
    
    .login-btn {
        background: #000;
    }
}