/* ==========================================================================
   NEBURIX B2B FIELD SALES & DELIVERY ERP — COMPLETE DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-primary: #090d1a;
  --bg-secondary: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(16, 185, 129, 0.5);

  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-teal: #14b8a6;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #020617;

  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--accent-emerald-glow);

  --header-height: 64px;
  --nav-bottom-height: 68px;
  --sidebar-width: 260px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Lights */
.bg-ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.orb-emerald {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
  top: -100px;
  right: -50px;
}

.orb-blue {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  bottom: 10%;
  left: -100px;
}

/* Auth Gate Screen */
.auth-gate-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
}

.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6);
}

.auth-brand-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.google-auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background: #ffffff;
  color: #1f2937;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  margin: 1.5rem 0 1rem;
}

.google-auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.company-select-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  text-align: left;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.company-select-badge:hover, .company-select-badge.selected {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

/* App Main Container */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  width: 100%;
  overflow-x: hidden;
}

/* Sidebar Backdrop for Mobile Drawer */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 16, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Desktop Sidebar Navigation */
.desktop-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem;
  z-index: 50;
  backdrop-filter: blur(16px);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar-close-btn {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.sidebar-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-rose);
}

.brand-logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.brand-info h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-info span {
  font-size: 0.75rem;
  color: var(--accent-emerald);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  overflow-y: auto;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item-btn.active {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.03));
  color: var(--accent-emerald);
  font-weight: 600;
  border-left: 3px solid var(--accent-emerald);
}

.nav-item-btn i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  color: var(--text-muted);
  font-weight: 600;
}

/* Vehicle Stock Ticker Card in Sidebar */
.vehicle-stock-sidebar-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

.vehicle-stock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.sidebar-user-card {
  padding: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.7rem;
  color: var(--accent-emerald);
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: 5rem;
}

/* Top App Bar */
.top-app-bar {
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 0.75rem;
}

.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover, .mobile-menu-btn:active {
  background: var(--bg-card-hover);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gps-status-pill,
.live-gps-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.65rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-emerald);
  flex-shrink: 0;
  white-space: nowrap;
}

.gps-status-pill.gps-searching {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--accent-amber);
}

.pulse-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.top-bar-right,
.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

/* Page Views Container */
.page-view {
  padding: 1.5rem;
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.page-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Metrics Grid — Compact Horizontal Row */
.metrics-row,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

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

@media (max-width: 520px) {
  .metrics-row,
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-emerald), transparent);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.metric-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.metric-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.metric-trend-up {
  color: var(--accent-emerald);
  font-weight: 600;
}

/* POS Screen Split Layout */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
}

/* Mode Switcher (B2B Shop vs Marriage/Bulk Event) */
.order-mode-tabs {
  display: flex;
  background: var(--bg-card);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  gap: 0.35rem;
}

.mode-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.mode-tab.active {
  background: var(--accent-emerald);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Category Filter Bar */
.category-filter-scroll {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  scrollbar-width: none;
}

.category-filter-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  padding: 0.45rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cat-pill:hover, .cat-pill.active {
  background: var(--bg-card-hover);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

/* Product Catalog Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.product-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.product-item-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-emerald);
  box-shadow: var(--shadow-md);
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  text-transform: uppercase;
}

.product-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--accent-emerald);
  margin-bottom: 0.75rem;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.product-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
}

.product-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* POS Cart / Order Summary Sidebar */
.pos-cart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  backdrop-filter: blur(16px);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.85rem;
}

.cart-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Customer Selector Box */
.shop-selector-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-select, .form-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s;
}

.form-select:focus, .form-input:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 2px var(--accent-emerald-glow);
}

/* Cart Items List */
.cart-items-scroll {
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-rate {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0.5rem;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
}

.qty-display {
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  font-family: var(--font-mono);
}

.cart-item-total {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
}

/* Cart Financial Breakdown */
.cart-totals-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
}

.cart-totals-table td {
  padding: 0.25rem 0;
  color: var(--text-secondary);
}

.cart-totals-table td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.cart-totals-table tr.grand-total td {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-emerald);
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
}

/* Payment Mode Grid */
.payment-modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.payment-btn {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.payment-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

/* Route & GPS Check-in View */
.route-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.shop-route-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: all 0.2s ease;
}

.shop-route-card:hover {
  border-color: var(--border-focus);
}

.shop-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.shop-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.shop-card-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.visit-badge {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.visit-badge.visited {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.visit-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.shop-stats-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stat-pill {
  padding: 0.3rem 0.6rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.stat-pill strong {
  color: var(--text-primary);
}

.shop-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* Khata / Customer Ledger Table */
.data-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
  margin-bottom: 1.5rem;
}

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

.table-search-input {
  max-width: 320px;
  padding: 0.5rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}

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

.custom-table th {
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.custom-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.custom-table tr:hover td {
  background: var(--bg-card-hover);
}

.balance-badge {
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.balance-badge.due {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.balance-badge.clear {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

/* Blending & Inventory Calculator */
.blend-calculator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.blend-slider-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.25rem 0;
}

.slider-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.slider-label {
  width: 140px;
  font-size: 0.85rem;
  font-weight: 600;
}

.slider-range {
  flex: 1;
  accent-color: var(--accent-emerald);
  height: 6px;
  border-radius: var(--radius-full);
}

.slider-val {
  width: 60px;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-emerald);
}

/* Modal Popup Framework */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Thermal Bill Slip Preview */
.receipt-paper {
  background: #ffffff;
  color: #111827;
  font-family: 'Courier New', Courier, monospace;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.25rem;
}

.receipt-center {
  text-align: center;
}

.receipt-divider {
  border-top: 1px dashed #9ca3af;
  margin: 0.6rem 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

/* Excel 31-Day Grid Table */
.excel-grid-container {
  overflow-x: auto;
  max-height: 450px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.excel-grid-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.excel-grid-table th {
  background: #1e293b;
  color: #94a3b8;
  padding: 0.5rem 0.65rem;
  border: 1px solid #334155;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.excel-grid-table td {
  padding: 0.45rem 0.65rem;
  border: 1px solid #334155;
  text-align: center;
  color: #e2e8f0;
}

.excel-grid-table td:nth-child(2) {
  text-align: left;
  font-weight: 700;
  font-family: var(--font-main);
  position: sticky;
  left: 0;
  background: #0f172a;
  z-index: 5;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-bottom-height);
  background: rgba(11, 17, 32, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.5rem;
  padding-bottom: max(0.45rem, env(safe-area-inset-bottom));
  z-index: 60;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.mobile-nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 52px;
  position: relative;
}

.mobile-nav-tab i {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.mobile-nav-tab.active {
  color: var(--accent-emerald);
}

.mobile-nav-tab.active i {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px var(--accent-emerald-glow));
}

.mobile-nav-tab.active::after {
  content: '';
  position: absolute;
  top: 0px;
  width: 20px;
  height: 2px;
  background: var(--accent-emerald);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--accent-emerald);
}

/* Mobile Floating Quick-Cart Bar for POS */
.mobile-quick-cart {
  display: none;
  position: fixed;
  bottom: calc(var(--nav-bottom-height) + env(safe-area-inset-bottom, 0px) + 8px);
  left: 1rem;
  right: 1rem;
  z-index: 55;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45), 0 0 20px rgba(16, 185, 129, 0.2);
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  animation: cartBarPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.2s ease;
}

.mobile-quick-cart.active {
  display: flex;
}

.mobile-quick-cart:active {
  transform: scale(0.98);
}

.quick-cart-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.quick-cart-info i {
  font-size: 1.1rem;
}

.quick-cart-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
}

@keyframes cartBarPop {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Rules & Mobile Breakpoints */
@media (max-width: 900px) {
  .desktop-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  }
  
  .desktop-sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: flex;
  }

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

  .mobile-bottom-nav {
    display: flex;
  }

  .main-content {
    padding-bottom: calc(var(--nav-bottom-height) + env(safe-area-inset-bottom, 12px) + 25px);
  }
}

@media (max-width: 768px) {
  .top-app-bar {
    padding: 0.5rem 0.85rem;
    height: auto;
    min-height: 56px;
    gap: 0.5rem;
  }

  .page-view {
    padding: 0.85rem;
  }

  .metrics-row,
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .metric-card {
    padding: 0.75rem 0.85rem;
  }

  .metric-header {
    margin-bottom: 0.4rem;
  }

  .metric-title {
    font-size: 0.72rem;
  }

  .metric-icon {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .metric-value {
    font-size: 1.15rem;
  }

  .metric-subtext {
    font-size: 0.7rem;
  }

  /* POS Layout */
  .pos-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .product-item-card {
    padding: 0.85rem;
  }

  .product-item-title {
    font-size: 0.9rem;
  }

  .product-item-rate {
    font-size: 1.05rem;
  }

  /* Table search & header stacking */
  .table-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.85rem;
  }

  .table-search-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .custom-table {
    min-width: 580px;
    font-size: 0.8rem;
  }

  /* Modal responsiveness */
  .modal-container {
    width: 95%;
    max-width: 480px;
    max-height: 88vh;
    padding: 1.15rem 1rem;
  }
}

@media (max-width: 520px) {
  .page-title {
    font-size: 0.92rem;
    max-width: 130px;
  }

  .gps-status-pill,
  .live-gps-pill {
    padding: 0.25rem 0.5rem;
    font-size: 0.68rem;
  }

  .top-bar-actions .btn-primary,
  .top-bar-actions .btn-secondary {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    gap: 0.3rem;
  }

  .order-mode-tabs {
    flex-direction: row;
    gap: 0.25rem;
    padding: 0.25rem;
  }

  .mode-tab {
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
  }

  .payment-modes-grid {
    gap: 0.35rem;
  }

  .payment-btn {
    padding: 0.55rem 0.4rem;
    font-size: 0.75rem;
  }

  /* Collapse multi-column form grids inside modal dialogs on mobile */
  .modal-container form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .form-input,
  .form-select {
    font-size: 16px !important; /* Prevents auto-zoom in iOS Safari */
    min-height: 42px;
  }
}

@media (max-width: 360px) {
  .metrics-row,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

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

/* ==========================================
   MASTER DATA HUB — Tables, Tags & Badges
   ========================================== */

/* Data Table Container */
.data-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.table-search-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  min-width: 200px;
  max-width: 280px;
  transition: border-color 0.2s ease;
}

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

.table-search-input:focus {
  outline: none;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

/* Custom Data Table */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.custom-table thead th {
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 5;
}

.custom-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s ease;
}

.custom-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.04);
}

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

.custom-table td {
  padding: 0.6rem 0.85rem;
  color: var(--text-primary);
  vertical-align: middle;
}

/* Category Tag Pill */
.category-tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(20, 184, 166, 0.12);
  color: #14b8a6;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Stock Pill Indicator */
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.stock-pill.in-stock {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.stock-pill.empty {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
}

/* Status Badges */
.badge-emerald {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  font-size: 0.7rem;
  font-weight: 700;
}

.balance-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.balance-badge.due {
  background: rgba(244, 63, 94, 0.12);
  color: var(--accent-rose);
}

.balance-badge.clear {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

/* Report Sub-Navigation Bar */
.report-subnav-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  margin-bottom: 1.25rem;
}

.report-subnav-scroll::-webkit-scrollbar {
  display: none;
}

/* Quality Rating Badges */
.badge-vg {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-good {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-avg {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Stock Adjustment Reason Badges */
.badge-surplus {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-shortage, .badge-wastage, .badge-damage {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-sample {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Adjustment Action Card */
.adjustment-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(12px);
}

/* Distribution Grid */
.distribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.grade-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.grade-stat-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.grade-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-emerald);
  margin-top: 2px;
}

/* ==========================================
   TOAST NOTIFICATION SYSTEM
   ========================================== */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 25px rgba(16, 185, 129, 0.25);
  color: #f8fafc;
  padding: 0.9rem 1.35rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(16px);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastFadeOut 0.35s ease 3.6s forwards;
  max-width: 420px;
}

.toast-message.toast-error {
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 25px rgba(244, 63, 94, 0.25);
}

.toast-icon {
  font-size: 1.25rem;
  color: var(--accent-emerald);
  flex-shrink: 0;
}

.toast-message.toast-error .toast-icon {
  color: var(--accent-rose);
}

@keyframes toastSlideIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
  to { transform: translateY(-15px); opacity: 0; }
}

/* ==========================================
   SUBSCRIPTION & RAZORPAY BILLING STYLES
   ========================================== */
.plan-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-pill-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  border-color: var(--accent-emerald);
}

.plan-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulsePlan 2s infinite;
}

@keyframes pulsePlan {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.sidebar-plan-card {
  margin-top: auto;
  margin-bottom: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
  border: 1px solid rgba(59, 130, 246, 0.3);
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-plan-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.sidebar-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.sidebar-plan-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-plan-quota {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.sidebar-plan-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}

.sidebar-plan-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 9999px;
}

/* Subscription Plan Cards Grid */
.plan-cards-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}

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

.modal-plan-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s;
}

.modal-plan-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal-plan-card.active-plan {
  border: 2px solid var(--accent-emerald);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.6));
}

.modal-plan-card.featured-plan {
  border: 2px solid #8b5cf6;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.1), rgba(15, 23, 42, 0.6));
}

.modal-plan-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: #fff;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}

.modal-plan-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.5rem 0;
  font-family: var(--font-mono);
}

.modal-plan-price span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.modal-plan-features {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 1.25rem 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.modal-plan-features li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.modal-plan-features li i {
  color: var(--accent-emerald);
  font-size: 0.8rem;
}

.razorpay-secure-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.razorpay-secure-tag img {
  height: 14px;
  filter: brightness(0.9);
}

