:root {
    /* Gradient Theme Colors - Light Mode Only */
    --gradient-primary: linear-gradient(135deg, #8b5cf6, #3b82f6);
    --gradient-primary-hover: linear-gradient(135deg, #7c3aed, #2563eb);
    --gradient-secondary: linear-gradient(135deg, #a78bfa, #60a5fa);
    --gradient-light: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.08));
    --gradient-success: linear-gradient(135deg, #10b981, #3b82f6);
    --gradient-warning: linear-gradient(135deg, #f59e0b, #f97316);
    --gradient-error: linear-gradient(135deg, #ef4444, #f97316);
    
    /* Solid Colors */
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #3b82f6;
    --secondary-dark: #2563eb;
    --secondary-light: #60a5fa;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Background Colors - Pure White Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-header: #ffffff;
    
    /* Text Colors - Pure Black & Grays */
    --text-primary: #000000;
    --text-secondary: #1e293b;
    --text-tertiary: #475569;
    --text-light: #64748b;
    --text-white: #ffffff;
    
    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-dark: #cbd5e1;
    
    /* Shadow with Subtle Purple-Blue Tint */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);
    --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);
    --shadow-glow-mix: 0 0 15px rgba(139, 92, 246, 0.1), 0 0 25px rgba(59, 130, 246, 0.08);
    
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.25rem;
    --space-2xl: 1.5rem;
    --space-3xl: 2rem;
    --space-4xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 200ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', 'Poppins', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
    position: relative;
}

/* Desktop Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: width var(--transition-normal);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

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

.sidebar.collapsed .nav-text,
.sidebar.collapsed .user-details,
.sidebar.collapsed .nav-section-title {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: var(--space-lg) 0;
}

.sidebar.collapsed .nav-item i {
    margin: 0;
    font-size: 1.25rem;
}

.sidebar.collapsed .sidebar-footer .user-info {
    justify-content: center;
}

.sidebar-header {
    padding: var(--space-2xl);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-sidebar);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo-img {
    height: 36px;
    width: auto;
    transition: all var(--transition-normal);
}

.sidebar.collapsed .logo-img {
    height: 32px;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.sidebar-toggle:hover {
    background: var(--gradient-light);
    border-color: var(--primary);
    transform: scale(1.1);
}

.sidebar-content {
    flex: 1;
    padding: var(--space-xl) 0;
    overflow-y: auto;
}

/* Navigation Sections */
.nav-section {
    margin-bottom: var(--space-xl);
}

.nav-section-title {
    padding: var(--space-md) var(--space-2xl);
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    font-weight: 700;
    white-space: nowrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-2xl);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}

.nav-item:hover {
    background: var(--gradient-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.08));
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary-light);
}

.nav-item.active i {
    color: var(--primary);
}

/* Parent navigation items */
.nav-item-parent {
    margin-bottom: 4px;
}

.nav-parent-toggle {
    cursor: pointer;
    justify-content: space-between;
}

.nav-parent-toggle .parent-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.2s;
}

.nav-children {
    margin-left: 20px;
    padding-left: 8px;
    border-left: 1px solid var(--border-color);
}

.nav-item-child {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.nav-item-child i {
    width: 20px;
    font-size: 14px;
    color: var(--primary-light);
}

.nav-item-child:hover {
    background: var(--gradient-light);
    color: var(--primary);
}

.nav-item-child.active {
    background: var(--gradient-primary);
    color: white;
}

.nav-item-child.active i {
    color: white;
}

/* For collapsed sidebar */
.sidebar.collapsed .nav-children {
    display: none !important;
}

.sidebar.collapsed .nav-parent-toggle .nav-text,
.sidebar.collapsed .nav-parent-toggle .parent-arrow {
    display: none;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-xl) var(--space-2xl);
    border-top: 1px solid var(--border-color);
    background: var(--bg-sidebar);
}

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

.user-info:hover {
    background: var(--gradient-light);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-glow-mix);
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.user-details {
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Sidebar */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    background: var(--bg-sidebar);
    z-index: 201;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.mobile-sidebar.active {
    transform: translateX(0);
}

.mobile-sidebar-header {
    padding: var(--space-2xl);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-sidebar);
}

.mobile-logo-img {
    height: 32px;
    width: auto;
}

.mobile-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.mobile-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-color: var(--error);
}

.mobile-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xl) 0;
}

.mobile-sidebar-footer {
    padding: var(--space-xl) var(--space-2xl);
    border-top: 1px solid var(--border-color);
    background: var(--bg-sidebar);
}

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

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

/* Top Header */
.top-header {
    height: var(--header-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-2xl);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

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

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
    background: var(--gradient-light);
    border-color: var(--primary);
    transform: scale(1.05);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
}

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

/* Header Icon Styles - Notification & Docs */
.header-icon-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.header-icon-link i {
    font-size: 1.25rem;
}

.header-icon-link:hover {
    background: var(--gradient-light);
    color: var(--primary);
    transform: translateY(-2px);
}

.header-icon-link:active {
    transform: translateY(0);
}

/* Notification badge container - ready for future implementation */
.notification-icon {
    position: relative;
}

/* Docs icon specific styles */
.docs-icon {
    /* No additional styles needed, inherits from .header-icon-link */
}

/* Content Wrapper */
.content-wrapper {
    padding: var(--space-2xl);
    min-height: calc(100vh - var(--header-height));
    background: var(--bg-secondary);
    position: relative;
    padding-bottom: 80px;
}

/* Page Card */
.page-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.page-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.page-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-lg);
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    color: var(--primary-light);
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    opacity: 0.7;
}

.empty-state h3 {
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: var(--shadow-glow-mix);
}

/* Footer */
.dashboard-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xl) var(--space-2xl);
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.bg-gradient-light {
    background: var(--gradient-light);
}

.shadow-glow {
    box-shadow: var(--shadow-glow-mix);
}

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

.mt-2 {
    margin-top: var(--space-sm);
}

.mt-3 {
    margin-top: var(--space-lg);
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    .sidebar .nav-text,
    .sidebar .user-details,
    .sidebar .nav-section-title {
        display: none;
    }
    .sidebar .nav-item {
        justify-content: center;
        padding: var(--space-lg) 0;
    }
    .sidebar .nav-item i {
        margin: 0;
        font-size: 1.25rem;
    }
    .sidebar .sidebar-footer .user-info {
        justify-content: center;
    }
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .top-header {
        padding: 0 var(--space-lg);
    }
    .content-wrapper {
        padding: var(--space-lg);
    }
    .page-title {
        font-size: 1.25rem;
    }
    .page-card {
        padding: var(--space-xl);
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-header,
    .mobile-menu-btn,
    .loading-overlay {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
    }
    .content-wrapper {
        padding: 0;
    }
    .page-card {
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    .page-card::before {
        display: none;
    }
}

/* Dropdown Navigation Styles */
.nav-dropdown {
    position: relative;
    width: 100%;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0.25rem 0.5rem;
}

.nav-dropdown-toggle:hover {
    background: var(--gradient-light);
    color: var(--primary);
}

.nav-dropdown-toggle i:first-child {
    width: 1.5rem;
    font-size: 1.1rem;
    color: var(--primary-light);
}

.nav-dropdown-toggle .nav-text {
    flex: 1;
    margin-left: 0.5rem;
}

.nav-dropdown-toggle .dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-tertiary);
}

.nav-dropdown.open .nav-dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    flex-direction: column;
    margin-left: 1.5rem;
    border-left: 1px solid var(--border-color);
}

.nav-dropdown.open .nav-dropdown-menu {
    display: flex;
}

.nav-dropdown-menu .nav-item {
    padding-left: 2rem !important;
}

.nav-dropdown-menu .nav-dropdown .nav-dropdown-toggle {
    padding-left: 1rem;
}

.nav-dropdown-menu .nav-dropdown-menu {
    margin-left: 1rem;
}

/* Active state for dropdown containers */
.nav-dropdown.active > .nav-dropdown-toggle {
    background: var(--gradient-primary);
    color: white;
}

.nav-dropdown.active > .nav-dropdown-toggle i,
.nav-dropdown.active > .nav-dropdown-toggle .nav-text {
    color: white;
}

/* Sidebar collapsed state adjustments */
.sidebar.collapsed .nav-dropdown-menu {
    display: none;
}

.sidebar.collapsed .nav-dropdown.open .nav-dropdown-menu {
    display: none;
}

/* Mobile dropdown styles */
.mobile-sidebar .nav-dropdown-toggle {
    padding: 0.875rem 1rem;
}

.mobile-sidebar .nav-dropdown-menu {
    margin-left: 1rem;
}
