/* ============================================
   WellMemory Admin Portal — Premium CSS
   ============================================ */

/* CSS Variables */
:root {
    --primary: #008080;
    /* Clinical Teal */
    --primary-light: #2dd4bf;
    --primary-dark: #134e4a;
    --primary-glow: rgba(0, 128, 128, 0.1);
    --primary-gradient: linear-gradient(135deg, #008080, #0d9488);

    --sidebar-bg: #0f172a;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active: var(--primary);
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 280px;

    --bg-primary: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    --border-color: #e2e8f0;
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-lg: 30px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c4c8d4;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a5b5;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    z-index: 1100;
    /* Increased to stay above all */
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Only transition transform */
    overflow: hidden;
    transform: translateX(-100%);
    /* HIDDEN BY DEFAULT ON ALL SCREENS */
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.2);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(13, 158, 113, 0.3);
}

.brand-text {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-light);
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--sidebar-text);
    letter-spacing: 1.5px;
    padding: 12px 16px 8px;
    display: block;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 2px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--primary);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    z-index: -1;
}

.nav-item:hover {
    color: var(--sidebar-text-active);
    background: var(--sidebar-hover);
}

.nav-item.active {
    color: var(--sidebar-text-active);
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(13, 158, 113, 0.3);
}

.nav-item.active::before {
    width: 100%;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-badge {
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    margin-left: auto;
    min-width: 22px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-text);
    font-size: 13px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-footer-info:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary-light);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    z-index: 999;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ============================================
   Bento Grid
   ============================================ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 24px;
    margin-bottom: 24px;
}

.bento-item {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.bento-item:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.bento-colspan-2 {
    grid-column: span 2;
}

.bento-colspan-3 {
    grid-column: span 3;
}

.bento-rowspan-2 {
    grid-row: span 2;
}

@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-colspan-2,
    .bento-colspan-3 {
        grid-column: span 1;
    }
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    margin-left: 0;
    /* Full width by default for drawer system */
    min-height: 100vh;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   Top Header
   ============================================ */
.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--bg-primary);
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.header-search input {
    padding: 10px 16px 10px 40px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 14px;
    font-family: inherit;
    width: 240px;
    background: var(--bg-primary);
    transition: var(--transition);
    color: var(--text-primary);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    width: 300px;
}

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

.header-notifications {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 18px;
}

.header-notifications:hover {
    background: var(--bg-primary);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px 6px 16px;
    border-radius: 50px;
    transition: var(--transition);
}

.header-profile:hover {
    background: var(--bg-primary);
}

.profile-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-avatar {
    width: 38px;
    height: 38px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(13, 158, 113, 0.3);
}

/* ============================================
   Page Container
   ============================================ */
.page-container {
    padding: 16px 24px;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    scroll-behavior: smooth;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   Announcement Banner
   ============================================ */
.announcement-banner {
    background: linear-gradient(135deg, #0d9e71, #059669);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(13, 158, 113, 0.2);
    position: relative;
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.announcement-banner i {
    font-size: 18px;
}

.announcement-text {
    flex: 1;
    font-size: 14.5px;
    font-weight: 500;
}

.announcement-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.announcement-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
}

.stat-card:nth-child(1)::before {
    background: var(--revenue-color);
}

.stat-card:nth-child(2)::before {
    background: var(--orders-color);
}

.stat-card:nth-child(3)::before {
    background: var(--products-color);
}

.stat-card:nth-child(4)::before {
    background: var(--customers-color);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    background: #fafafa;
}

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

.revenue-icon {
    background: #fef3c7;
    color: var(--revenue-color);
}

.orders-icon {
    background: #cffafe;
    color: var(--orders-color);
}

.products-icon {
    background: #ede9fe;
    color: var(--products-color);
}

.customers-icon {
    background: #ffedd5;
    color: var(--customers-color);
}

.avg-icon {
    background: #dbeafe;
    color: var(--info-color);
}

.discount-icon {
    background: #fce7f3;
    color: #ec4899;
}

.stat-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    /* Darker for legibility */
    font-weight: 600;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-trend.up {
    background: #d1fae5;
    color: #059669;
}

.stat-trend.down {
    background: #fee2e2;
    color: #dc2626;
}

.stat-trend.neutral {
    background: #f3f4f6;
    color: #6b7280;
}

/* ============================================
   Order Status Dashboard
   ============================================ */
.order-status-dashboard {
    display: flex !important;
    gap: 20px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: none;
    /* Hide scrollbar for clean look */
    -ms-overflow-style: none;
}

.order-status-dashboard::-webkit-scrollbar {
    display: none;
}

.order-status-dashboard .status-card {
    min-width: 140px;
    flex: 1;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    color: white;
    /* Default white text for dark cards */
    border: none;
}

/* Individual Card Colors - Vibrant Dark Theme */
.status-card.card-all {
    background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
}

.status-card.card-pending {
    background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
}

.status-card.card-processing {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.status-card.card-confirmed {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.status-card.card-dispatched {
    background: linear-gradient(135deg, #1e40af 0%, #172554 100%);
}

.status-card.card-shipped {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.status-card.card-delivered {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.status-card.card-rejected {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

/* Adjust Labels and Counts for Dark Backgrounds */
.status-card .status-card-label {
    color: rgba(255, 255, 255, 0.7);
}

.status-card .status-card-count {
    color: white;
}

.status-card .status-card-icon {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
}

.order-status-dashboard .status-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

.order-status-dashboard .status-card.active {
    box-shadow: 0 0 0 3px white, 0 0 0 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.order-status-dashboard .status-card.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
}

.status-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.status-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-card-count {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.status-card-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-card.active .status-card-label {
    color: var(--primary);
}

.status-card.active .status-card-icon {
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .order-status-dashboard {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        overflow-x: visible;
    }
}

@media (max-width: 576px) {
    .order-status-dashboard {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   Month Stats
   ============================================ */
.month-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.month-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 14px 22px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.month-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-label i {
    color: var(--primary);
}

.month-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

.orders-badge {
    background: var(--primary);
    color: white;
}

.stock-badge {
    background: var(--danger-color);
    color: white;
}

/* ============================================
   Charts
   ============================================ */
.charts-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

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

.chart-large {
    flex: 1;
    min-width: 0;
}

.chart-half {
    flex: 1;
    min-width: 300px;
}

.chart-header {
    padding: 20px 24px 0;
}

.chart-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header h3 i {
    color: var(--primary);
    font-size: 15px;
}

.chart-body {
    padding: 20px 24px 24px;
    position: relative;
    height: 300px;
}

.chart-body-donut {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Tables
   ============================================ */
.tables-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.table-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    flex: 1;
    min-width: 300px;
    transition: var(--transition);
}

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

.table-card.full-width {
    width: 100%;
    flex: unset;
}

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

.table-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header h3 i {
    font-size: 15px;
}

.table-header h3 .fa-trophy {
    color: var(--revenue-color);
}

.table-header h3 .fa-crown {
    color: var(--revenue-color);
}

.table-header h3 .fa-clock {
    color: var(--primary);
}

.table-header h3 .fa-list {
    color: var(--primary);
}

.table-header h3 .fa-medal {
    color: var(--revenue-color);
}

.view-all-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 6px 16px;
    border: 1px solid var(--primary);
    border-radius: 50px;
    transition: var(--transition);
}

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

.table-body {
    overflow-x: auto;
}

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

.data-table thead th {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 14px 20px;
    text-align: left;
    background: #f8fafb;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--primary-glow);
}

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

/* Customer info in table */
.customer-info {
    display: flex;
    flex-direction: column;
}

.customer-name {
    font-weight: 600;
    color: var(--text-primary);
}

.customer-email {
    font-size: 12px;
    color: var(--text-muted);
}

/* Sold badge */
.sold-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--orders-color);
    color: white;
    font-weight: 700;
    font-size: 13px;
    border-radius: 6px;
}

/* Order count badge */
.order-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 13px;
    border-radius: 6px;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-delivered {
    background: #d1fae5;
    color: #059669;
}

.status-delivered::before {
    background: #059669;
}

.status-processing {
    background: #dbeafe;
    color: #2563eb;
}

.status-processing::before {
    background: #2563eb;
}

.status-shipped {
    background: #e0e7ff;
    color: #4f46e5;
}

.status-shipped::before {
    background: #4f46e5;
}

.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.status-cancelled::before {
    background: #dc2626;
}

.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.status-pending::before {
    background: #d97706;
}

.status-rejected {
    background: #fee2e2;
    color: #dc2626;
}

.status-rejected::before {
    background: #dc2626;
}

.status-draft {
    background: #f3f4f6;
    color: #4b5563;
}

.status-draft::before {
    background: #9ca3af;
}

.status-banned {
    background: #fee2e2;
    color: #dc2626;
}

.status-banned::before {
    background: #ec4899;
}

.status-active {
    background: #ecfdf5;
    color: #10b981;
}

.status-active::before {
    background: #10b981;
}

.status-available {
    background: #d1fae5;
    color: #059669;
}

.status-available::before {
    background: #059669;
}

.status-offline {
    background: #f3f4f6;
    color: #6b7280;
}

.status-offline::before {
    background: #6b7280;
}

.status-pill.available {
    background: #d1fae5;
    color: #059669;
    border-radius: 50px;
    font-weight: 600;
}

.status-pill.offline {
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 50px;
    font-weight: 600;
}

/* Rank Badges */
.rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    box-shadow: 0 2px 4px rgba(255, 140, 0, 0.3);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #808080);
    box-shadow: 0 2px 4px rgba(128, 128, 128, 0.3);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.3);
}

.rank-4,
.rank-5 {
    background: #f3f4f6;
    color: #4b5563;
}

/* ============================================
   Email System
   ============================================ */
.email-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    height: 600px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.email-sidebar {
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    background: #fcfdfe;
}

.email-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.email-item:hover {
    background: var(--primary-glow);
}

.email-item.active {
    background: #f0faf7;
    border-left: 4px solid var(--primary);
}

.email-item.unread {
    font-weight: 600;
}

.email-item.unread::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.email-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.email-from {
    font-size: 15px;
    color: var(--text-primary);
}

.email-date {
    font-size: 11px;
    color: var(--text-muted);
}

.email-subject {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-view {
    padding: 30px;
    overflow-y: auto;
    position: relative;
}

.empty-email {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

.empty-email i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.2;
}

.email-detail-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.email-detail-subject {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.email-detail-from {
    display: flex;
    align-items: center;
    gap: 12px;
}

.email-detail-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.email-detail-info {
    flex: 1;
}

.email-detail-name {
    font-weight: 600;
}

.email-detail-address {
    font-size: 12px;
    color: var(--text-muted);
}

.email-body {
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-line;
    margin-bottom: 30px;
}

.email-reply-box {
    background: #f8fafb;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.email-reply-box textarea {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    margin-bottom: 12px;
}

.email-reply-box textarea:focus {
    outline: none;
}

/* ============================================
   Upload Container
   ============================================ */
.upload-container {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 12px;
    background: var(--bg-primary);
    min-height: 120px;
}

.upload-container:hover {
    border-color: var(--primary);
    background: #f0faf7;
}

.upload-container i {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.upload-label {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
}

.upload-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.upload-placeholder {
    z-index: 2;
    text-align: center;
}

.category-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

/* Red Dot for New Section */
.nav-item[data-page="email"]::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #ff4d4d;
    border-radius: 50%;
}

/* ============================================
   Action Buttons
   ============================================ */
.action-btn {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
}

.action-btn.danger:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
    background: #fef2f2;
}

.action-btn.success:hover {
    border-color: var(--success-color);
    color: var(--success-color);
    background: #ecfdf5;
}

.action-btn.warning:hover {
    border-color: var(--warning-color);
    color: var(--warning-color);
    background: #fffbeb;
}

.action-btn.primary:hover {
    border-color: var(--info-color);
    color: var(--info-color);
    background: #eff6ff;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

/* Product image in table */
.product-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8fafc;
    display: block;
}

/* Stock indicator */
.stock-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
}

.stock-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stock-indicator.in-stock .dot {
    background: #10b981;
    animation: statusPulse 2s infinite;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.stock-indicator.in-stock {
    color: #10b981;
}

.stock-indicator.out-of-stock .dot {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    animation: statusPulse 1.5s infinite;
}

.stock-indicator.out-of-stock {
    color: #ef4444;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(13, 158, 113, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 158, 113, 0.4);
}

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

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

.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-filter {
    background: var(--primary);
    color: white;
    padding: 10px 24px;
}

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

.btn-quick {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    font-size: 13px;
}

.btn-quick:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-quick.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   Filter Bar
   ============================================ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.filter-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.filter-search input {
    width: 100%;
    padding: 11px 16px 11px 40px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
}

.filter-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.filter-select {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
    /* Expanded for comfort */
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.filter-date {
    padding: 11px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
}

.filter-date:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ============================================
   Report Filters
   ============================================ */
.report-filters {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.date-filters {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.date-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-field input {
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
}

.date-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   Categories Grid
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.category-card:hover::before {
    transform: scaleX(1);
    background: var(--primary);
}

/* Subcategory List Styling */
#subcategoriesList::-webkit-scrollbar {
    width: 4px;
}

#subcategoriesList::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

#subcategoriesList div {
    transition: all 0.2s ease;
}

#subcategoriesList div:hover {
    background: #ffffff !important;
    transform: translateX(5px);
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-sm);
}

.category-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.category-card:nth-child(1) .category-icon {
    background: #fef3c7;
    color: var(--revenue-color);
}

.category-card:nth-child(2) .category-icon {
    background: #cffafe;
    color: var(--orders-color);
}

.category-card:nth-child(3) .category-icon {
    background: #ede9fe;
    color: var(--products-color);
}

.category-card:nth-child(4) .category-icon {
    background: #ffedd5;
    color: var(--customers-color);
}

.category-card:nth-child(5) .category-icon {
    background: #d1fae5;
    color: var(--success-color);
}

.category-card:nth-child(6) .category-icon {
    background: #fce7f3;
    color: #ec4899;
}

/* ============================================
   Dark Mode Support
   ============================================ */
body.dark-theme {
    --bg-primary: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

body.dark-theme .top-header {
    background: rgba(15, 23, 42, 0.8);
}

body.dark-theme .bento-item {
    background: var(--bg-glass);
    border-color: var(--glass-border);
}

body.dark-theme .data-table thead th {
    background: #1e293b;
    border-color: #334155;
}

body.dark-theme .data-table tbody td {
    border-color: #334155;
}

body.dark-theme .action-btn {
    border-color: #334155;
}

/* Glassmorphism Extra Polish */
.bento-item,
.table-card,
.chart-card {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Animations */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page.active {
    animation: fadeInSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Scrollbar for Premium Feel */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
    opacity: 0.3;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.nav-badge {
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 800;
}

.category-name {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.category-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.category-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* ============================================
   Users Grid
   ============================================ */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* ============================================
   Premium User Cards (Modern Bento Style)
   ============================================ */
.user-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 4px 10px -2px rgba(0, 0, 0, 0.02);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: relative;
    overflow: hidden;
}

.user-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.user-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.user-card:hover::after {
    opacity: 1;
}

.user-card.banned {
    border-color: #fca5a5;
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.9), rgba(254, 226, 226, 0.9));
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-avatar-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Outfit', sans-serif;
}

.user-avatar.admin {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.user-avatar.customer {
    background: linear-gradient(135deg, #0d9488, #2dd4bf);
}

.user-avatar.rider {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

/* Live Status Indicator (Pulse) */
.status-indicator-ping {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #10b981;
    border: 3px solid white;
    border-radius: 50%;
}

.dark-theme .status-indicator-ping {
    border-color: #1e293b;
}

.status-active-ping {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #10b981;
    border-radius: 50%;
    animation: statusPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes statusPing {

    75%,
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.user-info {
    flex: 1;
}

.user-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 19px;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.user-email {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    background: rgba(0, 0, 0, 0.03);
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-block;
}

.dark-theme .user-email {
    background: rgba(255, 255, 255, 0.05);
}

.user-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    background: rgba(248, 250, 252, 0.6);
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.dark-theme .user-stats-row {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-item label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-item span {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.user-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 5px;
}

.user-actions-grid .action-btn {
    width: 100%;
    height: 40px;
    border-radius: 12px;
    font-size: 16px;
}

.user-role {
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
    display: inline-block;
}

.user-role.admin {
    background: #e0e7ff;
    color: #4338ca;
}

.user-role.customer {
    background: #ccfbf1;
    color: #0f766e;
}

.user-role.rider {
    background: #fef3c7;
    color: #b45309;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* User info layout in tables */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info .user-details {
    display: flex;
    flex-direction: column;
}

.user-info .user-id {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    animation: modalIn 0.3s ease forwards;
}

@keyframes modalIn {
    to {
        transform: scale(1);
    }
}

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

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-primary);
    color: var(--danger-color);
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form styles in modal */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 18px;
    /* Increased for better legibility */
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
    min-width: 180px;
    /* Prevent congestion */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

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

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.4s ease;
    border-left: 4px solid var(--primary);
}

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

.toast.error {
    border-left-color: var(--danger-color);
}

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

.toast.info {
    border-left-color: var(--info-color);
}

.toast-icon {
    font-size: 18px;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast.info .toast-icon {
    color: var(--info-color);
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.toast-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

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

.empty-state p {
    font-size: 15px;
    font-weight: 500;
}

/* ============================================
   Lead Source & Status Badges
   ============================================ */
.badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: default;
    animation: badgeReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.badge:hover,
.status-badge:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.badge::before,
.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: statusPulse 2s infinite;
}

@keyframes badgeReveal {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* ============================================
   Perfect Cinematic Entrance
   ============================================ */
.perfect-entrance {
    animation: perfectEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes perfectEntrance {
    0% {
        opacity: 0;
        transform: scale(0.96) translateY(30px);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* ============================================
   Glass Shimmer Effect
   ============================================ */
.glass-shimmer {
    position: relative;
    overflow: hidden;
}

.glass-shimmer::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.13) 50%,
            transparent);
    transform: rotate(30deg);
    transition: none;
    animation: glassShimmer 4s infinite linear;
}

@keyframes glassShimmer {
    0% {
        left: -60%;
    }

    100% {
        left: 160%;
    }
}

/* Floating Animation for Icons */
.float-icon {
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes statusPulse {
    0% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 currentColor;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.4;
        box-shadow: 0 0 0 6px transparent;
    }

    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 transparent;
    }
}

.badge.status-active,
.badge.status-delivered,
.status-delivered {
    background: #ecfdf5;
    color: #10b981;
}

.badge.status-offline,
.badge.status-rejected,
.status-rejected {
    background: #fef2f2;
    color: #ef4444;
}

.badge.status-pending,
.status-pending {
    background: #fff7ed;
    color: #f59e0b;
}

.badge.status-new {
    background: #fdf2f7;
    color: #db2777;
}

.badge.status-contacted,
.badge.status-processing,
.status-processing {
    background: #eff6ff;
    color: #3b82f6;
}

.badge.status-night,
.status-shipped {
    background: #f5f3ff;
    color: #7c3aed;
}

/* ============================================
   Loading Shimmer
   ============================================ */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% auto;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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

    100% {
        background-position: 200% 0;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .header-search input {
        width: 180px;
    }

    .header-search input:focus {
        width: 220px;
    }

    .charts-row {
        flex-direction: column;
    }

    .chart-half {
        min-width: 0;
    }

    .email-container {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar.open {
        transform: translateX(0);
    }

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

    .top-header {
        padding: 0 16px;
    }

    .page-container {
        padding: 20px 16px;
    }

    .header-search {
        display: none;
    }

    .profile-text {
        display: none;
    }

    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .tables-row {
        flex-direction: column;
    }

    .report-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .date-filters {
        flex-direction: column;
    }

    .email-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .email-sidebar {
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

@media (max-width: 480px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .users-grid {
        grid-template-columns: 1fr;
    }
}

/* Store Announcements */
.live-preview-box {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.live-preview-box h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.announcement-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0d9e71 0%, #10b981 100%);
    color: white;
    font-weight: 500;
    font-size: 14px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(13, 158, 113, 0.2);
    position: relative;
    overflow: hidden;
}

.announcement-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 4s infinite;
}

@keyframes shine {
    to {
        left: 200%;
    }
}

.preview-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 16px 0 0 0;
    text-align: center;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

    .sidebar,
    .top-header,
    .menu-toggle,
    .modal-overlay,
    .toast-container,
    .announcement-banner {
        display: none !important;
    }

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

    .page-container {
        padding: 10px !important;
    }
}

/* ============================================
   Interactive Revenue Cards
   ============================================ */
#cardCourierRev,
#cardRiderRev {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

#cardCourierRev:hover,
#cardRiderRev:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Modal Inner Table Styles
   ============================================ */
.modal-table-container {
    margin-top: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: #ffffff;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.modal-table th {
    background: #f9fafb;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.modal-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-primary);
}

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

.modal-table .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 currentColor;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.4;
        box-shadow: 0 0 0 5px transparent;
    }

    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 transparent;
    }
}

.status-pill.pending {
    background: #fff7ed;
    color: #f59e0b;
}

.status-pill.processing {
    background: #eff6ff;
    color: #3b82f6;
}

.status-pill.delivered,
.status-pill.fixed,
.status-pill.completed {
    background: #ecfdf5;
    color: #10b981;
}

.status-pill.rejected,
.status-pill.cancelled {
    background: #fef2f2;
    color: #ef4444;
}

/* ============================================
   Premium Hero Stat Cards (Liquid Glass)
   ============================================ */
.dash-stat-card {
    position: relative;
    border-radius: 28px;
    padding: 30px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Base colors for text inside hero cards */
.dash-stat-card .stat-value,
.dash-stat-card .stat-label,
.dash-stat-card .stat-trend {
    color: white !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Individual Card Themes (Gradients) */
#statRevenue {
    background: linear-gradient(135deg, #008080, #14b8a6) !important;
}

#statOrders {
    background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
}

#statProducts {
    background: linear-gradient(135deg, #10b981, #34d399) !important;
}

#statCustomers {
    background: linear-gradient(135deg, #6366f1, #818cf8) !important;
}

#statBillSize {
    background: linear-gradient(135deg, #d946ef, #f0abfc) !important;
}

#statRebates {
    background: linear-gradient(135deg, #f97316, #fb923c) !important;
}

/* Rider Specific Stats Gradients */
#statRiderActive {
    background: linear-gradient(135deg, #10b981, #34d399) !important;
}

#statRiderOff {
    background: linear-gradient(135deg, #64748b, #94a3b8) !important;
}

#statRiderTotal {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa) !important;
}

/* Glowing Orb Effects */
.dash-stat-card::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.2;
    z-index: 0;
    top: -50px;
    right: -50px;
    transition: all 0.6s ease;
}

#statRevenue::before {
    background: #14b8a6;
}

#statOrders::before {
    background: #60a5fa;
}

#statProducts::before {
    background: #34d399;
}

#statCustomers::before {
    background: #818cf8;
}

#statBillSize::before {
    background: #f0abfc;
}

#statRebates::before {
    background: #fb923c;
}

.dash-stat-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.dash-stat-card:hover::before {
    transform: scale(1.6);
    opacity: 0.3;
}

.stat-inner {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.9;
}

.stat-value {
    font-size: 34px;
    font-weight: 850;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -1px;
    margin: 4px 0;
}

.stat-badge-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.dash-stat-card:hover .stat-badge-icon {
    transform: rotate(-8deg) scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.95;
    margin-top: 10px;
}


.stat-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 36px;
    font-weight: 850;
    /* Super Bold */
    color: var(--text-primary);
    margin: 8px 0;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -1px;
}

.stat-badge-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

#statRevenue .stat-badge-icon {
    background: linear-gradient(135deg, #008080, #14b8a6);
}

#statOrders .stat-badge-icon {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

#statBillSize .stat-badge-icon {
    background: linear-gradient(135deg, #d946ef, #f0abfc);
}

#statRebates .stat-badge-icon {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.dash-stat-card:hover .stat-badge-icon {
    transform: rotate(-10deg) scale(1.1);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-top: auto;
}

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

.dark-theme .dash-stat-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.dark-theme .dash-stat-card:hover {
    background: rgba(30, 41, 59, 0.9);
}

.dark-theme .stat-value {
    color: #f8fafc;
}


.table-header {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px);
}

/* ============================================
   Premium Hamburger Menu (Customized)
   ============================================ */
.menu-toggle {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 14px;
    color: white;
    display: flex;
    /* FORCE DISPLAY ON ALL SCREENS */
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1200;
    /* Above overlay */
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2.5px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.menu-toggle:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
    width: 24px;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
    width: 24px;
}

/* ============================================
   Animations & Polish
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bento-stagger>* {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ============================================
   Dashboard Responsive Grid
   ============================================ */
@media (max-width: 1200px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr !important;
    }

    .tables-row {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   Dashboard Card Hover Effects
   ============================================ */
.dash-stat-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   Animated Stock Indicator
   ============================================ */
.stock-indicator .dot {
    animation: pulseGlow 2s infinite;
}

.stock-indicator.out-of-stock .dot {
    animation: pulseGlow 1s infinite;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 currentColor;
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 0 4px currentColor;
        opacity: 0.5;
    }
}

/* ============================================
   Chart Card Polish
   ============================================ */
.chart-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.chart-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

/* ============================================
   Table Row Hover Animation
   ============================================ */
#lowStockTable tbody tr,
#topProductsTable tbody tr,
#topCustomersTable tbody tr,
#recentOrdersTable tbody tr {
    transition: background 0.2s, transform 0.2s;
}

#lowStockTable tbody tr:hover,
#topProductsTable tbody tr:hover,
#topCustomersTable tbody tr:hover,
#recentOrdersTable tbody tr:hover {
    background: var(--primary-glow);
    transform: scale(1.005);
}

/* ============================================
   Live Indicators & Pulse Dots
   ============================================ */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px 10px;
    border-radius: 20px;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: ripplePulse 2s infinite cubic-bezier(0, 0, 0.2, 1);
}

@keyframes ripplePulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

/* ============================================
   Report Visual Enhancements & Sparklines
   ============================================ */
.report-stats .stat-card {
    display: flex;
    flex-direction: column;
    min-height: 140px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.report-sparkline-container {
    height: 48px;
    margin-top: auto;
    width: 100%;
    position: relative;
    bottom: -15px;
    margin-left: -20px;
    width: calc(100% + 40px);
}

.sparkline-canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Entry Animations */
.animate-on-load {
    opacity: 0;
}

.page.active .animate-on-load {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s !important;
}

.delay-2 {
    animation-delay: 0.2s !important;
}

.delay-3 {
    animation-delay: 0.3s !important;
}

.delay-4 {
    animation-delay: 0.4s !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   Stat Card Quick Preview Panel
   ============================================ */
.stat-preview-panel {
    display: none;
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 128, 128, 0.05);
    animation: previewSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.stat-preview-panel.active {
    display: block;
}

@keyframes previewSlideDown {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(0, 128, 128, 0.03), rgba(45, 212, 191, 0.03));
}

.preview-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-header h3 i {
    color: var(--primary);
    font-size: 14px;
}

.preview-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 12px;
}

.preview-close:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: scale(1.05);
}

.preview-content {
    padding: 20px 24px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.preview-stat {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition-fast);
}

.preview-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.preview-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.preview-list {
    background: #fafbfc;
    border: 1px solid #eef1f5;
    border-radius: 14px;
    overflow: hidden;
}

.preview-list-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px 8px;
}

.preview-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 13px;
    border-top: 1px solid #f1f3f6;
    transition: background 0.15s ease;
}

.preview-list-item:first-of-type {
    border-top: none;
}

.preview-list-item:hover {
    background: rgba(0, 128, 128, 0.03);
}

.preview-list-item span:first-child {
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.preview-empty {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}

.preview-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(0, 128, 128, 0.02), rgba(45, 212, 191, 0.02));
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
    animation: hintPulse 2s infinite;
}

@keyframes hintPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Active state ring on stat card when preview is open */
.dash-stat-card.preview-active {
    box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.2), 0 8px 25px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px);
}

/* Dark theme overrides */
.dark-theme .stat-preview-panel {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.dark-theme .preview-header {
    background: rgba(0, 128, 128, 0.08);
    border-color: #334155;
}

.dark-theme .preview-stat {
    background: linear-gradient(135deg, #1a2332, #1e293b);
    border-color: #334155;
}

.dark-theme .preview-list {
    background: #1a2332;
    border-color: #334155;
}

.dark-theme .preview-list-item {
    border-color: #2d3a4a;
}

.dark-theme .preview-close {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

.dark-theme .preview-footer {
    border-color: #334155;
    background: rgba(0, 128, 128, 0.05);
}

@media (max-width: 768px) {
    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .preview-content {
        padding: 16px;
    }
}

/* ============================================
   Call Center Page
   ============================================ */

/* Hero Header */
.call-hero {
    animation: fadeIn 0.5s ease;
}

.call-hero button:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Stat Cards */
.call-stats-grid {
    animation: fadeIn 0.5s ease 0.1s both;
}

.call-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* POS Form */
.call-pos-grid .form-group {
    margin-bottom: 14px;
}

.call-pos-grid .form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.call-pos-grid .form-group input,
.call-pos-grid .form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.call-pos-grid .form-group input:focus,
.call-pos-grid .form-group select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.call-pos-grid .form-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Cart Scrollbar */
.call-pos-cart {
    scrollbar-width: thin;
}

.call-pos-cart::-webkit-scrollbar {
    width: 4px;
}

.call-pos-cart::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 10px;
}

/* Dashboard Call Section */
.call-center-dashboard-section .table-card {
    transition: var(--transition);
}

.call-center-dashboard-section .table-card:hover {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

/* Confirm Button Hover */
#callPosConfirmBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.4) !important;
}

#callPosAddItem:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3) !important;
}

/* Responsive Call Center */
@media (max-width: 1400px) {
    .call-stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 1000px) {
    .call-pos-grid {
        grid-template-columns: 1fr !important;
    }

    .call-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .call-stats-grid {
        grid-template-columns: 1fr !important;
    }

    .call-hero {
        padding: 24px 20px !important;
    }

    .call-hero h2 {
        font-size: 20px !important;
    }
}

/* Dark Theme Call Center */
.dark-theme .call-hero {
    background: linear-gradient(135deg, #5b21b6 0%, #6d28d9 30%, #4c1d95 70%, #3b0764 100%) !important;
}

.dark-theme .call-stat-card {
    background: var(--bg-card) !important;
    border-color: #334155 !important;
}

.dark-theme .call-pos-grid .form-group input,
.dark-theme .call-pos-grid .form-group select {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .call-pos-grid .form-group input:focus,
.dark-theme .call-pos-grid .form-group select:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.dark-theme .call-pos-cart {
    background: #1a2332 !important;
    border-color: #334155 !important;
}

.dark-theme .call-center-dashboard-section .table-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.dark-theme #callPosProduct,
.dark-theme #callPosQty {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* Call Order Badge for Lists */
.badge-call {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(109, 40, 217, 0.1));
    color: #8b5cf6;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(139, 92, 246, 0.2);
    margin-left: 8px;
    vertical-align: middle;
}

.dark-theme .badge-call {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
}

/* Order Source Distribution Card */
.order-source-distribution-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.order-source-distribution-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.3);
}

.dark-theme .order-source-distribution-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dark-theme .order-source-distribution-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
}

@charset " UTF-8\;


/* POS Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    animation: slideDownFade 0.2s ease-out;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 12px;
}

.suggestion-item:hover {
    background: rgba(139, 92, 246, 0.08);
}

.suggestion-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.suggestion-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.suggestion-price {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
}

.suggestion-stock {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stock-high {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.stock-low {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.stock-out {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

#callPosProductSearch:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    outline: none;
}

/* Order Detail Modal - Namespaced to avoid conflicts */
.order-detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.order-detail-modal-window {
    background: white;
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
    border-radius: 28px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: orderModalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes orderModalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.order-detail-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fcfdfe;
}

.order-detail-modal-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}

.order-detail-modal-title i {
    color: #8b5cf6;
}

.order-detail-modal-close {
    background: #f1f5f9;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-detail-modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: rotate(90deg);
}

.order-detail-modal-body {
    padding: 32px;
    overflow-y: auto;
}

.order-detail-modal-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 35px;
}

.order-detail-detail-section h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-detail-detail-row {
    display: flex;
    margin-bottom: 12px;
    font-size: 14.5px;
}

.order-detail-detail-row label {
    width: 70px;
    color: var(--text-muted);
    font-weight: 600;
}

.order-detail-detail-row span {
    color: var(--text-primary);
    font-weight: 700;
}

.order-detail-modal-products-section h4 {
    margin-bottom: 18px;
}

.order-detail-modal-table-container {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.order-detail-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.order-detail-modal-table thead th {
    background: #f8fafb;
    padding: 14px 20px;
    text-align: left;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.order-detail-modal-table tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.order-detail-modal-footer-summary {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
}

.order-detail-summary-line.total {
    display: flex;
    align-items: baseline;
    gap: 18px;
    font-family: "Outfit", sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.order-detail-summary-line.total span:last-child {
    font-size: 32px;
    font-weight: 800;
    color: #8b5cf6;
}

#allOrdersTable tr:hover .view-detail-btn {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}