/* VTSaga Dark Theme CSS */
/* Modern dark theme with colored sidebar categories */

:root {
    /* Background Colors */
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --bg-card: #1e1e1e;
    --bg-hover: #2a2a2a;
    --bg-input: #151515;

    /* Border Colors */
    --border-primary: #333333;
    --border-secondary: #2a2a2a;
    --border-focus: #7c3aed;

    /* Text Colors */
    --text-primary: #e5e5e5;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --text-disabled: #444444;

    /* Accent Colors */
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-light: rgba(124, 58, 237, 0.15);
    --primary-dark: #5b21b6;

    /* Category Colors */
    --cat-content: #3b82f6;
    --cat-content-light: rgba(59, 130, 246, 0.15);
    --cat-marketing: #10b981;
    --cat-marketing-light: rgba(16, 185, 129, 0.15);
    --cat-commerce: #f59e0b;
    --cat-commerce-light: rgba(245, 158, 11, 0.15);
    --cat-academy: #8b5cf6;
    --cat-academy-light: rgba(139, 92, 246, 0.15);
    --cat-media: #ec4899;
    --cat-media-light: rgba(236, 72, 153, 0.15);
    --cat-business: #06b6d4;
    --cat-business-light: rgba(6, 182, 212, 0.15);
    --cat-suite: #6366f1;
    --cat-suite-light: rgba(99, 102, 241, 0.15);
    --cat-settings: #64748b;
    --cat-settings-light: rgba(100, 116, 139, 0.15);

    /* Status Colors */
    --success: #10b981;
    --success-hover: #059669;
    --success-light: rgba(16, 185, 129, 0.15);

    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-light: rgba(245, 158, 11, 0.15);

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: rgba(239, 68, 68, 0.15);

    --info: #3b82f6;
    --info-hover: #2563eb;
    --info-light: rgba(59, 130, 246, 0.15);

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-sm: 4px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

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

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-width);
    min-width: 200px;
    max-width: 400px;
    background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
    border-right: 1px solid var(--border-primary);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.sidebar-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 1001;
    transition: background 0.2s;
}

.sidebar-resize-handle:hover,
.sidebar-resize-handle.dragging {
    background: rgba(124, 58, 237, 0.5);
}

.sidebar-resize-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.2s;
}

.sidebar-resize-handle:hover::after {
    opacity: 1;
    background: rgba(255, 255, 255, 0.4);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(124, 58, 237, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.sidebar-logo i {
    font-size: 1.75rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.5));
}

.sidebar-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-primary) transparent;
}

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

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 4px;
}

/* Category Sections */
.nav-category {
    margin-bottom: 4px;
}

.nav-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    margin: 0 8px;
    border-radius: 6px;
}

.nav-category-header:hover {
    background: var(--bg-hover);
}

.nav-category-header .cat-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-category-header .cat-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.nav-category-header .cat-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-category-header .cat-chevron {
    font-size: 0.7rem;
    transition: transform var(--transition-fast);
    color: var(--text-muted);
}

.nav-category.open .cat-chevron {
    transform: rotate(180deg);
}

/* Category Colors */
.nav-category.cat-content .nav-category-header { border-left-color: var(--cat-content); }
.nav-category.cat-content .cat-icon { background: var(--cat-content-light); color: var(--cat-content); }
.nav-category.cat-content .cat-name { color: var(--cat-content); }
.nav-category.cat-content.open .nav-category-header { background: var(--cat-content-light); }

.nav-category.cat-marketing .nav-category-header { border-left-color: var(--cat-marketing); }
.nav-category.cat-marketing .cat-icon { background: var(--cat-marketing-light); color: var(--cat-marketing); }
.nav-category.cat-marketing .cat-name { color: var(--cat-marketing); }
.nav-category.cat-marketing.open .nav-category-header { background: var(--cat-marketing-light); }

.nav-category.cat-commerce .nav-category-header { border-left-color: var(--cat-commerce); }
.nav-category.cat-commerce .cat-icon { background: var(--cat-commerce-light); color: var(--cat-commerce); }
.nav-category.cat-commerce .cat-name { color: var(--cat-commerce); }
.nav-category.cat-commerce.open .nav-category-header { background: var(--cat-commerce-light); }

.nav-category.cat-academy .nav-category-header { border-left-color: var(--cat-academy); }
.nav-category.cat-academy .cat-icon { background: var(--cat-academy-light); color: var(--cat-academy); }
.nav-category.cat-academy .cat-name { color: var(--cat-academy); }
.nav-category.cat-academy.open .nav-category-header { background: var(--cat-academy-light); }

.nav-category.cat-media .nav-category-header { border-left-color: var(--cat-media); }
.nav-category.cat-media .cat-icon { background: var(--cat-media-light); color: var(--cat-media); }
.nav-category.cat-media .cat-name { color: var(--cat-media); }
.nav-category.cat-media.open .nav-category-header { background: var(--cat-media-light); }

.nav-category.cat-business .nav-category-header { border-left-color: var(--cat-business); }
.nav-category.cat-business .cat-icon { background: var(--cat-business-light); color: var(--cat-business); }
.nav-category.cat-business .cat-name { color: var(--cat-business); }
.nav-category.cat-business.open .nav-category-header { background: var(--cat-business-light); }

.nav-category.cat-suite .nav-category-header { border-left-color: var(--cat-suite); }
.nav-category.cat-suite .cat-icon { background: var(--cat-suite-light); color: var(--cat-suite); }
.nav-category.cat-suite .cat-name { color: var(--cat-suite); }
.nav-category.cat-suite.open .nav-category-header { background: var(--cat-suite-light); }

.nav-category.cat-settings .nav-category-header { border-left-color: var(--cat-settings); }
.nav-category.cat-settings .cat-icon { background: var(--cat-settings-light); color: var(--cat-settings); }
.nav-category.cat-settings .cat-name { color: var(--cat-settings); }
.nav-category.cat-settings.open .nav-category-header { background: var(--cat-settings-light); }

/* Category Items */
.nav-category-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
    background: rgba(0, 0, 0, 0.2);
    margin: 0 8px;
    border-radius: 0 0 6px 6px;
}

.nav-category.open .nav-category-items {
    max-height: 500px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 44px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    font-size: 0.875rem;
}

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

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

.nav-item i {
    width: 18px;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.7;
}

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

/* Dashboard Link (standalone) */
.nav-dashboard {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    margin: 8px 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.nav-dashboard:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, rgba(124, 58, 237, 0.2) 100%);
    border-color: rgba(124, 58, 237, 0.5);
    transform: translateX(2px);
}

.nav-dashboard.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.nav-dashboard i {
    font-size: 1.1rem;
}

.nav-dashboard span {
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

/* Header */
.main-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Main Body */
.main-body {
    flex: 1;
    padding: 32px;
}

/* ==================== FORMS - DARK THEME ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label .required {
    color: var(--danger);
}

/* All Input Types - Dark Theme */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="color"],
textarea,
select,
.form-input,
.form-select,
.form-textarea,
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: var(--border-radius);
    color: var(--text-primary) !important;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
textarea:focus,
select:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light);
    background: var(--bg-tertiary) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
}

/* Select dropdown styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    padding-right: 40px !important;
    cursor: pointer;
}

select option {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    padding: 10px;
}

/* Textarea */
textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Checkbox and Radio */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    background: var(--bg-input) !important;
    border: 2px solid var(--border-primary) !important;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

input[type="checkbox"] {
    border-radius: 4px;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* File Input */
input[type="file"] {
    padding: 10px;
    background: var(--bg-input) !important;
    border: 2px dashed var(--border-primary) !important;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: var(--primary) !important;
    background: var(--bg-tertiary) !important;
}

input[type="file"]::file-selector-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    margin-right: 12px;
    font-weight: 500;
}

/* Range Input */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

/* Form Help Text */
.form-help,
.form-text {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-error,
.invalid-feedback {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--danger);
}

.is-invalid {
    border-color: var(--danger) !important;
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group input,
.input-group select {
    border-radius: 0;
}

.input-group input:first-child,
.input-group select:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group input:last-child,
.input-group select:last-child {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.input-group-text {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

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

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

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-hover) 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-hover) 0%, #047857 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-hover) 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-hover) 0%, #b91c1c 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-hover) 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-hover) 0%, #b45309 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--border-radius);
}

/* ==================== TABLES ==================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-primary);
}

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

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
}

.table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.table td {
    color: var(--text-primary);
    background: var(--bg-card);
}

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

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

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

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

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

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

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

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: transform var(--transition-normal);
}

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

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-primary);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-secondary);
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 4px solid;
}

.alert-success {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
}

.alert-warning {
    background: var(--warning-light);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-danger {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

.alert-info {
    background: var(--info-light);
    border-color: var(--info);
    color: var(--info);
}

/* ==================== TABS ==================== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 24px;
    gap: 4px;
}

.tab {
    padding: 12px 20px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    background: transparent;
    border: none;
    font-size: 0.9rem;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ==================== DROPDOWNS ==================== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-primary);
    margin: 8px 0;
}

/* ==================== AVATAR ==================== */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.25rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.5rem; }

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-item {
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-item:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.pagination-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== LOADING ==================== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-primary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .main-body {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        width: 95%;
        max-height: 95vh;
    }
}
