/* Authentication Pages - Dark Design Matching Dashboard */

:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0e27;
    --bg-secondary: #0f1433;
    --bg-tertiary: #151b3f;
    --bg-card: #1a2142;
    --bg-card-hover: #1f2751;

    /* AI Accent Colors */
    --accent-primary: #00d9ff;
    --accent-secondary: #6366f1;
    --accent-tertiary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d9ff 0%, #6366f1 50%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-dark: linear-gradient(135deg, #1a2142 0%, #0f1433 100%);

    /* Text Colors */
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --text-accent: #00d9ff;

    /* Border Colors */
    --border-primary: rgba(99, 102, 241, 0.2);
    --border-secondary: rgba(255, 255, 255, 0.1);

    /* Shadows & Glows */
    --glow-primary: 0 0 20px rgba(0, 217, 255, 0.3);
    --glow-secondary: 0 0 20px rgba(99, 102, 241, 0.3);
    --glow-success: 0 0 20px rgba(16, 185, 129, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 217, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Auth Container - Split Layout */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Left Side - Logo & Branding */
.auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: var(--gradient-dark);
    border-right: 1px solid var(--border-primary);
    position: relative;
    overflow: hidden;
    height: 100vh;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 40%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(0, 217, 255, 0.1) 0%, transparent 60%);
    animation: gradientShift 20s ease infinite;
}

.auth-logo-container {
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-logo-image {
    max-width: 420px;
    width: 100%;
    height: auto;
    margin: 0 auto 30px auto;
    filter: drop-shadow(var(--glow-primary));
    animation: float 6s ease-in-out infinite;
    display: block;
}

/* Mobile Header - Hidden on Desktop */
.mobile-auth-header {
    display: none;
    text-align: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-primary);
}

.mobile-auth-header img {
    max-width: 230px;
    height: auto;
    display: block;
    margin: 0 auto;
}

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

.auth-logo-text {
    margin-top: 20px;
    display: none;
}

.auth-logo-text h1 {
    font-size: 42px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    text-shadow: var(--glow-primary);
}

.auth-logo-text p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Right Side - Form */
.auth-right {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px;
    position: relative;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg), var(--glow-secondary);
    border: 1px solid var(--border-secondary);
    transition: all var(--transition-base);
}

.auth-container:hover {
    border-color: var(--border-primary);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1), var(--glow-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary), var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-primary);
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid;
    line-height: 1.5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

.alert-info {
    background: rgba(0, 217, 255, 0.1);
    color: #67e8f9;
    border-color: rgba(0, 217, 255, 0.3);
}

/* Links */
.auth-links {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
}

.auth-links a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.auth-links a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.divider {
    margin: 24px 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-secondary);
}

.divider span {
    position: relative;
    background: var(--bg-card);
    padding: 0 16px;
    color: var(--text-tertiary);
    font-size: 13px;
    z-index: 1;
}

/* Info Box */
.info-box {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid var(--border-secondary);
    line-height: 1.6;
}

.info-box strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 6px;
}

/* Default Credentials Box */
.default-credentials {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-secondary);
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

.default-credentials strong {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 13px;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .auth-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    /* Hide desktop left side logo on mobile */
    .auth-left {
        display: none;
        height: auto;
    }

    /* Show mobile header */
    .mobile-auth-header {
        display: block;
    }

    .auth-right {
        padding: 0;
        min-height: auto;
        height: auto;
        overflow-y: visible;
        align-items: flex-start;
    }

    .auth-container {
        padding: 20px;
        margin: 20px 20px 0 20px;
        width: calc(100% - 40px);
    }

    .auth-header {
        margin-bottom: 20px;
        margin-top: 0;
        padding-top: 0;
    }

    .auth-header h2 {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .auth-header p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .mobile-auth-header {
        padding: 10px 16px;
    }

    .mobile-auth-header img {
        max-width: 202px;
    }

    .auth-right {
        padding: 0;
        min-height: auto;
        height: auto;
        overflow-y: visible;
    }

    .auth-container {
        padding: 18px 16px;
        margin: 20px 16px 0 16px;
        width: calc(100% - 32px);
    }

    .auth-header {
        margin-bottom: 18px;
        margin-top: 0;
        padding-top: 0;
    }

    .auth-header h2 {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .auth-header p {
        font-size: 12px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-card);
}
