/* ===================================================
   DASHBOARD STYLES
   Complete styling for vendor and customer dashboards
   =================================================== */
:root {
  --primary-color: #1A1A3A;
  --secondary-color: #A48111;
  --green-color: #4CAF50;
    --bs-btn-active-color:#A48111;
--purple-color: #A48111;
  --pink-color: #FFC0CB;
  --light-blue-color: #ADD8E6;
  --white-color: #FFFFFF;
  --light-gray-color: #F5F5F5;
  --gray-color: #CCCCCC;
  --dark-gray-color: #333333;
  --black-color: #000000;
    --marquee-bg-light: linear-gradient(90deg, var(--secondary-color) 0%, #ffd700 50%, var(--secondary-color) 100%);
  --marquee-text-light: #000000;
  --marquee-hover-light: var(--primary-color);
  --marquee-separator-light: var(--primary-color);
  --marquee-shadow-light: 0 2px 5px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] {
    /* ===== Dark Theme ===== */
    --marquee-bg-dark: linear-gradient(90deg, #222222 0%, #FFD700 50%, #222222 100%);
    --marquee-text-dark: #ffffff;
    --marquee-hover-dark: #FFD700;
    --marquee-separator-dark: #FFD700;
    --marquee-shadow-dark: 0 2px 10px rgba(255, 215, 0, 0.6);
}

/* ===================================================
   Bootstrap Table Overrides
   =================================================== */
/* Override Bootstrap table variables to respect theme */
.table {
    --bs-table-color: var(--text-primary) !important;
    --bs-table-bg: var(--bg-surface) !important;
    --bs-table-border-color: var(--border-color) !important;
    --bs-table-striped-bg: var(--bg-secondary) !important;
    --bs-table-striped-color: var(--text-primary) !important;
    --bs-table-active-bg: var(--bg-hover) !important;
    --bs-table-active-color: var(--text-primary) !important;
    --bs-table-hover-bg: var(--bg-hover) !important;
    --bs-table-hover-color: var(--text-primary) !important;
}

/* Ensure table body and cells inherit theme colors */
.table tbody,
.table tbody tr,
.table tbody td,
.table tbody th {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
}

/* Table header styling */
.table thead th {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* ===================================================
   Page Loader Theme Support
   =================================================== */
/* Default loader background for dark theme */
#page-loader {
    background: var(--bg-primary);
}

/* Dark theme: show logo.png, hide logo-blue.png */
body[data-theme="dark"] .loader-logo {
    content: url('/static/images/logo/logo.png');
}

/* Light theme: show logo-blue.png, hide logo.png */
body[data-theme="light"] .loader-logo {
    content: url('/static/images/logo/logo-blue.png');
}

/* Update spinner color based on theme */
body[data-theme="dark"] #page-loader .spinner {
    border-top-color: var(--secondary-color);
    border-left-color: var(--secondary-color);
}

body[data-theme="light"] #page-loader .spinner {
    border-top-color: var(--secondary-color);
    border-left-color: var(--secondary-color);
}

/* ===================================================
   Theme Variables
   =================================================== */
body[data-theme="dark"] {
  --bg-body: #1A1A3A;
  --bg-primary: #1A1A3A;
  --bg-secondary: #2a2a50;
  --bg-surface: #252547;
  --bg-card: #2d2d55;
  --bg-input: #252547;
  --bg-hover: rgba(164, 129, 17, 0.15);
  --text-primary: #FFFFFF;
  --text-secondary: #FFFFFF;
  --text-muted: #CCCCCC;
  --text-accent: #FFFFFF;
  --text-on-accent: #FFFFFF;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --accent-color: #A48111;
  --success-color: #10b981;
  --warning-color: #fbbf24;
  --danger-color: #f87171;
}

body[data-theme="light"] {
  --bg-body: #FFFFFF;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F5;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;
  --bg-hover: rgba(164, 129, 17, 0.05);
  --text-primary: #000000;
  --text-secondary: #1A1A3A;
  --text-muted: #666666;
  --text-accent: #1A1A3A;
  --text-on-accent: #FFFFFF;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 1px 2px 0 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.15);
  --accent-color: #A48111;
  --success-color: #4CAF50;
  --warning-color: #f59e0b;
  --danger-color: #dc2626;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  scroll-behavior: smooth;
}
/* ===================================================
   DASHBOARD LAYOUT
   =================================================== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
    overflow-x: hidden;
}
.products-management {
    padding: 40px;
}

.dashboard-sidebar {
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    width: 280px;
    min-width: 280px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden; /* Allow dropdown to overflow horizontally */
    box-shadow: 2px 0 15px var(--shadow-color);
    z-index: 100;
    scroll-behavior: smooth; /* Enable smooth scrolling */
}

.dashboard-main {
  display: block;
  padding: 40px;
  background: var(--bg-surface);
  overflow-y: auto;   /* enables vertical scrolling */
  overflow-x: auto;   /* enables horizontal scrolling when needed */
  height: 100vh;      /* full viewport height */
  position: relative;
  flex: 1;
  scroll-behavior: smooth; /* Enable smooth scrolling */
}


.dashboard-main > * {
  flex: 0 0 auto;
}


/* ===================================================
   SIDEBAR HEADER
   =================================================== */
.sidebar-header {
    padding: 30px 20px;
    border-bottom: 2px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: visible;
}

.sidebar-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 8px 25px rgba(164, 129, 17, 0.3);
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.sidebar-user-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.vendor-status-badge {
    display: inline-block;
    padding: 5px 15px;
    margin-top: 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.vendor-status-badge.approved {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.vendor-status-badge.pending {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

/* User Role Badges */
.user-role-badge {
    display: inline-block;
    padding: 5px 15px;
    margin-top: 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.user-role-badge.superuser {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1A1A3A;
    border: 1px solid #FFD700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.user-role-badge.admin {
    background: rgba(75, 0, 130, 0.1);
    color: #4B0082;
    border: 1px solid rgba(75, 0, 130, 0.3);
}

.user-role-badge.customer {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

/* ===================================================
   SIDEBAR NAVIGATION
   =================================================== */
.sidebar-nav {
    padding: 20px 0;
}

.nav-section-title {
    padding: 15px 20px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.sidebar-nav-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--secondary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-nav-link:hover {
    background: rgba(164, 129, 17, 0.1);
    color: var(--secondary-color);
}

.sidebar-nav-link:hover::before {
    transform: scaleY(1);
}

.sidebar-nav-link.active {
    background: linear-gradient(90deg, rgba(164, 129, 17, 0.15) 0%, transparent 100%);
    color: var(--secondary-color);
    font-weight: 700;
}

.sidebar-nav-link.active::before {
    transform: scaleY(1);
}

.sidebar-nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-badge {
    margin-right: auto;
    background: var(--secondary-color);
    color: #FFFFFF;
    padding: 3px 8px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
}

/* ===================================================
   DASHBOARD HEADER
   =================================================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-title h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.dashboard-title i {
    font-size: 36px;
    color: var(--secondary-color);
}

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

/* Theme Toggle Button in Dashboard */
.theme-toggle-btn {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--secondary-color);
    transition: width 0.3s ease;
    border-radius: 50%;
}

.theme-toggle-btn:hover::before {
    width: 100%;
}

.theme-toggle-btn .theme-icon {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 15px rgba(164, 129, 17, 0.4);
}

.theme-toggle-btn:hover .theme-icon {
    stroke: #FFFFFF;
}

.theme-toggle-btn:active {
    transform: scale(1.05) rotate(15deg);
}

/* Theme icon states */
body[data-theme="dark"] .theme-toggle-btn .sun-icon {
    display: block;
}

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

body[data-theme="light"] .theme-toggle-btn .sun-icon {
    display: none;
}

body[data-theme="light"] .theme-toggle-btn .moon-icon {
    display: block;
}

/* ===================================================
   STATS CARDS
   =================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), #c59a13);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(164, 129, 17, 0.2);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(164, 129, 17, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stat-icon i {
    font-size: 24px;
    color: #fff;
    transition: all 0.3s ease;
}

/* Products Stat Icon Specific Styling */


/* Enhanced responsive stat icon for products */
.stat-icon.products {
    background: linear-gradient(135deg, rgba(164, 129, 17, 0.1), rgba(164, 129, 17, 0.2));
    border: 2px solid rgba(164, 129, 17, 0.2);
    width: 50px;
    height: 50px;
    min-width: 36px;
    min-height: 36px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stat-icon.products i {
    color: var(--secondary-color);
    animation: pulse 2s infinite;
    font-size: 24px;
    transition: all 0.3s ease;
}
@media (max-width: 1024px) {
    .stat-icon.products {
        width: 44px;
        height: 44px;
    }
    .stat-icon.products i {
        font-size: 20px;
    }
}

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

.toast {
    background-color: var(--bg-card);
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    max-width: 350px;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInToast 0.5s forwards, fadeOutToast 0.5s 2.5s forwards;
}

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

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

.toast.info {
    border-left: 5px solid var(--purple-color);
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

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

.toast-message {
    flex-grow: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

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

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

@media (max-width: 768px) {
    .stat-icon.products {
        width: 40px;
        height: 40px;
    }
    .stat-icon.products i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .stat-icon.products {
        width: 36px;
        height: 36px;
    }
    .stat-icon.products i {
        font-size: 16px;
    }
}

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

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

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

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

.stat-change.positive {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.stat-change.negative {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

/* ===================================================
   DASHBOARD CARDS
   =================================================== */
.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s ease;
    overflow: hidden;
}

.dashboard-card:hover {
    box-shadow: 0 8px 30px var(--shadow-color);
}

/* ===================================================
   TEXT & COLOR OVERRIDES
   =================================================== */
.text-muted {
    color: var(--text-muted) !important;
}


/* ===================================================
   BOOTSTRAP .card OVERRIDE
   =================================================== */
.card {
    --bs-card-spacer-y: 1.5rem;
    --bs-card-spacer-x: 1.5rem;
    --bs-card-title-spacer-y: 0.5rem;
    --bs-card-border-width: 1px;
    --bs-card-border-color: var(--border-color);
    --bs-card-border-radius: 20px;
    --bs-card-box-shadow: var(--shadow-lg);
    --bs-card-inner-border-radius: calc(20px - 1px);
    --bs-card-cap-padding-y: 1rem;
    --bs-card-cap-padding-x: 1.5rem;
    --bs-card-cap-bg: var(--bg-secondary);
    --bs-card-bg: var(--bg-card);
    --bs-card-color: var(--text-primary);
    height: var(--bs-card-height);
    color: var(--bs-card-color);
    background-color: var(--bs-card-bg);
    box-shadow: var(--bs-card-box-shadow);
    transition: all 0.3s ease;
}

.card-header {
    background: var(--bg-secondary);
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header h2 i {
    color: var(--secondary-color);
}

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

.card-body {
    padding: 25px;
}

/* ===================================================
   PRODUCTS TABLE
   =================================================== */
.products-table-wrapper {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-spacing: 0 10px;
    border-collapse: separate;
}

.products-table thead tr {
    background: var(--bg-surface);
    padding: 15px;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    border: none;
}

.products-table tbody tr {
    background: var(--bg-surface);
    transition: all 0.3s ease;
}

.products-table tbody tr:hover {
    background: rgba(164, 129, 17, 0.05);
    transform: translateX(-3px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.products-table tbody td {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.products-table tbody td:first-child {
    border-right: 1px solid var(--border-color);
    border-radius: 0 12px 12px 0;
}

.products-table tbody td:last-child {
    border-left: 1px solid var(--border-color);
    border-radius: 12px 0 0 12px;
}

.product-image-cell {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
}

.product-image-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

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

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.status-badge.inactive {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.stock-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.stock-badge.low-stock {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.stock-badge.out-of-stock {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.product-actions {
    display: flex;
    gap: 8px;
}

.action-btn-table {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Ensure anchor tags styled as buttons work correctly */
a.action-btn-table {
    display: inline-flex;
    text-decoration: none;
}

.action-btn-table.edit {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.action-btn-table.edit:hover {
    background: #2196F3;
    color: #FFFFFF;
    transform: scale(1.1);
}

.action-btn-table.delete {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.action-btn-table.delete:hover {
    background: #F44336;
    color: #FFFFFF;
    transform: scale(1.1);
}

.action-btn-table.view {
    background: rgba(164, 129, 17, 0.1);
    color: var(--secondary-color);
}

.action-btn-table.view:hover {
    background: var(--secondary-color);
    color: #FFFFFF;
    transform: scale(1.1);
}

/* ===================================================
   ORDERS TRACKING
   =================================================== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 8px 25px var(--shadow-color);
    transform: translateY(-3px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.order-id {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.order-status-badge {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.order-status-badge.pending {
    background: rgba(255, 152, 0, 0.15);
    color: #FF9800;
}

.order-status-badge.processing {
    background: rgba(33, 150, 243, 0.15);
    color: #2196F3;
}

.order-status-badge.shipped {
    background: rgba(156, 39, 176, 0.15);
    color: #9C27B0;
}

.order-status-badge.delivered {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
}

.order-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.order-info-item {
    display: flex;
    flex-direction: column;
}

.order-info-item label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.order-info-item span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.order-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
}

/* ===================================================
   EMPTY STATE
   =================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: rgba(164, 129, 17, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    font-size: 40px;
    color: var(--secondary-color);
}

.empty-state h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn-primary, .vendor-btn-primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #c59a13 100%);
    color: #FFFFFF;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(164, 129, 17, 0.3);
}

.btn-primary:hover, .vendor-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(164, 129, 17, 0.4);
}

.btn-primary:active, .vendor-btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary, .vendor-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-secondary:hover, .vendor-btn-secondary:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.vendor-btn-outline {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.vendor-btn-outline:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #c59a13 100%);
    color: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(164, 129, 17, 0.4);
}

[data-theme="dark"] .vendor-btn-outline {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

[data-theme="dark"] .vendor-btn-outline:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #c59a13 100%);
    color: #1A1A3A;
}

/* ===================================================
   SIDEBAR TOOLBAR
   =================================================== */
.sidebar-topbar {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    position: relative;
    overflow: visible;
}

.sidebar-close-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    display: none; /* Hidden by default, shown on mobile */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-close-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #FFFFFF;
}

@media (max-width: 1024px) {
    .sidebar-close-btn {
        display: flex;
    }
}

.sidebar-topbar-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.sidebar-topbar-btn:hover {
    background: rgba(164, 129, 17, 0.1);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.sidebar-topbar-btn svg {
    flex-shrink: 0;
}

/* Language Dropdown in Sidebar */
.sidebar-language-dropdown {
    position: relative;
}

.sidebar-topbar-btn .current-lang-text {
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

.sidebar-language-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    min-width: 200px;
    width: max-content;
    max-width: 250px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.sidebar-language-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.sidebar-lang-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-align: left;
}

.sidebar-lang-option:hover {
    background: rgba(164, 129, 17, 0.1);
    color: var(--secondary-color);
}

.sidebar-lang-option.active {
    background: rgba(164, 129, 17, 0.15);
    color: var(--secondary-color);
    font-weight: 600;
}

.sidebar-lang-option .lang-flag {
    font-size: 20px;
    line-height: 1;
}

.sidebar-lang-option svg {
    margin-left: auto;
    stroke: var(--secondary-color);
}

/* Theme icon visibility */
body[data-theme="dark"] .sidebar-topbar-btn .sun-icon {
    display: block;
}

body[data-theme="dark"] .sidebar-topbar-btn .moon-icon {
    display: none;
}

body[data-theme="light"] .sidebar-topbar-btn .sun-icon {
    display: none;
}

body[data-theme="light"] .sidebar-topbar-btn .moon-icon {
    display: block;
}

/* ===================================================
   MOBILE RESPONSIVE
   =================================================== */
.mobile-menu-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: var(--secondary-color);
    color: #FFFFFF;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(164, 129, 17, 0.4);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    backdrop-filter: blur(5px);
}

@media (max-width: 1024px) {
    .dashboard-sidebar {
        position: fixed;
        left: -280px;
        transition: left 0.3s ease;
        z-index: 100;
    }

    .dashboard-sidebar.active {
        left: 0;
    }

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

    .mobile-menu-toggle {
        display: flex;
    }

    .dashboard-main {
        margin-right: 0;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-value {
        font-size: 24px;
    }

    .dashboard-title h1 {
        font-size: 24px;
    }

    .dashboard-title i {
        font-size: 28px;
    }

    .card-header h2 {
        font-size: 18px;
    }

    .card-body {
        padding: 18px;
    }

    .order-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dashboard-main {
        padding: 15px;
    }

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

    .dashboard-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dashboard-actions {
        width: 100%;
        justify-content: space-between;
    }

    .btn-primary, .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ===================================================
   CHARTS SECTION
   =================================================== */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.chart-card h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body[data-theme="light"] .chart-card h3 {
    color: #000000;
}

.chart-card h3 i {
    color: var(--secondary-color);
}

.chart-card canvas {
    max-height: 350px;
    width: 100% !important;
    height: auto !important;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .charts-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .chart-card {
        padding: 1.5rem;
    }

    .chart-card h3 {
        font-size: 1.2rem;
    }

    .chart-card canvas {
        max-height: 280px;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .charts-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .charts-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================================
   DARK THEME SPECIFIC ENHANCEMENTS
   =================================================== */

/* Dark theme badges */
[data-theme="dark"] .status-badge.active {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

[data-theme="dark"] .status-badge.inactive {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

[data-theme="dark"] .stock-badge.in-stock {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

[data-theme="dark"] .stock-badge.low-stock {
    background: rgba(251, 191, 36, 0.25);
    color: #fbbf24;
}

[data-theme="dark"] .stock-badge.out-of-stock {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

[data-theme="dark"] .order-status-badge.pending {
    background: rgba(251, 191, 36, 0.25);
    color: #fbbf24;
}

[data-theme="dark"] .order-status-badge.processing {
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}

[data-theme="dark"] .order-status-badge.shipped {
    background: rgba(168, 85, 247, 0.25);
    color: #c084fc;
}

[data-theme="dark"] .order-status-badge.delivered {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

/* Dark theme action buttons */
[data-theme="dark"] .action-btn-table.edit {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .action-btn-table.edit:hover {
    background: #3b82f6;
    color: #1a1a3a;
}

[data-theme="dark"] .action-btn-table.delete {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .action-btn-table.delete:hover {
    background: #ef4444;
    color: #1a1a3a;
}

[data-theme="dark"] .action-btn-table.view {
    background: rgba(164, 129, 17, 0.2);
    color: var(--secondary-color);
}

[data-theme="dark"] .action-btn-table.view:hover {
    background: var(--secondary-color);
    color: #1a1a3a;
}

/* Dark theme stat changes */
[data-theme="dark"] .stat-change.positive {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

[data-theme="dark"] .stat-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Dark theme table hover */
[data-theme="dark"] .products-table tbody tr:hover {
    background: rgba(164, 129, 17, 0.15);
}

/* Dark theme card hover */
[data-theme="dark"] .dashboard-card:hover,
[data-theme="dark"] .stat-card:hover,
[data-theme="dark"] .order-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* Dark theme buttons */
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .vendor-btn-secondary:hover {
    background: rgba(164, 129, 17, 0.2);
}

/* ===================================================
   THEMED SCROLLBAR
   =================================================== */
/* Works on WebKit-based browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 20px;
    border: 3px solid var(--bg-surface);
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #c59a13; /* A slightly brighter version of the secondary color */
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) var(--bg-surface);
}

/* ===================================================
   PRODUCTS TABLE RESPONSIVE
   =================================================== */
@media (max-width: 992px) {
    .products-table thead {
        display: none; /* Hide table headers on mobile */
    }

    .products-table,
    .products-table tbody,
    .products-table tr,
    .products-table td {
        display: block;
        width: 100%;
    }

    .products-table tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--border-color);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: var(--shadow-md);
    }

    .products-table td {
        padding: 12px 15px;
        text-align: left; /* For LTR content alignment */
        position: relative;
        padding-left: 130px; /* Space for the label */
        border: none;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        min-height: 50px;
    }

    html[dir="rtl"] .products-table td {
        text-align: right;
        padding-left: 15px;
        padding-right: 130px;
    }

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

    .products-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 110px; /* Fixed width for labels */
        font-weight: 600;
        color: var(--text-primary);
        font-size: 13px;
    }

    html[dir="rtl"] .products-table td::before {
        left: auto;
        right: 15px;
    }

    .products-table .checkbox-column,
    .products-table .actions-column {
        padding-left: 15px; /* No label needed */
    }
    html[dir="rtl"] .products-table .checkbox-column,
    html[dir="rtl"] .products-table .actions-column {
        padding-right: 15px;
    }

    .products-table .checkbox-column::before,
    .products-table .actions-column::before {
        display: none;
    }

    .products-table .actions-column .action-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    html[dir="rtl"] .products-table .actions-column .action-buttons {
        justify-content: flex-end;
    }
}

/* Dark theme sidebar toolbar */
[data-theme="dark"] .sidebar-topbar-btn {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .sidebar-topbar-btn:hover {
    background: rgba(164, 129, 17, 0.2);
    border-color: var(--secondary-color);
}

[data-theme="dark"] .sidebar-language-menu {
    background: var(--bg-secondary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .sidebar-lang-option:hover {
    background: rgba(164, 129, 17, 0.2);
}

[data-theme="dark"] .sidebar-lang-option.active {
    background: rgba(164, 129, 17, 0.25);
}
