/* ==========================================================================
   KISS PROFESSIONAL TABLET CATALOGUE - DESIGN SYSTEM
   Optimized for iPad & Android Tablets (16:10 / 4:3 Landscape) & A4 PDF Print
   ========================================================================== */

:root {
  --bg-main: #131720;
  --bg-surface: #1c2230;
  --bg-card: #242c3d;
  --bg-card-hover: #2d374d;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(255, 255, 255, 0.16);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-gold: #f59e0b;
  --accent-gold-bg: rgba(245, 158, 11, 0.16);
  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.16);
  --accent-blue: #38bdf8;

  --studio-bg: #eceff3;
  --studio-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  user-select: none;
  -webkit-user-select: none;
}

/* Main Container: Fixed Fullscreen Landscape Viewport */
.catalogue-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
  background: radial-gradient(circle at 50% 0%, #1e2638 0%, var(--bg-main) 75%);
}

/* ==========================================================================
   TOP UTILITY BAR
   ========================================================================== */
.top-bar {
  display: grid;
  grid-template-columns: auto 30% 1fr;
  align-items: center;
  height: 64px;
  padding: 0 16px;
  background: rgba(19, 23, 32, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
  gap: 14px;
  box-sizing: border-box;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

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

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

.pharmafusion-logo-box {
  background: #ffffff;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  transition: transform 0.2s ease;
}

.pharmafusion-logo-box:hover {
  transform: translateY(-1px);
}

.pharmafusion-logo-img {
  max-height: 32px;
  width: auto;
  object-fit: contain;
}

.brand-divider {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
  margin: 0 4px;
}

.print-header {
  display: none;
}

.brand-logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 2px;
  color: #fff;
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  font-weight: 600;
}

/* Header Contact Badge (Screen) */
.top-contact-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-left: 8px;
  transition: all 0.2s ease;
}

.top-contact-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.top-contact-badge .contact-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #e2e8f0;
  font-weight: 600;
}

.top-contact-badge .pill-icon {
  font-size: 0.85rem;
}

.top-contact-badge .contact-pill-dot {
  color: var(--accent-gold);
  font-size: 0.9rem;
}

@media (max-width: 1250px) {
  .top-contact-badge {
    display: none;
  }
}

/* Search Bar: Exactly 30% of top bar grid column */
.search-container {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  pointer-events: none;
}

#searchInput {
  width: 100%;
  height: 38px;
  background: rgba(28, 34, 48, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 0 36px 0 38px;
  color: #fff;
  font-size: 0.86rem;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#searchInput:focus {
  outline: none;
  background: var(--bg-surface);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
}

/* Top Actions: Remaining 1fr space cleanly balanced with no crowding */
.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}

.top-actions .action-btn,
.top-actions .toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.server-btn {
  background: rgba(16, 185, 129, 0.14) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
}

.cover-btn {
  background: rgba(99, 102, 241, 0.15) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  color: #a5b4fc !important;
}

.fullscreen-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #f1f5f9 !important;
}

.chooser-nav-btn {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: var(--accent-gold) !important;
  text-decoration: none;
}

/* Hide dev-only button on screens below 1280px to keep customer view pristine */
@media (max-width: 1280px) {
  .dev-tool-btn {
    display: none !important;
  }
}

.toggle-pill {
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: background 0.2s;
}

.toggle-pill.active {
  background: var(--accent-green-bg);
  border-color: rgba(16, 185, 129, 0.4);
  color: #fff;
}

.toggle-pill.active .dot {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.pdf-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.pdf-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
}

/* ==========================================================================
   MAIN PRESENTATION STAGE (50/50 GOLDEN SPLIT)
   ========================================================================== */
.presentation-stage {
  flex: 1;
  display: flex;
  padding: 16px 24px;
  gap: 20px;
  overflow: hidden;
}

/* Left Side: Visual Showcase */
.visual-showcase {
  flex: 0 0 46%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.studio-card {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, var(--studio-bg) 100%);
  border-radius: 20px;
  box-shadow: var(--studio-shadow);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5cm; /* Exactly 0.5 cm from outer borders */
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Studio Card Top Controls */
.studio-top-controls {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  pointer-events: none;
}

.studio-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #64748b;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  pointer-events: auto;
  position: relative;
  z-index: 31;
}

.studio-layout-btn {
  pointer-events: auto;
  position: relative;
  z-index: 31;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 4px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-layout-btn:hover {
  background: #ffffff;
  color: var(--accent-blue);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

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

/* Floating Carousel Chevrons */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.82;
}

.carousel-arrow:hover {
  opacity: 1;
  background: #ffffff;
  color: var(--accent-blue);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-50%) scale(1.08);
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-arrow-prev {
  left: 10px;
}

.carousel-arrow-next {
  right: 10px;
}

.studio-card[data-mode="grid"] .carousel-arrow,
.studio-card[data-count="1"] .carousel-arrow {
  display: none !important;
}

/* Bottom Carousel Pagination Dots */
.carousel-pagination {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.studio-card[data-mode="grid"] .carousel-pagination,
.studio-card[data-count="1"] .carousel-pagination {
  display: none !important;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 5px;
  background: rgba(100, 116, 139, 0.35);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-dot.active {
  width: 26px;
  background: var(--accent-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.carousel-dot:hover:not(.active) {
  background: rgba(100, 116, 139, 0.65);
}

/* ==========================================================================
   INTERACTIVE SHADE PALETTE BAR (OPTION B)
   ========================================================================== */
.studio-card.has-shades .packshots-grid {
  padding-bottom: 84px;
}

.shade-palette-bar {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 6px 10px 8px 10px;
  z-index: 15;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.shade-palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.shade-palette-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.shade-palette-hint {
  font-size: 0.58rem;
  color: #94a3b8;
  letter-spacing: 0.3px;
}

.shade-palette-track {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 2px 2px 4px 2px;
}

.shade-palette-track::-webkit-scrollbar {
  height: 4px;
}

.shade-palette-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
}

.swatch-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px 5px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.swatch-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.swatch-chip.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
}

.swatch-tip-box {
  width: 26px;
  height: 42px;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  position: relative;
  background: #ffffff;
}

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

.swatch-sku-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-top: 3px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.swatch-chip.active .swatch-sku-label {
  color: var(--accent-gold);
  font-weight: 800;
}

/* Ghosted out state for Out-of-Stock items */
.swatch-chip.out-of-stock {
  opacity: 0.42;
  filter: grayscale(0.5);
  background: rgba(0, 0, 0, 0.2);
}

.swatch-chip.out-of-stock:hover {
  opacity: 0.8;
  filter: grayscale(0.2);
}

.swatch-chip.out-of-stock .swatch-sku-label {
  color: #94a3b8;
  text-decoration: line-through;
}

.swatch-oos-tag {
  position: absolute;
  top: 1px;
  right: 1px;
  font-size: 0.5rem;
  font-weight: 800;
  background: #ef4444;
  color: #fff;
  padding: 1px 3px;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.3px;
  z-index: 2;
}

/* Packshots Grid / Showcase Stage */
.packshots-grid {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Packshot Item */
.packshot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.packshot-item:hover {
  transform: translateY(-4px) scale(1.02);
}

.packshot-img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.22));
  transition: filter 0.25s;
}

.packshot-item:hover .packshot-img {
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.32));
}

.packshot-code-pill {
  position: absolute;
  bottom: 4px;
  background: rgba(19, 23, 32, 0.88);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 4;
}

/* =====================================================================
   ADAPTIVE GEOMETRY LAYOUTS (0.5 CM FROM CLOSEST BORDER, MINIMAL WASTED SPACE)
   ===================================================================== */

/* 1. SPOTLIGHT / CAROUSEL HERO (1 product featured at full scale) */
.packshots-grid.layout-spotlight {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.packshots-grid.layout-spotlight .packshot-item {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spotlightFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.packshots-grid.layout-spotlight .packshot-img {
  width: auto;
  height: 92%;
  max-height: 92%;
  max-width: 90%;
  object-fit: contain;
}

@keyframes spotlightFadeIn {
  from { opacity: 0.35; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* 2. STACKED VERTICAL (For 2 wide/landscape products on top of each other) */
.packshots-grid.layout-stacked {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 16px;
}

.packshots-grid.layout-stacked .packshot-item {
  width: 96%;
  height: 47%;
  max-width: 96%;
  max-height: 47%;
}

/* 3. STACKED VERTICAL 3 (For 3 wide products on top of each other) */
.packshots-grid.layout-stacked-3 {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 10px;
}

.packshots-grid.layout-stacked-3 .packshot-item {
  width: 96%;
  height: 31%;
  max-width: 96%;
  max-height: 31%;
}

/* 4. SIDE BY SIDE (For 2 tall/portrait or square products) */
.packshots-grid.layout-side-by-side {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 20px;
}

.packshots-grid.layout-side-by-side .packshot-item {
  width: 48%;
  height: 94%;
  max-width: 48%;
  max-height: 94%;
}

/* 5. 3 COLUMNS SIDE BY SIDE (For 3 tall/portrait bottles) */
.packshots-grid.layout-columns-3 {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 16px;
}

.packshots-grid.layout-columns-3 .packshot-item {
  width: 32%;
  height: 94%;
  max-width: 32%;
  max-height: 94%;
  min-height: 0;
  min-width: 0;
}

/* 6. 4 COLUMNS SIDE BY SIDE (For 4 tall/slender items like Nail Files & Brushes) */
.packshots-grid.layout-columns-4 {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 12px;
}

.packshots-grid.layout-columns-4 .packshot-item {
  width: 23%;
  height: 94%;
  max-width: 23%;
  max-height: 94%;
  min-height: 0;
  min-width: 0;
}

/* 7. 2x2 BALANCED GRID (For 4 square/mixed products) */
.packshots-grid.layout-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.packshots-grid.layout-grid-2x2 .packshot-item {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

/* 8. 3x2 GRID (For 5 or 6 products in Family Overview) */
.packshots-grid.layout-grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.packshots-grid.layout-grid-3x2 .packshot-item {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

/* 9. 4x2 GRID (For 7 or 8 products in Family Overview) */
.packshots-grid.layout-grid-4x2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.packshots-grid.layout-grid-4x2 .packshot-item {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

/* In Multi-Product Stage: Prominent Active Item (10% Bigger Image + Luminous Pedestal Background) */
.packshot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  opacity: 0.82;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, opacity 0.2s ease;
}

.packshot-item:hover {
  opacity: 1;
  transform: translateY(-4px) scale(1.02);
  z-index: 4;
}

.packshot-item.item-active {
  transform: scale(1.06) translateY(-8px);
  z-index: 5;
  opacity: 1 !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(254, 243, 199, 0.92) 50%, rgba(253, 230, 138, 0.85) 100%) !important;
  border: 2.5px solid var(--accent-gold) !important;
  border-radius: 18px;
  box-shadow: 0 20px 42px rgba(245, 158, 11, 0.36), 0 8px 18px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -8px 24px rgba(245, 158, 11, 0.22) !important;
  padding: 4px 4px;
}

.packshot-item.item-active .packshot-img {
  transform: scale(1.10);
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 18px rgba(245, 158, 11, 0.5));
}

.packshot-item.item-active .packshot-code-pill {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  bottom: 6px;
}

/* Table Active Row Highlighting */
.products-table tbody tr.active-row {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.22) 0%, rgba(56, 189, 248, 0.12) 100%) !important;
  box-shadow: inset 4px 0 0 var(--accent-gold);
}

.products-table tbody tr.active-row .td-sku {
  color: var(--accent-gold);
  font-weight: 800;
}

.products-table tbody tr.active-row .td-name {
  color: #ffffff;
  font-weight: 600;
}

/* Right Side: Commercial Panel */
.commercial-panel {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(28, 34, 48, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 24px 28px;
  overflow: hidden;
}

/* Adaptive layout when only 1 or 2 products */
.commercial-panel[data-count="1"] .table-container,
.commercial-panel[data-count="2"] .table-container {
  flex: initial;
  overflow: visible;
  margin-bottom: 8px;
}

.commercial-panel[data-count="1"] .products-table tbody tr td,
.commercial-panel[data-count="2"] .products-table tbody tr td {
  padding: 14px 12px;
  font-size: 0.92rem;
}

.commercial-panel[data-count="1"] .page-title,
.commercial-panel[data-count="2"] .page-title {
  font-size: 1.85rem;
  margin-bottom: 14px;
}

.commercial-panel[data-count="1"] .category-tag,
.commercial-panel[data-count="2"] .category-tag {
  font-size: 0.82rem;
  letter-spacing: 2px;
}

.commercial-panel[data-count="1"] .selling-bullets,
.commercial-panel[data-count="2"] .selling-bullets {
  gap: 12px;
  margin-bottom: 20px;
}

.commercial-panel[data-count="1"] .selling-bullets li,
.commercial-panel[data-count="2"] .selling-bullets li {
  font-size: 0.98rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.commercial-panel[data-count="1"] .products-table th,
.commercial-panel[data-count="2"] .products-table th {
  padding: 10px 12px;
  font-size: 0.72rem;
}

.commercial-panel[data-count="1"] .td-price,
.commercial-panel[data-count="2"] .td-price {
  font-size: 1.15rem;
}

.commercial-panel[data-count="1"] .badge-promo,
.commercial-panel[data-count="2"] .badge-promo {
  font-size: 0.88rem;
  padding: 5px 14px;
}

/* Feature Spotlight Box for Single Product Page */
.single-product-hero {
  margin-top: 14px;
  background: rgba(19, 23, 32, 0.6);
  border: 1px solid var(--border-accent);
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}

.hero-sku-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.hero-sku-badge {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 4px 12px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.hero-product-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.3;
}

.single-item-spotlight-card {
  background: rgba(28, 34, 48, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-tap-hint {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--accent-blue);
  cursor: pointer;
  text-align: center;
  padding: 10px 14px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px dashed rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  transition: all 0.2s;
}

.hero-tap-hint:hover {
  background: rgba(56, 189, 248, 0.16);
  border-style: solid;
}

.spotlight-metric-item {
  display: flex;
  flex-direction: column;
}

.spotlight-metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.spotlight-metric-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

.spotlight-metric-value.highlight-green {
  color: var(--accent-green);
}

.spotlight-metric-value.highlight-gold {
  color: var(--accent-gold);
}

.commercial-panel {
  flex: 1 1 54%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.panel-header {
  margin-bottom: 14px;
}

.category-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 10px;
}

/* Selling Bullets */
.selling-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.selling-bullets li {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.selling-bullets li::before {
  content: "•";
  color: var(--accent-blue);
  font-size: 1.1rem;
  line-height: 1;
}

/* Commercial Table */
.table-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden; /* Prevent unwanted horizontal scrollbars */
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  background: rgba(19, 23, 32, 0.5);
  border: 1px solid var(--border-subtle);
  margin-top: 6px;
  min-height: 0;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.table-container::-webkit-scrollbar {
  width: 5px;
  height: 0px;
}

.table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.products-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate; /* Critical fix for mobile Chrome & tablet touch engines */
  border-spacing: 0;
  text-align: left;
  font-size: 0.78rem;
}

.products-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.products-table th {
  position: sticky;
  top: 0;
  background: #181f2c; /* Solid opaque dark blue so scrolling rows don't show through */
  z-index: 10;
  padding: 8px 6px;
  color: var(--text-dim);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 0 var(--border-subtle);
  white-space: nowrap;
}

.products-table th:nth-child(1) { width: 15%; } /* SKU */
.products-table th:nth-child(2) { width: 34.5%; } /* NAME: shifted status 2 chars to the left */
.products-table th:nth-child(3) { width: 12.5%; } /* STATUS: shifted promo 4 chars to the left */
.products-table th:nth-child(4) { width: 12%; } /* PROMO */
.products-table th:nth-child(5) { width: 13%; text-align: right; } /* PRICE */
.products-table th:nth-child(6) { width: 13%; text-align: right; } /* MARGIN */

.products-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.products-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.products-table tbody tr:hover {
  background: var(--bg-card);
}

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

.td-sku {
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
  font-size: 0.78rem;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.td-name {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: break-word;
}

.badge-stock {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
}

.badge-stock.in-stock {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-promo {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--accent-gold-bg);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.td-price {
  font-family: var(--font-heading);
  font-size: 0.94rem;
  font-weight: 700;
  color: #fff;
}

.badge-margin {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* ==========================================================================
   BOTTOM CATEGORY & NAVIGATION BAR
   ========================================================================== */
.bottom-bar {
  height: 56px;
  padding: 0 16px 0 20px;
  background: rgba(19, 23, 32, 0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 10;
}

.nav-arrow-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.nav-arrow-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent-blue);
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  padding: 6px 14px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.cat-pill:hover {
  color: #fff;
  background: var(--bg-card);
}

.cat-pill.active {
  background: #fff;
  color: #0f172a;
  border-color: #fff;
  font-weight: 700;
}

.page-indicator-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  background: var(--bg-surface);
  padding: 4px 6px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.page-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  min-width: 85px;
  text-align: center;
  user-select: none;
}

/* ==========================================================================
   SPOTLIGHT ZOOM MODAL
   ========================================================================== */
.modal-overlay, .drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 22, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 88vw;
  max-width: 1240px;
  height: 84vh;
  max-height: 800px;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: 24px;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.65);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

@keyframes scaleUp {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all 0.2s;
  z-index: 20;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(90deg);
}

.modal-body {
  display: flex;
  flex: 1;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Modal Left: Fit to Screen Product Showcase */
.modal-image-col {
  flex: 0 0 54%;
  height: 100%;
  min-height: 0;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, var(--studio-bg) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border-subtle);
}

.modal-img-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: grab;
  touch-action: none;
}

.modal-img-viewport:active {
  cursor: grabbing;
}

.modal-img-viewport img {
  height: 85%;
  max-height: 85%;
  max-width: 90%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.28));
  transition: transform 0.12s ease-out;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

.modal-zoom-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(19, 23, 32, 0.88);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  z-index: 10;
  margin-top: 6px;
}

.zoom-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--accent-gold);
}

.zoom-btn.active {
  background: var(--accent-gold);
  color: #0f172a;
  border-color: var(--accent-gold);
}

.zoom-hint {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 4px;
}

/* Modal Right: Order Pad & Profit Analysis */
.modal-info-col {
  flex: 1;
  height: 100%;
  min-height: 0;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Order Pad Quantity Stepper Controls */
.order-pad-controls {
  margin-top: 14px;
  margin-bottom: 20px;
  background: rgba(19, 23, 32, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.qty-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-step-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-step-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: var(--accent-gold);
}

.qty-input {
  width: 58px;
  height: 36px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  outline: none;
}

.modal-sku-tag {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 1px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: #fff;
  line-height: 1.25;
  margin: 6px 0 14px;
}

.modal-badge-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

/* Calculator Box */
.margin-calculator-box {
  background: rgba(19, 23, 32, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.calc-header {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.calc-row.highlight {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 0.88rem;
}

.profit-val {
  color: var(--accent-green);
  font-weight: 700;
}

.bonus-benefit {
  margin-top: 10px;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  padding: 8px 10px;
  border-radius: 8px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.primary-btn {
  flex: 1;
  height: 44px;
  background: var(--accent-green);
  color: #0b1e16;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}

.primary-btn:hover {
  background: #34d399;
}

.secondary-btn {
  height: 44px;
  padding: 0 18px;
  background: var(--bg-card);
  color: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
}

/* ==========================================================================
   DRAWER / PAGE SORTER MODAL
   ========================================================================== */
.drawer-panel {
  width: 900px;
  max-width: 92vw;
  max-height: 85vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

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

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  overflow-y: auto;
  max-height: 65vh;
  padding: 4px;
}

.drawer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-card:hover, .drawer-card.active {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.drawer-card-num {
  font-size: 0.7rem;
  color: var(--accent-gold);
  font-weight: 700;
}

.drawer-card-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  margin: 4px 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-card-count {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ==========================================================================
   A4 LANDSCAPE PDF PRINT STYLES (@media print)
   ========================================================================== */
@media print {
  @page {
    size: 297mm 210mm; /* A4 Landscape */
    margin: 0;
  }

  html, body {
    width: 297mm;
    height: 210mm;
    background: #ffffff !important;
    color: #0f172a !important;
    overflow: visible !important;
  }

  .top-bar, .bottom-bar, .modal-overlay, .drawer-overlay {
    display: none !important;
  }

  .catalogue-container {
    width: 297mm;
    height: 210mm;
    background: #ffffff !important;
  }

  .print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 5mm 14mm 4mm 14mm;
    border-bottom: 2px solid #0f172a;
    background: #ffffff !important;
  }

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

  .print-logo-img {
    height: 13mm;
    width: auto;
    object-fit: contain;
  }

  .print-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .print-brand-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
    letter-spacing: 0.5px;
    line-height: 1.2;
  }

  .print-brand-sub {
    font-size: 0.7rem;
    color: #475569;
    font-weight: 500;
  }

  .print-beneficiary-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #1e293b;
    margin-top: 2px;
  }

  .print-beneficiary-line .bank-lbl {
    color: #64748b;
    font-weight: 600;
  }

  .print-beneficiary-line .bank-dot {
    color: #94a3b8;
  }

  .print-beneficiary-line .iban-code {
    font-family: 'Consolas', 'Courier New', monospace;
    letter-spacing: 0.5px;
    color: #0f172a;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    font-weight: 700;
  }

  .print-meta-group {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
  }

  .print-date {
    font-size: 0.8rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .print-contact {
    font-size: 0.72rem;
    color: #334155;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .print-contact .contact-line strong {
    color: #0f172a;
  }

  .presentation-stage {
    padding: 6mm 14mm 10mm 14mm;
    gap: 12mm;
  }

  .commercial-panel {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
  }

  .page-title {
    color: #0f172a !important;
  }

  .selling-bullets li {
    color: #334155 !important;
  }

  .table-container {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
  }

  .products-table th {
    background: #f1f5f9 !important;
    color: #475569 !important;
  }

  .products-table td {
    color: #0f172a !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  .td-sku, .td-price {
    color: #0f172a !important;
  }

  .td-name {
    color: #334155 !important;
  }
}

/* ==========================================================================
   Chapter HUD Toast Notification & Feedback Controls
   ========================================================================== */
.feedback-toggle-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.feedback-toggle-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.feedback-toggle-btn:hover {
  transform: translateY(-1px);
}

.chapter-toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px) scale(0.95);
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(56, 189, 248, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f8fafc;
  padding: 10px 22px;
  border-radius: 9999px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.chapter-toast-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chapter-toast-icon {
  font-size: 1.25rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.chapter-toast-content {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.chapter-toast-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: #f8fafc;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chapter-toast-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.chapter-toast-badge {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}

/* ==========================================================================
   LANDSCAPE SPLASH COVER / BRAND OVERVIEW SCREEN
   ========================================================================== */
.splash-cover {
  position: fixed;
  inset: 0;
  z-index: 99999;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  box-sizing: border-box;
  background: radial-gradient(circle at 50% 25%, #182848 0%, #101c36 55%, #080d1a 100%);
  color: #ffffff;
  overflow: hidden;
  user-select: none;
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1), transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.42s;
}

.splash-cover.splash-hidden {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
  visibility: hidden;
}

/* Dynamic Fluid Background Waves */
.splash-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.splash-waves-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

.splash-ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.glow-gold {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #fde047 0%, #f59e0b 60%, transparent 80%);
  top: -10%;
  left: 10%;
  filter: blur(95px);
  opacity: 0.45;
  animation: floatGlow 9s ease-in-out infinite alternate;
}

.glow-emerald {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, #34d399 0%, #059669 60%, transparent 80%);
  bottom: 5%;
  right: 8%;
  filter: blur(100px);
  opacity: 0.40;
  animation: floatGlow 11s ease-in-out infinite alternate-reverse;
}

.glow-orange {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, #fb923c 0%, #ff7a00 60%, transparent 80%);
  top: 30%;
  right: 35%;
  filter: blur(90px);
  opacity: 0.35;
  animation: floatGlow 8s ease-in-out infinite alternate;
}

@keyframes floatGlow {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-20px) scale(1.08); }
}

/* ==========================================================================
   LANDSCAPE DASHBOARD SPLASH SCREEN (800px / 100dvh GRID BUDGET)
   ========================================================================== */
.splash-dashboard-card {
  width: 100%;
  max-width: 1440px;
  height: 100%;
  max-height: 800px;
  min-height: 0;
  display: grid;
  grid-template-rows: 60px 160px 1fr 45px;
  gap: 10px;
  padding: 12px 18px;
  box-sizing: border-box;
  background: rgba(13, 22, 38, 0.94);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 10;
  margin: 0 auto;
  overflow: hidden;
}

/* 1. Header (60px) */
.splash-hdr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  min-height: 0;
  min-width: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.splash-hdr-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.splash-hdr-logo-box {
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.splash-hdr-logo {
  max-height: 32px;
  width: auto;
  object-fit: contain;
}

.splash-hdr-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.splash-hdr-brand {
  font-family: var(--font-heading);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #ffffff;
  line-height: 1.1;
  margin: 0;
  white-space: nowrap;
}

.splash-hdr-sub {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.splash-hdr-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.splash-config-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.splash-config-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.splash-explore-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.45);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.splash-explore-pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.6);
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
}

/* 2. Browse by Category (160px: 2 rows of 4) */
.splash-cats-section {
  display: flex;
  flex-direction: column;
  height: 160px;
  min-height: 0;
  gap: 6px;
}

.splash-section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 22px;
}

.splash-sec-title {
  font-family: var(--font-heading);
  font-size: 0.94rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.splash-sec-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.splash-cats-grid-2x4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.splash-cat-pill-card {
  background: #172439;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 0 14px;
  transition: all 0.2s ease;
  user-select: none;
}

.splash-cat-pill-card:hover {
  background: #1e3250;
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.cat-pill-emoji {
  font-size: 1.05rem;
}

.cat-pill-name {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* 3. Featured Brand Highlights (1fr: ~420px total) */
.splash-featured-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 6px;
}

.featured-products {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.featured-card {
  background: #111c2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.22s ease;
  min-height: 0;
  user-select: none;
}

.featured-card:hover {
  border-color: #f59e0b;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.25);
  background: #16243b;
}

.featured-card-media {
  background: #ffffff;
  border-radius: 10px;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  overflow: hidden;
  position: relative;
}

.featured-card-img,
.featured-prod-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.14));
}

.featured-tag-pill {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(13, 22, 38, 0.88);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #38bdf8;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.featured-card-info {
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.featured-card-brand {
  font-size: 0.62rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-card-title {
  font-family: var(--font-heading);
  font-size: 0.80rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.featured-card-subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  color: #f59e0b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

/* 4. Footer & Corporate/Banking Details Tab (45px) */
.splash-ftr-row {
  height: 45px;
  min-height: 0;
  max-width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.splash-ftr-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.splash-ftr-pill-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.splash-ftr-pill-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

.ftr-btn-hint {
  font-size: 0.62rem;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.splash-ftr-details-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.70rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.ftr-detail-item {
  color: #cbd5e1;
}

.ftr-detail-item strong {
  color: #ffffff;
}

.ftr-sep {
  color: rgba(255, 255, 255, 0.3);
}

.ftr-iban-code {
  font-family: monospace;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.copy-iban-pill-btn {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 0.70rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.copy-iban-pill-btn:hover {
  background: #38bdf8;
  color: #0d1626;
}

.splash-ftr-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.70rem;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

.pulse-indicator-mini {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.ftr-erp-label {
  color: #4ade80;
  font-weight: 600;
}

/* Responsive down to 1024x768 */
@media (max-width: 1024px) or (max-height: 768px) {
  .splash-dashboard-card {
    grid-template-rows: 52px 140px 1fr 40px;
    gap: 8px;
    padding: 8px 14px;
  }
  .splash-cats-section {
    height: 140px;
  }
  .splash-cats-grid-2x4 {
    gap: 6px 8px;
  }
  .splash-cat-pill-card {
    padding: 0 8px;
  }
  .cat-pill-name {
    font-size: 0.76rem;
  }
  .featured-products {
    gap: 8px;
  }
  .featured-card {
    padding: 6px;
  }
  .featured-card-title {
    font-size: 0.78rem;
  }
  .featured-card-subtitle {
    font-size: 0.67rem;
  }
  .splash-ftr-row {
    font-size: 0.65rem;
  }
  .splash-ftr-details-inline {
    display: flex;
    font-size: 0.64rem;
    gap: 6px;
  }
  .ftr-iban-code {
    font-size: 0.64rem;
    padding: 1px 5px;
  }
}

/* ==========================================================================
   MODAL DIALOGS: CORPORATE DETAILS & SHORTCUTS CONFIGURATION
   ========================================================================== */
.splash-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.splash-modal-card {
  background: #0f192b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #ffffff;
  position: relative;
}

.splash-modal-card.modal-wide {
  max-width: 1080px;
  max-height: 92vh;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-logo {
  max-height: 40px;
  width: auto;
  background: #ffffff;
  padding: 4px 8px;
  border-radius: 8px;
}

.modal-title-main {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.modal-title-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-corp-mission {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: 10px;
  border-left: 3px solid var(--accent-gold);
  margin: 0 0 14px 0;
}

.corp-info-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.corp-info-block {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.corp-info-block .lbl {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 1px;
}

.corp-info-block .val {
  font-size: 0.84rem;
  color: #ffffff;
}

.corp-info-block .hint {
  font-size: 0.70rem;
  color: #94a3b8;
}

.iban-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.iban-lbl {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
}

.iban-badge {
  font-family: monospace;
  font-size: 0.82rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}

/* Shortcuts Config Grid (8 items) */
.shortcuts-config-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

.shortcut-slot-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.slot-badge {
  font-size: 0.64rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.slot-media-preview {
  width: 100%;
  height: 80px;
  background: #eef2f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
}

.slot-media-preview img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.slot-field-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.slot-field-lbl {
  font-size: 0.60rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.slot-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 4px 6px;
  color: #ffffff;
  font-size: 0.72rem;
  box-sizing: border-box;
}

.slot-input:focus {
  outline: none;
  border-color: #38bdf8;
}

.slot-product-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 4px 6px;
  color: #38bdf8;
  font-size: 0.72rem;
  box-sizing: border-box;
}

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

.footer-action-group {
  display: flex;
  gap: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.80rem;
  cursor: pointer;
}

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

.btn-text {
  background: none;
  border: none;
  color: #94a3b8;
  padding: 8px 14px;
  font-size: 0.80rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-text:hover {
  color: #ffffff;
}

/* ==========================================================================
   HOME SERVER & WI-FI SYNC MODAL STYLES
   ========================================================================== */
.server-status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.server-status-banner.banner-online {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
}

.server-status-banner.banner-offline {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.server-status-banner.banner-checking {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-online {
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
}

.dot-offline {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}

.dot-checking {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

.status-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.status-text-wrap strong {
  font-size: 0.82rem;
  color: #ffffff;
}

.status-text-wrap small {
  font-size: 0.70rem;
  color: #94a3b8;
}

.server-ping-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.server-ping-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.server-ping-badge {
  font-family: monospace;
  font-size: 0.70rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
}

.server-input-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.server-preset-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 0.64rem;
  color: #94a3b8;
  font-weight: 600;
}

.preset-pill-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.66rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-pill-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
}

.server-sync-actions-box {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn-sync-main {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
}

.btn-sync-main .sync-icon {
  font-size: 1.3rem;
  transition: transform 0.4s ease;
}

.btn-sync-main.is-syncing .sync-icon {
  animation: spinSync 1s linear infinite;
}

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

.sync-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.sync-text-group strong {
  font-size: 0.84rem;
  line-height: 1.15;
}

.sync-text-group small {
  font-size: 0.64rem;
  opacity: 0.88;
  font-weight: 500;
}

.btn-open-live {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
}

.server-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.server-stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.server-stat-item.full-width {
  grid-column: span 2;
}

.server-stat-item .stat-lbl {
  font-size: 0.60rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.8px;
}

.server-stat-item .stat-val {
  font-size: 0.78rem;
  color: #f1f5f9;
}

@media print {
  .splash-cover {
    display: none !important;
  }
}


