/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.5s ease-out;
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D4AF37, #FFD700);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    justify-content: center;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c00;
}

.alert-success {
    background-color: #e8f7ee;
    border: 1px solid #b1e8c3;
    color: #0a6b3a;
}

.alert i {
    font-size: 1.1rem;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #444;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #D4AF37;
    width: 16px;
}

.form-group input {
    padding: 14px;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #D4AF37;
    background: white;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    font-size: 1.1rem;
}

.toggle-password:hover {
    color: #D4AF37;
}

/* Password Strength */
.password-strength {
    margin-top: 5px;
}

.strength-meter {
    height: 4px;
    background: #e1e5eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background: #ff4757;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-text {
    color: #666;
    font-size: 0.8rem;
}

.strength-text span {
    font-weight: 600;
}

/* Terms Checkbox */
.terms-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.terms-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #D4AF37;
}

.terms-group label {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.terms-link {
    color: #D4AF37;
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #D4AF37;
}

.forgot-password {
    color: #D4AF37;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Button */
.btn-auth {
    background: linear-gradient(135deg, #D4AF37, #C19A6B);
    color: white;
    border: none;
    padding: 16px;
    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: 10px;
    margin-top: 10px;
}

.btn-auth:hover {
    background: linear-gradient(135deg, #C19A6B, #D4AF37);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-auth:active {
    transform: translateY(0);
}

/* Auth Footer */
.auth-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e5eb;
    text-align: center;
}

.auth-footer p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.auth-link {
    color: #D4AF37;
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

.note {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.85rem;
    border-left: 3px solid #D4AF37;
}

.note i {
    margin-right: 8px;
}

/* Role Info */
.role-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.role-info p {
    margin-bottom: 10px;
    font-weight: 500;
}

.role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.role-tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-tag.super-admin {
    background: rgba(212, 175, 55, 0.1);
    color: #D4AF37;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.role-tag.admin {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.3);
}

.role-tag.accountant {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.role-tag.hr {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
    border: 1px solid rgba(111, 66, 193, 0.3);
}

.role-tag.legal {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Form Text */
.form-text {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 30px 25px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .form-group input {
        padding: 12px;
    }
    
    .btn-auth {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 20px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
}