/* =====================================================
   CUSTOMER AUTH CSS - Logi WorkForce
   Purple/Violet Theme with Dark/Light Mode Support
   Modern, Minimalist Login/Auth Pages
   ===================================================== */

/* CSS Variables for Theme - Inheriting from customer_layout.css */
:root {
    /* Purple/Violet Color Palette */
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-200: #e9d5ff;
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-700: #7c3aed;
    --purple-800: #6b21a8;
    --purple-900: #581c87;
    --purple-950: #3b0764;
    
    /* Primary Colors */
    --primary: #7c3aed;
    --primary-light: #a855f7;
    --primary-lighter: #c084fc;
    --primary-dark: #6d28d9;
    --primary-darker: #5b21b6;
    --primary-gradient: linear-gradient(135deg, rgb(124, 58, 237) 0%, rgb(168, 85, 247) 100%);
    
    /* Light Theme (Default) */
    --auth-bg: #f8fafc;
    --auth-card-bg: #ffffff;
    --auth-card-border: #e5e7eb;
    --auth-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --auth-card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --auth-panel-bg: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
    --auth-panel-overlay: rgba(124, 58, 237, 0.1);
    
    --auth-input-bg: #ffffff;
    --auth-input-border: #d1d5db;
    --auth-input-focus-border: #7c3aed;
    --auth-input-focus-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
    
    --auth-text-primary: #1f2937;
    --auth-text-secondary: #6b7280;
    --auth-text-muted: #9ca3af;
    
    --auth-success: #10b981;
    --auth-danger: #ef4444;
    --auth-warning: #f59e0b;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --auth-bg: #0f172a;
    --auth-card-bg: #1e293b;
    --auth-card-border: #334155;
    --auth-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --auth-card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    
    --auth-panel-bg: linear-gradient(135deg, #581c87 0%, #7c3aed 50%, #9333ea 100%);
    --auth-panel-overlay: rgba(124, 58, 237, 0.2);
    
    --auth-input-bg: #334155;
    --auth-input-border: #475569;
    --auth-input-focus-border: #a855f7;
    --auth-input-focus-shadow: 0 0 0 4px rgba(168, 85, 247, 0.2);
    
    --auth-text-primary: #f1f5f9;
    --auth-text-secondary: #cbd5e1;
    --auth-text-muted: #94a3b8;
}

/* =====================================================
   BASE STYLES
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-slow);
    overflow-x: hidden;
}

/* =====================================================
   AUTH WRAPPER - Split Layout
   ===================================================== */
.auth-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* =====================================================
   BRAND PANEL - Left Side
   ===================================================== */
.auth-brand-panel {
    display: none;
    width: 45%;
    background: var(--auth-panel-bg);
    position: relative;
    overflow: hidden;
    padding: 48px;
}

@media (min-width: 992px) {
    .auth-brand-panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Decorative Elements */
.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* Floating Shapes */
.auth-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.auth-shape-1 {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 20%;
    animation-delay: 0s;
}

.auth-shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
}

.auth-shape-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 30%;
    animation-delay: -10s;
}

.auth-shape-4 {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 10%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 1;
    }
}

/* Brand Content */
.auth-brand-content {
    position: relative;
    z-index: 10;
    color: #fff;
    max-width: 480px;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 48px;
}

.auth-brand-logo-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand-logo-icon i {
    font-size: 1.5rem;
}

.auth-brand-logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.auth-brand-logo-text span {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-brand-tagline {
    margin-bottom: 40px;
}

.auth-brand-tagline h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.auth-brand-tagline p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.7;
}

/* Features List */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-feature-icon i {
    font-size: 1.25rem;
}

.auth-feature-text h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 2px 0;
}

.auth-feature-text p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

/* =====================================================
   FORM PANEL - Right Side
   ===================================================== */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    position: relative;
}

/* Background Pattern */
.auth-form-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--auth-card-border) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
}

/* =====================================================
   LOGIN CONTAINER - Card
   ===================================================== */
.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
}

.auth-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-card-border);
    border-radius: 24px;
    box-shadow: var(--auth-card-shadow);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.auth-card:hover {
    box-shadow: var(--auth-card-shadow-hover);
}

/* Card Header */
.auth-card-header {
    padding: 32px 32px 0;
    text-align: center;
}

.auth-card-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--primary-gradient);
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.auth-card-logo i {
    font-size: 2rem;
    color: #fff;
}

.auth-card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.auth-card-header p {
    font-size: 0.9rem;
    color: var(--auth-text-secondary);
    margin: 0;
}

/* Card Body */
.auth-card-body {
    padding: 32px;
}

/* =====================================================
   FORM STYLES
   ===================================================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Group */
.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-form-label i {
    font-size: 1rem;
    color: var(--primary);
}

/* Input Wrapper */
.auth-input-wrapper {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--auth-text-muted);
    transition: color var(--transition-fast);
    pointer-events: none;
    z-index: 1;
}

.auth-form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--auth-input-bg);
    border: 2px solid var(--auth-input-border);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--auth-text-primary);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.auth-form-control::placeholder {
    color: var(--auth-text-muted);
}

.auth-form-control:focus {
    outline: none;
    border-color: var(--auth-input-focus-border);
    box-shadow: var(--auth-input-focus-shadow);
}

.auth-form-control:focus + .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
    color: var(--primary);
}

/* Password Toggle */
.auth-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--auth-text-muted);
    transition: color var(--transition-fast);
}

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

/* Input States */
.auth-form-control.is-invalid {
    border-color: var(--auth-danger);
}

.auth-form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

/* Form Check (Remember Me) */
.auth-form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--auth-input-border);
    border-radius: 6px;
    cursor: pointer;
    accent-color: var(--primary);
    transition: all var(--transition-fast);
}

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

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

/* Form Row (Remember + Forgot) */
.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

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

.auth-forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Submit Button */
.auth-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.auth-btn-submit::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 ease;
}

.auth-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.auth-btn-submit:hover::before {
    left: 100%;
}

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

.auth-btn-submit i {
    font-size: 1.1rem;
}

/* =====================================================
   ALERTS
   ===================================================== */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.auth-alert-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-alert-icon i {
    font-size: 0.9rem;
}

.auth-alert-content {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Alert Variants */
.auth-alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-alert-danger .auth-alert-icon {
    background: rgba(239, 68, 68, 0.15);
}

.auth-alert-danger .auth-alert-icon i {
    color: var(--auth-danger);
}

.auth-alert-danger .auth-alert-content {
    color: #b91c1c;
}

[data-theme="dark"] .auth-alert-danger .auth-alert-content {
    color: #fca5a5;
}

.auth-alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-alert-success .auth-alert-icon {
    background: rgba(16, 185, 129, 0.15);
}

.auth-alert-success .auth-alert-icon i {
    color: var(--auth-success);
}

.auth-alert-success .auth-alert-content {
    color: #047857;
}

[data-theme="dark"] .auth-alert-success .auth-alert-content {
    color: #6ee7b7;
}

/* =====================================================
   CARD FOOTER
   ===================================================== */
.auth-card-footer {
    padding: 24px 32px;
    background: var(--auth-bg);
    border-top: 1px solid var(--auth-card-border);
    text-align: center;
}

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

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

.auth-card-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* =====================================================
   THEME TOGGLE
   ===================================================== */
.auth-theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
}

.auth-theme-btn {
    width: 48px;
    height: 48px;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-card-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--auth-card-shadow);
}

.auth-theme-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: scale(1.05);
}

.auth-theme-btn i {
    font-size: 1.25rem;
    color: var(--auth-text-primary);
    transition: color var(--transition-fast);
}

.auth-theme-btn:hover i {
    color: #fff;
}

/* =====================================================
   MOBILE BRAND HEADER
   ===================================================== */
.auth-mobile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
    .auth-mobile-header {
        display: none;
    }
}

.auth-mobile-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-mobile-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-mobile-logo-icon i {
    font-size: 1.25rem;
    color: #fff;
}

.auth-mobile-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--auth-text-primary);
}

/* =====================================================
   RESPONSIVE STYLES
   ===================================================== */
@media (max-width: 991.98px) {
    .auth-form-panel {
        padding: 24px 16px;
    }
    
    .auth-container {
        max-width: 100%;
    }
    
    .auth-card {
        border-radius: 20px;
    }
    
    .auth-card-header {
        padding: 28px 24px 0;
    }
    
    .auth-card-body {
        padding: 28px 24px;
    }
    
    .auth-card-footer {
        padding: 20px 24px;
    }
}

@media (max-width: 575.98px) {
    .auth-form-panel {
        padding: 16px 12px;
    }
    
    .auth-card {
        border-radius: 16px;
    }
    
    .auth-card-header {
        padding: 24px 20px 0;
    }
    
    .auth-card-body {
        padding: 24px 20px;
    }
    
    .auth-card-logo {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }
    
    .auth-card-logo i {
        font-size: 1.75rem;
    }
    
    .auth-card-header h2 {
        font-size: 1.35rem;
    }
    
    .auth-form-control {
        padding: 12px 14px 12px 44px;
    }
    
    .auth-btn-submit {
        padding: 14px 20px;
    }
    
    .auth-theme-toggle {
        top: 16px;
        right: 16px;
    }
    
    .auth-theme-btn {
        width: 44px;
        height: 44px;
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
.auth-card {
    animation: authSlideUp 0.5s ease forwards;
}

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

.auth-brand-content {
    animation: authFadeIn 0.6s ease 0.2s forwards;
    opacity: 0;
}

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

/* Feature Items Stagger Animation */
.auth-feature {
    opacity: 0;
    animation: authFeatureIn 0.4s ease forwards;
}

.auth-feature:nth-child(1) { animation-delay: 0.4s; }
.auth-feature:nth-child(2) { animation-delay: 0.5s; }
.auth-feature:nth-child(3) { animation-delay: 0.6s; }

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

/* =====================================================
   LOADING STATE
   ===================================================== */
.auth-btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-btn-submit.loading .btn-text {
    visibility: hidden;
}

.auth-btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

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

/* =====================================================
   SELECTION & SCROLLBAR
   ===================================================== */
::selection {
    background: var(--primary);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--auth-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--auth-card-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--auth-text-muted);
}