/* ==========================================================================
   Bulkin Go Business Management - Modern Glassmorphic Design System & Global Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Default Theme: Royal Indigo Dark */
  --bg-primary: #0a0e1a;
  --bg-secondary: rgba(16, 22, 42, 0.7);
  --bg-tertiary: #1e294b;
  --accent-color: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --glass-bg: rgba(16, 22, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: rgba(0, 0, 0, 0.4);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  --sidebar-width: 260px;
  --sidebar-collapsed-width: 70px;
  
  --dropdown-bg: #10162a;
  
  --font-body: 'Outfit', sans-serif;
  --font-title: 'Outfit', sans-serif;
  --transition-speed: 0.3s;

  --header-bg: #0b1a24;
  --header-text: #ffffff;
  --header-border: rgba(255,255,255,0.1);
  --search-bg: rgba(255,255,255,0.06);
  --search-border: rgba(255,255,255,0.15);
  --search-text: #ffffff;
  --separator-color: rgba(255, 255, 255, 0.15);

  --input-bg: rgba(255, 255, 255, 0.05);
  --input-focus-bg: rgba(255, 255, 255, 0.08);
}

/* Color Theme Classes */
[data-theme="emerald"] {
  --bg-primary: #040d12;
  --bg-secondary: rgba(18, 53, 36, 0.7);
  --bg-tertiary: #1a4d2e;
  --accent-color: #10b981;
  --accent-hover: #059669;
  --accent-light: rgba(16, 185, 129, 0.15);
  --dropdown-bg: #091711;
}

[data-theme="crimson"] {
  --bg-primary: #120303;
  --bg-secondary: rgba(43, 8, 8, 0.7);
  --bg-tertiary: #4c1111;
  --accent-color: #ef4444;
  --accent-hover: #dc2626;
  --accent-light: rgba(239, 68, 68, 0.15);
  --dropdown-bg: #1b0a0a;
}

[data-theme="light-indigo"] {
  --bg-primary: #f8fafc;
  --bg-secondary: rgba(255, 255, 255, 0.85);
  --bg-tertiary: #e2e8f0;
  --accent-color: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.1);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-shadow: rgba(99, 102, 241, 0.05);
  --dropdown-bg: #ffffff;

  --header-bg: #ffffff;
  --header-text: #0f172a;
  --header-border: #e2e8f0;
  --search-bg: #f1f5f9;
  --search-border: #cbd5e1;
  --search-text: #0f172a;
  --separator-color: #e2e8f0;

  --input-bg: #ffffff;
  --input-focus-bg: #ffffff;
}

[data-theme="white"] {
  --bg-primary: #ffffff;
  --bg-secondary: rgba(248, 250, 252, 0.95);
  --bg-tertiary: #f1f5f9;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.1);
  --text-primary: #000000;
  --text-secondary: #1e293b;
  --text-muted: #475569;
  --glass-bg: rgba(255, 255, 255, 0.98);
  --glass-border: #cbd5e1;
  --glass-shadow: rgba(0, 0, 0, 0.04);
  --dropdown-bg: #ffffff;

  --header-bg: #ffffff;
  --header-text: #000000;
  --header-border: #cbd5e1;
  --search-bg: #f8fafc;
  --search-border: #cbd5e1;
  --search-text: #000000;
  --separator-color: #cbd5e1;

  --input-bg: #ffffff;
  --input-focus-bg: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.5;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ==========================================================================
   GLASSMORPHISM UTILITIES
   ========================================================================== */

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 24px;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.glass-btn {
  background: var(--accent-color);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition-speed), transform 0.1s;
}

.glass-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.glass-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.glass-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.glass-btn-transparent {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.glass-btn-transparent:hover {
  background: rgba(255, 255, 255, 0.08);
}


.glass-input {
  background: var(--input-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  outline: none;
  width: 100%;
  transition: border-color var(--transition-speed), background var(--transition-speed);
}

select.glass-input option {
  background-color: var(--dropdown-bg, #10162a);
  color: var(--text-primary, #f8fafc);
}

.glass-input:focus {
  border-color: var(--accent-color);
  background: var(--input-focus-bg, rgba(255, 255, 255, 0.08));
}

/* ==========================================================================
   LANDING PAGE LAYOUT
   ========================================================================== */

.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  background: transparent;
  backdrop-filter: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.landing-header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.logo-container span span {
  color: #818cf8 !important;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(129, 140, 248, 0.4);
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-color), #818cf8);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-secondary);
  transition: color var(--transition-speed) ease;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.landing-hero {
  padding: 50px 5% 50px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
}

.hero-badge {
  background: var(--accent-light);
  color: var(--accent-color);
  padding: 6px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 24px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.hero-title {
  font-family: var(--font-title);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 900px;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 20px;
}

/* Feature grid */
.section-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
}

.landing-section {
  padding: 60px 5%;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-card {
  text-align: left;
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Pricing Grid */
.pricing-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 40px;
}

.pricing-card {
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.pricing-card.premium::after {
  content: 'BEST VALUE';
  position: absolute;
  top: 20px;
  right: -35px;
  background: var(--accent-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 35px;
  transform: rotate(45deg);
}

.price-header {
  text-align: center;
  margin-bottom: 24px;
}

.price-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.price-amount {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 10px 0;
  font-family: var(--font-title);
}

.price-features {
  list-style: none;
  width: 100%;
  margin-bottom: 30px;
}

.price-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.price-features li i {
  color: var(--success);
}

/* ==========================================================================
   DASHBOARD PANEL LAYOUT
   ========================================================================== */

.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  background: rgba(15, 23, 42, 0.95);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-speed);
  z-index: 100;
}

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

.sidebar-menu {
  list-style: none;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-speed), color var(--transition-speed);
}

.menu-item:hover, .menu-item.active {
  background: var(--accent-light);
  color: #ffffff;
}

.menu-item i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--glass-border);
}

.sidebar-footer #sidebar-username {
  color: var(--text-primary) !important;
}

.sidebar-footer #sidebar-role {
  color: var(--text-secondary) !important;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.top-nav {
  height: 70px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.search-bar {
  position: relative;
  width: 300px;
}

.search-bar input {
  padding-left: 40px;
}

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

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
}

.content-body {
  flex: 1;
  padding: 15px 30px 30px 30px;
  overflow-y: auto;
  background: radial-gradient(circle at bottom right, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}

/* ==========================================================================
   CARDS & GRID LAYOUT
   ========================================================================== */

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.metric-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-info h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.metric-info .value {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

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

/* ==========================================================================
   TABLES & FORMS
   ========================================================================== */

.table-container {
  overflow-x: auto;
  margin-top: 20px;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 14px 18px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.9rem;
}

.custom-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.95rem;
}

.custom-table tr:hover td {
  background: var(--accent-light);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}

.status-paid {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.status-unpaid {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.status-partial {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* Form Groups */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   AI CHAT ASSISTANT
   ========================================================================== */

.ai-chat-card {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 15px;
}

.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 14px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.chat-bubble.ai {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  align-self: flex-start;
}

.chat-bubble.user {
  background: var(--accent-color);
  color: white;
  align-self: flex-end;
}

.chat-input-row {
  display: flex;
  gap: 12px;
}

/* ==========================================================================
   THEME SELECTOR PANEL
   ========================================================================== */

.theme-palette {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.theme-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
}

.theme-indigo { background: #6366f1; }
.theme-emerald { background: #10b981; }
.theme-crimson { background: #ef4444; }
.theme-light { background: #cbd5e1; }
.theme-white { background: #ffffff; border: 1px solid #cbd5e1 !important; }

/* ==========================================================================
   VERTICAL DROPDOWN ACTION MENU
   ========================================================================== */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 105%;
  background: var(--dropdown-bg);
  border: 1px solid var(--glass-border);
  min-width: 190px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 999;
  border-radius: 8px;
  padding: 6px 0;
  margin-top: 5px;
  text-align: left;
}

.dropdown-content a {
  color: var(--text-primary) !important;
  padding: 10px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
  font-size: 0.85rem;
  transition: background 0.25s ease, color 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}

.dropdown-content a:hover {
  background: var(--accent-light);
  color: var(--accent-color) !important;
}

.show-dropdown {
  display: block !important;
}

/* Sidebar Dropdown Menu & Submenus */
.menu-item-dropdown {
  display: flex;
  flex-direction: column;
}

.menu-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.25s ease;
}

.menu-item-header > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item-header:hover {
  background: var(--glass-highlight);
  color: #ffffff;
}

.submenu-item {
  color: rgba(255, 255, 255, 0.65);
  transition: all 0.25s ease;
  margin-bottom: 2px;
}

.submenu-item:hover {
  background: var(--glass-highlight);
  color: #ffffff;
}

.submenu-item.active {
  background: var(--accent-light) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.arrow-icon {
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}

.arrow-rotate {
  transform: rotate(180deg);
}

.toggle-vars-arrow {
  transition: transform 0.2s ease;
  display: inline-block;
  transform-origin: center;
}

.vars-detail-box {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ==========================================================================
   PRINT MEDIA STYLES FOR SELLER DASHBOARD INVOICES
   ========================================================================== */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  /* Hide dashboard navigation layouts, sidebars, headers and print action buttons */
  .sidebar,
  .top-bar,
  header,
  footer,
  #top-bar,
  #invoice-template-section > div:first-child,
  .glass-btn,
  .top-up-btn,
  #modal-ad-wallet-topup,
  #modal-ewaybill-config {
    display: none !important;
  }

  /* Show only the invoice container card and ensure it covers the full width/page */
  #invoice-template-section {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
  }

  #invoice-template-section .glass-card {
    background: white !important;
    color: black !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
}

/* Inventory Metric Cards Premium Styling */
.inventory-metric-cards .metric-card {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease !important;
}

.inventory-metric-cards .metric-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.inventory-metric-cards .metric-card:active {
  transform: translateY(-1px) scale(1.01);
}

/* ==========================================================================
   Modern Elegant Admin Panel Refactoring Layout Styles
   ========================================================================== */

/* Page Fade-In Slide-Up Animation */
@keyframes slideUpFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-slide-up {
  animation: slideUpFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Sidebar Custom Scrollbars */
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Base resets for modern layout */
@media (min-width: 992px) {
  body {
    background-color: #f8fafc !important; /* Soft premium background */
  }
  .app-container {
    margin-top: 0 !important;
    height: 100vh !important;
    display: flex;
    position: relative;
    overflow: hidden;
  }
  .sidebar {
    transform: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    background: #090d16 !important; /* Deep Premium Dark Navy */
    z-index: 1050 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.04) !important;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
  }
  .top-header {
    position: fixed !important;
    top: 0 !important;
    left: 260px !important;
    right: 0 !important;
    height: 70px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    z-index: 1030 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px !important;
    box-sizing: border-box !important;
  }
  .main-content {
    margin-left: 260px !important;
    margin-top: 70px !important;
    height: calc(100vh - 70px) !important;
    padding: 30px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    background: #f8fafc !important; /* Elegant background color */
  }
}

@media (max-width: 991px) {
  .app-container {
    margin-top: 70px !important;
    height: calc(100vh - 70px) !important;
  }
  .top-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 70px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    z-index: 1030 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px !important;
  }
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    width: 280px !important;
    background: #090d16 !important;
    z-index: 1060 !important;
    border-right: none !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 15px !important;
    height: 100% !important;
    overflow-y: auto !important;
    background: #f8fafc !important;
  }
}

/* Sidebar Branding Styles */
.sidebar-brand-wrapper {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.01);
}
.sidebar-brand-logo {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.1rem;
}
.sidebar-brand-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff;
  letter-spacing: 0.5px;
}

/* Sidebar Menu Overhaul */
.sidebar-menu {
  background: #090d16 !important;
  padding: 15px 0 !important;
  list-style: none !important;
  overflow-y: auto !important;
  flex: 1;
}

/* Direct link and accordion header base */
.sidebar-menu .menu-item,
.sidebar-menu .menu-item-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  
  margin: 4px 16px !important;
  border-radius: 8px !important;
  border-bottom: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  color: rgba(255, 255, 255, 0.65) !important;
  background: transparent !important;
  box-sizing: border-box !important;
}

/* Inactive items icons */
.sidebar-menu .menu-item i,
.sidebar-menu .menu-item-header i.fa-solid:first-child,
.sidebar-menu .menu-item-header div i.fa-solid {
  font-size: 1rem !important;
  width: 20px !important;
  text-align: center !important;
  color: rgba(255, 255, 255, 0.5) !important;
  transition: color 0.2s !important;
  display: inline-block !important; /* Bring back icon visibility */
}

/* Override dropdown structure */
.sidebar-menu .menu-item-header > div {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* Right arrow chevron repositioning and layout */
.sidebar-menu .arrow-icon {
  margin-left: auto !important;
  font-size: 0.75rem !important;
  color: rgba(255, 255, 255, 0.4) !important;
  order: 1 !important; /* Move caret to the absolute right side */
  transition: transform 0.2s ease !important;
}

/* Hover States */
.sidebar-menu .menu-item:hover,
.sidebar-menu .menu-item-header:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #ffffff !important;
}
.sidebar-menu .menu-item:hover i,
.sidebar-menu .menu-item-header:hover i {
  color: #ffffff !important;
}

/* Active Pill Styles (Dashboard, etc.) */
.sidebar-menu .menu-item.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25) !important;
}
.sidebar-menu .menu-item.active i {
  color: #ffffff !important;
}

/* Accordion Header Expanded Active text styles */
.sidebar-menu .menu-item-header.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.02) !important;
}
.sidebar-menu .menu-item-header.active i {
  color: #ffffff !important;
}

/* Sidebar Submenus */
.sidebar-menu .submenu {
  list-style: none !important;
  padding: 2px 0 6px 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Submenu links */
.sidebar-menu .submenu-item {
  display: flex !important;
  align-items: center !important;
  padding: 8px 16px 8px 48px !important; /* Indented alignment */
  margin: 2px 16px !important;
  cursor: pointer !important;
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
  background: transparent !important;
}
.sidebar-menu .submenu-item:hover {
  background: rgba(255, 255, 255, 0.03) !important;
  color: #ffffff !important;
}
.sidebar-menu .submenu-item.active {
  color: #3b82f6 !important;
  font-weight: 700 !important;
  background: rgba(59, 130, 246, 0.08) !important;
}

/* Custom Pills Badges inside side menu */
.sidebar-badge {
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  margin-left: 8px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  display: inline-block !important;
}
.sidebar-badge.b2b {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #3b82f6 !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
}
.sidebar-badge.new {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

/* Premium Upgrade card at sidebar bottom */
.premium-card {
  margin: 15px 16px 20px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  box-sizing: border-box;
}
.premium-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.premium-card-title i {
  color: #eab308;
  font-size: 0.85rem;
}
.premium-card-desc {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 12px;
  line-height: 1.4;
}
.premium-card-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  width: 100%;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}
.premium-card-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}
.premium-card-btn:active {
  transform: translateY(0);
}

/* Hide default mobile close header in our redesigned drawer */
.sidebar-drawer-header {
  display: none !important;
}
@media (max-width: 991px) {
  .sidebar-drawer-header {
    display: flex !important;
    background: #0e131f !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    color: #ffffff !important;
    padding: 16px 20px !important;
  }
  .sidebar-drawer-header span {
    color: #ffffff !important;
  }
  .sidebar-drawer-header i {
    color: rgba(255,255,255,0.6) !important;
  }
}

/* Top Header Elements */
.header-select-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 8px;
  padding: 0 28px 0 12px;
  height: 36px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all 0.2s;
  /* Custom arrow chevron icon styling */
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 11px;
}
.header-select-box:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
}
.header-select-box:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.header-search-container {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  gap: 8px;
  width: 240px;
  transition: all 0.2s;
  box-sizing: border-box;
}
.header-search-container:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.header-search-container:focus-within {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
  width: 280px; /* Slight expand */
}
.header-search-input {
  background: none;
  border: none;
  color: #1e293b;
  outline: none;
  font-size: 0.82rem;
  width: 100%;
  font-family: inherit;
}
.header-search-input::placeholder {
  color: #94a3b8;
}
.header-search-kbd {
  font-size: 0.65rem;
  color: #94a3b8;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
  user-select: none;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

.header-action-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.15rem;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s;
}
.header-action-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.header-action-btn-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.62rem;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.header-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.2s;
  user-select: none;
}
.header-profile-card:hover {
  background: #f1f5f9;
}
.header-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  background: #e2e8f0;
}
.header-profile-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.25;
}
.header-profile-role {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

/* Switcher design refinements (Mockup styling) */
.b2b-mode-switcher-container {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 20px;
  padding: 3px;
  border: 1px solid #e2e8f0;
}
.b2b-mode-btn {
  border: none;
  background: transparent;
  color: #64748b !important;
  opacity: 1 !important;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.b2b-mode-btn:hover {
  color: #1e293b !important;
}
.b2b-mode-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

/* Custom Table Polish */
.custom-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.custom-table th {
  background: #f8fafc !important;
  color: #64748b !important;
  font-size: 0.78rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  font-weight: 700 !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
.custom-table td {
  padding: 14px 18px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-size: 0.88rem !important;
  color: #334155 !important;
}
.custom-table tr:last-child td {
  border-bottom: none !important;
}
.custom-table tr:hover td {
  background: #f8fafc !important;
}

/* Premium transparent inputs */
.glass-input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  border-radius: 10px !important;
  padding: 0 15px !important;
  font-size: 0.88rem !important;
  transition: all 0.2s !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
}
.glass-input:hover {
  border-color: #94a3b8 !important;
}
.glass-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08) !important;
  outline: none !important;
}

/* Custom dropdown style content overlay */
.dropdown-content {
  border-radius: 10px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.05) !important;
  background: #ffffff !important;
}
.dropdown-content a {
  color: #334155 !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  padding: 8px 14px !important;
  transition: background 0.15s !important;
}
.dropdown-content a:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

/* Elegant Soft Badge styles */
.status-badge {
  border-radius: 6px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 2px 8px !important;
  text-transform: capitalize !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  border: 1px solid transparent !important;
}
.status-badge.status-paid, .status-badge.instock {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border-color: #a7f3d0 !important;
}
.status-badge.status-partial, .status-badge.lowstock {
  background: #fffbeb !important;
  color: #d97706 !important;
  border-color: #fde68a !important;
}
.status-badge.status-unpaid, .status-badge.outofstock {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}
.status-badge.upcoming {
  background: rgba(245,158,11,0.08) !important;
  color: #d97706 !important;
  border-color: rgba(245,158,11,0.2) !important;
}

/* ==========================================================================
   Desktop Sidebar Toggle (Expand/Collapse) Support
   ========================================================================== */
@media (min-width: 992px) {
  .sidebar {
    left: 0 !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  .top-header {
    left: 260px !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  .main-content {
    margin-left: 260px !important;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  /* Collapsed layout overrides */
  body.sidebar-collapsed .sidebar {
    transform: translateX(-260px) !important;
  }
  body.sidebar-collapsed .top-header {
    left: 0 !important;
  }
  body.sidebar-collapsed .main-content {
    margin-left: 0 !important;
  }
}

/* ==========================================================================
   Compact Top Header Elements (To prevent wrapping/crowding on desktop)
   ========================================================================== */
.header-select-box {
  font-size: 0.76rem !important;
  padding: 0 24px 0 10px !important;
  height: 30px !important;
  background-position: right 8px center !important;
  background-size: 9px !important;
}

.b2b-mode-btn {
  padding: 4px 10px !important;
  font-size: 0.72rem !important;
  gap: 4px !important;
}

.header-search-container {
  padding: 4px 10px !important;
  gap: 6px !important;
  width: 170px !important;
}
.header-search-container:focus-within {
  width: 210px !important;
}
.header-search-input {
  font-size: 0.78rem !important;
}

.header-action-btn {
  font-size: 1.05rem !important;
  width: 32px !important;
  height: 32px !important;
}
.header-action-btn-badge {
  top: 2px !important;
  right: 2px !important;
}

.header-profile-avatar {
  width: 30px !important;
  height: 30px !important;
}
.header-profile-name {
  font-size: 0.78rem !important;
}
.header-profile-role {
  font-size: 0.68rem !important;
}

/* Left icon inputs spacing */
.glass-input.has-left-icon {
  padding-left: 38px !important;
  padding-right: 35px !important;
}

/* Right icon input padding override */
.glass-input.has-right-icon {
  padding-right: 40px !important;
}
