/* ==========================================================================
   WooManage Pro - Modern Dashboard & Order Management System
   Design System: Premium Glassmorphism, Micro-animations & High Contrast
   ========================================================================== */

:root {
  /* Color Tokens - Dark (Default) */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.75);
  --bg-card: rgba(30, 41, 59, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.4);

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

  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-glow: rgba(99, 102, 241, 0.25);

  /* Status Colors */
  --status-processing: #0284c7;
  --status-processing-bg: rgba(2, 132, 199, 0.15);
  --status-completed: #10b981;
  --status-completed-bg: rgba(16, 185, 129, 0.15);
  --status-pending: #8b5cf6;
  --status-pending-bg: rgba(139, 92, 246, 0.15);
  --status-on-hold: #f59e0b;
  --status-on-hold-bg: rgba(245, 158, 11, 0.15);
  --status-cancelled: #ef4444;
  --status-cancelled-bg: rgba(239, 68, 68, 0.15);
  --status-refunded: #64748b;
  --status-refunded-bg: rgba(100, 116, 139, 0.15);
  --status-failed: #dc2626;
  --status-failed-bg: rgba(220, 38, 38, 0.15);

  /* Layout */
  --header-height: 50px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px var(--accent-glow);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-hover: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;

  --text-main: #1e293b;
  --text-secondary: #334155;
  --text-muted: #475569;
  --text-dim: #64748b;

  --accent-primary: #4f46e5;
  --accent-hover: #4338ca;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  --accent-glow: rgba(79, 70, 229, 0.18);

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
}

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

html {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Subtle Ambient Glow */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.05) 50%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-bottom {
  position: fixed;
  bottom: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px 60px 24px;
}

/* ==========================================================================
   Navbar & Top Bar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.navbar-inner {
  max-width: 1720px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
  overflow: visible;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
  flex-shrink: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--accent-glow);
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}

.brand-title {
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.brand-title .badge-pro {
  background: var(--accent-gradient);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  display: none !important;
}

/* Nav View Switcher */
.nav-view-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3px;
  border-radius: 9px;
  gap: 3px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab-btn.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* Nav Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.navbar-actions .btn-sm {
  padding: 4px 8px;
  font-size: 11.5px;
  gap: 5px;
  border-radius: 7px;
  height: 30px;
}

.navbar-actions .select-custom {
  padding: 3px 6px;
  font-size: 11.5px;
  height: 30px;
  border-radius: 7px;
}

.navbar-actions .btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 7px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Store Selector Dropdown */
.store-selector-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.store-select-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  max-width: 115px;
}

.store-select-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
}

.store-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
}

.store-status-dot.demo {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.store-status-dot.error {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

/* Store Live Clock & Timezone Pill */
.store-timezone-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  user-select: none;
}

.store-timezone-pill:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.store-timezone-pill .clock-icon {
  color: #10b981;
  font-size: 11.5px;
  animation: tz-pulse 2s infinite ease-in-out;
}

@keyframes tz-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.08); }
}

.store-clock-time {
  font-family: 'JetBrains Mono', monospace, ui-monospace, sans-serif;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.3px;
  font-size: 11.5px;
}

.store-clock-tz-label {
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.store-tz-badge {
  font-size: 11px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tz-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-family: monospace;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px var(--accent-glow);
  opacity: 0.95;
}

.btn-secondary {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-main);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

.btn-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: #10b981;
  color: #fff;
}

/* Icon button */
.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Store Banner / Demo Alert
   ========================================================================== */
.store-alert-bar {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(234, 88, 12, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: fadeIn 0.4s ease;
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: #fbbf24;
}

.alert-content svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Stats Grid
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  filter: blur(35px);
  pointer-events: none;
  opacity: 0.15;
}

.stat-card.revenue::after { background: #6366f1; }
.stat-card.orders::after { background: #38bdf8; }
.stat-card.processing::after { background: #f59e0b; }
.stat-card.completed::after { background: #10b981; }

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

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.stat-card.revenue .stat-icon {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.stat-card.orders .stat-icon {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.stat-card.processing .stat-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.stat-card.completed .stat-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   Stats Overview Bar & Unified Date Filter
   ========================================================================== */
.stats-overview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 30;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.stats-overview-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-overview-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-overview-tag {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stats-overview-tag i {
  color: #a855f7;
}

.stats-period-indicator {
  font-size: 11.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stats-period-indicator strong {
  color: #c084fc;
  font-weight: 700;
}

.revenue-filter-wrapper {
  position: relative;
  display: inline-block;
}

.revenue-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.primary-filter-btn {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(168, 85, 247, 0.28));
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #ffffff;
  padding: 6px 14px;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.2);
}

.primary-filter-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.38), rgba(168, 85, 247, 0.45));
  border-color: rgba(168, 85, 247, 0.75);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.primary-filter-btn strong {
  color: #e9d5ff;
}

.revenue-filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 300px;
  max-width: 340px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: modalFadeIn 0.2s ease-out;
}

/* Orders active date filter strip */
.orders-date-filter-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  margin-bottom: 8px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: var(--text-muted);
}

.filter-strip-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-strip-left strong {
  color: #c084fc;
}

.filter-strip-clear {
  color: #f87171 !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  padding: 3px 8px !important;
  border-radius: 6px;
  font-size: 11.5px;
  transition: all 0.15s ease;
}

.filter-strip-clear:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
}

@media (max-width: 768px) {
  .stats-overview-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .revenue-filter-dropdown {
    right: auto;
    left: 0;
    width: 100%;
    min-width: unset;
  }
}

.rev-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rev-dropdown-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.rev-dropdown-close:hover {
  color: #fff;
}

.rev-preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 8px;
}

.rev-preset-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.rev-preset-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

.rev-preset-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.rev-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 0;
}

.rev-custom-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rev-custom-heading {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.rev-date-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.rev-date-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rev-date-field label {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

.rev-input-date {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  font-size: 11.5px;
  padding: 5px 8px;
  outline: none;
  font-family: inherit;
}

.rev-input-date:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.rev-apply-btn {
  width: 100%;
  margin-top: 4px;
  padding: 7px 10px;
  font-size: 12px;
  justify-content: center;
}

/* ==========================================================================
   Main Content Card (Orders Manager)
   ========================================================================== */
.main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Filter Navigation & Tabs */
.card-header-bar {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.status-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.tab-badge {
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.tab-btn.active .tab-badge {
  background: var(--accent-primary);
  color: #fff;
}

/* Control Bar (Search, Filter, Actions) */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.search-box-wrapper {
  position: relative;
  min-width: 320px;
  flex: 1;
  max-width: 480px;
}

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

.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 42px;
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-custom {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.select-custom:focus {
  border-color: var(--accent-primary);
}

/* Bulk Actions Bar */
.bulk-bar {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 10px 20px;
  margin: 12px 24px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideDown 0.25s ease;
}

.bulk-info {
  font-size: 13px;
  font-weight: 600;
  color: #c7d2fe;
}

.bulk-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Orders Table
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.orders-table th {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.orders-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13.5px;
  vertical-align: middle;
  transition: background-color 0.2s ease;
}

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

/* Checkbox Style */
.checkbox-custom {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
  border-radius: 4px;
}

/* Order ID Badge (Native WooCommerce ID) */
.order-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  user-select: all;
  white-space: nowrap;
}

.order-id-badge:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Order ID & Time */
.order-id-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.order-number {
  font-weight: 700;
  color: var(--accent-primary);
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.order-number:hover {
  text-decoration: underline;
}

.order-time {
  font-size: 11.5px;
  color: var(--text-dim);
}

/* Customer Cell */
.customer-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customer-name {
  font-weight: 600;
  color: var(--text-main);
}

.customer-phone {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.customer-location {
  font-size: 11.5px;
  color: var(--text-dim);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Product Line Summary */
.products-cell {
  min-width: 220px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-item-summary {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-item-summary:last-child {
  margin-bottom: 0;
}

.product-thumb {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  margin-top: 1px;
}

.product-title-wrap {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-main);
  word-break: break-word;
}

.product-qty-badge {
  font-weight: 700;
  color: var(--accent-primary);
  display: inline-block;
  margin-right: 2px;
}

.product-name-text {
  font-weight: 500;
}

/* Product Metadata Row (Item ID, SKU, Categories, Tags) */
.product-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.badge-item-id {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.25;
}

.badge-pid {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.25;
}

.badge-sku {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.25;
}

.badge-tracking {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 4px;
  padding: 2px 7px;
  cursor: pointer;
  margin-top: 3px;
  transition: all 0.15s ease;
}
.badge-tracking:hover {
  background: rgba(16, 185, 129, 0.24);
  border-color: #10b981;
}

.badge-no-tracking {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 3px;
}

/* Missing Tracking Alert Banner & Notifications */
.missing-tracking-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
  position: relative;
}
.alert-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.alert-banner-text {
  min-width: 0;
  flex: 1;
}
.alert-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.alert-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}
.alert-banner-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.alert-count-pill {
  background: #ef4444;
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}
.alert-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.alert-btn {
  font-weight: 700;
  gap: 5px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.alert-banner-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s ease;
}
.alert-banner-close:hover {
  color: var(--text-main);
}

/* Nav Alert Badge */
.nav-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  margin-left: 5px;
  animation: pulse-badge 2s infinite;
}
.nav-alert-badge.warning {
  background: #f59e0b;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Tracking Status Badges in Table */
.order-tracking-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 7px;
  margin-top: 4px;
  line-height: 1.3;
}
.order-tracking-badge.missing {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.order-tracking-badge.has {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  cursor: pointer;
  transition: all 0.15s ease;
}
.order-tracking-badge.has:hover {
  background: rgba(16, 185, 129, 0.24);
  border-color: #10b981;
}

.row-missing-tracking {
  border-left: 3px solid rgba(239, 68, 68, 0.65) !important;
}

.order-customer-note-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fbbf24;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 5px;
  max-width: 230px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.35;
}
.order-customer-note-badge:hover {
  background: rgba(245, 158, 11, 0.26);
  border-color: #fbbf24;
}
.order-customer-note-badge .note-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-has-note {
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.08) !important;
}
.btn-has-note:hover {
  background: rgba(245, 158, 11, 0.2) !important;
}

.stat-missing-tracking-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  transition: all 0.15s ease;
}
.stat-missing-tracking-chip:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
}

.badge-cat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 500;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 1.25;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-cat i, .badge-tag i {
  font-size: 9px;
  opacity: 0.9;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 500;
  color: #f472b6;
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 1.25;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-cat-more, .badge-tag-more {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 1px 4px;
  line-height: 1.25;
}

/* Price Cell */
.price-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-total {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.payment-method {
  font-size: 11px;
  color: var(--text-dim);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-badge.processing {
  background: var(--status-processing-bg);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.status-badge.processing::before { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }

.status-badge.completed {
  background: var(--status-completed-bg);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.status-badge.completed::before { background: #34d399; box-shadow: 0 0 6px #34d399; }

.status-badge.pending {
  background: var(--status-pending-bg);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.3);
}
.status-badge.pending::before { background: #a78bfa; }

.status-badge.on-hold {
  background: var(--status-on-hold-bg);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.status-badge.on-hold::before { background: #fbbf24; }

.status-badge.cancelled {
  background: var(--status-cancelled-bg);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.status-badge.cancelled::before { background: #f87171; }

.status-badge.refunded {
  background: var(--status-refunded-bg);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.status-badge.refunded::before { background: #94a3b8; }

.status-badge.failed {
  background: var(--status-failed-bg);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.status-badge.failed::before { background: #f87171; }

/* Table Actions */
.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Pagination */
.pagination-bar {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Modals & Popups System (Universal)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 12, 22, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overscroll-behavior: contain;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.22s ease-out;
}

.modal-dialog,
.modal-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 65px -15px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.modal-title {
  font-size: 16.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  line-height: 1.35;
  flex: 1;
}

.modal-title i {
  color: var(--accent-primary);
  font-size: 1.05em;
}

.modal-close-btn,
.modal-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover,
.modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  transform: scale(1.05);
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 10;
  flex-shrink: 0;
}

/* Modal Sections */
.modal-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-block {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.detail-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  color: var(--text-muted);
}

.detail-val {
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

/* Product list inside modal */
.modal-product-table {
  width: 100%;
  border-collapse: collapse;
}

.modal-product-table th {
  text-align: left;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-product-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  vertical-align: middle;
}

/* Notes / Timeline */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}

.timeline-item {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  font-size: 12.5px;
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: var(--transition);
}

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

.form-hint {
  font-size: 11.5px;
  color: var(--text-dim);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
}

.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }
.toast.info { border-left: 4px solid #6366f1; }

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

@keyframes modalSlideUpMobile {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

/* Empty State */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-muted);
}

.empty-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .modal-section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar-inner {
    padding: 0 16px;
  }
  .app-container {
    padding: 0 16px 40px 16px;
  }
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box-wrapper {
    min-width: 100%;
    max-width: 100%;
  }
}

/* ==========================================================================
   View Switcher & Tracking File Processor Styles
   ========================================================================== */

.nav-view-switcher {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab-btn:hover {
  color: var(--text-main);
}

.nav-tab-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

/* Tracking Processor Layout */
.tracking-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .tracking-steps-grid {
    grid-template-columns: 1fr;
  }
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--border-hover);
}

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

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--accent-glow);
  flex-shrink: 0;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.step-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

.dropzone-icon {
  font-size: 32px;
}

.dropzone-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.dropzone-sub {
  font-size: 11.5px;
  color: var(--text-dim);
}

/* File Summary Box */
.file-summary-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  animation: fadeIn 0.25s ease;
}

/* Action Match Bar */
.match-action-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.pulse {
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Results Stats */
.match-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.match-stat-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.match-stat-box.success {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

.match-stat-box.warning {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}

.match-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.match-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
}

/* Column Selector Dropdown */
.column-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 320px;
  max-height: 440px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideDown 0.2s ease;
}

.column-dropdown-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.column-dropdown-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.column-dropdown-actions {
  display: flex;
  gap: 8px;
  font-size: 11.5px;
}

.column-dropdown-actions a {
  color: var(--accent-primary);
  text-decoration: none;
  cursor: pointer;
}

.column-dropdown-actions a:hover {
  text-decoration: underline;
}

.column-dropdown-list {
  padding: 8px;
  overflow-y: auto;
  max-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.column-dropdown-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  padding: 6px 8px 2px 8px;
}

.column-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.column-checkbox-item:hover {
  background: var(--bg-tertiary);
}

.column-checkbox-item input {
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.column-checkbox-badge {
  font-size: 10px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: auto;
}

/* View Sections */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* ================= AUTH & USER MANAGEMENT STYLES ================= */

/* Login Overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.15), transparent 70%), rgba(10, 15, 29, 0.94);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(99, 102, 241, 0.2);
  padding: 36px 32px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.login-alert {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 18px;
  display: none;
  align-items: center;
  gap: 10px;
}

.login-alert.error {
  display: flex;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.login-alert.info {
  display: flex;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
}

.password-toggle-btn:hover {
  color: var(--text-main);
}

/* User Profile in Top Bar */
.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.user-profile-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
}

.user-avatar-circle {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
}

.user-name-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 95px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-profile-btn .user-role-badge {
  display: none !important;
}

.user-role-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.user-role-badge.admin {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.user-role-badge.staff {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0f172a !important; /* Solid opaque background: eliminates background text/icon bleed */
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  min-width: 250px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1050 !important;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .user-menu-dropdown {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-menu-item > span:first-child {
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

[data-theme="light"] .user-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.user-menu-item.logout {
  color: #f87171;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-menu-item.logout > span:first-child {
  color: #f87171;
}

[data-theme="light"] .user-menu-item.logout {
  border-top-color: rgba(0, 0, 0, 0.08);
  color: #dc2626;
}

[data-theme="light"] .user-menu-item.logout > span:first-child {
  color: #dc2626;
}

.user-menu-item.logout:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* User Management Table & Status */
.badge-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: all;
}

.badge-id-pill:hover {
  background: #10b981;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.status-pill.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.blocked {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-pill.pending_approval {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  animation: pulseAmber 2s infinite ease-in-out;
}

.status-pill.pending_verification {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

@keyframes pulseAmber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); }
}

/* Auth Modal Tabs */
.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 9px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-tab-btn:hover {
  color: var(--text-main);
}

.auth-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Workflow Step Tracker */
.auth-step-tracker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
  background: rgba(15, 23, 42, 0.5);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.step-item.done {
  color: #10b981;
}

.step-item.active {
  color: #f59e0b;
  font-weight: 600;
}

.step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
}

.step-item.done .step-icon {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #10b981;
}

.step-item.active .step-icon {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #f59e0b;
}

/* Verification link display box */
.verify-link-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px dashed var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 14px 0;
  font-size: 12px;
  text-align: left;
}

.verify-link-input {
  width: 100%;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--accent-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  margin-top: 6px;
  box-sizing: border-box;
}

/* User management filter pill */
.user-filter-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.user-filter-pill:hover {
  color: var(--text-main);
}

.user-filter-pill.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.badge-count {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  margin-left: 4px;
  background: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* ==========================================================================
   Responsive Header Helpers & Media Queries
   ========================================================================== */

/* Helpers for responsive tab label toggling */
.tab-label-short {
  display: none;
}
.tab-label-full {
  display: inline;
}

.user-profile-wrapper {
  position: relative;
  flex-shrink: 0;
}

/* ==========================================================================
   Laptop & Desktop Display Optimization (<= 1536px):
   Covers standard laptops (1280x800, 1366x768, 1440x900, 1536x864 @ 125% DPI scale).
   Maximizes visible orders on screen, prevents vertical scroll exhaustion,
   and ensures every toolbar and filter fits elegantly without excessive wrapping.
   ========================================================================== */
@media (max-width: 1536px) {
  /* Container & Layout */
  .app-container {
    max-width: 100% !important;
    padding: 0 16px 36px 16px !important;
  }

  /* 1. Header & Navigation Bar: Ultra-compact, single-row layout */
  .navbar-inner {
    padding: 0 12px !important;
    gap: 6px !important;
  }

  /* Hide festive pill from header navbar on all laptops (already visible in dashboard overview) */
  .festive-countdown-pill,
  #navbar-festive-pill {
    display: none !important;
  }

  /* Compact Brand */
  .brand-title {
    font-size: 13.5px !important;
  }
  .brand-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 12px !important;
  }

  /* Compact Navigation View Switcher */
  .nav-view-switcher {
    gap: 2px !important;
    padding: 2px !important;
  }
  .nav-tab-btn {
    padding: 3px 6px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }
  .tab-label-full {
    display: none !important;
  }
  .tab-label-short {
    display: inline !important;
  }

  /* Action Buttons: Turn text into sleek icon buttons with tooltips */
  .nav-btn-text {
    display: none !important;
  }
  .navbar-actions {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }
  .navbar-actions .btn-sm {
    padding: 3px 6px !important;
    min-width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }
  .navbar-actions .btn-icon {
    width: 28px !important;
    height: 28px !important;
  }

  /* Compact Store & Clock */
  .store-select-btn {
    max-width: 86px !important;
    padding: 3px 6px !important;
    font-size: 11px !important;
    height: 28px !important;
  }
  .store-name-text {
    max-width: 50px !important;
  }
  .store-timezone-pill {
    padding: 3px 6px !important;
    font-size: 11px !important;
    gap: 4px !important;
    height: 28px !important;
  }
  .store-clock-time {
    font-size: 11px !important;
  }
  .store-clock-tz-label {
    display: none !important;
  }

  /* Compact Auto-refresh */
  .auto-refresh-wrapper select {
    max-width: 68px !important;
    padding: 2px 4px !important;
    font-size: 11px !important;
    height: 28px !important;
  }
  #refresh-countdown {
    display: none !important;
  }

  /* User Profile: Avatar + Chevron pill */
  .user-name-text {
    display: none !important;
  }
  .user-profile-btn .user-role-badge {
  display: none !important;
}

.user-role-badge {
    display: none !important;
  }
  .user-profile-btn {
    padding: 2px 6px 2px 2px !important;
    gap: 3px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
  }
  .user-avatar-circle {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
  }

  /* 2. Business Overview Bar */
  .stats-overview-bar {
    padding: 6px 12px !important;
    margin-bottom: 10px !important;
    gap: 8px !important;
  }
  .stats-overview-tag {
    font-size: 11.5px !important;
    letter-spacing: 0.4px !important;
  }
  .stats-period-indicator {
    font-size: 10.5px !important;
    padding: 2px 7px !important;
  }
  .revenue-filter-btn {
    padding: 4px 9px !important;
    font-size: 11.5px !important;
  }
  .festive-dashboard-badge {
    font-size: 10.5px !important;
    padding: 2px 7px !important;
  }

  /* 3. Stats Cards: Compact height saves ~80px vertical space on laptop */
  .stats-grid {
    gap: 10px !important;
    margin-bottom: 14px !important;
  }
  .stat-card {
    padding: 12px 14px !important;
    border-radius: var(--radius-md) !important;
  }
  .stat-label {
    font-size: 11.5px !important;
    margin-bottom: 2px !important;
  }
  .stat-value {
    font-size: 20px !important;
  }
  .stat-sub {
    font-size: 10.5px !important;
    margin-top: 4px !important;
  }
  .stat-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 15px !important;
    border-radius: 9px !important;
  }

  /* 4. Warning Banner */
  .warning-banner,
  .alert {
    padding: 8px 12px !important;
    margin-bottom: 10px !important;
    font-size: 12px !important;
  }
  .warning-banner .btn,
  .alert .btn {
    padding: 3px 8px !important;
    font-size: 11px !important;
    height: 28px !important;
  }

  /* 5. Orders Card Header & Filter Navigation */
  .card-header-bar {
    padding: 10px 14px !important;
    gap: 8px !important;
  }
  .status-tabs-wrapper {
    gap: 4px !important;
    padding-bottom: 2px !important;
  }
  .tab-btn {
    padding: 5px 9px !important;
    font-size: 11.5px !important;
    gap: 5px !important;
    border-radius: 6px !important;
    height: 30px !important;
  }
  .tab-badge {
    font-size: 10px !important;
    padding: 1px 5px !important;
  }

  /* 6. Controls Bar, Search & Dropdown Filters */
  .controls-bar {
    gap: 7px !important;
  }
  .search-box-wrapper {
    min-width: 220px !important;
  }
  .search-input {
    height: 32px !important;
    padding: 5px 10px 5px 32px !important;
    font-size: 12px !important;
  }
  .search-icon {
    left: 10px !important;
    font-size: 11.5px !important;
  }
  #btn-open-bulk-filter {
    height: 32px !important;
    padding: 4px 10px !important;
    font-size: 11.5px !important;
  }
  .filter-actions {
    gap: 6px !important;
  }
  .filter-actions .select-custom {
    height: 32px !important;
    padding: 3px 8px !important;
    font-size: 11.5px !important;
  }
  .filter-actions .btn {
    height: 32px !important;
    padding: 4px 9px !important;
    font-size: 11.5px !important;
  }
  .select-all-store-label {
    height: 32px !important;
    padding: 3px 8px !important;
    font-size: 11.5px !important;
    gap: 6px !important;
  }

  /* 7. Orders Table: Compact row heights allow viewing 8-12 orders on screen */
  .orders-table th {
    padding: 8px 10px !important;
    font-size: 11px !important;
  }
  .orders-table td {
    padding: 9px 10px !important;
    font-size: 12px !important;
  }
  .product-thumb {
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
  }
  .products-cell {
    min-width: 170px !important;
    max-width: 280px !important;
    gap: 4px !important;
  }
  .product-item-summary {
    padding: 2px 5px !important;
    font-size: 11px !important;
    gap: 6px !important;
  }
  .customer-name {
    font-size: 12px !important;
  }
  .customer-phone {
    font-size: 11px !important;
  }
  .customer-location {
    font-size: 10.5px !important;
    max-width: 170px !important;
  }
  .order-id-badge {
    font-size: 10.5px !important;
    padding: 2px 6px !important;
  }
  .status-badge {
    font-size: 10.5px !important;
    padding: 2px 7px !important;
  }
  .order-total-amount {
    font-size: 12.5px !important;
  }
  .action-btn {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
  }

  /* 8. Bulk Selection Bar */
  .bulk-bar {
    padding: 7px 12px !important;
    font-size: 11.5px !important;
  }
  .bulk-actions-group .btn {
    padding: 3px 7px !important;
    font-size: 11px !important;
    height: 28px !important;
  }

  /* 9. Pagination Footer */
  .pagination-bar {
    padding: 8px 12px !important;
    font-size: 11.5px !important;
  }
  .pagination-controls .btn {
    padding: 3px 8px !important;
    font-size: 11px !important;
    height: 28px !important;
  }

  /* 10. View 2: Tracking File Processor */
  .tracking-steps-grid {
    gap: 12px !important;
    margin-bottom: 14px !important;
  }
  .step-card {
    padding: 14px !important;
  }
  .step-header {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }
  .step-num {
    width: 22px !important;
    height: 22px !important;
    font-size: 11px !important;
  }
  .step-title {
    font-size: 13.5px !important;
  }
  .step-desc {
    font-size: 11px !important;
  }
  .dropzone {
    padding: 14px 10px !important;
    gap: 6px !important;
  }
  .dropzone-icon i {
    font-size: 26px !important;
    margin-bottom: 4px !important;
  }
  .dropzone-text {
    font-size: 12px !important;
  }
  .dropzone-sub {
    font-size: 10.5px !important;
  }
  .match-action-bar {
    padding: 10px 14px !important;
    gap: 8px !important;
  }

  /* 11. Modals: Fit properly on short 768px laptop viewports */
  .modal-dialog,
  .modal-card {
    max-height: 94vh !important;
    max-width: 860px !important;
  }
  .modal-header {
    padding: 10px 16px !important;
  }
  .modal-title {
    font-size: 15px !important;
  }
  .modal-close-btn,
  .modal-close {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    font-size: 12px !important;
  }
  .modal-body {
    padding: 14px 16px !important;
    gap: 12px !important;
  }
  .modal-footer {
    padding: 10px 16px !important;
  }
  .modal-section-grid {
    gap: 12px !important;
  }
}

/* Narrow Laptop & Small Viewport (< 1200px) */
@media (max-width: 1200px) {
  .app-container {
    max-width: 100% !important;
    padding: 0 12px 36px 12px !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .navbar-inner {
    padding: 0 10px !important;
    gap: 4px !important;
  }

  .nav-tab-btn {
    padding: 3px 5px !important;
    font-size: 10.5px !important;
  }

  #refresh-countdown {
    display: none !important;
  }

  .store-select-btn {
    max-width: 82px !important;
  }
  .store-name-text {
    max-width: 46px !important;
  }
}

/* Tablet (769px - 1024px): 2 Neat, Spacious, Beautiful Rows */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --header-height: auto;
  }

  .navbar {
    height: auto !important;
    min-height: 84px !important;
    padding: 8px 0 10px 0 !important;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .navbar-inner {
    display: flex !important;
    flex-wrap: wrap !important;
    height: auto !important;
    padding: 0 16px !important;
    row-gap: 8px !important;
    column-gap: 12px !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .brand-wrapper {
    order: 1 !important;
  }

  .brand-title {
    font-size: 14.5px !important;
  }

  .brand-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
  }

  .navbar-actions {
    order: 2 !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
  }

  /* Compact controls on tablet */
  .nav-btn-text,
  .user-role-badge,
  .user-name-text,
  .store-clock-tz-label,
  #navbar-festive-pill {
    display: none !important;
  }

  .store-select-btn {
    padding: 4px 8px !important;
    font-size: 11.5px !important;
    max-width: 110px !important;
    height: 30px !important;
  }

  .store-timezone-pill {
    padding: 4px 8px !important;
    font-size: 11.5px !important;
    height: 30px !important;
  }

  /* Centered, sleek Segmented Nav Tabs */
  .nav-view-switcher {
    order: 3 !important;
    width: 100% !important;
    max-width: 680px !important;
    margin: 4px auto 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    padding: 3px !important;
    gap: 4px !important;
    box-shadow: var(--shadow-sm) !important;
  }

  .nav-tab-btn {
    flex: 1 !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 12px !important;
    padding: 7px 10px !important;
    border-radius: 7px !important;
    min-height: 36px !important;
    white-space: nowrap !important;
  }

  .card-header-bar {
    padding: 12px 14px;
  }

  .controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .search-box-wrapper {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .filter-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .missing-tracking-alert-banner {
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .alert-banner-left {
    min-width: 240px !important;
    flex: 1 1 auto !important;
    height: auto !important;
  }

  .alert-banner-actions {
    flex-wrap: wrap !important;
    gap: 6px !important;
    flex: 0 0 auto !important;
  }
}

/* Mobile Devices (< 768px) */
/* Mobile Devices (< 768px) - Professional Native-App Experience */
@media (max-width: 768px) {
  .app-container {
    padding: 0 10px calc(76px + env(safe-area-inset-bottom, 0px)) 10px !important;
  }

  /* Compact Sticky Navbar */
  .navbar {
    position: sticky !important;
    top: 0 !important;
    margin-bottom: 12px !important;
    padding: 8px 0 !important;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    z-index: 100 !important;
  }

  [data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .navbar-inner {
    padding: 0 10px !important;
    gap: 6px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .brand-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }

  .brand-icon {
    width: 30px !important;
    height: 30px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .brand-title {
    font-size: 14px !important;
    letter-spacing: -0.3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
  }

  .brand-subtitle {
    display: none !important;
  }

  .navbar-actions {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
  }

  /* Hidden non-essential desktop buttons on mobile header */
  #btn-manage-stores,
  #btn-user-management,
  .auto-refresh-wrapper,
  #store-timezone-pill,
  #navbar-festive-pill {
    display: none !important;
  }

  /* Compact Store Pill */
  .store-select-btn {
    padding: 4px 8px !important;
    font-size: 11.5px !important;
    max-width: 90px !important;
    min-width: 0 !important;
    border-radius: 8px !important;
    flex-shrink: 1 !important;
  }

  .store-name-text {
    max-width: 58px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Compact Timezone / Clock Pill */
  .store-timezone-pill {
    padding: 4px 7px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    gap: 3px !important;
    cursor: pointer;
  }

  .store-clock-time {
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  .store-clock-tz-label {
    display: none !important;
  }

  .btn-icon {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .user-profile-btn {
    padding: 3px 5px !important;
    gap: 3px !important;
  }

  .user-avatar-circle {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }

  .user-name-text,
  .user-profile-btn .user-role-badge {
  display: none !important;
}

.user-role-badge {
    display: none !important;
  }

  /* User menu dropdown positioning on mobile */
  .user-menu-dropdown {
    right: 4px !important;
    min-width: 240px !important;
    max-width: calc(100vw - 16px) !important;
    z-index: 1060 !important;
    background: #0f172a !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85) !important;
  }

  [data-theme="light"] .user-menu-dropdown {
    background: #ffffff !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18) !important;
  }

  /* ==========================================================================
     Native Mobile Bottom Navigation Bar (Thumb Friendly)
     ========================================================================== */
  .nav-view-switcher {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 56px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(22px) !important;
    -webkit-backdrop-filter: blur(22px) !important;
    border-top: 1px solid var(--border-color) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)) 6px !important;
    z-index: 999 !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5) !important;
    box-sizing: border-box !important;
  }

  [data-theme="light"] .nav-view-switcher {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
  }

  .nav-tab-btn {
    flex: 1 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 2px !important;
    font-size: 10px !important;
    gap: 3px !important;
    border-radius: 8px !important;
    min-width: 0 !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    position: relative !important;
  }

  .nav-tab-btn i {
    font-size: 17px !important;
    margin: 0 !important;
  }

  .nav-tab-btn.active {
    background: rgba(99, 102, 241, 0.16) !important;
    color: var(--accent-primary) !important;
    box-shadow: none !important;
    font-weight: 700 !important;
  }

  /* Position Badge at upper-right shoulder of bottom nav icon on mobile */
  .nav-tab-btn .nav-alert-badge,
  .nav-tab-btn .feedback-badge {
    position: absolute !important;
    top: 2px !important;
    right: calc(50% - 20px) !important;
    margin-left: 0 !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 4px !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
    line-height: 17px !important;
    border-radius: 9px !important;
    border: 2px solid rgba(15, 23, 42, 0.95) !important;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4) !important;
    z-index: 10 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  [data-theme="light"] .nav-tab-btn .nav-alert-badge,
  [data-theme="light"] .nav-tab-btn .feedback-badge {
    border-color: #ffffff !important;
  }

  /* Hide floating feedback FAB on mobile since feedback is right in bottom nav */
  .floating-feedback-fab {
    display: none !important;
  }

  /* ==========================================================================
     Business Overview & Revenue Date Filter
     ========================================================================== */
  .stats-overview-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  .stats-overview-left {
    width: 100% !important;
  }

  .stats-overview-heading {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .stats-overview-right {
    width: 100% !important;
  }

  .revenue-filter-wrapper {
    width: 100% !important;
    position: relative !important;
  }

  .revenue-filter-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 9px 14px !important;
    font-size: 13px !important;
    border-radius: var(--radius-md) !important;
  }

  .revenue-filter-dropdown {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    box-sizing: border-box !important;
    padding: 12px !important;
    z-index: 1010 !important;
    border-radius: var(--radius-md) !important;
  }

  .rev-preset-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .rev-preset-btn {
    padding: 8px 10px !important;
    font-size: 12px !important;
    justify-content: center !important;
  }

  .rev-date-inputs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .rev-date-field input[type="date"] {
    width: 100% !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
  }

  .rev-apply-btn {
    width: 100% !important;
    padding: 9px !important;
    font-size: 13px !important;
    margin-top: 8px !important;
    justify-content: center !important;
  }

  /* 2x2 Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .stat-card {
    padding: 10px 12px !important;
    border-radius: var(--radius-md) !important;
  }

  .stat-label {
    font-size: 10px !important;
    letter-spacing: 0.2px !important;
  }

  .stat-value {
    font-size: 17px !important;
  }

  .stat-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
  }

  .stat-sub {
    display: none !important;
  }

  /* Missing Tracking Alert Banner on Mobile */
  .missing-tracking-alert-banner {
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    padding: 12px 14px !important;
    gap: 8px !important;
    position: relative !important;
    margin-bottom: 12px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
  }

  .alert-banner-left {
    width: 100% !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding-right: 28px !important; /* Space for close button */
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .alert-banner-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 13.5px !important;
    margin-top: 1px !important;
    flex-shrink: 0 !important;
  }

  .alert-banner-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .alert-banner-title {
    font-size: 12.5px !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
  }

  .alert-count-pill {
    font-size: 11px !important;
    padding: 1px 6px !important;
  }

  .alert-banner-sub {
    font-size: 11px !important;
    line-height: 1.4 !important;
    margin-top: 3px !important;
    color: var(--text-muted) !important;
  }

  .alert-banner-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    margin-top: 4px !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .alert-banner-actions .alert-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 7px 12px !important;
    font-size: 11.5px !important;
    white-space: normal !important;
    text-align: center !important;
    border-radius: var(--radius-sm) !important;
    line-height: 1.3 !important;
    height: auto !important;
    min-height: 32px !important;
  }

  .alert-banner-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    padding: 0 !important;
    color: var(--text-dim) !important;
  }

  /* ==========================================================================
     Main Card & Controls Bar
     ========================================================================== */
  .main-card {
    border-radius: var(--radius-lg) !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    overflow: hidden !important;
  }

  .card-header-bar {
    padding: 12px 12px !important;
    gap: 10px !important;
  }

  .status-tabs-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    gap: 5px !important;
    scrollbar-width: none !important;
  }

  .status-tabs-wrapper::-webkit-scrollbar {
    display: none !important;
  }

  .tab-btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    border-radius: var(--radius-sm) !important;
  }

  .tab-badge {
    font-size: 10px !important;
    padding: 1px 5px !important;
  }

  .controls-bar {
    gap: 8px !important;
  }

  .search-box-wrapper {
    width: 100% !important;
  }

  .search-input {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
    padding: 9px 12px 9px 34px !important;
    border-radius: var(--radius-md) !important;
  }

  /* 2x2 grid for filter action buttons */
  .filter-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .filter-actions > * {
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    justify-content: center !important;
  }

  .select-all-store-label {
    padding: 7px 10px !important;
    font-size: 11px !important;
    justify-content: center !important;
    border-radius: var(--radius-sm) !important;
  }

  .filter-actions .select-custom {
    padding: 7px 10px !important;
    font-size: 11px !important;
    border-radius: var(--radius-sm) !important;
  }

  #export-csv-btn {
    padding: 7px 10px !important;
    font-size: 11px !important;
    border-radius: var(--radius-sm) !important;
  }

  .filter-actions button.btn-primary {
    padding: 7px 10px !important;
    font-size: 11px !important;
    border-radius: var(--radius-sm) !important;
  }

  /* ==========================================================================
     Orders Mobile Card Layout (Zero Horizontal Scroll!)
     ========================================================================== */
  .table-responsive {
    overflow: visible !important;
    border: none !important;
    background: transparent !important;
    padding: 0 10px 10px 10px !important;
  }

  .orders-table {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    border: none !important;
  }

  .orders-table thead {
    display: none !important;
  }

  .orders-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .orders-table tr.order-row {
    display: grid !important;
    grid-template-columns: 28px 1fr auto !important;
    grid-template-rows: auto auto auto auto auto auto !important;
    gap: 8px 10px !important;
    align-items: center !important;
    background: rgba(30, 41, 59, 0.45) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 14px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  [data-theme="light"] .orders-table tr.order-row {
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  }

  .col-check {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: none !important;
  }

  .col-id {
    display: none !important;
  }

  .col-number {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    border: none !important;
  }

  .col-number .order-id-cell {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  .col-number .order-number {
    font-size: 14.5px !important;
    font-weight: 800 !important;
  }

  .col-number .order-time {
    font-size: 11px !important;
  }

  .col-status {
    grid-column: 3 / 4 !important;
    grid-row: 1 / 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 !important;
    border: none !important;
  }

  .col-status .status-badge {
    font-size: 11px !important;
    padding: 3px 8px !important;
  }

  .col-customer {
    grid-column: 1 / 4 !important;
    grid-row: 2 / 3 !important;
    padding: 6px 0 !important;
    border-top: 1px dashed var(--border-color) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
  }

  .col-customer .customer-cell {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px 10px !important;
  }

  .col-customer .customer-name {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
  }

  .col-customer .customer-phone {
    font-size: 11.5px !important;
    color: var(--accent-primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .col-customer .customer-location {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .col-products {
    grid-column: 1 / 4 !important;
    grid-row: 3 / 4 !important;
    padding: 6px 0 !important;
    border-top: 1px dashed var(--border-color) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
  }

  .col-products .products-cell {
    max-width: 100% !important;
    width: 100% !important;
  }

  .col-products .product-item-summary {
    margin-bottom: 6px !important;
    gap: 8px !important;
  }

  .col-products .product-title-wrap {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .col-products .product-name-text {
    font-size: 12.5px !important;
  }

  .col-products .product-meta-row {
    flex-wrap: wrap !important;
    gap: 3px !important;
  }

  .col-gads {
    grid-column: 1 / 4 !important;
    grid-row: 4 / 5 !important;
    padding: 6px 8px !important;
    border-top: 1px dashed var(--border-color) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    background: rgba(37, 99, 235, 0.04) !important;
    border-radius: 4px !important;
  }

  [data-theme="light"] .col-gads {
    background: #f8fafc !important;
    border-top-color: #e2e8f0 !important;
  }

  .col-price {
    grid-column: 1 / 4 !important;
    grid-row: 5 / 6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 0 2px 0 !important;
    border-top: 1px dashed var(--border-color) !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
  }

  .col-price .price-cell {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 8px !important;
    width: 100% !important;
    justify-content: space-between !important;
  }

  .col-price .price-total {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #10b981 !important;
  }

  .col-price .payment-method {
    font-size: 11px !important;
    color: var(--text-dim) !important;
  }

  .col-actions {
    grid-column: 1 / 4 !important;
    grid-row: 6 / 7 !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 6px 0 0 0 !important;
    border: none !important;
  }

  .col-actions .row-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    align-items: center !important;
    width: 100% !important;
  }

  .col-actions .row-actions .btn {
    flex: 1 1 auto !important;
    min-width: 52px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 6px 4px !important;
    font-size: 11px !important;
    border-radius: var(--radius-sm) !important;
    white-space: nowrap !important;
  }

  .col-actions .row-actions .select-custom {
    flex: 1.1 1 auto !important;
    min-width: 60px !important;
    padding: 5px 6px !important;
    font-size: 11px !important;
    border-radius: var(--radius-sm) !important;
    max-width: none !important;
    text-align: center !important;
  }

  /* Floating Bulk Actions Bar (Above Bottom Nav) */
  .bulk-bar {
    position: fixed !important;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    left: 10px !important;
    right: 10px !important;
    margin: 0 !important;
    z-index: 998 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }

  .bulk-actions-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .bulk-actions-group .btn {
    width: 100% !important;
    justify-content: center !important;
    font-size: 12px !important;
    padding: 7px 8px !important;
  }

  /* Pagination Bar on Mobile */
  .pagination-bar {
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    text-align: center !important;
  }

  .pagination-controls {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 4px !important;
  }

  .pagination-controls .btn {
    min-height: 36px !important;
    padding: 6px 12px !important;
    font-size: 12.5px !important;
  }

  /* ==========================================================================
     Tracking Processor View Responsive
     ========================================================================== */
  .tracking-steps-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .match-action-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  .match-action-bar > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }

  #default-carrier-input {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #run-match-btn {
    width: 100% !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
    padding: 12px 14px !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
  }

  .match-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .match-stat-box {
    padding: 10px 12px !important;
  }

  .match-stat-val {
    font-size: 18px !important;
  }

  /* ==========================================================================
     User Guide Quick Navigation Responsive
     ========================================================================== */
  .guide-quick-nav {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 6px 4px !important;
    gap: 6px !important;
    scrollbar-width: none !important;
  }

  .guide-quick-nav::-webkit-scrollbar {
    display: none !important;
  }

  .guide-nav-pill {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 11.5px !important;
    padding: 6px 10px !important;
  }

  .guide-hero {
    padding: 18px 14px !important;
  }

  .guide-hero-title {
    font-size: 18px !important;
  }

  .guide-hero-subtitle {
    font-size: 12.5px !important;
  }

  .guide-hero-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .guide-search-wrapper {
    width: 100% !important;
    max-width: 100% !important;
  }

  .guide-feature-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .guide-table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }

  /* ==========================================================================
     Modal Cards & Dialogs Responsive Mobile (Sleek Bottom Sheet Experience)
     ========================================================================== */
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
    z-index: 1050 !important;
  }

  .modal-dialog,
  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 93vh !important;
    border-radius: 24px 24px 0 0 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.85) !important;
    animation: modalSlideUpMobile 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  /* Grab handle indicator at the top of modal on mobile */
  .modal-dialog::before,
  .modal-card::before {
    content: '';
    display: block;
    width: 42px;
    height: 4.5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 99px;
    margin: 10px auto -2px auto;
    flex-shrink: 0;
  }

  .modal-header {
    padding: 12px 18px !important;
    gap: 10px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
  }

  .modal-title {
    font-size: 15px !important;
    line-height: 1.35 !important;
    gap: 8px !important;
    flex: 1 !important;
  }

  .modal-title i {
    font-size: 1.1em !important;
  }

  .modal-close-btn,
  .modal-close {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    font-size: 14px !important;
  }

  .modal-body {
    padding: 14px 14px 18px 14px !important;
    max-height: calc(93vh - 120px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 12px !important;
  }

  /* Prevent iOS zoom on input focus */
  .modal-body input,
  .modal-body select,
  .modal-body textarea,
  .form-input,
  .select-custom {
    font-size: 16px !important;
  }

  /* Form grids collapse to 1 column on mobile */
  .modal-section-grid,
  .modal-body div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Detail blocks inside modal */
  .detail-block {
    padding: 12px 12px !important;
    border-radius: 12px !important;
  }

  .detail-title {
    font-size: 12px !important;
    margin-bottom: 8px !important;
  }

  .detail-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    padding: 5px 0 !important;
  }

  .detail-label {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
  }

  .detail-val {
    max-width: 100% !important;
    text-align: left !important;
    font-size: 13px !important;
  }

  /* Order details modal specific responsive tweaks */
  #order-detail-modal .modal-header.order-modal-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 12px 14px 10px 14px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  #order-detail-modal .order-modal-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }

  #order-detail-modal .order-modal-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    font-size: 15.5px !important;
    line-height: 1.3 !important;
  }

  #order-detail-modal .order-modal-title-row strong {
    font-size: 16.5px !important;
  }

  #order-detail-modal .order-modal-date {
    display: block !important;
    font-size: 11px !important;
    color: var(--text-dim) !important;
    line-height: 1.3 !important;
  }

  #order-detail-modal .order-header-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    margin: 0 0 0 auto !important;
  }

  /* Hide duplicate album & copy buttons in header on mobile to prevent squishing */
  #order-detail-modal .order-header-album-btn,
  #order-detail-modal .order-header-copy-btn {
    display: none !important;
  }

  #order-detail-modal .modal-close-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    position: static !important;
    margin: 0 !important;
  }

  #order-detail-modal .modal-body > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  #order-detail-modal .modal-body > div:first-child > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
  }

  #order-detail-modal #modal-status-select {
    width: 100% !important;
    height: 38px !important;
    font-size: 13px !important;
  }

  #order-detail-modal #modal-save-status-btn {
    width: 100% !important;
    height: 38px !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 13px !important;
  }

  #order-detail-modal .modal-section-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #order-detail-modal .detail-block {
    padding: 12px !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
  }

  #order-detail-modal .detail-title {
    font-size: 13px !important;
    margin-bottom: 8px !important;
  }

  #order-detail-modal .detail-row {
    padding: 6px 0 !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
  }

  #order-detail-modal .detail-label {
    font-size: 11px !important;
    color: var(--text-dim) !important;
  }

  #order-detail-modal .detail-val {
    font-size: 13px !important;
    width: 100% !important;
    word-break: break-word !important;
  }

  #order-detail-modal button[onclick*="openAddressValidatorModal"],
  #order-detail-modal #modal-gmaps-link {
    flex: 1 1 100% !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
  }

  #order-detail-modal #modal-copy-btn,
  #order-detail-modal #modal-print-btn,
  #order-detail-modal button[onclick*="syncCurrentModalOrderToGoogleSheet"] {
    flex: 1 1 100% !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  #order-detail-modal .detail-block > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  #order-detail-modal .detail-block > div:first-child > div:last-child {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  #order-detail-modal #btn-modal-view-all-gallery,
  #order-detail-modal button[onclick*="copyCurrentOrderGalleryLink"],
  #order-detail-modal button[onclick*="downloadCurrentOrderImagesZip"] {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  #order-detail-modal .table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 6px !important;
  }

  #order-detail-modal .modal-product-table {
    min-width: 460px !important;
    font-size: 12px !important;
  }

  #order-detail-modal .modal-product-table th,
  #order-detail-modal .modal-product-table td {
    padding: 8px 6px !important;
  }

  #order-detail-modal .timeline-list {
    max-height: 180px !important;
    overflow-y: auto !important;
  }

  #order-detail-modal #new-note-input {
    width: 100% !important;
    font-size: 12.5px !important;
  }

  #order-detail-modal #add-note-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 12.5px !important;
  }

  #order-detail-modal .modal-footer {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 14px 14px 14px !important;
    background: var(--bg-surface) !important;
    border-top: 1px solid var(--border-color) !important;
  }

  #order-detail-modal .modal-footer > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #order-detail-modal .modal-footer button {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
  }

  /* User filter bar in User Management Modal */
  .user-filter-bar {
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    padding-bottom: 6px !important;
    margin-bottom: 12px !important;
    scrollbar-width: none !important;
  }

  .user-filter-bar::-webkit-scrollbar {
    display: none !important;
  }

  .user-filter-pill {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
  }

  #user-management-modal .modal-body > div:first-child > div:last-child {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
  }

  #user-management-modal .modal-body > div:first-child button {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 11.5px !important;
    padding: 7px 8px !important;
  }

  /* Store connection modal responsive tweaks */
  #store-modal form > div:last-child {
    flex-direction: column !important;
    width: 100% !important;
  }

  #test-store-btn,
  #store-modal form button[type="submit"] {
    width: 100% !important;
    justify-content: center !important;
  }

  #saved-stores-list > div {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }

  #saved-stores-list > div > div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  #saved-stores-list button {
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-height: 36px !important;
  }

  #store-backup-section {
    padding: 12px !important;
  }

  #store-backup-section button {
    width: 100% !important;
    justify-content: center !important;
  }

  /* SMTP presets button grid */
  #smtp-config-modal .modal-body div[style*="gap: 8px"] {
    flex-wrap: wrap !important;
  }

  #smtp-config-modal .modal-body div[style*="gap: 8px"] button {
    flex: 1 1 30% !important;
    font-size: 11.5px !important;
    padding: 6px 8px !important;
    justify-content: center !important;
  }

  /* Modal Footer */
  .modal-footer {
    display: flex !important;
    gap: 8px !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) 16px !important;
  }

  .modal-footer .btn {
    flex: 1 !important;
    min-height: 42px !important;
    font-size: 14px !important;
    justify-content: center !important;
  }

  /* Toast notification on mobile: top-center or floating safe */
  #toast-container {
    top: 14px !important;
    bottom: auto !important;
    right: 12px !important;
    left: 12px !important;
    max-width: none !important;
    pointer-events: none !important;
    z-index: 2000 !important;
  }

  .toast {
    width: 100% !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
    font-size: 13px !important;
    padding: 10px 14px !important;
  }
}

/* Small Screen Phones (< 480px) */
@media (max-width: 480px) {
  .festive-effect-btns {
    grid-template-columns: repeat(1, 1fr) !important;
    gap: 5px !important;
  }
  .effect-toggle-btn {
    justify-content: flex-start !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    text-align: left !important;
  }
  .navbar-inner {
    padding: 0 8px !important;
    gap: 4px !important;
  }

  .brand-title {
    font-size: 13px !important;
  }

  .brand-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 12px !important;
  }

  .store-select-btn {
    max-width: 80px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
  }

  .navbar-actions {
    gap: 4px !important;
  }

  .btn-icon {
    width: 30px !important;
    height: 30px !important;
  }

  .user-avatar-circle {
    width: 26px !important;
    height: 26px !important;
  }

  .store-timezone-pill {
    display: none !important;
  }

  .user-profile-btn .user-role-badge {
  display: none !important;
}

.user-role-badge {
    display: none !important;
  }

  /* Keep 2x2 grid for filter action buttons */
  .filter-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
  }

  .stat-card {
    padding: 9px 10px !important;
  }

  .stat-value {
    font-size: 16px !important;
  }

  .stat-label {
    font-size: 9.5px !important;
  }

  .col-actions .row-actions .btn {
    padding: 4px 7px !important;
    font-size: 11px !important;
  }
}

/* Ultra-compact Phones (< 380px) */
@media (max-width: 380px) {
  .brand-title .badge-pro {
    display: none !important;
  }
  .store-select-btn {
    max-width: 68px !important;
  }
  #theme-toggle-btn {
    display: none !important;
  }
}

/* ==========================================================================
   PRODUCT LINKS & CLICKABLE THUMBNAILS
   ========================================================================== */
.product-title-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.product-title-link:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.product-ext-icon {
  font-size: 10.5px;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.product-title-link:hover .product-ext-icon {
  opacity: 1;
}

.product-thumb-container {
  position: relative;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.product-thumb-container:hover {
  transform: scale(1.1);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
  z-index: 5;
}

.product-thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-zoom-badge {
  position: absolute;
  bottom: 1px;
  right: 1px;
  font-size: 8.5px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  border-radius: 3px;
  padding: 1px 2px;
  line-height: 1;
  pointer-events: none;
}

.btn-outline-gallery {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-outline-gallery:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-album-action {
  color: #ec4899 !important;
  border-color: rgba(236, 72, 153, 0.35) !important;
  background: rgba(236, 72, 153, 0.08) !important;
}
.btn-album-action:hover {
  background: #ec4899 !important;
  color: #ffffff !important;
  border-color: #ec4899 !important;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.35) !important;
}

.order-album-text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #ec4899;
  text-decoration: none;
  background: rgba(236, 72, 153, 0.08);
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: fit-content;
}
.order-album-text-link:hover {
  background: #ec4899;
  color: #ffffff !important;
  border-color: #ec4899;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.3);
}

.btn-album-highlight {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.35) !important;
  transition: all 0.2s ease !important;
}
.btn-album-highlight:hover {
  opacity: 0.95 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.45) !important;
}

.btn-copy-album-link {
  color: #a5b4fc !important;
  border-color: rgba(165, 180, 252, 0.35) !important;
  background: rgba(99, 102, 241, 0.08) !important;
}
.btn-copy-album-link:hover {
  background: #6366f1 !important;
  color: #ffffff !important;
  border-color: #6366f1 !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35) !important;
}

/* ==========================================================================
   PRODUCT IMAGE GALLERY & LIGHTBOX VIEWER MODAL
   ========================================================================== */
.gallery-modal-dialog {
  max-width: 1100px;
  width: 95vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
}

.gallery-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gallery-modal-title {
  order: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.gallery-header-actions {
  order: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.gallery-close-btn {
  order: 3;
  margin-left: 8px;
  flex-shrink: 0;
}

.gallery-modal-body {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
  overflow-y: auto;
  padding: 20px 24px;
}

.gallery-viewer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-main-stage {
  position: relative;
  background: radial-gradient(circle at center, #1e293b 0%, #090d16 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  height: 430px;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.gallery-image-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  position: relative;
  user-select: none;
}

.gallery-image-box img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.65));
}

.gallery-image-box.zoomed {
  cursor: zoom-out;
  overflow: auto;
}

.gallery-image-box.zoomed img {
  transform: scale(1.85);
  max-width: none;
  max-height: none;
}

.gallery-zoom-hint {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.75);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  backdrop-filter: blur(6px);
  line-height: 1;
}

.gallery-nav-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
}

.gallery-nav-btn.prev {
  left: 12px;
}

.gallery-nav-btn.next {
  right: 12px;
}

.gallery-counter-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  z-index: 5;
}

.gallery-thumbs-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-thumbs-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-thumbs-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  scroll-behavior: smooth;
}

.gallery-thumbs-strip::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbs-strip::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.gallery-thumbs-strip::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.gallery-thumb-item {
  width: 66px;
  height: 66px;
  min-width: 66px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: #090d16;
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb-item:hover {
  border-color: #818cf8;
  transform: translateY(-2px);
}

.gallery-thumb-item.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.45);
  transform: translateY(-2px);
}

.gallery-thumb-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 9px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 4px;
  padding: 1px 4px;
  font-weight: 700;
}

/* Gallery Right Info Section */
.gallery-info-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gallery-product-header {
  background: var(--bg-tertiary);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.gallery-item-index-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.gallery-product-title {
  margin: 0 0 14px 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.45;
}

.gallery-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gallery-meta-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.gallery-meta-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.gallery-meta-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.gallery-meta-card-wide {
  grid-column: 1 / -1;
}

.gallery-meta-card .badge-cat,
.gallery-meta-card .badge-tag {
  font-size: 11px;
  padding: 2px 7px;
}

.gallery-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.gallery-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-attributes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.gallery-attr-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
}

.gallery-attr-name {
  font-weight: 700;
  color: #a5b4fc;
}

.gallery-attr-val {
  color: var(--text-main);
  font-weight: 600;
}

.gallery-extra-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-extra-thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  background: #090d16;
  transition: all 0.2s ease;
}

.gallery-extra-thumb:hover {
  border-color: var(--accent-primary);
  transform: scale(1.06);
}

.gallery-extra-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile Media Queries for Gallery Modal */
@media (max-width: 820px) {
  #product-gallery-modal .gallery-modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
  }

  #product-gallery-modal .modal-header.gallery-modal-header {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 12px 14px 10px 14px !important;
    gap: 8px !important;
    border-bottom: 1px solid var(--border-color) !important;
  }

  #product-gallery-modal .gallery-modal-title {
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 44px) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
  }

  #product-gallery-modal .gallery-title-main {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: var(--text-main) !important;
  }

  #product-gallery-modal .gallery-title-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #product-gallery-modal .gallery-title-badges {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  #product-gallery-modal #gallery-order-badge {
    font-size: 11.5px !important;
    padding: 2px 7px !important;
  }

  #product-gallery-modal #gallery-store-badge {
    font-size: 10.5px !important;
    padding: 1px 6px !important;
  }

  #product-gallery-modal .gallery-close-btn {
    order: 2 !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin: 0 0 0 auto !important;
    position: static !important;
  }

  #product-gallery-modal .gallery-header-actions {
    order: 3 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 4px !important;
  }

  #product-gallery-modal .gallery-btn-copy,
  #product-gallery-modal .gallery-btn-zip {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    justify-content: center !important;
    padding: 7px 8px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    gap: 5px !important;
  }

  .gallery-modal-body {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 12px 14px 20px 14px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .gallery-main-stage {
    height: 280px !important;
    min-height: 240px !important;
    border-radius: 12px !important;
  }

  .gallery-nav-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 20px !important;
  }

  .gallery-nav-btn.prev {
    left: 8px !important;
  }

  .gallery-nav-btn.next {
    right: 8px !important;
  }

  .gallery-counter-badge {
    top: 8px !important;
    right: 8px !important;
    font-size: 11px !important;
    padding: 3px 10px !important;
  }

  .gallery-zoom-hint {
    bottom: 8px !important;
    left: 8px !important;
    font-size: 10px !important;
    padding: 2px 7px !important;
  }

  .gallery-thumbs-container {
    gap: 6px !important;
  }

  .gallery-thumbs-label {
    font-size: 11.5px !important;
  }

  .gallery-thumbs-strip {
    gap: 8px !important;
    padding: 4px 2px 8px 2px !important;
  }

  .gallery-thumb-item {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    border-radius: 6px !important;
  }

  .gallery-info-section {
    gap: 12px !important;
  }

  .gallery-product-header {
    padding: 12px !important;
    border-radius: 8px !important;
  }

  .gallery-product-title {
    font-size: 14.5px !important;
    margin-bottom: 10px !important;
    line-height: 1.4 !important;
  }

  .gallery-action-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .gallery-action-buttons .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 12.5px !important;
  }

  .gallery-meta-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .gallery-meta-card {
    padding: 8px 10px !important;
    border-radius: 6px !important;
  }

  .gallery-meta-label {
    font-size: 10.5px !important;
  }

  .gallery-meta-val {
    font-size: 12px !important;
    word-break: break-word !important;
  }

  .gallery-card {
    padding: 12px !important;
    border-radius: 8px !important;
  }

  .gallery-card-title {
    font-size: 12px !important;
    margin-bottom: 8px !important;
  }

  #product-gallery-modal .modal-footer {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 14px 14px 14px !important;
    background: var(--bg-surface) !important;
  }

  #product-gallery-modal .modal-footer div[style*="font-size: 12px"] span:nth-child(2) {
    display: none !important;
  }

  #product-gallery-modal .modal-footer div[style*="font-size: 12px"] {
    font-size: 11px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #product-gallery-modal .modal-footer button {
    width: 100% !important;
    justify-content: center !important;
    padding: 9px 14px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 380px) {
  #product-gallery-modal .gallery-btn-copy,
  #product-gallery-modal .gallery-btn-zip {
    font-size: 11px !important;
    padding: 6px 4px !important;
    gap: 4px !important;
  }

  #product-gallery-modal .gallery-title-main {
    font-size: 14px !important;
  }
}

/* ==========================================================================
   Font Awesome 6 Global Integration & Helper Styles
   ========================================================================== */
.btn i,
.tab-btn i,
.auth-tab-btn i,
.filter-chip i,
.dropdown-item i {
  margin-right: 6px;
  vertical-align: -0.5px;
  font-size: 0.95em;
}

.btn-icon i,
.modal-close-btn i,
.password-toggle-btn i,
.theme-toggle-btn i,
.thumb-zoom-badge i {
  margin-right: 0 !important;
  vertical-align: middle;
}

.stat-icon i {
  font-size: 22px;
  color: #fff;
}

.login-logo-icon i {
  font-size: 28px;
  color: #fbbf24;
}

.dropzone-icon i {
  font-size: 40px;
  color: var(--accent-primary);
  margin-bottom: 10px;
}

.empty-icon i {
  font-size: 48px;
  color: var(--text-dim);
  opacity: 0.5;
  margin-bottom: 12px;
}

.store-select-btn i.fa-chevron-down,
.user-menu-btn i.fa-chevron-down {
  font-size: 10px;
  color: var(--text-dim);
  margin-left: 4px;
}

.password-toggle-btn i {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.password-toggle-btn:hover i {
  color: var(--text-main);
}

/* ==========================================================================
   USER GUIDE VIEW STYLES
   ========================================================================== */
.guide-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.guide-hero {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(168, 85, 247, 0.14) 50%, rgba(56, 189, 248, 0.12) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.guide-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.guide-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.guide-hero-title i {
  color: #fbbf24;
}

.guide-hero-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 820px;
  margin-bottom: 20px;
}

.guide-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.guide-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 480px;
  min-width: 260px;
}

.guide-search-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 13.5px;
  pointer-events: none;
}

.guide-search-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 38px;
  color: var(--text-main);
  font-size: 13.5px;
  transition: all 0.2s ease;
}

.guide-search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  outline: none;
}

/* Quick Nav Pills (Sticky on desktop, horizontal swipe on mobile) */
.guide-quick-nav {
  position: sticky;
  top: 70px;
  z-index: 20;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 28px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.guide-quick-nav::-webkit-scrollbar {
  display: none;
}

.guide-nav-pill {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
}

.guide-nav-pill:hover,
.guide-nav-pill.active {
  color: #fff;
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Guide Section Card */
.guide-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 24px;
  scroll-margin-top: 130px;
  transition: all 0.2s ease;
}

.guide-section:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.guide-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-section-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-section-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.guide-step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.guide-step-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.guide-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

.guide-step-content {
  flex: 1;
}

.guide-step-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.guide-step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Feature Grid */
.guide-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.guide-feature-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.guide-feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.guide-feature-icon {
  font-size: 20px;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.guide-feature-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.guide-feature-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Tip / Warning Alert in Guide */
.guide-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.55;
}

.guide-alert.tip {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.guide-alert.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.guide-alert.info {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.guide-alert-icon {
  font-size: 16px;
  margin-top: 1px;
  flex-shrink: 0;
}

/* Keyboard Table */
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}

.guide-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

.guide-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

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

.kbd-badge {
  display: inline-block;
  padding: 2px 7px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
}

/* FAQ Accordion */
.guide-faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--bg-tertiary);
  overflow: hidden;
}

.guide-faq-q {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.guide-faq-q:hover {
  background: rgba(255, 255, 255, 0.03);
}

.guide-faq-a {
  padding: 0 16px 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-copy-code-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #a5b4fc;
  margin-top: 6px;
}

/* Modal variant for Guide */
.guide-modal-dialog {
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .guide-hero {
    padding: 20px 16px;
  }
  .guide-hero-title {
    font-size: 20px;
  }
  .guide-section {
    padding: 16px;
  }
  .guide-step-card {
    padding: 12px;
  }
}

/* ==========================================================================
   GUIDE VISUAL MOCKUPS & INTERACTIVE VECTOR ILLUSTRATIONS
   ========================================================================== */
.guide-mockup {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  margin: 18px 0;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: all 0.25s ease;
}
.guide-mockup:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.2);
}
[data-theme="light"] .guide-mockup {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .guide-mockup:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 14px 35px rgba(99, 102, 241, 0.12);
}

.guide-mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  color: var(--text-dim);
}
[data-theme="light"] .guide-mockup-header {
  background: #f1f5f9;
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
}

.guide-mockup-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}
.guide-mockup-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.guide-mockup-dot.red { background: #ef4444; }
.guide-mockup-dot.yellow { background: #f59e0b; }
.guide-mockup-dot.green { background: #10b981; }

.guide-mockup-title {
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.guide-mockup-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.guide-mockup-body {
  padding: 16px;
  position: relative;
  overflow-x: auto;
}

.guide-mockup-caption {
  padding: 9px 14px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-theme="light"] .guide-mockup-caption {
  background: #f8fafc;
  border-top-color: rgba(0, 0, 0, 0.06);
  color: #64748b;
}

.guide-callout-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
  margin-right: 6px;
  flex-shrink: 0;
  vertical-align: middle;
}
.guide-callout-badge.green {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35);
}
.guide-callout-badge.amber {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}
.guide-callout-badge.pink {
  background: #ec4899;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.35);
}
.guide-callout-badge.blue {
  background: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.35);
}

.guide-diagram-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .guide-diagram-card {
  background: rgba(241, 245, 249, 0.6);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.03);
}

.guide-workflow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  margin: 8px 0;
}
.guide-workflow-step {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-width: 160px;
  max-width: 240px;
  flex: 1;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.guide-workflow-step-icon {
  font-size: 22px;
  margin-bottom: 6px;
  color: var(--accent-primary);
}
.guide-workflow-step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.guide-workflow-step-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}
.guide-workflow-arrow {
  color: var(--accent-primary);
  font-size: 18px;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .guide-workflow-arrow {
    transform: rotate(90deg);
    margin: 4px 0;
  }
}

/* ==========================================================================
   FEEDBACK & BUG REPORT SYSTEM (Ý KIẾN & SỬA LỖI APP)
   ========================================================================== */

/* Floating Feedback FAB */
.floating-feedback-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  z-index: 990;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  border: none;
  padding: 11px 18px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-feedback-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.6);
  filter: brightness(1.1);
}

.floating-feedback-fab:active {
  transform: translateY(0) scale(0.98);
}

.floating-feedback-fab i {
  font-size: 15px;
}

/* Navigation Tab Badge */
.feedback-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-left: 4px;
}

/* Hero Section */
.feedback-hero {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.feedback-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.feedback-hero-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.5;
}

/* Sub tabs inside view */
.feedback-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.feedback-subtab-btn {
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.feedback-subtab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.feedback-subtab-btn.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border-color: rgba(99, 102, 241, 0.35);
}

/* Stats Cards */
.feedback-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.fb-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fb-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.fb-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.fb-stat-icon.total { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.fb-stat-icon.pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.fb-stat-icon.investigating { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.fb-stat-icon.resolved { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.fb-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.fb-stat-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}

/* Filter bar */
.feedback-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.feedback-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip-btn {
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-chip-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.filter-chip-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* Feedback List Items */
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feedback-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.feedback-item-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.feedback-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.feedback-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Badges */
.fb-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
}

.fb-badge.type-bug { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.fb-badge.type-feature { background: rgba(147, 51, 234, 0.15); color: #c084fc; border: 1px solid rgba(147, 51, 234, 0.3); }
.fb-badge.type-ui { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.fb-badge.type-performance { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.fb-badge.type-other { background: rgba(100, 116, 139, 0.15); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.3); }

.fb-badge.sev-low { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.fb-badge.sev-normal { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.fb-badge.sev-high { background: rgba(245, 158, 11, 0.15); color: #fcd34d; font-weight: 800; }
.fb-badge.sev-critical { background: rgba(239, 68, 68, 0.2); color: #fca5a5; font-weight: 800; animation: pulse 2s infinite; }

.fb-badge.status-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.fb-badge.status-investigating { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.fb-badge.status-resolved { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.fb-badge.status-closed { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }

.feedback-meta-info {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 12px;
}

.feedback-item-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.4;
}

.feedback-item-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

/* Screenshot Preview in card */
.feedback-thumb-box {
  display: inline-block;
  position: relative;
  margin-top: 6px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  max-width: 240px;
  cursor: pointer;
}

.feedback-thumb-box img {
  display: block;
  max-width: 100%;
  max-height: 140px;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.feedback-thumb-box:hover img {
  transform: scale(1.05);
}

.feedback-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.feedback-thumb-box:hover .feedback-thumb-overlay {
  opacity: 1;
}

/* System info details drawer */
.feedback-sys-drawer {
  background: var(--bg-primary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Admin response block */
.feedback-admin-reply {
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid #10b981;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 13px;
}

.feedback-admin-reply-header {
  font-weight: 700;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

/* Admin Management bar inside card */
.feedback-admin-controls {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Feedback Form Styles */
.feedback-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  max-width: 900px;
  margin: 0 auto;
}

.type-segmented-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.type-segmented-btn {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.type-segmented-btn i {
  font-size: 20px;
}

.type-segmented-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: rgba(99, 102, 241, 0.3);
}

.type-segmented-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

/* Screenshot Upload & Paste Zone */
.screenshot-paste-zone {
  border: 2px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  background: rgba(99, 102, 241, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.screenshot-paste-zone:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.07);
}

.screenshot-paste-zone.dragover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.screenshot-preview-container {
  display: none;
  position: relative;
  margin-top: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  max-width: 400px;
}

.screenshot-preview-container img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  background: #000000;
  display: block;
}

.screenshot-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.screenshot-remove-btn:hover {
  transform: scale(1.1);
  background: #ef4444;
}

/* Mobile Responsiveness for Feedback */
@media (max-width: 768px) {
  .floating-feedback-fab {
    bottom: 18px;
    left: 18px;
    right: auto;
    padding: 10px 14px;
    font-size: 12px;
  }
  .feedback-hero {
    padding: 18px 16px;
  }
  .feedback-hero-title {
    font-size: 18px;
  }
  .feedback-form-card {
    padding: 18px 16px;
  }
  .type-segmented-group {
    grid-template-columns: repeat(2, 1fr);
  }
  .feedback-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==================== ADDRESS VALIDATION & GOOGLE MAPS ==================== */
.badge-address-eval {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2.5px 8px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.badge-address-eval.valid {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.38);
}
.badge-address-eval.valid:hover {
  background: rgba(16, 185, 129, 0.24);
  border-color: #10b981;
  transform: translateY(-1px);
}

.badge-address-eval.invalid {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.45);
}
.badge-address-eval.invalid:hover {
  background: rgba(239, 68, 68, 0.26);
  border-color: #ef4444;
  transform: translateY(-1px);
}

.badge-address-eval.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.badge-address-eval.warning:hover {
  background: rgba(245, 158, 11, 0.26);
  border-color: #fbbf24;
  transform: translateY(-1px);
}

.btn-check-address-chip {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.25;
  white-space: nowrap;
}

.btn-check-address-chip:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}

.link-gmaps-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.link-gmaps-icon:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
}

.address-status-banner {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid transparent;
}

.address-status-banner.status-exact {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.address-status-banner.status-good {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.address-status-banner.status-approximate {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.address-status-banner.status-not_found {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ef4444;
}

.address-status-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.address-status-content {
  flex: 1;
}

.address-status-title {
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 4px;
}

.address-status-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.address-warnings-list {
  margin-top: 10px;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: #fbbf24;
}

.address-verify-map-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  margin-bottom: 16px;
  min-height: 220px;
}

.address-verify-map-wrap iframe {
  width: 100%;
  height: 230px;
  border: none;
  display: block;
}

.address-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
  font-size: 12.5px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.address-details-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.address-details-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.address-details-val {
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}








/* ==========================================================================
   FESTIVE (GIÁNG SINH & TẾT) COUNTDOWN & FALLING PARTICLES STYLES
   ========================================================================== */

/* Fullscreen Canvas for falling snow/petals */
#festive-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
  display: block;
}

/* Navbar Festive Pill (Desktop) */
.festive-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(239, 68, 68, 0.12) 50%, rgba(245, 158, 11, 0.14) 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  white-space: nowrap;
}

.festive-countdown-pill:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(239, 68, 68, 0.22) 50%, rgba(245, 158, 11, 0.24) 100%);
  border-color: rgba(239, 68, 68, 0.65);
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(239, 68, 68, 0.25);
}

.festive-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.festive-pill-tag.tag-xmas {
  color: #6ee7b7;
}

.festive-pill-tag.tag-xmas strong {
  color: #34d399;
  font-weight: 800;
}

.festive-pill-tag.tag-newyear {
  color: #7dd3fc;
}

.festive-pill-tag.tag-newyear strong {
  color: #38bdf8;
  font-weight: 800;
}

.festive-pill-tag.tag-tet {
  color: #fca5a5;
}

.festive-pill-tag.tag-tet strong {
  color: #fbbf24;
  font-weight: 800;
}

.festive-pill-sep {
  opacity: 0.4;
  color: var(--text-dim);
  font-size: 10px;
}

[data-theme="light"] .festive-countdown-pill {
  background: linear-gradient(135deg, #ecfdf5 0%, #fff1f2 50%, #fef3c7 100%);
  border-color: #f87171;
}

[data-theme="light"] .festive-pill-tag.tag-xmas {
  color: #047857;
}

[data-theme="light"] .festive-pill-tag.tag-xmas strong {
  color: #059669;
}

[data-theme="light"] .festive-pill-tag.tag-newyear {
  color: #0284c7;
}

[data-theme="light"] .festive-pill-tag.tag-newyear strong {
  color: #0369a1;
}

[data-theme="light"] .festive-pill-tag.tag-tet {
  color: #b91c1c;
}

[data-theme="light"] .festive-pill-tag.tag-tet strong {
  color: #d97706;
}

/* Badges Group in Stats Overview Bar */
.festive-badges-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.festive-dashboard-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  white-space: nowrap;
}

.festive-dashboard-badge:hover {
  transform: translateY(-1px);
}

/* Xmas Badge */
.festive-dashboard-badge.badge-xmas {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(14, 165, 233, 0.15) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  animation: xmasPulse 3.5s infinite ease-in-out;
}

.festive-dashboard-badge.badge-xmas:hover {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.25);
  color: #ffffff;
}

.festive-dashboard-badge.badge-xmas strong {
  color: #34d399;
  font-weight: 800;
}

[data-theme="light"] .festive-dashboard-badge.badge-xmas {
  background: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 100%);
  border-color: #34d399;
  color: #065f46;
}

[data-theme="light"] .festive-dashboard-badge.badge-xmas strong {
  color: #059669;
}

/* New Year (Tết Dương Lịch) Badge */
.festive-dashboard-badge.badge-newyear {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  animation: newyearPulse 3.5s infinite ease-in-out 0.85s;
}

.festive-dashboard-badge.badge-newyear:hover {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 3px 12px rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

.festive-dashboard-badge.badge-newyear strong {
  color: #38bdf8;
  font-weight: 800;
}

[data-theme="light"] .festive-dashboard-badge.badge-newyear {
  background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
  border-color: #38bdf8;
  color: #0369a1;
}

[data-theme="light"] .festive-dashboard-badge.badge-newyear strong {
  color: #0284c7;
}

/* Tết Badge */
.festive-dashboard-badge.badge-tet {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  animation: tetPulse 3.5s infinite ease-in-out 1.75s;
}

.festive-dashboard-badge.badge-tet:hover {
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 3px 12px rgba(239, 68, 68, 0.25);
  color: #ffffff;
}

.festive-dashboard-badge.badge-tet strong {
  color: #fbbf24;
  font-weight: 800;
}

[data-theme="light"] .festive-dashboard-badge.badge-tet {
  background: linear-gradient(135deg, #fff1f2 0%, #fef3c7 100%);
  border-color: #f87171;
  color: #991b1b;
}

[data-theme="light"] .festive-dashboard-badge.badge-tet strong {
  color: #dc2626;
}

@keyframes xmasPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.15); }
  50% { box-shadow: 0 0 8px 2px rgba(16, 185, 129, 0.3); }
}

@keyframes newyearPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.15); }
  50% { box-shadow: 0 0 8px 2px rgba(56, 189, 248, 0.3); }
}

@keyframes tetPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.15); }
  50% { box-shadow: 0 0 8px 2px rgba(245, 158, 11, 0.3); }
}

/* Festive Modal Card */
.festive-modal-card {
  border-top: 4px solid #ef4444;
  background: var(--bg-card);
  max-width: 540px;
}

.festive-modal-card .modal-body {
  max-height: calc(90vh - 120px);
  overflow-y: auto;
}

.festive-modal-card.theme-xmas {
  border-top-color: #10b981;
}

.festive-modal-card.theme-newyear {
  border-top-color: #38bdf8;
}

.festive-modal-card.theme-tet {
  border-top-color: #ef4444;
}

.festive-modal-header {
  border-bottom: 1px solid var(--border-color);
}

/* Tabs: Xmas / New Year / Tết / Cutoff */
.festive-tabs-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}

.festive-tab-btn {
  padding: 8px 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.festive-tab-btn.active {
  background: var(--bg-tertiary);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#tab-btn-xmas.active {
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

#tab-btn-newyear.active {
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

#tab-btn-tet.active {
  color: #fbbf24;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Banner Box */
.festive-banner-box {
  padding: 16px 14px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.3s ease;
  margin-bottom: 18px;
}

.festive-banner-box.theme-xmas {
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.18) 0%, rgba(14, 165, 233, 0.08) 70%, transparent 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.festive-banner-box.theme-newyear {
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.2) 0%, rgba(168, 85, 247, 0.1) 70%, transparent 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.festive-banner-box.theme-tet {
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.18) 0%, rgba(245, 158, 11, 0.08) 70%, transparent 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.festive-tagline {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.festive-banner-box.theme-xmas .festive-tagline { color: #6ee7b7; }
.festive-banner-box.theme-newyear .festive-tagline { color: #7dd3fc; }
.festive-banner-box.theme-tet .festive-tagline { color: #fbbf24; }

.festive-main-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 3px;
}

.festive-banner-box.theme-xmas .festive-main-title { color: #34d399; }
.festive-banner-box.theme-newyear .festive-main-title { color: #38bdf8; }
.festive-banner-box.theme-tet .festive-main-title { color: #f87171; }

.festive-sub-text {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* 4 Clock Boxes */
.festive-clock-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 20px 0;
}

.festive-clock-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 8px;
  min-width: 68px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.festive-clock-box:hover {
  transform: translateY(-2px);
}

.festive-clock-num {
  font-size: 26px;
  font-weight: 800;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.1;
  color: var(--text-main);
}

.festive-banner-box.theme-xmas ~ .festive-clock-grid .festive-clock-num {
  color: #34d399;
}

.festive-banner-box.theme-newyear ~ .festive-clock-grid .festive-clock-num {
  color: #38bdf8;
}

.festive-banner-box.theme-tet ~ .festive-clock-grid .festive-clock-num {
  color: #fbbf24;
}

.festive-clock-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.festive-clock-sep {
  font-size: 20px;
  font-weight: 800;
  opacity: 0.6;
  margin-top: -10px;
}

/* Screen Effect Control Bar */
.festive-effect-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.festive-effect-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.festive-effect-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  font-weight: 600;
}

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

.festive-effect-btns.festive-grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

.effect-toggle-btn {
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.effect-toggle-btn:hover {
  background: var(--border-color);
  color: var(--text-main);
}

.effect-toggle-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

#btn-effect-xmas.active {
  background: #10b981;
  border-color: #10b981;
}

#btn-effect-tet.active {
  background: #ef4444;
  border-color: #ef4444;
}

#btn-effect-off.active {
  background: #64748b;
  border-color: #64748b;
}

/* Cut-off Badge in Dashboard Bar */
.festive-dashboard-badge.badge-cutoff {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(249, 115, 22, 0.18) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  animation: cutoffPulse 3.5s infinite ease-in-out;
}

.festive-dashboard-badge.badge-cutoff:hover {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.3);
  color: #ffffff;
}

.festive-dashboard-badge.badge-cutoff strong {
  color: #fbbf24;
  font-weight: 800;
}

.festive-dashboard-badge.badge-cutoff.urgent {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(245, 158, 11, 0.25) 100%);
  border-color: #ef4444;
  color: #fca5a5;
  animation: cutoffUrgentPulse 1.4s infinite ease-in-out;
}

.festive-dashboard-badge.badge-cutoff.urgent strong {
  color: #ef4444;
}

.festive-dashboard-badge.badge-cutoff.passed {
  background: rgba(100, 116, 139, 0.2);
  border-color: rgba(100, 116, 139, 0.4);
  color: #94a3b8;
  animation: none;
}

.festive-dashboard-badge.badge-cutoff.passed strong {
  color: #cbd5e1;
}

@keyframes cutoffPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.15); }
  50% { box-shadow: 0 0 8px 2px rgba(245, 158, 11, 0.3); }
}

@keyframes cutoffUrgentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
  50% { box-shadow: 0 0 10px 3px rgba(239, 68, 68, 0.6); }
}

[data-theme="light"] .festive-dashboard-badge.badge-cutoff {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  border-color: #f59e0b;
  color: #92400e;
}

[data-theme="light"] .festive-dashboard-badge.badge-cutoff strong {
  color: #d97706;
}

[data-theme="light"] .festive-dashboard-badge.badge-cutoff.urgent {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

[data-theme="light"] .festive-dashboard-badge.badge-cutoff.urgent strong {
  color: #dc2626;
}

/* Cutoff tag in Navbar Pill */
.festive-pill-tag.tag-cutoff {
  color: #f59e0b;
}

.festive-pill-tag.tag-cutoff strong {
  color: #fbbf24;
}

[data-theme="light"] .festive-pill-tag.tag-cutoff {
  color: #b45309;
}

[data-theme="light"] .festive-pill-tag.tag-cutoff strong {
  color: #d97706;
}

/* Modal Cutoff Tab & Banner */
#tab-btn-cutoff.active {
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.festive-modal-card.theme-cutoff {
  border-top-color: #f59e0b;
}

.festive-banner-box.theme-cutoff {
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22) 0%, rgba(239, 68, 68, 0.1) 70%, transparent 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.festive-banner-box.theme-cutoff .festive-tagline { color: #f59e0b; }
.festive-banner-box.theme-cutoff .festive-main-title { color: #fbbf24; }

.festive-banner-box.theme-cutoff ~ .festive-clock-grid .festive-clock-num {
  color: #fbbf24;
}

.cutoff-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 8px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.cutoff-status-pill.urgent {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.cutoff-status-pill.passed {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.4);
}

.cutoff-status-pill.inactive {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  border-color: var(--border-color);
}

/* Prevent children inside festive modal from collapsing in flex layout */
.festive-modal-card .modal-body > * {
  flex-shrink: 0 !important;
}

/* Dedicated Cutoff Config Card */
.cutoff-config-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: visible;
  flex-shrink: 0 !important;
  text-align: left;
}

.cutoff-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.1);
  border-bottom: 1px solid var(--border-color);
  font-size: 12.5px;
  font-weight: 700;
  color: #f59e0b;
}

.cutoff-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cutoff-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cutoff-field-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.cutoff-text-input,
.cutoff-date-input,
.cutoff-time-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
  color-scheme: dark !important;
  cursor: pointer;
}

[data-theme="light"] .cutoff-text-input,
[data-theme="light"] .cutoff-date-input,
[data-theme="light"] .cutoff-time-input {
  color-scheme: light !important;
}

.cutoff-text-input:focus,
.cutoff-date-input:focus,
.cutoff-time-input:focus {
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.cutoff-date-input::-webkit-calendar-picker-indicator,
.cutoff-time-input::-webkit-calendar-picker-indicator {
  cursor: pointer !important;
  filter: invert(0.85) sepia(100%) saturate(300%) hue-rotate(5deg) brightness(1.2) !important;
  opacity: 0.95;
  padding: 3px;
}

[data-theme="light"] .cutoff-date-input::-webkit-calendar-picker-indicator,
[data-theme="light"] .cutoff-time-input::-webkit-calendar-picker-indicator {
  filter: none !important;
}

/* ==================== INTERACTIVE CUTOFF CALENDAR ==================== */
.cutoff-calendar-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  box-sizing: border-box;
}

.cutoff-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .cutoff-cal-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.cutoff-cal-month-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.2px;
}

[data-theme="light"] .cutoff-cal-month-title {
  color: #d97706;
}

.cutoff-cal-nav-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
}

.cutoff-cal-nav-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #f59e0b;
}

.cutoff-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.cutoff-cal-weekdays span.sun {
  color: #f87171;
}

.cutoff-cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cutoff-cal-day {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  height: 32px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  padding: 0;
  user-select: none;
}

.cutoff-cal-day:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.cutoff-cal-day.today {
  border-color: rgba(245, 158, 11, 0.6);
  color: #f59e0b;
  font-weight: 700;
  position: relative;
}

.cutoff-cal-day.today::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f59e0b;
}

.cutoff-cal-day.selected {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #1e293b !important;
  font-weight: 800 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  transform: scale(1.05);
}

.cutoff-cal-day.other-month {
  opacity: 0.3;
  color: var(--text-dim);
}

.cutoff-cal-day.past:not(.selected) {
  opacity: 0.5;
}

/* Selected date summary bar */
.cutoff-cal-selected-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}

.cutoff-cal-selected-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
}

.cutoff-cal-selected-info strong {
  color: #fbbf24;
}

[data-theme="light"] .cutoff-cal-selected-info strong {
  color: #d97706;
}

/* Quick time pills */
.cutoff-quick-hours-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cutoff-quick-hours-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cutoff-quick-time-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.cutoff-time-pill {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cutoff-time-pill:hover {
  border-color: #f59e0b;
  color: #fbbf24;
}

.cutoff-time-pill.active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0f172a;
  font-weight: 700;
}

.cutoff-custom-time-wrap {
  display: inline-flex;
  align-items: center;
}

.cutoff-custom-time-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 11.5px;
  cursor: pointer;
  outline: none;
  height: 26px;
  box-sizing: border-box;
}

.cutoff-custom-time-input:focus {
  border-color: #f59e0b;
}

.cutoff-live-preview {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  margin-top: 4px;
}

/* Badge in setup mode */
.festive-dashboard-badge.badge-cutoff.setup-mode {
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  animation: none;
}
.festive-dashboard-badge.badge-cutoff.setup-mode strong {
  color: #fbbf24;
  font-weight: 700;
}
.festive-dashboard-badge.badge-cutoff.setup-mode:hover {
  background: rgba(245, 158, 11, 0.25);
  border-style: solid;
}

.cutoff-presets-wrapper {
  margin-top: 2px;
}

.cutoff-presets-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 5px;
  font-weight: 500;
}

.cutoff-presets-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.cutoff-preset-btn {
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cutoff-preset-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  transform: translateY(-1px);
}

.cutoff-buttons-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.cutoff-save-btn {
  flex: 1;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.cutoff-save-btn:hover {
  filter: brightness(1.1);
}

.cutoff-clear-btn {
  padding: 7px 12px;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

.cutoff-clear-btn:hover {
  background: rgba(239, 68, 68, 0.12) !important;
}

/* Expanded Holiday Effects Categories & Active Styles */
.festive-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin: 10px 0 6px 0;
  text-align: left;
}

.festive-off-row {
  margin-top: 10px;
}

.effect-toggle-btn.off-btn {
  width: 100%;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
}

#btn-effect-xmas_snow.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}

#btn-effect-xmas_blizzard.active {
  background: #4f46e5;
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(129, 140, 248, 0.35);
}

#btn-effect-xmas_gifts.active {
  background: #059669;
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(52, 211, 153, 0.35);
}

#btn-effect-newyear_confetti.active {
  background: #db2777;
  border-color: #f472b6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(244, 114, 182, 0.35);
}

#btn-effect-newyear_stars.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}

#btn-effect-newyear_balloons.active {
  background: #ea580c;
  border-color: #fb923c;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(251, 146, 60, 0.35);
}

#btn-effect-tet_flowers.active {
  background: #e11d48;
  border-color: #fb7185;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(251, 113, 133, 0.35);
}

#btn-effect-tet_lucky.active {
  background: #d97706;
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.35);
}

#btn-effect-tet_lanterns.active {
  background: #b91c1c;
  border-color: #f87171;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(248, 113, 113, 0.35);
}

#btn-effect-tet_fireworks.active {
  background: #9333ea;
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(192, 132, 252, 0.35);
}

#btn-effect-off.active {
  background: #475569;
  border-color: #64748b;
  color: #ffffff;
}

/* Wish Box */
.festive-wish-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  text-align: left;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-main);
}

.festive-wish-icon {
  font-size: 26px;
  flex-shrink: 0;
}

/* Mobile Responsiveness for Festive UI */
@media (max-width: 768px) {
  .festive-badges-group {
    gap: 4px !important;
  }

  .festive-dashboard-badge {
    font-size: 10.5px !important;
    padding: 2.5px 7px !important;
  }

  .cutoff-presets-btns {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 5px !important;
  }

  .festive-tabs-wrapper {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .festive-effect-btns {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .festive-effect-btns > button:last-child:nth-child(odd) {
    grid-column: span 2 !important;
  }

  .effect-toggle-btn {
    font-size: 11px !important;
    padding: 7px 5px !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.25 !important;
  }

  .festive-tab-btn {
    font-size: 11.5px !important;
    padding: 7px 4px !important;
  }

  .festive-dashboard-badge strong {
    font-size: 11.5px !important;
  }

  .festive-clock-grid {
    gap: 4px !important;
  }

  .festive-clock-box {
    min-width: 52px !important;
    padding: 8px 4px !important;
  }

  .festive-clock-num {
    font-size: 19px !important;
  }

  .festive-clock-lbl {
    font-size: 8.5px !important;
  }

  .festive-main-title {
    font-size: 18px !important;
  }
}


/* Hide Festive Pill from top navbar on Laptop/Tablet (<= 1536px) */
@media (max-width: 1536px) {
  .festive-countdown-pill,
  #navbar-festive-pill {
    display: none !important;
  }
}


/* ==========================================================================
   MOBILE RESPONSIVE REFINEMENTS (<= 768px / <= 480px / <= 380px)
   Fixes horizontal overflow, grid symmetry, touch targets, banners & modals
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: clip !important;
    max-width: 100vw !important;
  }

  .app-container {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 0 10px calc(84px + env(safe-area-inset-bottom, 0px)) 10px !important;
    overflow-x: clip !important;
  }

  .main-card {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Soften falling festive overlay on mobile so text & buttons remain readable */
  #festive-canvas {
    opacity: 0.32 !important;
  }

  /* Compact mobile store selector badge so error state never crushes text */
  .store-select-btn {
    max-width: 138px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding: 5px 8px !important;
    font-size: 11.5px !important;
  }

  /* Store Alert / Error / No-Store Banners */
  .store-alert-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px 14px !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .store-alert-bar .alert-content {
    min-width: 0 !important;
    width: 100% !important;
    word-break: break-word !important;
  }

  .store-alert-bar > button,
  .store-alert-bar > div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .store-alert-bar > button,
  .store-alert-bar > div:last-child .btn {
    flex: 1 1 135px !important;
    justify-content: center !important;
    min-height: 36px !important;
    font-size: 12px !important;
  }

  /* Orders Controls Bar: full-width search + symmetric 2-column action buttons & filters */
  .controls-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .controls-bar .search-box-wrapper,
  #match-results-container .search-box-wrapper {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .controls-bar .search-input {
    height: 38px !important;
    font-size: 14px !important;
    padding: 8px 12px 8px 34px !important;
  }

  #btn-open-bulk-filter,
  #btn-open-id-converter {
    flex: 1 1 calc(50% - 4px) !important;
    width: calc(50% - 4px) !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: auto !important;
    padding: 7px 8px !important;
    font-size: 11.5px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
    gap: 5px !important;
  }

  /* Equal-width 2-column filter grid (minmax(0,1fr) prevents <select> widening col 2) */
  .filter-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .filter-actions > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .filter-actions .select-custom {
    min-height: 36px !important;
    height: 36px !important;
    padding: 6px 8px !important;
    font-size: 11.5px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .filter-actions .select-all-store-label,
  .filter-actions .btn,
  .filter-actions #export-csv-btn {
    min-height: 36px !important;
    height: auto !important;
    padding: 6px 8px !important;
    font-size: 11.5px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* Orders Mobile Card: fix right-edge clipping & squished order number/status */
  .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .orders-table,
  .orders-table tbody {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .orders-table tbody tr {
    grid-template-columns: 26px minmax(0, 1fr) auto !important;
    column-gap: 8px !important;
    row-gap: 8px !important;
    padding: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .col-number {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .col-number .order-id-cell {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .col-status {
    min-width: 0 !important;
    max-width: 130px !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    text-align: right !important;
  }

  .col-status .status-badge,
  .col-status .missing-tracking-pill {
    max-width: 100% !important;
    white-space: nowrap !important;
    font-size: 10.5px !important;
    padding: 3px 7px !important;
  }

  .col-customer,
  .col-products,
  .col-price,
  .col-actions {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .product-card-mini,
  .order-products-stack {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .col-actions .row-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .col-actions .row-actions > * {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 36px !important;
    font-size: 11.5px !important;
  }

  .col-actions .row-actions .select-custom {
    grid-column: 1 / -1 !important;
    text-align: center !important;
  }

  /* Floating Bulk Actions Bar (8 buttons on mobile without vertical/horizontal overflow) */
  .bulk-bar {
    max-height: 42vh !important;
    overflow-y: auto !important;
    padding: 10px 12px !important;
    gap: 8px !important;
  }

  .bulk-bar .bulk-info {
    font-size: 12px !important;
    gap: 6px !important;
  }

  .bulk-bar .bulk-actions-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .bulk-bar .bulk-actions-group > span {
    flex: 1 1 100% !important;
    margin: 2px 0 0 0 !important;
    font-size: 11px !important;
  }

  .bulk-bar .bulk-actions-group .btn {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Modals: General Mobile Container & Scroll Safety */
  .modal-card,
  .modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    max-height: 92vh !important;
    overflow-x: hidden !important;
  }

  .modal-header {
    padding: 12px 14px !important;
    gap: 8px !important;
  }

  .modal-title {
    font-size: 14.5px !important;
    line-height: 1.3 !important;
    flex-wrap: wrap !important;
    min-width: 0 !important;
  }

  .modal-footer {
    padding: 10px 14px !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
    position: relative !important;
    z-index: 2 !important;
  }

  /* Google Sheet Modal Mobile Fixes */
  .gsheet-modal-tabs {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 0 12px 10px 12px !important;
    margin-top: 8px !important;
  }

  .gsheet-modal-tabs .btn {
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.25 !important;
    font-size: 11.5px !important;
    padding: 8px 6px !important;
    min-height: 38px !important;
    justify-content: center !important;
  }

  #gsheet-status-dot {
    flex-shrink: 0 !important;
  }

  #google-sheet-modal .form-label {
    flex-wrap: wrap !important;
    gap: 4px !important;
    font-size: 12.5px !important;
  }

  #google-sheet-modal .select-custom,
  #google-sheet-modal .input-custom,
  #id-converter-modal .select-custom,
  #bulk-order-search-modal .select-custom {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
  }

  #google-sheet-modal .modal-footer .btn,
  #btn-sync-all-orders-gsheet,
  #btn-sync-all-stores-gsheet,
  #btn-sync-current-orders-gsheet {
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.3 !important;
    min-height: 38px !important;
    justify-content: center !important;
  }

  #gsheet-bulk-progress-box > div:first-child {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  #gsheet-appscript-textarea {
    height: 180px !important;
    font-size: 11px !important;
  }

  /* ID Converter Modal: stack select rows cleanly without overflow */
  #id-converter-modal .modal-body > div:nth-child(4) {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #id-converter-modal .modal-body > div:nth-child(4) > div {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #id-converter-modal .modal-body > div:nth-child(4) > div > div {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #btn-submit-id-conv {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Bulk Order Search Modal Footer */
  #bulk-order-search-modal .modal-footer > div {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  #bulk-order-search-modal .modal-footer .btn {
    flex: 1 1 130px !important;
    justify-content: center !important;
  }

  /* Tracking View Mobile Refinements */
  #view-tracking .step-card {
    padding: 14px !important;
  }

  #view-tracking #default-carrier-input {
    width: 100% !important;
  }

  #view-tracking #run-match-btn {
    width: 100% !important;
    font-size: 13.5px !important;
    padding: 10px 14px !important;
    white-space: normal !important;
  }

  #view-tracking #btn-fetch-processing-notracking,
  #view-tracking #btn-fetch-all-processing {
    flex: 1 1 100% !important;
  }

  /* Feedback & Login Mobile Refinements */
  .login-overlay {
    padding: 12px !important;
    align-items: flex-start !important;
    overflow-y: auto !important;
  }

  .login-card {
    padding: 20px 16px !important;
    margin: auto !important;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 14px !important;
  }

  .badge-pro {
    display: none !important;
  }

  .store-select-btn {
    max-width: 108px !important;
  }

  #btn-open-bulk-filter,
  #btn-open-id-converter {
    font-size: 11px !important;
    padding: 7px 6px !important;
  }

  .stats-grid {
    gap: 8px !important;
  }

  .stat-card {
    padding: 12px !important;
  }

  .toast-container {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .toast {
    max-width: 100% !important;
    width: 100% !important;
  }
}

@media (max-width: 375px) {
  #btn-open-bulk-filter,
  #btn-open-id-converter {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   Duplicate Order ID / Order Number Row Highlighting (Red)
   ========================================================================== */
tr.duplicate-order-row,
tr.duplicate-order-row td {
  background-color: rgba(239, 68, 68, 0.16) !important;
  border-bottom-color: rgba(239, 68, 68, 0.35) !important;
}

tr.duplicate-order-row:hover td {
  background-color: rgba(239, 68, 68, 0.25) !important;
}

tr.duplicate-order-row td:first-child {
  box-shadow: inset 4px 0 0 #ef4444;
}

@media (max-width: 768px) {
  .orders-table tbody tr.duplicate-order-row {
    background-color: rgba(239, 68, 68, 0.16) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    border-left: 4px solid #ef4444 !important;
  }
  .orders-table tbody tr.duplicate-order-row td:first-child {
    box-shadow: none;
  }
}

[data-theme="light"] tr.duplicate-order-row,
[data-theme="light"] tr.duplicate-order-row td {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border-bottom-color: #fca5a5 !important;
}

[data-theme="light"] tr.duplicate-order-row:hover td {
  background-color: #fecaca !important;
}

.dup-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.22);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
  margin-left: 4px;
  vertical-align: middle;
  white-space: nowrap;
}

[data-theme="light"] .dup-badge {
  background: #fecaca;
  color: #991b1b;
  border-color: #f87171;
}

.compact-preview-table-wrap {
  max-height: 250px;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
}

[data-theme="light"] .compact-preview-table-wrap {
  background: #ffffff;
}

.compact-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.compact-preview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 700;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.compact-preview-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
}

/* ==========================================================================
   Best-Selling Products (Best Sale) Panel & Badges
   ========================================================================== */
.best-sellers-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
  transition: var(--transition);
}

.best-sellers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(245, 158, 11, 0.04);
}

.best-sellers-panel.collapsed .best-sellers-header {
  border-bottom: none;
}

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

.best-sellers-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.best-sellers-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.best-sellers-period-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.best-sellers-subtitle {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.best-sellers-subtitle strong {
  color: var(--text-main);
}

.best-sellers-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.best-sellers-select {
  padding: 5px 10px !important;
  font-size: 12px !important;
  min-height: 30px;
}

.best-sellers-body {
  padding: 14px 18px 16px;
}

.best-sellers-panel.collapsed .best-sellers-body {
  display: none;
}

.best-sellers-loading,
.best-sellers-empty {
  text-align: center;
  padding: 22px 12px;
  color: var(--text-dim);
  font-size: 13px;
}

.best-sellers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.best-seller-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.best-seller-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: var(--shadow-sm);
}

.best-seller-card.is-active-filter {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.best-seller-card.rank-1 {
  border-color: rgba(251, 191, 36, 0.45);
}

.best-seller-top-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.best-seller-rank {
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.best-seller-rank.rank-1 {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}

.best-seller-rank.rank-2 {
  background: linear-gradient(135deg, #cbd5e1, #64748b);
  color: #fff;
  border-color: transparent;
}

.best-seller-rank.rank-3 {
  background: linear-gradient(135deg, #f97316, #b45309);
  color: #fff;
  border-color: transparent;
}

.best-seller-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.best-seller-info {
  flex: 1;
  min-width: 0;
}

.best-seller-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.35;
}

.best-seller-name:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.best-seller-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-dim);
}

.best-seller-qty-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.best-seller-card.rank-1 .best-seller-qty-pill {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.best-seller-progress-wrap {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}

.best-seller-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  transition: width 0.35s ease;
}

.best-seller-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.best-seller-stats-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.best-seller-filter-btn {
  padding: 2px 8px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
}

.best-sellers-note {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Best Sale Badge inside Orders Table Line Items */
.badge-bestsale {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 1.25;
}

.badge-bestsale.top-1 {
  color: #fef3c7;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(239, 68, 68, 0.85));
  border-color: rgba(251, 191, 36, 0.6);
}

.badge-bestsale.normal {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .best-sellers-period-pill {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}

[data-theme="light"] .best-seller-qty-pill {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}

[data-theme="light"] .best-seller-card.rank-1 .best-seller-qty-pill {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

[data-theme="light"] .badge-bestsale {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
}

[data-theme="light"] .badge-bestsale.top-1 {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #ffffff;
}

[data-theme="light"] .badge-bestsale.normal {
  background: #d1fae5;
  color: #065f46;
  border-color: #34d399;
}

@media (max-width: 768px) {
  .best-sellers-header {
    padding: 12px 14px;
  }
  .best-sellers-body {
    padding: 12px 14px;
  }
  .best-sellers-grid {
    grid-template-columns: 1fr;
  }
}

.best-sellers-page-body {
  padding: 0 0 14px 0;
}

.best-sellers-table {
  width: 100%;
  border-collapse: collapse;
}

.best-sellers-table th {
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  white-space: nowrap;
}

.best-sellers-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  font-size: 13px;
  color: var(--text-main);
}

.best-sellers-table tbody tr {
  transition: background 0.15s ease;
}

.best-sellers-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.best-sellers-table tbody tr.is-active-filter {
  background: rgba(245, 158, 11, 0.08);
}

.bs-product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.bs-qty-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 150px;
}

.bs-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bs-share-pct {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

[data-theme="light"] .best-sellers-table th {
  background: rgba(15, 23, 42, 0.025);
}

[data-theme="light"] .best-sellers-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.025);
}

[data-theme="light"] .best-sellers-table tbody tr.rank-1-row .best-seller-qty-pill {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.best-sellers-table tbody tr.rank-1-row .best-seller-qty-pill {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

/* Mobile Responsive for Best Sale View (#view-bestsellers) */
@media (max-width: 768px) {
  .nav-tab-btn .nav-tab-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
  }

  #view-bestsellers .stats-overview-bar {
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  #view-bestsellers .stats-overview-heading {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px 10px !important;
  }

  #best-sellers-summary-text {
    flex: 1 1 100%;
    font-size: 11.5px !important;
  }

  #view-bestsellers .stats-overview-right {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  #best-sellers-period-select {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 36px !important;
  }

  #best-sellers-custom-dates {
    width: 100% !important;
    order: 3;
  }

  #best-sellers-custom-dates .rev-input-date {
    flex: 1 1 120px !important;
    min-width: 0 !important;
  }

  #view-bestsellers .stats-grid {
    margin-bottom: 14px !important;
  }

  #view-bestsellers .stat-info {
    min-width: 0 !important;
  }

  #bs-stat-top1-name {
    max-width: 100% !important;
    display: block !important;
  }

  #view-bestsellers .controls-bar {
    padding: 10px 12px !important;
  }

  .best-sellers-page-body {
    padding: 8px 10px 14px 10px !important;
  }

  .best-sellers-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border: none !important;
  }

  .best-sellers-table thead {
    display: none !important;
  }

  .best-sellers-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .best-sellers-table tr.bs-row {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    gap: 10px 10px !important;
    align-items: start !important;
    background: rgba(30, 41, 59, 0.45) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  [data-theme="light"] .best-sellers-table tr.bs-row {
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  }

  .best-sellers-table tr.bs-row.rank-1-row {
    border-color: rgba(245, 158, 11, 0.45) !important;
  }

  .best-sellers-table tr.bs-row.is-active-filter {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.65) !important;
  }

  .best-sellers-table td {
    border: none !important;
    padding: 0 !important;
    min-width: 0 !important;
    white-space: normal !important;
  }

  .best-sellers-table td.bs-col-rank {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    padding-top: 2px !important;
  }

  .best-sellers-table td.bs-col-product {
    grid-column: 2 / 4 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }

  .bs-product-cell {
    min-width: 0 !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }

  .best-sellers-table td.bs-col-qty {
    grid-column: 1 / 4 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .bs-qty-stack {
    min-width: 0 !important;
    width: 100% !important;
  }

  .best-sellers-table td.bs-col-orders,
  .best-sellers-table td.bs-col-revenue,
  .best-sellers-table td.bs-col-action {
    padding-top: 8px !important;
    border-top: 1px solid var(--border-color) !important;
    align-self: center !important;
  }

  .best-sellers-table td.bs-col-orders {
    grid-column: 1 / 2 !important;
    grid-row: 3 !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .best-sellers-table td.bs-col-orders::before {
    content: 'Đơn: ';
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 500;
  }

  .best-sellers-table td.bs-col-revenue {
    grid-column: 2 / 3 !important;
    grid-row: 3 !important;
    font-size: 12.5px !important;
    white-space: nowrap !important;
  }

  .best-sellers-table td.bs-col-revenue::before {
    content: 'DT: ';
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 500;
  }

  .best-sellers-table td.bs-col-action {
    grid-column: 3 / 4 !important;
    grid-row: 3 !important;
    text-align: right !important;
  }

  .best-sellers-table td.bs-col-action .btn {
    padding: 5px 10px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
  }

  .best-sellers-note {
    padding: 10px 2px 0 !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    line-height: 1.45 !important;
  }
}

@media (max-width: 480px) {
  .best-seller-thumb {
    width: 40px !important;
    height: 40px !important;
  }

  .best-sellers-table tr.bs-row {
    padding: 10px !important;
    gap: 8px !important;
  }

  .best-sellers-table td.bs-col-orders,
  .best-sellers-table td.bs-col-revenue {
    font-size: 11.5px !important;
  }
}

@media (max-width: 380px) {
  .nav-tab-btn {
    font-size: 9px !important;
  }

  .nav-tab-btn i {
    font-size: 15px !important;
  }
}


/* ==========================================================================
   ENHANCED LIGHT THEME (HIGH CONTRAST & LEGIBILITY)
   Crisp borders, rich typography, vibrant accents & clean card elevations
   ========================================================================== */

/* 1. Header & Navigation */
[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .brand-title {
  color: #1e293b !important;
}

[data-theme="light"] .nav-view-switcher {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .nav-tab-btn {
  color: #475569 !important;
}

[data-theme="light"] .nav-tab-btn:hover {
  background: #ffffff !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .nav-tab-btn.active {
  background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35) !important;
}

[data-theme="light"] .store-select-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .store-select-btn:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .store-timezone-pill {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .store-clock-time {
  color: #1e293b !important;
}

[data-theme="light"] .store-clock-tz-label {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}

[data-theme="light"] .navbar-actions .btn-secondary,
[data-theme="light"] .navbar-actions .btn-icon {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .navbar-actions .btn-secondary:hover,
[data-theme="light"] .navbar-actions .btn-icon:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #1e293b !important;
}

[data-theme="light"] .auto-refresh-wrapper select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .user-profile-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .user-name-text {
  color: #1e293b !important;
}

/* 2. Dropdown Menus */
[data-theme="light"] .user-menu-dropdown,
[data-theme="light"] .revenue-filter-dropdown,
[data-theme="light"] .column-dropdown-menu {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12) !important;
  color: #1e293b !important;
}

[data-theme="light"] .user-menu-item {
  color: #334155 !important;
}

[data-theme="light"] .user-menu-item:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

/* 3. Business Overview & Revenue Date Filter */
[data-theme="light"] .stats-overview-bar {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .stats-overview-tag {
  color: #4f46e5 !important;
  background: #eef2ff !important;
  border: 1px solid #c7d2fe !important;
}

[data-theme="light"] .stats-period-indicator {
  color: #475569 !important;
}

[data-theme="light"] .stats-period-indicator strong {
  color: #1e293b !important;
}

[data-theme="light"] .revenue-filter-btn.primary-filter-btn {
  background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
  color: #ffffff !important;
  border: 1px solid #4338ca !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28) !important;
}

[data-theme="light"] .revenue-filter-btn.primary-filter-btn:hover {
  background: linear-gradient(135deg, #4338ca, #4f46e5) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35) !important;
}

[data-theme="light"] .revenue-filter-btn.primary-filter-btn strong {
  color: #ffffff !important;
}

[data-theme="light"] .rev-preset-btn {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
}

[data-theme="light"] .rev-preset-btn:hover {
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
  color: #4338ca !important;
}

[data-theme="light"] .rev-preset-btn.active {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4338ca !important;
}

[data-theme="light"] .rev-date-field input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .rev-dropdown-header {
  color: #64748b !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

/* 4. Stat Cards */
[data-theme="light"] .stat-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .stat-label {
  color: #475569 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .stat-value {
  color: #1e293b !important;
  font-weight: 800 !important;
}

[data-theme="light"] .stat-desc {
  color: #64748b !important;
}

/* 4. Stat Cards & Icons (Vibrant, high-contrast, crystal-clear icons) */
.stat-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.stat-icon i {
  font-size: 22px !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
}

/* Dashboard Overview Cards */
#view-orders .stat-card.revenue .stat-icon,
.stat-card.revenue .stat-icon {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%) !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4) !important;
}

#view-orders .stat-card.orders .stat-icon,
.stat-card.orders .stat-icon {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4) !important;
}

#view-orders .stat-card.processing .stat-icon,
.stat-card.processing .stat-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4) !important;
}

#view-orders .stat-card.completed .stat-icon,
.stat-card.completed .stat-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

/* Best Sale KPI Cards */
#view-bestsellers .stat-card:nth-child(1) .stat-icon {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4) !important;
}

#view-bestsellers .stat-card:nth-child(2) .stat-icon {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4) !important;
}

#view-bestsellers .stat-card:nth-child(3) .stat-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

#view-bestsellers .stat-card:nth-child(4) .stat-icon {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%) !important;
  box-shadow: 0 4px 14px rgba(202, 138, 4, 0.4) !important;
}

/* Label small icons in Light Theme */
[data-theme="light"] #view-orders .stat-card.revenue .stat-label i { color: #6366f1 !important; }
[data-theme="light"] #view-orders .stat-card.orders .stat-label i { color: #0284c7 !important; }
[data-theme="light"] #view-orders .stat-card.processing .stat-label i { color: #d97706 !important; }
[data-theme="light"] #view-orders .stat-card.completed .stat-label i { color: #059669 !important; }

[data-theme="light"] #view-bestsellers .stat-card:nth-child(1) .stat-label i { color: #ea580c !important; }
[data-theme="light"] #view-bestsellers .stat-card:nth-child(2) .stat-label i { color: #0284c7 !important; }
[data-theme="light"] #view-bestsellers .stat-card:nth-child(3) .stat-label i { color: #059669 !important; }
[data-theme="light"] #view-bestsellers .stat-card:nth-child(4) .stat-label i { color: #b45309 !important; }

[data-theme="light"] .stat-card:nth-child(3) {
  border-left: 3px solid #f59e0b !important;
}

[data-theme="light"] .stat-card:nth-child(4) {
  border-left: 3px solid #10b981 !important;
}

/* 5. Alert Banners */
[data-theme="light"] .missing-tracking-alert-banner {
  background: #fff1f2 !important;
  border: 1px solid #fecdd3 !important;
  color: #9f1239 !important;
}

[data-theme="light"] #store-error-banner {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #991b1b !important;
}

[data-theme="light"] #no-store-banner {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1e40af !important;
}

/* 6. Dashboard Controls & Filter Actions */
[data-theme="light"] .main-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .card-header-bar {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .filter-strip {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="light"] .tabs-nav {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .tab-btn {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

[data-theme="light"] .tab-btn:hover {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .tab-btn.active {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4338ca !important;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25) !important;
}

[data-theme="light"] .tab-badge {
  background: #e2e8f0 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
}

[data-theme="light"] .tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

[data-theme="light"] .search-input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .search-input:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

[data-theme="light"] .search-input::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] .select-custom {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .select-custom:focus {
  border-color: #4f46e5 !important;
}

[data-theme="light"] #btn-open-bulk-filter,
[data-theme="light"] #btn-open-id-converter,
[data-theme="light"] #export-csv-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] #btn-open-bulk-filter:hover,
[data-theme="light"] #btn-open-id-converter:hover,
[data-theme="light"] #export-csv-btn:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] #btn-open-google-sheets {
  background: #f0fdf4 !important;
  border: 1px solid #86efac !important;
  color: #15803d !important;
}

[data-theme="light"] #btn-open-google-sheets:hover {
  background: #dcfce7 !important;
  border-color: #4ade80 !important;
}

[data-theme="light"] .select-all-store-label {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

/* 7. Orders Table in Light Theme */
[data-theme="light"] .orders-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #e2e8f0 !important;
  font-size: 11.5px !important;
}

[data-theme="light"] .orders-table td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
}

[data-theme="light"] .orders-table tr.order-row:hover {
  background-color: #f8fafc !important;
}

[data-theme="light"] .order-number {
  color: #4338ca !important;
  font-weight: 750 !important;
}

[data-theme="light"] .order-time {
  color: #64748b !important;
}

[data-theme="light"] .customer-name {
  color: #1e293b !important;
  font-weight: 700 !important;
}

[data-theme="light"] .customer-contact-sub {
  color: #64748b !important;
}

[data-theme="light"] .product-card-mini {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .product-title-link {
  color: #1e293b !important;
  font-weight: 600 !important;
}

[data-theme="light"] .product-title-link:hover {
  color: #4f46e5 !important;
}

[data-theme="light"] .order-price {
  color: #1e293b !important;
  font-weight: 800 !important;
}

[data-theme="light"] .order-payment-method {
  color: #64748b !important;
}

[data-theme="light"] .status-badge.processing {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

[data-theme="light"] .status-badge.completed {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
}

[data-theme="light"] .status-badge.on-hold {
  background: #fefce8 !important;
  color: #a16207 !important;
  border: 1px solid #fef08a !important;
}

[data-theme="light"] .status-badge.cancelled {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

[data-theme="light"] .missing-tracking-pill {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

[data-theme="light"] .has-tracking-pill {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
}

[data-theme="light"] .badge-sku {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .row-actions .btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .row-actions .btn:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .row-actions .select-custom {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .pagination-bar {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

[data-theme="light"] .pagination-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .pagination-btn:hover {
  background: #f1f5f9 !important;
}

[data-theme="light"] .pagination-btn.active {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4338ca !important;
}

/* 8. Modals & Form Controls */
[data-theme="light"] .modal-card,
[data-theme="light"] .modal-dialog {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15) !important;
}

[data-theme="light"] .modal-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
}

[data-theme="light"] .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .form-input,
[data-theme="light"] .input-custom {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .form-label {
  color: #334155 !important;
  font-weight: 600 !important;
}

[data-theme="light"] #gsheet-status-card {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #166534 !important;
}

/* 9. Floating Bulk Bar */
[data-theme="light"] .bulk-bar {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  color: #1e293b !important;
}

[data-theme="light"] .bulk-info {
  color: #1e293b !important;
}

[data-theme="light"] .bulk-info strong {
  color: #4f46e5 !important;
}

/* ==========================================================================
   LIGHT THEME: USER GUIDE, FEEDBACK, TRACKING & BEST SALE ENHANCEMENTS
   High contrast, crystal-clear typography, eliminated washed-out/dark text
   ========================================================================== */

/* User Guide View in Light Theme */
[data-theme="light"] #view-guide .guide-hero,
[data-theme="light"] .guide-hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 50%, #f0fdf4 100%) !important;
  border: 1px solid #c7d2fe !important;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08) !important;
}

[data-theme="light"] .guide-hero-title {
  color: #1e1b4b !important;
}

[data-theme="light"] .guide-hero-title i {
  color: #f59e0b !important;
}

[data-theme="light"] .guide-hero-subtitle {
  color: #475569 !important;
}

[data-theme="light"] .guide-search-wrapper {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .guide-search-input {
  color: #1e293b !important;
}

[data-theme="light"] .guide-search-input::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] .guide-quick-nav {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .guide-nav-pill {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .guide-nav-pill:hover {
  background: #e0e7ff !important;
  color: #4338ca !important;
  border-color: #c7d2fe !important;
}

[data-theme="light"] .guide-nav-pill.active {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4338ca !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3) !important;
}

[data-theme="light"] .guide-section {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .guide-section-title {
  color: #1e1b4b !important;
}

[data-theme="light"] .guide-section-badge {
  background: #eef2ff !important;
  color: #4f46e5 !important;
  border-color: #c7d2fe !important;
}

[data-theme="light"] .guide-step-card,
[data-theme="light"] .guide-feature-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .guide-step-title,
[data-theme="light"] .guide-feature-title {
  color: #1e293b !important;
}

[data-theme="light"] .guide-step-desc,
[data-theme="light"] .guide-feature-desc {
  color: #475569 !important;
}

[data-theme="light"] .guide-alert.tip {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #065f46 !important;
}

[data-theme="light"] .guide-alert.warning {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #92400e !important;
}

[data-theme="light"] .guide-alert.info {
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
  color: #0369a1 !important;
}

[data-theme="light"] .guide-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

[data-theme="light"] .guide-table td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
}

[data-theme="light"] .guide-workflow-step {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .guide-workflow-step-title {
  color: #1e1b4b !important;
}

[data-theme="light"] .guide-workflow-step-desc {
  color: #475569 !important;
}

/* Feedback View in Light Theme */
[data-theme="light"] #view-feedback .feedback-hero,
[data-theme="light"] .feedback-hero {
  background: linear-gradient(135deg, #fff1f2 0%, #f5f3ff 100%) !important;
  border: 1px solid #fecdd3 !important;
  box-shadow: 0 4px 20px rgba(244, 63, 94, 0.06) !important;
}

[data-theme="light"] .feedback-hero-title {
  color: #1e1b4b !important;
}

[data-theme="light"] .feedback-hero-subtitle {
  color: #475569 !important;
}

[data-theme="light"] .feedback-stat-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .feedback-stat-value {
  color: #1e293b !important;
}

[data-theme="light"] .feedback-stat-label {
  color: #475569 !important;
}

[data-theme="light"] .feedback-item-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .feedback-item-title {
  color: #1e293b !important;
}

[data-theme="light"] .feedback-item-desc {
  color: #475569 !important;
}

/* Tracking View in Light Theme */
[data-theme="light"] #view-tracking .step-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] #view-tracking .step-title {
  color: #1e1b4b !important;
}

[data-theme="light"] #view-tracking .step-desc {
  color: #64748b !important;
}

[data-theme="light"] #view-tracking .dropzone {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] #view-tracking .dropzone:hover {
  background: #f1f5f9 !important;
  border-color: #6366f1 !important;
}

[data-theme="light"] #view-tracking .dropzone-text {
  color: #1e293b !important;
}

[data-theme="light"] #view-tracking .dropzone-sub {
  color: #64748b !important;
}

/* Best Sale View in Light Theme */
[data-theme="light"] #view-bestsellers .main-card,
[data-theme="light"] .best-sellers-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .best-seller-name {
  color: #1e293b !important;
}

[data-theme="light"] .best-seller-name:hover {
  color: #4f46e5 !important;
}

[data-theme="light"] .bs-share-pct {
  color: #64748b !important;
}

/* ==========================================================================
   COMPREHENSIVE MOBILE RESPONSIVE SYSTEM (<= 768px / <= 480px / <= 380px)
   Buttery smooth layout across all 5 views, bottom dock & modals
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Global Viewport & Container */
  html, body {
    overflow-x: clip !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .app-container {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 0 10px calc(96px + env(safe-area-inset-bottom, 0px)) 10px !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
  }

  .view-section {
    padding-bottom: 24px !important;
  }

  /* Hide floating feedback button on mobile since 'Góp ý' is in bottom dock */
  .floating-feedback-fab {
    display: none !important;
  }

  /* 2. Fixed Bottom Dock Navigation */
  .nav-view-switcher {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid var(--border-color) !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)) 6px !important;
    box-sizing: border-box !important;
    z-index: 999 !important;
    margin: 0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25) !important;
  }

  [data-theme="light"] .nav-view-switcher {
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
  }

  .nav-tab-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 5px 2px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    border: none !important;
    box-shadow: none !important;
    position: relative !important;
  }

  .nav-tab-btn i {
    font-size: 16px !important;
    position: relative !important;
  }

  .nav-tab-btn .nav-tab-text {
    font-size: 10px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    line-height: 1.1 !important;
  }

  .nav-tab-btn.active {
    color: #ffffff !important;
    background: var(--accent-primary) !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35) !important;
  }

  [data-theme="light"] .nav-tab-btn.active {
    color: #ffffff !important;
    background: #4f46e5 !important;
  }

  .nav-tab-btn .nav-alert-badge,
  .nav-tab-btn .feedback-badge {
    position: absolute !important;
    top: 2px !important;
    right: 50% !important;
    transform: translateX(14px) !important;
    font-size: 9.5px !important;
    padding: 1px 4px !important;
    min-width: 14px !important;
    height: 14px !important;
    line-height: 12px !important;
    border-radius: 999px !important;
  }

  /* 3. Feedback View on Mobile: clean 2x2 Grid for Stat Cards */
  .feedback-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
  }

  .feedback-stat-card {
    padding: 12px 10px !important;
    min-height: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border-radius: 12px !important;
  }

  .feedback-stat-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .feedback-stat-value {
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
  }

  .feedback-stat-label {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  /* 4. Best Sale View Controls & Grid on Mobile */
  #view-bestsellers .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  #view-bestsellers .stat-card {
    padding: 12px 10px !important;
    border-radius: 12px !important;
  }

  #view-bestsellers .stat-value {
    font-size: 18px !important;
  }

  #view-bestsellers .stat-label {
    font-size: 11px !important;
  }

  #view-bestsellers .controls-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #view-bestsellers .controls-bar .search-box-wrapper {
    width: 100% !important;
    max-width: 100% !important;
  }

  #view-bestsellers .controls-bar .filter-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  #view-bestsellers .controls-bar .filter-actions select,
  #view-bestsellers .controls-bar .filter-actions .btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 6px 8px !important;
    font-size: 11.5px !important;
    text-overflow: ellipsis !important;
  }

  /* 5. Orders Filter Controls Grid on Mobile */
  .controls-bar .filter-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .controls-bar .filter-actions select {
    font-size: 11.5px !important;
    padding: 6px 6px !important;
    height: 36px !important;
    min-height: 36px !important;
    text-overflow: ellipsis !important;
  }

  /* 6. User Guide Hero & Quick Nav on Mobile */
  .guide-hero {
    padding: 16px 14px !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
  }

  .guide-hero-title {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }

  .guide-hero-subtitle {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
  }

  .guide-hero-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .guide-hero-actions .btn,
  .guide-search-wrapper {
    width: 100% !important;
    min-width: 0 !important;
  }

  .guide-quick-nav {
    top: 56px !important;
    padding: 6px 8px !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
  }

  .guide-nav-pill {
    padding: 6px 10px !important;
    font-size: 11.5px !important;
  }

  /* 7. Tracking View Mobile Action Buttons */
  #view-tracking .step-card {
    padding: 14px 12px !important;
    border-radius: 12px !important;
  }

  #view-tracking .dropzone {
    padding: 18px 12px !important;
  }

  #view-tracking .dropzone-icon {
    font-size: 26px !important;
    margin-bottom: 6px !important;
  }

  #view-tracking .dropzone-text {
    font-size: 13px !important;
  }

  /* 8. Pagination Bar Mobile Spacing */
  .pagination-bar {
    padding: 14px 10px !important;
    margin-top: 14px !important;
    border-radius: 10px !important;
  }

  .pagination-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
    min-height: 36px !important;
  }
}

/* ==========================================================================
   USER GUIDE (#view-guide & #user-guide-modal) 100% MOBILE RESPONSIVE ENGINE
   Eliminates all horizontal overflows, wraps long keys & tables, stacks diagrams
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Guide Container & Sections */
  #view-guide,
  .guide-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    padding: 0 0 40px 0 !important;
    margin: 0 !important;
  }

  .guide-section {
    padding: 16px 12px !important;
    margin-bottom: 16px !important;
    border-radius: 12px !important;
    scroll-margin-top: 115px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .guide-section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
  }

  .guide-section-title {
    font-size: 16px !important;
    line-height: 1.35 !important;
    gap: 8px !important;
    word-break: break-word !important;
  }

  .guide-section-badge {
    font-size: 10.5px !important;
    padding: 3px 8px !important;
    align-self: flex-start !important;
  }

  /* 2. Hero Header */
  .guide-hero {
    padding: 16px 14px !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .guide-hero-title {
    font-size: 18px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
    word-break: break-word !important;
  }

  .guide-hero-subtitle {
    font-size: 12.5px !important;
    line-height: 1.55 !important;
    margin-bottom: 14px !important;
  }

  .guide-hero-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .guide-hero-actions .btn,
  .guide-search-wrapper {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 3. Sticky Quick Navigation Pills */
  .guide-quick-nav {
    top: 56px !important;
    padding: 6px 6px !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
    border-radius: 10px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .guide-quick-nav::-webkit-scrollbar {
    display: none !important;
  }

  .guide-nav-pill {
    padding: 6px 10px !important;
    font-size: 11.5px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* 4. REST API 4-Step Workflow Diagram */
  .guide-diagram-card {
    padding: 14px 10px !important;
    margin: 12px 0 16px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .guide-workflow-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .guide-workflow-step {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  .guide-workflow-arrow {
    transform: rotate(90deg) !important;
    margin: 2px auto !important;
    display: flex !important;
    justify-content: center !important;
    font-size: 15px !important;
    width: auto !important;
  }

  /* 5. Mockup Containers & Headers */
  .guide-mockup {
    margin: 14px 0 !important;
    border-radius: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .guide-mockup-header {
    padding: 8px 10px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: center !important;
  }

  .guide-mockup-dots {
    order: 1 !important;
    flex-shrink: 0 !important;
  }

  .guide-mockup-badge {
    order: 2 !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  .guide-mockup-title {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    flex: 1 1 100% !important;
    order: 3 !important;
    word-break: break-word !important;
  }

  .guide-mockup-body {
    padding: 12px 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .guide-mockup-body > div {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mockup form rows: convert horizontal flex into stacked columns */
  .guide-mockup-body [style*="display: flex; align-items: center; justify-content: space-between"],
  .guide-mockup-body [style*="display:flex;align-items:center;justify-content:space-between"],
  .guide-mockup-body [style*="display: flex; justify-content: space-between"],
  .guide-mockup-body [style*="display:flex;justify-content:space-between"] {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .guide-mockup-body [style*="width: 140px"],
  .guide-mockup-body [style*="width:140px"] {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin-bottom: 2px !important;
  }

  .guide-mockup-body [style*="flex: 1"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mockup code wrappers with copy button */
  .guide-mockup-body [style*="flex: 1; display: flex; align-items: center; gap: 6px"],
  .guide-mockup-body [style*="flex: 1; display: flex; align-items: center; gap: 8px"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .guide-mockup-body [style*="flex: 1; display: flex; align-items: center; gap: 6px"] .btn,
  .guide-mockup-body [style*="flex: 1; display: flex; align-items: center; gap: 8px"] .btn {
    align-self: flex-start !important;
    width: auto !important;
    min-width: 80px !important;
  }

  /* Code elements (API keys, secrets, tokens, webhook urls) */
  .guide-mockup-body code,
  .guide-section code {
    word-break: break-all !important;
    white-space: normal !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    padding: 6px 8px !important;
  }

  /* Mockup Grids: convert 2-col/repeat grids into single column on mobile */
  .guide-mockup-body [style*="grid-template-columns: repeat(auto-fit"],
  .guide-mockup-body [style*="grid-template-columns: 2fr 1fr"],
  .guide-mockup-body [style*="grid-template-columns:repeat"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .guide-mockup-body [style*="grid-column: 1 / -1"] {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }

  /* Bottom actions row in mockups */
  .guide-mockup-body [style*="grid-column: 1 / -1; display: flex"],
  .guide-mockup-body [style*="display: flex; justify-content: flex-end"],
  .guide-mockup-body [style*="display: flex; justify-content: center; gap: 10px"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .guide-mockup-body [style*="display: flex; gap: 8px"],
  .guide-mockup-body [style*="display: flex; gap: 6px"] {
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  .guide-mockup-body [style*="display: flex; gap: 8px"] .btn,
  .guide-mockup-body [style*="display: flex; gap: 6px"] .btn,
  .guide-mockup-body [style*="display: flex; justify-content: flex-end"] .btn {
    flex: 1 1 100% !important;
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Mockup Tables: responsive horizontal scrolling */
  .guide-mockup-body div:has(> table),
  .guide-mockup-body [style*="overflow: hidden"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .guide-mockup-body table {
    min-width: 480px !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .guide-mockup-body table th,
  .guide-mockup-body table td {
    padding: 6px 8px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .guide-mockup-caption {
    padding: 8px 10px !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    gap: 6px !important;
  }

  /* 6. Step Cards & Feature Cards */
  .guide-step-card {
    padding: 12px 10px !important;
    gap: 10px !important;
    border-radius: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .guide-step-number {
    width: 24px !important;
    height: 24px !important;
    font-size: 11.5px !important;
    flex-shrink: 0 !important;
  }

  .guide-step-title {
    font-size: 13.5px !important;
    line-height: 1.3 !important;
  }

  .guide-step-desc {
    font-size: 12px !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
  }

  .guide-feature-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .guide-feature-card {
    padding: 12px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .guide-feature-title {
    font-size: 13px !important;
  }

  .guide-feature-desc {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  /* 7. Alerts inside Guide */
  .guide-alert {
    padding: 10px 12px !important;
    font-size: 12px !important;
    gap: 8px !important;
    border-radius: 8px !important;
    line-height: 1.5 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 8. Keyboard Shortcuts Table */
  .guide-table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    font-size: 11.5px !important;
  }

  .guide-table th,
  .guide-table td {
    padding: 8px 10px !important;
    white-space: nowrap !important;
  }

  /* 9. FAQ Items */
  .guide-faq-item {
    border-radius: 8px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .guide-faq-q {
    padding: 10px 12px !important;
    font-size: 12.5px !important;
    gap: 8px !important;
    line-height: 1.35 !important;
  }

  .guide-faq-a {
    padding: 0 12px 12px 12px !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
    word-break: break-word !important;
  }

  /* 10. User Guide Modal (#user-guide-modal) */
  #user-guide-modal .modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
  }

  #user-guide-modal .modal-header {
    padding: 12px 14px !important;
  }

  #user-guide-modal .modal-title {
    font-size: 14px !important;
  }

  #user-guide-modal .modal-body {
    padding: 12px 10px !important;
    max-height: calc(100vh - 110px) !important;
    overflow-x: hidden !important;
  }
}

/* ==========================================================================
   Google Ads & GMC Feed Column & Badges Styling
   ========================================================================== */

.col-gads {
  vertical-align: middle;
  min-width: 140px;
  max-width: 220px;
}

.col-gads-th {
  min-width: 140px;
}

.gads-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gads-row-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-gads-cid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.35);
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.badge-gads-cid:hover {
  background: rgba(37, 99, 235, 0.28);
  border-color: #3b82f6;
  color: #93c5fd;
}

.gads-acc-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gads-row-label {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.badge-gads-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-gads-label strong {
  font-weight: 800;
}

.badge-gads-label-more {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.badge-gads-empty {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  padding: 0 4px;
}

.gads-cell-wrap.multi .gads-multi-summary {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 3px;
}

.gads-multi-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gads-multi-item {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.badge-gads-cid-sm {
  font-size: 10px;
  font-family: monospace;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.12);
  padding: 1px 4px;
  border-radius: 3px;
}

.badge-gads-label-sm {
  font-size: 10.5px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Light Theme Badges */
[data-theme="light"] .badge-gads-cid {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}

[data-theme="light"] .badge-gads-label {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border-color: #fcd34d !important;
}

[data-theme="light"] .gads-acc-pill {
  color: #1e293b !important;
}

[data-theme="light"] .badge-gads-cid-sm {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

[data-theme="light"] .badge-gads-label-sm {
  background: #fef3c7 !important;
  color: #b45309 !important;
}
