/* TekHR Authentication Pages Styles */

:root {
    --primary-color: #008ECC;
    --secondary-color: #0056b3;
    --accent-color: #00d4ff;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e9ecef;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    overflow-x: hidden;
}

/* Loader - Unified with Landing Page */
.auth-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.5s ease-out;
}

.auth-loader.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.auth-loader-content {
    text-align: center;
    color: white;
}

.loader-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.auth-loader h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

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

.auth-container {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    animation: authSlideIn 0.8s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.auth-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 50px 40px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    animation: authSlide 20s linear infinite;
    z-index: 1;
}

@keyframes authSlide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50px); }
}

.auth-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    animation: slide 20s linear infinite;
}

@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50px); }
}

.auth-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    animation: authFloat 4s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@keyframes authFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.auth-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.auth-body {
    padding: 40px 30px;
}

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

/* Password Input Group */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group .form-control {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: rgba(0, 142, 204, 0.1);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 142, 204, 0.2);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 18px 22px;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-color);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    font-weight: 500;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 142, 204, 0.1);
    transform: translateY(-2px);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    width: 100%;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 142, 204, 0.25);
    border: none;
    border-radius: 15px;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 142, 204, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.forgot-password {
    text-align: center;
    margin: 20px 0;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--accent-color);
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--accent-color);
}



/* Back to Landing Button */
.back-to-landing {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-to-landing a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-to-landing a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .auth-header {
        padding: 30px 20px;
    }
    
    .auth-body {
        padding: 30px 20px;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

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

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

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

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

/* Loading State */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Success/Error Messages */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 10px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-weak {
    background: var(--danger-color);
    width: 25%;
}

.password-strength-medium {
    background: var(--warning-color);
    width: 50%;
}

.password-strength-strong {
    background: var(--success-color);
    width: 100%;
} 