/**
 * Employee Login Styles
 * Modern, responsive design for employee login forms
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Base styles */
.employee-login-wrapper {
    font-family: 'Inter', sans-serif;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.employee-login-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
}

.employee-login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
}

/* Title */
.employee-login-title {
    text-align: center;
    color: #2d3748;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    position: relative;
}

.employee-login-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Messages */
.employee-login-messages {
    margin-bottom: 20px;
}

.employee-login-messages .message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.employee-login-messages .message i {
    margin-right: 8px;
}

.employee-login-messages .error {
    background: #fed7d7;
    color: #c53030;
    border-left: 4px solid #e53e3e;
}

.employee-login-messages .success {
    background: #c6f6d5;
    color: #2f855a;
    border-left: 4px solid #38a169;
}

.employee-login-messages .info {
    background: #bee3f8;
    color: #2b6cb0;
    border-left: 4px solid #3182ce;
}

/* Form styles */
.employee-login-form .form-group {
    margin-bottom: 20px;
}

.employee-login-form label {
    display: block;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 16px;
    transition: color 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f7fafc;
    box-sizing: border-box;
}

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

.form-control:focus + i {
    color: #667eea;
}

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

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    position: relative;
}

.checkbox-wrapper input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-wrapper input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Login button */
.btn-employee-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

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

.btn-employee-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-employee-login:hover::before {
    left: 100%;
}

/* Loading spinner */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

.loading-spinner.active {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Register link */
.register-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.register-link a {
    color: #718096;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

/* Logged in content */
.employee-logged-in {
    text-align: center;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.welcome-message {
    margin-bottom: 25px;
}

.welcome-message i {
    font-size: 48px;
    color: #38a169;
    margin-bottom: 15px;
}

.welcome-message h4 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.welcome-message p {
    color: #718096;
    font-size: 14px;
}

.employee-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

/* Style variations */

/* Compact style */
.employee-login-wrapper[data-style="compact"] .employee-login-container {
    padding: 25px 20px;
}

.employee-login-wrapper[data-style="compact"] .employee-login-title {
    font-size: 20px;
    margin-bottom: 20px;
}

.employee-login-wrapper[data-style="compact"] .form-control {
    padding: 12px 12px 12px 40px;
}

.employee-login-wrapper[data-style="compact"] .btn-employee-login {
    padding: 12px;
    font-size: 14px;
}

/* Minimal style */
.employee-login-wrapper[data-style="minimal"] .employee-login-container {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.employee-login-wrapper[data-style="minimal"] .employee-login-container::before {
    display: none;
}

.employee-login-wrapper[data-style="minimal"] .employee-login-title::after {
    display: none;
}

.employee-login-wrapper[data-style="minimal"] .form-control {
    background: #ffffff;
    border: 1px solid #d1d5db;
}

.employee-login-wrapper[data-style="minimal"] .btn-employee-login {
    background: #4f46e5;
}

.employee-login-wrapper[data-style="minimal"] .btn-employee-login:hover {
    background: #4338ca;
}

/* Responsive design */
@media (max-width: 480px) {
    .employee-login-wrapper {
        padding: 10px;
    }
    
    .employee-login-container {
        padding: 30px 20px;
    }
    
    .employee-login-title {
        font-size: 20px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .employee-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .employee-login-container {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .employee-login-title {
        color: #f7fafc;
    }
    
    .employee-login-form label {
        color: #cbd5e0;
    }
    
    .form-control {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .form-control:focus {
        background: #2d3748;
        border-color: #667eea;
    }
    
    .checkbox-wrapper {
        color: #cbd5e0;
    }
    
    .checkmark {
        border-color: #4a5568;
    }
    
    .employee-logged-in {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .welcome-message h4 {
        color: #f7fafc;
    }
    
    .btn-secondary {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .btn-secondary:hover {
        background: #2d3748;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.shake {
    animation: shake 0.5s ease-in-out;
}

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

/* Focus indicators for accessibility */
.form-control:focus,
.btn-employee-login:focus,
.checkbox-wrapper:focus-within,
.forgot-password:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .employee-login-container {
        border: 2px solid #000;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .btn-employee-login {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .btn-employee-login:hover {
        transform: none;
    }
}