/* ========================================
   PRODZERO Enterprise - Auth Styles
   Modern & Professional Theme
======================================== */

:root {
    /* Primary Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    /* Secondary Colors */
    --secondary-color: #0ea5e9;
    --accent-color: #f59e0b;

    /* Neutral Colors */
    --dark-color: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --white: #ffffff;

    /* Status Colors */
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Auth Container - Split Layout */
.auth-container {
    display: flex;
    min-height: 100vh;
}

/* Left Side - Branding */
.auth-branding {
    flex: 0 0 45%;
    background: var(--primary-gradient);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: pulse 15s infinite;
}

.auth-branding::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    animation: pulse 20s infinite reverse;
}

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

.branding-content {
    position: relative;
    z-index: 1;
    color: var(--white);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--white);
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.branding-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.branding-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    line-height: 1.7;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    opacity: 0.95;
}

.feature-item i {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.branding-footer {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* Right Side - Form Container */
.auth-form-container {
    flex: 0 0 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background-color: var(--white);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 440px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-form-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-form-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Form Styles */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-floating {
    position: relative;
}

.form-floating > .form-control {
    height: calc(3.5rem + 4px);
    padding: 1.625rem 0.75rem 0.625rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    line-height: 1.25;
    transition: all var(--transition-normal);
    background-color: var(--white);
}

/* Add extra padding for password fields with toggle button */
.password-field .form-control {
    padding-right: 2.75rem;
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-floating > .form-control.is-invalid {
    border-color: var(--error-color);
}

.form-floating > .form-control.is-valid {
    border-color: var(--success-color);
}

.form-floating > label {
    color: var(--text-secondary);
    padding: 1rem 0.75rem;
    height: auto;
    border: 2px solid transparent;
}

.form-floating > label i {
    opacity: 0.7;
}

/* Password Toggle */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    z-index: 10;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Password Strength */
.password-strength {
    padding: 0 0.25rem;
}

.strength-bar {
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.strength-fill.weak { width: 25%; background-color: var(--error-color); }
.strength-fill.fair { width: 50%; background-color: var(--warning-color); }
.strength-fill.good { width: 75%; background-color: var(--info-color); }
.strength-fill.strong { width: 100%; background-color: var(--success-color); }

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.strength-text.weak { color: var(--error-color); }
.strength-text.fair { color: var(--warning-color); }
.strength-text.good { color: var(--info-color); }
.strength-text.strong { color: var(--success-color); }

/* Remember Me & Forgot Password */
.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.forgot-password:hover {
    color: var(--primary-dark);
}

/* Submit Button */
.btn-login {
    height: 3.25rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    background: var(--primary-gradient);
    border: none;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

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

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.divider span {
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-social {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.btn-social:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-google:hover { color: #ea4335; border-color: #ea4335; }
.btn-microsoft:hover { color: #00a4ef; border-color: #00a4ef; }
.btn-linkedin:hover { color: #0077b5; border-color: #0077b5; }

/* Form Footer */
.auth-form-footer {
    text-align: center;
}

.auth-form-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

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

.auth-form-footer a:hover {
    color: var(--primary-dark);
}

/* Success Modal */
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

.success-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

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

.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

/* Toast Styles */
.toast {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.toast-header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Form Validation Feedback */
.invalid-feedback {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Input Focus Animation */
.form-control:focus + label,
.form-control:not(:placeholder-shown) + label {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-branding {
        flex: 0 0 auto;
        padding: 2rem;
        min-height: 300px;
    }

    .branding-title {
        font-size: 1.75rem;
    }

    .branding-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .features-list {
        display: none;
    }

    .auth-form-container {
        flex: 1;
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .auth-branding {
        padding: 1.5rem;
        min-height: 200px;
    }

    .logo-container {
        margin-bottom: 1.5rem;
    }

    .logo-icon {
        font-size: 2rem;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .branding-title {
        font-size: 1.5rem;
    }

    .auth-form-container {
        padding: 1.5rem;
    }

    .auth-form-header h2 {
        font-size: 1.5rem;
    }

    .social-login {
        gap: 0.75rem;
    }

    .btn-social {
        width: 3rem;
        height: 3rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --bg-light: #0f172a;
        --white: #1e293b;
        --border-color: #334155;
    }

    .auth-form-container {
        background-color: #0f172a;
    }

    .form-floating > .form-control {
        background-color: #1e293b;
        color: #f1f5f9;
    }

    .btn-social {
        background-color: #1e293b;
    }
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Shake Animation for Errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease;
}

/* Floating Labels Enhancement */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.1rem);
    background-color: var(--white);
    padding: 0 0.35rem;
    opacity: 1;
}
