/* =============================================================
   styles.css — Complete Modern Design System
   Single Source of Truth for all global styles
   ============================================================= */

/* -------------------------
   Fonts
------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800;900&display=swap");

/* -------------------------
   CSS Variables — Complete Design Token System
------------------------- */
:root {
    /* ================= BRAND COLORS ================= */
    --primary: #1a0262;
    --primary-dark: #0f013b;
    --primary-soft: #f0edfa;

    --secondary: #820b5c;
    --secondary-light: #ab1e80;
    --secondary-dark: #56043b;
    --secondary-soft: #fbf0f7;

    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fbbf24;
    --accent-soft: #fef3c7;

    --success: #10b981;
    --success-dark: #059669;
    --success-light: #34d399;
    --success-soft: #d1fae5;

    --warning: #f59e0b;
    --warning-dark: #d97706;
    --warning-soft: #fef3c7;

    --danger: #ef4444;
    --danger-dark: #dc2626;
    --danger-light: #f87171;
    --danger-soft: #fee2e2;

    --info: #3b82f6;
    --info-dark: #2563eb;
    --info-light: #60a5fa;
    --info-soft: #dbeafe;

    /* ================= NEUTRAL SCALE ================= */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* ================= SURFACE ================= */
    --bg-main: var(--bg, #f8fafc);
    --bg-card: var(--card-bg, #ffffff);
    --bg-hover: color-mix(in srgb, var(--primary) 8%, var(--bg, #f8fafc));
    --bg-sidebar: color-mix(in srgb, var(--primary) 80%, #000);
    --bg-sidebar-hover: var(--primary);
    --bg-dark: color-mix(in srgb, var(--primary) 80%, #000);

    /* ================= TEXT ================= */
    --text-color: var(--text, #1e293b);
    --text-muted: #64748b;
    --text-light: #f8fafc;

    /* ================= BORDER ================= */
    --border: color-mix(in srgb, var(--primary) 12%, transparent);
    --border-light: color-mix(in srgb, var(--primary) 6%, transparent);

    /* ================= GRADIENTS ================= */
    --gradient-primary: linear-gradient(
        135deg,
        var(--primary-dark),
        var(--primary)
    );
    --gradient-secondary: linear-gradient(135deg, var(--secondary), var(--secondary));
    --gradient-success: linear-gradient(
        135deg,
        var(--success),
        var(--success-light)
    );
    --gradient-danger: linear-gradient(
        135deg,
        var(--danger),
        var(--danger-light)
    );
    --gradient-warning: linear-gradient(
        135deg,
        var(--warning),
        var(--accent-light)
    );
    --gradient-info: linear-gradient(135deg, var(--info), var(--info-light));
    --gradient-premium: linear-gradient(135deg, var(--primary), var(--secondary), var(--secondary));
    --gradient-sunset: linear-gradient(135deg, var(--danger), var(--warning), var(--warning-light));
    --gradient-ocean: linear-gradient(135deg, var(--info), var(--info), var(--primary));
    --gradient-glass: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0.02)
    );
    --gradient-mesh:
        radial-gradient(
            circle at 0% 0%,
            var(--primary-soft) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 100% 100%,
            var(--secondary-soft) 0%,
            transparent 50%
        );

    /* ================= TYPOGRAPHY ================= */
    --font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", monospace;

    /* ================= RADIUS ================= */
    --radius-xs: 4px;
    --radius-sm: 4px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 6px;
    --radius-2xl: 8px;
    --radius-full: 9999px;

    /* ================= SHADOW ================= */
    --shadow-xs: 0 1px 1px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 10px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-inner: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 10px rgba(26, 2, 98, 0.15);

    /* ================= TRANSITIONS ================= */
    --transition-fast: 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ================= Z-INDEX ================= */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1080;
    --z-toast: 1100;

    /* ================= SIDEBAR ================= */
    --sidebar-width: 210px;
    --sidebar-collapsed: 60px;
    --header-height: 46px;

    /* ================= BOOTSTRAP OVERRIDES ================= */
    --bs-primary: var(--primary);
    --bs-secondary: var(--secondary);
    --bs-success: var(--success);
    --bs-danger: var(--danger);
    --bs-warning: var(--warning);
    --bs-info: var(--info);
    --bs-body-bg: var(--bg-main);
    --bs-body-color: var(--text-color);
    --bs-border-color: var(--border);
    --bs-border-radius: var(--radius-md);
}

/* ========== DARK THEME SUPPORT ========== */
[data-theme="dark"] {
    --bg-main: #0a051d;
    --bg-card: #120e2e;
    --bg-hover: #1c1642;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.15);
    --border-light: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 4px 10px rgba(0, 0, 0, 0.7);
}

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

html {
    font-size: 110%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: 0.81rem; /* Compact body font size (approx 13px) */
    line-height: 1.4;
    color: var(--text-color);
    background: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}

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

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

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

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

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    z-index: var(--z-fixed);
    transition: width var(--transition-base);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    gap: 0.75rem;
}

.sidebar-brand .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.sidebar-brand .brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    line-height: 1.2;
}

.sidebar-brand .brand-text small {
    font-weight: 400;
    opacity: 0.5;
    font-size: 0.65rem;
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}

.nav-section {
    padding: 0.5rem 1.25rem 0.3rem;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.25);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.25rem;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.8rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    white-space: nowrap;
    position: relative;
}

.nav-link:hover {
    color: #fff;
    background: var(--bg-sidebar-hover);
}

.nav-link.active {
    color: #fff;
    background: rgba(109, 40, 217, 0.15);
    border-left-color: var(--primary);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.nav-link .badge {
    margin-left: auto;
    font-size: 0.6rem;
    padding: 0.15rem 0.45rem;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ========== MAIN CONTENT ========== */
.app-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: margin-left var(--transition-base);
    display: flex;
    flex-direction: column;
}

.app-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-sidebar {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.toggle-sidebar:hover {
    background: var(--gray-200);
    color: var(--text-color);
}

.page-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon-header {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: transparent;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-icon-header .notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid #fff;
}

.app-content {
    padding: 1.5rem;
    flex: 1;
}

/* ========== SIDEBAR COLLAPSED ========== */
.app-sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.app-sidebar.collapsed .nav-link span,
.app-sidebar.collapsed .nav-section,
.app-sidebar.collapsed .brand-text small,
.app-sidebar.collapsed .sidebar-footer .flex-grow-1,
.app-sidebar.collapsed .sidebar-brand .brand-text {
    display: none;
}

.app-sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 0;
}

.app-sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.6rem;
    border-left: none;
}

.app-sidebar.collapsed .nav-link i {
    margin: 0;
    font-size: 1.1rem;
}

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

/* ========== MOBILE OVERLAY ========== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: calc(var(--z-fixed) - 1);
}

/* ========== COMPONENT STYLES ========== */

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 0.35rem 0.6rem !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}

.card .card-body {
    padding: 0.5rem 0.6rem !important;
}

.card .card-footer {
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 0.35rem 0.6rem !important;
}

/* Stat Cards */
.stat-card {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

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

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

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 0.5rem;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
    margin-bottom: 0;
}

.table thead th {
    padding: 0.35rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    height: 28px;
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
}
.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    color: #fff;
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: #fff;
    border: none;
}

.btn-success {
    background: var(--gradient-success);
    color: #fff;
    border: none;
}

.btn-danger {
    background: var(--gradient-danger);
    color: #fff;
    border: none;
}

.btn-warning {
    background: var(--gradient-warning);
    color: var(--secondary);
    border: none;
}

.btn-info {
    background: var(--gradient-info);
    color: #fff;
    border: none;
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid #64748b;
    color: #64748b;
}
.btn-outline-secondary:hover {
    background: #64748b;
    color: #fff;
}

.btn-outline-success {
    background: transparent;
    border: 1px solid #22c55e;
    color: #22c55e;
}
.btn-outline-success:hover {
    background: #22c55e;
    color: #fff;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
}
.btn-outline-danger:hover {
    background: #ef4444;
    color: #fff;
}

.btn-outline-warning {
    background: transparent;
    border: 1px solid #f59e0b;
    color: #f59e0b;
}
.btn-outline-warning:hover {
    background: #f59e0b;
    color: #fff;
}

.btn-outline-info {
    background: transparent;
    border: 1px solid #06b6d4;
    color: #06b6d4;
}
.btn-outline-info:hover {
    background: #06b6d4;
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
}

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

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}
.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-primary {
    background: var(--primary-soft);
    color: var(--primary);
}
.badge-success {
    background: var(--success-soft);
    color: var(--success-dark);
}
.badge-danger {
    background: var(--danger-soft);
    color: var(--danger-dark);
}
.badge-warning {
    background: var(--accent-soft);
    color: var(--accent-dark);
}
.badge-info {
    background: var(--info-soft);
    color: var(--info-dark);
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 0.6rem !important;
}

.form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--text-color);
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.3rem 0.5rem;
    font-size: 0.78rem;
    font-family: var(--font-family);
    color: var(--text-color);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    outline: none;
    height: 28px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 2, 98, 0.1);
}

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

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.filter-bar .form-control,
.filter-bar .form-select {
    width: auto;
    min-width: 160px;
}

/* Alert / Toast */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.alert-success {
    background: var(--success-soft);
    color: var(--success-dark);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: var(--danger-soft);
    color: var(--danger-dark);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-left: 4px solid var(--accent);
}

.alert-info {
    background: var(--info-soft);
    color: var(--info-dark);
    border-left: 4px solid var(--info);
}

/* Dropdown */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    background: var(--bg-card);
}

.dropdown-item {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

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

.dropdown-item i {
    width: 18px;
    text-align: center;
}

.dropdown-divider {
    margin: 0.25rem 0;
    border-color: var(--border);
}

/* Modal */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb-item a {
    color: var(--text-muted);
}
.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 600;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: var(--text-muted);
    padding-right: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.page-link {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.page-link:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

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

.progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    transition: width var(--transition-slow);
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid var(--border);
    gap: 0;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--text-color);
    border-bottom-color: var(--gray-300);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

.nav-pills {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.nav-tabs {
    border-bottom: 2px solid var(--border) !important;
}

/* Tooltip */
.tooltip {
    font-size: 0.75rem;
    font-family: var(--font-family);
}

/* ========== UTILITY CLASSES ========== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-muted {
    color: var(--text-muted);
}

.bg-soft-primary {
    background: var(--primary-soft);
}
.bg-soft-success {
    background: var(--success-soft);
}
.bg-soft-danger {
    background: var(--danger-soft);
}
.bg-soft-warning {
    background: var(--accent-soft);
}
.bg-soft-info {
    background: var(--info-soft);
}

.bg-gradient-primary {
    background: var(--gradient-primary);
    color: #fff;
}
.bg-gradient-success {
    background: var(--gradient-success);
    color: #fff;
}
.bg-gradient-danger {
    background: var(--gradient-danger);
    color: #fff;
}
.bg-gradient-warning {
    background: var(--gradient-warning);
}
.bg-gradient-info {
    background: var(--gradient-info);
    color: #fff;
}
.bg-gradient-premium {
    background: var(--gradient-premium);
    color: #fff;
}

.glass {
    background: var(--gradient-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.shadow-glow {
    box-shadow: var(--shadow-glow);
}
.hover-lift {
    transition: transform var(--transition-bounce);
}
.hover-lift:hover {
    transform: translateY(-3px);
}

.animate-fade-in {
    animation: fadeIn var(--transition-slow) ease forwards;
}
.animate-slide-up {
    animation: slideUp var(--transition-slow) ease forwards;
}
.animate-scale-in {
    animation: scaleIn var(--transition-bounce) ease forwards;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gap-xs {
    gap: 0.35rem;
}
.gap-sm {
    gap: 0.5rem;
}
.gap-md {
    gap: 1rem;
}
.gap-lg {
    gap: 1.5rem;
}
.gap-xl {
    gap: 2rem;
}

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

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

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

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

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

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

.shimmer {
    background: linear-gradient(
        90deg,
        var(--gray-100) 25%,
        var(--gray-50) 50%,
        var(--gray-100) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .app-main {
        margin-left: 0 !important;
    }

    .app-content {
        padding: 1rem;
    }

    .app-header {
        padding: 0 1rem;
    }

    .table-container {
        border-radius: var(--radius-sm);
    }

    .filter-bar .form-control,
    .filter-bar .form-select {
        width: 100%;
        min-width: auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .app-content {
        padding: 1.25rem;
    }
}

/* ========== NOTIFICATION DROPDOWN ========== */
.notif-dropdown {
    width: 360px;
    max-height: 480px;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.notif-dropdown .notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 0.85rem;
}
.notif-dropdown .notif-header small {
    opacity: 0.8;
}
.notif-dropdown .notif-body {
    max-height: 340px;
    overflow-y: auto;
}
.notif-dropdown .notif-footer {
    border-top: 1px solid var(--border-color);
}
.notif-dropdown .notif-view-all {
    display: block;
    text-align: center;
    padding: 10px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.notif-dropdown .notif-view-all:hover {
    background: var(--bg-light);
}
.notif-item {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
    cursor: pointer;
}
.notif-item:hover {
    background: var(--bg-light);
}
.notif-item.unread {
    background: #f0f7ff;
}
.notif-item .notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
}
.notif-item .notif-content {
    flex: 1;
    min-width: 0;
}
.notif-item .notif-content .notif-title {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-item .notif-content .notif-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.notif-item .notif-dot-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
}
.notif-loading {
    padding: 2rem 0;
}
.notif-empty {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* =============================================================
   University Cards
   ============================================================= */
.uni-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.uni-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.uni-card-logo {
    position: relative;
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}
.uni-card-logo a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.uni-card-logo img {
    width: 100%;
    height: 100%;
    padding: 5px;
    object-fit: contain;
}
.no-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.uni-card-content {
    padding: 20px;
    flex: 1;
}
.uni-title-link {
    text-decoration: none;
}
.uni-title-link h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    transition: color 0.2s;
    line-height: 1.3;
}
.uni-title-link:hover h3 {
    color: var(--primary);
}
.uni-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.uni-location i {
    font-size: 0.8rem;
}
.uni-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}
.uni-website {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    padding: 5px 0;
    transition: gap 0.2s;
}
.uni-website:hover {
    gap: 8px;
    color: var(--primary-dark);
}
.uni-card-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid var(--border);
}

/* =============================================================
   Course Cards
   ============================================================= */
.course-card {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1) !important;
}
.course-uni-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}
.course-card .card-body {
    padding: 0.6rem !important;
}
.course-card .card-title {
    font-size: 0.82rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 600;
}
.course-card .badge {
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
}

/* =============================================================
   Global Spacing Scaling & Utility Overrides (High-Density Overhaul)
   ============================================================= */
.p-1 {
    padding: 2px !important;
}
.p-2 {
    padding: 4px !important;
}
.p-3 {
    padding: 8px !important;
}
.p-4 {
    padding: 12px !important;
}
.p-5 {
    padding: 16px !important;
}

.px-1 {
    padding-left: 2px !important;
    padding-right: 2px !important;
}
.px-2 {
    padding-left: 4px !important;
    padding-right: 4px !important;
}
.px-3 {
    padding-left: 8px !important;
    padding-right: 8px !important;
}
.px-4 {
    padding-left: 12px !important;
    padding-right: 12px !important;
}
.px-5 {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

.py-1 {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}
.py-2 {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}
.py-3 {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}
.py-4 {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}
.py-5 {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

.pt-1 {
    padding-top: 2px !important;
}
.pt-2 {
    padding-top: 4px !important;
}
.pt-3 {
    padding-top: 8px !important;
}
.pt-4 {
    padding-top: 12px !important;
}
.pt-5 {
    padding-top: 16px !important;
}

.pb-1 {
    padding-bottom: 2px !important;
}
.pb-2 {
    padding-bottom: 4px !important;
}
.pb-3 {
    padding-bottom: 8px !important;
}
.pb-4 {
    padding-bottom: 12px !important;
}
.pb-5 {
    padding-bottom: 16px !important;
}

.ps-1 {
    padding-left: 2px !important;
}
.ps-2 {
    padding-left: 4px !important;
}
.ps-3 {
    padding-left: 8px !important;
}
.ps-4 {
    padding-left: 12px !important;
}
.ps-5 {
    padding-left: 16px !important;
}

.pe-1 {
    padding-right: 2px !important;
}
.pe-2 {
    padding-right: 4px !important;
}
.pe-3 {
    padding-right: 8px !important;
}
.pe-4 {
    padding-right: 12px !important;
}
.pe-5 {
    padding-right: 16px !important;
}

.m-1 {
    margin: 2px !important;
}
.m-2 {
    margin: 4px !important;
}
.m-3 {
    margin: 8px !important;
}
.m-4 {
    margin: 12px !important;
}
.m-5 {
    margin: 16px !important;
}

.mx-1 {
    margin-left: 2px !important;
    margin-right: 2px !important;
}
.mx-2 {
    margin-left: 4px !important;
    margin-right: 4px !important;
}
.mx-3 {
    margin-left: 8px !important;
    margin-right: 8px !important;
}
.mx-4 {
    margin-left: 12px !important;
    margin-right: 12px !important;
}
.mx-5 {
    margin-left: 16px !important;
    margin-right: 16px !important;
}

.my-1 {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}
.my-2 {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}
.my-3 {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
}
.my-4 {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
}
.my-5 {
    margin-top: 16px !important;
    margin-bottom: 16px !important;
}

.mt-1 {
    margin-top: 2px !important;
}
.mt-2 {
    margin-top: 4px !important;
}
.mt-3 {
    margin-top: 8px !important;
}
.mt-4 {
    margin-top: 12px !important;
}
.mt-5 {
    margin-top: 16px !important;
}

.mb-1 {
    margin-bottom: 2px !important;
}
.mb-2 {
    margin-bottom: 4px !important;
}
.mb-3 {
    margin-bottom: 8px !important;
}
.mb-4 {
    margin-bottom: 12px !important;
}
.mb-5 {
    margin-bottom: 16px !important;
}

.ms-1 {
    margin-left: 2px !important;
}
.ms-2 {
    margin-left: 4px !important;
}
.ms-3 {
    margin-left: 8px !important;
}
.ms-4 {
    margin-left: 12px !important;
}
.ms-5 {
    margin-left: 16px !important;
}

.me-1 {
    margin-right: 2px !important;
}
.me-2 {
    margin-right: 4px !important;
}
.me-3 {
    margin-right: 8px !important;
}
.me-4 {
    margin-right: 12px !important;
}
.me-5 {
    margin-right: 16px !important;
}

.g-1,
.gx-1,
.gy-1 {
    --bs-gutter-x: 4px !important;
    --bs-gutter-y: 4px !important;
}
.g-2,
.gx-2,
.gy-2 {
    --bs-gutter-x: 8px !important;
    --bs-gutter-y: 8px !important;
}
.g-3,
.gx-3,
.gy-3 {
    --bs-gutter-x: 12px !important;
    --bs-gutter-y: 12px !important;
}
.g-4,
.gx-4,
.gy-4 {
    --bs-gutter-x: 16px !important;
    --bs-gutter-y: 16px !important;
}
.g-5,
.gx-5,
.gy-5 {
    --bs-gutter-x: 20px !important;
    --bs-gutter-y: 20px !important;
}

/* Typographical Density Scale */
h1 {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
}
h2 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
}
h3 {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
}
h4 {
    font-size: 0.92rem !important;
    font-weight: 600 !important;
}
h5 {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
}
h6 {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
}

/* =============================================================
   ADMIN DASHBOARD STYLES
   ============================================================= */

/* ── HERO SECTION ── */
.dash-hero {
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-dark) 50%,
        #0a0028 100%
    );
    border-radius: 14px;
    padding: 1.5rem 1.8rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}
.dash-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(
        circle,
        rgba(130, 11, 92, 0.3) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}
.dash-hero::after {
    content: "";
    position: absolute;
    bottom: -40%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(
        circle,
        rgba(245, 158, 11, 0.15) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}
.dash-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.dash-hero-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}
.dash-hero-sub {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    max-width: 420px;
}

/* ── DIGITAL CLOCK ── */
.digital-clock-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.7rem 1.2rem;
    text-align: center;
    min-width: 150px;
}
.digital-clock-card .time-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.3rem;
}
.digital-clock-card #main-time {
    font-family: "Orbitron", monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.digital-clock-card #seconds {
    font-family: "Orbitron", monospace;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--accent);
    line-height: 1;
}
.digital-clock-card .date-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ── GLASS BUTTONS ── */
.btn-glass {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    transition: all 0.2s;
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}
.btn-glass-accent {
    background: var(--accent);
    color: #1a0262;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-glass-accent:hover {
    background: var(--accent-dark);
    color: #1a0262;
}

/* ── THIS MONTH STRIP ── */
.dash-month-strip {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.dash-month-item {
    background: #fff;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1;
    min-width: 180px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}
.month-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.month-num {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}
.month-lbl {
    font-size: 0.7rem;
    color: var(--text-muted, #6b7280);
    margin-top: 0.15rem;
}

/* ── TODAY STRIP ── */
.today-strip {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.today-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    flex: 1;
    min-width: 160px;
    text-align: center;
    border: 1px solid #f0f0f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border-top: 3px solid var(--tc-color);
}
.today-icon {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}
.today-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--tc-color);
    line-height: 1;
}
.today-lbl {
    font-size: 0.68rem;
    color: var(--text-muted, #6b7280);
    margin-top: 0.15rem;
}

/* ── PIPELINE ── */
.dash-pipeline {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.dash-pipeline-step {
    background: #fff;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    flex: 1;
    min-width: 100px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.pipeline-count {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}
.pipeline-label {
    font-size: 0.68rem;
    color: var(--text-muted, #6b7280);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── MINI BAR ── */
.mini-bar {
    height: 4px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}
.mini-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
    transition: width 0.4s ease;
}

/* ── STAT ROWS (CHARTS) ── */
.stat-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.stat-row.reverse {
    grid-template-columns: 1fr 1.2fr;
}
@media (max-width: 900px) {
    .stat-row,
    .stat-row.reverse {
        grid-template-columns: 1fr;
    }
}

/* ── CHART CONTAINERS ── */
.sc-body {
    contain: layout style;
}
.sc-body canvas {
    max-height: 280px;
    width: 100% !important;
    height: auto !important;
}
.sc-body #statusChart {
    max-height: 220px;
    min-height: 180px;
    width: 100% !important;
}
.uni-stat .sc-body canvas {
    max-height: 320px;
}

/* ── CARD HEADERS ── */
.sc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.sc-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
}
.sc-icon {
    width: 28px;
    height: 28px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.sc-body {
    padding: 1rem;
}

/* ── GROWTH BADGE ── */
.growth-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.growth-up {
    background: var(--success-soft);
    color: var(--success-dark);
}
.growth-down {
    background: var(--danger-soft);
    color: var(--danger-dark);
}

/* ── STATUS PILLS ── */
.status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
    justify-content: center;
}
.s-pill {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── TOP RANKING ROWS ── */
.top-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 1100px) {
    .top-row {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 700px) {
    .top-row {
        grid-template-columns: 1fr;
    }
}

.rank-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f5f5f5;
}
.rank-row:last-child {
    border-bottom: none;
}
.rank-no {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
    background: #f0f0f0;
    color: var(--text-muted, #6b7280);
}
.rk-gold {
    background: #fbbf24;
    color: #92400e;
}
.rk-silver {
    background: #e5e7eb;
    color: #4b5563;
}
.rk-bronze {
    background: #fcd34d;
    color: #92400e;
}
.rk-other {
    background: #f3f4f6;
    color: #9ca3af;
}
.rank-name {
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

/* ── AGENT AVATAR ── */
.agent-ava {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.agent-ava-ph {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── VIEW ALL LINK ── */
.view-all {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.view-all:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ── APPS TABLE ── */
.apps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.apps-table th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted, #6b7280);
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.apps-table td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.apps-table tbody tr:hover {
    background: #f9fafb;
}
.app-name {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.app-name:hover {
    text-decoration: underline;
}

/* ── STATUS BADGE ── */
.status-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

/* ── DROPDOWN ICON BUTTON ── */
.btn-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: var(--text-muted, #6b7280);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}
.btn-icon:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: var(--primary);
}

/* ── ACTIVITY FEED ── */
.act-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 1100px) {
    .act-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 700px) {
    .act-grid {
        grid-template-columns: 1fr;
    }
}

.act-feed {
    list-style: none;
    margin: 0;
    padding: 0;
}
.act-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.act-item:hover {
    background: #f9fafb;
}
.act-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.35rem;
    flex-shrink: 0;
}
.dot-stu {
    background: var(--primary);
}
.dot-app {
    background: var(--info);
}
.dot-doc {
    background: var(--accent);
}
.act-desc {
    font-size: 0.76rem;
    color: #374151;
    line-height: 1.3;
}
.act-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.15rem;
    font-size: 0.65rem;
    color: var(--text-muted, #9ca3af);
}
.act-user {
    font-weight: 500;
    color: var(--primary);
}
.act-time {
    color: var(--text-muted, #9ca3af);
}

.p2 {
    padding: 0.5rem;
}

/* ── TEXT MUTED ── */
.text-muted {
    color: var(--text-muted, #6b7280) !important;
}

/* ── COMPACT SIDEBAR & PAGE HEADER ── */
.sidebar-brand {
    height: 46px !important;
    padding: 0 0.8rem !important;
}
.sidebar-brand .brand-logo {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.8rem !important;
}
.sidebar-brand .brand-text {
    font-size: 0.85rem !important;
}
.nav-link {
    padding: 0.38rem 0.8rem !important;
    font-size: 0.76rem !important;
}
.nav-section {
    padding: 0.4rem 0.8rem 0.2rem !important;
    font-size: 0.58rem !important;
}
.sidebar-footer {
    padding: 0.6rem 0.8rem !important;
}
.sidebar-footer .user-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.78rem !important;
}
.app-header {
    height: 46px !important;
    padding: 0 0.8rem !important;
}
.app-content {
    padding: 0.6rem 0.8rem !important;
}
.toggle-sidebar {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
}
.btn-icon-header {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.85rem !important;
}
.page-title {
    font-size: 0.85rem !important;
}
.breadcrumb {
    font-size: 0.75rem !important;
}
.pagination {
    margin-top: 0.8rem !important;
}
.page-link {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
}

/* =============================================================
   Alert System — Unified Global Alerts
   ============================================================= */
.alert-custom {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}
.alert-custom .alert-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    flex-shrink: 0;
}
.alert-success .alert-icon { background: rgba(25,135,84,.15); }
.alert-danger  .alert-icon { background: rgba(220,53,69,.15); }
.alert-warning .alert-icon { background: rgba(255,193,7,.15); }
.alert-info    .alert-icon { background: rgba(13,202,240,.15); }

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

/* =============================================================
   File Preview Modal — Minimal
   ============================================================= */
.previewable { cursor: pointer; }
#previewModal .modal-content { background: transparent; box-shadow: none; }
#previewModal .modal-body { padding: 0; }
#previewModal .modal-dialog { max-width: 95vw; margin: 2vh auto; }
.preview-close {
    position: absolute; top: 12px; right: 12px; z-index: 10;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0,0,0,0.5); border: none;
    color: #fff; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.15s;
}
.preview-close:hover { background: rgba(0,0,0,0.7); }
.preview-download {
    position: absolute; top: 12px; right: 56px; z-index: 10;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0,0,0,0.5); border: none;
    color: #fff; font-size: 1rem;
    display: none; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.15s;
}
.preview-download:hover { background: rgba(0,0,0,0.7); }
.preview-frame {
    width: 100%; min-height: 85vh; border: none; border-radius: 4px;
}
