﻿/* =====================================================================
   manager.css Ã¢Â€Â” Bellaciao Manager v1.3 Ã¢Â€Â” Premium SaaS Edition
   ---------------------------------------------------------------------
   TipografÃƒÂ­a dual:
   - **Bebas Neue** Ã¢Â€Â” display condensado (brand, KPIs, page titles, badges)
   - **Montserrat** Ã¢Â€Â” UI, tablas, formularios, pÃƒÂ¡rrafos (300-800)
   - **Playfair Display** italic Ã¢Â€Â” solo para acentos "Ciao" + monograma B
   - JetBrains Mono Ã¢Â€Â” code/kbd

   Paleta: ROJO wine itÃƒÂ¡lico (#a01818 light / #f87171 dark) + acento
   dorado champagne (#e8c574) sutil para el toque trattoria premium +
   teal complementario en interactividad GPS.
   ===================================================================== */

/* ============================================================
   1. TOKENS Ã‚Â· sistema de variables
   ============================================================ */

:root,
[data-bs-theme="light"] {
  color-scheme: light;
  /* =====================================================================
     PALETA Ã‚Â· TeorÃƒÂ­a del color
     ---------------------------------------------------------------------
     Marca: ROJO itÃƒÂ¡lico profundo (#a01818) Ã¢Â€Â” cÃƒÂ¡lido, sofisticado.
     Complementario: TEAL (#0f766e) en eje 180Ã‚Â° Ã¢Â€Â” usado en elementos no
       crÃƒÂ­ticos para crear respiraciÃƒÂ³n visual y romper la monotonia del rojo.
     TriÃƒÂ¡dicos: rojo + verde-azulado (success) + indigo (info) en armÃƒÂ³nica
       distancia 120Ã‚Â°. La danger es rosa (rose-600) para distinguirse del
       brand sin saturar el ojo.
     Neutrales: escala con tinte ligeramente cÃƒÂ¡lido (sintoniza con el rojo).
     Contraste: todos los pares text/bg cumplen WCAG AA (Ã¢Â‰Â¥4.5:1).
     ===================================================================== */

  /* Marca Ã‚Â· rojo itÃƒÂ¡lico profundo */
  --bc-brand:        #a01818;            /* AAA con #fff: 8.45:1 */
  --bc-brand-rgb:    160, 24, 24;
  --bc-brand-dark:   #7a0f0f;
  --bc-brand-light:  #c44545;
  --bc-brand-soft:   #fce7e6;            /* fondo suave para alerts/hover */
  --bc-brand-50:     #fef5f4;
  --bc-brand-100:    #fce7e6;

  /* Acento complementario Ã‚Â· teal profundo (eje 180Ã‚Â° del rojo) */
  --bc-accent:       #0f766e;            /* AA con #fff: 5.92:1 */
  --bc-accent-rgb:   15, 118, 110;
  --bc-accent-dark:  #0a5a55;
  --bc-accent-light: #14b8a6;
  --bc-accent-soft:  #ccfbf1;

  /* Neutrales cÃƒÂ¡lidos (zinc con micro tinte rojo) */
  --bc-bg:           #ffffff;
  --bc-bg-rgb:  255, 255, 255;
  --bc-bg-muted:     #fbfaf9;            /* warm white Ã¢Â€Â” sintoniza con rojo */
  --bc-bg-muted-rgb:  251, 250, 249;
  --bc-surface:      #ffffff;
  --bc-surface-rgb:  255, 255, 255;
  --bc-surface-2:    #f7f5f3;            /* warm zinc 50 */
  --bc-surface-2-rgb:  247, 245, 243;
  --bc-surface-3:    #ebe8e5;            /* warm zinc 200 */
  --bc-surface-3-rgb:  235, 232, 229;

  /* Texto (warm zinc) */
  --bc-text:         #1c1917;            /* warm stone 900 Ã¢Â€Â” contraste 18:1 */
  --bc-text-rgb:  28, 25, 23;
  --bc-text-muted:   #6a6460;            /* contraste 4.8:1 */
  --bc-text-muted-rgb:  106, 100, 96;
  --bc-text-subtle:  #6e6763;            /* contraste 4.6:1 */
  --bc-text-subtle-rgb:  110, 103, 99;

  /* Bordes */
  --bc-line:         #e7e3df;
  --bc-line-rgb:  231, 227, 223;
  --bc-line-strong:  #d6d1cc;
  --bc-line-strong-rgb:  214, 209, 204;

  /* Funcionales Ã‚Â· armÃƒÂ³nicos con la marca */
  --bc-success:      #047857;            /* emerald-700 Ã¢Â€Â” complementario a rojo */
  --bc-success-rgb:  4, 120, 87;
  --bc-success-soft: #d1fae5;
  --bc-warning:      #92400e;            /* amber-800 Ã¢Â€Â” cÃƒÂ¡lido, refinado */
  --bc-warning-rgb:  146, 64, 14;
  --bc-warning-soft: #fef3c7;
  --bc-danger:       #be123c;            /* rose-700 Ã¢Â€Â” distinguible del brand */
  --bc-danger-rgb:  190, 18, 60;
  --bc-danger-soft:  #ffe4e6;
  --bc-info:         #1e40af;            /* indigo-800 Ã¢Â€Â” triÃƒÂ¡dico al rojo */
  --bc-info-rgb:  30, 64, 175;
  --bc-info-soft:    #dbeafe;

  /* Medallas Ã‚Â· ranking */
  --bc-rank-silver:  #6b6966;
  --bc-rank-bronze:  #a0522d;

  /* Sombras (con tinte cÃƒÂ¡lido sutil) */
  --bc-shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.05);
  --bc-shadow-sm: 0 2px 4px rgba(28, 25, 23, 0.06);
  --bc-shadow-md: 0 4px 14px rgba(28, 25, 23, 0.08);
  --bc-shadow-lg: 0 12px 32px rgba(28, 25, 23, 0.12);
  --bc-shadow-xl: 0 24px 60px rgba(28, 25, 23, 0.18);

  /* GeometrÃƒÂ­a */
  --bc-radius-xs: 4px;
  --bc-radius-sm: 8px;
  --bc-radius-md: 12px;
  --bc-radius-lg: 16px;
  --bc-radius-xl: 22px;

  /* Layout */
  --bc-navbar-h:        58px;
  --bc-sidebar-w:       248px;
  --bc-sidebar-w-tablet:220px;

  /* TipografÃƒÂ­a escalable */
  --bc-fs-page-title: 2rem;
  --bc-fs-card-title: 1rem;
  --bc-fs-kpi-value:  2.1rem;
  --bc-pad-main:      1rem;

  /* Acento dorado champagne Ã¢Â€Â” usado en logo + sutiles detalles premium */
  --bc-gold:         #c79347;
  --bc-gold-rgb:  199, 147, 71;
  --bc-gold-light:   #e8c574;
  --bc-gold-soft:    #fdf6e6;

  /* Familias tipogrÃƒÂ¡ficas Ã¢Â€Â” Inter como cuerpo premium/moderno; Bebas display; Playfair serif */
  --bc-font-display: 'Bebas Neue', 'Inter', 'Anton', 'Oswald', Impact, sans-serif;
  --bc-font-body:    'Inter', 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bc-font-serif:   'Playfair Display', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --bc-font-mono:    'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, 'Liberation Mono', monospace;

  /* =====================================================================
     MOTION Ã‚Â· sistema de animaciÃƒÂ³n (v1.9 Ã¢Â€Â” pulido premium)
     ---------------------------------------------------------------------
     Curvas y duraciones consistentes. Inspirado en Material 3 + Stripe.
     Ã‚Â· ease-out Ã¢Â†Â’ entradas (el usuario VE el final del movimiento)
     Ã‚Â· ease-in  Ã¢Â†Â’ salidas (foco en el origen)
     Ã‚Â· ease-in-out Ã¢Â†Â’ transformaciones simultÃƒÂ¡neas (estados)
     Ã‚Â· spring Ã¢Â†Â’ bounce sutil para feedback positivo (botÃƒÂ³n pulsado, save OK)
     ===================================================================== */
  --bc-ease-out:      cubic-bezier(0.32, 0.72, 0, 1);     /* ease-out elegant */
  --bc-ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);     /* smooth state transition */
  --bc-ease-spring:   cubic-bezier(0.5, 1.6, 0.4, 0.95);  /* subtle bounce */ /* impeccable-disable-line bounce-easing */
  --bc-ease-snappy:   cubic-bezier(0.4, 0, 0.2, 1);       /* Material-style */
  --bc-dur-instant:   80ms;
  --bc-dur-fast:      150ms;
  --bc-dur-base:      240ms;
  --bc-dur-slow:      360ms;
  --bc-dur-page:      500ms;

  /* =====================================================================
     SPACING Ã‚Â· escala 4/8px base (v1.9)
     Modular scale: cada salto multiplica por ~1.5
     ===================================================================== */
  --bc-space-0:    0;
  --bc-space-px:   1px;
  --bc-space-0_5:  2px;
  --bc-space-1:    4px;
  --bc-space-1_5:  6px;
  --bc-space-2:    8px;
  --bc-space-3:    12px;
  --bc-space-4:    16px;
  --bc-space-5:    20px;
  --bc-space-6:    24px;
  --bc-space-8:    32px;
  --bc-space-10:   40px;
  --bc-space-12:   48px;
  --bc-space-16:   64px;
  --bc-space-20:   80px;
  --bc-space-24:   96px;

  /* =====================================================================
     Z-INDEX Ã‚Â· jerarquÃƒÂ­a explÃƒÂ­cita (v1.9 Ã¢Â€Â” evita stacking accidents)
     ===================================================================== */
  --bc-z-base:     1;
  --bc-z-raised:   10;
  --bc-z-sticky:   100;
  --bc-z-nav:      500;
  --bc-z-dropdown: 1000;
  --bc-z-modal:    1050;
  --bc-z-toast:    1200;
  --bc-z-tooltip:  1500;
  --bc-z-overlay:  2000;

  /* =====================================================================
     FOCUS RING Ã‚Â· accesibilidad WCAG 2.4.7 + UX premium (v1.9)
     Combina outline + ring sutil con offset para no pegar al borde.
     v3.71 — Focus en teal (--bc-accent): separa el acento interactivo del
     rojo de marca, reservado a identidad y alertas.
     ===================================================================== */
  --bc-focus-ring:        0 0 0 3px rgba(var(--bc-accent-rgb), 0.32);
  --bc-focus-ring-inset:  inset 0 0 0 2px rgba(var(--bc-accent-rgb), 0.5);
  --bc-focus-outline:     2px solid rgba(var(--bc-accent-rgb), 0.85);
  --bc-focus-offset:      2px;

  /* =====================================================================
     GLASSMORPHISM Ã‚Â· superficies translÃƒÂºcidas premium (v1.9)
     Para overlays, dropdowns flotantes, status pills, etc.
     ===================================================================== */
  --bc-glass:        rgba(255, 255, 255, 0.72);
  --bc-glass-rgb:  255, 255, 255;
  --bc-glass-blur:   saturate(140%) blur(14px);
  --bc-glass-border: rgba(255, 255, 255, 0.5);
  --bc-glass-border-rgb:  255, 255, 255;

  color-scheme: light;
}

[data-bs-theme="dark"] {
  color-scheme: dark;
  /* Dark refinado: el rojo se eleva al rose-400 para contraste sin agresiÃƒÂ³n */
  --bc-brand:        #f87171;            /* contraste 5.5:1 con #0a0a0a */
  --bc-brand-rgb:    248, 113, 113;
  --bc-brand-dark:   #dc2626;
  --bc-brand-light:  #fca5a5;
  --bc-brand-soft:   #2a0a0a;
  --bc-brand-50:     #1a0606;
  --bc-brand-100:    #2a0a0a;

  /* Familias tipogrÃƒÂ¡ficas Ã¢Â€Â” deben repetirse en dark para evitar fallback a serif */
  --bc-font-display: 'Bebas Neue', 'Inter', 'Anton', 'Oswald', Impact, sans-serif;
  --bc-font-body:    'Inter', 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bc-font-serif:   'Playfair Display', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --bc-font-mono:    'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, 'Liberation Mono', monospace;

  /* Acento teal vibrante (para respiro visual) */
  --bc-accent:       #2dd4bf;            /* teal-400 contraste 7.4:1 */
  --bc-accent-rgb:   45, 212, 191;
  --bc-accent-dark:  #14b8a6;
  --bc-accent-light: #5eead4;
  --bc-accent-soft:  #042f2e;

  /* Neutrales Ã¢Â€Â” escala oscura premium con tinte cÃƒÂ¡lido sutil */
  --bc-bg:           #0c0a09;            /* warm stone 950 */
  --bc-bg-rgb:  12, 10, 9;
  --bc-bg-muted:     #14110f;
  --bc-bg-muted-rgb:  20, 17, 15;
  --bc-surface:      #1c1917;            /* warm stone 900 */
  --bc-surface-rgb:  28, 25, 23;
  --bc-surface-2:    #292524;            /* warm stone 800 */
  --bc-surface-2-rgb:  41, 37, 36;
  --bc-surface-3:    #3a3735;            /* warm stone 700 */
  --bc-surface-3-rgb:  58, 55, 53;

  /* Texto (warm stone) */
  --bc-text:         #f5f5f4;            /* contraste 18:1 con bg */
  --bc-text-rgb:  245, 245, 244;
  --bc-text-muted:   #a8a29e;            /* contraste 6.5:1 */
  --bc-text-muted-rgb:  168, 162, 158;
  --bc-text-subtle:  #a6a19d;            /* contraste 4.6:1 */
  --bc-text-subtle-rgb:  166, 161, 157;

  /* Bordes â€” mÃ¡s definidos en dark para tarjetas y tablas */
  --bc-line:         #3a3735;
  --bc-line-rgb:  58, 55, 53;
  --bc-line-strong:  #57534e;
  --bc-line-strong-rgb:  87, 83, 78;

  /* Funcionales Ã¢Â€Â” mÃƒÂ¡s luminosos para dark, manteniendo distinciÃƒÂ³n */
  --bc-success:      #34d399;            /* emerald-400 Ã¢Â€Â” complementario brillante */
  --bc-success-rgb:  52, 211, 153;
  --bc-success-soft: #022c1c;
  --bc-warning:      #fbbf24;            /* amber-400 */
  --bc-warning-rgb:  251, 191, 36;
  --bc-warning-soft: #2a1a02;
  --bc-danger:       #fb7185;            /* rose-400 Ã¢Â€Â” distinguible del brand red */
  --bc-danger-rgb:  251, 113, 133;
  --bc-danger-soft:  #2c0813;
  --bc-info:         #818cf8;            /* indigo-400 Ã¢Â€Â” triÃƒÂ¡dico */
  --bc-info-rgb:  129, 140, 248;
  --bc-info-soft:    #1e1b4b;

  /* Medallas Ã‚Â· ranking */
  --bc-rank-silver:  #a8a29e;           /* contraste 7.8:1 sobre bg dark */
  --bc-rank-bronze:  #cd7f32;           /* contraste 6.3:1 sobre superficies dark */

  /* Sombras profundas */
  --bc-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --bc-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.6);
  --bc-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.7);
  --bc-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.8);
  --bc-shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.9);

  /* Acento dorado mÃƒÂ¡s cÃƒÂ¡lido para dark Ã¢Â€Â” recuerda a luz de vela */
  --bc-gold:         #e8c574;
  --bc-gold-rgb:  232, 197, 116;
  --bc-gold-light:   #f5d796;
  --bc-gold-soft:    #2a2208;

  /* Glassmorphism dark Ã¢Â€Â” superficies elevadas translÃƒÂºcidas */
  --bc-glass:        rgba(28, 25, 23, 0.72);
  --bc-glass-rgb:  28, 25, 23;
  --bc-glass-blur:   saturate(180%) blur(14px);
  --bc-glass-border: rgba(255, 255, 255, 0.08);
  --bc-glass-border-rgb:  255, 255, 255;

  /* Focus ring mÃƒÂ¡s visible en dark (mayor opacidad para contraste) */
  --bc-focus-ring:        0 0 0 3px rgba(var(--bc-accent-rgb), 0.45);
  --bc-focus-ring-inset:  inset 0 0 0 2px rgba(var(--bc-accent-rgb), 0.6);
  --bc-focus-outline:     2px solid rgba(var(--bc-accent-rgb), 0.9);

  color-scheme: dark;
}

/* ============================================================
   2. BASE
   ============================================================ */

* {
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* v1.9 Ã¢Â€Â” Focus visible WCAG 2.4.7 + premium UX.
   :focus-visible solo aplica cuando el usuario navega con teclado
   o lector de pantalla, NO en clicks mouse (evita "ring fantasma"). */
:focus { outline: none; }
:focus-visible {
  outline: var(--bc-focus-outline);
  outline-offset: var(--bc-focus-offset);
  border-radius: inherit;
}
/* Botones e inputs: ring sombra (mÃƒÂ¡s premium que outline plano) */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
[role="button"]:focus-visible {
  outline: none;
  box-shadow: var(--bc-focus-ring);
}

/* v1.9 Ã¢Â€Â” Smooth scroll global (PWA navegaciÃƒÂ³n entre secciones suave).
   Respeta prefers-reduced-motion automÃƒÂ¡ticamente. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bc-navbar-h) + var(--bc-pad-main, 1rem));
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}

/* v1.9 Ã¢Â€Â” Reduced motion: bloque especÃƒÂ­fico en premium animations. */

html, body {
  background: var(--bc-bg);
  color: var(--bc-text);
  font-family: var(--bc-font-body);
  font-feature-settings: 'kern', 'liga', 'calt';
  font-weight: 400;
  transition: background-color 0.2s ease, color 0.2s ease;
  /* P1 — overflow-x delegado a los wrappers de superficie (.login-wrap,
     .legal-page-wrap, .track-wrap, .bcd-login-wrap, .bcd-app) para no
     recortar overlays posicionados. Cada view carga su propio wrapper. */
}

/* Headings heredan Montserrat por defecto; usar .bc-display para Bebas */
h1, h2, h3, h4, h5, h6 { font-family: var(--bc-font-body); font-weight: 700; letter-spacing: -0.01em; }

.bc-display {
  font-family: var(--bc-font-display);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

::selection { background: rgba(var(--bc-brand-rgb), 0.25); color: var(--bc-text); }

a { color: var(--bc-brand); text-decoration: none; }
a:hover { color: var(--bc-brand-dark); }

[data-bs-theme="dark"] a:hover { color: var(--bc-brand-light); }

code, kbd { font-family: var(--bc-font-mono); font-size: 0.85em; }

/* Bootstrap overrides para que use tokens */
.text-brand { color: var(--bc-brand) !important; }
.bg-brand   { background: var(--bc-brand) !important; }
.text-muted { color: var(--bc-text-muted) !important; }

/* Botones globales con Montserrat (Bootstrap usa system por defecto) */
.btn { font-family: var(--bc-font-body); font-weight: 600; letter-spacing: 0.01em; }

/* v1.9 Ã¢Â€Â” Botones premium con gradient sutil + motion curve refinada.
   El gradient aÃƒÂ±ade dimensiÃƒÂ³n sin perder seriedad (vs flat plano).
   Hover: glow soft con la curva ease-out, no jarring. */
.btn-brand {
  position: relative;
  background: linear-gradient(180deg, var(--bc-brand) 0%, var(--bc-brand-dark) 100%);
  color: var(--bc-bg);
  border: 1px solid var(--bc-brand-dark);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    background var(--bc-dur-fast) var(--bc-ease-out),
    transform var(--bc-dur-instant) var(--bc-ease-snappy),
    box-shadow var(--bc-dur-fast) var(--bc-ease-out);
}
.btn-brand:hover {
  background: linear-gradient(180deg, var(--bc-brand-dark) 0%, var(--bc-brand-dark) 100%);
  border-color: var(--bc-brand-dark);
  color: var(--bc-bg);
  box-shadow: 0 6px 18px rgba(var(--bc-brand-rgb), 0.36),
              0 1px 0 rgba(255,255,255,0.1) inset;
  transform: translateY(-1px);
}
.btn-brand:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(var(--bc-brand-rgb), 0.2),
              inset 0 1px 2px rgba(0,0,0,0.15);
}
.btn-brand:disabled,
.btn-brand.disabled {
  background: var(--bc-text-subtle);
  border-color: var(--bc-text-subtle);
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.btn-outline-brand {
  background: transparent;
  color: var(--bc-brand);
  border: 1px solid var(--bc-brand);
  font-weight: 600;
  transition:
    background var(--bc-dur-fast) var(--bc-ease-out),
    color var(--bc-dur-fast) var(--bc-ease-out),
    box-shadow var(--bc-dur-fast) var(--bc-ease-out),
    transform var(--bc-dur-instant) var(--bc-ease-snappy);
}
.btn-outline-brand:hover {
  background: var(--bc-brand);
  color: var(--bc-bg);
  box-shadow: 0 4px 14px rgba(var(--bc-brand-rgb), 0.28);
  transform: translateY(-1px);
}
.btn-outline-brand:active { transform: translateY(1px); }

/* Form controls dark-aware */
.form-control, .form-select {
  background: var(--bc-surface);
  color: var(--bc-text);
  border-color: var(--bc-line);
}
.form-control:focus, .form-select:focus {
  background: var(--bc-surface);
  color: var(--bc-text);
  border-color: var(--bc-brand);
  box-shadow: 0 0 0 0.18rem rgba(var(--bc-brand-rgb), 0.2);
}
.form-control::placeholder { color: var(--bc-text-subtle); }
.input-group-text {
  background: var(--bc-surface-2);
  color: var(--bc-text-muted);
  border-color: var(--bc-line);
}

/* Dark-mode form controls: use surface-2 so inputs stand out from surface bg */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background: var(--bc-surface-2);
  border-color: var(--bc-line-strong);
  color: var(--bc-text);
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background: var(--bc-surface-2);
  border-color: var(--bc-accent);
}
[data-bs-theme="dark"] .input-group-text {
  background: var(--bc-surface-3);
  border-color: var(--bc-line-strong);
}
[data-bs-theme="dark"] .dropdown-menu {
  background: var(--bc-surface-2);
}
[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background: var(--bc-surface-3);
}
[data-bs-theme="dark"] .popover {
  background: var(--bc-surface-2);
}
[data-bs-theme="dark"] .popover-header {
  background: var(--bc-surface-3);
}

/* Badges keep Bootstrap defaults but soften with brand alignment */
.badge.text-bg-warning { background-color: var(--bc-warning-soft) !important; color: var(--bc-text) !important; }
.badge.text-bg-info    { background-color: var(--bc-info-soft) !important;    color: var(--bc-info) !important; }
.badge.text-bg-success { background-color: var(--bc-success-soft) !important; color: var(--bc-success) !important; }
.badge.text-bg-danger  { background-color: var(--bc-danger-soft) !important;  color: var(--bc-danger) !important; }
.badge.text-bg-light   { background-color: var(--bc-surface-2) !important;    color: var(--bc-text-muted) !important; }
.badge.text-bg-secondary { background-color: var(--bc-surface-3) !important;  color: var(--bc-text-muted) !important; }
.badge.text-bg-primary { background-color: rgba(var(--bc-brand-rgb), 0.12) !important; color: var(--bc-brand) !important; }
.badge.text-bg-dark    { background-color: var(--bc-text); color: var(--bc-bg) !important; }

/* Alerts with token-based variants */
.alert {
  border: 1px solid transparent;
  border-radius: var(--bc-radius-md);
}
.alert-warning { background: var(--bc-warning-soft); color: var(--bc-text); border-color: rgba(161, 98, 7, 0.2); }
.alert-danger  { background: var(--bc-danger-soft);  color: var(--bc-danger);  border-color: rgba(185, 28, 28, 0.2); }
.alert-success { background: var(--bc-success-soft); color: var(--bc-success); border-color: rgba(21, 128, 61, 0.2); }
.alert-info    { background: var(--bc-info-soft);    color: var(--bc-info);    border-color: rgba(29, 78, 216, 0.2); }

/* Modal dark-aware */
.modal-content {
  background: var(--bc-surface);
  color: var(--bc-text);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-lg);
}
.modal-header, .modal-footer {
  border-color: var(--bc-line);
}
.modal-title { color: var(--bc-text); font-weight: 700; }
.btn-close {
  filter: invert(0);
}
[data-bs-theme="dark"] .btn-close { filter: invert(1) brightness(0.9); }

/* Dropdowns */
.dropdown-menu {
  background: var(--bc-surface);
  color: var(--bc-text);
  border: 1px solid var(--bc-line);
  box-shadow: var(--bc-shadow-lg);
  border-radius: var(--bc-radius-md);
}
.dropdown-item { color: var(--bc-text); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--bc-surface-2); color: var(--bc-text); }
.dropdown-divider { border-color: var(--bc-line); }

/* Popovers */
.popover {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  box-shadow: var(--bc-shadow-lg);
}
.popover-arrow::before, .popover-arrow::after { border-color: transparent; }
.popover-header { background: var(--bc-surface-2); color: var(--bc-text); border-bottom-color: var(--bc-line); }
.popover-body   { color: var(--bc-text); }

/* Progress bars sutiles */
.progress { background: var(--bc-surface-3); border-radius: 999px; overflow: hidden; }

/* ============================================================
   3. LOGIN
   ============================================================ */

.login-bg {
  /* Aurora dual: rojo (marca) + teal (acento complementario) en esquinas opuestas */
  background:
    radial-gradient(circle at 15% 5%, rgba(var(--bc-brand-rgb), 0.16) 0%, transparent 55%),
    radial-gradient(circle at 85% 95%, rgba(var(--bc-accent-rgb), 0.12) 0%, transparent 55%),
    radial-gradient(circle at 70% 20%, rgba(var(--bc-brand-rgb), 0.06) 0%, transparent 45%),
    var(--bc-bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-wrap { width: 100%; max-width: 460px; overflow-x: clip; }
.login-card {
  background: var(--bc-surface);
  border-radius: var(--bc-radius-xl);
  padding: 2.75rem 2.25rem 2rem;
  border: 1px solid var(--bc-line);
  box-shadow: var(--bc-shadow-lg);
  position: relative;
  overflow: hidden;
}
/* Filete dorado fino arriba del card Ã¢Â€Â” detalle premium discreto */
.login-card::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--bc-brand) 25%,
    var(--bc-gold-light) 50%,
    var(--bc-brand) 75%,
    transparent 100%);
  opacity: 0.85;
}
.login-brand { text-align: center; margin-bottom: 1.75rem; }
.login-logo {
  width: 88px; height: 88px;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 8px 20px rgba(var(--bc-brand-rgb), 0.25));
}
.login-logo svg, .login-logo img { width: 100%; height: 100%; display: block; }
.login-title {
  font-family: var(--bc-font-display);
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--bc-text);
  margin: 0 0 0.3rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.login-title em {
  font-family: var(--bc-font-serif);
  font-style: italic;
  font-weight: 700;
  color: var(--bc-brand);
  letter-spacing: 0;
  text-transform: none;
  margin-left: 0.15em;
}
.login-sub {
  color: var(--bc-text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  margin: 0;
}
.login-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bc-line);
}
.login-legal {
  text-align: center;
  color: var(--bc-text-subtle);
  font-size: 0.78rem;
  margin-top: 1.5rem;
  letter-spacing: 0.02em;
}
.login-legal-disclaimer {
  text-align: center;
  color: var(--bc-text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0.4rem auto 0;
  max-width: 400px;
  letter-spacing: 0;
  text-transform: none;
}
.login-legal-disclaimer a {
  color: var(--bc-brand);
  text-decoration: none;
  border-radius: 0.2rem;
}
.login-legal-disclaimer a:hover { text-decoration: underline; color: var(--bc-brand-dark); }
.login-legal-disclaimer a:focus-visible {
  outline: 2px solid var(--bc-brand);
  outline-offset: 2px;
}
[data-bs-theme="dark"] .login-legal-disclaimer a:hover { color: var(--bc-brand-light); }

/* v2.2.4 â€” Cuerpo de modales legales */
.bc-legal-body {
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--bc-text);
}
.bc-legal-body section + section { margin-top: 1.25rem; }
.bc-legal-body h3 {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bc-text);
  margin-bottom: 0.5rem;
}
.bc-legal-body p { margin-bottom: 0.5rem; }
.bc-legal-body ul { padding-left: 1.1rem; margin-bottom: 0.5rem; }
.bc-legal-body li { margin-bottom: 0.4rem; }
.bc-legal-body a { color: var(--bc-brand); text-decoration: underline; }
.bc-legal-body a:hover { color: var(--bc-brand-dark); }
.bc-legal-body code {
  font-family: var(--bc-font-mono, monospace);
  font-size: 0.78rem;
  background: var(--bc-surface-2);
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
}

/* v2.2.4 â€” Marcador para datos legales sin configurar */
.bc-legal-missing {
  color: var(--bc-danger, #dc2626);
  font-style: italic;
  font-weight: 500;
  cursor: help;
  border-bottom: 1px dashed var(--bc-danger, #dc2626);
}

/* ============================================================
   4. NAVBAR PREMIUM
   ============================================================ */

.bc-navbar {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--bc-line);
  padding: 0.4rem 0;
  min-height: var(--bc-navbar-h);
  position: relative;
  z-index: 1030;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
[data-bs-theme="dark"] .bc-navbar {
  background: rgba(12, 10, 9, 0.78);
  border-bottom-color: var(--bc-line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.02);
}

.bc-burger.bc-burger {
  color: var(--bc-text-muted);
  background: transparent;
  border: none;
}
.bc-burger.bc-burger:hover { color: var(--bc-brand); }

.bc-brand.bc-brand {
  font-family: var(--bc-font-display);
  font-weight: 400;
  color: var(--bc-text);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.bc-brand.bc-brand:hover { opacity: 0.92; color: var(--bc-text); }
.bc-brand:hover .bc-brand-logo { transform: rotate(-3deg) scale(1.03); }

.bc-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(var(--bc-brand-rgb), 0.22));
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bc-brand-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 8px;
  /* v1.6: smoother fade-in cuando se cambia el logo en runtime */
  opacity: 1;
  transition: opacity 0.18s ease;
}
.bc-brand-logo svg { width: 100%; height: 100%; display: block; }

/* ============================================================
   4.b Ã‚Â· BRAND LOGO ASPECT-RATIO AWARE (v1.6)
   ------------------------------------------------------------
   Tras subir un logo, brand-logo.js detecta el aspect ratio y
   aÃƒÂ±ade [data-logo-aspect] al wrapper. CSS adapta el ancho:
   square (1:1) Ã¢Â†Â’ 40px Ã‚Â· wide (1.25-2.5:1) Ã¢Â†Â’ 64px Ã‚Â· extra-wide
   (>2.5:1, tÃƒÂ­pico wordmarks) Ã¢Â†Â’ 96px. Manteniendo altura 40px,
   object-fit:contain preserva proporciones sin distorsiÃƒÂ³n.
   ============================================================ */
.bc-brand-logo[data-logo-aspect="wide"] {
  width: 64px;
}
.bc-brand-logo[data-logo-aspect="extra-wide"] {
  width: 96px;
}
.bc-brand-logo[data-logo-aspect="tall"] {
  width: 30px;
}

/* En navbar el wordmark stacked queda redundante con un wordmark wide
   subido por el usuario Ã¢Â€Â” lo ocultamos para no doblar la marca. */
.bc-brand-logo[data-logo-aspect="wide"] + .bc-brand-wordmark,
.bc-brand-logo[data-logo-aspect="extra-wide"] + .bc-brand-wordmark {
  display: none;
}

/* Login logo mÃƒÂ¡s grande y reactivo al aspect ratio */
.login-logo[data-logo-aspect="wide"] {
  width: 140px; height: 88px;
}
.login-logo[data-logo-aspect="extra-wide"] {
  width: 200px; height: 78px;
}

/* Wordmark stacked: 'Casa Bella' (serif italic small) + 'Manager' (Bebas tracked) */
.bc-brand-wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 1px;
  white-space: nowrap;
  min-width: 0;
}
.bc-brand-line-1 {
  font-family: var(--bc-font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--bc-brand);
  letter-spacing: 0.005em;
}
.bc-brand-line-2 {
  font-family: var(--bc-font-display);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--bc-text);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.bc-mode-pill {
  margin-left: 0.6rem;
  font-family: var(--bc-font-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--bc-brand-soft);
  color: var(--bc-brand);
  border: 1px solid rgba(var(--bc-brand-rgb), 0.25);
  padding: 0.15rem 0.65rem 0.05rem;
  border-radius: 999px;
  font-weight: 400;
  cursor: help;
  line-height: 1;
  flex-shrink: 0;
}
.bc-mode-pill.live {
  background: var(--bc-success-soft);
  color: var(--bc-success);
  border-color: rgba(21, 128, 61, 0.3);
}

/* Quick search */
.bc-quick-search {
  position: relative;
  margin-left: 1.25rem;
  /* v1.5: sin margin-right:auto. El bloque derecho .ms-auto ya empuja
     todo a la derecha. Tener ambos margin auto causa que los iconos
     (campana + theme toggle) se peguen al search o queden ocultos en
     viewports estrechos. */
  flex: 0 1 360px;
  min-width: 0;
  display: flex;
  align-items: center;
  background: var(--bc-surface-2);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  padding: 0 0.6rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.bc-quick-search:focus-within {
  background: var(--bc-surface);
  border-color: var(--bc-brand);
  box-shadow: 0 0 0 3px rgba(var(--bc-brand-rgb), 0.1);
}
.bc-quick-search > i {
  color: var(--bc-text-subtle);
  font-size: 0.95rem;
  margin-right: 0.4rem;
}
.bc-quick-search .form-control.form-control {
  background: transparent;
  border: none;
  color: var(--bc-text);
  padding: 0.4rem 0;
  box-shadow: none;
  font-size: 0.88rem;
}
.bc-quick-search .form-control::placeholder { color: var(--bc-text-subtle); }
.bc-kbd {
  font-family: var(--bc-font-mono); /* teclas overused-font â€” Bellaciao design system */
  font-size: 0.78rem;
  line-height: 1.35;
  background: var(--bc-surface-3);
  color: var(--bc-text-muted);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  border: 1px solid var(--bc-line);
}

/* Bloque derecho del navbar (sync pill + theme toggle + bell + clock + user)
   v1.5 Ã¢Â€Â” Antes usaba .ms-auto.d-flex.align-items-center.gap-2 de Bootstrap.
   Movemos el control a una clase dedicada para garantizar visibilidad
   correcta en todos los breakpoints + spacing mÃƒÂ¡s generoso entre items. */
.bc-navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .bc-navbar-actions { gap: 0.55rem; }
}

/* Reloj en navbar (HH:MM). Solo md+, color sutil pero legible. */
.bc-now-clock {
  font-family: var(--bc-font-mono);
  font-size: 0.78rem;
  color: var(--bc-text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding: 0 0.35rem;
  flex-shrink: 0;
}

/* Iconos en navbar Ã¢Â€Â” v1.6: chip premium estilo Linear/Vercel
   ------------------------------------------------------------
   El icono "vive" sobre una superficie sutil (chip) en idle para
   ganar peso visual sobre el navbar translÃƒÂºcido con blur. Al
   hover el chip se tinta con la marca + ring sutil + glow.
   Soluciona el problema histÃƒÂ³rico: iconos planos invisibles
   sobre el navbar blur. */
.bc-icon-btn.bc-icon-btn {
  position: relative;
  background: var(--bc-surface-2);
  border: 1px solid var(--bc-line);
  color: var(--bc-text);
  width: 44px; height: 44px;
  border-radius: var(--bc-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.1s ease,
    box-shadow 0.18s ease;
}
.bc-icon-btn.bc-icon-btn:hover, .bc-icon-btn.bc-icon-btn:focus {
  background: color-mix(in srgb, var(--bc-brand) 12%, var(--bc-surface));
  color: var(--bc-brand);
  border-color: color-mix(in srgb, var(--bc-brand) 32%, var(--bc-line));
  box-shadow: 0 4px 14px rgba(var(--bc-brand-rgb), 0.18);
  outline: none;
}
.bc-icon-btn.bc-icon-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--bc-brand-rgb), 0.22);
}
.bc-icon-btn.bc-icon-btn:active { transform: scale(0.93); }
.bc-icon-btn.bc-icon-btn i { font-size: 1.1rem; line-height: 1; }
/* En dark: chip mÃƒÂ¡s oscuro para que destaque sobre el navbar con blur */
[data-bs-theme="dark"] .bc-icon-btn.bc-icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-bs-theme="dark"] .bc-icon-btn.bc-icon-btn:hover,
[data-bs-theme="dark"] .bc-icon-btn.bc-icon-btn:focus {
  background: color-mix(in srgb, var(--bc-brand) 18%, var(--bc-surface));
  border-color: color-mix(in srgb, var(--bc-brand) 45%, transparent);
  box-shadow: 0 4px 18px rgba(var(--bc-brand-rgb), 0.32);
}

.bc-icon-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--bc-brand);
  color: var(--bc-bg);
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bc-bg);
  box-shadow: 0 1px 3px rgba(var(--bc-brand-rgb), 0.35);
  pointer-events: none;
}
/* En dark, el border del badge debe quedarse oscuro (color del navbar real,
   no del bg-muted) para que el contorno se note sobre el navbar tinted. */
[data-bs-theme="dark"] .bc-icon-badge { border-color: #0c0a09; }

/* User avatar premium Ã¢Â€Â” sin subrayado (Bootstrap .btn-link aÃƒÂ±ade uno por defecto) */
.bc-user-btn,
.bc-user-btn:hover,
.bc-user-btn:focus {
  background: transparent;
  border: none;
  color: var(--bc-text);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.2rem 0.7rem 0.2rem 0.2rem;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--bc-font-body);
  font-weight: 600;
  font-size: 0.88rem;
}
.bc-user-btn:hover,
.bc-user-btn:focus {
  background: var(--bc-surface-2);
}
.bc-user-btn span,
.bc-user-btn:hover span,
.bc-user-btn:focus span { text-decoration: none; }
.bc-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--bc-brand) 0%, var(--bc-brand-dark) 100%);
  color: var(--bc-bg);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  /* Borde sutil + sombra elevada Ã¢Â€Â” premium SaaS look (Linear/Vercel) */
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 2px 6px rgba(var(--bc-brand-rgb), 0.28);
  user-select: none;
}
/* Cuando hay foto de usuario, ocultamos el degradado de marca con la img */
.bc-avatar.has-img {
  background: var(--bc-surface-2);
}
.bc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.bc-avatar-status {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  background: var(--bc-success);
  border: 2px solid var(--bc-bg);
  border-radius: 50%;
  /* Asegura que el dot quede SIEMPRE encima incluso con overflow:hidden */
  z-index: 2;
}
.bc-user-menu {
  min-width: 220px;
  padding: 0.5rem 0;
}
.bc-user-menu .dropdown-item {
  font-size: 0.88rem;
  padding: 0.45rem 1rem;
}

.no-caret::after { display: none !important; }
.text-light-50 { color: var(--bc-text-muted) !important; }

/* ============================================================
   5. LAYOUT (sidebar + main)
   ============================================================ */

.bc-layout {
  display: flex;
  min-height: calc(100vh - var(--bc-navbar-h));
  background: var(--bc-bg);
  overflow-x: clip;
}

/* ============================================================
   5. SIDEBAR PREMIUM (v1.7)
   ------------------------------------------------------------
   En desktop (Ã¢Â‰Â¥lg = 992px): sticky fijo a la izquierda dentro
     del flex .bc-layout. Scroll interno, footer pegado abajo.
   En tablet/mobile (<lg): offcanvas-start NATIVO de Bootstrap.
     NO sobrescribimos position aquÃƒÂ­ porque Bootstrap necesita
     position: fixed + transform para el overlay slide-in.
   ============================================================ */

/* Estilos visuales comunes (aplican en ambos modos) */
.bc-sidebar {
  background: var(--bc-bg);
  border-right: 1px solid var(--bc-line);
  /* Scrollbar refinado */
  scrollbar-width: thin;
  scrollbar-color: var(--bc-line) transparent;
}
.bc-sidebar::-webkit-scrollbar { width: 6px; }
.bc-sidebar::-webkit-scrollbar-thumb {
  background: var(--bc-line);
  border-radius: 3px;
}
.bc-sidebar::-webkit-scrollbar-thumb:hover { background: var(--bc-line-strong); }

/* ---- DESKTOP (Ã¢Â‰Â¥992px): sticky en flex layout ----
   Bootstrap a este tamaÃƒÂ±o desactiva el offcanvas (lo vuelve estÃƒÂ¡tico,
   visible, transparente). AquÃƒÂ­ lo convertimos en un panel sticky que
   ocupa todo el alto disponible bajo el navbar. */
@media (min-width: 992px) {
  .bc-sidebar {
    width: var(--bc-sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: var(--bc-navbar-h);
    height: calc(100vh - var(--bc-navbar-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
  }
}

/* ---- MOBILE/TABLET (<992px): offcanvas Bootstrap puro ----
   NO tocamos position, transform, ni display: Bootstrap los gestiona.
   Solo refinamos el ancho con la variable oficial de Bootstrap. */
@media (max-width: 991.98px) {
  .bc-sidebar.offcanvas-lg {
    --bs-offcanvas-width: 280px;
    max-width: 85vw;
  }
}
@media (max-width: 575.98px) {
  .bc-sidebar.offcanvas-lg {
    --bs-offcanvas-width: 260px;
    max-width: 80vw;
  }
}

/* Cabecera mobile del sidebar: logo grande centrado + close button.
   Se oculta automÃƒÂ¡ticamente en desktop (clase d-lg-none en HTML). */
.bc-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--bc-line);
  position: relative;
}
.bc-sidebar-head::after {
  /* Filete dorado-rojo bajo la cabecera Ã¢Â€Â” detalle premium */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--bc-brand) 30%,
    var(--bc-gold-light) 50%,
    var(--bc-brand) 70%,
    transparent 100%);
  opacity: 0.55;
}
.bc-sidebar-head-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(var(--bc-brand-rgb), 0.22));
}
.bc-sidebar-head-logo svg,
.bc-sidebar-head-logo img {
  width: 100%; height: 100%;
  display: block;
}
.bc-sidebar-head .btn-close {
  --bs-btn-close-bg: none;
  font-size: 0.85rem;
  opacity: 0.7;
  padding: 0.5rem;
  margin: 0;
}
.bc-sidebar-head .btn-close:hover { opacity: 1; }

/* Body scrollable que crece para empujar el footer al fondo */
.bc-sidebar-body {
  flex: 1 1 auto;
  padding: 0.75rem 0;
  overflow-y: auto;
  min-height: 0;
}

/* Secciones del menÃƒÂº Ã¢Â€Â” agrupa items relacionados con tÃƒÂ­tulo uppercase */
.bc-nav-section {
  padding: 0.5rem 0;
}
.bc-nav-section + .bc-nav-section {
  border-top: 1px solid var(--bc-line);
  margin-top: 0.25rem;
}
.bc-nav-section-title {
  font-family: var(--bc-font-display);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bc-text-subtle);
  padding: 0.5rem 1.1rem 0.4rem;
  user-select: none;
}

/* Span del label dentro del nav-link (para tipografÃƒÂ­a controlada) */
.bc-nav-label { flex: 1; min-width: 0; }

.bc-nav { padding: 0 0.5rem; }
.bc-nav .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--bc-radius-sm);
  color: var(--bc-text-muted);
  font-family: var(--bc-font-body);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.18s ease;
  /* v1.4 Ã¢Â€Â” Evita que items con 2-3 palabras (ej. "Mapa en vivo", "Salud API")
     se partan en 2 lÃƒÂ­neas en sidebars estrechos. El sidebar ya tiene
     min-width fijo (--bc-sidebar-w / --bc-sidebar-w-tablet) suficiente
     para los labels actuales. */
  white-space: nowrap;
  min-width: 0;
}
/* Icon container premium Ã¢Â€Â” soft tinted "pill" detras del icono, estilo
   Linear / Stripe / Vercel dashboard. En idle el icon esta dentro de un
   chip muted muy sutil; al hacer hover el chip se tinta con el color de
   marca (Casa Bella red); en active el chip se vuelve glass blanco sobre
   el gradient rojo del item. Da al menu el "peso visual" de un SaaS
   premium sin sobrecargar la jerarquia tipografica. */
.bc-nav .nav-link i {
  font-size: 0.95rem;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bc-text-subtle) 10%, transparent);
  color: var(--bc-text-subtle);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  flex-shrink: 0;
}
.bc-nav .nav-link:hover {
  background: var(--bc-surface-2);
  color: var(--bc-text);
  transform: translateX(2px);
}
.bc-nav .nav-link:hover i {
  background: color-mix(in srgb, var(--bc-brand) 14%, transparent);
  color: var(--bc-brand);
  transform: scale(1.04);
}
.bc-nav .nav-link:focus-visible {
  outline: 2px solid var(--bc-brand);
  outline-offset: 2px;
}

/* Active state premium con gradient + barra lateral indicadora */
.bc-nav .nav-link.active {
  background: linear-gradient(135deg, var(--bc-brand) 0%, var(--bc-brand-dark) 100%);
  color: var(--bc-bg);
  font-weight: 600;
  padding-left: 0.85rem;
  box-shadow:
    0 4px 14px rgba(var(--bc-brand-rgb), 0.32),
    inset 0 1px 0 rgba(255,255,255,0.14);
}
.bc-nav .nav-link.active i {
  background: rgba(255, 255, 255, 0.20);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transform: none;
}
.bc-nav .nav-link.active .badge {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
/* Barrita dorada vertical pegada al borde izquierdo del item activo Ã¢Â€Â”
   detalle premium tipo Spotify/Linear. */
.bc-nav .nav-link.active::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--bc-gold-light);
  box-shadow: 0 0 10px rgba(232, 197, 116, 0.7);
}

/* Badges dentro de nav-link Ã¢Â€Â” alinean al final automÃƒÂ¡ticamente */
.bc-nav .nav-link .badge {
  margin-left: auto;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  line-height: 1;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* v3.67.0 Ã¢Â€Â” BotÃƒÂ³n CTA "Instalar app" en sidebar */
.bc-nav-install-item {
  margin: 0.6rem 0.45rem 0.2rem;
}
.bc-nav-install-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--bc-brand) 0%, var(--bc-brand-dark) 100%) !important;
  color: var(--bc-bg) !important;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 3px 10px rgba(var(--bc-brand-rgb), 0.35), inset 0 1px 0 rgba(255,255,255,0.14);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.bc-nav-install-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(var(--bc-brand-rgb), 0.45);
  filter: brightness(1.05);
}
.bc-nav-install-cta:active {
  transform: scale(0.98);
}
.bc-nav-install-cta i {
  font-size: 1.05rem;
  color: var(--bc-bg) !important;
  background: transparent !important;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.bc-nav-install-cta .bc-nav-label {
  flex: 0 0 auto;
}
.bc-sidebar[data-collapsed="true"] .bc-nav-install-cta {
  justify-content: center;
  padding: 0.55rem !important;
}
.bc-sidebar[data-collapsed="true"] .bc-nav-install-cta .bc-nav-label {
  display: none;
}
.bc-sidebar[data-collapsed="true"] .bc-nav-install-cta i {
  margin: 0;
  width: 32px;
  height: 32px;
  font-size: 1.15rem;
}

/* Footer del sidebar Ã¢Â€Â” premium, con link a la web + version pill */
.bc-sidebar-foot {
  flex-shrink: 0;
  padding: 0.75rem 0.75rem 1rem;
  border-top: 1px solid var(--bc-line);
  background: var(--bc-bg-muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.bc-sidebar-foot .bc-sidebar-foot-link {
  color: var(--bc-text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--bc-radius-sm);
  border: 1px solid var(--bc-line);
  background: var(--bc-surface);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.bc-sidebar-foot .bc-sidebar-foot-link i.ph-globe {
  font-size: 0.95rem;
  color: var(--bc-accent);
}
.bc-sidebar-foot .bc-sidebar-foot-link .bc-sidebar-foot-out {
  font-size: 0.85rem;
  color: var(--bc-text-subtle);
  transition: transform 0.15s ease;
}
.bc-sidebar-foot .bc-sidebar-foot-link:hover {
  background: var(--bc-surface-2);
  color: var(--bc-text);
  border-color: var(--bc-line-strong);
}
.bc-sidebar-foot .bc-sidebar-foot-link:hover .bc-sidebar-foot-out {
  transform: translate(2px, -2px);
  color: var(--bc-brand);
}

/* Version pill Ã¢Â€Â” chip discreto con versiÃƒÂ³n + entorno (demo/live) */
.bc-sidebar-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--bc-font-mono);
  font-size: 0.7rem;
  color: var(--bc-text-subtle);
  letter-spacing: 0.02em;
  padding: 0.2rem 0.5rem;
  user-select: none;
}
.bc-sidebar-ver-label { opacity: 0.7; }
.bc-sidebar-ver-dot   { opacity: 0.4; }
.bc-sidebar-ver-env {
  font-family: var(--bc-font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--bc-brand);
  font-weight: 400;
}
.bc-sidebar-ver-env.live { color: var(--bc-success); }

/* ============================================================
   5.b Ã‚Â· SIDEBAR Ã‚Â· Quick-search box Ã‚Â· ELIMINADO en v1.5.3
   ------------------------------------------------------------
   El input de bÃƒÂºsqueda en el menÃƒÂº lateral (caja "Buscar en el menÃƒÂºÃ¢Â€Â¦"
   con lupa y kbd `/`) se eliminÃƒÂ³ por decisiÃƒÂ³n UX: la nav es lo bastante
   compacta y la bÃƒÂºsqueda aÃƒÂ±adÃƒÂ­a ruido visual sin uso real. Se quitÃƒÂ³
   tambiÃƒÂ©n del HTML, del JS (wireSearch + atajos `/` y Ctrl+K) y del
   estado "search-empty" del aside.
   ============================================================ */

/* ============================================================
   5.c Ã‚Â· SIDEBAR Ã‚Â· Collapse toggle Ã‚Â· v1.5.4 PREMIUM REDESIGN
   ------------------------------------------------------------
   BotÃƒÂ³n "Plegar menÃƒÂº" rediseÃƒÂ±ado con look SaaS de gama alta
   (referencias: Linear sidebar, Vercel dashboard, Notion).
   CaracterÃƒÂ­sticas:
     Ã‚Â· Divider sutil arriba (separa visualmente del nav).
     Ã‚Â· Ghost-button look base Ã¢Â€Â” sin borde visible, color muted.
     Ã‚Â· Hover: micro-lift, gradient brand sutil, chip se ilumina.
     Ã‚Â· Chevron rota 180Ã‚Â° (cubic-bezier Material) en data-collapsed.
     Ã‚Â· Kbd hint estilo mac-keyboard con bevel 3D inferior.
     Ã‚Â· Active: scale 0.97 (feedback tÃƒÂ¡ctil).
     Ã‚Â· Atajo: tecla `[`.
   ============================================================ */

.bc-sidebar-collapse-btn {
  display: none;                 /* lo enseÃƒÂ±a d-lg-inline-flex en HTML */
  position: relative;            /* ancla para ::before gradient layer */
  align-items: center;
  gap: 0.65rem;
  margin: 0.5rem 0.75rem 0.5rem;
  padding: 0.6rem 0.65rem 0.6rem 0.55rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--bc-text-muted);
  border-radius: 12px;
  font-family: var(--bc-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  /* Soft inset shadow base para sensaciÃƒÂ³n tactile */
  box-shadow:
    inset 0 0 0 0 transparent,
    0 0 0 0 transparent;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.22s ease,
    transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Layered gradient bg que aparece en hover (slide-in desde izquierda).
   Da sensaciÃƒÂ³n premium tipo Linear cuando el cursor entra. */
.bc-sidebar-collapse-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 50%, rgba(var(--bc-brand-rgb), 0.10) 0%, transparent 60%),
    linear-gradient(135deg, rgba(var(--bc-brand-rgb), 0.04) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 0;
}

.bc-sidebar-collapse-btn:hover {
  background: var(--bc-surface);
  color: var(--bc-text);
  border-color: color-mix(in srgb, var(--bc-brand) 28%, var(--bc-line));
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 4px 12px -2px rgba(var(--bc-brand-rgb), 0.18),
    0 2px 4px -1px rgba(var(--bc-brand-rgb), 0.10);
}
.bc-sidebar-collapse-btn:hover::before { opacity: 1; }
.bc-sidebar-collapse-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(var(--bc-brand-rgb), 0.10);
  transition-duration: 0.08s;
}
.bc-sidebar-collapse-btn:focus-visible {
  outline: 2px solid var(--bc-brand);
  outline-offset: 2px;
}

/* ---- Chip que enmarca el chevron ----
   DiseÃƒÂ±o tipo "key icon": 26ÃƒÂ—26 con border, bg muted, shadow inset
   sutil. En hover se vuelve un chip brand con micro-glow. */
.bc-sidebar-collapse-icon-wrap {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--bc-bg-muted);
  color: var(--bc-text-muted);
  flex-shrink: 0;
  /* Inset shadow para dar profundidad mini-bevel */
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition:
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease;
}
.bc-sidebar-collapse-btn:hover .bc-sidebar-collapse-icon-wrap {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--bc-brand) 18%, transparent) 0%,
    color-mix(in srgb, var(--bc-brand) 10%, transparent) 100%);
  color: var(--bc-brand);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--bc-brand) 30%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 0 3px rgba(var(--bc-brand-rgb), 0.05);
}
.bc-sidebar-collapse-icon {
  font-size: 0.78rem;
  line-height: 1;
  /* RotaciÃƒÂ³n con Material easing cuando sidebar collapsed=true */
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* impeccable-disable-line bounce-easing */
}
.bc-sidebar[data-collapsed="true"] .bc-sidebar-collapse-icon {
  transform: rotate(180deg);
}

/* ---- Label "Plegar menÃƒÂº" ---- */
.bc-sidebar-collapse-label {
  flex: 1 1 auto;
  text-align: left;
  position: relative;
  z-index: 1;
  transition: color 0.18s ease;
}

/* ---- Kbd "[" estilo mac-keyboard premium ----
   Bevel 3D con borde inferior 2px + gradient vertical + inset shadow.
   En estado base es discreto (opacity 0.6); al hover sube a 1 y le
   damos una micro animaciÃƒÂ³n de "press". */
kbd.bc-sidebar-collapse-kbd {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--bc-text-subtle);
  background: linear-gradient(180deg,
    var(--bc-surface) 0%,
    var(--bc-bg-muted) 100%);
  border: 1px solid var(--bc-line);
  border-bottom-color: var(--bc-line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.22rem 0.42rem 0.18rem;
  min-width: 22px;
  text-align: center;
  user-select: none;
  opacity: 0.6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 1px 0 rgba(0, 0, 0, 0.02);
  transition:
    opacity 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.18s ease;
}
.bc-sidebar-collapse-btn:hover .bc-sidebar-collapse-kbd {
  opacity: 1;
  border-color: color-mix(in srgb, var(--bc-brand) 22%, var(--bc-line));
  border-bottom-color: color-mix(in srgb, var(--bc-brand) 35%, var(--bc-line-strong));
}
.bc-sidebar-collapse-btn:active .bc-sidebar-collapse-kbd {
  transform: translateY(1px);
  border-bottom-width: 1px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   v1.5.5 Ã¢Â€Â” Divider superior del botÃƒÂ³n "Plegar menÃƒÂº" (desktop)
   ------------------------------------------------------------
   SeparaciÃƒÂ³n visual sutil entre el ÃƒÂºltimo nav-item y el botÃƒÂ³n
   collapse. Solo en desktop (en mobile el btn estÃƒÂ¡ oculto).
   Usa un pseudo-elemento ::before del botÃƒÂ³n para no aÃƒÂ±adir DOM. */
@media (min-width: 992px) {
  .bc-sidebar-collapse-btn {
    margin-top: 0.7rem;
  }
  .bc-sidebar-collapse-btn::after {
    content: '';
    position: absolute;
    left: -0.35rem;
    right: -0.35rem;
    top: -0.6rem;
    height: 1px;
    background: linear-gradient(90deg,
      transparent 0%,
      var(--bc-line) 20%,
      var(--bc-line) 80%,
      transparent 100%);
    pointer-events: none;
    z-index: 0;
  }
  /* En estado collapsed (72px) el divider se acorta para no tocar bordes */
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-collapse-btn::after {
    left: 0.5rem;
    right: 0.5rem;
  }
}

/* ---- Estado collapsed (desktop â‰¥992px solo) ---- */
@media (min-width: 992px) {
  .bc-sidebar { transition: none; }

  .bc-sidebar[data-collapsed="true"] {
    width: 72px;
  }

  /* Oculta labels, badges, tÃƒÂ­tulos de secciÃƒÂ³n, search, footer text.
     v1.5.2: aÃƒÂ±adidos selectores robustos para esconder cualquier elemento
     auxiliar dentro de .nav-link que NO sea el icono principal (primer <i>).
     Cubre external-link icons (Cocina KDS), spans badge-like sin clase
     .badge (#badge-health), y cualquier futuro decorador secundario. */
  .bc-sidebar[data-collapsed="true"] .bc-nav-label,
  .bc-sidebar[data-collapsed="true"] .bc-nav-section-title,
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-search,
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-empty,
  .bc-sidebar[data-collapsed="true"] .bc-nav .nav-link .badge,
  .bc-sidebar[data-collapsed="true"] .bc-nav .nav-link i:not(:first-of-type),
  .bc-sidebar[data-collapsed="true"] .bc-nav .nav-link > span:not(.bc-nav-label):not(.badge),
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-collapse-label,
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-collapse-kbd,
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-foot-link-text,
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-foot-out,
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-version,
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-user-info {
    display: none;
  }

  /* Anti-overflow defensivo: cualquier hijo del nav-link nunca puede
     desbordar lateralmente cuando estamos collapsed. */
  .bc-sidebar[data-collapsed="true"] .bc-nav .nav-link {
    overflow: hidden;
  }

  /* Centra los items del menÃƒÂº y los iconos */
  .bc-sidebar[data-collapsed="true"] .bc-nav { padding: 0 0.4rem; }
  .bc-sidebar[data-collapsed="true"] .bc-nav .nav-link {
    justify-content: center;
    padding: 0.55rem 0.4rem;
    gap: 0;
  }
  .bc-sidebar[data-collapsed="true"] .bc-nav .nav-link i {
    margin: 0;
    width: 36px; height: 36px;
    font-size: 1.05rem;
  }
  /* Barrita dorada del active se mueve para no salirse del viewport */
  .bc-sidebar[data-collapsed="true"] .bc-nav .nav-link.active::before {
    left: -0.4rem;
  }
  /* No padding-left animado en hover (rompe el centrado) */
  .bc-sidebar[data-collapsed="true"] .bc-nav .nav-link:hover { padding-left: 0.4rem; }

  /* Toggle button collapsed: solo icono centrado (label y kbd se ocultan
     en el bloque general arriba). El chevron rota 180Ã‚Â° via la regla
     .bc-sidebar-collapse-icon transform definida fuera del @media.
     v1.5.5: el chip wrap crece a 40x40 cuando collapsed para aprovechar
     mejor el espacio del sidebar de 72px (antes quedaba muy pequeÃƒÂ±o y
     perdido en el centro). Eliminamos el ::before gradient en collapsed
     porque en un botÃƒÂ³n mini se ve raro. */
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-collapse-btn {
    justify-content: center;
    gap: 0;
    padding: 0.45rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-collapse-btn::before {
    display: none;
  }
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-collapse-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-collapse-icon {
    font-size: 0.9rem;
  }

  /* Footer: solo el icon de mundo + status dot */
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-foot {
    padding: 0.65rem 0.4rem 0.85rem;
    align-items: center;
  }
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-foot-link {
    justify-content: center;
    padding: 0.45rem;
    gap: 0;
  }
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-user {
    padding: 0.4rem;
    justify-content: center;
  }
  .bc-sidebar[data-collapsed="true"] .bc-sidebar-user-avatar {
    margin: 0;
  }

  /* Separator entre secciones desaparece (mÃƒÂ¡s compacto) */
  .bc-sidebar[data-collapsed="true"] .bc-nav-section + .bc-nav-section {
    border-top-color: transparent;
    padding-top: 0.25rem;
  }
}

/* ============================================================
   5.d Ã‚Â· SIDEBAR Ã‚Â· User profile pill (footer)
   ------------------------------------------------------------
   Card compacta con avatar circular gradient + nombre + rol + status
   dot real-time. Estilo Linear/Vercel.
   ============================================================ */
.bc-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--bc-radius-sm);
  border: 1px solid var(--bc-line);
  background: var(--bc-surface);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.bc-sidebar-user:hover {
  background: var(--bc-surface-2);
  border-color: var(--bc-line-strong);
}
.bc-sidebar-user-avatar {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bc-brand) 0%, var(--bc-brand-dark) 100%);
  color: var(--bc-bg);
  font-family: var(--bc-font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 6px rgba(var(--bc-brand-rgb), 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  user-select: none;
}
.bc-sidebar-user-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 1px;
}
.bc-sidebar-user-name {
  font-family: var(--bc-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-sidebar-user-role {
  font-family: var(--bc-font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bc-text-subtle);
}

/* ============================================================
   5.e Ã‚Â· SIDEBAR Ã‚Â· Realtime status dot
   ------------------------------------------------------------
   PequeÃƒÂ±o punto animado en la user-pill que refleja el estado de
   conexiÃƒÂ³n real-time (online/polling/offline). Sincronizado con
   los eventos bc:realtime:* que emite realtime.js.
   ============================================================ */
.bc-sidebar-status {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bc-text-subtle);
  position: relative;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.bc-sidebar-status::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  z-index: -1;
  animation: bcSidebarStatusPulse 1.8s ease-out infinite;
}
.bc-sidebar-status.is-online {
  background: var(--bc-success);
  color: var(--bc-success);
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
}
.bc-sidebar-status.is-online::after { opacity: 0.45; }
.bc-sidebar-status.is-polling {
  background: var(--bc-warning, #d99500);
  color: var(--bc-warning, #d99500);
}
.bc-sidebar-status.is-offline {
  background: var(--bc-danger);
  color: var(--bc-danger);
  box-shadow: 0 0 8px rgba(220, 53, 69, 0.4);
}
.bc-sidebar-status.is-offline::after { opacity: 0; }
@keyframes bcSidebarStatusPulse {
  0%   { opacity: 0.5;  transform: scale(0.6); }
  70%  { opacity: 0;    transform: scale(2.2); }
  100% { opacity: 0;    transform: scale(2.2); }
}
@media (prefers-reduced-motion: reduce) {
  .bc-sidebar-status::after { animation: none !important; }
}

.bc-main {
  flex-grow: 1;
  padding: var(--bc-pad-main);
  min-width: 0;
  background: var(--bc-bg-muted);
}

/* ============================================================
   6. PAGE HEADER + CARDS
   ============================================================ */

.bc-page-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--bc-line);
  /* Permite que el contenido se ajuste si la columna izquierda crece */
  min-width: 0;
}
.bc-page-head > .me-auto { min-width: 0; flex: 1 1 auto; }
.bc-page-title {
  font-family: var(--bc-font-display);
  font-size: var(--bc-fs-page-title);
  font-weight: 400;
  color: var(--bc-text);
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* v1.7 Ã¢Â€Â” Pasamos de inline-flex (que provoca overflow horizontal en mobile
     cuando el texto + em es mÃƒÂ¡s ancho que el contenedor) a flex normal con
     flex-wrap. Combinado con word-break-word permite que 'BUONGIORNO Giuseppe'
     se parta en 2 lÃƒÂ­neas en viewports estrechos en lugar de cortarse. */
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.4em;
  row-gap: 0.15em;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}
.bc-page-title em {
  font-family: var(--bc-font-serif);
  color: var(--bc-brand);
  font-style: italic;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85em;
}
.bc-page-sub {
  color: var(--bc-text-muted);
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
  font-weight: 500;
  letter-spacing: 0.005em;
}

.bc-card {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  padding: 1.2rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--bc-shadow-xs);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.bc-card:hover { box-shadow: var(--bc-shadow-sm); border-color: var(--bc-line-strong); }
.bc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.bc-card-title {
  font-family: var(--bc-font-body);
  font-size: var(--bc-fs-card-title);
  font-weight: 700;
  color: var(--bc-text);
  margin: 0;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.bc-card-title i { color: var(--bc-brand); font-size: 1.1em; }

/* ============================================================
   7. KPIs
   ============================================================ */

.kpi {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  padding: 1rem 1.1rem;
  padding-right: 2.5rem;
  height: 100%;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  /* Contiene cualquier overflow accidental dentro del card */
  min-width: 0;
  overflow: hidden;
}
.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--bc-shadow-md);
  border-color: var(--bc-line-strong);
}
.kpi-icon {
  position: absolute;
  top: 0.85rem; right: 0.9rem;
  font-size: 1.15rem;
  color: var(--bc-accent);            /* teal complementario Ã¢Â€Â” respira mejor que gris */
  opacity: 0.55;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.kpi:hover .kpi-icon { opacity: 0.85; }
.kpi-label {
  font-size: 0.7rem;
  color: var(--bc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.25rem;
  /* Labels parten en 2 lineas si no caben (sin ellipsis mid-word) */
  overflow: hidden;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
  padding-right: 0.5rem;
}
.kpi-value {
  font-family: 'Playfair Display', serif;
  /* v1.7 Ã¢Â€Â” tipografÃƒÂ­a fluida con clamp() para evitar que valores tipo
     '262,10 Ã¢Â‚Â¬' se corten en cards col-6 estrechos en mobile. Min asegura
     legibilidad, max preserva impacto visual en desktop. */
  font-size: clamp(1.25rem, 4.5vw, var(--bc-fs-kpi-value));
  font-weight: 800;
  color: var(--bc-text);
  line-height: 1.1;
  letter-spacing: -0.02em;
  /* Permite quiebre suave para nÃƒÂºmeros largos en columnas estrechas
     pero respeta espacios (no rompe 'A domicilio') */
  overflow-wrap: break-word;
  word-break: normal;
  /* Tabular nums para alineaciÃƒÂ³n perfecta de cifras */
  font-variant-numeric: tabular-nums;
}
.kpi-trend {
  font-size: 0.78rem;
  margin-top: 0.4rem;
  color: var(--bc-text-muted);
  /* Trends largos como '+291% vs media 7d' pueden romper en 2 lÃƒÂ­neas
     en cards estrechos pero no horizontalmente */
  overflow-wrap: break-word;
}
.kpi-trend.up { color: var(--bc-success); }
.kpi-trend.down { color: var(--bc-brand); }

.kpi.kpi-soft {
  background: var(--bc-bg-muted);
  border-color: var(--bc-line);
}
.kpi.kpi-soft .kpi-icon { opacity: 0.5; }

/* Tarjeta de producto LEGACY (v1.0) Ã‚Â· mantenida por compat con otros lugares
   que usen .bc-product-card. La nueva premium estÃƒÂ¡ en .bc-pc-card abajo. */
.bc-product-card {
  border-left: 3px solid transparent;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.bc-product-card.is-out {
  border-left-color: var(--bc-danger);
  background: var(--bc-danger-soft);
}
.bc-product-card.is-low {
  border-left-color: var(--bc-warning);
}
.bc-product-card:hover { box-shadow: var(--bc-shadow-md); }

/* ============================================================
   7.b  PRODUCT CARD PREMIUM (v1.7) Ã‚Â· CatÃƒÂ¡logo SaaS-grade
   ------------------------------------------------------------
   Inspirado en Shopify Admin / Square Catalog / Toast POS:
   - Header con thumbnail emoji sobre fondo brand-tinted
   - Edit button discreto top-right (icon chip)
   - Grid 2-col precio + stock stepper custom
   - Switch Disponible con colores de marca (no Bootstrap blue)
   - Estados visuales: is-ok (default) | is-low (ÃƒÂ¡mbar) | is-out (rojo)
   - Hover eleva con translateY + shadow-md
   - Mobile-first: 1 col xs, 2 col md, 3 col xl
   ============================================================ */

.bc-pc-card {
  position: relative;
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  padding: 0.95rem 1rem 0.85rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color 0.18s ease, box-shadow 0.2s ease, transform 0.18s ease;
  /* Filete lateral izquierdo discreto, color de marca, intensifica en hover */
  border-left: 3px solid transparent;
}
.bc-pc-card::before {
  /* Sutil halo gradient en la esquina top-left, refleja la marca trattoria */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left,
    rgba(var(--bc-brand-rgb), 0.04) 0%,
    transparent 50%);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.bc-pc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--bc-shadow-md);
  border-color: var(--bc-line-strong);
  border-left-color: var(--bc-brand);
}
.bc-pc-card:hover::before { opacity: 1; }

/* Estados de stock con codificaciÃƒÂ³n de color (left rail + tints) */
.bc-pc-card.is-low {
  border-left-color: var(--bc-warning);
}
.bc-pc-card.is-low:hover { border-left-color: var(--bc-warning); }
.bc-pc-card.is-out {
  border-left-color: var(--bc-danger);
  background: linear-gradient(135deg,
    var(--bc-danger-soft) 0%,
    var(--bc-surface) 60%);
}
.bc-pc-card.is-out:hover { border-left-color: var(--bc-danger); }
.bc-pc-card.is-out .bc-pc-thumb {
  filter: grayscale(0.45) opacity(0.75);
}

/* ---- HEADER Ã‚Â· thumb + info + edit ---- */
.bc-pc-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  position: relative;
  z-index: 1;
}

.bc-pc-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--bc-radius-md);
  /* Fondo sutil teal soft + brand tint en gradient diagonal */
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--bc-brand) 6%, var(--bc-surface)) 0%,
      var(--bc-surface-2) 100%);
  border: 1px solid var(--bc-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
[data-bs-theme="dark"] .bc-pc-thumb {
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--bc-brand) 12%, var(--bc-surface-2)) 0%,
      var(--bc-surface) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.bc-pc-card:hover .bc-pc-thumb {
  transform: scale(1.04) rotate(-2deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 4px 12px rgba(var(--bc-brand-rgb), 0.18);
}
.bc-pc-emoji {
  font-size: 1.85rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.bc-pc-info {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 2.75rem; /* deja sitio al edit button absolute */
}
.bc-pc-name {
  font-family: var(--bc-font-body);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0 0 0.1rem;
  color: var(--bc-text);
  line-height: 1.25;
  /* En cards estrechos, max 2 lÃƒÂ­neas con ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bc-pc-desc {
  font-size: 0.78rem;
  color: var(--bc-text-muted);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bc-pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.4rem;
}
.bc-pc-tag {
  font-size: 0.66rem;
  font-weight: 500;
  padding: 0.12rem 0.5rem;
  background: var(--bc-surface-2);
  color: var(--bc-text-muted);
  border: 1px solid var(--bc-line);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* Edit button Ã‚Â· chip premium en top-right (estilo Linear/Stripe) */
.bc-pc-edit {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--bc-radius-sm);
  color: var(--bc-text-subtle);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, filter 0.15s ease;
  z-index: 2;
}
.bc-pc-edit:hover, .bc-pc-edit:focus-visible {
  background: var(--bc-brand-soft);
  border-color: rgba(var(--bc-brand-rgb), 0.2);
  color: var(--bc-brand);
  outline: none;
}
.bc-pc-edit:active { transform: scale(0.92); }
.bc-pc-edit i { font-size: 1rem; }

/* ---- STATE PILL ROW (Stock bajo / Agotado) ---- */
.bc-pc-state-row {
  margin-top: -0.25rem;
}
.bc-pc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  line-height: 1;
}
.bc-pc-pill i { font-size: 0.78rem; }
.bc-pc-pill.is-low {
  background: var(--bc-warning-soft);
  color: var(--bc-warning);
  border: 1px solid rgba(161, 98, 7, 0.2);
}
.bc-pc-pill.is-out {
  background: var(--bc-danger-soft);
  color: var(--bc-danger);
  border: 1px solid rgba(185, 28, 28, 0.2);
}

/* ---- GRID precio + stock stepper ---- */
.bc-pc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  position: relative;
  z-index: 1;
}
.bc-pc-field { min-width: 0; }
.bc-pc-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bc-text-muted);
  margin-bottom: 0.32rem;
  line-height: 1;
}
.bc-pc-label-unit {
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  font-size: 0.85em;
  color: var(--bc-text-subtle);
}

/* Money input premium Ã‚Â· currency en chip suave, valor en serif premium */
.bc-pc-money {
  display: flex;
  align-items: stretch;
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bc-pc-money:focus-within {
  border-color: var(--bc-brand);
  box-shadow: 0 0 0 3px rgba(var(--bc-brand-rgb), 0.12);
}
.bc-pc-currency {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.55rem;
  background: var(--bc-surface-2);
  color: var(--bc-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  border-right: 1px solid var(--bc-line);
  user-select: none;
}
.bc-pc-money-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.42rem 0.55rem;
  font-family: 'Playfair Display', serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--bc-text);
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.bc-pc-money-input:focus { outline: none; }
/* Quitar spinners del number input en webkit/firefox para look limpio */
.bc-pc-money-input::-webkit-outer-spin-button,
.bc-pc-money-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.bc-pc-money-input { -moz-appearance: textfield; appearance: textfield; }

/* Stepper premium Ã‚Â· botones cuadrados con icono, input numÃƒÂ©rico al centro */
.bc-pc-stepper {
  display: flex;
  align-items: stretch;
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bc-pc-stepper:focus-within {
  border-color: var(--bc-brand);
  box-shadow: 0 0 0 3px rgba(var(--bc-brand-rgb), 0.12);
}
.bc-pc-step {
  flex: 0 0 auto;
  width: 32px;
  background: var(--bc-surface-2);
  border: 0;
  color: var(--bc-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background 0.12s ease, color 0.12s ease;
  user-select: none;
}
.bc-pc-step:first-child { border-right: 1px solid var(--bc-line); }
.bc-pc-step:last-child { border-left: 1px solid var(--bc-line); }
.bc-pc-step:hover {
  background: color-mix(in srgb, var(--bc-brand) 10%, var(--bc-surface));
  color: var(--bc-brand);
}
.bc-pc-step:active { transform: scale(0.92); }
.bc-pc-step i { font-size: 0.82rem; line-height: 1; }
.bc-pc-step-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.42rem 0.35rem;
  font-family: var(--bc-font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--bc-text);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.bc-pc-step-input:focus { outline: none; }
.bc-pc-step-input:disabled {
  background: var(--bc-surface-2);
  color: var(--bc-text-subtle);
  cursor: not-allowed;
}
.bc-pc-step-input::-webkit-outer-spin-button,
.bc-pc-step-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.bc-pc-step-input { -moz-appearance: textfield; appearance: textfield; }

/* ---- FOOTER Ã‚Â· switch disponible ---- */
.bc-pc-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0.45rem;
  border-top: 1px solid var(--bc-line);
  position: relative;
  z-index: 1;
}

/* Custom switch Ã‚Â· colors de marca (rojo wine) en vez de Bootstrap blue */
.bc-pc-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
  margin: 0;
  position: relative;
}
.bc-pc-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.bc-pc-switch-track {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  background: var(--bc-surface-3);
  border-radius: 999px;
  transition: background 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-shrink: 0;
}
.bc-pc-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bc-pc-switch input:checked ~ .bc-pc-switch-track {
  background: linear-gradient(135deg, var(--bc-brand) 0%, var(--bc-brand-dark) 100%);
}
.bc-pc-switch input:checked ~ .bc-pc-switch-track::after {
  transform: translateX(16px);
}
.bc-pc-switch input:focus-visible ~ .bc-pc-switch-track {
  box-shadow: 0 0 0 3px rgba(var(--bc-brand-rgb), 0.22);
}
.bc-pc-switch-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--bc-text);
  transition: color 0.15s ease;
}
.bc-pc-switch input:not(:checked) ~ .bc-pc-switch-label {
  color: var(--bc-text-subtle);
}

/* ---- RESPONSIVE adjustments ---- */
@media (max-width: 575.98px) {
  .bc-pc-card { padding: 0.85rem 0.9rem 0.75rem; gap: 0.7rem; }
  .bc-pc-thumb { width: 48px; height: 48px; }
  .bc-pc-emoji { font-size: 1.7rem; }
  .bc-pc-name { font-size: 0.95rem; }
  .bc-pc-grid { gap: 0.55rem; }
  .bc-pc-money-input { font-size: 0.92rem; }
  .bc-pc-step { width: 30px; }
  .bc-pc-step-input { font-size: 0.88rem; }
}

/* ============================================================
   8. TABLAS
   ============================================================ */

.bc-table {
  font-size: 0.9rem;
  color: var(--bc-text);
  background: transparent;
  --bs-table-bg: transparent;
  --bs-table-color: var(--bc-text);
  --bs-table-hover-bg: var(--bc-surface-2);
  --bs-table-hover-color: var(--bc-text);
}
.bc-table thead th {
  background: var(--bc-surface-2);
  color: var(--bc-text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--bc-line);
  border-top: none;
  white-space: nowrap;
}
.bc-table tbody td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--bc-line);
  vertical-align: middle;
  color: var(--bc-text);
}
.bc-table tbody tr:hover {
  background: var(--bc-surface-2);
  cursor: pointer;
}
.bc-table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   8.b  RESPONSIVE TABLE Ã¢Â†Â’ CARDS (v1.7)
   ------------------------------------------------------------
   Aplica clase .bc-table-cards a una <table> para que en mobile
   se transforme en una pila de cards verticales (cada <tr> = card,
   cada <td> = label-value row). PatrÃƒÂ³n estÃƒÂ¡ndar en SaaS modernos
   (Linear, Notion, Stripe Dashboard) para tablas con muchas cols
   que no caben en mobile.

   Requisitos en HTML:
   - Cada <td> necesita data-label="..." con el nombre de la columna.
   - <td data-label=""> (vacÃƒÂ­o) oculta el label (ÃƒÂºtil para acciones).
   ============================================================ */
@media (max-width: 767.98px) {
  .bc-table-cards { display: block; }
  .bc-table-cards thead { display: none; }
  .bc-table-cards tbody, .bc-table-cards tr { display: block; }

  .bc-table-cards tbody tr {
    background: var(--bc-surface);
    border: 1px solid var(--bc-line);
    border-radius: var(--bc-radius-md);
    margin-bottom: 0.65rem;
    padding: 0.85rem 0.95rem;
    box-shadow: var(--bc-shadow-xs);
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  }
  .bc-table-cards tbody tr:hover,
  .bc-table-cards tbody tr:focus-within {
    box-shadow: var(--bc-shadow-sm);
    border-color: var(--bc-line-strong);
  }
  .bc-table-cards tbody tr:active { transform: scale(0.998); }
  .bc-table-cards tbody tr:last-child { margin-bottom: 0; }

  .bc-table-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--bc-line);
    text-align: right;
    /* Override text-end de Bootstrap que ya no aplica visualmente */
    min-width: 0;
  }
  .bc-table-cards tbody td:last-child { border-bottom: none; }

  /* Label izquierdo (uppercase, brand muted) */
  .bc-table-cards tbody td::before {
    content: attr(data-label);
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bc-text-muted);
    flex-shrink: 0;
    margin-right: auto;
    align-self: center;
  }
  /* Si el label estÃƒÂ¡ vacÃƒÂ­o, ocultar el ::before (no genera espacio) */
  .bc-table-cards tbody td[data-label=""]::before { display: none; }

  /* La primera celda (Cliente con avatar + nombre + VIP) actÃƒÂºa como
     "header" de la card: sin label, sin separador, layout horizontal. */
  .bc-table-cards tbody td:first-child {
    border-bottom: 1px solid var(--bc-line);
    padding-bottom: 0.65rem;
    margin-bottom: 0.35rem;
    text-align: left;
    justify-content: flex-start;
  }
  .bc-table-cards tbody td:first-child::before { display: none; }

  /* ÃƒÂšltima celda (acciones): full-width, justified end */
  .bc-table-cards tbody td:last-child {
    padding-top: 0.5rem;
    justify-content: flex-end;
  }
  .bc-table-cards tbody td:last-child .ph-caret-right,
  .bc-table-cards tbody td:last-child .bi-chevron-right {
    /* En cards el chevron no aporta tanto valor (toda la card es tap-target) */
    display: none;
  }

  /* Valores con texto compuesto (Contacto: phone + email) se alinean a la
     derecha pero permiten salto de lÃƒÂ­nea natural. */
  .bc-table-cards tbody td small {
    text-align: right;
    line-height: 1.35;
  }
}

/* ============================================================
   8.c  ORDERS TABLE PREMIUM CARDS (v1.7) Ã‚Â· status-coded layout
   ------------------------------------------------------------
   Variante del .bc-table-cards especÃƒÂ­fica para pedidos. En mobile
   transforma cada fila en una card SaaS-grade con:
   - Rail lateral coloreado por status (pending=ÃƒÂ¡mbar, ready=brand,
     completed=verde, cancelled=grisÃ¢Â€Â¦)
   - Header: #pedido en mono + source icon + total en Playfair
     Display alineado a la derecha
   - Body: cliente prominente, items con icono basket
   - Footer: hora con icono clock + status badge + chevron
   ============================================================ */
@media (max-width: 767.98px) {
  .bc-orders-table.bc-table-cards tbody tr {
    /* Sobrescribe el grid genÃƒÂ©rico de .bc-table-cards con un layout
       totalmente custom usando CSS Grid (4 cols: select + rail + header + total). */
    display: grid;
    grid-template-columns: auto 4px 1fr auto;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "select rail header  total"
      "select rail customer customer"
      "select rail items    items"
      "select rail footer   footer";
    gap: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
  }

  /* Rail lateral coloreado por status. Por defecto color sutil */
  .bc-orders-table.bc-table-cards tbody tr::before {
    content: '';
    grid-area: rail;
    background: var(--bc-line-strong);
    border-radius: var(--bc-radius-md) 0 0 var(--bc-radius-md);
  }
  .bc-orders-table.bc-table-cards tbody tr[data-status="pending"]::before    { background: var(--bc-warning); }
  .bc-orders-table.bc-table-cards tbody tr[data-status="processing"]::before { background: var(--bc-info); }
  .bc-orders-table.bc-table-cards tbody tr[data-status="ready"]::before      { background: var(--bc-brand); }
  .bc-orders-table.bc-table-cards tbody tr[data-status="completed"]::before  { background: var(--bc-success); }
  .bc-orders-table.bc-table-cards tbody tr[data-status="cancelled"]::before  { background: var(--bc-text-subtle); }

  /* Reset de los TD: todos van a su grid-area especÃƒÂ­fica.
     Eliminamos el flex+border-bottom dashed del .bc-table-cards base. */
  .bc-orders-table.bc-table-cards tbody td {
    display: block;
    border: none;
    padding: 0;
    text-align: left;
  }
  .bc-orders-table.bc-table-cards tbody td::before { display: none; }

  /* HEADER Ã‚Â· #pedido + source icon (col Pedido) */
  .bc-orders-table.bc-table-cards tbody td[data-label="Pedido"] {
    grid-area: header;
    padding: 0.85rem 0 0.2rem 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .bc-orders-table.bc-table-cards tbody td[data-label="Pedido"] strong {
    font-family: var(--bc-font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--bc-text-muted);
    letter-spacing: 0.02em;
  }

  /* La celda Origen (icon) se renderiza dentro de la celda Pedido visualmente.
     Lo logramos posicionÃƒÂ¡ndola junto al header con z-index. */
  .bc-orders-table.bc-table-cards tbody td[data-label="Origen"] {
    grid-area: header;
    padding: 0.85rem 0 0.2rem 0;
    align-self: center;
    justify-self: end;
    margin-right: auto;
    margin-left: 0.4rem;
    z-index: 1;
  }
  .bc-orders-table.bc-table-cards tbody td[data-label="Origen"] .order-source-icon {
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 0.78rem;
    margin: 0;
  }
  .bc-orders-table.bc-table-cards tbody td[data-label="Origen"] small {
    display: none; /* el label del source es redundante con el icono en mobile */
  }

  /* TOTAL Ã‚Â· prominente top-right en Playfair Display */
  .bc-orders-table.bc-table-cards tbody td[data-label="Total"] {
    grid-area: total;
    padding: 0.85rem 0.95rem 0.2rem 0.5rem;
    text-align: right;
    align-self: start;
  }
  .bc-orders-table.bc-table-cards tbody td[data-label="Total"] strong,
  .bc-orders-table.bc-table-cards tbody td[data-label="Total"] .bc-ord-total {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--bc-text);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }

  /* CUSTOMER Ã‚Â· nombre + telÃƒÂ©fono */
  .bc-orders-table.bc-table-cards tbody td[data-label="Cliente"] {
    grid-area: customer;
    padding: 0.2rem 0.95rem 0.3rem 0.95rem;
  }
  .bc-orders-table.bc-table-cards .bc-ord-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bc-text);
    line-height: 1.25;
  }
  .bc-orders-table.bc-table-cards .bc-ord-phone {
    display: block;
    font-size: 0.75rem;
    color: var(--bc-text-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    margin-top: 0.1rem;
  }

  /* ITEMS Ã‚Â· resumen de productos en lÃƒÂ­nea muted */
  .bc-orders-table.bc-table-cards tbody td[data-label="Productos"] {
    grid-area: items;
    padding: 0.15rem 0.95rem 0.55rem 0.95rem;
    color: var(--bc-text-muted);
  }
  .bc-orders-table.bc-table-cards tbody td[data-label="Productos"] small {
    font-size: 0.78rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
  }
  .bc-orders-table.bc-table-cards tbody td[data-label="Productos"] small::before {
    content: '\e41e'; /* ph-shopping-cart */
    font-family: 'Phosphor';
    margin-right: 0.4rem;
    color: var(--bc-text-subtle);
    font-style: normal;
  }

  /* FOOTER Ã‚Â· hora + status badge + chevron */
  .bc-orders-table.bc-table-cards tbody td[data-label="Hora"] {
    grid-area: footer;
    padding: 0.55rem 0 0.7rem 0.95rem;
    border-top: 1px solid var(--bc-line);
    display: inline-flex;
    align-items: center;
    margin-right: auto;
  }
  .bc-orders-table.bc-table-cards tbody td[data-label="Hora"] small {
    font-size: 0.74rem;
    color: var(--bc-text-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
  }
  .bc-orders-table.bc-table-cards tbody td[data-label="Estado"] {
    grid-area: footer;
    padding: 0.55rem 0.5rem 0.7rem 0.95rem;
    border-top: 1px solid var(--bc-line);
    justify-self: end;
    align-self: center;
  }
  .bc-orders-table.bc-table-cards tbody td[data-label=""]:not(.bc-bulk-col) {
    grid-area: footer;
    padding: 0.55rem 0.95rem 0.7rem 0.25rem;
    border-top: 1px solid var(--bc-line);
    justify-self: end;
    align-self: center;
    color: var(--bc-text-subtle);
  }
  .bc-orders-table.bc-table-cards tbody td[data-label=""]:not(.bc-bulk-col) i {
    font-size: 0.85rem;
  }

  /* v2.2.3 â€” columna de selecciÃƒÂ³n masiva */
  .bc-orders-table.bc-table-cards tbody td.bc-bulk-col {
    grid-area: select;
    padding: 0.85rem 0 0.2rem 0.95rem;
    display: flex;
    align-items: flex-start;
  }
  .bc-orders-table.bc-table-cards tbody td.bc-bulk-col input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
  }
}

/* En desktop, refinamos visualmente la fila de pedidos tambiÃƒÂ©n
   (sin cambios estructurales: sigue siendo un table row). */
@media (min-width: 768px) {
  .bc-orders-table .bc-ord-name { font-weight: 600; }
  .bc-orders-table .bc-ord-phone {
    display: block;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
  }
  .bc-orders-table .bc-ord-total {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
  }
  .bc-orders-table th.bc-bulk-col,
  .bc-orders-table td.bc-bulk-col {
    width: 40px;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.75rem;
    padding-right: 0;
  }
  .bc-orders-table td.bc-bulk-col input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
  }
}

/* ============================================================
   9. STATUS BADGES (estados de pedido)
   ============================================================ */

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 0.4rem;
}
.dot-pending    { background: var(--bc-warning); }
.dot-processing { background: var(--bc-info); }
.dot-ready      { background: var(--bc-brand); }
.dot-completed  { background: var(--bc-success); }
.dot-cancelled  { background: var(--bc-text-subtle); }

.order-row { cursor: pointer; }
.order-source-icon {
  display: inline-block;
  width: 26px; height: 26px;
  background: var(--bc-surface-2);
  border-radius: 50%;
  text-align: center;
  line-height: 26px;
  font-size: 0.85rem;
  margin-right: 0.4rem;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--bc-text-muted);
}
.empty-icon {
  font-size: 3rem;
  opacity: 0.4;
  margin-bottom: 0.75rem;
  color: var(--bc-text-subtle);
}

/* ============================================================
   10. SYNC PILL Ã‚Â· NOTIF POPOVER
   ============================================================ */

.bc-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bc-surface-2);
  color: var(--bc-text);
  border: 1px solid var(--bc-line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.bc-sync-pill:hover { background: var(--bc-surface-3); border-color: var(--bc-line-strong); }
.bc-sync-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bc-success);
}
.bc-sync-pill[data-status="syncing"] .bc-sync-dot {
  background: var(--bc-accent);          /* teal Ã¢Â€Â” distinto de errores (rojo/ÃƒÂ¡mbar) */
  animation: bc-pulse 1.4s infinite;
}
.bc-sync-pill[data-status="offline"] .bc-sync-dot { background: var(--bc-danger); }
.bc-sync-pill[data-status="error"]   .bc-sync-dot { background: var(--bc-warning); }
.bc-sync-pill[data-status="online"]  .bc-sync-dot { background: var(--bc-success); }

@keyframes bc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--bc-accent-rgb), 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(var(--bc-accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--bc-accent-rgb), 0); }
}

.popover .bc-pop-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 0.85rem; }
.popover .bc-pop-row strong { color: var(--bc-text); }

.bc-notif-popover { min-width: 320px; max-width: 360px; }
.bc-notif-popover .popover-body { padding: 0.5rem; }
.bc-notif-list { display: flex; flex-direction: column; gap: 2px; }
.bc-notif-item.bc-notif-item {
  color: var(--bc-text);
  border-bottom: 1px solid var(--bc-line);
  transition: background 0.15s ease;
}
.bc-notif-item:last-child { border-bottom: none; }
.bc-notif-item:hover { background: var(--bc-surface-2); }
.bc-notif-item strong { color: var(--bc-text); font-size: 0.9rem; }

.bc-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--bc-line);
  margin-bottom: 0.3rem;
}
.bc-notif-header strong { font-size: 0.78rem; color: var(--bc-text); letter-spacing: 0.04em; text-transform: uppercase; }
.bc-notif-sound-btn {
  background: transparent;
  border: 1px solid var(--bc-line);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.74rem;
  color: var(--bc-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: background 0.15s ease;
}
.bc-notif-sound-btn:hover { background: var(--bc-surface-2); }
.bc-notif-sound-btn.is-on { color: var(--bc-success); border-color: rgba(21, 128, 61, 0.3); }
.bc-notif-sound-btn.is-off { color: var(--bc-danger); border-color: rgba(185, 28, 28, 0.3); }

/* Bell ring + has-news */
.bc-icon-btn.is-ringing i { animation: bc-bell-ring 1.2s ease 2; transform-origin: top center; }
@keyframes bc-bell-ring {
  0%, 100% { transform: rotate(0); }
  10%  { transform: rotate(15deg); }
  25%  { transform: rotate(-12deg); }
  40%  { transform: rotate(8deg); }
  55%  { transform: rotate(-6deg); }
  70%  { transform: rotate(3deg); }
}
.bc-icon-btn.has-news .bc-icon-badge { animation: bc-badge-pop 0.4s ease; }
@keyframes bc-badge-pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ============================================================
   11. TOASTS premium
   ============================================================ */

#toast-container {
  z-index: 1100;
  pointer-events: none;
}
#toast-container .toast { pointer-events: auto; }

.toast {
  background: var(--bc-surface) !important;
  color: var(--bc-text) !important;
  border: 1px solid var(--bc-line) !important;
  border-radius: var(--bc-radius-md) !important;
  box-shadow: var(--bc-shadow-lg) !important;
  overflow: hidden;
  position: relative;
  min-width: 280px;
  margin-bottom: 0.6rem;
  animation: bc-toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--bc-brand);
}
.toast .toast-body {
  padding: 0.85rem 1rem 0.85rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--bc-text) !important;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.35;
}
.toast .btn-close {
  filter: none !important;
  opacity: 0.5;
  margin-right: 0.6rem !important;
}
[data-bs-theme="dark"] .toast .btn-close { filter: invert(1) brightness(0.9) !important; }
.toast .btn-close:hover { opacity: 1; }

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 1rem;
  flex-shrink: 0;
}

.toast.text-bg-success::before { background: var(--bc-success); }
.toast.text-bg-success .toast-icon { background: var(--bc-success-soft); color: var(--bc-success); }
.toast.text-bg-danger::before  { background: var(--bc-danger); }
.toast.text-bg-danger .toast-icon  { background: var(--bc-danger-soft); color: var(--bc-danger); }
.toast.text-bg-warning::before { background: var(--bc-warning); }
.toast.text-bg-warning .toast-icon { background: var(--bc-warning-soft); color: var(--bc-warning); }
.toast.text-bg-info::before    { background: var(--bc-info); }
.toast.text-bg-info .toast-icon    { background: var(--bc-info-soft); color: var(--bc-info); }

@keyframes bc-toast-in {
  from { opacity: 0; transform: translateX(40px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ============================================================
   12. DELIVERY KANBAN + LIVE MAP (v1.7 mobile-first kanban)
   ------------------------------------------------------------
   Desktop (Ã¢Â‰Â¥992px): grid auto-fit, todas las cols visibles a la vez.
   Tablet/mobile (<992px): scroll horizontal con snap (patrÃƒÂ³n Trello/
     Linear) Ã¢Â€Â” todas las cols accesibles por swipe lateral. Cada col
     mantiene su tamaÃƒÂ±o legible (280-300px) en vez de squeezed a 2
     cols con las otras 2 envueltas debajo (rompÃƒÂ­a la metÃƒÂ¡fora kanban).
   ============================================================ */

.bc-delivery-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ---- Tablet/mobile: kanban horizontal scroll ---- */
@media (max-width: 991.98px) {
  .bc-delivery-board {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    /* Snap suave entre columnas */
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--bc-pad-main);
    /* Extender hasta el borde para que el swipe alcance los bordes */
    margin-inline: calc(-1 * var(--bc-pad-main));
    padding-inline: var(--bc-pad-main);
    /* Espacio inferior para la scrollbar (en navegadores que la muestran) */
    padding-bottom: 0.5rem;
    /* Scrollbar refinado */
    scrollbar-width: thin;
    scrollbar-color: var(--bc-line) transparent;
  }
  .bc-delivery-board::-webkit-scrollbar { height: 6px; }
  .bc-delivery-board::-webkit-scrollbar-thumb {
    background: var(--bc-line);
    border-radius: 3px;
  }
  .bc-delivery-board::-webkit-scrollbar-thumb:hover { background: var(--bc-line-strong); }

  .bc-delivery-col {
    flex: 0 0 auto;
    width: 300px;
    scroll-snap-align: start;
  }
}

/* ---- Mobile XS: cols ligeramente mÃƒÂ¡s estrechas ---- */
@media (max-width: 575.98px) {
  .bc-delivery-board {
    gap: 0.65rem;
    padding-bottom: 0.35rem;
  }
  .bc-delivery-col {
    width: calc(100vw - 2.5rem);
    max-width: 320px;
  }
}

.bc-delivery-col {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
.bc-delivery-col-head {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.bc-delivery-col-head .badge { font-size: 0.7rem; }
.bc-delivery-col-body {
  padding: 0.6rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bc-bg-muted);
  max-height: 600px;
  overflow-y: auto;
}
/* En mobile/tablet el body de la col tiene altura mÃƒÂ¡s controlada y
   se adapta al viewport. min-height permite ver el empty state limpio. */
@media (max-width: 991.98px) {
  .bc-delivery-col-body {
    max-height: calc(100vh - 320px);
    min-height: 280px;
  }
}
.bc-delivery-card {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-sm);
  padding: 0.7rem 0.85rem;
  font-size: 0.85rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bc-delivery-card:hover { transform: translateY(-1px); box-shadow: var(--bc-shadow-sm); }
.bc-delivery-card-mini {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-sm);
  padding: 0.6rem;
  font-size: 0.85rem;
  opacity: 0.92;
}
.bc-driver-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  background: var(--bc-accent-soft);     /* teal soft Ã¢Â€Â” chip activo respira en lugar de gris */
  border: 1px solid rgba(var(--bc-accent-rgb), 0.25);
  border-radius: 999px;
  color: var(--bc-accent);
  font-weight: 600;
}
.bc-driver-chip.is-empty {
  background: var(--bc-surface-2);
  border-color: var(--bc-line);
  color: var(--bc-text-subtle);
  font-style: italic;
  font-weight: 400;
}

/* Live map view */
.bc-livemap-wrap {
  position: relative;
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  overflow: hidden;
  background: var(--bc-surface);
  box-shadow: var(--bc-shadow-sm);
}
.bc-livemap {
  width: 100%;
  height: calc(100vh - 280px);
  min-height: 400px;
}
.bc-livemap-legend {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  box-shadow: var(--bc-shadow-md);
  z-index: 401;
}
.bc-livemap-legend-row { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.2rem; }
.bc-livemap-legend-row:last-child { margin-bottom: 0; }
.bc-livemap-swatch { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.bc-livemap-stats {
  position: absolute;
  bottom: 12px; left: 12px;
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-sm);
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  box-shadow: var(--bc-shadow-md);
  z-index: 401;
  display: flex;
  gap: 1rem;
}
.bc-livemap-stats strong { color: var(--bc-text); font-size: 1.1rem; font-family: 'Playfair Display', serif; }
.bc-livemap-stats div:first-child strong { color: var(--bc-accent); }    /* repartidores */
.bc-livemap-stats div:nth-child(2) strong { color: var(--bc-info); }     /* entregas activas */
.bc-livemap-stats div:nth-child(3) strong { color: var(--bc-warning); }  /* sin asignar */

/* ----- LIVE BADGE (EN VIVO / COMPARTIENDO) -----
   Pastilla arriba-centro del mapa visible solo cuando un MediaStream estÃƒÂ¡
   activo (Picture-in-Picture o screen share). Sirve como recordatorio al
   operador y como "watermark" para el espectador de la videollamada. */
.bc-livemap-live-badge {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 405;                                 /* por encima de marker, controles y leyenda */
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.55rem 0.3rem 0.7rem;
  background: linear-gradient(135deg, var(--bc-brand) 0%, var(--bc-brand-dark) 100%);
  color: var(--bc-bg);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(var(--bc-brand-rgb), 0.45),
              0 0 0 3px rgba(var(--bc-brand-rgb), 0.18);
  user-select: none;
}
/* El halo cromático se embarra sobre superficies oscuras: en dark la
   elevación se comunica con sombra neutra */
[data-bs-theme="dark"] .bc-livemap-live-badge {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5),
              0 0 0 3px rgba(0, 0, 0, 0.3);
}
.bc-livemap-live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: bc-live-pulse 1.4s infinite ease-out; /* impeccable-disable-line pulsing-dot */
  flex-shrink: 0;
}
@keyframes bc-live-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(255, 255, 255, 0.85); opacity: 1; }
  70%  { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); opacity: 0.85; }
  100% { box-shadow: 0 0 0 0   rgba(255, 255, 255, 0); opacity: 1; }
}
.bc-livemap-live-label { line-height: 1; }
.bc-livemap-live-stop {
  background: var(--bc-bg);
  border: 1px solid var(--bc-bg);
  color: var(--bc-brand);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 0.15rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  font-size: 0.65rem;
  line-height: 1;
}
.bc-livemap-live-stop:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}
.bc-livemap-live-stop:active { transform: scale(0.92); }

/* ----- FULLSCREEN del wrapper ----- */
.bc-livemap-wrap:fullscreen,
.bc-livemap-wrap.is-fullscreen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  border-radius: 0;
  border: none;
  background: var(--bc-bg);
}
.bc-livemap-wrap:fullscreen .bc-livemap,
.bc-livemap-wrap.is-fullscreen .bc-livemap {
  width: 100%;
  height: 100% !important;
  min-height: 100vh;
  min-height: 100dvh;
}
/* En fullscreen, agrandamos legend + stats para legibilidad en TV/monitor */
.bc-livemap-wrap:fullscreen .bc-livemap-legend,
.bc-livemap-wrap.is-fullscreen .bc-livemap-legend,
.bc-livemap-wrap:fullscreen .bc-livemap-stats,
.bc-livemap-wrap.is-fullscreen .bc-livemap-stats {
  font-size: 0.95rem;
  padding: 0.8rem 1.1rem;
}
.bc-livemap-wrap:fullscreen .bc-livemap-stats strong,
.bc-livemap-wrap.is-fullscreen .bc-livemap-stats strong { font-size: 1.4rem; }
.bc-livemap-wrap:fullscreen .bc-livemap-live-badge,
.bc-livemap-wrap.is-fullscreen .bc-livemap-live-badge {
  top: 16px;
  font-size: 0.85rem;
  padding: 0.45rem 0.8rem 0.45rem 1rem;
}

/* Custom Leaflet markers */
.bc-marker-driver {
  /* Teal accent para driver Ã¢Â€Â” destaca como elemento positivo y estÃƒÂ¡tico  */
  background: var(--bc-accent);
  color: var(--bc-bg);
  border-radius: 50%;
  width: 36px !important; height: 36px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 3px solid var(--bc-bg);
  box-shadow: 0 2px 10px rgba(var(--bc-accent-rgb), 0.4);
}
.bc-marker-target {
  background: var(--bc-brand);
  color: var(--bc-bg);
  width: 32px !important; height: 32px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid var(--bc-bg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.bc-marker-target i { transform: rotate(45deg); }
.bc-marker-business {
  background: var(--bc-text);
  color: var(--bc-bg);
  width: 38px !important; height: 38px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid var(--bc-brand);
  box-shadow: var(--bc-shadow-md);
}

/* AnimaciÃ³n de pedidos en el live-map */
.bc-marker-target--in_transit,
.bc-marker-target--picked_up {
  animation: bc-marker-pulse 1.5s ease-in-out infinite;
}
.bc-marker-target--pending {
  animation: bc-marker-blink 1.4s ease-in-out infinite;
}
@keyframes bc-marker-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--bc-brand-rgb), 0.55); }
  50% { box-shadow: 0 0 0 10px rgba(var(--bc-brand-rgb), 0); }
}
@keyframes bc-marker-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* Ruta real del repartidor (estilo Glovo) */
.bc-route-path {
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: bc-route-flow 1.2s linear infinite;
}
.bc-route-path--active {
  animation: none;
  filter: drop-shadow(0 0 4px rgba(var(--bc-brand-rgb), 0.55));
}
@keyframes bc-route-flow {
  from { stroke-dashoffset: 22; }
  to   { stroke-dashoffset: 0; }
}

/* Tooltip con ETA encima del marcador del repartidor (Glovo) */
.bc-driver-eta-tooltip {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--bc-text) !important;
  font-size: 0.72rem;
  font-weight: 700;
}
.bc-driver-eta {
  display: inline-block;
  background: var(--bc-surface);
  color: var(--bc-brand);
  border: 1px solid var(--bc-brand);
  border-radius: var(--bc-radius-pill, 999px);
  padding: 0.15rem 0.45rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  white-space: nowrap;
}
.bc-driver-eta:before {
  content: 'â± ';
}

/* Ficha inferior estilo Glovo del repartidor/pedido */
.bc-livemap-card {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--bc-surface);
  border-top: 1px solid var(--bc-line);
  border-radius: 1.1rem 1.1rem 0 0;
  box-shadow: 0 -6px 30px rgba(0,0,0,0.12);
  padding: 1rem 1.1rem 1.5rem;
  max-height: 260px;
  overflow-y: auto;
  animation: bc-card-slide-up 0.25s ease-out;
  max-width: 900px;
  margin: 0 auto;
}
@keyframes bc-card-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.bc-livemap-card__inner { position: relative; }
.bc-livemap-card__close {
  position: absolute;
  top: -0.3rem; right: -0.3rem;
  background: var(--bc-surface-2);
  border: 1px solid var(--bc-line);
  color: var(--bc-text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}
.bc-livemap-card__close:hover { background: var(--bc-line); transform: scale(1.05); }
.bc-livemap-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.bc-livemap-card__avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.bc-livemap-card__title { flex-grow: 1; min-width: 0; }
.bc-livemap-card__name { font-weight: 700; font-size: 1.05rem; color: var(--bc-text); }
.bc-livemap-card__meta { font-size: 0.78rem; color: var(--bc-text-muted); margin-top: 0.05rem; }
.bc-livemap-card__status { flex-shrink: 0; }
.bc-livemap-card__order { background: var(--bc-surface-2); border-radius: var(--bc-radius-sm); padding: 0.8rem; }
.bc-livemap-card__order-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.3rem; }
.bc-livemap-card__customer { font-weight: 600; color: var(--bc-text); }
.bc-livemap-card__address { font-size: 0.8rem; color: var(--bc-text-muted); margin-bottom: 0.7rem; }
.bc-livemap-card__kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.7rem; }
.bc-livemap-card__kpi { text-align: center; background: var(--bc-surface); border-radius: var(--bc-radius-sm); padding: 0.45rem 0.2rem; border: 1px solid var(--bc-line); }
.bc-livemap-card__kpi-label { display: block; font-size: 0.65rem; color: var(--bc-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.bc-livemap-card__kpi-value { display: block; font-size: 0.9rem; font-weight: 700; color: var(--bc-brand); }
.bc-livemap-card__progress { height: 8px; background: var(--bc-line); border-radius: var(--bc-radius-pill, 999px); overflow: hidden; margin-bottom: 0.25rem; }
.bc-livemap-card__progress-bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--bc-brand), #e85d4e); border-radius: var(--bc-radius-pill, 999px); transform: scaleX(var(--bar-f, 0)); transform-origin: left; transition: transform 0.6s ease; }
.bc-livemap-card__progress-label { font-size: 0.72rem; color: var(--bc-text-muted); text-align: right; }
.bc-livemap-card__footer { display: flex; gap: 0.5rem; margin-top: 0.9rem; flex-wrap: wrap; }

@media (max-width: 575.98px) {
  .bc-livemap-card { padding: 0.85rem; border-radius: 0.9rem 0.9rem 0 0; }
  .bc-livemap-card__kpi-value { font-size: 0.8rem; }
}

/* Leaflet popup en dark mode */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--bc-surface) !important;
  color: var(--bc-text) !important;
  border-radius: var(--bc-radius-sm) !important;
  box-shadow: var(--bc-shadow-md) !important;
}
.leaflet-popup-content { color: var(--bc-text); margin: 0.7rem 0.85rem; font-size: 0.85rem; }
.leaflet-popup-content strong { color: var(--bc-text); }
.leaflet-container a { color: var(--bc-brand); }
.leaflet-control-zoom a {
  background: var(--bc-surface) !important;
  color: var(--bc-text) !important;
  border-color: var(--bc-line) !important;
}
.leaflet-control-attribution {
  background: var(--bc-surface) !important;
  color: var(--bc-text-muted) !important;
}
.leaflet-bar { box-shadow: var(--bc-shadow-md) !important; }

/* ---- Toolbar Mapa en vivo: indicador Auto-refresco ---- */
.bc-livemap-auto-btn { min-width: 5.5rem; }
.bc-livemap-auto-btn.active,
.bc-livemap-auto-btn.btn-outline-success {
  /* Bootstrap maneja colores. AquÃƒÂ­ solo el peso del texto. */
  font-variant-numeric: tabular-nums;
}
.bc-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bc-success, #2ecc71);
  margin-right: 0.4rem;
  vertical-align: middle;
  position: relative;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  animation: bcLivemapPulse 1.6s ease-out infinite; /* impeccable-disable-line pulsing-dot */
}
@keyframes bcLivemapPulse {
  0%   { box-shadow: 0 0 0 0    rgba(46, 204, 113, 0.65); }
  70%  { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);    }
  100% { box-shadow: 0 0 0 0    rgba(46, 204, 113, 0);    }
}
@media (prefers-reduced-motion: reduce) {
  .bc-pulse-dot { animation: none; }
}


/* En dark mode aplicamos un filtro a las tiles SOLO si el proveedor activo es claro.
   Si la capa ya es oscura nativa (DarkMatter / SatÃƒÂ©lite), no hace falta y queda mejor
   sin filtro. La bandera body[data-live-map-dark="1"] se actualiza al cambiar de capa. */
[data-bs-theme="dark"] body:not([data-live-map-dark="1"]) .leaflet-tile-pane {
  filter: brightness(0.7) invert(1) contrast(1.1) hue-rotate(180deg) saturate(0.6) brightness(0.9);
}

/* Control de capas (Leaflet nativo) integrado con el tema */
.leaflet-control-layers {
  background: var(--bc-surface) !important;
  color: var(--bc-text) !important;
  border: 1px solid var(--bc-line) !important;
  border-radius: var(--bc-radius-sm) !important;
  box-shadow: var(--bc-shadow-md) !important;
  font-family: var(--bc-font-body) !important; /* control capas overused-font â€” Bellaciao design system */
}
.leaflet-control-layers-toggle {
  background-color: var(--bc-surface) !important;
  background-image: none !important;
}
.leaflet-control-layers-toggle::before {
  content: '\e466';                            /* ph-stack */
  font-family: 'Phosphor';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--bc-text);
}
.leaflet-control-layers-expanded {
  padding: 0.6rem 0.85rem !important;
  min-width: 200px;
}
.leaflet-control-layers-expanded label {
  display: flex !important;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0 !important;
  padding: 0.25rem 0.45rem;
  border-radius: var(--bc-radius-xs);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.12s ease;
}
.leaflet-control-layers-expanded label:hover { background: var(--bc-surface-2); }
.leaflet-control-layers-expanded input[type="radio"],
.leaflet-control-layers-expanded input[type="checkbox"] {
  accent-color: var(--bc-brand);
  cursor: pointer;
}
.leaflet-control-layers-separator {
  border-top-color: var(--bc-line) !important;
  margin: 0.4rem 0 !important;
}

/* ============================================================
   13. HEALTH VIEW
   ============================================================ */

.health-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--bc-radius-md);
  margin-bottom: 1rem;
  font-weight: 600;
  border: 1px solid var(--bc-line);
}
.health-summary.healthy  { background: var(--bc-success-soft); color: var(--bc-success); border-color: rgba(21, 128, 61, 0.25); }
.health-summary.degraded { background: var(--bc-warning-soft); color: var(--bc-warning); border-color: rgba(161, 98, 7, 0.25); }
.health-summary.down     { background: var(--bc-danger-soft);  color: var(--bc-danger);  border-color: rgba(185, 28, 28, 0.25); }
.health-summary .h-icon { font-size: 2rem; line-height: 1; }
.health-probe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-sm);
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  background: var(--bc-surface);
}
/* impeccable-disable side-tab */
.health-probe.ok    { border-left: 4px solid var(--bc-success); }
.health-probe.ko    { border-left: 4px solid var(--bc-danger); }
/* impeccable-enable side-tab */
.health-probe.opt   { border-left: 4px dashed var(--bc-line-strong); opacity: 0.7; }
.health-probe-name  { font-weight: 600; color: var(--bc-text); }
.health-probe-meta  { color: var(--bc-text-muted); font-size: 0.78rem; }
.health-bar {
  height: 6px;
  background: var(--bc-surface-3);
  border-radius: 3px;
  overflow: hidden;
  flex-grow: 1;
  max-width: 120px;
}
.health-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--bc-success) 0%, var(--bc-warning) 70%, var(--bc-danger) 100%);
  transform: scaleX(var(--bar-f, 0));
  transform-origin: left;
  transition: transform 0.3s ease;
}

/* ============================================================
   14. ACTION SHEET (mÃƒÂ³vil) + utilities
   ============================================================ */

.bc-action-sheet { padding: 0; }
.bc-action-sheet .modal-content {
  border-radius: var(--bc-radius-lg) var(--bc-radius-lg) 0 0;
}
.bc-action-list { display: flex; flex-direction: column; }
.bc-action-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--bc-line);
  color: var(--bc-text) !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.15s ease;
}
.bc-action-list a:last-child { border-bottom: none; }
.bc-action-list a:hover { background: var(--bc-surface-2); }
.bc-action-list .bc-action-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bc-surface-2);
  border-radius: var(--bc-radius-sm);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.cursor-pointer { cursor: pointer; }
.hover-underline:hover { text-decoration: underline; }

/* ============================================================
   14.b  UNIFICATION LAYER (v1.7) Ã‚Â· estilos consistentes globales
   ------------------------------------------------------------
   Esta capa unifica patrones que estaban inconsistentes entre
   componentes: switches, hover de cards, pills de estado,
   botones-icono de acciÃƒÂ³n, etc. Se aplica AL FINAL para
   sobreescribir cualquier valor base de los componentes pero
   ANTES de los breakpoints responsive.

   Principio: si un componente ya tiene su propia variante
   premium (.bc-pc-card, .bc-pc-switch), respetarla. Si usa
   defaults de Bootstrap (form-switch, btn-link), elevarlo aquÃƒÂ­.
   ============================================================ */

/* ---- 1. Form switches Bootstrap Ã¢Â†Â’ brand wine red ----
   Aplica a TODOS los Bootstrap form-switch en la app (settings,
   modals, etc) sin necesidad de cambiar el HTML. Mantiene
   funcionalidad nativa de Bootstrap (focus, accesibilidad). */
.form-switch .form-check-input {
  width: 2.25em;
  height: 1.25em;
  cursor: pointer;
  border-color: var(--bc-line-strong);
  background-color: var(--bc-surface-3);
  transition: background-color 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.18s ease,
              box-shadow 0.18s ease;
}
.form-switch .form-check-input:focus {
  border-color: var(--bc-brand);
  box-shadow: 0 0 0 3px rgba(var(--bc-brand-rgb), 0.18);
}
.form-switch .form-check-input:checked {
  background-color: var(--bc-brand);
  border-color: var(--bc-brand);
}
.form-switch .form-check-input:checked:focus {
  border-color: var(--bc-brand);
  box-shadow: 0 0 0 3px rgba(var(--bc-brand-rgb), 0.25);
}
.form-check-label { cursor: pointer; }

/* ---- 2. Card elevation pattern unificada ----
   IMPORTANTE: .bc-card es genÃƒÂ©rica (containers como settings, dashboards,
   metric grids). NO debe levitar en hover, solo cambiar shadow/border
   sutilmente. Las cards "item" (delivery, product, KPI) sÃƒÂ­ levitan
   porque son clickeables/seleccionables.

   La transiciÃƒÂ³n ya estÃƒÂ¡ bien definida en cada componente Ã¢Â€Â” aquÃƒÂ­ solo
   uniformamos el timing y curva para consistencia visual. */
.bc-card,
.kpi,
.bc-pc-card,
.bc-delivery-card {
  transition:
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.18s ease,
    transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Card de delivery alineada con el patrÃƒÂ³n premium item-card */
.bc-delivery-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--bc-shadow-md);
  border-color: var(--bc-line-strong);
}

/* ---- 3. Status pill reutilizable ----
   Generaliza .bc-pc-pill para uso en cualquier vista. La clase
   original sigue funcionando (alias). */
.bc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  line-height: 1;
  background: var(--bc-surface-2);
  color: var(--bc-text-muted);
  border: 1px solid var(--bc-line);
}
.bc-pill i { font-size: 0.78rem; }
.bc-pill.is-success {
  background: var(--bc-success-soft); color: var(--bc-success);
  border-color: rgba(21, 128, 61, 0.2);
}
.bc-pill.is-warning, .bc-pill.is-low {
  background: var(--bc-warning-soft); color: var(--bc-warning);
  border-color: rgba(161, 98, 7, 0.2);
}
.bc-pill.is-danger, .bc-pill.is-out {
  background: var(--bc-danger-soft); color: var(--bc-danger);
  border-color: rgba(185, 28, 28, 0.2);
}
.bc-pill.is-info {
  background: var(--bc-info-soft); color: var(--bc-info);
  border-color: rgba(29, 78, 216, 0.2);
}
.bc-pill.is-brand {
  background: var(--bc-brand-soft); color: var(--bc-brand);
  border-color: rgba(var(--bc-brand-rgb), 0.2);
}

/* ---- 4. Icon-action button reutilizable ----
   PatrÃƒÂ³n premium para botones-icono inline (editar, ver, borrar)
   usado en tablas, cards, y headers. Mismo look que .bc-pc-edit
   pero generalizado. */
.bc-icon-action.bc-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--bc-radius-sm);
  color: var(--bc-text-subtle);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.bc-icon-action.bc-icon-action:hover, .bc-icon-action.bc-icon-action:focus-visible {
  background: var(--bc-brand-soft);
  border-color: rgba(var(--bc-brand-rgb), 0.2);
  color: var(--bc-brand);
  outline: none;
}
.bc-icon-action.bc-icon-action:active { transform: scale(0.92); }
.bc-icon-action.bc-icon-action i { font-size: 1rem; }
.bc-icon-action.bc-icon-action.is-danger:hover, .bc-icon-action.bc-icon-action.is-danger:focus-visible {
  background: var(--bc-danger-soft);
  border-color: rgba(185, 28, 28, 0.2);
  color: var(--bc-danger);
}

/* ---- 5. Empty state premium ----
   Refina el empty state para que tenga el mismo polish que el
   resto del UI (icono mÃƒÂ¡s grande, copy con jerarquÃƒÂ­a). */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 3rem 1rem;
  color: var(--bc-text-muted);
}
.empty-icon {
  font-size: 3.25rem;
  opacity: 0.45;
  margin-bottom: 0.25rem;
  filter: grayscale(0.3);
}

/* v1.5.2 Ã¢Â€Â” JerarquÃƒÂ­a premium en empty states (microcopy con tono humano).
   El antiguo emptyHTML(icon, msg) sigue compatible: si solo hay msg
   sale como .empty-title sin sub. */
.empty-title {
  font-family: var(--bc-font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bc-text);
  letter-spacing: 0.005em;
  margin-top: 0.3rem;
}
.empty-sub {
  font-size: 0.92rem;
  color: var(--bc-text-muted);
  max-width: 480px;
  line-height: 1.5;
  margin: 0.3rem auto 0;
}
.empty-sub strong {
  color: var(--bc-text);
  font-weight: 600;
}

/* ---- 6. Status-badge refinado ----
   Las status-badge en pedidos usan dot+texto. Refinamos espaciado
   y typografÃƒÂ­a para que sean perfectas en mobile (donde se renderan
   con menos espacio en el grid de la order card). */
.status-badge {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.status-badge .dot {
  width: 7px;
  height: 7px;
  margin-right: 0.35rem;
}

/* ---- 7. Btn-link en tablas/cards Ã¢Â†Â’ icon-action visual ----
   Botones .btn-link.btn-sm.p-1 dentro de tablas o cards reciben
   automÃƒÂ¡ticamente el tratamiento premium hover (no rompen API,
   solo mejoran visualmente). */
.bc-table .btn-link.p-1,
.bc-pc-card .btn-link.p-1,
.bc-table-cards .btn-link.p-1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  border-radius: var(--bc-radius-sm);
  color: var(--bc-text-subtle);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.bc-table .btn-link.p-1:hover,
.bc-pc-card .btn-link.p-1:hover,
.bc-table-cards .btn-link.p-1:hover {
  background: var(--bc-brand-soft);
  border-color: rgba(var(--bc-brand-rgb), 0.2);
  color: var(--bc-brand);
}
.bc-table .btn-link.p-1.text-danger:hover,
.bc-pc-card .btn-link.p-1.text-danger:hover {
  background: var(--bc-danger-soft);
  border-color: rgba(185, 28, 28, 0.2);
  color: var(--bc-danger) !important;
}

/* ---- 8. Input-group input-group-sm refinado ----
   Mejor altura, focus ring brand consistente con .bc-pc-money. */
.input-group-sm > .form-control:focus,
.input-group-sm > .form-select:focus {
  box-shadow: 0 0 0 3px rgba(var(--bc-brand-rgb), 0.12);
  border-color: var(--bc-brand);
}

/* ---- 9. Avatar consistencia ----
   Tanto el .bc-avatar del navbar como el del customer table
   tienen el mismo look (brand bg + white text inicial). */
.bc-avatar {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* ---- 10. Scrollbars consistentes en contenedores con scroll ----
   Scoped a contenedores concretos (no universal *) para no afectar
   selects nativos, iframes, ni elementos del SO. */
.bc-main,
.modal-body,
.dropdown-menu,
.table-responsive,
.bc-delivery-col-body,
.bc-notif-popover .popover-body {
  scrollbar-width: thin;
  scrollbar-color: var(--bc-line) transparent;
}
.bc-main::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.dropdown-menu::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.bc-delivery-col-body::-webkit-scrollbar,
.bc-notif-popover .popover-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.bc-main::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.dropdown-menu::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
.bc-delivery-col-body::-webkit-scrollbar-track,
.bc-notif-popover .popover-body::-webkit-scrollbar-track {
  background: transparent;
}
.bc-main::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.dropdown-menu::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.bc-delivery-col-body::-webkit-scrollbar-thumb,
.bc-notif-popover .popover-body::-webkit-scrollbar-thumb {
  background: var(--bc-line);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.bc-main::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.dropdown-menu::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover,
.bc-delivery-col-body::-webkit-scrollbar-thumb:hover {
  background: var(--bc-line-strong);
  background-clip: content-box;
}

/* ============================================================
   14.c Ã‚Â· LOGO UPLOADER CARD (v1.6)
   ------------------------------------------------------------
   Card de Ajustes Ã¢Â†Â’ Logo. Drop zone full-width con preview box
   en vivo (square/wide/extra-wide), botones primarios + URL
   externa colapsable. Inspirada en Stripe Branding / Shopify
   theme editor. Mobile-first, accesible, dark-aware.
   ============================================================ */

.bc-logo-card {
  /* Filete dorado sutil arriba para diferenciarla como "card de marca" */
  position: relative;
  overflow: hidden;
}
.bc-logo-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--bc-brand) 25%,
    var(--bc-gold-light) 50%,
    var(--bc-brand) 75%,
    transparent 100%);
  opacity: 0.55;
  pointer-events: none;
}

/* Drop zone Ã¢Â€Â” full width, dashed border, hover/drag states */
.bc-logo-drop {
  position: relative;
  display: block;
  border: 1.5px dashed var(--bc-line-strong);
  border-radius: var(--bc-radius-lg);
  background: var(--bc-bg-muted);
  padding: 1.25rem 1.1rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.06s ease;
}
.bc-logo-drop:hover {
  border-color: var(--bc-brand);
  background: color-mix(in srgb, var(--bc-brand) 4%, var(--bc-bg-muted));
}
.bc-logo-drop:focus-visible {
  border-color: var(--bc-brand);
  box-shadow: 0 0 0 3px rgba(var(--bc-brand-rgb), 0.18);
}
.bc-logo-drop:active { transform: scale(0.998); }

.bc-logo-drop.is-dragging {
  border-color: var(--bc-brand);
  background: color-mix(in srgb, var(--bc-brand) 8%, var(--bc-bg-muted));
  box-shadow:
    inset 0 0 0 2px rgba(var(--bc-brand-rgb), 0.3),
    0 0 24px rgba(var(--bc-brand-rgb), 0.15);
}
.bc-logo-drop.is-loading {
  pointer-events: none;
  opacity: 0.7;
}
.bc-logo-drop.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(var(--bc-brand-rgb), 0.08) 50%,
    transparent 100%);
  background-size: 200% 100%;
  animation: bc-logo-loading 1.4s linear infinite;
  border-radius: inherit;
  pointer-events: none;
}
@keyframes bc-logo-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Wrap interno: preview a la izquierda + info textual a la derecha */
.bc-logo-preview-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

/* Caja del preview Ã¢Â€Â” fondo "checkered" sutil para detectar transparencia,
   se adapta al aspect ratio detectado del logo. */
.bc-logo-preview-box {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: var(--bc-radius-md);
  background:
    linear-gradient(45deg, var(--bc-surface-3) 25%, transparent 25%),
    linear-gradient(-45deg, var(--bc-surface-3) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--bc-surface-3) 75%),
    linear-gradient(-45deg, transparent 75%, var(--bc-surface-3) 75%),
    var(--bc-surface);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
  border: 1px solid var(--bc-line);
  padding: 0.5rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.bc-logo-preview-box[data-logo-aspect="wide"] {
  width: 156px;
}
.bc-logo-preview-box[data-logo-aspect="extra-wide"] {
  width: 220px;
}
.bc-logo-preview-box[data-logo-aspect="tall"] {
  width: 78px;
}
.bc-logo-preview-box .bc-brand-logo {
  /* El preview ocupa todo el box, no las medidas fijas del navbar */
  width: 100%;
  height: 100%;
  filter: none;
}
.bc-logo-preview-box .bc-brand-logo img,
.bc-logo-preview-box .bc-brand-logo svg {
  border-radius: var(--bc-radius-sm);
}

.bc-logo-preview-info { min-width: 0; flex: 1 1 auto; }
.bc-logo-preview-title {
  font-family: var(--bc-font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--bc-text);
  margin-bottom: 0.15rem;
  letter-spacing: -0.005em;
}
.bc-logo-preview-meta {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--bc-text-muted);
  font-variant-numeric: tabular-nums;
}

/* Hint dentro de la drop zone (visible solo cuando se arrastra encima) */
.bc-logo-drop-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: color-mix(in srgb, var(--bc-brand) 6%, var(--bc-surface));
  border-radius: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--bc-brand);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 2;
}
.bc-logo-drop-hint i {
  font-size: 2.1rem;
  filter: drop-shadow(0 4px 12px rgba(var(--bc-brand-rgb), 0.25));
}
.bc-logo-drop.is-dragging .bc-logo-drop-hint {
  opacity: 1;
}

/* Toggle de URL externa: link discreto, transiciÃƒÂ³n suave del row */
.bc-logo-url-toggle {
  text-decoration: none !important;
  font-size: 0.82rem;
  color: var(--bc-text-muted) !important;
  font-weight: 500;
  transition: color 0.15s ease;
}
.bc-logo-url-toggle:hover {
  color: var(--bc-brand) !important;
}
.bc-logo-url-row { /* slide visual del collapse */
  animation: bc-logo-url-in 0.2s ease;
}
@keyframes bc-logo-url-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Tips block Ã¢Â€Â” alineado, micro icons coloreados */
.bc-logo-tips {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 0.85rem;
  background: var(--bc-bg-muted);
  border-radius: var(--bc-radius-sm);
  border-left: 3px solid color-mix(in srgb, var(--bc-brand) 50%, transparent); /* impeccable-disable-line side-tab */
}
.bc-logo-tips > div {
  line-height: 1.45;
}
.bc-logo-tips i {
  width: 1em;
  display: inline-block;
}

/* ---- Responsive: en mobile, stack vertical ---- */
@media (max-width: 575.98px) {
  .bc-logo-preview-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .bc-logo-preview-box {
    width: 100% !important;
    max-width: 220px;
    height: 96px;
    align-self: center;
  }
  .bc-logo-drop { padding: 1rem 0.85rem; }
  .bc-logo-drop-hint { font-size: 0.85rem; }
}

/* v2.1.4 Ã¢Â€Â” Badge de estado del logo (subido/error/info).
   Reemplaza text-bg-* de Bootstrap que dejaba un cÃƒÂ­rculo gris fantasma
   cuando el texto se vaciaba al timeout. */
.bc-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  animation: bc-logo-badge-in 0.18s ease;
}
@keyframes bc-logo-badge-in {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bc-logo-badge-neutral {
  background: var(--bc-bg-muted);
  color: var(--bc-text-muted);
  border-color: var(--bc-line);
}
.bc-logo-badge-info {
  background: var(--bc-info-soft);
  color: var(--bc-info);
  border-color: rgba(30, 64, 175, 0.18);
}
.bc-logo-badge-success {
  background: var(--bc-success-soft);
  color: var(--bc-success);
  border-color: rgba(4, 120, 87, 0.18);
}
.bc-logo-badge-warning {
  background: var(--bc-warning-soft);
  color: var(--bc-warning);
  border-color: rgba(146, 64, 14, 0.18);
}
.bc-logo-badge-danger {
  background: var(--bc-danger-soft);
  color: var(--bc-danger);
  border-color: rgba(190, 18, 60, 0.18);
}

/* ============================================================
   15. BREAKPOINTS Ã‚Â· Mobile-first responsive system (v1.7)
   ------------------------------------------------------------
   Estrategia: tokens (--bc-fs-*) escalan progresivamente por
   breakpoint Bootstrap. TipografÃƒÂ­a fluida con clamp() en KPIs
   y page-title cubre los "in-between" sizes sin saltos bruscos.

   Breakpoints:
   xs  <576px  Ã¢Â€Â” phone portrait  (1 col KPI, navbar minimal)
   sm  Ã¢Â‰Â¥576px  Ã¢Â€Â” phone landscape (2 col KPI, navbar normal)
   md  Ã¢Â‰Â¥768px  Ã¢Â€Â” tablet portrait (2 col KPI, wordmark visible)
   lg  Ã¢Â‰Â¥992px  Ã¢Â€Â” tablet land/desk (4 col KPI, sidebar fijo, search visible)
   xl  Ã¢Â‰Â¥1200px  Ã¢Â€Â” desktop
   xxl Ã¢Â‰Â¥1400px  Ã¢Â€Â” wide desktop
   ============================================================ */

/* ---------- XS (<576px) Ã‚Â· phone portrait ---------- */
@media (max-width: 575.98px) {
  :root, [data-bs-theme="light"], [data-bs-theme="dark"] {
    --bc-fs-page-title: 1.3rem;
    --bc-fs-card-title: 0.92rem;
    --bc-fs-kpi-value: 1.5rem;
    --bc-pad-main: 0.75rem;
    --bc-navbar-h: 54px;
  }
  /* Touch targets Ã¢Â‰Â¥44px (Apple HIG + WCAG 2.1 Level AA 2.5.5) en mobile.
     El nav-link debe ser tappable cÃƒÂ³modamente con el pulgar. */
  .bc-nav .nav-link {
    min-height: 44px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
  .bc-burger {
    min-width: 44px;
    min-height: 44px;
  }
  .bc-card { padding: 0.85rem 0.9rem; }
  .bc-page-head { gap: 0.5rem; padding-bottom: 0.75rem; margin-bottom: 1rem; }
  .bc-page-sub { font-size: 0.78rem; }
  .bc-table { font-size: 0.82rem; }
  .bc-table thead th { padding: 0.5rem 0.6rem; font-size: 0.66rem; letter-spacing: 0.04em; }
  .bc-table tbody td { padding: 0.5rem 0.6rem; }
  .login-card { padding: 1.85rem 1.3rem 1.5rem; border-radius: var(--bc-radius-lg); }
  .login-title { font-size: 1.85rem; }
  .login-sub { font-size: 0.78rem; letter-spacing: 0.02em; }
  .login-logo { width: 72px; height: 72px; }

  /* KPI Ã‚Â· mÃƒÂ¡s compacto en xs */
  .kpi { padding: 0.85rem 1rem; padding-right: 2rem; }
  .kpi-icon { top: 0.7rem; right: 0.75rem; font-size: 1rem; }
  .kpi-label { font-size: 0.66rem; letter-spacing: 0.06em; }
  .kpi-trend { font-size: 0.72rem; line-height: 1.35; }

  /* Navbar Ã‚Â· ultra-compacto en xs.
     'demo' pill se reduce a su mÃƒÂ­nimo y reloj se oculta. */
  .bc-mode-pill {
    margin-left: 0.3rem;
    padding: 0.1rem 0.5rem 0.02rem;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
  }
  .bc-icon-btn.bc-icon-btn { width: 40px; height: 40px; }
  .bc-icon-btn.bc-icon-btn i { font-size: 1rem; }
  .bc-navbar-actions { gap: 0.3rem; }
  .bc-brand-logo { width: 36px; height: 36px; }
  .bc-sync-pill { padding: 0.2rem 0.55rem; font-size: 0.72rem; }
  .bc-user-btn { padding: 0.15rem 0.3rem 0.15rem 0.15rem; }
  .bc-avatar { width: 28px; height: 28px; font-size: 0.85rem; }
  /* Reloj fuera en xs: ya tiene d-none d-md-inline en HTML, refuerzo */
  .bc-now-clock { display: none; }

  /* Toasts Ã‚Â· ocupan ancho casi total en mobile, mÃƒÂ¡s legibles */
  .toast { min-width: 0; width: calc(100vw - 1.5rem); margin: 0 0 0.5rem 0; }
  #toast-container { padding: 0.5rem; left: 0; right: 0; }

  /* Modals Ã‚Â· full-width margen */
  .modal-dialog { margin: 0.5rem; }

  /* Delivery board responsive Ã‚Â· gestionado en secciÃƒÂ³n 12 (kanban scroll horizontal) */

  /* Live map ocupa mÃƒÂ¡s pantalla en mobile */
  .bc-livemap { height: calc(100vh - 220px); min-height: 350px; }
  .bc-livemap-legend, .bc-livemap-stats { font-size: 0.72rem; padding: 0.4rem 0.55rem; }
  .bc-livemap-stats { gap: 0.6rem; flex-wrap: wrap; }

  /* Cards genericas con padding ajustado */
  .bc-card-head { gap: 0.5rem; margin-bottom: 0.75rem; }
  .bc-card-title { font-size: 0.95rem; }
}

/* ---------- SM (Ã¢Â‰Â¥576px) Ã‚Â· phone landscape ---------- */
@media (min-width: 576px) and (max-width: 767.98px) {
  :root, [data-bs-theme="light"], [data-bs-theme="dark"] {
    --bc-fs-page-title: 1.5rem;
    --bc-fs-kpi-value: 1.7rem;
    --bc-pad-main: 1rem;
  }
  /* Touch targets cÃƒÂ³modos tambiÃƒÂ©n en SM (sidebar sigue siendo offcanvas) */
  .bc-nav .nav-link { min-height: 42px; }
  .bc-card { padding: 1rem 1.1rem; }
  .bc-page-head { gap: 0.65rem; padding-bottom: 0.9rem; margin-bottom: 1.2rem; }
}

/* ---------- MD (Ã¢Â‰Â¥768px) Ã‚Â· tablet portrait ---------- */
@media (min-width: 768px) and (max-width: 991.98px) {
  :root, [data-bs-theme="light"], [data-bs-theme="dark"] {
    --bc-fs-page-title: 1.65rem;
    --bc-fs-kpi-value: 1.85rem;
    --bc-pad-main: 1.25rem;
    --bc-sidebar-w: var(--bc-sidebar-w-tablet);
  }
  /* En md el header del navbar respira un poco mÃƒÂ¡s */
  .bc-icon-btn.bc-icon-btn { width: 42px; height: 42px; }
}

/* ---------- LG (Ã¢Â‰Â¥992px) Ã‚Â· desktop / large tablet landscape ---------- */
@media (min-width: 992px) {
  :root, [data-bs-theme="light"], [data-bs-theme="dark"] {
    --bc-fs-page-title: 1.75rem;
    --bc-fs-kpi-value: 2rem;
    --bc-pad-main: 1.5rem;
  }
}

/* ---------- XL (Ã¢Â‰Â¥1200px) Ã‚Â· desktop ---------- */
@media (min-width: 1200px) {
  :root, [data-bs-theme="light"], [data-bs-theme="dark"] {
    --bc-fs-page-title: 1.85rem;
    --bc-fs-kpi-value: 2.1rem;
  }
}

/* ---------- XXL (Ã¢Â‰Â¥1400px) Ã‚Â· wide desktop ---------- */
@media (min-width: 1400px) {
  :root, [data-bs-theme="light"], [data-bs-theme="dark"] {
    --bc-fs-page-title: 1.95rem;
    --bc-fs-kpi-value: 2.2rem;
    --bc-sidebar-w: 264px;
  }
  .bc-main { padding: 1.75rem 2rem 3rem; max-width: 1500px; margin: 0 auto; }
}

/* ============================================================
   16. PREMIUM ANIMATIONS (v1.7)
   ------------------------------------------------------------
   Inspirado en Linear / Vercel / Stripe Dashboard:
   - Page enter: fade-up suave del contenedor #view en cada ruta
   - Stagger cascada: KPIs y cards aparecen en secuencia
   - Reveal on scroll: tablas largas y secciones below-the-fold
   - Skeletons: shimmer mientras carga, mejor que spinner aislado
   - Hover micro-interacciones: scale sutil + glow en focus
   - Modal/dropdown entrance: scale + fade
   - Pulse de atenciÃƒÂ³n: bell, sync, badges
   Todo respeta @media (prefers-reduced-motion: reduce) mÃƒÂ¡s abajo.
   ============================================================ */

/* ---- 16.a Ã‚Â· Page enter (vista entrante en cada ruta) ---- */
@keyframes bc-anim-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bc-anim-page-enter {
  animation: bc-anim-page-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ---- 16.b Ã‚Â· Stagger (cascada de hijos directos) ----
   Cualquier contenedor con .bc-stagger reparte delays a sus hijos directos.
   JS asigna animation-delay; aquÃƒÂ­ definimos la animaciÃƒÂ³n que se aplica.
   El truco "both" hace que el estado inicial (opacity:0) se aplique antes
   de que dispare la animaciÃƒÂ³n, evitando un "flash" de contenido sin animar. */
@keyframes bc-anim-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bc-stagger > * {
  animation: bc-anim-fade-up 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Stagger especializado para tablas: aplica a <tr> sin tocar el HTML.
   Solo se activa cuando el padre <tbody> tiene .bc-stagger-rows. */
.bc-stagger-rows tbody tr {
  animation: bc-anim-fade-up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.bc-stagger-rows tbody tr:nth-child(1)  { animation-delay:   0ms; }
.bc-stagger-rows tbody tr:nth-child(2)  { animation-delay:  35ms; }
.bc-stagger-rows tbody tr:nth-child(3)  { animation-delay:  70ms; }
.bc-stagger-rows tbody tr:nth-child(4)  { animation-delay: 105ms; }
.bc-stagger-rows tbody tr:nth-child(5)  { animation-delay: 140ms; }
.bc-stagger-rows tbody tr:nth-child(6)  { animation-delay: 175ms; }
.bc-stagger-rows tbody tr:nth-child(7)  { animation-delay: 210ms; }
.bc-stagger-rows tbody tr:nth-child(8)  { animation-delay: 245ms; }
.bc-stagger-rows tbody tr:nth-child(n+9){ animation-delay: 280ms; }

/* ---- 16.c Ã‚Â· Reveal on scroll (IO) ----
   La clase .bc-reveal aplica estado inicial invisible. Cuando entra en el
   viewport, JS aÃƒÂ±ade .is-visible que devuelve a su sitio. Smooth. */
.bc-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.bc-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- 16.d Ã‚Â· Skeleton loader (shimmer) ----
   Reemplaza el spinner solitario por un esqueleto visual del contenido.
   Brand-aware: el shimmer usa el rojo wine al 6% de opacidad. */
/* ============================================================
   OPTIMISTIC UI Ã¢Â€Â” v1.5.2 Ã¢Â€Â” Feedback visual inmediato en botones
   ============================================================
   Aplicado en cambios de estado de pedido (changeStatus()).
   Da sensaciÃƒÂ³n de respuesta instantÃƒÂ¡nea sin esperar al backend. */
.is-changing {
  transform: scale(0.97);
  opacity: 0.85;
  pointer-events: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.is-changing .spinner-border-sm {
  width: 0.9rem;
  height: 0.9rem;
  border-width: 0.18em;
}
.is-changed {
  animation: bc-anim-success-pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: var(--bc-success, #047857) !important;
  border-color: var(--bc-success, #047857) !important;
  color: var(--bc-bg) !important;
}
@keyframes bc-anim-success-pop {
  0%   { transform: scale(0.95); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.bc-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bc-surface-2);
  border-radius: var(--bc-radius-sm);
  color: transparent !important;
  user-select: none;
}
.bc-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--bc-brand) 6%, transparent) 50%,
    transparent 100%);
  animation: bc-skeleton-shimmer 1.6s ease-in-out infinite;
}
@keyframes bc-skeleton-shimmer {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}

/* Esqueletos pre-formateados que se usan en views.js */
.bc-skeleton-line {
  height: 0.85rem;
  margin: 0.4rem 0;
  border-radius: 4px;
}
.bc-skeleton-line.lg { height: 1.4rem; }
.bc-skeleton-line.sm { height: 0.65rem; }
.bc-skeleton-line.w-90 { width: 90%; }
.bc-skeleton-line.w-75 { width: 75%; }
.bc-skeleton-line.w-50 { width: 50%; }
.bc-skeleton-line.w-30 { width: 30%; }

.bc-skeleton-kpi {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  padding: 1rem 1.1rem;
  height: 100%;
}
.bc-skeleton-card {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md);
  padding: 1.2rem 1.35rem;
  margin-bottom: 1rem;
}

/* ---- 16.e Ã‚Â· Card hover lift premium ----
   Las cards KPI y product-card ya tienen translateY(-2px) en hover.
   AquÃƒÂ­ refinamos la curva + aÃƒÂ±adimos resplandor sutil. */
.kpi:hover,
.bc-pc-card:hover,
.bc-delivery-card:hover {
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.18s ease;
}

/* ---- 16.f Ã‚Â· Pulse de atenciÃƒÂ³n (sin ser molesto) ----
   Usado por JS cuando llega un evento nuevo (pedido, notificaciÃƒÂ³n). */
@keyframes bc-anim-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--bc-brand-rgb), 0.45); }
  60%  { box-shadow: 0 0 0 12px rgba(var(--bc-brand-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--bc-brand-rgb), 0); }
}
.bc-anim-pulse {
  animation: bc-anim-pulse 1.1s ease-out 1;
}

/* ---- 16.g Ã‚Â· Nuevo item entrando en lista ----
   Slide-in desde arriba con un pequeÃƒÂ±o brillo. Usado por observeNew(). */
@keyframes bc-anim-new-in {
  0%   { opacity: 0; transform: translateY(-12px); background-color: color-mix(in srgb, var(--bc-brand) 12%, transparent); }
  60%  { opacity: 1; transform: translateY(0);     background-color: color-mix(in srgb, var(--bc-brand) 8%, transparent); }
  100% { opacity: 1; transform: translateY(0);     background-color: transparent; }
}
.bc-anim-new {
  animation: bc-anim-new-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ---- 16.h Ã‚Â· Modal entrance refinado ----
   Bootstrap 5 ya anima modals, pero el scale por defecto es muy sutil.
   AquÃƒÂ­ lo elevamos a un scale-up + fade mÃƒÂ¡s confident. */
.modal.fade .modal-dialog {
  transform: translateY(-12px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.22s ease;
}
.modal.show .modal-dialog {
  transform: translateY(0) scale(1);
}

/* ---- 16.i Ã‚Â· Dropdown entrance ----
   Subtle scale + fade. Sin transiciÃƒÂ³n Bootstrap por defecto. */
.dropdown-menu.show {
  animation: bc-anim-dropdown-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: top right;
}
@keyframes bc-anim-dropdown-in {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- 16.j Ã‚Â· Sidebar nav active indicator slide ----
   Cuando cambia el item activo, la barrita dorada del nav-link.active
   se desliza suavemente. Aprovecha la regla .bc-nav .nav-link.active::before. */
.bc-nav .nav-link::before {
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---- 16.k Ã‚Â· Avatar hover micro-interaction ---- */
.bc-user-btn:hover .bc-avatar {
  transform: scale(1.05);
}
.bc-avatar {
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease;
}

/* ---- 16.l Ã‚Â· Icon button click ripple sutil ----
   No es un ripple completo Material Ã¢Â€Â” mÃƒÂ¡s bien un flash de marca que
   feedback rÃƒÂ¡pido sin distraer. */
.bc-icon-btn.bc-icon-btn:active {
  background: color-mix(in srgb, var(--bc-brand) 22%, var(--bc-surface));
}

/* ---- 16.m Ã‚Â· Brand logo hover wiggle ----
   El navbar logo gira sutilmente al hover (ya estÃƒÂ¡) Ã¢Â€Â” aÃƒÂ±adimos vibraciÃƒÂ³n
   premium en el sidebar logo tambiÃƒÂ©n. */
.bc-sidebar-head-logo:hover {
  transform: rotate(-4deg) scale(1.04);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---- 16.n Ã‚Â· KPI value number flow ----
   Cuando un valor cambia (count-up activo), un sutil tracking shift
   para que se sienta vivo, no estÃƒÂ¡tico. */
.kpi-value {
  transition: color 0.2s ease;
}

/* ---- 16.o Ã‚Â· Empty state breathe ----
   El icono del empty state respira sutilmente. Activo solo si la secciÃƒÂ³n
   ha estado visible >2s (sin distraer al primer pintado). */
@keyframes bc-anim-breathe {
  0%, 100% { transform: translateY(0)   scale(1);    opacity: 0.4; }
  50%      { transform: translateY(-2px) scale(1.03); opacity: 0.55; }
}
.empty .empty-icon {
  animation: bc-anim-breathe 3.6s ease-in-out infinite;
  animation-delay: 1.2s;
}

/* ---- 16.p Ã‚Â· Sync pill dot extra glow on syncing ---- */
.bc-sync-pill[data-status="syncing"] {
  animation: bc-anim-pulse 1.6s ease-out infinite;
}

/* ---- 16.q Ã‚Â· Button hover refinement ----
   .btn-brand y .btn-outline-brand: leve elevation extra en hover. */
.btn-brand,
.btn-outline-brand {
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.08s ease;
}
.btn-brand:hover {
  transform: translateY(-1px);
}
.btn-brand:active {
  transform: translateY(0);
}

/* =====================================================================
   18. FEATURES PACK Ã¢Â€Â” Busy mode + Onboarding + TOTP (v1.7)
   ===================================================================== */

/* ---- 18.a Ã‚Â· Busy mode badge en navbar ---- */
.bc-busy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bc-warning-soft);
  color: var(--bc-warning);
  border: 1px solid rgba(146, 64, 14, 0.3);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.08s ease;
  animation: bc-busy-pulse 2.5s ease-in-out infinite;
}
.bc-busy-badge:hover { filter: brightness(0.95); }
.bc-busy-badge:active { transform: scale(0.96); }
@keyframes bc-busy-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(146, 64, 14, 0.3); }
  50%      { box-shadow: 0 0 0 6px rgba(146, 64, 14, 0); }
}

/* Form switch large */
.form-switch.form-switch-lg .form-check-input {
  width: 2.8em;
  height: 1.55em;
  margin-right: 0.6rem;
}

/* ---- 18.b Ã‚Â· Onboarding overlay (5-step tour) ---- */
#bc-onboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}
.bc-onboard-mask {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 9, 0.55);
  backdrop-filter: blur(2px);
  pointer-events: auto;
  transition: opacity 0.25s ease;
}

.bc-onboard-popover {
  position: absolute;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  padding: 1rem 1.1rem 0.85rem;
  pointer-events: auto;
  animation: bc-onboard-pop-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  color: var(--bc-text);
}
.bc-onboard-popover.is-center {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
@keyframes bc-onboard-pop-in {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.bc-onboard-popover.is-center {
  animation: bc-onboard-pop-in-center 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes bc-onboard-pop-in-center {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.bc-onboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.bc-onboard-title {
  font-family: var(--bc-font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bc-text);
  margin: 0;
}
.bc-onboard-close {
  background: transparent;
  border: none;
  color: var(--bc-text-subtle);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.12s ease, color 0.12s ease;
}
.bc-onboard-close:hover {
  background: var(--bc-surface-2);
  color: var(--bc-text);
}

.bc-onboard-body {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--bc-text);
  margin-bottom: 0.85rem;
}
.bc-onboard-body strong { color: var(--bc-brand); }

.bc-onboard-foot {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bc-onboard-progress {
  height: 4px;
  background: var(--bc-surface-3);
  border-radius: 2px;
  overflow: hidden;
}
.bc-onboard-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--bc-brand) 0%, var(--bc-accent) 100%);
  border-radius: 2px;
  transform: scaleX(var(--bar-f, 0));
  transform-origin: left;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bc-onboard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---- 18.c Ã‚Â· TOTP setup modal ---- */
.bc-totp-setup {
  padding-left: 1.4rem;
  margin: 0;
}
.bc-totp-setup li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bc-line);
}
.bc-totp-setup li:last-child { border-bottom: none; }
.bc-totp-setup strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--bc-text);
}

.bc-totp-secret-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bc-surface-2);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-sm);
  padding: 0.55rem 0.75rem;
  margin: 0.4rem 0;
  font-family: var(--bc-font-mono);
}
.bc-totp-secret-box code {
  flex: 1 1 auto;
  font-size: 1rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--bc-text);
  word-break: break-all;
}

.bc-totp-code-input {
  font-family: var(--bc-font-mono);
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  text-align: center;
  padding: 0.6rem 0.5rem;
  margin: 0.4rem 0;
  font-weight: 700;
  max-width: 240px;
}

.bc-totp-recovery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  background: var(--bc-warning-soft);
  border: 1px solid rgba(146, 64, 14, 0.2);
  border-radius: var(--bc-radius-sm);
  padding: 0.7rem;
}
.bc-totp-recovery code {
  font-family: var(--bc-font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bc-warning);
  text-align: center;
  padding: 0.2rem 0;
  background: rgba(255,255,255,0.5);
  border-radius: 4px;
}

/* =========================================================================
 *  SETUP WIZARD (v1.5) Ã¢Â€Â” vista #/setup del Manager PWA
 *  -----------------------------------------------------------------------
 *  Pantalla premium SaaS de onboarding (5 steps cards + stepper + hero
 *  con progress ring). Estilo consistente con manager premium tokens
 *  --bc-* y soporte dark mode automÃƒÂ¡tico.
 *  ======================================================================= */

/* Hero */
.setup-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--bc-brand) 0%, var(--bc-brand-dark, #80120f) 60%, var(--bc-accent) 100%);
  color: var(--bc-bg);
  border-radius: var(--bc-radius-lg, 18px);
  box-shadow: 0 12px 40px rgba(var(--bc-brand-rgb), 0.22);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.setup-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}
.setup-hero-emoji {
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  position: relative;
  z-index: 1;
  animation: setupBob 3s ease-in-out infinite;
}
@keyframes setupBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.setup-hero-text { flex: 1; position: relative; z-index: 1; }
.setup-hero-title {
  margin: 0;
  color: var(--bc-bg);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.setup-hero-sub {
  margin: 6px 0 0;
  opacity: 0.92;
  font-size: 0.95rem;
}
.setup-hero-progress { position: relative; z-index: 1; }
.setup-progress-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,0.35);
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}
.setup-progress-ring.is-success {
  background: linear-gradient(135deg, var(--bc-success), color-mix(in srgb, var(--bc-success) 75%, #000));
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 24px rgba(45,186,101,0.5);
}
.setup-progress-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--bc-bg);
  line-height: 1;
}
.setup-progress-total {
  font-size: 1.1rem;
  opacity: 0.7;
  margin-left: 2px;
  color: var(--bc-bg);
}

/* Stepper */
.setup-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 24px;
  max-width: 600px;
  padding: 0 20px;
}
.setup-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bc-surface-2);
  border: 2px solid var(--bc-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--bc-text-muted);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, filter 0.3s ease;
  flex-shrink: 0;
  font-size: 0.9rem;
}
.setup-step-dot.is-done {
  background: linear-gradient(135deg, var(--bc-success), color-mix(in srgb, var(--bc-success) 75%, #000));
  border-color: var(--bc-success);
  color: var(--bc-bg);
  box-shadow: 0 4px 12px rgba(45,186,101,0.35);
}
.setup-step-line {
  flex: 1;
  height: 2px;
  background: var(--bc-line);
  margin: 0 2px;
}

/* Cards */
.setup-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.setup-card {
  background: var(--bc-surface);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-md, 14px);
  padding: 20px 22px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, filter 0.25s ease;
  position: relative;
  overflow: hidden;
}
.setup-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--bc-line-strong);
  transition: background 0.3s ease;
}
.setup-card.is-done::before {
  background: linear-gradient(180deg, var(--bc-success), #1d6e3a);
}
.setup-card.is-done {
  background: var(--bc-success-soft, rgba(45,186,101,0.06));
  border-color: rgba(45,186,101,0.3);
}
.setup-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--bc-shadow-md, 0 8px 24px rgba(0,0,0,0.08));
}
.setup-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.setup-card-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bc-brand), var(--bc-brand-dark, #80120f));
  color: var(--bc-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(var(--bc-brand-rgb), 0.3);
}
.setup-card.is-done .setup-card-num {
  background: linear-gradient(135deg, var(--bc-success), #1d6e3a);
  box-shadow: 0 3px 10px rgba(45,186,101,0.3);
}
.setup-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  flex: 1;
  color: var(--bc-text);
}
.setup-card-status {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--bc-bg-muted);
  color: var(--bc-text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.setup-card.is-done .setup-card-status {
  background: var(--bc-success-soft, rgba(45,186,101,0.12));
  color: var(--bc-success);
}
.setup-card-desc {
  color: var(--bc-text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0 0 12px 50px;
}
.setup-card-body {
  margin-left: 50px;
  font-size: 0.92rem;
}

/* Estado messages dentro de cards */
.setup-state-ok,
.setup-state-warning,
.setup-state-error,
.setup-state-pending {
  padding: 10px 14px;
  border-radius: var(--bc-radius-sm, 8px);
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-block;
}
.setup-state-ok {
  background: var(--bc-success-soft, rgba(45,186,101,0.1));
  color: var(--bc-success);
}
.setup-state-warning {
  background: var(--bc-warning-soft, rgba(240,160,32,0.12));
  color: var(--bc-warning);
}
.setup-state-error {
  background: var(--bc-danger-soft, rgba(185,28,28,0.1));
  color: var(--bc-danger);
}
.setup-state-pending {
  background: var(--bc-bg-muted);
  color: var(--bc-text-muted);
}

/* Finish CTA */
.setup-finish {
  margin-top: 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--bc-success-soft, rgba(45,186,101,0.12)) 0%, transparent 100%);
  border: 2px dashed var(--bc-success);
  border-radius: var(--bc-radius-lg, 18px);
  text-align: center;
}
.setup-finish h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: var(--bc-success);
  font-weight: 700;
}
.setup-finish h3 .ph,
.setup-finish h3 .bi {
  margin-right: 8px;
  font-size: 1.5rem;
}
.setup-finish p {
  margin: 0;
  color: var(--bc-text-muted);
  font-size: 0.95rem;
}

/* Mobile / small tablet */
@media (max-width: 767.98px) {
  .setup-hero {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 12px;
  }
  .setup-card-desc,
  .setup-card-body {
    margin-left: 0;
  }
  .setup-stepper {
    padding: 0 8px;
  }
  .setup-step-dot {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
}

/* =========================================================================
 *  AUDIT LOG Ã‚Â· ELIMINADO en v1.5.3
 *  -----------------------------------------------------------------------
 *  El bloque .bc-audit-* (sticky sidebar + filters card + breakdown panel)
 *  se quitÃƒÂ³ junto con la vista del audit log. El plugin server-side sigue
 *  registrando, pero ya no exponemos UI en el manager.
 *  ======================================================================= */

/* ============================================================
   PRINT MEDIA Ã¢Â€Â” v1.5.2 Ã¢Â€Â” Look factura premium
   ============================================================
   Cuando el usuario imprime (Ctrl+P o "Imprimir ticket"), el
   resultado tenia que verse PROFESIONAL: limpio, monocromo,
   tipografÃƒÂ­a legible, mÃƒÂ¡rgenes correctos. No el dashboard en
   B/N que se ve fatal.

   Tres principios:
   - Ocultar TODO lo que es "interactivo" o "decorativo"
     (nav, sidebar, botones de acciÃƒÂ³n, filtros, dropdowns).
   - Cambiar a una paleta print-friendly: negro + grises 200/600/900.
   - Forzar serif para tÃƒÂ­tulos (sensaciÃƒÂ³n factura tradicional)
     + tabular nums en precios para alineaciÃƒÂ³n impecable. */
@media print {
  /* Page setup: A4 vertical, mÃƒÂ¡rgenes legales */
  @page {
    size: A4 portrait;
    margin: 12mm 14mm 14mm 14mm;
  }

  /* Reset global: nada de sombras, gradientes ni colores brand
     fuertes Ã¢Â€Â” se pierden al imprimir y manchan tinta */
  *, *::before, *::after {
    /* Fondo blanco (equivale al papel): la tinta oscura nunca queda
       emparejada con un fondo de marca oscuro */
    background: #ffffff !important;
    box-shadow: none !important;
    text-shadow: none !important;
    color: #1a1a1a !important;
    animation: none !important;
    transition: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Ocultar chrome del manager Ã¢Â€Â” solo queremos el contenido del card */
  .bc-navbar,
  .bc-sidebar,
  #toast-container,
  #bc-modal,
  .bc-fab,
  .bc-page-cta,
  .modal-backdrop,
  .dropdown-menu,
  /* Banners + helpers que no aportan al ticket */
  #bc-install-sheet,
  .bc-busy-badge,
  /* Botones que no tienen sentido en papel */
  .btn,
  button:not([data-print-keep]),
  /* Filtros y toolbars */
  .bc-filters-row,
  .bc-crm-toolbar,
  .bc-crm-segments,
  /* Footer interactivo del catÃƒÂ¡logo, etc. */
  .bc-cat-toolbar,
  /* Spinners */
  .spinner-border,
  .bc-skeleton {
    display: none !important;
  }

  html, body {
    background: #ffffff !important;
    color: #1a1a1a !important;
    font-family: 'Georgia', 'Cambria', 'Times New Roman', serif !important;
    font-size: 10.5pt !important;
    line-height: 1.4 !important;
  }

  .bc-main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }

  /* Titulares: serif italic para tono trattoria premium */
  h1, h2, h3, .bc-page-title {
    font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif !important;
    color: #000 !important;
    border-bottom: 1pt solid #888 !important;
    padding-bottom: 4pt !important;
    margin-bottom: 10pt !important;
    font-weight: 700 !important;
  }
  .bc-page-title { font-size: 18pt !important; }
  h2 { font-size: 14pt !important; }
  h3, .bc-card-title { font-size: 12pt !important; border-bottom: none !important; }

  /* Cards = bloques sin marco visible */
  .bc-card,
  .kpi,
  .bc-skeleton-card,
  .bc-skeleton-kpi {
    border: 1pt solid #ccc !important;
    border-radius: 4pt !important;
    padding: 10pt 12pt !important;
    margin-bottom: 10pt !important;
    page-break-inside: avoid !important;
  }

  /* Precios + cifras: tabular nums + monospace para alinear columnas */
  .bc-price,
  .bc-amount,
  .bc-total,
  td.text-end,
  .text-end {
    font-variant-numeric: tabular-nums !important;
  }

  /* Tablas: limpias, con borde sutil */
  table {
    border-collapse: collapse !important;
    width: 100% !important;
    page-break-inside: auto !important;
  }
  table thead {
    display: table-header-group !important; /* Repite cabecera en cada pÃƒÂ¡gina */
  }
  table th {
    background: #f0f0f0 !important;
    color: #000 !important;
    border-bottom: 1pt solid #555 !important;
    padding: 5pt 8pt !important;
    font-weight: 700 !important;
    font-size: 9pt !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
  }
  table td {
    padding: 5pt 8pt !important;
    border-bottom: 0.5pt dotted #bbb !important;
    font-size: 10pt !important;
  }
  tr {
    page-break-inside: avoid !important;
  }

  /* Badges -> texto sÃƒÂ³lido con border (no relleno) */
  .badge,
  .bc-badge,
  .tag {
    background: transparent !important;
    border: 1pt solid #555 !important;
    color: #000 !important;
    padding: 1pt 6pt !important;
    border-radius: 3pt !important;
    font-weight: 600 !important;
    font-size: 9pt !important;
  }

  /* Links: subraya pero no expone URL larga inline (queda raro) */
  a[href]:not([href^="#"])::after {
    content: '';
  }
  a { color: #000 !important; text-decoration: underline !important; }

  /* ImÃƒÂ¡genes/iconos: respetar la pÃƒÂ¡gina, escalado fluido */
  img, svg {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid !important;
  }

  /* Empty states + skeletons: sin sentido en papel */
  .empty,
  .bc-skeleton,
  .bc-empty-state {
    display: none !important;
  }

  /* Header de pÃƒÂ¡gina: pinta tÃƒÂ­tulo + business info al inicio */
  .bc-print-header {
    display: block !important;
    text-align: center;
    border-bottom: 2pt solid #000;
    padding-bottom: 8pt;
    margin-bottom: 14pt;
  }

  /* Footer fixed al pie de cada pÃƒÂ¡gina (impreso) */
  .bc-print-footer {
    display: block !important;
    border-top: 0.5pt solid #bbb;
    padding-top: 4pt;
    margin-top: 16pt;
    font-size: 8pt;
    color: #666 !important;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bc-anim-page-enter,
  .bc-stagger > *,
  .bc-stagger-rows tbody tr,
  .bc-anim-new,
  .bc-anim-pulse,
  .dropdown-menu.show,
  .empty .empty-icon,
  .bc-sync-pill[data-status="syncing"],
  .bc-sync-pill[data-status="syncing"] .bc-sync-dot,
  .bc-busy-badge,
  .bc-skeleton::after,
  .bc-sidebar-status::after,
  .bc-bell-ring,
  .bc-pulse-dot,
  .bc-livemap-live-dot,
  .bc-livemap-card,
  .bc-icon-btn.is-ringing i,
  .bc-icon-btn.has-news .bc-icon-badge,
  .bc-toast,
  .bc-logo-drop.is-loading::after,
  .bc-logo-url-row,
  .bc-logo-badge,
  .bc-onboard-popover,
  .bc-onboard-popover.is-center,
  .setup-hero-emoji,
  .is-changed,
  .bc-marker-target--picked_up,
  .bc-marker-target--pending,
  .bc-route-path--active,
  .bc-route-flow { animation: none !important; }
  .bc-reveal,
  .bc-anim-page-enter,
  .bc-stagger > *,
  .bc-stagger-rows tbody tr,
  .bc-anim-new,
  .dropdown-menu.show,
  .bc-toast,
  .bc-livemap-card,
  .bc-logo-url-row,
  .bc-logo-badge,
  .bc-onboard-popover,
  .bc-onboard-popover.is-center,
  .is-changed,
  .empty .empty-icon { opacity: 1 !important; transform: none !important; }
}

/* =========================================================================
 *  FOCUS RINGS GLOBALES Ã¢Â€Â” v1.5.3 Ã¢Â€Â” Accesibilidad premium
 *  -----------------------------------------------------------------------
 *  Capa de seguridad: para CUALQUIER elemento focalizable (a/button/input/
 *  textarea/select/[tabindex]/summary) que no tenga ya un :focus-visible
 *  custom, aplicamos un ring brand suave que es:
 *    - 3px de "soft halo" (rgba brand 22% Ã¢Â€Â” visible pero no agresivo)
 *    - 1px sÃƒÂ³lido brand exterior (definiciÃƒÂ³n clara para WCAG 2.4.7)
 *    - border-radius hereda (respeta el shape del elemento)
 *    - outline:none reset (sustituimos por box-shadow para mejor control)
 *
 *  DiseÃƒÂ±o Stripe Dashboard / Vercel / Linear: el ring se ve cuando navegas
 *  con teclado (Tab) pero NO al hacer click con ratÃƒÂ³n (gracias a
 *  :focus-visible). En mouse normal seguimos sin halo, look limpio.
 *  ======================================================================= */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: none;
  box-shadow:
    0 0 0 1px var(--bc-brand, #be123c),
    0 0 0 4px rgba(var(--bc-brand-rgb, 190, 18, 60), 0.22);
  border-radius: var(--bc-radius-sm, 6px);
  transition: box-shadow 0.12s ease;
}

/* Inputs y selects que YA tienen border propio mantienen su forma; sÃƒÂ³lo
   reemplazamos el outline azul nativo por el halo brand. */
:where(input, select, textarea):focus-visible {
  border-color: var(--bc-brand, #be123c) !important;
}

/* Variante danger para acciones destructivas (.btn-danger, [data-action="delete"]) */
.btn-danger:focus-visible,
[data-action="delete"]:focus-visible,
.is-danger:focus-visible {
  box-shadow:
    0 0 0 1px var(--bc-danger, #be123c),
    0 0 0 4px rgba(190, 18, 60, 0.22) !important;
}

/* Variante success para acciones de confirmaciÃƒÂ³n */
.btn-success:focus-visible,
.bc-card-action.is-ready:focus-visible,
.kds-card-action.is-ready:focus-visible {
  box-shadow:
    0 0 0 1px var(--bc-success, #047857),
    0 0 0 4px rgba(4, 120, 87, 0.22) !important;
}

/* Skip-link accesibilidad: el primer Tab deberÃƒÂ­a revelarlo, no ocultarlo */
.bc-skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 2147483647;
  padding: 0.75rem 1.25rem;
  background: var(--bc-brand);
  color: var(--bc-bg);
  font-weight: 700;
  border-radius: 0 0 8px 0;
  transition: top 0.18s ease;
  text-decoration: none;
}
.bc-skip-link:focus,
.bc-skip-link:focus-visible {
  top: 0;
  outline: none;
}

/* =========================================================================
 *  PROGRESS BAR Ã¢Â€Â” v1.5.3
 *  -----------------------------------------------------------------------
 *  El elemento DOM lo crea js/progress-bar.js dinÃƒÂ¡micamente con styles
 *  inline (z-index extremo + gradient brand). AquÃƒÂ­ solo aÃƒÂ±adimos:
 *    - Override si el usuario tiene reduced-motion (snap a porcentajes)
 *    - Tweak en mobile (height 2px en lugar de 3 para no tapar nada)
 *  ======================================================================= */
@media (max-width: 575.98px) {
  #bc-progress-bar { height: 2px !important; }
}
@media (prefers-reduced-motion: reduce) {
  #bc-progress-bar {
    transition: opacity 0.18s ease !important;
  }
}


/* =====================================================================
   v1.9 Â— UTILITIES PREMIUM (pulido visual)
   ---------------------------------------------------------------------
   Helpers reutilizables que NO existian todavia. Mantenemos prefijo bc-
   para no chocar con utilities de Bootstrap. Documentadas para no
   reinventar la rueda en componentes futuros.
   ===================================================================== */

/* Glassmorphism: cards/dropdowns translucidos premium.
   Uso: <div class="bc-glass"> ... </div> */
.bc-glass {
  background: var(--bc-glass);
  -webkit-backdrop-filter: var(--bc-glass-blur);
          backdrop-filter: var(--bc-glass-blur);
  border: 1px solid var(--bc-glass-border);
}

/* Fluid typography helpers (clamp + viewport units).
   Uso: <h1 class="bc-text-fluid-xl">...</h1> */
.bc-text-fluid-sm  { font-size: clamp(0.85rem, 1.5vw + 0.5rem, 1rem); }
.bc-text-fluid-base{ font-size: clamp(0.95rem, 2vw + 0.5rem, 1.125rem); }
.bc-text-fluid-lg  { font-size: clamp(1.1rem, 2.5vw + 0.5rem, 1.4rem); }
.bc-text-fluid-xl  { font-size: clamp(1.4rem, 4vw + 0.5rem, 2.2rem); }
.bc-text-fluid-2xl { font-size: clamp(1.8rem, 5vw + 0.5rem, 3rem); }

/* Card elevada con hover suave (premium feel).
   Uso: <div class="bc-card-hover">...</div> */
.bc-card-hover {
  transition:
    transform var(--bc-dur-base) var(--bc-ease-out),
    box-shadow var(--bc-dur-base) var(--bc-ease-out),
    border-color var(--bc-dur-fast) var(--bc-ease-out);
}
.bc-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--bc-shadow-lg);
  border-color: var(--bc-line-strong);
}

/* Skeleton loader (placeholder mientras carga).
   Uso: <div class="bc-skeleton" style="height: 20px;"></div> */
.bc-skeleton {
  background: linear-gradient(
    90deg,
    var(--bc-surface-2) 0%,
    var(--bc-surface-3) 50%,
    var(--bc-surface-2) 100%
  );
  background-size: 200% 100%;
  animation: bc-skeleton-shimmer 1.4s var(--bc-ease-in-out) infinite;
  border-radius: var(--bc-radius-sm);
}
@keyframes bc-skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Scrollbars premium en webkit (Chrome/Edge/Safari).
   Sutiles, no invasivas. Firefox usa scrollbar-color/-width nativos. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bc-text-subtle) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--bc-line-strong);
  border-radius: 999px;
  border: 2px solid var(--bc-bg);
  transition: background var(--bc-dur-fast) var(--bc-ease-out);
}
::-webkit-scrollbar-thumb:hover { background: var(--bc-text-subtle); }

/* Selection text con color brand (premium detail) */
::selection {
  background: rgba(var(--bc-brand-rgb), 0.25);
  color: var(--bc-text);
}

/* Tap targets minimum 44x44px (Apple HIG + Google Material a11y) */
@media (pointer: coarse) {
  .btn, [role="button"], .form-control, .form-select {
    min-height: 44px;
  }
}

/* Tabular numbers para tablas/KPIs (alineacion vertical perfecta) */
.bc-tabular-nums,
.bc-table td:has(.bc-num),
.bc-kpi-value {
  font-variant-numeric: tabular-nums;
}

/* Print: ocultar UI cromada al imprimir tickets/recibos */
@media print {
  .bc-navbar, .bc-sidebar, .bc-toast-container,
  #bc-modal-backdrop, .btn-close, button {
    display: none !important;
  }
  body { background: white; color: black; }
  .bc-card { box-shadow: none; border: 1px solid #ddd; }
}

/* Visually hidden heading for app shells */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =====================================================================
   Pass 12 lote 2 â€” utilidades para eliminar estilos inline del manager
   ===================================================================== */

/* Search input con ancho capado vÃ­a clase (evita style="max-width:...") */
.bc-search-input { max-width: 220px; }
.bc-search-input--md { max-width: 320px; }

/* MÃ­nimo ancho cero (evita style="min-width:0" en flex items) */
.bc-min-w-0 { min-width: 0; }

/* Badge de versiÃ³n pequeÃ±a al lado del tÃ­tulo (setup v1.5) */
.bc-version-badge { font-size: 0.55em; }

/* Respect user motion preferences (Emil Kowalski Â· reduced-motion first): handled in the premium animations block above. */
