/* VTECH POS DESIGN SYSTEM - STYLES.CSS */

/* 1. VARIABLES & RESET */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  /* Color Palette - Vibrant Dark Mode */
  --bg-app: #080b11;
  --bg-gradient: linear-gradient(135deg, #07090e 0%, #0c121e 100%);
  --bg-sidebar: rgba(10, 15, 26, 0.8);
  --bg-card: rgba(18, 26, 42, 0.5);
  --bg-card-hover: rgba(26, 38, 61, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  
  /* Primary & Accent Glows */
  --primary: hsl(101, 64%, 61%);
  --primary-glow: rgba(126, 217, 87, 0.25);
  --secondary: hsl(101, 64%, 55%);
  --secondary-glow: rgba(126, 217, 87, 0.2);
  --accent-cyan: hsl(180, 80%, 45%);
  
  /* Status Colors */
  --success: hsl(142, 71%, 45%);
  --success-glow: rgba(34, 197, 94, 0.15);
  --warning: hsl(38, 92%, 50%);
  --danger: hsl(0, 84%, 60%);
  
  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* UI Metrics */
  --sidebar-width: 250px;
  --checkout-width: 380px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Glassmorphic Shadow */
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glow-subtle: 0 0 20px rgba(59, 130, 246, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
}

/* 2. DYNAMIC WEB APP SCROLLBARS */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 3. LAYOUT STRUCTURE */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Hide checkout sidebar if class is toggled on container */
.app-container.hide-checkout .checkout-sidebar {
  display: none;
}

/* Left Navigation Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

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

.logo-icon {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-primary);
}

.logo-dot {
  color: var(--primary);
}

.sidebar-nav {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-item svg {
  transition: var(--transition-fast);
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

.nav-item.active svg {
  color: var(--primary);
  filter: drop-shadow(0 0 5px var(--primary-glow));
}

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

.cashier-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.cashier-info {
  display: flex;
  flex-direction: column;
}

.cashier-name {
  font-size: 14px;
  font-weight: 600;
}

.cashier-role {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Main Content Panel */
.main-content {
  flex-grow: 1;
  height: 100vh;
  overflow: hidden; /* Prevent page-level scrollbar */
  padding: 32px;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-shrink: 0;
}

#view-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.text-secondary {
  color: var(--text-secondary);
  font-size: 14px;
}

.live-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.clock-icon {
  color: var(--primary);
}

.content-section {
  display: none;
  flex-grow: 1;
  flex-direction: column;
  height: 0;
  min-height: 0;
  overflow: hidden;
}

.content-section.active {
  display: flex;
}

/* Sections that require standard page scrolling */
#view-dashboard-container,
#view-settings-container {
  overflow-y: auto;
  height: 100%;
}

/* 4. GLASSMORPHIC GENERAL STYLING */
.card-glass {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glass);
  padding: 24px;
  transition: var(--transition-normal);
}

.card-glass:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-glass), var(--glow-subtle);
}

/* Buttons Design System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-color-hover);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

.btn-icon-secondary {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon-secondary:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-color-hover);
}

/* 5. CATALOG VIEW ELEMENTS */
.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 16px 16px 16px 52px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-sans);
  transition: var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.category-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none; /* Firefox */
}

.category-chips::-webkit-scrollbar {
  display: none; /* Safari / Chrome */
}

.chip {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.chip.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* Product Card Grid */
.product-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-bottom: 24px;
  flex-grow: 1;
  min-height: 0;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 80px 1fr 150px;
  grid-template-rows: auto auto;
  gap: 6px 16px;
  align-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-sizing: border-box;
  min-height: 100px;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
  opacity: 0;
  transition: var(--transition-fast);
}

.product-card:hover {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glass), 0 0 25px rgba(59, 130, 246, 0.06);
}

.product-card:hover::before {
  opacity: 1;
}

.product-image-container {
  grid-row: span 2;
  grid-column: 1;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  margin: 0;
}

.product-card:hover .product-image-container {
  background: rgba(255, 255, 255, 0.04);
}

.product-icon-svg {
  color: var(--text-secondary);
  opacity: 0.8;
  transition: var(--transition-fast);
}

.product-card:hover .product-icon-svg {
  color: var(--primary);
  transform: scale(1.1);
}

.stock-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-instock {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.stock-lowstock {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.stock-outofstock {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.product-info-main {
  grid-row: 1;
  grid-column: 2;
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.product-info-specs {
  grid-row: 2;
  grid-column: 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.product-info-stock {
  grid-row: 1;
  grid-column: 3;
  align-self: end;
  justify-self: end;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.product-actions {
  grid-row: 2;
  grid-column: 3;
  align-self: start;
  justify-self: end;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  min-width: 120px;
  border-left: none;
  padding-left: 0;
}

.product-brand {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.product-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-specs {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 10px;
}

.product-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.add-btn-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.product-card:hover .add-btn-circle {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* 6. RIGHT SIDEBAR: CART CONTAINER */
.checkout-sidebar {
  width: var(--checkout-width);
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.checkout-sidebar .sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
}

.checkout-sidebar h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.customer-selector-container {
  padding: 0 24px 18px 24px;
  border-bottom: 1px solid var(--border-color);
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.select-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.select-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
}

.select-input option {
  background: #0f172a;
  color: var(--text-primary);
}

/* Scrollable Cart Wrap */
.cart-items-wrapper {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.empty-icon-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-text {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-subtext {
  font-size: 12px;
}

.cart-item {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  position: relative;
  animation: itemSlideIn var(--transition-normal);
  flex-direction: column;
}

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

.cart-item-header-row {
  display: flex;
  justify-content: space-between;
  padding-right: 18px;
}

.cart-item-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.cart-item-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-price {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.original-price-strike {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 12px;
}

.cart-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 8px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

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

.qty-val {
  font-size: 13px;
  font-weight: 600;
  width: 20px;
  text-align: center;
}

.item-total {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.cart-item-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.cart-item-remove:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

/* Item Discount styling */
.cart-item-discount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 4px 8px;
  margin-top: 4px;
}

.discount-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.discount-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0 4px;
}

.currency-prefix-sm {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.discount-input {
  width: 55px;
  border: none;
  background: transparent;
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  outline: none;
  padding: 2px 0;
}

/* Cart Summary & Payments */
.cart-summary-wrapper {
  padding: 20px 24px 24px 24px;
  background: rgba(5, 8, 15, 0.5);
  border-top: 1px solid var(--border-color);
}

.pricing-totals {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-row span:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.text-success-light span:first-child,
.text-success-light span:last-child {
  color: var(--success) !important;
}

.divider {
  height: 1px;
  background: var(--border-color);
  margin: 6px 0;
}

.pricing-total {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary) !important;
  font-family: var(--font-display);
}

.pricing-total span:last-child {
  color: var(--text-primary) !important;
  font-size: 20px;
  font-weight: 800;
}

.payment-modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.payment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.payment-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-color-hover);
  color: var(--text-primary);
}

.payment-btn-primary {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--secondary);
}

.payment-btn-primary:hover {
  background: var(--secondary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--secondary-glow);
}

.payment-btn span {
  font-size: 11px;
  font-weight: 600;
}

/* 7. TRANSACTIONS / ORDERS TABLE VIEW */
.orders-controls {
  margin-bottom: 24px;
}

.orders-split-layout {
  display: flex;
  gap: 24px;
  flex-grow: 1;
  height: 0; /* allows box overflow containment */
}

.orders-table-wrapper {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0;
}

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

.data-table th {
  padding: 16px 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1;
}

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

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

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr.selected {
  background: rgba(59, 130, 246, 0.06);
}

.status-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-paid, .status-active {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
}

.status-refunded, .status-suspended {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

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

.order-detail-panel {
  width: 380px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.panel-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
  gap: 16px;
}

.panel-empty-state p {
  font-size: 13px;
  line-height: 1.5;
}

.detail-header {
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.detail-receipt-id {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.detail-meta-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-meta-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.detail-meta-val {
  font-size: 13px;
  font-weight: 500;
}

.detail-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
  flex-grow: 1;
}

.detail-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.detail-item-title {
  color: var(--text-primary);
  font-weight: 500;
}

.detail-item-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.detail-pricing {
  border-top: 1px dashed var(--border-color);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.detail-total-row {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

/* Subscriptions profile detail items */
.sub-plan-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
}

.sub-plan-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sub-plan-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.sub-plan-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.sub-plan-price span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.sub-actions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.finance-progress-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
}

.finance-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}

.finance-meter-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.finance-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
  transition: width 0.3s ease;
}

.sub-payment-log {
  max-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.sub-log-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.1);
  padding: 6px 10px;
  border-radius: 4px;
}

/* 8. DASHBOARD / ANALYTICS VIEW ELEMENTS */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.kpi-card {
  padding: 20px;
}

.kpi-card .kpi-value {
  white-space: nowrap;
  font-size: 22px;
}

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

.kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.revenue-bg { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.transactions-bg { background: rgba(99, 102, 241, 0.1); color: var(--secondary); }
.items-bg { background: rgba(180, 80, 45, 0.1); color: var(--accent-cyan); }
.ticket-bg { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

.kpi-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.kpi-footer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
}

.text-success { color: var(--success); }

/* Dashboard Charts Grid */
.dashboard-visuals-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  min-height: 280px;
}

.chart-card {
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.chart-canvas-container {
  flex-grow: 1;
  height: 100%;
  min-height: 200px;
  position: relative;
}

.top-sales-card {
  display: flex;
  flex-direction: column;
}

.category-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  flex-grow: 1;
}

.cat-breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-breakdown-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
}

.cat-name { color: var(--text-secondary); text-transform: capitalize; }
.cat-val { color: var(--text-primary); font-weight: 600; }

.cat-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  overflow: hidden;
}

.cat-progress-bar {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transition: width 0.5s ease-out;
}

/* Lower Dashboard Grid */
.dashboard-lower-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.inventory-alert-card .alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.15);
  padding: 12px;
  border-radius: var(--radius-md);
}

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

.alert-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.alert-item-stock {
  font-size: 11px;
  color: var(--warning);
  font-weight: 700;
}

/* 9. SETTINGS PANEL */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.settings-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Make plan manager card span full width */
.settings-card:nth-child(2) {
  grid-column: 1 / -1;
}

.settings-section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

.modal-input {
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
}

.modal-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

.settings-help-text {
  font-size: 13px;
  line-height: 1.5;
}

.settings-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mt-4 { margin-top: 16px; }

/* ISP Plan Manager Rows */
.plan-manager-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 10px;
  transition: var(--transition-fast);
}

.plan-manager-row:hover {
  border-color: var(--border-color-hover);
  background: rgba(255, 255, 255, 0.04);
}

.plan-row-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.plan-row-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-row-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.plan-tier-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-row-speeds {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.plan-row-speeds span {
  background: rgba(255,255,255,0.03);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.04);
}

.plan-row-desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.4;
}

.plan-row-price {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.plan-row-price span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.plan-row-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.03);
  padding-top: 10px;
}

/* Activation Modal Sections */
.activation-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.activation-section-header svg {
  color: var(--primary);
}

/* Password Input Wrapper */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .modal-input {
  padding-right: 40px;
}

.pw-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.pw-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

/* Leaflet map overrides for dark mode */
.leaflet-container {
  background: #0f172a !important;
}

.leaflet-control-zoom a {
  background: #1e293b !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

.leaflet-popup-content-wrapper {
  background: #1e293b !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

.leaflet-popup-tip {
  background: #1e293b !important;
}

@keyframes map-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* 10. CHECKOUT MODAL OVERLAYS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

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

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop var(--transition-normal);
}

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

/* Modal Processing Screen */
.modal-loading {
  padding: 40px;
  align-items: center;
  text-align: center;
}

.pulse-ring {
  width: 90px;
  height: 90px;
  background: rgba(59, 130, 246, 0.05);
  border: 2px solid rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  position: absolute;
  animation: ringPulse 2s infinite ease-out;
}

@keyframes ringPulse {
  0% { transform: scale(0.9); opacity: 0.9; }
  100% { transform: scale(1.4); opacity: 0; }
}

.loading-icon-wrapper {
  width: 70px;
  height: 70px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 24px;
  z-index: 1;
}

.processing-spinner {
  animation: spinnerRotate 1.5s linear infinite;
}

@keyframes spinnerRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.modal-loading h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-loading p {
  font-size: 14px;
  max-width: 280px;
  line-height: 1.5;
}

/* Cash Checkout Helper Inputs */
.cash-register-helper {
  width: 100%;
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  text-align: left;
}

.cash-register-helper label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

.cash-input-row {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px 14px;
  margin-bottom: 12px;
}

.currency-prefix {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.cash-input-row input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
}

.cash-shortcuts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.cash-shortcuts .btn {
  padding: 8px 4px;
  font-size: 11px;
}

.change-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.15);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-top: 14px;
}

.change-display span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.change-display strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--success);
}

/* Modal Receipt Screen */
.modal-receipt-view {
  max-width: 850px;
  width: 95%;
}

.success-banner {
  background: rgba(34, 197, 94, 0.08);
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-checkmark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px var(--success-glow);
}

.success-banner h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.success-banner p {
  font-size: 12px;
  color: var(--text-secondary);
}

.receipt-paper-wrapper {
  padding: 24px;
  background: #0b0f19;
  overflow-y: auto;
  max-height: 550px;
  display: flex;
  justify-content: center;
}

.receipt-paper {
  background: #ffffff;
  color: #1e293b;
  width: 100%;
  max-width: 800px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  position: relative;
  border-radius: 6px;
}

/* Thermal receipt paper top and bottom serrated edge styling (hidden for wide layouts) */
.modal-receipt-view .receipt-paper::before,
.modal-receipt-view .receipt-paper::after {
  display: none !important;
}

.receipt-header {
  text-align: center;
  margin-bottom: 14px;
}

.receipt-store-title {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 4px;
}

.receipt-divider {
  border-top: 1px dashed #475569;
  margin: 10px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
}

.receipt-total-row {
  font-weight: bold;
  font-size: 14px;
  margin-top: 6px;
}

.receipt-barcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 18px 0 6px 0;
}

.barcode-lines {
  height: 36px;
  width: 130px;
  background: repeating-linear-gradient(90deg, 
    #1e293b, #1e293b 2px, 
    transparent 2px, transparent 4px,
    #1e293b 4px, #1e293b 8px,
    transparent 8px, transparent 10px
  );
  margin-bottom: 4px;
}

.barcode-text {
  font-size: 10px;
  letter-spacing: 2px;
}

.receipt-footer {
  text-align: center;
  margin-top: 12px;
  font-size: 10px;
}

.receipt-actions {
  padding: 16px 24px;
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.receipt-actions .btn {
  flex-grow: 1;
}

/* 11. ISP TELEMETRY & PULSE ANIMATIONS */
.status-dot-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  position: relative;
}

.status-dot-pulse.online {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-dot-pulse.offline {
  background-color: var(--text-muted);
}

.status-dot-pulse.suspended {
  background-color: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

.client-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

/* 12. PRINT STYLING & BRANDED INVOICES */
#printable-receipt {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a !important;
  background: #ffffff !important;
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 8px;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.invoice-logo-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.invoice-logo {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  border-radius: 6px;
}

.invoice-store-info h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.invoice-store-info p {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0;
  line-height: 1.4;
}

.invoice-title-block {
  text-align: right;
}

.invoice-title-block h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #6366f1;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

.invoice-title-block p {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0;
}

.invoice-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
  font-size: 13px;
}

.invoice-meta-column h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 8px 0;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.invoice-meta-column p {
  margin: 4px 0;
  color: #334155;
  line-height: 1.4;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 13px;
}

.invoice-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}

.invoice-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.invoice-table tr:last-child td {
  border-bottom: 2px solid #e2e8f0;
}

.invoice-total-section {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.invoice-total-table {
  width: 320px;
  font-size: 13px;
}

.invoice-total-table tr td {
  padding: 8px 12px;
  color: #334155;
}

.invoice-total-table tr td:last-child {
  text-align: right;
  font-weight: 600;
}

.invoice-total-table tr.grand-total td {
  font-size: 16px;
  font-weight: 800;
  color: #6366f1;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.invoice-notes-terms {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.5;
}

.invoice-notes-terms h4 {
  font-family: 'Outfit', sans-serif;
  color: #475569;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

.invoice-notes-terms p {
  margin: 2px 0;
}

@media print {
  @page {
    size: letter;
    margin: 0.5in;
  }
  
  body {
    background: white !important;
    color: #0f172a !important;
  }
  
  /* Hide standard components */
  .app-container,
  .success-banner,
  .receipt-actions,
  button {
    display: none !important;
  }
  
  /* Hide other overlays if active */
  .modal-overlay:not(#checkout-modal) {
    display: none !important;
  }

  /* Make checkout-modal the print target container */
  .modal-overlay#checkout-modal {
    position: static !important;
    display: block !important;
    background: white !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
  }

  .modal-card#modal-receipt-state {
    display: block !important;
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
  }

  .receipt-paper-wrapper {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #printable-receipt {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    background: white !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* 13. RESPONSIVENESS OVERRIDES */
@media (max-width: 1100px) {
  .app-container {
    flex-direction: column;
    height: auto;
    overflow-y: auto;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .sidebar-nav {
    flex-direction: row;
    padding: 12px;
    overflow-x: auto;
  }
  
  .nav-item {
    padding: 10px 14px;
  }
  
  .main-content {
    height: auto;
    overflow-y: visible;
    padding: 20px;
  }
  
  .checkout-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-color);
    height: auto;
  }
  
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-visuals-grid,
  .dashboard-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .orders-split-layout {
    flex-direction: column;
    height: auto;
  }
  
  .order-detail-panel {
    width: 100%;
  }
}

/* Global App Loading Overlay */
.app-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 8, 15, 0.95);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.app-loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-spinner-wrapper {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: modalPop var(--transition-normal);
}

.loading-spinner-wrapper h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.loading-spinner-wrapper p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 11. ENTRANCE & CUSTOMER PORTALS */
.entrance-portal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, #0f172a 0%, #050813 100%);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entrance-card {
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-lg);
}

.customer-portal-container {
  display: none;
}

/* 12. CHECKOUT WIZARD & TEXT TRUNCATION */
.checkout-step-panel {
  display: none;
  flex-direction: column;
  height: 100%;
}
.checkout-step-panel.active {
  display: flex;
}
.step-tab {
  transition: all var(--transition-fast);
}
.step-tab:hover {
  background: rgba(255,255,255,0.03) !important;
}
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
select.select-input {
  max-width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
}

