/* Saree Wholesale Mobile Web App CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Design Tokens */
  --bg-primary: #0F0F11;
  --bg-secondary: #17171B;
  --bg-card: #202026;
  --bg-surface: #292932;
  --text-primary: #F9F9FB;
  --text-secondary: #A0A0AB;
  --text-muted: #6B6B76;
  
  --gold-light: #F3E5AB;
  --gold-primary: #D4AF37;
  --gold-dark: #AA7C11;
  --gold-gradient: linear-gradient(135deg, #FFE07D 0%, #D4AF37 50%, #AA7C11 100%);
  --accent-red: #E05252;
  --accent-green: #3FBA76;

  --border-color: rgba(212, 175, 55, 0.15);
  --border-focus: rgba(212, 175, 55, 0.5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Outfit', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 75px; /* space for bottom navigation bar */
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* App Layout & Containers */
.app-container {
  max-width: 480px; /* Force mobile width on desktop */
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-primary);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 10px;
}

/* Typography & Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}
.badge-gold {
  background: var(--gold-gradient);
  color: #121212;
}
.badge-stock {
  background: rgba(63, 186, 118, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(63, 186, 118, 0.3);
}
.badge-low {
  background: rgba(224, 82, 82, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(224, 82, 82, 0.3);
}

/* Header Section */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(23, 23, 27, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo-icon {
  width: 28px;
  height: 28px;
  background: var(--gold-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #121212;
  font-size: 0.95rem;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wholesale-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border: 1px solid var(--gold-primary);
  border-radius: 4px;
  color: var(--gold-primary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

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

.action-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  transition: var(--transition-fast);
}

.action-btn:active {
  transform: scale(0.95);
  background: var(--bg-surface);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-red);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-secondary);
}

/* Search and Filters */
.search-container {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  gap: 8px;
  transition: var(--transition);
}

.search-container:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

.search-input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  width: 100%;
  outline: none;
}

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

/* Filter Chips scrollable */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none; /* Firefox */
}

.filter-tabs::-webkit-scrollbar {
  display: none; /* Safari & Chrome */
}

.filter-chip {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip.active {
  background: var(--gold-gradient);
  color: #121212;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.2);
}

/* Banner Slider / Stories Mock */
.promo-slider {
  padding: 16px;
}

.promo-card {
  background: linear-gradient(135deg, rgba(23, 23, 27, 0.9) 0%, rgba(32, 32, 38, 0.9) 100%), 
              radial-gradient(circle at top right, rgba(212, 175, 55, 0.15), transparent 60%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.promo-info {
  z-index: 1;
  max-width: 60%;
}

.promo-tag {
  color: var(--gold-primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.promo-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}

.promo-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.promo-graphic {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--gold-primary) 0%, transparent 70%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  font-size: 2.5rem;
  opacity: 0.7;
}

/* Product Catalog Grid */
.catalog-section {
  padding: 0 16px 16px 16px;
}

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

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold-primary);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.3);
}

.product-img-container {
  aspect-ratio: 3/4;
  background-color: var(--bg-surface);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-labels {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.product-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.product-name {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-pricing {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.price-retail {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-primary);
}

.price-wholesale {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.pack-info {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-action {
  margin-top: 8px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
  padding: 6px 0;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.card-action:active {
  background: var(--gold-gradient);
  color: #121212;
}

/* Detail Modal Style (Bottom Sheet drawer on mobile) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--bg-secondary);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border-top: 1px solid var(--border-color);
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  margin: 10px auto;
  opacity: 0.5;
}

.sheet-content {
  padding: 0 16px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-img-container {
  aspect-ratio: 4/3;
  width: 100%;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

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

.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.close-sheet-btn {
  background: var(--bg-surface);
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.detail-price-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.price-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.spec-item {
  background: var(--bg-card);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.spec-name {
  color: var(--text-muted);
  margin-bottom: 2px;
}

.spec-val {
  color: var(--text-primary);
  font-weight: 500;
}

.color-palette-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.palette-colors {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 0 0 1px var(--text-muted);
  position: relative;
}

.color-dot.active::after {
  content: '✓';
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.color-dot.removed {
  box-shadow: 0 0 0 1px var(--accent-red);
  cursor: pointer;
}

.color-dot.removed::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  z-index: 1;
}

.color-dot.removed::after {
  content: '✕';
  color: #ff3b30;
  font-size: 0.7rem;
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
  z-index: 2;
}

.qty-calculator {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qty-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.qty-btn:active {
  transform: scale(0.9);
}

.qty-number {
  font-size: 1.1rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

/* Wholesale Discount Progress Bar */
.discount-progress-box {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-top: 6px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.progress-bar-bg {
  height: 6px;
  background: var(--bg-primary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gold-gradient);
  width: 0%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.discount-summary-msg {
  font-size: 0.75rem;
  color: var(--gold-primary);
  margin-top: 6px;
  font-weight: 500;
  text-align: center;
}

.calc-total-box {
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.calc-total-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calc-discount-label {
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 500;
}

.add-cart-btn {
  width: 100%;
  background: var(--gold-gradient);
  color: #121212;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.add-cart-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

/* Tab Screens (Cart, Checkout, Orders, Admin) */
.tab-content {
  display: none;
  padding: 16px;
  animation: fadeIn 0.3s ease forwards;
}

.tab-content.active {
  display: block;
}

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

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  gap: 12px;
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.empty-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 250px;
}

.action-link-btn {
  background: var(--gold-gradient);
  color: #121212;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

/* Cart Items Styling */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.cart-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.cart-item-img {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cart-item-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.cart-item-specs {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cart-item-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-primary);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--accent-red);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
}

/* Cart Total Summary Card */
.bill-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.summary-title {
  font-size: 0.95rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.summary-row.total {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}

.total-val {
  color: var(--gold-primary);
}

/* Checkout Form styling */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  max-width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 400px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Order Status / Tracker Styles */
.tracker-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

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

.tracker-id {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-primary);
}

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

.tracking-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  padding-left: 24px;
}

.tracking-steps::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 6px;
  bottom: 4px;
  width: 2px;
  background: var(--bg-surface);
}

.tracking-step {
  position: relative;
}

.tracking-step::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--bg-card);
  transition: var(--transition);
}

.tracking-step.active::before {
  background: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-primary);
}

.tracking-step.completed::before {
  background: var(--accent-green);
}

.step-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.step-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Invoice view */
.invoice-container {
  background: white;
  color: #121212;
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 0.8rem;
  margin-top: 16px;
  box-shadow: var(--shadow-lg);
  font-family: monospace;
  position: relative;
  overflow: hidden;
}

.invoice-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.invoice-header {
  border-bottom: 2px solid #121212;
  padding-bottom: 10px;
  margin-bottom: 12px;
  text-align: center;
}

.invoice-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.invoice-table th, .invoice-table td {
  border-bottom: 1px solid #ddd;
  padding: 6px 0;
  text-align: left;
}

.invoice-table th {
  font-weight: bold;
  border-bottom: 2px solid #121212;
}

.invoice-table .num-col {
  text-align: right;
}

.invoice-total-section {
  border-top: 2px solid #121212;
  padding-top: 8px;
  margin-top: 8px;
}

/* Admin Panel Styling */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat-box {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.stat-val {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--gold-primary);
  margin-top: 2px;
}

.admin-order-item {
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-order-item:last-child {
  border-bottom: none;
}

.admin-order-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.admin-order-biz {
  font-weight: 600;
  font-size: 0.85rem;
}

.status-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  outline: none;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 64px;
  background: rgba(23, 23, 27, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 99;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-grow: 1;
  height: 100%;
  position: relative;
}

.nav-icon {
  font-size: 1.25rem;
  margin-bottom: 3px;
  transition: var(--transition-fast);
}

.nav-item.active {
  color: var(--gold-primary);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
  color: var(--gold-primary);
}

.nav-item:active .nav-icon {
  transform: scale(0.9);
}

.nav-cart-badge {
  position: absolute;
  top: 6px;
  right: 25%;
  background: var(--accent-red);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Helpers */
.text-gold {
  color: var(--gold-primary);
}
.text-green {
  color: var(--accent-green);
}
.text-red {
  color: var(--accent-red);
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.margin-top-md {
  margin-top: 16px;
}
.submit-btn {
  width: 100%;
  background: var(--gold-gradient);
  color: #121212;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 12px;
}
.submit-btn:active {
  transform: scale(0.98);
}

/* Master Data Table Styles */
#admin-product-table, #admin-party-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-family: var(--font-sans);
}

#admin-product-table th, #admin-product-table td,
#admin-party-table th, #admin-party-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

#admin-product-table th, #admin-party-table th {
  background-color: var(--bg-surface);
  color: var(--gold-primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
}

#admin-product-table td, #admin-party-table td {
  font-size: 0.75rem;
  color: var(--text-primary);
}

#admin-product-table tr:hover, #admin-party-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Professional Invoice Print Stylesheet */
@media print {
  /* Hide all app wrapper containers, navigation bar, headers, buttons */
  body * {
    visibility: hidden;
  }
  
  /* Make only the invoice container and its children visible */
  #invoice-preview-box, #invoice-preview-box * {
    visibility: visible;
  }
  
  /* Position invoice preview box to start at top-left of page and fill full width */
  #invoice-preview-box {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  /* Hide specific fields marked as no-print (like the terms footer) */
  .no-print, .no-print * {
    display: none !important;
    visibility: hidden !important;
  }

  /* Strip default browser-generated print headers (date, title) and footers (URL, page numbers) */
  @page {
    margin: 0;
  }
  
  /* Add custom clean printable body margins */
  body {
    margin: 1.6cm !important;
    background: white !important;
    color: black !important;
  }

  /* Ensure text inside invoice items table wraps properly and looks clear */
  .invoice-table th, .invoice-table td {
    border-bottom: 1px solid #ddd !important;
    color: #000 !important;
  }
  
  .invoice-logo {
    color: #000 !important;
  }
  
  .invoice-total-section {
    border-top: 2px solid #000 !important;
  }

  /* Format preformatted JSON text blocks cleanly when printing */
  #invoice-preview-box pre {
    background: transparent !important;
    color: black !important;
    border: none !important;
    white-space: pre-wrap !important;
    font-family: monospace !important;
    font-size: 10pt !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
