/* ========================================
   CYBERX — USER DASHBOARD STYLES
   ======================================== */

/* ---- Layout ---- */
.dash-layout {
    display: flex;
    min-height: 100vh;
    background: var(--darker);
    font-family: var(--font-body);
}

/* Light Theme Dashboard Overrides */
html.light-theme .dash-layout { background: #f0f2f5; }
html.light-theme .dash-sidebar { background: #ffffff; border-color: rgba(0,0,0,0.06); }
html.light-theme .sidebar-header { border-color: rgba(0,0,0,0.06); }
html.light-theme .sidebar-user-name { color: var(--text-heading); }
html.light-theme .dash-topbar { background: rgba(255,255,255,0.8); border-color: rgba(0,0,0,0.06); }
html.light-theme .topbar-search { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
html.light-theme .topbar-user { border-left-color: rgba(0,0,0,0.06); }
html.light-theme [dir="rtl"].light-theme .topbar-user { border-right-color: rgba(0,0,0,0.06); }
html.light-theme .topbar-btn { border-color: rgba(0,0,0,0.08); background: #ffffff; }
html.light-theme .welcome-banner { background: linear-gradient(135deg, rgba(0, 240, 255, 0.04) 0%, rgba(123, 47, 247, 0.04) 100%); border-color: rgba(0, 240, 255, 0.1); }
html.light-theme .welcome-name { color: var(--text-heading); }
html.light-theme .welcome-status { color: #008855; }
html.light-theme .welcome-quick-stat { background: rgba(255,255,255,0.6); border-color: rgba(0,0,0,0.05); }
html.light-theme .welcome-quick-stat .qs-val { color: var(--text-heading); }
html.light-theme .stat-card-dash, 
html.light-theme .chart-card,
html.light-theme .dash-table-wrap { background: #ffffff; border-color: rgba(0,0,0,0.06); box-shadow: 0 4px 15px rgba(0,0,0,0.04); }
html.light-theme .stat-card-value,
html.light-theme .donut-center .pct,
html.light-theme .dash-table td { color: var(--text-heading); }
html.light-theme .chart-tab { border-color: rgba(0,0,0,0.08); }
html.light-theme .activity-item { border-bottom-color: rgba(0,0,0,0.04); }
html.light-theme .activity-item p { color: var(--text); }
html.light-theme .topbar-search input { color: var(--text); }

/* ---- Sidebar ---- */
.dash-sidebar {
    width: 260px;
    min-height: 100vh;
    background: #08081a;
    border-right: 1px solid rgba(0, 240, 255, 0.06);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[dir="rtl"] .dash-sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid rgba(0, 240, 255, 0.06);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header .logo-icon {
    width: 36px;
    height: 36px;
}

.sidebar-header .logo-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.sidebar-group {
    margin-bottom: 8px;
}

.sidebar-group-label {
    padding: 8px 24px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    opacity: 0.6;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    position: relative;
}

[dir="rtl"] .sidebar-link {
    text-align: right;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 0 4px 4px 0;
    transition: height 0.25s ease;
}

[dir="rtl"] .sidebar-link::before {
    left: auto;
    right: 0;
    border-radius: 4px 0 0 4px;
}

.sidebar-link:hover {
    color: var(--primary);
    background: rgba(0, 240, 255, 0.03);
}

.sidebar-link.active {
    color: var(--primary);
    background: rgba(0, 240, 255, 0.06);
    font-weight: 600;
}

.sidebar-link.active::before {
    height: 24px;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.sidebar-link .badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-family: var(--font-mono);
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
}

[dir="rtl"] .sidebar-link .badge {
    margin-left: 0;
    margin-right: auto;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 240, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.sidebar-user-role {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.sidebar-footer-actions {
    display: flex;
    gap: 6px;
}

.sidebar-footer-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.08);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.25s ease;
}

.sidebar-footer-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 240, 255, 0.04);
}

/* ---- Main Content ---- */
.dash-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[dir="rtl"] .dash-main {
    margin-left: 0;
    margin-right: 260px;
}

/* ---- Top Bar ---- */
.dash-topbar {
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 240, 255, 0.06);
    background: rgba(8, 8, 26, 0.8);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 16px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.08);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 240, 255, 0.06);
    border-radius: 12px;
    min-width: 280px;
    transition: all 0.3s ease;
}

.topbar-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.06);
}

.topbar-search i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.topbar-search input {
    border: none;
    background: none;
    outline: none;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    width: 100%;
}

.topbar-search input::placeholder {
    color: rgba(136, 136, 160, 0.5);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.25s ease;
}

[dir="rtl"] .topbar-user {
    padding-left: 0;
    padding-right: 12px;
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-user:hover .sidebar-user-name {
    color: var(--primary);
}

.topbar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.topbar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topbar-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.08);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    position: relative;
}

.topbar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 240, 255, 0.04);
}

.topbar-btn .notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

/* ---- Content Area ---- */
.dash-content {
    flex: 1;
    padding: 28px 32px;
    overflow-y: auto;
}

/* ---- Welcome Banner ---- */
.welcome-banner {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, rgba(123, 47, 247, 0.08) 100%);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 20px;
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.welcome-left {
    flex: 1;
}

.welcome-greeting {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.welcome-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.welcome-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--accent);
}

.welcome-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: dotBlink 1.5s ease-in-out infinite;
}

@keyframes dotBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.welcome-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.welcome-quick-stat {
    text-align: center;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    border: 1px solid rgba(0, 240, 255, 0.06);
}

.welcome-quick-stat .qs-val {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
}

.welcome-quick-stat .qs-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.welcome-action {
    padding: 12px 24px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.welcome-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.25);
}

/* ---- Stat Cards ---- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card-dash {
    background: rgba(13, 13, 43, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 240, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card-dash::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card-dash:hover {
    border-color: rgba(0, 240, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.stat-card-dash:hover::after {
    transform: scaleX(1);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(123, 47, 247, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
}

.stat-card-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
}

.stat-card-trend.up {
    color: var(--accent);
}

.stat-card-trend.down {
    color: var(--accent-red);
}

.stat-card-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---- Chart Containers ---- */
.charts-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.chart-card {
    background: rgba(13, 13, 43, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 240, 255, 0.06);
    border-radius: 18px;
    padding: 24px;
    position: relative;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-header h4 {
    font-size: 0.95rem;
}

.chart-tabs {
    display: flex;
    gap: 4px;
}

.chart-tab {
    padding: 5px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.08);
    background: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.chart-tab.active,
.chart-tab:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    border-color: transparent;
    font-weight: 600;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 200px;
    padding: 0 10px;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bar {
    width: 100%;
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    transition: height 1s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
}

.bar:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.bar-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
}

.bar-val {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--primary);
    white-space: nowrap;
}

/* Donut Chart */
.donut-wrap {
    display: flex;
    align-items: center;
    gap: 28px;
}

.donut-chart {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.donut-chart svg {
    transform: rotate(-90deg);
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-center .pct {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.donut-center .lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-val {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

[dir="rtl"] .legend-val {
    margin-left: 0;
    margin-right: auto;
}

/* ---- Activity & Alerts ---- */
.activity-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.activity-icon.green {
    background: rgba(0, 255, 136, 0.08);
    color: var(--accent);
}

.activity-icon.blue {
    background: rgba(0, 240, 255, 0.08);
    color: var(--primary);
}

.activity-icon.red {
    background: rgba(255, 56, 96, 0.08);
    color: var(--accent-red);
}

.activity-icon.purple {
    background: rgba(123, 47, 247, 0.08);
    color: var(--secondary);
}

.activity-icon.yellow {
    background: rgba(255, 221, 87, 0.08);
    color: #ffdd57;
}

.activity-text {
    flex: 1;
    min-width: 0;
}

.activity-text p {
    font-size: 0.85rem;
    color: var(--text);
    margin: 0;
}

.activity-text span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.activity-badge {
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-family: var(--font-mono);
    font-weight: 600;
    flex-shrink: 0;
}

.activity-badge.success {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent);
}

.activity-badge.warning {
    background: rgba(255, 221, 87, 0.1);
    color: #ffdd57;
}

.activity-badge.danger {
    background: rgba(255, 56, 96, 0.1);
    color: var(--accent-red);
}

.activity-badge.info {
    background: rgba(0, 240, 255, 0.1);
    color: var(--primary);
}

/* Alert Items */
.alert-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 10px;
    border: 1px solid;
    transition: all 0.3s ease;
}

.alert-card:hover {
    transform: translateX(4px);
}

.alert-card.critical {
    background: rgba(255, 56, 96, 0.04);
    border-color: rgba(255, 56, 96, 0.15);
}

.alert-card.warning {
    background: rgba(255, 221, 87, 0.04);
    border-color: rgba(255, 221, 87, 0.15);
}

.alert-card.info {
    background: rgba(0, 240, 255, 0.04);
    border-color: rgba(0, 240, 255, 0.15);
}

.alert-card .alert-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-card.critical .alert-icon {
    color: var(--accent-red);
}

.alert-card.warning .alert-icon {
    color: #ffdd57;
}

.alert-card.info .alert-icon {
    color: var(--primary);
}

.alert-card .alert-text {
    flex: 1;
}

.alert-card .alert-text h5 {
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.alert-card .alert-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.alert-card .alert-time {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---- Table ---- */
.dash-table-wrap {
    background: rgba(13, 13, 43, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 240, 255, 0.06);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 28px;
    overflow-x: auto;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
}

.dash-table th {
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0, 240, 255, 0.06);
}

[dir="rtl"] .dash-table th {
    text-align: right;
}

.dash-table td {
    padding: 14px 16px;
    font-size: 0.85rem;
    color: var(--text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.dash-table tr:hover td {
    background: rgba(0, 240, 255, 0.02);
}

.status-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    font-weight: 600;
}

.status-pill.active {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent);
}

.status-pill.pending {
    background: rgba(255, 221, 87, 0.1);
    color: #ffdd57;
}

.status-pill.expired {
    background: rgba(255, 56, 96, 0.1);
    color: var(--accent-red);
}

/* ---- Section Panels (for sidebar tabs) ---- */
.dash-panel {
    display: none;
}

.dash-panel.active {
    display: block;
}

/* ---- Progress Rings ---- */
.progress-ring-wrap {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.progress-ring-item {
    text-align: center;
}

.progress-ring-item .ring-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ---- Mini Sparkline ---- */
.sparkline {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 30px;
}

.sparkline .sp-bar {
    flex: 1;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), rgba(0, 240, 255, 0.3));
    transition: height 0.5s ease;
}

/* ---- Overlay for mobile ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    backdrop-filter: blur(4px);
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .activity-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .dash-sidebar {
        transform: translateX(-100%);
    }

    [dir="rtl"] .dash-sidebar {
        transform: translateX(100%);
    }

    .dash-sidebar.open {
        transform: translateX(0);
    }

    .dash-main {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .mobile-sidebar-toggle {
        display: flex;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .topbar-search {
        min-width: 0;
        flex: 1;
    }

    .welcome-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .dash-content {
        padding: 20px 16px;
    }

    .dash-topbar {
        padding: 12px 16px;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .welcome-banner {
        padding: 24px 20px;
    }

    .welcome-name {
        font-size: 1.2rem;
    }

    .bar-chart {
        height: 150px;
    }

    .donut-wrap {
        flex-direction: column;
    }

    .chart-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .topbar-search {
        display: none;
    }

    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}