/* ============================================
   MERKA 3.0 — Industrial Slate + Stock Green
   UI UX Pro Max: Inventory & Stock Management
   All Fases 1-5 Integrated
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Primario — Deep Navy (Stripe-inspired) */
  --primary:       #0F172A;
  --primary-dark:  #020617;
  --primary-deeper:#000000;
  --primary-light: #EFF6FF;
  --primary-glow:  rgba(15, 23, 42, 0.06);

  /* Acento — Teal (Identidad Merka, como Linear usa su purple) */
  --accent:        #0E7C86;
  --accent-dark:   #06525A;
  --accent-light:  #ECFDF5;
  --accent-glow:   rgba(14, 124, 134, 0.08);
  --accent-glow-strong: rgba(14, 124, 134, 0.18);

  /* Semántica — Flat, sin gradientes */
  --success:       #059669;
  --success-bg:    #F0FDF4;
  --success-glow:  rgba(5, 150, 105, 0.08);
  --warning:       #D97706;
  --warning-bg:    #FFFBEB;
  --warning-glow:  rgba(217, 119, 6, 0.08);
  --danger:        #DC2626;
  --danger-bg:     #FEF2F2;
  --danger-glow:   rgba(220, 38, 38, 0.08);
  --info:          #0E7C86;
  --info-bg:       #ECFDF5;

  /* Fondos — Premium clean */
  --bg:            #F8FAFC;
  --surface:       #FFFFFF;
  --surface-hover: #F8FAFC;
  --surface-alt:   #F1F5F9;

  /* Texto — High contrast */
  --text:          #0F172A;
  --text-secondary:#475569;
  --text-muted:    #94A3B8;

  /* Bordes — Ultralight */
  --border:        #E2E8F0;
  --border-light:  #F1F5F9;

  /* Layout */
  --radius-xs:     8px;
  --radius-sm:     12px;
  --radius:        16px;
  --radius-lg:     20px;
  --radius-xl:     24px;
  --radius-full:   9999px;
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.03), 0 1px 1px rgba(0,0,0,0.02);
  --shadow:        0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.06), 0 4px 8px rgba(0,0,0,0.03);
  --shadow-card:   0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.03);
  --shadow-glow:   0 4px 20px rgba(14,124,134,0.08);
  --nav-height:    64px;
  --header-height: 56px;
  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:     'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

/* ========== DARK MODE — True Dark ========== */
[data-theme="dark"] {
  --bg:            #0B1120;
  --surface:       #131B2E;
  --surface-hover: #1A2440;
  --surface-alt:   #0F1628;
  --text:          #F1F5F9;
  --text-secondary:#CBD5E1;
  --text-muted:    #64748B;
  --border:        #1E293B;
  --border-light:  #0F172A;
  --primary:       #38BDF8;
  --primary-dark:  #000000;
  --primary-deeper:#000000;
  --primary-light: #131B2E;
  --accent-light:  #0F2028;
  --success-bg:    #0A1A0A;
  --warning-bg:    #1A140A;
  --danger-bg:     #1A0A0A;
  --info-bg:       #0F2028;
  --primary-glow:  rgba(56, 189, 248, 0.08);
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.3);
  --shadow:        0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 24px rgba(0,0,0,0.6);
  --shadow-glow:   0 4px 20px rgba(56,189,248,0.06);
  --shadow-card:   0 1px 2px rgba(0,0,0,0.4);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.5);
  --success-glow:  rgba(5, 150, 105, 0.08);
  --warning-glow:  rgba(217, 119, 6, 0.08);
  --danger-glow:   rgba(220, 38, 38, 0.08);
}

/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

/* ========== FOCUS VISIBLE (Accesibilidad) ========== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
  outline: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link accesible */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 9999;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 8px;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
}

/* ========== SCREENS ========== */
.screen { display: none; }
.screen.active { display: block; }

/* ========== LOGIN ========== */
#screen-login {
  min-height: 100dvh;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  position: relative;
  overflow: hidden;
}
#screen-login.active { display: flex; }
#screen-login::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(5,150,105,0.08) 0%, transparent 70%);
  top: -200px; right: -200px;
  border-radius: 50%;
  animation: loginOrb 8s ease-in-out infinite alternate;
}
#screen-login::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(5,150,105,0.05) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  border-radius: 50%;
  animation: loginOrb 10s ease-in-out infinite alternate-reverse;
}
@keyframes loginOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.1); }
}

.login-container {
  background: rgba(30,41,59,0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  padding: 40px 28px;
  width: 100%;
  max-width: 380px;
  margin: 20px;
  position: relative;
  z-index: 1;
}
.login-brand { text-align: center; margin-bottom: 32px; }
.login-brand-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1E293B, #059669);
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(5,150,105,0.25);
}
.login-title {
  font-size: 28px;
  font-weight: 800;
  color: #F1F5F9;
  letter-spacing: -0.5px;
}
.login-title span { color: #059669; }
.login-subtitle {
  font-size: 13px;
  color: #94A3B8;
  margin-top: 6px;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-form .form-group input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(15,23,42,0.6);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  color: #F1F5F9;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.login-form .form-group input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5,150,105,0.15);
}
.login-form .form-group input::placeholder { color: #475569; }
.login-error {
  text-align: center;
  font-size: 13px;
  color: #F87171;
  padding: 8px;
  background: rgba(220,38,38,0.1);
  border-radius: var(--radius-sm);
}

/* ── MODO DEMO ── */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: var(--text-muted);
  font-size: 12px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-demo {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #fff !important;
  border: none !important;
  padding: 14px 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer;
  border-radius: var(--radius-md) !important;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-demo:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-demo:active {
  transform: translateY(0);
}
.btn-demo .demo-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
}
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 13px;
  border-radius: 0;
  margin: 0;
  flex-wrap: wrap;
}
.demo-btn-restore {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.demo-btn-restore:hover {
  background: rgba(255,255,255,0.3);
}

/* ========== MAIN APP LAYOUT ========== */
#screen-app {
  display: none;
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
}
#screen-app.active { display: flex; }

/* ========== HEADER ========== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-logo {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1E293B, #059669);
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}
.header-btn {
  width: 36px; height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary-glow);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.header-btn:hover {
  background: var(--border);
  color: var(--text);
  transform: translateY(-1px);
}
.sidebar-toggle {
  width: 36px; height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all .2s;
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--surface-alt); color: var(--text); }
.header-btn:active { transform: scale(0.95); }
#rate-btn {
  font-size: 12px;
  font-weight: 700;
  min-width: 70px;
  padding: 0 12px;
  background: var(--accent-glow);
  color: var(--accent);
  width: auto;
  letter-spacing: -0.3px;
}
#rate-btn:hover { background: var(--accent); color: white; }

/* ========== MAIN CONTENT ========== */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 20px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.app-content::-webkit-scrollbar { width: 4px; }
.app-content::-webkit-scrollbar-track { background: transparent; }
.app-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ========== BOTTOM NAV (eliminado — se usa sidebar + header) ========== */
.bottom-nav { display: none !important; }

.nav-item {
  flex: 0 0 auto;
  min-width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .2s;
  position: relative;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  padding: 4px 2px;
}
.nav-item .nav-icon {
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}
.nav-item .nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.nav-item .nav-label {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}
.nav-item.active {
  color: var(--accent);
}
.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.nav-item:hover { color: var(--text); }
.nav-item.active:hover { color: var(--accent); }
.nav-item:active { transform: scale(0.95); }

/* Cart badge on nav */
.nav-item .nav-badge {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(calc(50% + 10px));
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.nav-item .nav-badge.show { display: flex; }

/* ========== CARDS ========== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-title svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.5;
}

/* ========== STATS GRID (Dashboard) ========== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
  overflow: hidden;
  transition: all .25s ease;
  box-shadow: var(--shadow-card);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 0 2px 2px 0;
}
.stat-card[data-color="primary"]::before { background: var(--primary); }
.stat-card[data-color="accent"]::before { background: var(--accent); }
.stat-card[data-color="success"]::before { background: var(--success); }
.stat-card[data-color="warning"]::before { background: var(--warning); }
.stat-card[data-color="danger"]::before { background: var(--danger); }

.stat-card .stat-icon {
  font-size: 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}
.stat-card .stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}
/* ========== STAT CARD HIERARCHY ========== */
.stat-card-lg {
  grid-column: span 2;
}
.stat-card-lg .stat-value {
  font-size: 28px;
}
.stat-card-lg .stat-label {
  font-size: 12px;
}
.stat-card-lg .stat-icon svg {
  width: 24px;
  height: 24px;
}
.stat-card-sm .stat-value {
  font-size: 17px;
}
.stat-card-sm .stat-icon svg {
  width: 16px;
  height: 16px;
}
.stat-card .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ========== PRICE DISPLAY ========== */
.price-dual {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========== SKELETON LOADING ========== */
.skeleton {
  background: linear-gradient(90deg, var(--surface-alt) 25%, var(--surface-hover) 50%, var(--surface-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card {
  height: 80px;
  margin-bottom: 10px;
}
.skeleton-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.skeleton-stat {
  height: 90px;
  background: linear-gradient(90deg, var(--surface-alt) 25%, var(--surface-hover) 50%, var(--surface-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}
.skeleton-chart {
  height: 200px;
  background: linear-gradient(90deg, var(--surface-alt) 25%, var(--surface-hover) 50%, var(--surface-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== COUNT-UP ANIMATION ========== */
.count-up {
  display: inline-block;
  animation: countFadeIn 0.6s ease-out;
}
@keyframes countFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== CHART CONTAINER ========== */
.chart-container {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  transition: all .25s ease;
}
.chart-container:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}
.chart-container .card-title { margin-bottom: 12px; }
.chart-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
}

/* ========== LOW STOCK ALERTS ========== */
.stock-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all .2s;
}
.stock-alert:hover { transform: translateX(4px); }
.stock-alert-danger { background: var(--danger-bg); }
.stock-alert-warning { background: var(--warning-bg); }
.stock-alert .stock-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stock-dot-green { background: var(--success); }
.stock-dot-amber { background: var(--warning); }
.stock-dot-red { background: var(--danger); }

/* ========== SEARCH WRAPPER ========== */
.search-wrapper { position: relative; }
.search-wrapper .search-icon {
position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
color: var(--text-muted); pointer-events: none; display: flex;
}
.search-wrapper .search-icon svg { width: 16px; height: 16px; }

/* ========== SEARCH BAR ========== */
.search-bar {
width: 100%;
padding: 12px 16px 12px 40px;
border: 1.5px solid var(--border);
border-radius: var(--radius-sm);
font-size: 14px;
font-family: var(--font);
background: var(--surface);
color: var(--text);
outline: none;
transition: border-color .2s, box-shadow .2s;
}
.search-bar:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-bar::placeholder { color: var(--text-muted); }

/* ========== FILTER BUTTONS (pills) ========== */
.filter-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  background: var(--surface);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ========== PRODUCT GRID ========== */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.product-card {
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.product-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover), var(--shadow-glow);
  transform: translateY(-2px);
}
.product-card:active { transform: scale(0.98); }
.product-card .product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  padding-right: 60px;
}
.product-card .product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.3px;
}
.product-card .product-stock {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.product-card .product-category {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
}

/* ========== STOCK DOTS ========== */
.stock-dot-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stock-dot-indicator .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ========== POS (Vender) ========== */
.pos-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pos-product {
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 12px;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: var(--shadow-card);
}
.pos-product:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover), var(--shadow-glow);
  transform: translateY(-1px);
}
.pos-product:active {
  transform: scale(0.97);
  background: var(--accent-light);
}
.pos-product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.pos-product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}

/* Cart */
.cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  animation: slideIn .3s ease;
}
.cart-item:last-child { border-bottom: none; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
.cart-item-qty {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  min-width: 24px;
  text-align: center;
}
.cart-item-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.cart-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.cart-item-remove {
  width: 28px; height: 28px;
  border: none;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.cart-item-remove:hover { background: var(--danger); color: white; }
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  border-top: 2px solid var(--accent);
  margin-top: 8px;
}

/* ========== STOCK LIST VIEW ========== */
.stock-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stock-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--shadow-card);
}
.stock-list-item:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  box-shadow: var(--shadow-card-hover);
}
.stock-list-item:active { transform: scale(0.99); }

/* Payment method buttons */
.payment-grid {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 8px;
}
.payment-btn {
  flex-shrink: 0;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all .2s;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.payment-btn:hover { border-color: var(--accent); }
.payment-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ========== MODALS / BOTTOM SHEETS ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85dvh;
  overflow-y: auto;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0));
  animation: slideUp .3s cubic-bezier(0.32,0.72,0,1);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.12);
  border-top: 1px solid var(--border);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: -8px auto 16px;
  flex-shrink: 0;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  width: 32px; height: 32px;
  border: none;
  background: var(--surface-alt);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }

/* Desktop modal: centered */
@media (min-width: 768px) {
  .modal-overlay { align-items: center; }
  .modal-content {
    border-radius: var(--radius-xl);
    max-width: 480px;
    max-height: 80vh;
    animation: scaleIn .2s cubic-bezier(0.32,0.72,0,1);
  }
  @keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
  }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-full { width: 100%; }
.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  min-height: 36px;
}
.btn-lg {
  padding: 16px 24px;
  font-size: 16px;
  min-height: 52px;
}
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow-strong);
}
.btn-primary:hover { box-shadow: 0 4px 16px var(--accent-glow-strong); transform: translateY(-1px); }
.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { box-shadow: 0 4px 16px var(--success-glow); transform: translateY(-1px); }
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { box-shadow: 0 4px 16px var(--danger-glow); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn-outline-danger {
  background: transparent;
  border: 1.5px solid var(--danger-bg);
  color: var(--danger);
}
.btn-outline-danger:hover { background: var(--danger-bg); }

/* Invoice status badges */
.badge-success {
  background: var(--success-bg);
  color: var(--success);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ========== FORM GROUPS ========== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: all .2s;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ========== ITEM LIST ========== */
.item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.item-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 10px;
}
.item-list li:last-child { border-bottom: none; }
.item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.item-detail {
  font-size: 11px;
  color: var(--text-muted);
}
.item-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 400px;
  width: calc(100% - 32px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s cubic-bezier(0.32,0.72,0,1);
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .3s ease;
}
.toast.toast-out { animation: toastOut .3s ease forwards; }
.toast-success {
  background: rgba(5,150,105,0.95);
  color: white;
}
.toast-error {
  background: rgba(220,38,38,0.95);
  color: white;
}
.toast-info {
  background: rgba(30,41,59,0.95);
  color: #F1F5F9;
}
.toast-warning {
  background: rgba(217,119,6,0.95);
  color: white;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-20px) scale(0.95); }
}

/* ========== CLIENT CARDS ========== */
.client-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: var(--shadow-card);
}
.client-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}
.client-card:active { transform: scale(0.99); }
.client-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.client-info { flex: 1; min-width: 0; }
.client-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.client-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.client-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
}
.client-status .dot { width: 8px; height: 8px; border-radius: 50%; }
.client-status.active { color: var(--success); }
.client-status.inactive { color: var(--text-muted); }
.client-status .dot.active { background: var(--success); }
.client-status .dot.inactive { background: var(--text-muted); }

/* ========== LOADING ========== */
.loading {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  padding: 40px 20px;
}
.loading-spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ========== CONFETTI ========== */
.confetti-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}
@keyframes confettiFall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ========== PAGE TRANSITIONS ========== */
.page-enter {
  animation: pageIn .25s ease;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== CREDIT/DEBT TOGGLE ========== */
.credit-toggle-btn {
  flex: 1;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  background: var(--surface);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.credit-toggle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.credit-toggle-btn:hover:not(.active) { border-color: var(--accent); }

/* ========== POS CUSTOMER FIELDS ========== */
.pos-customer-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.pos-customer-row {
  display: flex;
  gap: 6px;
}
@media (max-width: 480px) {
  .pos-customer-row {
    flex-direction: column;
    gap: 8px;
  }
}

/* ========== BULK UPLOAD ========== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--surface);
}
.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: var(--shadow-glow);
}

/* ========== SIDEBAR — hidden on mobile, visible on desktop ========== */
.sidebar { display: none; }
.app-layout { display: flex; flex-direction: column; min-height: 100dvh; }

/* ========== SIDEBAR (Desktop 768px+) ========== */
@media (min-width: 768px) {
  .sidebar { display: flex; position: fixed; top: 0; left: 0; bottom: 0;
    width: 240px; background: var(--surface);
    border-right: 1px solid var(--border-light);
    flex-direction: column; z-index: 300; }
  #screen-app.active { flex-direction: row !important; }
  .sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 20px 24px;
    border-bottom: 1px solid var(--border-light);
  }
  .sidebar-logo {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #1E293B, #059669);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 800; color: white;
    flex-shrink: 0;
  }
  .sidebar-name {
    font-size: 20px; font-weight: 800; color: var(--text);
    letter-spacing: -0.5px;
  }
  .sidebar-nav {
    flex: 1; padding: 12px 10px;
    display: flex; flex-direction: column; gap: 1px; overflow-y: auto;
  }
  .nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 12px 16px 4px;
    margin-top: 4px;
  }
  .nav-section-title:first-child {
    margin-top: 0;
  }
  .sidebar-nav .nav-item {
    flex: none; flex-direction: row; align-items: center;
    justify-content: flex-start; gap: 12px;
    padding: 12px 16px; border-radius: var(--radius-sm);
    min-height: auto; color: var(--text-secondary);
    width: 100%; text-align: left;
  }
  .sidebar-nav .nav-item:hover { background: var(--surface-alt); color: var(--text); }
  .sidebar-nav .nav-item.active {
    background: var(--accent-glow); color: var(--accent); font-weight: 600;
  }
  .sidebar-nav .nav-item.active::after { display: none; }
  .sidebar-nav .nav-item .nav-icon { width: 24px; height: 24px; flex-shrink: 0; }
  .sidebar-nav .nav-item .nav-icon svg { width: 20px; height: 20px; }
  .sidebar-nav .nav-item .nav-label { font-size: 14px; font-weight: 500; }
  .sidebar-nav .nav-item.active .nav-label { font-weight: 700; }
  .sidebar-nav .nav-item .nav-badge { right: 12px; top: 50%; transform: translateY(-50%); left: auto; }
  .sidebar-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border-light);
    display: flex; flex-direction: column; gap: 6px;
    flex-shrink: 0;
  }
  .sidebar-rate {
    font-size: 13px; font-weight: 700;
    color: var(--text-secondary);
    padding: 8px 12px; background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm); text-align: center; cursor: pointer;
  }
  .sidebar-rate:hover { background: var(--primary-light); color: var(--text); }
  #sidebar-bcv {
    font-size: 12px; font-weight: 600;
    margin-top: 2px;
    cursor: default;
  }
  #sidebar-bcv:hover { background: var(--surface); color: var(--text-secondary); }
  .sidebar-actions { display: flex; gap: 8px; }
  .sidebar-btn {
    flex: 1; height: 40px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text-secondary);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 18px;
  }
  .sidebar-btn:hover { background: var(--surface-alt); color: var(--text); border-color: var(--accent); }
  .sidebar-btn svg { width: 20px; height: 20px; stroke: currentColor; }
  .app-layout {
    margin-left: 240px; width: calc(100% - 240px);
    display: flex; flex-direction: column; min-height: 100dvh;
  }
  .bottom-nav { display: none !important; }
  .app-header { padding: 0 24px; }
  .sidebar-toggle { display: none !important; }
  #dark-mode-btn-mobile, #logout-btn-mobile { display: none !important; }
  .app-content { padding: 24px 32px; flex: 1; }
  .app-content::-webkit-scrollbar { width: 6px; }
  .stats-grid {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  .stat-card-lg {
    grid-column: span 2;
  }
  .stat-card-lg .stat-value {
    font-size: 32px !important;
  }
  .stat-card-sm {
    grid-column: span 1;
  }
  .product-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .pos-products { grid-template-columns: repeat(4, 1fr) !important; }
  .stat-card .stat-value { font-size: 24px; }
  .stat-card { padding: 20px; }
  .card { padding: 20px; }
  .chart-wrapper { height: 250px; }
}
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .pos-products { grid-template-columns: repeat(5, 1fr) !important; }
  .app-content { padding: 28px 40px; }
}
@media (min-width: 1440px) {
  .product-grid { grid-template-columns: repeat(5, 1fr) !important; }
  .pos-products { grid-template-columns: repeat(6, 1fr) !important; }
  .app-content { padding: 32px 48px; }
}

@media (max-width: 375px) {
  .stat-card .stat-value { font-size: 18px; }
  .product-card .product-price { font-size: 16px; }
  .card { padding: 12px; }
}

/* ========== PREFERS REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Skip to content link ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* Rate selector buttons (product forms) */
.rate-select-btn { font-size: 11px; font-weight: 600; padding: 5px 8px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; transition: all .1s; }
.rate-select-btn.active { background: var(--primary); color: white; border: none; }
.rate-select-btn:not(.active) { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); }

/* ===================================================
   DASHBOARD REDISEÑO — Stripe/Linear Premium
   Clases específicas para el nuevo dashboard
   =================================================== */

/* ── Premium Card ── */
.dw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, transform .2s ease;
}
.dw-card:hover {
  box-shadow: var(--shadow-card-hover);
}
.dw-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.dw-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dw-card-title svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.5;
}

/* ── KPI Grid (4-column, 2 large + 2 small) ── */
.dw-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (min-width: 900px) {
  .dw-kpi-grid {
    grid-template-columns: 2fr 2fr 1fr 1fr;
  }
}
.dw-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.dw-kpi-card:hover {
  box-shadow: var(--shadow-card-hover);
}
.dw-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
}
.dw-kpi-card[data-color="primary"]::before { background: var(--primary); }
.dw-kpi-card[data-color="accent"]::before { background: var(--accent); }
.dw-kpi-card[data-color="success"]::before { background: var(--success); }
.dw-kpi-card[data-color="warning"]::before { background: var(--warning); }
.dw-kpi-card[data-color="danger"]::before { background: var(--danger); }
.dw-kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dw-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}
.dw-kpi-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.dw-kpi-icon[data-color="primary"] { background: var(--primary); }
.dw-kpi-icon[data-color="accent"] { background: var(--accent); }
.dw-kpi-icon[data-color="success"] { background: var(--success); }
.dw-kpi-icon[data-color="danger"] { background: var(--danger); }
.dw-kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.dw-kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.dw-kpi-card.primary .dw-kpi-value { font-size: 28px; }
.dw-kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── CTA Card (Caja) ── */
.dw-cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
@media (max-width: 640px) {
  .dw-cta-card { flex-direction: column; text-align: center; }
}
.dw-cta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dw-cta-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dw-cta-status {
  font-size: 13px;
  color: var(--text-secondary);
}
.dw-cta-status strong {
  color: var(--text);
  font-weight: 600;
}
.dw-cta-status .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.dw-cta-status .dot.green { background: var(--success); }
.dw-cta-status .dot.red { background: var(--danger); }
.dw-cta-status .dot.amber { background: var(--warning); }
.dw-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.dw-cta-btn:active { transform: scale(0.97); }
.dw-cta-btn.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow-strong);
}
.dw-cta-btn.primary:hover {
  box-shadow: 0 4px 16px var(--accent-glow-strong);
}
.dw-cta-btn.danger {
  background: var(--danger);
  color: white;
}
.dw-cta-btn svg { width: 16px; height: 16px; }

/* ── Activity Grid (2-column: chart + top products) ── */
.dw-activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (min-width: 900px) {
  .dw-activity-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}
.dw-chart-wrapper {
  height: 200px;
  position: relative;
}

/* ── Top Products ── */
.dw-top-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.dw-top-item:last-child { border-bottom: none; }
.dw-top-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.dw-top-rank.gold { background: #FEF3C7; color: #D97706; }
.dw-top-rank.silver { background: #F1F5F9; color: #64748B; }
.dw-top-rank.bronze { background: #FFF7ED; color: #EA580C; }
.dw-top-rank.default { background: var(--surface-alt); color: var(--text-muted); }
.dw-top-info {
  flex: 1;
  min-width: 0;
}
.dw-top-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dw-top-detail {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.dw-top-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Inventory + Alerts (2-col) ── */
.dw-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (min-width: 900px) {
  .dw-split-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Alert Items ── */
.dw-alert-section {
  margin-bottom: 12px;
}
.dw-alert-section:last-child { margin-bottom: 0; }
.dw-alert-heading {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.dw-alert-heading.danger { color: var(--danger); }
.dw-alert-heading.warning { color: var(--warning); }
.dw-alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  cursor: pointer;
  transition: background .15s;
  font-size: 12px;
}
.dw-alert-item:hover { background: var(--surface-hover); }
.dw-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dw-alert-dot.red { background: var(--danger); }
.dw-alert-dot.amber { background: var(--warning); }
.dw-alert-name { flex: 1; color: var(--text); font-weight: 500; }
.dw-alert-qty { font-weight: 700; color: var(--warning); }
.dw-alert-more {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px;
}

/* ── Inventory Value Card ── */
.dw-inv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.dw-inv-cell {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.dw-inv-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.dw-inv-label svg {
  width: 10px;
  height: 10px;
  stroke-width: 2.5;
}
.dw-inv-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.dw-inv-value.accent { color: var(--accent); }
.dw-inv-usd {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Receivables ── */
.dw-recv-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.dw-recv-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.dw-recv-row:last-child { border-bottom: none; }
.dw-recv-customer {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}
.dw-recv-due {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.dw-recv-due.overdue { color: var(--danger); }
.dw-recv-due.soon { color: var(--warning); }
.dw-recv-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dw-recv-action {
  display: flex;
  align-items: center;
}
.dw-recv-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  background: var(--success);
  color: white;
  transition: opacity .15s;
  white-space: nowrap;
}
.dw-recv-btn:hover { opacity: 0.9; }

/* ── Products collapsed ── */
.dw-collapse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  cursor: pointer;
  user-select: none;
}
.dw-collapse-header:hover .dw-collapse-arrow {
  color: var(--text);
}
.dw-collapse-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dw-collapse-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.dw-collapse-count {
  font-size: 12px;
  color: var(--text-muted);
}
.dw-collapse-arrow {
  color: var(--text-muted);
  transition: transform .2s ease;
  display: flex;
}
.dw-collapse-arrow.open {
  transform: rotate(90deg);
}

/* ── Today's Sales mini-list ── */
.dw-sale-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}
.dw-sale-item:last-child { border-bottom: none; }
.dw-sale-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dw-sale-time {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  flex-shrink: 0;
}
.dw-sale-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.dw-sale-status.paid { background: var(--success-bg); color: var(--success); }
.dw-sale-status.pending { background: var(--warning-bg); color: var(--warning); }
.dw-sale-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.dw-sale-see-all {
  text-align: center;
  margin-top: 12px;
}
.dw-sale-see-all a {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.dw-sale-see-all a:hover { text-decoration: underline; }

/* ── Tabs secundarios ── */
.dw-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--surface-alt);
  padding: 3px;
  border-radius: var(--radius-sm);
  width: fit-content;
}
.dw-tab {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all .15s;
}
.dw-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dw-tab:hover:not(.active) { color: var(--text-secondary); }

/* ── Empty state ── */
.dw-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Product collapse body ── */
.dw-collapse-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dw-collapse-body.open {
  max-height: 600px;
  overflow-y: auto;
}
.dw-product-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-alt);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 3px;
  cursor: pointer;
  transition: background .15s;
}
.dw-product-chip:hover {
  background: var(--border);
}

/* ── Skeleton for new design ── */
.dw-skeleton {
  background: linear-gradient(90deg, var(--surface-alt) 25%, var(--surface-hover) 50%, var(--surface-alt) 75%);
  background-size: 200% 100%;
  animation: dwShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-lg);
}
@keyframes dwShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.dw-skeleton-kpi {
  height: 120px;
}
.dw-skeleton-cta {
  height: 80px;
  margin-bottom: 20px;
}
.dw-skeleton-chart {
  height: 200px;
  margin-bottom: 20px;
}
.dw-skeleton-card {
  height: 200px;
  margin-bottom: 20px;
}
.rate-select-btn:hover { opacity: .85; }

/* ═══════════════════════════════════════════
   FIXES — Auditoría UX/UI Julio 2026
   ═══════════════════════════════════════════ */

/* Toast: z-index sobre bottom nav (200) */
.toast-container {
  z-index: 9999 !important;
  bottom: 80px !important;
}

/* POS Skeleton loading */
.pos-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
.pos-skeleton-row {
  height: 48px;
  background: linear-gradient(90deg, var(--surface-alt) 25%, var(--surface-hover) 50%, var(--surface-alt) 75%);
  background-size: 200% 100%;
  animation: dwShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* POS — Botones de moneda reutilizables */
.pos-currency-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  white-space: nowrap;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pos-currency-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.pos-currency-btn:hover:not(.active) {
  background: var(--surface-hover);
}

/* POS — Filtros de categoría */
.pos-cat-btn {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pos-cat-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* POS — Barcode input */
.pos-barcode-input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--surface);
  color: var(--text);
  outline: none;
  text-align: center;
  letter-spacing: 2px;
  transition: border-color .2s;
}
.pos-barcode-input:focus {
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* POS — Layout 2 columnas (productos + carrito sidebar) */
.pos-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.pos-col-products {
  flex: 1;
  min-width: 0;
}

/* POS — Carrito sidebar */
.pos-cart-sidebar {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  max-height: calc(100vh - 140px);
}

/* FAB carrito: oculto por defecto (solo visible en mobile con media query) */
.pos-cart-fab {
  display: none !important;
}
@media (max-width: 768px) {
  .pos-cart-sidebar {
    width: 100% !important;
    max-height: 50vh !important;
    overflow-y: auto !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 300 !important;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.15) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform;
    transform: translateY(100%) !important; /* hidden by default */
    border: none !important;
    max-height: 70vh !important;
  }
  /* Drag handle */
  .pos-cart-sidebar::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 2px;
    margin: 8px auto 4px;
    opacity: 0.5;
    cursor: grab;
    flex-shrink: 0;
  }
  .pos-cart-sidebar.open {
    transform: translateY(0) !important;
  }
  /* Mobile cart FAB (floating badge) */
  .pos-cart-fab {
    position: fixed !important;
    bottom: 64px !important;
    right: 16px !important;
    z-index: 250 !important;
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 24px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: var(--font) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    transition: transform 0.15s !important;
    line-height: 1 !important;
  }
  .pos-cart-fab:active {
    transform: scale(0.95) !important;
  }
  .pos-cart-fab.hidden {
    display: none !important;
  }
  .pos-layout {
    padding-bottom: 0 !important;
  }
  .pos-products {
    min-height: calc(100vh - 200px) !important;
  }
  .barcode-input-mobile {
    font-size: 16px !important;
    padding: 10px 14px !important;
  }
}

/* POS — Resumen carrito badge */
.cart-summary-badge {
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

/* POS — Crédito toggle */
.credit-toggle {
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: all .15s;
}
.credit-toggle.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* POS — Botón "Cobrar" */
.btn-cobrar {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 700;
}

/* POS — Vuelto calculator */
.vuelto-input {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.vuelto-input:focus {
  border-color: var(--accent);
}

/* Empty state messages */
.empty-state {
  color: var(--text-muted);
  font-size: 15px;
  text-align: center;
  padding: 20px;
}

/* KPI value — prevent overflow with large numbers */
.dw-kpi-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Ensure dual-currency prices don't get compressed in stat cards */
.stat-card .stat-value {
  flex-shrink: 0;
}

/* Sidebar mobile — overlay when toggled */
@media (max-width: 767px) {
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 500 !important;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(0.4,0,0.2,1);
    width: 280px !important;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    display: flex !important;
    flex-direction: column;
    background: var(--surface);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 499;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  .sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }
  /* Sidebar nav items — estilo horizontal (no como bottom nav) */
  .sidebar .sidebar-nav {
    flex: 1;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow-y: auto;
  }
  .sidebar .nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 10px 16px 4px;
    margin-top: 4px;
  }
  .sidebar .nav-item {
    flex: none;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    min-height: auto;
    color: var(--text-secondary);
    width: 100%;
    text-align: left;
    min-width: 0;
  }
  .sidebar .nav-item:hover { background: var(--surface-alt); color: var(--text); }
  .sidebar .nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 600;
  }
  .sidebar .nav-item.active::after { display: none; }
  .sidebar .nav-item .nav-icon { width: 22px; height: 22px; flex-shrink: 0; font-size: 16px; }
  .sidebar .nav-item .nav-icon svg { width: 18px; height: 18px; }
  .sidebar .nav-item .nav-label { font-size: 14px; font-weight: 500; }
  /* Sidebar footer */
  .sidebar .sidebar-footer {
    padding: 8px 14px 12px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
  }
  .sidebar .sidebar-rate {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 5px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
  }
  .sidebar .sidebar-rate:hover { background: var(--primary-light); color: var(--text); }
  #sidebar-bcv {
    font-size: 11px;
    font-weight: 500;
    cursor: default;
  }
  .sidebar .sidebar-actions {
    display: flex;
    gap: 6px;
  }
  .sidebar .sidebar-btn {
    flex: 1;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
  }
  .sidebar .sidebar-btn:hover { background: var(--surface-alt); color: var(--text); border-color: var(--accent); }
  .sidebar .sidebar-btn svg { width: 18px; height: 18px; stroke: currentColor; }
}

/* ========== WAREHOUSE SELECTOR ========== */
.wh-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.wh-tag:hover {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.wh-tag select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  outline: none;
  padding: 0 16px 0 2px;
  min-width: 60px;
  max-width: 130px;
  line-height: 1.4;
}
.wh-tag select option {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
}
.wh-tag .wh-chevron {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}
.wh-tag .wh-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Sidebar warehouse select */
#sidebar-warehouse-selector .wh-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.sidebar-wh-select {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: all .2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.sidebar-wh-select:hover {
  border-color: var(--accent);
}
.sidebar-wh-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.sidebar-wh-select option {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
}
