/* Modern Theme Variables */
:root {
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    /* Indigo to Cyan */
    --surface-color: #f8fafc;
}

body {
    background-color: var(--surface-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* Navbar Specific */
.nav-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

/* Form Elements */
.modern-input {
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.8);
}

.modern-input:focus {
    border-color: #4f46e5;
    ring: 2px solid rgba(79, 70, 229, 0.2);
    background: white;
    transform: translateY(-1px);
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========================================
   AUTH PAGES - Dark Theme Styles
   ======================================== */

/* Dark Gradient Background */
.auth-background {
    background: linear-gradient(135deg, #0f0a1e 0%, #1e1b4b 25%, #312e81 50%, #1e293b 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.auth-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

/* Floating Geometric Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-shapes .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.floating-shapes .shape:nth-child(1) {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.floating-shapes .shape:nth-child(2) {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    top: 50%;
    right: -50px;
    animation-delay: -5s;
}

.floating-shapes .shape:nth-child(3) {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
    bottom: 10%;
    left: 10%;
    animation-delay: -10s;
}

.floating-shapes .shape:nth-child(4) {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    top: 30%;
    left: 20%;
    animation-delay: -7s;
}

.floating-shapes .shape:nth-child(5) {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    bottom: 30%;
    right: 20%;
    animation-delay: -3s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    25% {
        transform: translate(30px, -30px) rotate(90deg) scale(1.1);
    }

    50% {
        transform: translate(0, 20px) rotate(180deg) scale(0.95);
    }

    75% {
        transform: translate(-30px, -10px) rotate(270deg) scale(1.05);
    }
}

/* Enhanced Glass Card for Dark Background */
.auth-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Auth Input Fields */
.auth-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    transition: all 0.3s ease;
}

.auth-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.auth-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.2),
        0 0 20px rgba(99, 102, 241, 0.15);
    outline: none;
}

/* Auth Select Fields */
.auth-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    transition: all 0.3s ease;
}

.auth-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.2),
        0 0 20px rgba(99, 102, 241, 0.15);
    outline: none;
}

.auth-select option {
    background: #1e1b4b;
    color: #f1f5f9;
}

/* Gradient Icon Container */
.auth-icon {
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    box-shadow:
        0 10px 30px -5px rgba(99, 102, 241, 0.5),
        0 5px 15px -3px rgba(6, 182, 212, 0.3);
    animation: iconPulse 3s infinite ease-in-out;
}

@keyframes iconPulse {

    0%,
    100% {
        box-shadow:
            0 10px 30px -5px rgba(99, 102, 241, 0.5),
            0 5px 15px -3px rgba(6, 182, 212, 0.3);
        transform: rotate(3deg) scale(1);
    }

    50% {
        box-shadow:
            0 15px 40px -5px rgba(99, 102, 241, 0.6),
            0 8px 20px -3px rgba(6, 182, 212, 0.4);
        transform: rotate(3deg) scale(1.02);
    }
}

/* Primary Button - Auth Style */
.auth-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    color: white;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 15px -3px rgba(99, 102, 241, 0.5),
        0 0 0 0 rgba(99, 102, 241, 0);
    position: relative;
    overflow: hidden;
}

.auth-btn-primary::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-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 25px -5px rgba(99, 102, 241, 0.6),
        0 0 30px -5px rgba(6, 182, 212, 0.4);
}

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

/* Auth Links */
.auth-link {
    color: #a5b4fc;
    transition: all 0.2s ease;
}

.auth-link:hover {
    color: #c7d2fe;
    text-shadow: 0 0 10px rgba(165, 180, 252, 0.3);
}

/* Auth Labels */
.auth-label {
    color: #cbd5e1;
    font-weight: 500;
}

/* Auth Divider */
.auth-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Password Toggle Button */
.password-toggle {
    color: rgba(148, 163, 184, 0.6);
    transition: color 0.2s ease;
    cursor: pointer;
}

.password-toggle:hover {
    color: #a5b4fc;
}

/* Auth Alert Styles */
.auth-alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* Slide-up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

/* Auth Footer - Transparent */
.auth-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    color: rgba(148, 163, 184, 0.7);
}

/* ========================================
   STEPPER & WORKSPACE STYLES
   ======================================== */

/* Stepper Container */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    gap: 0;
    position: relative;
}

/* Stepper Step */
.stepper-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: default;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.stepper-step.clickable {
    cursor: pointer;
}

.stepper-step.clickable:hover .stepper-circle {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* Step Circle */
.stepper-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
}

/* Locked State */
.stepper-step.locked .stepper-circle {
    background: #f1f5f9;
    color: #94a3b8;
    border: 2px solid #e2e8f0;
}

.stepper-step.locked .stepper-label {
    color: #94a3b8;
}

/* Active State */
.stepper-step.active .stepper-circle {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    animation: stepperPulse 2s ease-in-out infinite;
}

.stepper-step.active .stepper-label {
    color: #4f46e5;
    font-weight: 700;
}

/* Completed State */
.stepper-step.completed .stepper-circle {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.stepper-step.completed .stepper-label {
    color: #059669;
    font-weight: 600;
}

/* Stepper Label */
.stepper-label {
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Stepper Connector Line */
.stepper-line {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    margin: 0 0.75rem;
    border-radius: 2px;
    transition: background 0.5s ease;
    position: relative;
    z-index: 1;
    min-width: 40px;
    max-width: 120px;
}

.stepper-line.completed {
    background: linear-gradient(90deg, #10b981, #059669);
}

.stepper-line.active {
    background: linear-gradient(90deg, #10b981, #4f46e5);
}

@keyframes stepperPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(79, 70, 229, 0.6);
    }
}

/* Tab Panels */
.tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.tab-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: tabFadeIn 0.4s ease-out forwards;
}

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

/* Loading Skeleton */
.skeleton-loader {
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
    border-radius: 0.5rem;
}

.skeleton-loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Workspace header info bar */
.workspace-info-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.workspace-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #475569;
    font-weight: 500;
}

/* Tab navigation buttons */
.tab-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.tab-nav-btn.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.tab-nav-btn.primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 8px 15px -3px rgba(79, 70, 229, 0.4);
}

.tab-nav-btn.secondary {
    background: white;
    color: #475569;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tab-nav-btn.secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Mobile Stepper */
@media (max-width: 640px) {
    .stepper {
        padding: 1rem;
        gap: 0;
    }

    .stepper-label {
        display: none;
    }

    .stepper-circle {
        width: 38px;
        height: 38px;
        font-size: 0.875rem;
    }

    .stepper-line {
        min-width: 24px;
        margin: 0 0.375rem;
    }
}

/* Workspace glass card override — no hover transform */
.workspace-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    border-radius: 1rem;
    overflow: hidden;
}

/* Secondary button style */
.btn-secondary {
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}