/* =============================================
   PlusDataHub — Premium Design System
   Fintech-grade UI with glassmorphism & gradients
   ============================================= */

/* ─── IMPORTS ────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ─── CSS VARIABLES (Design Tokens) ──────── */
:root {
    /* Primary Palette (Constant) */
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --primary-glow: rgba(108, 92, 231, 0.2);

    /* Accent */
    --accent: #00D2FF;
    --accent-light: #7BDFFF;

    /* Status Colors (Accessible for Light Mode) */
    --success: #098E73;
    --success-bg: rgba(9, 142, 115, 0.1);
    --warning: #A77B06;
    --warning-bg: rgba(167, 123, 6, 0.1);
    --danger: #D63031;
    --danger-bg: rgba(214, 48, 49, 0.1);
    --info: #0984E3;
    --info-bg: rgba(9, 132, 227, 0.1);

    /* Light Theme (Default) */
    --bg-primary: #F8F9FD;
    --bg-secondary: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-solid: #FFFFFF;
    --bg-surface: rgba(240, 243, 250, 0.5);
    --bg-input: #FFFFFF;
    --bg-hover: rgba(108, 92, 231, 0.05);

    /* Text */
    --text-primary: #1A1A2E;
    --text-secondary: #525266;
    --text-muted: #71718A;
    --text-white: #FFFFFF;

    /* Borders */
    --border: rgba(108, 92, 231, 0.18);
    --border-light: rgba(0, 0, 0, 0.06);
    --border-active: rgba(108, 92, 231, 0.4);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6C5CE7, #A29BFE);
    --gradient-wallet: linear-gradient(135deg, #6C5CE7 0%, #00D2FF 100%);
    --gradient-success: linear-gradient(135deg, #00B894, #55EFC4);
    --gradient-danger: linear-gradient(135deg, #FF6B6B, #EE5A24);
    --gradient-mtn: linear-gradient(135deg, #FECA57, #FF9F43);
    --gradient-telecel: linear-gradient(135deg, #FF6B6B, #EE5A24);
    --gradient-airteltigo: linear-gradient(135deg, #0984E3, #74B9FF);
    --gradient-bg: linear-gradient(135deg, #F8F9FD 0%, #F0F4F7 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.1);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(108, 92, 231, 0.05);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-blur: blur(20px);

    /* Sidebar */
    --sidebar-width: 260px;
    --topbar-height: 88px;

    /* Spacing & Radius */
    --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px;
    --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-2xl: 24px; --radius-full: 9999px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;
}

[data-theme="dark"] {
    --bg-primary: #0A0A1A;
    --bg-secondary: #111128;
    --bg-card: rgba(22, 22, 50, 0.6);
    --bg-card-solid: #161632;
    --bg-surface: rgba(30, 30, 65, 0.5);
    --bg-input: rgba(30, 30, 65, 0.8);
    --bg-hover: rgba(108, 92, 231, 0.1);

    --text-primary: #EAEAFF;
    --text-secondary: #9E9EB8;
    --text-muted: #6B6B80;

    --border: rgba(108, 92, 231, 0.15);
    --border-light: rgba(255, 255, 255, 0.06);
    --border-active: rgba(108, 92, 231, 0.4);

    --gradient-bg: linear-gradient(135deg, #0A0A1A 0%, #111128 50%, #0F0C29 100%);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(108, 92, 231, 0.1);

    --glass-bg: rgba(22, 22, 50, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Assert Vibrant Status for Dark Mode */
    --success: #00B894;
    --success-bg: rgba(0, 184, 148, 0.12);
    --warning: #FDCB6E;
    --warning-bg: rgba(253, 203, 110, 0.12);
    --danger: #FF6B6B;
    --danger-bg: rgba(255, 107, 107, 0.12);
    --info: #74B9FF;
    --info-bg: rgba(116, 185, 255, 0.12);
}

/* ─── RESET ──────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

img { max-width: 100%; height: auto; }

/* ─── TYPOGRAPHY ─────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

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

.text-muted { color: var(--text-secondary); }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }

/* ─── LAYOUT ─────────────────────────────── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
    transition: var(--transition);
}

.page-content {
    padding: var(--space-md) var(--space-lg);
    max-width: none;
    margin: 0;
}

.page-header {
    margin-bottom: var(--space-xl);
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ─── SIDEBAR ────────────────────────────── */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-brand {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sidebar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-brand .brand-text span {
    color: var(--primary-light);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md) var(--space-md);
    overflow-y: auto;
}

.sidebar-nav .nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: var(--space-lg) var(--space-md) var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px var(--space-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    cursor: pointer;
}

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

.nav-item.active {
    color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
    box-shadow: inset 4px 0 0 var(--primary);
    font-weight: 700;
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

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

.sidebar-footer {
    padding: var(--space-lg) var(--space-md);
    border-top: 1px solid var(--border);
    text-align: center;
}

.sidebar-copyright {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.sidebar-copyright b {
    color: var(--text-secondary);
}

.hamburger-mobile {
    display: none;
}

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

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

.theme-toggle {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--primary);
    border-color: var(--primary-light);
}

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

.topbar-balance {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 16px;
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    font-size: 0.875rem;
}

.topbar-balance .balance-label {
    color: var(--text-secondary);
}

.topbar-balance .balance-amount {
    font-weight: 700;
    color: var(--success);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.topbar-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.topbar-user .user-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

/* ─── TOPBAR (NEW) ───────────────────────── */
.top-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--topbar-height);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    z-index: 900;
    transition: var(--transition);
}

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

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

.top-nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.top-nav-brand .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
}

.top-nav .page-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* Response Sidebar for Mobile */
@media (max-width: 1024px) {
    .main-content { margin-left: 0; }
    .top-nav { left: 0; padding: 0 var(--space-md); }
}

/* ─── GLASS CARD ─────────────────────────── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

/* ─── DASHBOARD METRICS ──────────────────── */
.stat-metric .stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-metric .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 8px 0;
    color: var(--text-primary);
}

.stat-metric .stat-footer {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── BUTTONS ────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
    color: white;
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

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

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

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

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-icon { padding: 10px; border-radius: var(--radius-md); }

.btn:disabled, .btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ─── FORM INPUTS ────────────────────────── */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.form-input.error {
    border-color: var(--danger);
}

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

.form-select option {
    background: var(--bg-card-solid);
    color: var(--text-primary);
}

/* ─── BADGES ─────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-delivered, .badge-success, .badge-active {
    background: var(--success-bg);
    color: var(--success);
}

.badge-pending, .badge-processing, .badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-failed, .badge-danger, .badge-suspended {
    background: var(--danger-bg);
    color: var(--danger);
}

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

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

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

/* ─── ALERTS ─────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
    animation: slideDown 0.4s ease;
    position: relative;
}

.alert-success { background: var(--success-bg); border: 1px solid rgba(0,184,148,0.2); color: var(--success); }
.alert-error { background: var(--danger-bg); border: 1px solid rgba(255,107,107,0.2); color: var(--danger); }
.alert-warning { background: var(--warning-bg); border: 1px solid rgba(253,203,110,0.2); color: var(--warning); }
.alert-info { background: var(--info-bg); border: 1px solid rgba(116,185,255,0.2); color: var(--info); }

.alert-icon { font-size: 1.1rem; }
.alert-message { flex: 1; }
.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
}
.alert-close:hover { opacity: 1; }

/* ─── ADMIN TABLE ENHANCEMENTS ─────────── */
.admin-card-header {
    background: #0F172A;
    padding: 15px 25px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.filter-row {
    background: white;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-light);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

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

.user-stack {
    display: flex;
    flex-direction: column;
}

.user-stack .main-text {
    font-weight: 700;
    color: var(--text-primary);
}

.user-stack .sub-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.role-select-box {
    display: flex;
    gap: 8px;
}

.role-select-box select {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
}

.btn-assign {
    padding: 6px 15px;
    font-size: 0.85rem;
    background: transparent;
    border: 1.5px solid #1E293B;
    color: #1E293B;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-assign:hover {
    background: #1E293B;
    color: white;
}

[data-theme="dark"] .filter-row {
    background: var(--bg-secondary);
}

[data-theme="dark"] .btn-assign {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-assign:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* ─── AUDIT PAGE STYLES ──────────────────── */
.audit-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.audit-sidebar {
    position: sticky;
    top: 20px;
}

.profile-audit-card {
    background: var(--bg-card-solid);
    border-radius: var(--radius-xl);
    padding: 30px;
    text-align: center;
    border: 1px solid var(--border);
}

.audit-avatar {
    width: 80px;
    height: 80px;
    background: #EFF6FF;
    color: #3B82F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.audit-info-box {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: left;
    margin: 20px 0;
}

.audit-info-item {
    margin-bottom: 15px;
}

.audit-info-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.audit-info-item span {
    font-weight: 600;
    color: var(--text-primary);
}

.audit-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card-branded {
    padding: 25px;
    border-radius: var(--radius-xl);
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card-branded.blue { background: #3B82F6; }
.stat-card-branded.dark { background: #1E293B; }

.stat-card-branded .icon-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    opacity: 0.15;
    transform: rotate(-15deg);
}

.manage-funds-box {
    background: var(--bg-card-solid);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 30px;
}

.funds-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 25px;
}

.tab-nav {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    padding: 10px 25px;
}

.tab-link {
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    padding-bottom: 12px;
    position: relative;
}

.tab-link.active {
    color: #3B82F6;
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #3B82F6;
}

@media (max-width: 1100px) {
    .audit-grid { grid-template-columns: 1fr; }
    .audit-sidebar { position: static; }
}

/* ─── TABLES ─────────────────────────────── */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

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

.data-table th {
    padding: 14px 18px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 18px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

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

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

/* ─── PAGINATION ─────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.pagination a {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: var(--bg-hover);
    color: var(--text-white);
    border-color: var(--primary);
}

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

/* ─── MODAL ──────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--space-xl);
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
}

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

.modal-header h3 {
    font-size: 1.125rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
    line-height: 1;
}

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

.modal-body { padding: var(--space-xl); }

.modal-footer {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--border);
}

/* ─── GRID SYSTEM ────────────────────────── */
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

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

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    animation: slideRight 0.4s ease;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-width: 300px;
    box-shadow: var(--shadow-lg);
}

.toast-success { background: rgba(0,184,148,0.9); color: white; }
.toast-error { background: rgba(255,107,107,0.9); color: white; }
.toast-info { background: rgba(108,92,231,0.9); color: white; }

/* ─── SKELETON LOADERS ───────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface) 0%, rgba(108,92,231,0.08) 50%, var(--bg-surface) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text:last-child { width: 60%; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-card { height: 120px; }

/* ─── ANNOUNCEMENT BANNER ────────────────── */
.announcement-banner {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-md) var(--space-xl);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    animation: slideDown 0.5s ease;
}

.announcement-banner.promo {
    border-color: rgba(108,92,231,0.3);
    background: rgba(108,92,231,0.08);
}
.announcement-banner.warning {
    border-color: rgba(253,203,110,0.3);
    background: rgba(253,203,110,0.08);
}
.announcement-banner.info {
    border-color: rgba(116,185,255,0.3);
    background: rgba(116,185,255,0.08);
}

.announcement-banner .banner-icon { font-size: 1.5rem; }
.announcement-banner .banner-content { flex: 1; }
.announcement-banner .banner-title { font-weight: 600; font-size: 0.95rem; color: var(--text-white); }
.announcement-banner .banner-message { font-size: 0.85rem; color: var(--text-secondary); }
.announcement-banner .banner-close {
    background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem;
}

/* ─── EMPTY STATE ────────────────────────── */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.4;
}

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

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

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

.animate-fade-in { animation: fadeIn 0.5s ease both; }
.animate-slide-up { animation: slideUp 0.5s ease both; }
.animate-slide-down { animation: slideDown 0.4s ease both; }
.animate-scale-in { animation: scaleIn 0.4s ease both; }

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ─── UTILITIES ──────────────────────────── */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }

/* ─── LAYOUT UTILITIES ───────────────────── */
.flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.flex-wrap { flex-wrap: wrap !important; }

.grid { display: grid !important; }
.grid-2 { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; }
.grid-3 { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; }
.grid-4 { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; }
.grid-12 { display: grid !important; grid-template-columns: repeat(12, 1fr) !important; }

.gap-sm { gap: var(--space-sm) !important; }
.gap-md { gap: var(--space-md) !important; }
.gap-lg { gap: var(--space-lg) !important; }
.gap-xl { gap: var(--space-xl) !important; }

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

/* ─── 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) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    
    .hamburger-mobile {
        display: flex;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1100;
        background: var(--bg-card-solid);
        border: 1px solid var(--border);
        color: var(--text-primary);
        width: 40px;
        height: 40px;
        border-radius: var(--radius-md);
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-md);
        cursor: pointer;
    }

    .page-content { padding: var(--space-md); }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    
    .modal {
        margin: var(--space-md);
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .page-content { padding: var(--space-sm); }
    .glass-card { padding: var(--space-md); border-radius: var(--radius-lg); }
    h1 { font-size: 1.5rem; }
    .hamburger-mobile { top: 15px; left: 15px; }
}

/* ─── SCROLLBAR ──────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-active);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
