/* =============================================
   Design System variables
   ============================================= */
   :root {
    --primary: #7C3AED;
    --primary-light: #EDE9FE;
    --primary-dark: #5B21B6;
    
    --accent: #D97706; /* Gold/Amber */
    
    --success: #059669;
    --success-light: #D1FAE5;
    --warning: #D97706;
    --warning-light: #FEF3C7;
    --danger: #DC2626;
    --danger-light: #FEE2E2;
    --info: #2563EB;
    --info-light: #DBEAFE;
    
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    --white: #FFFFFF;
    --black: #000000;
    
    --font-family: 'Inter', system-ui, sans-serif;
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --sidebar-width: 260px;
    --header-height: 70px;
}

/* =============================================
   Reset & Base Styles
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: #F3F4F6; /* var(--gray-100) */
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: var(--font-family); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font-family); }

/* =============================================
   Typography
   ============================================= */
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--gray-900); line-height: 1.2; }

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

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-width: 0;
}

.app-container.sidebar-collapsed .main-wrapper {
    margin-left: 0;
}

/* =============================================
   Sidebar
   ============================================= */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    border-right: 1px solid var(--gray-200);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.app-container.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--gray-100);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.logo-text h2 {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    color: var(--gray-500);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.menu-label {
    padding: 0 24px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.sidebar-menu ul li a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}

.sidebar-menu ul li a i {
    font-size: 18px;
    margin-right: 12px;
    color: var(--gray-400);
    transition: color 0.2s;
}

.sidebar-menu ul li a:hover {
    background-color: var(--gray-50);
    color: var(--primary);
}

.sidebar-menu ul li a:hover i {
    color: var(--primary);
}

.sidebar-menu ul li a.active {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    border-right-color: var(--primary);
}

.sidebar-menu ul li a.active i {
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-100);
    text-align: center;
}

/* =============================================
   Topbar
   ============================================= */
.topbar {
    height: var(--header-height);
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    font-size: 20px;
    color: var(--gray-600);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.menu-toggle:hover {
    background-color: var(--gray-100);
}

.breadcrumb ul {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumb ul li {
    color: var(--gray-500);
}

.breadcrumb ul li a {
    color: var(--gray-600);
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb ul li a:hover {
    color: var(--primary);
}

.breadcrumb ul li:last-child span {
    color: var(--gray-900);
    font-weight: 600;
}

.breadcrumb .separator {
    margin: 0 8px;
    font-size: 16px;
    color: var(--gray-400);
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--gray-600);
    transition: all 0.2s;
    position: relative;
}

.topbar-btn:hover {
    background-color: var(--gray-100);
    color: var(--primary);
}

.badge-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--white);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background 0.2s;
}

.user-profile:hover {
    background-color: var(--gray-50);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-800);
}

.user-role {
    font-size: 11px;
    color: var(--gray-500);
}

/* =============================================
   Dropdown Components
   ============================================= */
.dropdown-wrapper { position: relative; }

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 280px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 50;
}

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

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.dropdown-list {
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--gray-700);
    transition: background 0.2s;
}

.dropdown-item i {
    font-size: 16px;
    margin-right: 10px;
    color: var(--gray-400);
}

.dropdown-item:hover {
    background-color: var(--gray-50);
}

.dropdown-item.text-danger:hover { background-color: var(--danger-light); color: var(--danger); }
.dropdown-item.text-danger:hover i { color: var(--danger); }

.dropdown-divider { height: 1px; background-color: var(--gray-100); margin: 4px 0; }

.dropdown-footer {
    display: block;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.dropdown-footer:hover { text-decoration: underline; }

/* =============================================
   Page Content container
   ============================================= */
.page-content {
    flex: 1;
    padding: 24px 32px;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i { color: var(--primary); }

.page-subtitle {
    color: var(--gray-500);
    margin-top: 4px;
    font-size: 14px;
}

.footer {
    padding: 20px 32px;
    background-color: var(--white);
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

/* =============================================
   Cards
   ============================================= */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i { color: var(--gray-400); }

.card-body { padding: 24px; }

/* =============================================
   Stat Cards
   ============================================= */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--gray-300);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Colors for Stat Cards */
.stat-card.purple::after { background: var(--primary); }
.stat-card.purple .stat-icon { background: var(--primary-light); color: var(--primary); }

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

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

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

.stat-card.blue::after { background: var(--info); }
.stat-card.blue .stat-icon { background: var(--info-light); color: var(--info); }

/* =============================================
   Buttons
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s;
    text-align: center;
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
.btn-icon-circle { border-radius: 50%; padding: 10px; }

.w-full { width: 100%; display: flex; }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary { background: var(--gray-200); color: var(--gray-800); }
.btn-secondary:hover { background: var(--gray-300); }

.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #047857; }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #B91C1C; }

.btn-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--gray-900); }

.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }

.btn:disabled, .btn.disabled { opacity: 0.6; cursor: not-allowed; }

/* =============================================
   Forms
   ============================================= */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

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

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background-color: var(--white);
    color: var(--gray-900);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder { color: var(--gray-400); }

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

.form-hint { font-size: 11px; color: var(--gray-500); margin-top: 4px; }

.search-bar {
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-bar .form-control {
    padding-left: 40px;
    border-radius: 20px;
}

/* =============================================
   Tables
   ============================================= */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

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

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

.table th {
    background-color: var(--gray-50);
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table td { background-color: var(--white); font-size: 14px; vertical-align: middle; }

.table tbody tr:hover td { background-color: var(--gray-50); }

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

/* =============================================
   Badges
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-secondary { background: var(--gray-100); color: var(--gray-700); }
.badge-success { background: var(--success-light); color: #065F46; }
.badge-warning { background: var(--warning-light); color: #92400E; }
.badge-danger { background: var(--danger-light); color: #991B1B; }
.badge-info { background: var(--info-light); color: #1E40AF; }
.badge-dark { background: var(--gray-800); color: var(--white); }

/* =============================================
   Alerts & Toasts
   ============================================= */
.alert {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.alert i { font-size: 20px; margin-top: -2px; }

.alert-success { background: var(--success-light); color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger { background: var(--danger-light); color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: var(--warning-light); color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: var(--info-light); color: #1E40AF; border: 1px solid #BFDBFE; }

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
    animation: slideIn 0.3s ease forwards;
}

.toast-success { border-left-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-danger { border-left-color: var(--danger); }
.toast-danger .toast-icon { color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-icon { font-size: 20px; }
.toast span { flex: 1; }
.toast-close { font-size: 18px; color: var(--gray-400); }
.toast-close:hover { color: var(--gray-600); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* =============================================
   Modals
   ============================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 24, 39, 0.7);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

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

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-overlay.show .modal { transform: scale(1); }

/* Ensure form inside modal doesn't break flex layout */
.modal form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.modal-lg { max-width: 800px; }

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.modal-title i { color: var(--primary); }

.modal-close {
    font-size: 20px;
    color: var(--gray-400);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.modal-close:hover { background: var(--gray-100); color: var(--gray-900); }

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* =============================================
   Utilities
   ============================================= */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 24px; }
.ml-2 { margin-left: 8px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 { font-size: 16px; color: var(--gray-700); margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--gray-500); }

/* Progress Bar */
.progress {
    background: var(--gray-200);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.5s ease;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 24px;
    gap: 8px;
}

.tab-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover { color: var(--gray-900); background: var(--gray-50); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Tooltip implementation */
[data-tooltip] { direction: ltr; position: relative; }
[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    background: var(--gray-900); color: white; padding: 6px 10px; font-size: 11px;
    border-radius: var(--radius-sm); white-space: nowrap;
    opacity: 0; visibility: hidden; transition: 0.2s;
    pointer-events: none; z-index: 100; margin-bottom: 5px;
}
[data-tooltip]::after {
    content: ''; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: var(--gray-900);
    opacity: 0; visibility: hidden; transition: 0.2s; margin-bottom: -5px; z-index: 100;
}
[data-tooltip]:hover::before, [data-tooltip]:hover::after { opacity: 1; visibility: visible; }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .app-container .sidebar { transform: translateX(-100%); width: 280px; }
    .app-container.sidebar-mobile-open .sidebar { transform: translateX(0); box-shadow: 0 0 0 10000px rgba(0,0,0,0.5); }
    .main-wrapper { margin-left: 0; }
    
    .mobile-toggle { display: block; }
    .page-content { padding: 16px; }
    
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    
    .page-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .stat-card { padding: 16px; }
}
