/* Management Login Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.login-header h1 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.login-header p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.4;
}

.error-message {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-icon {
    font-size: 16px;
}

.login-form {
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.checkbox-group {
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
    margin-bottom: 10px;
}

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

.checkmark {
    width: 35px !important;
    height: 35px !important;
    border: 4px solid #ddd !important;
    border-radius: 10px !important;
    margin-right: 18px !important;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: white !important;
    display: inline-block;
    box-sizing: border-box;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border-color: #667eea !important;
}

.checkbox-label:hover .checkmark {
    border-color: #667eea !important;
    transform: scale(1.05);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    line-height: 1;
    text-shadow: 0 0 3px rgba(0,0,0,0.3);
    z-index: 10;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

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

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer p {
    color: #7f8c8d;
    font-size: 12px;
    margin-bottom: 8px;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    color: #2980b9 !important;
    font-size: 11px !important;
}

.lock-icon {
    font-size: 12px;
}

/* Checkbox styling with high specificity */
.login-container .login-box .checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border-color: #667eea !important;
}

.login-container .login-box .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✔' !important;
    position: absolute !important;
    left: 6px !important;
    top: 0px !important;
    transform: none !important;
    color: white !important;
    font-size: 24px !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
    z-index: 10 !important;
    display: block !important;
    font-family: 'Segoe UI', Arial, sans-serif !important;
}
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="password"] {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Dark mode media query */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(45, 55, 72, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .login-header h1 {
        color: #e2e8f0;
    }
    
    .login-header p {
        color: #a0aec0;
    }
    
    .form-group label {
        color: #e2e8f0;
    }
    
    .form-group input[type="text"],
    .form-group input[type="password"] {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e2e8f0;
    }
    
    .form-group input[type="text"]::placeholder,
    .form-group input[type="password"]::placeholder {
        color: #a0aec0;
    }
    
    .checkbox-label {
        color: #e2e8f0;
    }
    
    .checkmark {
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .login-footer p {
        color: #a0aec0;
    }
}

/* Focus indicators for accessibility */
.login-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.checkbox-label:focus-within .checkmark {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}
