@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/**
 * VALETEC PHARMA - SISTEMA DE GESTIÓN FARMACÉUTICA V2
 * Identidad Visual Oficial: Salud Digital (Teal Médico #0d9488, Azul Dispensación #0284c7, Deep Navy #0b1329)
 * Tipografía Oficial: Inter con Cifras Tabulares Numéricas
 */

:root {
  /* =============================================================
     VALETEC PHARMA - SALUD DIGITAL DESIGN SYSTEM 2026
     Superficies limpias, contraste clínico nítido y cifras tabulares
     ============================================================= */
  --bg-app: #f8fafc;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;

  /* Bordes limpios y precisos */
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #0d9488;

  /* Jerarquía Tipográfica de Alto Contraste */
  --text-main: #0f172a;
  --text-dark: #020617;
  --text-muted: #475569;
  --text-light: #64748b;
  --text-white: #ffffff;

  /* Paleta Corporativa "Salud Digital" */
  --valetec-navy: #0f172a;
  --valetec-navy-dark: #0b1329;
  --valetec-navy-light: #1e293b;

  --valetec-accent: #0d9488;
  --valetec-accent-hover: #0f766e;
  --valetec-accent-subtle: rgba(13, 148, 136, 0.08);
  --valetec-accent-border: rgba(13, 148, 136, 0.3);

  --valetec-teal: #0d9488;
  --valetec-teal-dark: #0f766e;
  --valetec-teal-light: #f0fdfa;
  --valetec-teal-rgb: 13, 148, 136;

  --valetec-emerald: #059669;
  --valetec-emerald-light: #ecfdf5;

  --valetec-blue: #0284c7;
  --valetec-blue-light: #f0f9ff;
  --valetec-sky: #38bdf8;

  --valetec-warning: #f59e0b;
  --valetec-warning-light: #fffbeb;
  --valetec-danger: #ef4444;
  --valetec-danger-light: #fef2f2;

  /* Sombras Ultra Sutiles y Difusas (Clean SaaS) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.07);
  --shadow-modal: 0 20px 50px rgba(0, 0, 0, 0.10);
  --shadow-drawer: -4px 0 24px rgba(0, 0, 0, 0.08);

  /* Formas Orgánicas */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-card: 16px;
  --radius-lg: 16px;
  --radius-modal: 20px;
  --radius-full: 100px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.2, 0, 0, 1);
}


/* =============================================================
   SISTEMA DE PUNTOS DE ESTADO Y ETIQUETAS MINIMALISTAS
   ============================================================= */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

.status-dot.free, .status-dot.success, .status-dot.online {
  background-color: #10b981;
}

.status-dot.required, .status-dot.warn, .status-dot.warning {
  background-color: #f59e0b;
}

.status-dot.retained, .status-dot.danger, .status-dot.error {
  background-color: #ef4444;
}

.status-dot.neutral, .status-dot.muted {
  background-color: #94a3b8;
}

.status-dot.active, .status-dot.accent {
  background-color: var(--valetec-accent);
}

.status-dot.pulse {
  animation: vtDotPulse 2s infinite ease-in-out;
}

@keyframes vtDotPulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

.rx-status-subtle {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  padding: 1px 0;
  user-select: none;
}

.rx-status-subtle.free { color: #047857; }
.rx-status-subtle.required { color: #b45309; }
.rx-status-subtle.retained { color: #b91c1c; }

/* Reset y Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  height: 100%;
}

body.valetec-app-body {
  font-family: var(--font-family);
  font-size: 14.5px;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  display: flex;
  flex-direction: column;
}

/* Soporte Nativo de Cifras Tabulares para Precios y Cantidades */
.tabular-nums,
.price-value,
.valetec-price,
.catalog-price,
.cart-price,
.cart-total-value,
.kpi-value,
.stat-number,
.badge-tab-notify,
.valetec-table td:nth-child(n+4) {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}


/* Utilidades */
.d-none { display: none !important; }
.text-teal { color: var(--valetec-teal-dark) !important; }
.text-blue { color: var(--valetec-blue) !important; }
.text-warning { color: var(--valetec-warning) !important; }
.text-danger { color: var(--valetec-danger) !important; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }

/* -------------------------------------------------------------
   0. PANTALLA DE LOGIN (INICIO DE SESIÓN DE COLABORADORES)
------------------------------------------------------------- */
.login-fullscreen-wrapper {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #061729 0%, #0a2540 50%, #0f355c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 5000;
}

.login-split-card {
  width: 100%;
  max-width: 980px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-modal);
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  overflow: hidden;
  box-shadow: var(--shadow-modal);
}

.login-brand-side {
  background: linear-gradient(180deg, var(--valetec-navy-dark) 0%, var(--valetec-navy) 100%);
  color: var(--text-white);
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.brand-logo-large {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--valetec-teal) 0%, var(--valetec-teal-dark) 100%);
  color: var(--valetec-navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(0, 212, 178, 0.4);
  margin-bottom: 18px;
}

.brand-heading {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.teal-text {
  color: var(--valetec-teal);
}

.brand-subheading {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.4;
}

.login-feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 32px 0;
}

.feature-bullet {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #e2e8f0;
}

.feature-bullet i {
  font-size: 18px;
}

.login-brand-footer {
  font-size: 11px;
  color: #64748b;
}

/* Lado Derecho: Formulario de Login */
.login-form-side {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-header h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--valetec-navy);
}

.login-form-header p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.quick-profiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.profile-card-btn {
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.profile-card-btn:hover {
  border-color: var(--valetec-blue);
  background-color: var(--valetec-blue-light);
}

.profile-card-btn.active {
  border-color: var(--valetec-teal-dark);
  background-color: var(--valetec-teal-light);
}

.prof-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--valetec-navy);
  color: var(--text-white);
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(10, 37, 64, 0.15);
}

.prof-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.prof-text strong {
  font-size: 13px;
  color: var(--valetec-navy);
}

.prof-text small {
  font-size: 11px;
  color: var(--text-muted);
}

.prof-check {
  position: absolute;
  right: 10px;
  font-size: 14px;
  color: var(--valetec-teal-dark);
  display: none;
}

.profile-card-btn.active .prof-check {
  display: block;
}

.login-form-fields {
  display: flex;
  flex-direction: column;
}

.login-input-group label {
  font-size: 12px;
  font-weight: 800;
  color: var(--valetec-navy);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.login-field {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  font-size: 13.5px;
  font-family: inherit;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background-color: #e8eaed;
  outline: none;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  box-sizing: border-box;
}

.login-field:focus {
  background-color: #ffffff;
  border-color: var(--valetec-teal);
  box-shadow: 0 0 0 3px rgba(var(--valetec-teal-rgb), 0.2);
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper .login-field {
  padding-right: 44px;
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: color 0.2s ease, transform 0.1s ease;
}

.btn-toggle-password:hover {
  color: var(--valetec-teal);
}

.btn-toggle-password:active {
  transform: scale(0.92);
}

.login-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.remember-check {
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.forgot-link {
  color: var(--valetec-blue);
  text-decoration: none;
  font-weight: 700;
}

.btn-login-submit {
  width: 100%;
  height: 48px;
  background: var(--valetec-teal);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.btn-login-submit:hover {
  background: #00525d;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-login-submit:active {
  transform: translateY(1px) scale(0.99);
}

.login-security-notice {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* -------------------------------------------------------------
   1. ESTRUCTURA PRINCIPAL DEL SISTEMA (LAYOUT SIDEBAR + WORKSPACE)
------------------------------------------------------------- */
.app-main-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  background: var(--bg-app);
  overflow-x: hidden;
}

/* -------------------------------------------------------------
   2. SIDEBAR LATERAL PROFESIONAL (VALETEC PHARMA)
------------------------------------------------------------- */
.app-sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1050;
  background: linear-gradient(180deg, #07192b 0%, #0a2540 100%);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  overflow: hidden;
}

.sidebar-header {
  padding: 16px 18px 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.valetec-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--valetec-teal) 0%, var(--valetec-teal-dark) 100%);
  color: var(--valetec-navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 212, 178, 0.35);
  font-weight: 900;
}

.brand-text-box {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: -0.3px;
  line-height: 1.1;
  color: #fff;
}

.brand-teal {
  color: var(--valetec-teal);
}

.brand-slogan {
  font-size: 8.5px;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.btn-sidebar-close {
  display: none;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.btn-sidebar-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-role-container {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.sidebar-role-container .role-selector-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-role-container .role-selector-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sidebar-role-container .role-selector-info small {
  font-size: 9.5px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.sidebar-role-container .role-select {
  background: transparent;
  color: #fff;
  border: none;
  outline: none;
  font-weight: 700;
  font-size: 11.5px;
  cursor: pointer;
  width: 100%;
}

.sidebar-role-container .role-select option {
  background: #0a2540;
  color: #fff;
}

.sidebar-nav-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #64748b;
  text-transform: uppercase;
  padding: 8px 10px 4px 10px;
  user-select: none;
}

.nav-tab-btn {
  width: calc(100% - 16px);
  margin: 2px 8px;
  background: none;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  border-radius: 10px;
  transition: all var(--transition-fast);
  text-align: left;
  box-sizing: border-box;
  user-select: none;
}

.nav-tab-btn:hover {
  color: #f1f5f9;
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  transform: none;
}

.nav-tab-btn.active {
  color: #ffffff;
  background-color: rgba(13, 148, 136, 0.14);
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: none;
  font-weight: 600;
}

.nav-tab-btn.active::after {
  display: none;
}

.tab-icon {
  font-size: 18px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #94a3b8;
  transition: color var(--transition-fast);
}


.tab-icon i.bi {
  font-size: 16px;
  line-height: 1;
}

.nav-tab-btn:hover .tab-icon {
  color: #f1f5f9;
}

.nav-tab-btn.active .tab-icon {
  color: #2dd4bf;
}

.tab-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-kbd-hint {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9.5px;
  color: #94a3b8;
  font-weight: 600;
  flex-shrink: 0;
}

.badge-tab-notify {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-tab-notify.warn {
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
}

.badge-tab-notify.info {
  border-color: rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.08);
}

.badge-tab-notify.live {
  border-color: rgba(13, 148, 136, 0.35);
  color: #2dd4bf;
  background: rgba(13, 148, 136, 0.12);
}

/* =============================================================
   VALETEC 2026 ACCORDION SIDEBAR SYSTEM (COLLAPSIBLE MODULES)
   ============================================================= */
.nav-module-group {
  display: flex;
  flex-direction: column;
  margin: 1px 6px;
}

.nav-module-header {
  width: 100%;
  background: none;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  user-select: none;
  box-sizing: border-box;
}

.nav-module-header:hover {
  color: #f8fafc;
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-module-group.open > .nav-module-header {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.07);
}

.nav-module-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-module-title .tab-icon {
  font-size: 15px;
  color: #94a3b8;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-module-header:hover .nav-module-title .tab-icon,
.nav-module-group.open > .nav-module-header .nav-module-title .tab-icon {
  color: #2dd4bf;
}

.nav-chevron {
  font-size: 11px;
  color: #64748b;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.nav-module-group.open > .nav-module-header .nav-chevron {
  transform: rotate(180deg);
  color: #2dd4bf;
}

.nav-submodules {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  margin: 0;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  margin-left: 20px;
  transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin 0.2s ease;
}

.nav-module-group.open > .nav-submodules {
  max-height: 380px;
  opacity: 1;
  margin: 4px 0 6px 0;
  padding-top: 2px;
  padding-bottom: 2px;
}

.nav-sub-btn {
  width: 100%;
  background: none;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  text-align: left;
  user-select: none;
  position: relative;
}

.nav-sub-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

.nav-sub-btn.active {
  color: #ffffff;
  background-color: rgba(13, 148, 136, 0.18);
  font-weight: 700;
}

.nav-sub-btn.active::before {
  content: "";
  position: absolute;
  left: -14px;
  width: 3px;
  height: 14px;
  background-color: #2dd4bf;
  border-radius: 2px;
}

.nav-sub-btn i {
  font-size: 12px;
  color: #64748b;
}

.nav-sub-btn:hover i,
.nav-sub-btn.active i {
  color: #2dd4bf;
}

/* =============================================================
   VALETEC 2026 STANDARD BUTTON SYSTEM (EXACTLY 3 CLASSES)
   ============================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  background-color: var(--valetec-teal, #0d9488);
  border: 1px solid var(--valetec-teal, #0d9488);
  border-radius: 8px;
  color: #ffffff !important;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: #0f766e;
  border-color: #0f766e;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
  color: #ffffff !important;
}

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

.btn-primary:disabled {
  background-color: #94a3b8;
  border-color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
}

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

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #ef4444;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-danger:hover {
  background-color: #ef4444;
  border-color: #ef4444;
  color: #ffffff !important;
  transform: translateY(-1px);
}

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

/* =============================================================
   VALETEC 2026 STANDARD FORM CONTROLS
   ============================================================= */
.form-input,
.form-select {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-family: var(--font-family);
  color: #1e293b;
  background-color: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
  background-color: #ffffff;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input[readonly],
.form-input[disabled] {
  background-color: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

/* =============================================================
   VALETEC 2026 DRAWER SYSTEM (SLIDE-IN SIDE PANELS)
   ============================================================= */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  background-color: #ffffff;
  box-shadow: none;
  visibility: hidden;
  pointer-events: none;
  z-index: 1501;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  box-sizing: border-box;
}

.drawer.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
}

.drawer-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  flex-shrink: 0;
}

.drawer-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.drawer-header p {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 0 0;
}

.drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid #e2e8f0;
  font-size: 15px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drawer-close:hover {
  background-color: #fee2e2;
  border-color: #fecaca;
  color: #ef4444;
}

.drawer-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  box-sizing: border-box;
}

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: #f8fafc;
  flex-shrink: 0;
}

/* =============================================================
   VALETEC 2026 TOGGLE SWITCH SYSTEM
   ============================================================= */
.toggle-switch-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #0d9488;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* =============================================================
   VALETEC 2026 PRESENTATION CARDS WITH TOGGLES (DRAWER & POS)
   ============================================================= */
.presentation-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.presentation-card.active {
  border-color: #0d9488;
  background-color: #f0fdfa;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.08);
}

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

.presentation-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}

.presentation-card-title i {
  font-size: 15px;
  color: #0d9488;
}

.presentation-card-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.presentation-card:not(.active) .presentation-card-body {
  display: none;
}

.drawer-section-title {
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 16px 0 10px 0;
  font-weight: 700;
  color: #334155;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-section-title:first-of-type {
  margin-top: 0;
}

/* Wide Drawer (Control de Lotes, Kardex, etc.) */
.drawer.drawer-wide {
  max-width: 860px;
}

@media (max-width: 900px) {
  .drawer.drawer-wide {
    max-width: 100%;
  }
}

/* =============================================================
   VALETEC FEFO MANAGEMENT SYSTEM (ESTILOS SAAS 2026)
   ============================================================= */
.fefo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .fefo-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fefo-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
}

.fefo-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.fefo-kpi-card.critical {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
}

.fefo-kpi-card.warning {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.fefo-kpi-card.safe {
  border-left: 4px solid #10b981;
  background: #f0fdf4;
}

.fefo-kpi-card.total {
  border-left: 4px solid #0d9488;
  background: #f0fdfa;
}

.fefo-kpi-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.fefo-kpi-title {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fefo-kpi-card.critical .fefo-kpi-title { color: #991b1b; }
.fefo-kpi-card.warning .fefo-kpi-title { color: #92400e; }
.fefo-kpi-card.safe .fefo-kpi-title { color: #166534; }
.fefo-kpi-card.total .fefo-kpi-title { color: #0f766e; }

.fefo-kpi-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
  margin-bottom: 2px;
}

.fefo-kpi-card.critical .fefo-kpi-value { color: #dc2626; }
.fefo-kpi-card.warning .fefo-kpi-value { color: #d97706; }
.fefo-kpi-card.safe .fefo-kpi-value { color: #16a34a; }
.fefo-kpi-card.total .fefo-kpi-value { color: #0d9488; }

.fefo-kpi-subtitle {
  font-size: 11px;
  color: #64748b;
  display: block;
}

/* FEFO Search & Tabs Filter Bar */
.fefo-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.fefo-search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.fefo-search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 14px;
}

.fefo-search-box input {
  padding-left: 36px !important;
}

.fefo-tabs {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 4px;
}

.fefo-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.fefo-tab-btn:hover {
  color: #0f172a;
}

.fefo-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.fefo-tab-btn.tab-critical.active {
  color: #dc2626;
}

.fefo-tab-btn.tab-warning.active {
  color: #d97706;
}

.fefo-tab-btn.tab-safe.active {
  color: #16a34a;
}

/* Acciones de tabla FEFO */
.fefo-action-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.btn-fefo-action {
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-fefo-canje {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.btn-fefo-canje:hover {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.btn-fefo-baja {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.btn-fefo-baja:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* Kardex Valuation Cards (SaaS 2026) */
.kardex-val-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .kardex-val-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kardex-val-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.kardex-val-card.accent-teal { border-top: 3px solid #0d9488; background: #f0fdfa; }
.kardex-val-card.accent-blue { border-top: 3px solid #0284c7; background: #f0f9ff; }
.kardex-val-card.accent-green { border-top: 3px solid #16a34a; background: #f0fdf4; }
.kardex-val-card.accent-purple { border-top: 3px solid #7c3aed; background: #faf5ff; }

.sidebar-footer {
  padding: 14px 14px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-footer .user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-logout-sidebar {
  width: 100%;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-logout-sidebar:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* -------------------------------------------------------------
   3. CONTENEDOR DE CONTENIDO & BARRA SUPERIOR
------------------------------------------------------------- */
.app-content-wrapper {
  margin-left: 260px;
  width: calc(100% - 260px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
  transition: margin-left 0.3s ease, width 0.3s ease;
  box-sizing: border-box;
}

/* -------------------------------------------------------------
   HEADER & TOPBAR (VALETEC GOURMET PILL BADGES)
------------------------------------------------------------- */
.app-top-bar {
  height: 60px;
  min-height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 990;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Botones Superiores Pill Badge (Empresa, Atajos F1) */
.btn-shortcuts-modal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 8px 18px;
  border-radius: 50px;
  font-family: var(--font-family);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  text-decoration: none;
  user-select: none;
}

.btn-shortcuts-modal:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-shortcuts-modal:active {
  transform: translateY(0);
  background-color: #e2e8f0;
}

.btn-shortcuts-modal kbd {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
}

/* Badges de Reloj y Terminal en Header */
.live-clock-badge,
.terminal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.terminal-badge span strong {
  color: #1e293b;
  font-weight: 600;
}

.terminal-badge .pulse-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #059669;
  font-weight: 600;
  margin-left: 4px;
}


.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  transition: opacity 0.3s ease;
}

/* Estado de Sidebar Colapsado (v4.2 - Persistencia de Escritorio) */
@media (min-width: 1025px) {
  .app-sidebar.sidebar-collapsed {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
  }
  .app-sidebar.sidebar-collapsed .sidebar-header {
    padding: 16px 10px;
    justify-content: center;
  }
  .app-sidebar.sidebar-collapsed .brand-text-box,
  .app-sidebar.sidebar-collapsed .sidebar-role-container,
  .app-sidebar.sidebar-collapsed .sidebar-section-label,
  .app-sidebar.sidebar-collapsed .tab-label,
  .app-sidebar.sidebar-collapsed .tab-kbd-hint,
  .app-sidebar.sidebar-collapsed .badge-tab-notify,
  .app-sidebar.sidebar-collapsed .user-profile-details,
  .app-sidebar.sidebar-collapsed .btn-sidebar-logout span {
    display: none !important;
  }
  .app-sidebar.sidebar-collapsed .nav-tab-btn {
    justify-content: center;
    padding: 12px 0;
  }
  .app-sidebar.sidebar-collapsed .tab-icon {
    font-size: 20px;
    margin: 0;
  }
  .app-sidebar.sidebar-collapsed .sidebar-footer {
    padding: 12px 8px;
    align-items: center;
  }
  .app-sidebar.sidebar-collapsed .sidebar-user-card {
    justify-content: center;
    padding: 6px;
  }
  .app-content-wrapper.sidebar-collapsed {
    margin-left: 76px !important;
    width: calc(100% - 76px) !important;
  }
}

/* -------------------------------------------------------------
   3. ESPACIO DE TRABAJO (WORKSPACE)
------------------------------------------------------------- */
.app-workspace-main {
  max-width: 100% !important;
  width: 100%;
  margin: 0;
  padding: 20px 28px;
  flex: 1;
  box-sizing: border-box;
  overflow-x: hidden;
  background: var(--bg-app);
}


.app-view-panel {
  display: none;
}

.app-view-panel.active {
  display: block;
  animation: fadeInAppView 0.2s ease-out;
}

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

.valetec-card-box {
  background-color: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-fast);
}

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

.view-heading {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-subheading {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.5;
}

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

.btn-action-solid {
  background-color: #0d9488;
  border: 1px solid #0d9488;
  color: var(--text-white);
  padding: 10px 20px;
  min-height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.btn-action-solid i.bi {
  font-size: 15px;
  color: #ffffff;
}

.btn-action-solid:hover {
  background-color: #0f766e;
  border-color: #0f766e;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-action-solid:active {
  transform: translateY(0);
}

.btn-action-outline {
  background-color: transparent;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 10px 20px;
  min-height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-action-outline i.bi {
  color: #64748b;
  font-size: 15px;
  transition: color var(--transition-fast);
}


.btn-action-outline:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
  transform: translateY(-1px);
}

.btn-action-outline:hover i.bi {
  color: #1e293b;
}

.btn-action-outline:active {
  transform: translateY(0);
}

/* -------------------------------------------------------------
   VISTA 1: MOSTRADOR & DISPENSACIÓN RÁPIDA
------------------------------------------------------------- */
.counter-responsive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 420px);
  gap: 20px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.counter-catalog-pane {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

.search-bar-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-box i {
  position: absolute;
  left: 16px;
  font-size: 20px;
  color: var(--valetec-blue);
}

.search-input-box input {
  width: 100%;
  height: 48px;
  padding: 0 140px 0 52px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background-color: #ffffff;
  outline: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all var(--transition-smooth);
  color: var(--text-main);
}


.search-input-box input:focus {
  background-color: #ffffff;
  border-color: var(--valetec-teal);
  box-shadow: 0 0 0 3px rgba(var(--valetec-teal-rgb), 0.12);
}

.search-enter-tag {
  position: absolute;
  right: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.search-enter-tag kbd {
  background-color: var(--valetec-navy);
  color: var(--text-white);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-weight: 800;
}

.search-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 800;
}

.search-autocomplete-dropdown.active {
  display: block;
}

.suggest-card-row {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}

.suggest-card-row:hover {
  background-color: var(--valetec-blue-light);
}

.category-chips-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 36px), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 36px), transparent 100%);
}
.category-chips-scroll::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cat-chip i.bi {
  font-size: 15px;
  color: #94a3b8;
  transition: color var(--transition-fast);
}


.cat-chip:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.cat-chip:hover i.bi {
  color: #64748b;
}

.cat-chip.active {
  background-color: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}

.cat-chip.active i.bi {
  color: #2dd4bf;
}

.dci-advisor-card {
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #92400e;
}

.dci-advisor-card i {
  font-size: 16px;
  flex-shrink: 0;
  color: #b45309;
}

.products-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.product-staff-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  gap: 7px;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

.product-staff-card:hover {
  border-color: rgba(0, 212, 178, 0.4);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

.product-staff-card.out-stock {
  opacity: 0.65;
  background-color: #f8fafc;
}

.card-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.card-pills-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: visible;
  justify-content: flex-end;
  flex-shrink: 0;
}

.shelf-tag {
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
  min-width: 0;
  flex-shrink: 1;
}

.chip-generic-pill {
  background-color: #fefce8;
  border: 1px solid #fef08a;
  color: #854d0e;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.chip-generic-pill:hover {
  background-color: #fef08a;
  border-color: #fde047;
  color: #713f12;
}

.rx-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rx-badge.free { background-color: transparent; color: #047857; border: 1px solid rgba(16, 185, 129, 0.3); }
.rx-badge.required { background-color: transparent; color: #b45309; border: 1px solid rgba(245, 158, 11, 0.3); }
.rx-badge.retained { background-color: transparent; color: #b91c1c; border: 1px solid rgba(239, 68, 68, 0.3); }

.card-body-compact {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.prod-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  min-height: 33px;
  margin: 0;
}

.prod-subtitle-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  margin-top: 2px;
}

.prod-dci {
  font-size: 11px;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.prod-dci i {
  color: var(--valetec-teal);
  font-size: 10.5px;
  flex-shrink: 0;
}

.prod-lab {
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.prod-lab i {
  color: #94a3b8;
  font-size: 10px;
  flex-shrink: 0;
}

.stock-pill-row {
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.stock-pill-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 11px;
  color: #475569;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-pill-tag small {
  color: #94a3b8;
  font-size: 10px;
}

.fraction-segmented-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
  gap: 3px;
  width: 100%;
  box-sizing: border-box;
  background-color: #f1f5f9;
  border-radius: 7px;
  padding: 2px;
}

.fraction-segmented-grid .btn-frac-pick {
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  border-radius: 5px;
  padding: 4px 2px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  box-sizing: border-box;
}

.fraction-segmented-grid .btn-frac-pick:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.fraction-segmented-grid .btn-frac-pick.active {
  background-color: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}

.fraction-segmented-grid .btn-frac-pick.dimmed {
  opacity: 0.45;
  text-decoration: line-through;
}

.card-action-footer {
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
}

.btn-dispense {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 12px;
  background: linear-gradient(135deg, #00d4b2 0%, #00bfa5 100%);
  color: #042f2e;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0, 212, 178, 0.25);
  transition: all var(--transition-fast);
}

.btn-dispense:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 212, 178, 0.35);
}

.btn-dispense:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
}

.btn-dispense .price-val {
  font-size: 13.5px;
  font-weight: 800;
  color: #042f2e;
}

.btn-dispense:disabled .price-val {
  color: #94a3b8;
}

.btn-dispense .btn-dispense-lbl {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
}

/* =============================================================
   FASE 2: PASARELA DE COBRO RÁPIDO Y ENFOCADO [F4]
   ============================================================= */
.pos-checkout-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1550;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pos-checkout-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.pos-checkout-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22);
  z-index: 1551;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pos-checkout-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.pos-checkout-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
}

.pos-checkout-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-checkout-header-left .checkout-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #f0fdf4;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.btn-close-checkout {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.btn-close-checkout:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.pos-checkout-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pos-checkout-footer {
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #f8fafc;
}

.btn-confirm-checkout {
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
  transition: all var(--transition-fast);
}

.btn-confirm-checkout:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.4);
}

.btn-cancel-checkout {
  width: 100%;
  padding: 8px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  border-radius: 6px;
  transition: background-color var(--transition-fast);
}

.btn-cancel-checkout:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.btn-dispense:hover:not(:disabled) {
  background: linear-gradient(135deg, #05e0bc 0%, #00caa0 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 212, 178, 0.38);
}

.btn-dispense:active:not(:disabled) {
  transform: translateY(0);
}

.btn-dispense:disabled {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}
/* Panel Derecho: Ticket Mostrador */
.counter-ticket-pane {
  background-color: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: sticky;
  top: 14px;
}

/* Progressive Disclosure: Carrito Vacío */
.counter-ticket-pane.cart-empty .ticket-action-btns {
  opacity: 0.5;
  pointer-events: none;
}

.counter-ticket-pane.cart-empty .ticket-totals-card {
  opacity: 0.45;
  filter: grayscale(0.5);
  margin-top: 10px;
}

.counter-ticket-pane.cart-empty .ticket-items-scroll {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-items-scroll {
  max-height: 520px;
  min-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.empty-ticket-view {
  text-align: center;
  padding: 24px 12px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-cart-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #f1f5f9;
  border: 1.5px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.empty-cart-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  margin: 0 0 4px 0;
}

.empty-cart-hint {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
}

.empty-cart-hint kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10.5px;
  color: #475569;
  font-weight: 600;
  font-family: inherit;
}

.ticket-header-card {
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 14px;
}

.ticket-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ticket-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.ticket-id-tag {
  font-size: 11px;
  font-weight: 600;
  color: #0369a1;
  background-color: #f0f9ff;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e0f2fe;
}

.patient-lookup-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-doc-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.input-doc-field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.input-doc-field i {
  position: absolute;
  left: 10px;
  font-size: 13px;
  color: var(--text-light);
  pointer-events: none;
}

.input-doc-field input {
  width: 100%;
  height: 34px;
  padding: 0 8px 0 30px;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: #f8fafc;
  outline: none;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.input-doc-field input:focus {
  background-color: #ffffff;
  border-color: var(--valetec-teal);
  box-shadow: 0 0 0 2px rgba(var(--valetec-teal-rgb), 0.12);
}

.btn-search-doc {
  height: 34px;
  padding: 0 10px;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-search-doc:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.btn-quick-new-doc {
  height: 34px;
  padding: 0 10px;
  background-color: #0d9488;
  border: 1px solid #0f766e;
  border-radius: 8px;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-quick-new-doc:hover {
  background-color: #0f766e;
}

.ticket-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid #f8fafc;
  gap: 8px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.ticket-item-row:hover {
  background-color: #f8fafc;
}

.ticket-item-row.selected {
  background-color: #f0fdf4 !important;
  border-left: 3px solid #0d9488 !important;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.12);
}

.item-left-desc {
  flex: 1;
  min-width: 0;
}

.item-left-desc .i-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-left-desc .i-sub {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 1px;
}

.item-qty-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 2px 4px;
  flex-shrink: 0;
}

.btn-item-qty {
  width: 22px;
  height: 22px;
  border: none;
  background-color: #ffffff;
  border-radius: 5px;
  font-weight: 700;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all var(--transition-fast);
}

.btn-item-qty:hover {
  background-color: #0d9488;
  color: #ffffff;
}

.item-qty-val {
  font-size: 12px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: #0f172a;
}

.item-subtotal-val {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
  min-width: 58px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-item-del {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-item-del:hover {
  background-color: #fee2e2;
  color: #ef4444;
}

/* Alerta Médica CMP DIGEMID */
.prescription-alert-box {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 10px;
  box-sizing: border-box;
  transition: all var(--transition-fast);
}

.prescription-alert-box i#prescriptionAlertIcon,
.prescription-alert-box i.bi-shield-exclamation,
.prescription-alert-box i.bi-exclamation-triangle {
  font-size: 18px;
  color: #dc2626;
  margin-top: 1px;
  flex-shrink: 0;
}

.prescription-alert-content {
  flex: 1;
  min-width: 0;
}

.prescription-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.prescription-alert-box strong {
  font-size: 11.5px;
  font-weight: 700;
  color: #991b1b;
  display: block;
  margin-bottom: 0;
}

.badge-rx-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: #fee2e2;
  color: #991b1b;
  text-transform: uppercase;
  white-space: nowrap;
}

.prescription-alert-box p {
  font-size: 11px;
  color: #7f1d1d;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.prescription-alert-box .cmp-row {
  display: flex;
  gap: 6px;
}

.prescription-alert-box .cmp-row input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 4px 8px;
  font-size: 11.5px;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  background-color: #ffffff;
  outline: none;
  transition: all var(--transition-fast);
}

.prescription-alert-box .cmp-row input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.prescription-alert-box .btn-check-cmp {
  background-color: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.prescription-alert-box .btn-check-cmp:hover {
  background-color: #b91c1c;
}

.prescription-alert-box.verified {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}

.prescription-alert-box.verified i#prescriptionAlertIcon,
.prescription-alert-box.verified i.bi-shield-exclamation,
.prescription-alert-box.verified i.bi-exclamation-triangle {
  color: #16a34a !important;
}

.prescription-alert-box.verified strong {
  color: #15803d !important;
}

.prescription-alert-box.verified p {
  color: #166534 !important;
}

.prescription-alert-box.verified .badge-rx-tag {
  background-color: #dcfce7;
  color: #15803d;
}

.prescription-verified-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: #ffffff;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  margin-top: 4px;
}

.prescription-verified-view .verified-text {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #14532d;
  font-size: 11.5px;
}

.btn-edit-rx {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-edit-rx:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.ticket-totals-card {
  background-color: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 14px;
}

.tot-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 5px;
}

.tot-row.final-total {
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.total-val {
  font-size: 20px;
  font-weight: 700;
  color: #0d9488;
}

.payment-controls-card {
  margin-top: 14px;
}

.voucher-switch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.v-opt {
  background-color: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.v-opt:hover {
  background-color: #f8fafc;
  color: #0f172a;
}

.v-opt:has(input:checked) {
  background-color: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  font-weight: 600;
}

.payment-methods-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.pay-method-btn {
  background-color: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.pay-method-btn i.bi {
  font-size: 13px;
  color: #94a3b8;
  transition: color var(--transition-fast);
}

.pay-method-btn:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.pay-method-btn:hover i.bi {
  color: #64748b;
}

.pay-method-btn.active {
  background-color: rgba(13, 148, 136, 0.08);
  border-color: #0d9488;
  color: #0d9488;
  font-weight: 600;
}

.pay-method-btn.active i.bi {
  color: #0d9488;
}

.cash-calc-wrapper {
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 10px;
  background-color: #f8fafc;
}

.bills-fast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.btn-cash-bill {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: all var(--transition-fast);
}

.btn-cash-bill:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-cash-bill.exact {
  background-color: rgba(13, 148, 136, 0.08);
  border-color: #0d9488;
  color: #0d9488;
  font-weight: 600;
}

.ticket-action-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  width: 100%;
  box-sizing: border-box;
}

.btn-order-checkout {
  width: 100%;
  background-color: #0d9488;
  border: 1px solid #0d9488;
  color: #ffffff;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-xs);
  box-sizing: border-box;
  transition: all var(--transition-fast);
}

.btn-order-checkout i.bi {
  font-size: 15px;
  color: #ffffff;
}

.btn-order-checkout:hover {
  background-color: #0f766e;
  border-color: #0f766e;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-order-checkout:active {
  transform: translateY(0);
}

.btn-order-cancel {
  width: 100%;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  transition: all var(--transition-fast);
}

.btn-order-cancel:hover {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* -------------------------------------------------------------
   VISTA 2: CONTROL DE CAJA & ARQUEO DE TURNO
------------------------------------------------------------- */
.cash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.cash-stat-card {
  background-color: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.cash-stat-card.expected-highlight {
  background-color: var(--valetec-blue-light);
  border-color: #bfdbfe;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--valetec-navy);
  margin: 3px 0;
}

.stat-meta {
  font-size: 10.5px;
  color: var(--text-muted);
}

.cash-audit-split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
}

.audit-matrix-box, .audit-verdict-box {
  background-color: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.box-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.box-title-row h3 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--valetec-navy);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.tables-dual-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.audit-table th {
  background-color: var(--bg-subtle);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 10.5px;
  text-align: left;
}

.audit-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.denom-field {
  width: 50px;
  height: 26px;
  padding: 0 4px;
  font-size: 11.5px;
  font-weight: 800;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  text-align: center;
}

.denom-cell {
  font-weight: 800;
  color: var(--valetec-navy);
}

.verdict-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.cuadre-status-banner {
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.cuadre-status-banner.perfect {
  background-color: var(--valetec-teal-light);
  border: 1px solid #99f6e4;
  color: #0f766e;
}

/* Clases Corporativas de Cuadre y Diferencia en Tiempo Real (v4.1) */
.cuadre-diff-exact {
  background-color: #ecfdf5 !important;
  border: 1px solid #10b981 !important;
  color: #065f46 !important;
}

.cuadre-diff-surplus {
  background-color: #fffbeb !important;
  border: 1px solid #f59e0b !important;
  color: #92400e !important;
}

.cuadre-diff-deficit {
  background-color: #fef2f2 !important;
  border: 1px solid #ef4444 !important;
  color: #991b1b !important;
}

.z-audit-verification-box {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.z-diff-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm, 6px);
  font-size: 13px;
  font-weight: 700;
  margin-top: 10px;
  transition: all 0.2s ease;
}

.auditor-meta-card {
  background-color: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.btn-print-ticket-audit {
  width: 100%;
  padding: 9px;
  background-color: var(--valetec-navy);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* -------------------------------------------------------------
   VISTA 3: ALMACÉN & LOTES FEFO
------------------------------------------------------------- */
.exchange-alert-banner {
  background-color: var(--valetec-warning-light);
  border: 1px solid #fde68a;
  border-left: 4px solid var(--valetec-warning);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.exchange-alert-banner i {
  font-size: 24px;
  color: #b45309;
}

.exchange-text {
  flex: 1;
  font-size: 12px;
  color: #78350f;
}

.btn-exchange-action {
  background-color: #b45309;
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.warehouse-filter-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.wh-search-input {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.wh-search-input i {
  position: absolute;
  left: 10px;
  color: var(--text-light);
}

.wh-search-input input {
  width: 100%;
  height: 36px;
  padding: 0 10px 0 32px;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
}

.wh-selects {
  display: flex;
  gap: 6px;
}

.form-select-valetec {
  height: 36px;
  padding: 0 10px;
  font-size: 11.5px;
  font-family: inherit;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  outline: none;
}

.table-responsive-container,
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  margin-top: 10px;
  position: relative;
}

.valetec-table,
.valetec-data-table,
table.table {
  width: 100%;
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  color: var(--text-main);
  text-align: left;
}

.valetec-table th,
.valetec-data-table th,
table.table th {
  background-color: #f8fafc;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  border-left: none;
  border-right: none;
  white-space: nowrap;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 2;
}

.valetec-table td,
.valetec-data-table td,
table.table td {
  padding: 15px 18px;
  border-bottom: 1px solid #f1f5f9;
  border-left: none;
  border-right: none;
  vertical-align: middle;
  transition: background-color var(--transition-fast);
}


.valetec-table tbody tr:hover td,
.valetec-data-table tbody tr:hover td,
table.table tbody tr:hover td {
  background-color: #f8fafc !important;
}

.valetec-table tbody tr:last-child td,
.valetec-data-table tbody tr:last-child td,
table.table tbody tr:last-child td {
  border-bottom: none;
}

.valetec-table code,
.valetec-data-table code,
table.table code {
  background-color: #e8eaed;
  color: var(--valetec-navy);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
}

.fefo-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.fefo-chip.good { background-color: var(--valetec-teal-light); color: var(--valetec-teal-dark); }
.fefo-chip.warning { background-color: var(--valetec-warning-light); color: #b45309; }
.fefo-chip.expired { background-color: var(--valetec-danger-light); color: var(--valetec-danger); }

/* -------------------------------------------------------------
   VISTA 4: LIBRO DIGEMID & REGENCIA
------------------------------------------------------------- */
.sanitary-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.san-card {
  background-color: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
}

.san-card i {
  font-size: 26px;
}

.san-num {
  font-size: 16px;
  font-weight: 900;
  color: var(--valetec-navy);
}

.san-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* -------------------------------------------------------------
   VISTA 6: TORRE DE CONTROL GERENCIAL (NUBE)
------------------------------------------------------------- */
.cloud-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: var(--valetec-blue-light);
  color: var(--valetec-blue);
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.live-stream-badge {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-stream-badge i {
  font-size: 7px;
  animation: pulseLight 1.5s infinite;
}

.management-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0 20px 0;
}

.mgmt-metric-card {
  background-color: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.m-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.m-card-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--valetec-navy);
  margin: 8px 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.m-card-sub {
  font-size: 13.5px;
  color: var(--text-muted);
}


.procurement-section-box, .audit-stream-box {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
}

.stock-danger-chip {
  background-color: #fee2e2;
  color: #dc2626;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-weight: 800;
}

.badge-audit-ok {
  background-color: #ecfdf5;
  color: #059669;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}

.audit-feed-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-xs);
  font-size: 11.5px;
}

.f-time { font-family: monospace; font-weight: 800; color: var(--text-muted); }
.f-badge { font-weight: 800; font-size: 10px; padding: 1px 5px; border-radius: var(--radius-xs); }
.f-badge.blue { background-color: var(--valetec-blue-light); color: var(--valetec-blue); }
.f-badge.yellow { background-color: var(--valetec-warning-light); color: #b45309; }
.f-badge.teal { background-color: var(--valetec-teal-light); color: var(--valetec-teal-dark); }
.f-desc { flex: 1; }
.f-status.ok { color: #16a34a; font-weight: 800; }

/* -------------------------------------------------------------
   MODALES Y TOAST
------------------------------------------------------------- */
.modal-backdrop-valetec {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 37, 64, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.modal-backdrop-valetec.active {
  display: flex;
}

.modal-dialog-valetec {
  background-color: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: min(90vh, 850px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.10);
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: auto;
  position: relative;
  animation: modalPopUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopUp {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Permitir que form interno se ajuste fluidamente al flexbox del diálogo */
.modal-dialog-valetec > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.modal-header-valetec {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  flex-shrink: 0;
  gap: 12px;
}

.modal-header-valetec h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--valetec-navy);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  line-height: 1.3;
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.btn-close-modal:hover {
  background-color: #fee2e2;
  border-color: #fecaca;
  color: var(--valetec-danger);
}

.modal-body-valetec {
  padding: 18px 22px;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  background-color: var(--bg-surface);
  overscroll-behavior: contain;
}

/* Scrollbars ergonómicas para modales y contenedores de datos */
.modal-body-valetec::-webkit-scrollbar,
.table-responsive-container::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.modal-body-valetec::-webkit-scrollbar-track,
.table-responsive-container::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body-valetec::-webkit-scrollbar-thumb,
.table-responsive-container::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: var(--radius-full);
}
.modal-body-valetec::-webkit-scrollbar-thumb:hover,
.table-responsive-container::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

.form-grid-valetec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.form-group-valetec label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--valetec-navy);
  letter-spacing: 0.1px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-control,
.form-select-valetec,
.form-group-valetec input,
.form-group-valetec select,
.form-group-valetec textarea {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: #e8eaed;
  border: 1.5px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  box-sizing: border-box;
}

.form-group-valetec textarea,
textarea.form-control {
  height: auto;
  min-height: 72px;
  padding: 12px 14px;
  line-height: 1.45;
  resize: vertical;
}

.form-control:focus,
.form-select-valetec:focus,
.form-group-valetec input:focus,
.form-group-valetec select:focus,
.form-group-valetec textarea:focus {
  border-color: var(--valetec-teal);
  box-shadow: 0 0 0 3px rgba(var(--valetec-teal-rgb), 0.2);
  background-color: #ffffff;
}

.form-control::placeholder,
.form-group-valetec input::placeholder,
.form-group-valetec textarea::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.form-control[readonly],
.form-group-valetec input[readonly],
.form-control[disabled],
.form-group-valetec select[disabled] {
  background-color: #f1f3f4;
  color: #80868b;
  border-color: var(--border-subtle);
  cursor: not-allowed;
}

.modal-footer-valetec {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  background-color: #fafbfc;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  flex-shrink: 0;
}

.valetec-toast {
  position: fixed;
  top: 75px;
  right: 24px;
  background-color: #1f1f1f;
  color: var(--text-white);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 6000;
  transform: translateY(-25px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.valetec-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* -------------------------------------------------------------
   WIDGET NATIVO DE ACCESIBILIDAD USERWAY (INFERIOR DERECHO)
------------------------------------------------------------- */
.userway-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: var(--text-white);
  border: 2px solid #ffffff;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 6990;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.userway-floating-btn span {
  pointer-events: none;
}

.userway-floating-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.55);
}

.userway-pulse-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background-color: var(--valetec-teal);
  border: 2px solid var(--text-white);
  border-radius: var(--radius-full);
  animation: pulseLight 1.5s infinite;
  pointer-events: none;
}

.userway-drawer-panel {
  position: fixed;
  bottom: 84px;
  right: 24px;
  left: auto;
  width: 330px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 7000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.2s ease-out;
}

.userway-drawer-panel.active {
  display: flex;
}

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

.userway-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.userway-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.userway-title-wrap h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--valetec-navy);
}

.userway-title-wrap small {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-userway-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.btn-userway-close:hover {
  background-color: var(--bg-hover);
  color: var(--valetec-danger);
}

.userway-body {
  padding: 14px 16px;
  overflow-y: auto;
  max-height: calc(100vh - 180px);
}

.userway-widget-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  background-color: var(--bg-subtle);
}

.uw-widget-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--valetec-navy);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.uw-btn-group {
  display: flex;
  gap: 4px;
}

.btn-uw-ctrl {
  flex: 1;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-uw-ctrl.active {
  background-color: var(--valetec-blue);
  color: var(--text-white);
  border-color: var(--valetec-blue);
  box-shadow: 0 2px 6px rgba(0, 102, 204, 0.25);
}

.uw-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-uw-feature {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--valetec-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-uw-feature:hover {
  background-color: var(--valetec-blue-light);
  border-color: var(--valetec-blue);
}

.btn-uw-feature.active {
  background-color: var(--valetec-navy);
  color: var(--valetec-teal);
  border-color: var(--valetec-teal);
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.25);
}

.btn-userway-reset {
  width: 100%;
  padding: 10px;
  background-color: var(--bg-surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-userway-reset:hover {
  background-color: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

/* -------------------------------------------------------------
   MODIFICADORES NATIVOS USERWAY EN EL BODY (WCAG 2.1 COMPLIANT)
------------------------------------------------------------- */
body.uw-font-lg {
  zoom: 1.12;
}

body.uw-font-xl {
  zoom: 1.25;
}

body.uw-font-lg .userway-floating-btn,
body.uw-font-xl .userway-floating-btn {
  zoom: 0.9;
}

/* Modo Oscuro Profundo (Salud Digital Dark Theme) */
body.uw-dark-mode,
body.dark-mode {
  background-color: #0b1329 !important;
  color: #f1f5f9 !important;
}

body.uw-dark-mode .app-content-wrapper,
body.dark-mode .app-content-wrapper,
body.uw-dark-mode .app-workspace-main,
body.dark-mode .app-workspace-main {
  background-color: #0b1329 !important;
  color: #f1f5f9 !important;
}

body.uw-dark-mode .app-top-bar,
body.dark-mode .app-top-bar {
  background-color: #111d38 !important;
  border-bottom-color: #1e293b !important;
  color: #f1f5f9 !important;
}

body.uw-dark-mode .valetec-card-box,
body.dark-mode .valetec-card-box,
body.uw-dark-mode .counter-catalog-pane,
body.dark-mode .counter-catalog-pane,
body.uw-dark-mode .product-staff-card,
body.dark-mode .product-staff-card,
body.uw-dark-mode .dci-advisor-card,
body.dark-mode .dci-advisor-card,
body.uw-dark-mode .search-bar-card,
body.dark-mode .search-bar-card,
body.uw-dark-mode .table-responsive-container,
body.dark-mode .table-responsive-container,
body.uw-dark-mode .valetec-table,
body.dark-mode .valetec-table,
body.uw-dark-mode .valetec-table tbody tr,
body.dark-mode .valetec-table tbody tr,
body.uw-dark-mode .san-card,
body.dark-mode .san-card,
body.uw-dark-mode .modal-dialog-valetec,
body.dark-mode .modal-dialog-valetec,
body.uw-dark-mode .ticket-summary-card,
body.dark-mode .ticket-summary-card,
body.uw-dark-mode .ticket-cart-card,
body.dark-mode .ticket-cart-card,
body.uw-dark-mode .z-audit-verification-box,
body.dark-mode .z-audit-verification-box,
body.uw-dark-mode .kpi-metric-card,
body.dark-mode .kpi-metric-card,
body.uw-dark-mode .dashboard-card-wrap,
body.dark-mode .dashboard-card-wrap,
body.uw-dark-mode .stat-widget-box,
body.dark-mode .stat-widget-box {
  background-color: #111d38 !important;
  color: #f1f5f9 !important;
  border-color: #1e293b !important;
}

body.uw-dark-mode .valetec-table th,
body.dark-mode .valetec-table th {
  background-color: #16223b !important;
  color: #94a3b8 !important;
  border-bottom-color: #243552 !important;
}

body.uw-dark-mode .valetec-table td,
body.dark-mode .valetec-table td {
  border-bottom-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.uw-dark-mode input,
body.dark-mode input,
body.uw-dark-mode select,
body.dark-mode select,
body.uw-dark-mode textarea,
body.dark-mode textarea {
  background-color: #16223b !important;
  color: #f8fafc !important;
  border-color: #243552 !important;
}

body.uw-dark-mode .search-input-box input,
body.dark-mode .search-input-box input {
  background-color: #16223b !important;
  color: #f8fafc !important;
  border-color: #0284c7 !important;
}

body.uw-dark-mode .search-autocomplete-dropdown,
body.dark-mode .search-autocomplete-dropdown {
  background-color: #111d38 !important;
  border-color: #243552 !important;
  color: #f8fafc !important;
}


body.uw-dark-mode .cat-chip {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

body.uw-dark-mode .cat-chip.active {
  background-color: #0284c7 !important;
  color: #ffffff !important;
}

body.uw-dark-mode .shelf-tag {
  background-color: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}

body.uw-dark-mode .userway-widget-card {
  background-color: #172437 !important;
  border-color: #24354d !important;
}

body.uw-dark-mode .uw-widget-label {
  color: #cbd5e1 !important;
}

body.uw-dark-mode .btn-uw-ctrl {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.uw-dark-mode .btn-uw-ctrl.active {
  background-color: #0284c7 !important;
  color: #ffffff !important;
}

body.uw-dark-mode .btn-uw-feature {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.uw-dark-mode .btn-uw-feature.active {
  background-color: #0d9488 !important;
  color: #ffffff !important;
  border-color: #14b8a6 !important;
}

body.uw-dark-mode .btn-userway-reset {
  background-color: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}

/* Botones Superiores e Indicadores en Modo Oscuro */
body.uw-dark-mode .btn-shortcuts-modal,
body.dark-mode .btn-shortcuts-modal,
body.uw-dark-mode .live-clock-badge,
body.dark-mode .live-clock-badge,
body.uw-dark-mode .terminal-badge,
body.dark-mode .terminal-badge {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.uw-dark-mode .btn-shortcuts-modal:hover,
body.dark-mode .btn-shortcuts-modal:hover {
  background-color: #334155 !important;
  border-color: #475569 !important;
  color: #38bdf8 !important;
}

body.uw-dark-mode .btn-shortcuts-modal kbd,
body.dark-mode .btn-shortcuts-modal kbd {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

#btnThemeToggle.active {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

body.uw-dark-mode .view-heading,
body.uw-dark-mode strong,
body.uw-dark-mode h1,
body.uw-dark-mode h2,
body.uw-dark-mode h3,
body.uw-dark-mode h4 {
  color: #f8fafc !important;
}

body.uw-dark-mode .view-subheading,
body.uw-dark-mode .prod-dci,
body.uw-dark-mode small,
body.uw-dark-mode .text-muted {
  color: #94a3b8 !important;
}

body.uw-dark-mode .input-doc-field input {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

body.uw-dark-mode .btn-search-doc {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.uw-dark-mode .btn-search-doc:hover {
  background-color: #334155;
  color: #ffffff;
}

body.uw-dark-mode .btn-item-del:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

body.uw-dark-mode .prescription-alert-box.verified {
  background-color: rgba(22, 101, 52, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
}

body.uw-dark-mode .prescription-verified-view {
  background-color: #1e293b !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
  color: #86efac !important;
}

body.uw-dark-mode .prescription-verified-view .verified-text {
  color: #86efac !important;
}

body.uw-dark-mode .btn-edit-rx {
  background-color: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body.uw-dark-mode .btn-edit-rx:hover {
  background-color: #334155;
  color: #f8fafc;
}

body.uw-dark-mode .prod-dci {
  color: #cbd5e1 !important;
}

body.uw-dark-mode .prod-lab {
  color: #64748b !important;
}

body.uw-dark-mode .ticket-item-row.selected {
  background-color: rgba(13, 148, 136, 0.18) !important;
  border-left-color: #2dd4bf !important;
}
/* Tipografía de Lectura Fácil */
body.uw-dyslexia,
body.uw-dyslexia * {
  font-family: 'Comic Sans MS', Arial, 'Trebuchet MS', Verdana, sans-serif !important;
  letter-spacing: 0.6px !important;
  line-height: 1.6 !important;
}

/* Espaciado de Texto */
body.uw-spaced-text,
body.uw-spaced-text * {
  letter-spacing: 1.2px !important;
  word-spacing: 3px !important;
}

/* Resaltar Botones */
body.uw-highlight-links button,
body.uw-highlight-links a,
body.uw-highlight-links input[type="button"],
body.uw-highlight-links input[type="submit"] {
  outline: 3px solid #eab308 !important;
  outline-offset: 2px !important;
  text-decoration: underline !important;
}

/* -------------------------------------------------------------
   RESPONSIVE DESIGN (TABLETS & MÓVILES)
------------------------------------------------------------- */
@media (max-width: 1080px) {
  .login-split-card { grid-template-columns: 1fr; max-width: 480px; }
  .login-brand-side { display: none; }
  .counter-responsive-grid { grid-template-columns: 1fr; }
  .cash-audit-split { grid-template-columns: 1fr; }
  .sanitary-metrics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.5);
  }
  .sidebar-backdrop.active {
    display: block;
  }
  .app-content-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .btn-sidebar-close {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {
  .tables-dual-col { grid-template-columns: 1fr; }
  .app-workspace-main { padding: 10px 12px; }
  .valetec-card-box { padding: 16px 14px; }
  .header-actions-group { width: 100%; flex-wrap: wrap; gap: 6px; }
  .header-actions-group button { font-size: 11.5px; padding: 6px 10px; }
  .userway-drawer-panel { right: 12px; left: auto; width: calc(100vw - 24px); }
  .userway-floating-btn { bottom: 16px; right: 16px; left: auto; }
  .modal-dialog-valetec { width: 96% !important; max-width: 96% !important; }
}

@media (max-width: 640px) {
  .modal-backdrop-valetec {
    padding: 10px 8px;
    align-items: center;
  }
  .modal-dialog-valetec {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100vh - 20px) !important;
    margin: auto 0 !important;
    border-radius: var(--radius-md) !important;
  }
  .modal-header-valetec {
    padding: 12px 16px;
  }
  .modal-header-valetec h3 {
    font-size: 13.5px;
  }
  .modal-body-valetec {
    padding: 14px 16px;
  }
  .form-grid-valetec {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .form-group-valetec label {
    font-size: 11px;
  }
  .modal-footer-valetec {
    padding: 10px 16px;
    flex-direction: column-reverse;
    gap: 8px;
  }
  .modal-footer-valetec button,
  .modal-footer-valetec a {
    width: 100%;
    justify-content: center;
  }
  .valetec-table,
  .valetec-data-table,
  table.table {
    font-size: 11.5px;
  }
  .valetec-table th,
  .valetec-data-table th,
  table.table th {
    padding: 9px 10px;
    font-size: 10px;
  }
  .valetec-table td,
  .valetec-data-table td,
  table.table td {
    padding: 9px 10px;
  }
}

/* =============================================================
   ESTADO DE COMUNICACIÓN EN TIEMPO REAL (FRONTEND <-> BACKEND <-> DB)
   ============================================================= */
.valetec-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.valetec-live-badge.online {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.valetec-live-badge.online .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulseGreen 2s infinite;
}
.valetec-live-badge.offline {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.valetec-live-badge.offline .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
}
@keyframes pulseGreen {
  0% { transform: scale(0.92); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(0.92); opacity: 0.8; }
}

/* =============================================================
   COMPROBANTE TÉRMICO / TICKET DE VENTA (80mm)
   ============================================================= */
.thermal-receipt {
  background: #ffffff;
  color: #0f172a;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11.5px;
  line-height: 1.4;
  padding: 16px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.receipt-header {
  text-align: center;
  margin-bottom: 8px;
}

.receipt-logo-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #0a2540;
  margin-bottom: 2px;
}

.receipt-meta-line {
  font-size: 10.5px;
  color: #475569;
  line-height: 1.3;
}

.receipt-dashed-line {
  border-top: 1px dashed #94a3b8;
  margin: 8px 0;
}

.receipt-doc-title {
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  margin: 4px 0 2px 0;
  text-transform: uppercase;
}

.receipt-info-grid {
  font-size: 11px;
  margin-bottom: 6px;
}

.receipt-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.receipt-table {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
  margin: 6px 0;
}

.receipt-table th {
  border-bottom: 1px dashed #94a3b8;
  padding: 4px 2px;
  text-align: left;
  font-size: 10px;
}

.receipt-table td {
  padding: 4px 2px;
  vertical-align: top;
}

.receipt-table .text-right {
  text-align: right;
}

.receipt-totals-box {
  margin-top: 6px;
  font-size: 11px;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.receipt-total-row.grand-total {
  font-size: 13.5px;
  font-weight: 800;
  border-top: 1px dashed #0f172a;
  border-bottom: 1px dashed #0f172a;
  padding: 5px 0;
  margin: 5px 0;
}

.receipt-footer {
  text-align: center;
  font-size: 9.5px;
  color: #64748b;
  margin-top: 10px;
  line-height: 1.35;
}

.receipt-barcode-box {
  text-align: center;
  letter-spacing: 3px;
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 0 2px 0;
}

@media print {
  @page {
    size: 80mm auto;
    margin: 0;
  }
  html, body {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }
  .app-sidebar, 
  .app-header, 
  .app-workspace-main, 
  .toast-container,
  .userway,
  .modal-valetec:not(.active),
  .modal-header-valetec,
  .modal-footer-valetec {
    display: none !important;
  }
  body > *:not(.modal-valetec) {
    display: none !important;
  }
  .modal-valetec.active {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
  }
  .modal-dialog-valetec {
    box-shadow: none !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
  }
  .modal-body-valetec {
    padding: 0 !important;
    background: transparent !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .thermal-receipt {
    border: none !important;
    box-shadow: none !important;
    padding: 4px !important;
    width: 72mm !important;
    margin: 0 auto !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-weight: 700 !important;
    color: #000000 !important;
  }
  .thermal-receipt * {
    font-family: 'Courier New', Courier, monospace !important;
    font-weight: 700 !important;
    color: #000000 !important;
  }
}

/* -------------------------------------------------------------
   RESPONSIVIDAD Y BLOQUEO ABSOLUTO DE OVERFLOW HORIZONTAL
------------------------------------------------------------- */
@media (max-width: 1440px) {
  .app-workspace-main {
    padding: 10px 14px;
  }
  .counter-responsive-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 12px;
  }
  .counter-ticket-pane {
    width: 100%;
    padding: 12px;
  }
  .products-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 10px;
  }
  .product-staff-card {
    padding: 10px;
  }
}

@media (max-width: 1100px) {
  .counter-responsive-grid {
    grid-template-columns: 1fr;
  }
  .counter-ticket-pane {
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
  }
}

/* -------------------------------------------------------------
   FASE 1: MEDIOS DE PAGO TÁCTILES & HISTORIAL DE VENTAS
------------------------------------------------------------- */
.btn-history-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0284c7;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-history-trigger:hover {
  background: #e0f2fe;
  border-color: #0284c7;
}

.payment-methods-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.pay-method-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 4px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.pay-method-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}
.pay-method-btn.active {
  background: #0284c7;
  border-color: #0369a1;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.digital-calc-wrapper {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.badge-sale-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.badge-sale-status.completed {
  background: #dcfce7;
  color: #166534;
}
.badge-sale-status.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

/* =============================================================
   ESTILOS COMPROBANTE TÉRMICO SUNAT UBL 2.1 (80MM / PDF)
============================================================= */
.thermal-receipt {
  background: #ffffff;
  padding: 16px 14px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  font-family: 'Courier New', Courier, monospace;
  color: #0f172a;
  max-width: 380px;
  margin: 0 auto;
}
.receipt-header {
  text-align: center;
  margin-bottom: 8px;
}
.receipt-logo-title {
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #0a2540;
}
.receipt-meta-line {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
}
.receipt-dashed-line {
  border-top: 1px dashed #94a3b8;
  margin: 8px 0;
}
.receipt-doc-title {
  text-align: center;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.receipt-info-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
}
.receipt-info-row {
  display: flex;
  justify-content: space-between;
}
.receipt-table {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
}
.receipt-table th {
  border-bottom: 1px dashed #94a3b8;
  padding: 4px 0;
  text-align: left;
}
.receipt-table td {
  padding: 4px 0;
}
.text-right {
  text-align: right;
}
.receipt-totals-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
}
.receipt-total-row {
  display: flex;
  justify-content: space-between;
}
.receipt-total-row.grand-total {
  font-size: 13.5px;
  font-weight: 900;
  border-top: 1px solid #0f172a;
  border-bottom: 1px solid #0f172a;
  padding: 4px 0;
  margin: 4px 0;
}
.receipt-hash-box {
  background: #f8fafc;
  border: 1px dotted #94a3b8;
  padding: 6px;
  border-radius: 4px;
  font-size: 9.5px;
  word-break: break-all;
  text-align: center;
  margin: 6px 0;
}
.receipt-qr-box {
  text-align: center;
  margin: 8px auto;
}
.receipt-footer {
  text-align: center;
  font-size: 10px;
  color: #475569;
  line-height: 1.35;
}

/* Modo Impresión / Generación PDF para Ticketera Térmica 80mm */
@media print {
  body * {
    visibility: hidden !important;
  }
  #printableThermalReceipt,
  #printableThermalReceipt * {
    visibility: visible !important;
  }
  #printableThermalReceipt {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 80mm !important;
    max-width: 80mm !important;
    padding: 2mm !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
  }
  .modal-backdrop-valetec {
    background: transparent !important;
  }
  @page {
    size: 80mm auto;
    margin: 0;
  }
}

/* =============================================================
   VALETEC CLIENT DIRECTORY & CRM (ESTILOS SAAS 2026)
   ============================================================= */
.client-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 840px) {
  .client-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.client-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.client-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.client-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.client-kpi-icon.dni {
  background: #ecfdf5;
  color: #059669;
}

.client-kpi-icon.ruc {
  background: #f1f5f9;
  color: #334155;
}

.client-kpi-icon.points {
  background: #fef3c7;
  color: #d97706;
}

.client-kpi-info {
  display: flex;
  flex-direction: column;
}

.client-kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.client-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin-top: 2px;
}

.client-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.client-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.client-search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}

.client-search-box input {
  padding-left: 36px !important;
}

.client-tabs {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 4px;
}

.client-tab-btn {
  background: transparent;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}


.client-tab-btn:hover {
  color: #0f172a;
}

.client-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

