:root {
    --primary: #0f61a8;
    --primary-light: #5b9fd9;
    --primary-dark: #073d7a;
    --secondary: #00b4a6;
    --accent: #f57c00;
    --success: #059669;
    --danger: #dc2626;
    --warning: #f59e0b;
    --sidebar-w: 280px;
    --topbar-h: 68px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.25s ease-out;
    --font: "Google Sans Flex", sans-serif;
    --mono: "JetBrains Mono", monospace;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.09);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] {
    --bg: #f8f9fc;
    --bg2: #ffffff;
    --bg3: #f3f4f7;
    --surface: #ffffff;
    --surface2: #f8f9fc;
    --surface3: #eff1f5;
    --border: rgba(0, 0, 0, 0.08);
    --border2: rgba(0, 0, 0, 0.12);
    --border3: rgba(0, 0, 0, 0.06);
    --text: #0f1419;
    --text2: #4a5568;
    --text3: #8b92a8;
    --text4: #cbd1dc;
    --subtle: rgba(0, 0, 0, 0.04);
    --divider: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
    --bg: #0f1219;
    --bg2: #1a1f2e;
    --bg3: #242b3d;
    --surface: #16202f;
    --surface2: #1d263a;
    --surface3: #242b3d;
    --border: rgba(255, 255, 255, 0.08);
    --border2: rgba(255, 255, 255, 0.12);
    --border3: rgba(255, 255, 255, 0.06);
    --text: #f0f2f8;
    --text2: #cbd1dc;
    --text3: #8b92a8;
    --text4: #4a5568;
    --subtle: rgba(255, 255, 255, 0.04);
    --divider: rgba(255, 255, 255, 0.06);
    --bs-body-bg: #151e2b;
    --bs-table-bg: #021121;
}

[data-theme="dark"] .table > :not(caption) > * > * {
    --bs-table-bg: #151e2b;
    --bs-table-color: #eee9e9;
    border-bottom-color: #0f1219;
}

[data-theme="dark"] .select2-container {
    --bs-paper-bg: #151e2b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    transition:
        background var(--transition),
        color var(--transition);
}

a {
    text-decoration: none;
}

/* ═══ SIDEBAR ═══ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--surface);
    /* border-right: 1px solid var(--border); */
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition:
        transform var(--transition),
        background var(--transition);
    overflow: hidden;
}

[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--border);
}

.sidebar-logo {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    min-height: var(--topbar-h);
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(15, 97, 168, 0.15);
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.nav-section {
    padding: 8px 0;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text3);
    padding: 12px 20px;
    margin-bottom: 2px;
}

.nav-item {
    margin: 0 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    position: relative;
}

[dir="rtl"] .nav-link {
    text-align: right;
}

.nav-link:hover {
    background: var(--surface3);
    color: var(--text);
}

.nav-link.active {
    background: linear-gradient(
        135deg,
        rgba(15, 97, 168, 0.08),
        rgba(91, 159, 217, 0.06)
    );
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

[dir="rtl"] .nav-link.active {
    border-left: none;
    border-right: 3px solid var(--primary);
}

.nav-link i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding-right: 8px;
    width: 100%;
}

[dir="rtl"] .nav-dropdown-toggle {
    justify-content: space-between;
}

.nav-dropdown-toggle .arrow {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    font-size: 15px;
    transition: transform var(--transition);
    font-weight: 800;
}

[dir="rtl"] .nav-dropdown-toggle .arrow {
    margin-left: 0;
    margin-right: auto;
}

.nav-link.open .arrow {
    transform: rotate(-180deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
}

.nav-submenu.open {
    max-height: 400px;
}

.nav-sublink {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    margin-left: 26px;
    border-radius: 6px;
    color: var(--text3);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
}

[dir="rtl"] .nav-sublink {
    margin-left: 0;
    margin-right: 26px;
}

.nav-sublink:hover {
    background: var(--surface3);
    color: var(--text2);
    padding-left: 18px;
}

[dir="rtl"] .nav-sublink:hover {
    padding-left: 14px;
    padding-right: 18px;
}

.nav-sublink.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-badge {
    margin-left: auto;
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

[dir="rtl"] .nav-badge {
    margin-left: 0;
    margin-right: auto;
}

.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.user-profile:hover {
    background: var(--surface3);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}
.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.user-role {
    font-size: 11px;
    color: var(--text3);
}

/* ═══ TOPBAR ═══ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    background: var(--surface);
    /* border-bottom: 1px solid var(--border); */
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 20px;
    z-index: 900;
    transition:
        left var(--transition),
        right var(--transition);
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .topbar {
    background-color: rgba(22, 32, 47, 0.8);
}

[dir="rtl"] .topbar {
    left: 0;
    right: var(--sidebar-w);
}

.search-box {
    position: relative;
    max-width: 320px;
    flex: 1;
}

.search-box input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 14px 9px 36px;
    font-family: var(--font);
    font-size: 13px;
    color: var(--text);
    transition: all var(--transition);
    outline: none;
}

[dir="rtl"] .search-box input {
    padding: 9px 36px 9px 14px;
}

/* ─── Form ─── */
.form-group {
    margin-top: 1.3rem;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.3px;
    color: var(--text);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-input,
.form-control,
.form-select {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    transition: all var(--transition);
    outline: none;
}

.form-input::placeholder,
.form-control::placeholder,
.form-select::placeholder {
    color: var(--text3);
}

.form-input:hover,
.form-control:hover,
.form-select:hover {
    border-color: var(--border2);
}

.form-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(15, 97, 168, 0.06);
}

/* ─── Form Options ─── */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    cursor: pointer;
    background: var(--bg3);
}

.checkbox:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.checkbox-input {
    display: none;
}

.checkbox-input:checked + .checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-input:checked + .checkbox::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.checkbox-label {
    color: var(--text2);
    cursor: pointer;
    user-select: none;
}

.search-box input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(15, 97, 168, 0.06);
}

.search-box input::placeholder {
    color: var(--text3);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text3);
    font-size: 14px;
}

[dir="rtl"] .search-icon {
    left: auto;
    right: 12px;
}

.topbar-spacer {
    margin-left: auto;
}
[dir="rtl"] .topbar-spacer {
    margin-left: 0;
    margin-right: auto;
}

.topbar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    font-size: 16px;
    padding: 0;
}

.icon-btn:hover {
    background: var(--surface3);
    color: var(--text);
    border-color: var(--border2);
}

.badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--surface);
    animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.divider {
    width: 1px;
    height: 28px;
    background: var(--border);
}

/* ═══ NOTIFICATIONS DROPDOWN ═══ */
.notif-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-height: 520px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--transition);
    pointer-events: none;
    overflow: hidden;
    z-index: 2000;
}

[dir="rtl"] .notif-dropdown-menu {
    right: auto;
    left: 0;
}

.notif-dropdown-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
}

.notif-header h5 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.notif-header a {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.notif-list {
    max-height: 380px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--divider);
    transition: background var(--transition);
    cursor: pointer;
}

.notif-item:hover {
    background: var(--surface2);
}
.notif-item.unread {
    background: rgba(15, 97, 168, 0.04);
}

.notif-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.notif-body {
    flex: 1;
}
.notif-body p {
    font-size: 13px;
    color: var(--text2);
    margin: 0;
    line-height: 1.5;
}
.notif-body strong {
    color: var(--text);
}
.notif-time {
    font-size: 11px;
    color: var(--text3);
    margin-top: 4px;
}

.notif-read {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-footer {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.notif-footer a {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ═══ MAIN CONTENT ═══ */
.main {
    margin-left: var(--sidebar-w);
    padding-top: var(--topbar-h);
    min-height: 100vh;
    transition: margin var(--transition);
}

[dir="rtl"] .main {
    margin-left: 0;
    margin-right: var(--sidebar-w);
}

.content {
    padding: 32px;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

body .loader {
    font-family: FontAwesome;
    content: "";
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: var(--bs-body-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s;
    z-index: 1010;
    overflow: hidden;
}

/* ═══ PAGE HEADER ═══ */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    color: var(--text);
}

.page-header p {
    font-size: 14px;
    color: var(--text2);
    margin: 0;
}

.breadcrumb-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
}

.breadcrumb-custom span {
    color: var(--text3);
}
.breadcrumb-custom .sep {
    color: var(--text4);
}
.breadcrumb-custom .current {
    color: var(--primary);
    font-weight: 600;
}

/* ═══ STAT CARDS ═══ */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    animation: slideUp 0.4s ease-out backwards;
}

.card {
    border: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card:hover {
    border-color: var(--border2);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.stat-card.blue .stat-icon {
    background: rgba(15, 97, 168, 0.1);
    color: var(--primary);
}
.stat-card.teal .stat-icon {
    background: rgba(0, 180, 166, 0.1);
    color: var(--secondary);
}
.stat-card.orange .stat-icon {
    background: rgba(245, 124, 0, 0.1);
    color: var(--accent);
}
.stat-card.green .stat-icon {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success);
}

.stat-label {
    font-size: 12px;
    color: var(--text3);
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.stat-change.up {
    color: var(--success);
}
.stat-change.down {
    color: var(--danger);
}

.stat-spark {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 60px;
    opacity: 0.6;
}

/* ═══ PANEL ═══ */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    animation: slideUp 0.4s ease-out backwards;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--divider);
}

.panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.panel-subtitle {
    font-size: 12px;
    color: var(--text3);
    margin-top: 2px;
}

.panel-actions {
    display: flex;
    gap: 8px;
}

.panel-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text2);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}

.panel-btn:hover {
    background: var(--surface3);
    color: var(--text);
}

.panel-btn.active {
    background: linear-gradient(
        135deg,
        rgba(15, 97, 168, 0.1),
        rgba(0, 180, 166, 0.08)
    );
    color: var(--primary);
    border-color: var(--primary);
}

.panel-body {
    padding: 20px 24px;
}

/* ═══ CHARTS ═══ */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 180px;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bar-wrap {
    flex: 1;
    display: flex;
    align-items: flex-end;
    width: 100%;
    gap: 3px;
}

.bar {
    flex: 1;
    border-radius: 3px 3px 0 0;
    min-height: 3px;
    animation: barGrow 0.6s cubic-bezier(0.34, 0.1, 0.68, 0.55) backwards;
}

@keyframes barGrow {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

.bar-label {
    font-size: 11px;
    color: var(--text3);
}

.bar-blue {
    background: linear-gradient(
        to top,
        var(--primary),
        rgba(91, 159, 217, 0.4)
    );
}
.bar-teal {
    background: linear-gradient(
        to top,
        var(--secondary),
        rgba(0, 180, 166, 0.4)
    );
}

.chart-svg {
    width: 100%;
    height: 200px;
}

.legend-row {
    display: flex;
    gap: 24px;
    font-size: 12px;
    margin-top: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ═══ TABLE ═══ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text3);
    padding: 12px 16px;
    text-align: left;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

[dir="rtl"] .data-table th {
    text-align: right;
}

.data-table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--divider);
    color: var(--text2);
}

.data-table tr:hover td {
    background: var(--subtle);
}

.td-strong {
    color: var(--text) !important;
    font-weight: 600;
}

.progress-bar {
    height: 4px;
    background: var(--surface3);
    border-radius: 4px;
    overflow: hidden;
    width: 80px;
}
.progress-fill {
    height: 100%;
    border-radius: 4px;
    animation: barGrow 0.8s ease-out backwards;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-status::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

.badge-active {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success);
}
.badge-active::before {
    background: var(--success);
}
.badge-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}
.badge-pending::before {
    background: var(--warning);
}
.badge-paused {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}
.badge-paused::before {
    background: var(--danger);
}

/* ═══ DONUT ═══ */
.donut-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
}

.donut-svg {
    transform: rotate(-90deg);
}
.donut-circle {
    fill: none;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease-out;
}
.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-value {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--text);
}
.donut-label {
    font-size: 11px;
    color: var(--text3);
    margin-top: 2px;
}

/* ═══ ACTIVITY FEED ═══ */
.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--divider);
    animation: fadeIn 0.3s ease-out backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-body {
    flex: 1;
}
.activity-body p {
    font-size: 12.5px;
    color: var(--text2);
    margin: 0;
    line-height: 1.5;
}
.activity-body strong {
    color: var(--text);
}
.activity-time {
    font-size: 11px;
    color: var(--text3);
    margin-top: 4px;
}

/* ═══ SKELETON LOADERS ═══ */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--surface2) 0%,
        var(--surface3) 50%,
        var(--surface2) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.8s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.skel-line {
    height: 12px;
    margin-bottom: 10px;
}
.skel-circle {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    margin-bottom: 16px;
}
.skel-text {
    height: 10px;
    width: 60%;
}
.skel-chart {
    height: 160px;
    margin-top: 10px;
}
.skel-row {
    height: 48px;
    margin-bottom: 4px;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    [dir="rtl"] .sidebar {
        transform: translateX(100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .topbar {
        left: 0;
        right: 0;
    }
    [dir="rtl"] .topbar {
        left: 0;
        right: 0;
    }
    .main {
        margin-left: 0;
        margin-right: 0;
    }
    .overlay {
        display: block;
    }
    .content {
        padding: 24px;
    }
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.hamburger {
    display: none;
    cursor: pointer;
}
@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }
}

/* ═══ CONTROLS BAR ═══ */
.controls-bar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.control-pill {
    display: flex;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.control-pill button {
    padding: 6px 11px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    background: none;
    color: var(--text3);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}

.control-pill button.active {
    background: var(--primary);
    color: white;
}

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text3);
}

/* Animation delays */
.delay-1 {
    animation-delay: 0.05s;
}
.delay-2 {
    animation-delay: 0.1s;
}
.delay-3 {
    animation-delay: 0.15s;
}
.delay-4 {
    animation-delay: 0.2s;
}
