/**
 * NEXA FOUNDRY SAAS - ULTRA PREMIUM DESIGN SYSTEM 🦄
 * Ultra Premium Professional Client Space
 */

/* Custom Scrollbars - Style violet moderne et fin */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

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

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 rgba(139, 92, 246, 0.05);
}

/* Scrollbar spécifique pour la sidebar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 rgba(139, 92, 246, 0.08);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.08);
    border-radius: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

/* Scrollbar pour le contenu principal */
.main-content {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 rgba(139, 92, 246, 0.06);
}

.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.06);
    border-radius: 10px;
}

.main-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* Scrollbar pour les modales et dropdowns */
.modal-body::-webkit-scrollbar,
.dropdown-menu::-webkit-scrollbar,
.notification-dropdown::-webkit-scrollbar {
    width: 4px;
}

.modal-body::-webkit-scrollbar-track,
.dropdown-menu::-webkit-scrollbar-track,
.notification-dropdown::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.05);
    border-radius: 6px;
}

.modal-body::-webkit-scrollbar-thumb,
.dropdown-menu::-webkit-scrollbar-thumb,
.notification-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.dropdown-menu::-webkit-scrollbar-thumb:hover,
.notification-dropdown::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.6);
}

/* Scrollbar pour les tableaux */
.table-container::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.04);
    border-radius: 8px;
}

.table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* Animation des scrollbars */
@keyframes scrollbarGlow {
    0%, 100% {
        box-shadow: 0 0 4px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
    }
}

/* Effet de glow au scroll actif */
.sidebar:hover::-webkit-scrollbar-thumb,
.main-content:hover::-webkit-scrollbar-thumb {
    animation: scrollbarGlow 2s ease-in-out infinite;
}

/* Scrollbar pour les zones de chat et messages */
.chat-messages::-webkit-scrollbar,
.test-messages::-webkit-scrollbar,
.notification-list::-webkit-scrollbar {
    width: 3px;
}

.chat-messages::-webkit-scrollbar-track,
.test-messages::-webkit-scrollbar-track,
.notification-list::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.03);
    border-radius: 6px;
}

.chat-messages::-webkit-scrollbar-thumb,
.test-messages::-webkit-scrollbar-thumb,
.notification-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a855f7, #c084fc);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.test-messages::-webkit-scrollbar-thumb:hover,
.notification-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9333ea, #a855f7);
    box-shadow: 0 0 4px rgba(139, 92, 246, 0.7);
}

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

:root {
    /* Ultra Premium Dark Mode Palette 🌙 */
    --bg-primary: #0a0d14;
    --bg-secondary: #0f1419;
    --bg-tertiary: #151b23;
    --bg-elevated: #1a202c;
    --bg-overlay: rgba(15, 20, 25, 0.95);
    --bg-subtle: #1e2532;
    --bg-muted: #252b3a;
    --bg-accent: #2d3748;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;
    
    --border-primary: #1e293b;
    --border-secondary: #334155;
    --border-subtle: #1a202c;
    --border-focus: #3b82f6;
    --border-error: #ef4444;
    --border-success: #10b981;
    
    --accent-primary: #60a5fa;
    --accent-primary-hover: #3b82f6;
    --accent-primary-light: rgba(96, 165, 250, 0.15);
    --accent-secondary: #34d399;
    --accent-secondary-hover: #10b981;
    --accent-secondary-light: rgba(52, 211, 153, 0.15);
    --accent-warning: #fbbf24;
    --accent-warning-hover: #f59e0b;
    --accent-warning-light: rgba(251, 191, 36, 0.15);
    --accent-error: #f87171;
    --accent-error-hover: #ef4444;
    --accent-error-light: rgba(248, 113, 113, 0.15);
    
    /* Premium Dark Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-success: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-subtle: linear-gradient(135deg, #434343 0%, #000000 100%);
    --gradient-mesh: 
        radial-gradient(ellipse at top left, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.03) 0%, transparent 50%),
        linear-gradient(180deg, #0a0d14 0%, #0f1419 100%);
    
    /* Typography Scale */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Spacing Scale */
    --space-px: 1px;
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Border Radius */
    --radius-none: 0;
    --radius-sm: 0.25rem;
    --radius-base: 0.5rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows - Premium */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 50px 100px -20px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;
    
    /* Transitions - Ultra Smooth */
    --transition-fast: 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

/* Base Styles - Ultra Premium Dark */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--gradient-mesh);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: var(--font-size-base);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography - Premium */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.025em;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin: 0;
    line-height: 1.6;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary-hover);
}

/* Layout Principal - Ultra Premium Dark */
.app-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Sidebar - Dark Mode Premium */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    transition: all var(--transition-normal);
    position: fixed;
    height: 100vh;
    z-index: var(--z-fixed);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: var(--space-5) var(--space-5) var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition-fast);
}

.logo:hover {
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.sidebar-nav {
    padding: var(--space-3) var(--space-3);
}

.nav-section {
    margin-bottom: var(--space-4);
}

.nav-section-title {
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 var(--space-3) var(--space-1);
    margin-bottom: var(--space-1);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-base);
    transition: all var(--transition-fast);
    margin-bottom: var(--space-1);
    font-size: var(--font-size-sm);
    font-weight: 500;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
    transform: translateX(1px);
}

.nav-item.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
}

.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
    font-size: var(--font-size-sm);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    opacity: 1;
}

/* Navigation items disabled (mode setup) */
.nav-item.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
}

.nav-item.disabled:hover {
    background: none;
    color: var(--text-muted);
    transform: none;
}

.nav-badge {
    position: absolute;
    right: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
    background: var(--warning-100);
    color: var(--warning-700);
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    white-space: nowrap;
}

/* Main Content - Ultra Premium */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: var(--bg-primary);
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
    position: relative;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed);
}

/* Header - Ultra Refined */
.header {
    background: rgba(15, 20, 25, 0.98);
    border-bottom: 1px solid var(--border-primary);
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow: var(--shadow-xs);
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.page-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin: 0;
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.header-user:hover {
    background: var(--bg-subtle);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.user-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: capitalize;
}

/* User Dropdown Menu */
.header-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.header-user:hover {
    background: var(--bg-subtle);
}

.user-menu-arrow {
    transition: transform var(--transition-fast);
}

.header-user.active .user-menu-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    backdrop-filter: blur(20px);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-size: var(--font-size-lg);
    font-weight: 700;
    flex-shrink: 0;
}

.user-dropdown-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.user-dropdown-email {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}

.user-dropdown-package {
    display: flex;
}

.user-dropdown-section {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.user-dropdown-section:last-child {
    border-bottom: none;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    font-size: var(--font-size-sm);
}

.user-dropdown-item:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.user-dropdown-item.logout {
    color: var(--accent-error);
}

.user-dropdown-item.logout:hover {
    background: var(--accent-error-light);
    color: var(--accent-error);
}

.user-dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.8;
}

.user-dropdown-badge {
    margin-left: auto;
    font-size: var(--font-size-xs);
}

/* Content Area - Ultra Refined */
.content {
    padding: var(--space-6) var(--space-6) var(--space-8);
    max-width: var(--container-xl);
    margin: 0 auto;
    width: 100%;
}

/* Cards - Ultra Refined */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.15), transparent);
    opacity: 0.8;
}

.card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    border-color: var(--border-secondary);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
}

.card-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
}

.card-title i {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

.card-subtitle {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-1);
    font-weight: 400;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.card-body {
    padding: 0;
}

.card-footer {
    margin-top: var(--space-5);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Buttons - Ultra Premium System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary Button - Premium */
.btn-primary {
    background: var(--accent-primary);
    color: var(--text-inverse);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

/* Secondary Button */
.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

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

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

/* Success Button */
.btn-success {
    background: var(--accent-secondary);
    color: var(--text-inverse);
    border-color: var(--accent-secondary);
}

.btn-success:hover {
    background: var(--accent-secondary-hover);
    border-color: var(--accent-secondary-hover);
}

/* Warning Button */
.btn-warning {
    background: var(--accent-warning);
    color: var(--text-inverse);
    border-color: var(--accent-warning);
}

.btn-warning:hover {
    background: #e68900;
    border-color: #e68900;
}

/* Error Button */
.btn-error {
    background: var(--accent-error);
    color: var(--text-inverse);
    border-color: var(--accent-error);
}

.btn-error:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Button Sizes */
.btn-xs {
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-xs);
    gap: var(--space-1);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--font-size-base);
}

.btn-xl {
    padding: var(--space-5) var(--space-8);
    font-size: var(--font-size-lg);
}

/* Button Icon */
.btn-icon {
    padding: var(--space-2);
    width: 36px;
    height: 36px;
}

.btn-icon.btn-sm {
    padding: var(--space-1);
    width: 28px;
    height: 28px;
}

.btn-icon.btn-lg {
    padding: var(--space-3);
    width: 44px;
    height: 44px;
}

/* Metrics Cards - Ultra Refined */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(20px);
}

.metric-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--border-secondary);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.2), transparent);
    opacity: 0.6;
}

.metric-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.metric-info {
    flex: 1;
}

.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-base);
    flex-shrink: 0;
    opacity: 0.9;
}

.metric-icon.primary { 
    background: var(--accent-primary-light); 
    color: var(--accent-primary); 
}
.metric-icon.success { 
    background: var(--accent-secondary-light); 
    color: var(--accent-secondary); 
}
.metric-icon.warning { 
    background: var(--accent-warning-light); 
    color: var(--accent-warning); 
}
.metric-icon.error { 
    background: var(--accent-error-light); 
    color: var(--accent-error); 
}

.metric-title {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.metric-change {
    font-size: var(--font-size-xs);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--text-muted);
}

.metric-change.positive { 
    color: var(--accent-secondary); 
}

.metric-change.negative { 
    color: var(--accent-error); 
}

.metric-change.neutral { 
    color: var(--text-muted); 
}

.metric-chart {
    margin-top: var(--space-3);
    height: 24px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.metric-trend {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-hover));
    border-radius: var(--radius-sm);
    transition: width var(--transition-slow);
    opacity: 0.8;
}

/* Tables - Dark Mode Premium */
.table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--bg-tertiary);
    padding: var(--space-4) var(--space-6);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-primary);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    vertical-align: middle;
}

.table tr:hover {
    background: var(--bg-subtle);
}

.table tr:last-child td {
    border-bottom: none;
}

/* Forms - Ultra Premium */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-family: inherit;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
}

.form-input:focus, 
.form-select:focus, 
.form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), var(--shadow-sm);
}

.form-input:hover, 
.form-select:hover, 
.form-textarea:hover {
    border-color: var(--border-secondary);
}

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

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right var(--space-3) center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: var(--space-10);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.form-error {
    font-size: var(--font-size-xs);
    color: var(--accent-error);
    margin-top: var(--space-1);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--border-error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Status Badges - Premium */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-base);
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge.primary { 
    background: var(--accent-primary-light); 
    color: var(--accent-primary); 
}

.badge.success { 
    background: var(--accent-secondary-light); 
    color: var(--accent-secondary); 
}

.badge.warning { 
    background: var(--accent-warning-light); 
    color: var(--accent-warning); 
}

.badge.error { 
    background: var(--accent-error-light); 
    color: var(--accent-error); 
}

.badge.neutral { 
    background: var(--bg-muted); 
    color: var(--text-muted); 
}

/* Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-muted { color: var(--text-muted); }

.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }
.bg-tertiary { background: var(--bg-tertiary); }
.bg-subtle { background: var(--bg-subtle); }

.border { border: 1px solid var(--border-primary); }
.border-t { border-top: 1px solid var(--border-primary); }
.border-b { border-bottom: 1px solid var(--border-primary); }
.border-l { border-left: 1px solid var(--border-primary); }
.border-r { border-right: 1px solid var(--border-primary); }

.rounded { border-radius: var(--radius-base); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.select-none { user-select: none; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Modals - Premium */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-2xl);
    z-index: var(--z-modal);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

/* Grid System */
.grid {
    display: grid;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.grid-cols-12 { grid-template-columns: repeat(12, 1fr); }

.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-6 { grid-column: span 6; }
.col-span-12 { grid-column: span 12; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-in-up { animation: slideInUp 0.4s ease-out; }
.animate-slide-in-right { animation: slideInRight 0.4s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* Loading States */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-primary);
    border-top: 2px solid var(--accent-primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in-up { animation: fadeInUp 0.6s ease forwards; }
.animate-slide-in-right { animation: slideInRight 0.6s ease forwards; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-primary);
    border-top: 2px solid var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

/* Grid System */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto-fit { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Grid System Extensions */
.grid {
    display: grid;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }

@media (min-width: 1024px) {
    .lg\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
    .md\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Login Page - Ultra-Premium Dark Mode 🦄 */
.login-container {
    min-height: 100vh;
    background: 
        radial-gradient(ellipse 800px 600px at 50% 0%, rgba(59, 130, 246, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 100% 100%, rgba(139, 92, 246, 0.02) 0%, transparent 70%),
        #0a0d14;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.015) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: 30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.01) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.4; }
    50% { transform: translateY(-20px) translateX(10px); opacity: 0.6; }
}

.login-card {
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(59, 130, 246, 0.08);
    border-radius: 20px;
    padding: 2rem 1.75rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 
        0 20px 40px -12px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    position: relative;
    z-index: 10;
    animation: slideInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    border-radius: 24px 24px 0 0;
}

@keyframes slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(40px) scale(0.96); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-logo {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #60a5fa 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    opacity: 0.8;
    max-width: 280px;
    margin: 0 auto;
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.login-form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.625rem;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
}

.login-form-label i {
    color: rgba(59, 130, 246, 0.7);
    font-size: 0.875rem;
    opacity: 0.8;
}

.login-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(15, 20, 31, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.06);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.925rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.login-form-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(15, 20, 31, 0.8);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.login-form-input:hover {
    border-color: rgba(59, 130, 246, 0.1);
    background: rgba(15, 20, 31, 0.7);
}

.login-form-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
    font-weight: 400;
}

.login-btn {
    width: 100%;
    padding: 0.8125rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, #2563eb 0%, #5b21b6 100%);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-divider {
    text-align: center;
    margin: var(--space-6) 0;
    position: relative;
    color: #a0aec0;
    font-size: 0.875rem;
    font-weight: 500;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
}

.login-divider span {
    background: rgba(26, 31, 46, 0.9);
    padding: 0 var(--space-4);
}

.login-footer {
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(59, 130, 246, 0.08);
}

.login-footer-text {
    color: rgba(148, 163, 184, 0.8);
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.login-footer-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.login-footer-link:hover {
    color: #a855f7;
}

.login-demo-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(15, 20, 31, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.08);
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(20px);
    position: relative;
}

.login-demo-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
}

.login-demo-title {
    font-size: 0.8rem;
    color: rgba(96, 165, 250, 0.9);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    letter-spacing: 0.02em;
}

.login-demo-content {
    font-size: 0.775rem;
    color: rgba(148, 163, 184, 0.7);
    line-height: 1.6;
}

.login-demo-content strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.login-alert {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
    animation: shake 0.4s ease-out;
    backdrop-filter: blur(20px);
    position: relative;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.login-alert.error {
    background: rgba(15, 20, 31, 0.6);
    color: rgba(248, 113, 113, 0.9);
    border-color: rgba(239, 68, 68, 0.15);
}

.login-alert.success {
    background: rgba(15, 20, 31, 0.6);
    color: rgba(110, 231, 183, 0.9);
    border-color: rgba(16, 185, 129, 0.15);
}

/* Responsive Design - Ultra Premium 🦄 */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .login-container {
        padding: 3rem;
    }
    
    .login-card {
        max-width: 420px;
        padding: 2.5rem 2.25rem;
    }
    
    .login-logo {
        font-size: 2.5rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
}

/* Desktop (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .login-container {
        padding: 2rem;
    }
    
    .login-card {
        max-width: 380px;
    }
}

/* Tablet Landscape (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .login-container {
        padding: 2rem;
    }
    
    .login-card {
        max-width: 400px;
        padding: 2.5rem 2rem;
    }
    
    .login-logo {
        font-size: 2.25rem;
    }
    
    .login-title {
        font-size: 1.625rem;
    }
    
    .login-form-input {
        padding: 1rem 1.125rem;
        font-size: 1rem;
    }
    
    .login-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* Tablet Portrait (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .login-container {
        padding: 1rem;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height */
    }
    
    .login-card {
        max-width: 100%;
        width: 100%;
        max-width: 360px;
        padding: 1.75rem 1.5rem;
        border-radius: 18px;
    }
    
    .login-header {
        margin-bottom: 1.5rem;
    }
    
    .login-logo {
        font-size: 1.875rem;
        margin-bottom: 1rem;
    }
    
    .login-title {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }
    
    .login-subtitle {
        font-size: 0.8125rem;
        max-width: 260px;
    }
    
    .login-form-group {
        margin-bottom: 1rem;
    }
    
    .login-form-input {
        padding: 0.8125rem 0.875rem;
        font-size: 0.9375rem;
        border-radius: 10px;
    }
    
    .login-btn {
        padding: 0.8125rem 1.25rem;
        font-size: 0.9375rem;
        border-radius: 10px;
    }
}

/* Mobile Large (376px - 480px) */
@media (min-width: 376px) and (max-width: 480px) {
    .login-container {
        padding: 0.75rem;
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .login-card {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
        margin: 0;
    }
    
    .login-header {
        margin-bottom: 1.25rem;
    }
    
    .login-logo {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
        gap: 0.375rem;
    }
    
    .login-title {
        font-size: 1.25rem;
        margin-bottom: 0.375rem;
    }
    
    .login-subtitle {
        font-size: 0.8125rem;
        max-width: 240px;
        line-height: 1.4;
    }
    
    .login-form {
        margin-bottom: 1.25rem;
    }
    
    .login-form-group {
        margin-bottom: 1rem;
    }
    
    .login-form-label {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .login-form-input {
        padding: 0.8125rem 0.875rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }
    
    .login-btn {
        padding: 0.8125rem 1rem;
        font-size: 0.875rem;
        border-radius: 10px;
        margin-bottom: 1rem;
    }
    
    .login-footer {
        padding-top: 1rem;
    }
    
    .login-footer-text {
        font-size: 0.75rem;
    }
}

/* Mobile Small (320px - 375px) */
@media (max-width: 375px) {
    .login-container {
        padding: 0.5rem;
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .login-card {
        width: 100%;
        max-width: 100%;
        padding: 1.25rem 1rem;
        border-radius: 14px;
    }
    
    .login-header {
        margin-bottom: 1rem;
    }
    
    .login-logo {
        font-size: 1.5rem;
        margin-bottom: 0.625rem;
        gap: 0.25rem;
    }
    
    .login-title {
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
        line-height: 1.3;
    }
    
    .login-subtitle {
        font-size: 0.75rem;
        max-width: 220px;
        line-height: 1.4;
    }
    
    .login-form {
        margin-bottom: 1rem;
    }
    
    .login-form-group {
        margin-bottom: 0.875rem;
    }
    
    .login-form-label {
        font-size: 0.6875rem;
        margin-bottom: 0.375rem;
        gap: 0.25rem;
    }
    
    .login-form-label i {
        font-size: 0.75rem;
    }
    
    .login-form-input {
        padding: 0.75rem 0.8125rem;
        font-size: 0.8125rem;
        border-radius: 8px;
    }
    
    .login-btn {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
        border-radius: 8px;
        margin-bottom: 0.875rem;
        gap: 0.25rem;
    }
    
    .login-footer {
        padding-top: 0.875rem;
    }
    
    .login-footer-text {
        font-size: 0.6875rem;
        margin-bottom: 0.375rem;
    }
    
    .login-alert {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
        border-radius: 8px;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
}

/* General Responsive Utilities */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: var(--space-4);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-card {
        backdrop-filter: blur(30px) saturate(180%);
    }
    
    .login-form-input {
        backdrop-filter: blur(15px);
    }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        padding: 0.75rem;
        align-items: flex-start;
        justify-content: center;
        padding-top: 1rem;
    }
    
    .login-card {
        padding: 1.5rem 1.25rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .login-header {
        margin-bottom: 1rem;
    }
    
    .login-logo {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .login-title {
        font-size: 1.125rem;
        margin-bottom: 0.25rem;
    }
    
    .login-subtitle {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .login-form-group {
        margin-bottom: 0.875rem;
    }
    
    .login-btn {
        margin-bottom: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .login-container {
        background: white !important;
    }
    
    .login-card {
        background: white !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .login-logo,
    .login-title {
        color: #000 !important;
    }
}

/* Progress Steps - Company Completion */
.progress-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.progress-step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.progress-step.completed {
    border-color: var(--accent-success);
    background: rgba(34, 197, 94, 0.02);
}

.progress-step.pending {
    border-color: var(--border-color);
    background: var(--card-bg);
}

.step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.progress-step.completed .step-icon {
    background: var(--accent-success);
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.progress-step.pending .step-icon {
    background: var(--subtle-bg);
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.step-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.2;
}

.step-status {
    justify-self: end;
}

.progress-step.completed .step-title {
    color: var(--accent-success);
}

.progress-step.completed .step-description {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .progress-step {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        padding: 1.25rem;
        gap: 0.75rem;
    }
    
    .step-icon {
        grid-row: 1 / 3;
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
    
    .step-content {
        grid-column: 2;
        grid-row: 1;
        gap: 0.125rem;
    }
    
    .step-title {
        font-size: 0.9rem;
    }
    
    .step-description {
        font-size: 0.8rem;
    }
    
    .step-status {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        margin-top: 0.5rem;
    }
}
