/**
 * Modern CSS - PREVAED LMS
 * Con soporte para Dark/Light Theme
 */

/* ==================== THEME VARIABLES ==================== */
:root {
    /* Primary Colors - Teal */
    --primary: #0d9488;
    --primary-light: #14b8a6;
    --primary-dark: #0f766e;
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-rgb: 13, 148, 136;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    
    /* Light Theme (Default) */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #ffffff;
    --bg-input-focus: #ffffff;
    
    --text-primary: #1a1a2e;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Navbar */
    --navbar-bg: #ffffff;
    --navbar-border: #e2e8f0;
    
    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --sidebar-bg: linear-gradient(180deg, #0f766e 0%, #0d9488 100%);
    --sidebar-overlay: rgba(0, 0, 0, 0.5);
    
    /* Tables */
    --table-header-bg: #f8fafc;
    --table-row-hover: #f1f5f9;
    --table-border: #e2e8f0;
    
    /* Modals */
    --modal-bg: #ffffff;
    --modal-overlay: rgba(0, 0, 0, 0.5);
    
    /* Dropdowns */
    --dropdown-bg: #ffffff;
    --dropdown-hover: #f8fafc;
    --dropdown-border: #e2e8f0;
    
    /* Transitions */
    --transition: all 0.2s ease;
    --transition-theme: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ==================== DARK THEME ==================== */
[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-input: #1e293b;
    --bg-input-focus: #334155;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    --border-color: #334155;
    --border-light: #1e293b;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    
    --navbar-bg: #1e293b;
    --navbar-border: #334155;
    
    --sidebar-bg: linear-gradient(180deg, #134e4a 0%, #115e59 100%);
    --sidebar-overlay: rgba(0, 0, 0, 0.7);
    
    --table-header-bg: #1e293b;
    --table-row-hover: #334155;
    --table-border: #334155;
    
    --modal-bg: #1e293b;
    --modal-overlay: rgba(0, 0, 0, 0.7);
    
    --dropdown-bg: #1e293b;
    --dropdown-hover: #334155;
    --dropdown-border: #334155;
    
    --primary-50: rgba(13, 148, 136, 0.15);
    --primary-100: rgba(13, 148, 136, 0.25);
}

/* Dark theme specific overrides */
[data-theme="dark"] .bg-white {
    background-color: var(--bg-card) !important;
}

[data-theme="dark"] .bg-light {
    background-color: var(--bg-body) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .border {
    border-color: var(--border-color) !important;
}

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    color-scheme: light dark;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: var(--transition-theme);
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.sidebar-brand {
    font-weight: 600;
    font-size: 1rem;
    color: white;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.sidebar.collapsed .sidebar-brand {
    display: none;
}

/* Sidebar Menu */
.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
}

.menu-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 16px 12px 8px;
    white-space: nowrap;
}

.sidebar.collapsed .menu-header {
    display: none;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 400;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu a.active {
    background: rgba(255,255,255,0.15);
    color: white;
    font-weight: 500;
}

.sidebar-menu a i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-menu a span:not(.badge) {
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-menu a span:not(.badge) {
    display: none;
}

.sidebar-menu a .badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 20px;
}

.sidebar.collapsed .sidebar-menu a .badge {
    display: none;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-collapse {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-collapse:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.sidebar.collapsed .btn-collapse span {
    display: none;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--sidebar-overlay);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
    background: var(--bg-body);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ==================== NAVBAR ==================== */
.navbar-top {
    background: var(--navbar-bg);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--navbar-border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-theme);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-card-hover);
    border-radius: 8px;
    font-size: 1.3rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-toggle:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.navbar-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle Button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
    border-color: var(--primary);
}

/* Theme icons visibility */
.theme-icon-dark { display: none; }
.theme-icon-light { display: block; }

[data-theme="dark"] .theme-icon-dark { display: block; }
[data-theme="dark"] .theme-icon-light { display: none; }

.nav-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.nav-icon-btn:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

.nav-icon-btn i {
    font-size: 1.2rem;
}

.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--navbar-bg);
}

.badge-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: 9px;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 10px;
    transition: var(--transition);
}

.user-dropdown:hover {
    background: var(--bg-card-hover);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.user-info {
    text-align: left;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==================== CONTENT WRAPPER ==================== */
.content-wrapper {
    padding: 28px;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition-theme);
}

.card-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.card-header i {
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

.card-footer {
    background: var(--bg-card-hover);
    border-top: 1px solid var(--border-light);
    padding: 16px 20px;
}

/* ==================== STATS CARDS ==================== */
.stats-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stats-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stats-icon.primary {
    background: var(--primary-50);
    color: var(--primary);
}

.stats-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stats-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stats-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stats-icon.info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--info);
}

.stats-content {
    flex: 1;
    min-width: 0;
}

.stats-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 2px;
}

.stats-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ==================== TABLES ==================== */
.table {
    margin-bottom: 0;
    color: var(--text-primary);
}

.table thead th {
    background: var(--table-header-bg);
    border-bottom: 2px solid var(--table-border);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    padding: 14px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--table-border);
    vertical-align: middle;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: var(--table-row-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: var(--bg-card-hover);
}

/* ==================== BUTTONS ==================== */
.btn {
    font-family: inherit;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.btn-warning {
    background: var(--warning);
    border-color: var(--warning);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-info {
    background: var(--info);
    border-color: var(--info);
}

.btn-secondary {
    background: var(--text-muted);
    border-color: var(--text-muted);
}

.btn-light {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-light:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: 10px;
}

/* ==================== FORMS ==================== */
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--bg-input);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    background: var(--bg-input-focus);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    background-color: var(--bg-input);
    color: var(--text-primary);
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.input-group-text {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ==================== BADGES ==================== */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 6px;
}

.badge.bg-primary,
.bg-primary {
    background: var(--primary) !important;
}

.badge.bg-success,
.bg-success {
    background: var(--success) !important;
}

.badge.bg-warning,
.bg-warning {
    background: var(--warning) !important;
}

.badge.bg-danger,
.bg-danger {
    background: var(--danger) !important;
}

.badge.bg-info,
.bg-info {
    background: var(--info) !important;
}

.badge.bg-secondary,
.bg-secondary {
    background: var(--text-muted) !important;
}

/* ==================== ALERTS ==================== */
.alert {
    border-radius: 10px;
    border: none;
    padding: 14px 18px;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.alert-info {
    background: rgba(14, 165, 233, 0.1);
    color: #075985;
}

[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

[data-theme="dark"] .alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

[data-theme="dark"] .alert-info {
    background: rgba(14, 165, 233, 0.15);
    color: #7dd3fc;
}

/* ==================== MODALS ==================== */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    background: var(--modal-bg);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 24px;
    background: var(--modal-bg);
}

.modal-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    background: var(--modal-bg);
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 16px 24px;
    background: var(--modal-bg);
}

.btn-close {
    filter: var(--text-primary);
}

[data-theme="dark"] .btn-close {
    filter: invert(1);
}

/* ==================== PROGRESS ==================== */
.progress {
    height: 8px;
    border-radius: 4px;
    background: var(--bg-card-hover);
    overflow: hidden;
}

.progress-bar {
    background: var(--primary);
    border-radius: 4px;
}

.progress-bar.bg-success {
    background: var(--success) !important;
}

.progress-bar.bg-warning {
    background: var(--warning) !important;
}

.progress-bar.bg-danger {
    background: var(--danger) !important;
}

/* ==================== DROPDOWNS ==================== */
.dropdown-menu {
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
}

.dropdown-item {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.dropdown-item:hover {
    background: var(--dropdown-hover);
    color: var(--primary);
}

.dropdown-item i {
    width: 20px;
    margin-right: 8px;
    color: var(--text-light);
}

.dropdown-item:hover i {
    color: var(--primary);
}

.dropdown-header {
    color: var(--text-primary);
    font-weight: 600;
    padding: 8px 14px;
}

.dropdown-divider {
    border-color: var(--border-light);
}

/* Notifications Dropdown */
.notifications-dropdown {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
}

.notifications-dropdown .dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--dropdown-hover);
}

.notification-item.unread {
    background: var(--primary-50);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.evento { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.notification-icon.curso { background: rgba(5, 150, 105, 0.1); color: #059669; }
.notification-icon.mensaje { background: rgba(217, 119, 6, 0.1); color: #d97706; }
.notification-icon.sistema { background: var(--bg-card-hover); color: var(--text-muted); }

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notification-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ==================== PAGINATION ==================== */
.pagination {
    gap: 4px;
}

.page-link {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: var(--bg-card);
}

.page-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

.page-item.disabled .page-link {
    background: var(--bg-card-hover);
    color: var(--text-light);
}

/* ==================== LIST GROUPS ==================== */
.list-group-item {
    background: var(--bg-card);
    border-color: var(--border-light);
    color: var(--text-primary);
    padding: 14px 18px;
}

.list-group-item:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.list-group-item:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* ==================== QUICK ACTIONS ==================== */
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.quick-action:hover {
    border-color: var(--primary);
    border-style: solid;
    background: var(--primary-50);
    color: var(--primary);
}

.quick-action i {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.quick-action span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-state h5 {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ==================== TABS ==================== */
.nav-tabs {
    border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 12px 16px;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

.nav-pills .nav-link {
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 10px 16px;
}

.nav-pills .nav-link.active {
    background: var(--primary);
    color: white;
}

/* ==================== ACCORDION ==================== */
.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px !important;
    margin-bottom: 8px;
}

.accordion-button {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 500;
    border-radius: 10px !important;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-50);
    color: var(--primary);
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
}

.accordion-body {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ==================== TOOLTIPS ==================== */
.tooltip .tooltip-inner {
    background: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .user-info {
        display: none;
    }
    
    .user-dropdown .bi-chevron-down {
        display: none;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 16px;
    }
    
    .page-header h4 {
        font-size: 1.2rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }
    
    .stats-card {
        padding: 16px;
    }
    
    .stats-card .stats-number {
        font-size: 1.5rem;
    }
    
    .stats-card .stats-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .card-header {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .navbar-top {
        padding: 12px 16px;
    }
    
    .navbar-title {
        font-size: 0.95rem;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 576px) {
    .content-wrapper {
        padding: 12px;
    }
    
    .card {
        border-radius: 10px;
    }
    
    .breadcrumb {
        font-size: 0.75rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .dropdown-menu {
        min-width: 200px;
    }
    
    .notifications-dropdown {
        width: 280px;
    }
}

/* ==================== UTILITIES ==================== */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-muted) !important; }

.border-primary { border-color: var(--primary) !important; }

.rounded-lg { border-radius: 12px !important; }
.rounded-xl { border-radius: 16px !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* ==================== SCROLLBAR DARK MODE ==================== */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-body);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ==================== SELECTION ==================== */
::selection {
    background: var(--primary);
    color: white;
}