/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.29_@types+node@22_c8665b6ed2e82eba8fab7a8297499aa6/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.5.29_@types+node@22_c8665b6ed2e82eba8fab7a8297499aa6/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/styles.css ***!
  \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* ============================================================================
   1. SISTEMA DE TOKENS SEMÁNTICOS — OHNOVA HUB ("EMERALD PRECISION")
   ============================================================================ */

:root,
[data-theme="dark"] {
  color-scheme: dark;

  /* Lienzos y Superficies */
  --hub-bg: #0B0F17;
  --hub-bg-gradient: radial-gradient(ellipse at top right, rgba(13, 148, 136, 0.08), transparent 55%), #0B0F17;
  --hub-card-bg: #111827;
  --hub-card-elevated: #162032;
  --hub-surface: #111827;
  --hub-surface-2: #162032;
  --hub-surface-subtle: #1E293B;
  --hub-surface-hover: rgba(255, 255, 255, 0.035);
  --hub-sidebar-bg: #0F172A;
  --hub-topbar-bg: rgba(15, 23, 42, 0.85);
  --hub-table-th-bg: #0D1424;
  --hub-modal-bg: #111827;
  --hub-modal-footer-bg: rgba(15, 23, 42, 0.65);
  --hub-overlay-bg: rgba(3, 7, 18, 0.75);

  /* Bordes y Divisores */
  --hub-border: #1F2937;
  --hub-border-subtle: #27354A;
  --hub-border-hover: #374151;
  --hub-input-border: #334155;

  /* Tipografía y Jerarquía de Texto */
  --hub-text: #F8FAFC;
  --hub-text-primary: #F8FAFC;
  --hub-text-secondary: #94A3B8;
  --hub-text-muted: #64748B;
  --hub-input-text: #F8FAFC;

  /* Acento Corporativo Oficial: Verde Esmeralda Ohnova Hub */
  --hub-emerald: #0D9488;
  --hub-emerald-light: #14B8A6;
  --hub-emerald-hover: #0F766E;
  --hub-emerald-bg: rgba(13, 148, 136, 0.14);
  --hub-emerald-border: rgba(20, 184, 166, 0.32);
  --hub-emerald-glow: rgba(13, 148, 136, 0.35);
  --hub-emerald-badge-text: #2DD4BF;

  /* Acento Ohnova Showcase (Azul Cobalto) */
  --showcase-blue: #2563EB;
  --showcase-blue-bg: rgba(37, 99, 235, 0.14);
  --showcase-blue-border: rgba(59, 130, 246, 0.32);
  --showcase-blue-badge-text: #60A5FA;

  /* Acento Ohnova Go (Naranja Delivery) */
  --go-orange: #EA580C;
  --go-orange-bg: rgba(234, 88, 12, 0.14);
  --go-orange-border: rgba(251, 146, 60, 0.32);
  --go-orange-badge-text: #FB923C;

  /* Estados Semánticos y Badges */
  --hub-success: #10B981;
  --hub-success-bg: rgba(16, 185, 129, 0.14);
  --hub-success-badge-text: #34D399;

  --hub-warning: #F59E0B;
  --hub-warning-bg: rgba(245, 158, 11, 0.14);
  --hub-warning-border: rgba(245, 158, 11, 0.32);
  --hub-warning-badge-text: #FBBF24;

  --hub-danger: #EF4444;
  --hub-danger-bg: rgba(239, 68, 68, 0.14);
  --hub-danger-border: rgba(239, 68, 68, 0.32);
  --hub-danger-badge-text: #F87171;

  /* Sombras y Elevación */
  --hub-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --hub-shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
  --hub-shadow-lg: 0 22px 45px -12px rgba(0, 0, 0, 0.65);
}

/* ============================================================================
   2. TEMA CLARO CORPORATIVO ("DAYLIGHT CRISP")
   ============================================================================ */

[data-theme="light"] {
  color-scheme: light;

  /* Lienzos y Superficies */
  --hub-bg: #F1F5F9;
  --hub-bg-gradient: radial-gradient(ellipse at top right, rgba(13, 148, 136, 0.06), transparent 55%), #F1F5F9;
  --hub-card-bg: #FFFFFF;
  --hub-card-elevated: #F8FAFC;
  --hub-surface: #FFFFFF;
  --hub-surface-2: #F8FAFC;
  --hub-surface-subtle: #F1F5F9;
  --hub-surface-hover: rgba(15, 23, 42, 0.035);
  --hub-sidebar-bg: #FFFFFF;
  --hub-topbar-bg: rgba(255, 255, 255, 0.88);
  --hub-table-th-bg: #F8FAFC;
  --hub-modal-bg: #FFFFFF;
  --hub-modal-footer-bg: #F8FAFC;
  --hub-overlay-bg: rgba(15, 23, 42, 0.48);

  /* Bordes y Divisores */
  --hub-border: #E2E8F0;
  --hub-border-subtle: #CBD5E1;
  --hub-border-hover: #94A3B8;
  --hub-input-border: #CBD5E1;

  /* Tipografía de Alto Contraste */
  --hub-text: #0F172A;
  --hub-text-primary: #0F172A;
  --hub-text-secondary: #475569;
  --hub-text-muted: #64748B;
  --hub-input-text: #0F172A;

  /* Acento Corporativo Esmeralda Ajustado a Luz Diurna */
  --hub-emerald: #0D9488;
  --hub-emerald-light: #0F766E;
  --hub-emerald-hover: #115E59;
  --hub-emerald-bg: rgba(13, 148, 136, 0.10);
  --hub-emerald-border: rgba(13, 148, 136, 0.28);
  --hub-emerald-glow: rgba(13, 148, 136, 0.18);
  --hub-emerald-badge-text: #0F766E;

  /* Acento Ohnova Showcase en Modo Claro */
  --showcase-blue: #2563EB;
  --showcase-blue-bg: rgba(37, 99, 235, 0.09);
  --showcase-blue-border: rgba(37, 99, 235, 0.25);
  --showcase-blue-badge-text: #1D4ED8;

  /* Acento Ohnova Go en Modo Claro */
  --go-orange: #EA580C;
  --go-orange-bg: rgba(234, 88, 12, 0.10);
  --go-orange-border: rgba(234, 88, 12, 0.28);
  --go-orange-badge-text: #C2410C;

  /* Estados Semánticos con Contraste WCAG AA sobre Blanco */
  --hub-success: #059669;
  --hub-success-bg: rgba(16, 185, 129, 0.12);
  --hub-success-badge-text: #047857;

  --hub-warning: #D97706;
  --hub-warning-bg: rgba(245, 158, 11, 0.12);
  --hub-warning-border: rgba(217, 119, 6, 0.28);
  --hub-warning-badge-text: #B45309;

  --hub-danger: #DC2626;
  --hub-danger-bg: rgba(239, 68, 68, 0.10);
  --hub-danger-border: rgba(220, 38, 38, 0.25);
  --hub-danger-badge-text: #B91C1C;

  /* Sombras Corporativas Suaves */
  --hub-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
  --hub-shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --hub-shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.16);
}

/* Soporte de alto contraste para el logotipo oficial Ohnova */
[data-theme="light"] .ohnova-logo-text {
  fill: #0F172A !important;
}

[data-theme="light"] .ohnova-logo-badge-rect {
  fill: rgba(13, 148, 136, 0.10) !important;
  stroke: #0D9488 !important;
}

[data-theme="light"] .ohnova-logo-badge-text {
  fill: #0D9488 !important;
}

[data-theme="dark"] .ohnova-logo-text {
  fill: #FFFFFF !important;
}

[data-theme="dark"] .ohnova-logo-badge-rect {
  fill: rgba(13, 148, 136, 0.18) !important;
  stroke: #0D9488 !important;
}

[data-theme="dark"] .ohnova-logo-badge-text {
  fill: #5EEAD4 !important;
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--hub-bg-gradient);
  background-color: var(--hub-bg);
  color: var(--hub-text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Layout Principal */
.hub-layout {
  display: flex;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

/* Barra Lateral Dinámica */
.hub-sidebar {
  width: 270px;
  background-color: var(--hub-sidebar-bg);
  border-right: 1px solid var(--hub-border);
  box-shadow: var(--hub-shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  flex-shrink: 0;
  z-index: 40;
  overflow: hidden;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sidebar-header {
  flex-shrink: 0;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--hub-border);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-external-showcase {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--showcase-blue-bg);
  color: var(--showcase-blue-badge-text);
  border: 1px solid var(--showcase-blue-border);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  margin-top: 10px;
}

.btn-external-showcase:hover {
  background: rgba(37, 99, 235, 0.22);
  color: #93C5FD;
}

.sidebar-selectors {
  flex-shrink: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hub-border);
  background: var(--hub-surface-subtle);
}

.selector-label {
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--hub-text-muted);
  margin-bottom: 4px;
}

.custom-select {
  width: 100%;
  background: var(--hub-surface-subtle);
  color: var(--hub-input-text);
  border: 1px solid var(--hub-input-border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-select:focus {
  border-color: var(--hub-emerald);
  box-shadow: 0 0 0 3px var(--hub-emerald-bg);
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--hub-border) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--hub-border);
  border-radius: 4px;
}

.nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--hub-text-muted);
  padding: 6px 10px;
  margin-top: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  color: var(--hub-text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  margin-bottom: 3px;
}

.nav-item:hover {
  background: var(--hub-surface-hover);
  color: var(--hub-text-primary);
}

.nav-item.active {
  background: var(--hub-emerald-bg);
  color: var(--hub-emerald-badge-text);
  border-left: 3px solid var(--hub-emerald);
  font-weight: 700;
}

.nav-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-ecosystem {
  flex-shrink: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--hub-border);
  background: var(--hub-surface-subtle);
}

.sidebar-ecosystem-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hub-text-muted);
  margin-bottom: 8px;
  padding-left: 2px;
}

.sidebar-ecosystem-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--showcase-blue-bg);
  border: 1px solid var(--showcase-blue-border);
  text-decoration: none;
  color: var(--showcase-blue-badge-text);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
  margin-top: 4px;
}

[data-theme="dark"] .sidebar-ecosystem-link:hover {
  background: rgba(37, 99, 235, 0.22);
  color: #93C5FD;
}

[data-theme="light"] .sidebar-ecosystem-link:hover {
  background: rgba(37, 99, 235, 0.16);
  color: #1D4ED8;
}

.sidebar-ecosystem-badge {
  font-size: 10px;
  font-weight: 800;
  background: var(--showcase-blue);
  color: #FFFFFF;
  padding: 2px 6px;
  border-radius: 4px;
}

.sidebar-ops-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(147, 51, 234, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  text-decoration: none;
  color: #C084FC;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
  margin-top: 6px;
  margin-bottom: 4px;
}

[data-theme="dark"] .sidebar-ops-link:hover {
  background: rgba(147, 51, 234, 0.22);
  border-color: rgba(168, 85, 247, 0.55);
  color: #E9D5FF;
}

[data-theme="light"] .sidebar-ops-link {
  background: rgba(147, 51, 234, 0.08);
  border: 1px solid rgba(147, 51, 234, 0.25);
  color: #7E22CE;
}

[data-theme="light"] .sidebar-ops-link:hover {
  background: rgba(147, 51, 234, 0.16);
  border-color: rgba(147, 51, 234, 0.45);
  color: #6B21A8;
}

.sidebar-ops-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(147, 51, 234, 0.25);
  color: #E9D5FF;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

[data-theme="light"] .sidebar-ops-badge {
  background: rgba(147, 51, 234, 0.15);
  color: #6B21A8;
  border: 1px solid rgba(147, 51, 234, 0.3);
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--hub-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--hub-card-elevated);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hub-emerald);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.user-meta {
  line-height: 1.2;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--hub-text-primary);
}

.user-role {
  font-size: 11px;
  color: var(--hub-text-muted);
}

/* Área Principal de Contenido */
.hub-main {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--hub-border) transparent;
}

.hub-main::-webkit-scrollbar {
  width: 6px;
}

.hub-main::-webkit-scrollbar-thumb {
  background: var(--hub-border);
  border-radius: 4px;
}

/* Topbar */
.hub-topbar {
  height: 64px;
  border-bottom: 1px solid var(--hub-border);
  background: var(--hub-topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 30;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.business-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--hub-surface-subtle);
  color: var(--hub-text-primary);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--hub-border-subtle);
  font-size: 12.5px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hub-success);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Contenido de Página */
.hub-content {
  padding: 28px;
  flex: 1 1 auto;
  max-width: 1400px;
  width: 100%;
}

.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--hub-text-primary);
}

.page-desc {
  font-size: 14px;
  color: var(--hub-text-secondary);
  margin-top: 4px;
}

/* Botones de acción en cabecera de inventario y vistas */
.inventory-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Botones */
.hub-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-family: inherit;
}

.hub-btn-primary,
.btn-primary {
  background: var(--hub-emerald);
  color: #FFFFFF;
  border-color: transparent;
}

.hub-btn-primary:hover,
.btn-primary:hover {
  background: var(--hub-emerald-hover);
  box-shadow: 0 4px 12px var(--hub-emerald-glow);
}

.hub-btn-secondary,
.btn-secondary {
  background: var(--hub-surface-subtle);
  color: var(--hub-text-primary);
  border: 1px solid var(--hub-border-subtle);
}

.hub-btn-secondary:hover,
.btn-secondary:hover {
  background: var(--hub-card-elevated);
  border-color: var(--hub-border-hover);
}

.hub-btn-outline,
.btn-outline {
  background: transparent;
  color: var(--hub-text-primary);
  border: 1px solid var(--hub-border);
}

.hub-btn-outline:hover,
.btn-outline:hover {
  background: var(--hub-surface-hover);
  border-color: var(--hub-border-hover);
}

.hub-btn-sm,
.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 6px;
}

/* Tarjetas KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  box-shadow: var(--hub-shadow-sm);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.kpi-card:hover {
  border-color: var(--hub-border-hover);
  box-shadow: var(--hub-shadow-md);
  transform: translateY(-2px);
}

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

.kpi-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--hub-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-icon {
  font-size: 20px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hub-text-primary);
}

.kpi-sub {
  font-size: 12px;
  color: var(--hub-text-muted);
  margin-top: 4px;
}

/* Tablas */
.hub-table-container {
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--hub-shadow-sm);
}

.hub-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--hub-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--hub-card-elevated);
  flex-wrap: wrap;
  gap: 12px;
}

.table-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hub-text-primary);
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.hub-table th {
  padding: 12px 18px;
  background: var(--hub-table-th-bg);
  color: var(--hub-text-muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--hub-border);
}

.hub-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--hub-border);
  color: var(--hub-text-primary);
  vertical-align: middle;
}

.hub-table tr:hover td {
  background: var(--hub-surface-hover);
}

/* Badges / Píldoras */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-emerald {
  background: var(--hub-emerald-bg);
  color: var(--hub-emerald-badge-text);
  border: 1px solid var(--hub-emerald-border);
}

.badge-blue {
  background: var(--showcase-blue-bg);
  color: var(--showcase-blue-badge-text);
  border: 1px solid var(--showcase-blue-border);
}

.badge-warning {
  background: var(--hub-warning-bg);
  color: var(--hub-warning-badge-text);
  border: 1px solid var(--hub-warning-border);
}

.badge-danger {
  background: var(--hub-danger-bg);
  color: var(--hub-danger-badge-text);
  border: 1px solid var(--hub-danger-border);
}

/* Galería de Módulos del Market */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-gap: 20px;
  gap: 20px;
}

.market-card {
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--hub-shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  position: relative;
  overflow: hidden;
}

.market-card:hover {
  border-color: var(--hub-border-hover);
  box-shadow: var(--hub-shadow-md);
}

.market-card.installed {
  border-color: var(--hub-emerald);
  box-shadow: 0 0 0 1px var(--hub-emerald);
}

.market-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.market-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--hub-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 1px solid var(--hub-border-subtle);
}

.market-title {
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--hub-text-primary);
}

.market-desc {
  font-size: 13px;
  color: var(--hub-text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
  flex: 1 1 auto;
}

.market-footer {
  padding-top: 16px;
  border-top: 1px solid var(--hub-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Modales */
.hub-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--hub-overlay-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.hub-modal {
  background: var(--hub-modal-bg);
  border: 1px solid var(--hub-border);
  box-shadow: var(--hub-shadow-lg);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--hub-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--hub-text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--hub-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--hub-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--hub-modal-footer-bg);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--hub-text-secondary);
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--hub-surface-subtle);
  border: 1px solid var(--hub-input-border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--hub-input-text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--hub-emerald);
  box-shadow: 0 0 0 3px var(--hub-emerald-bg);
}

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

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374151;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--hub-emerald);
}

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

/* ============================================================================
   SUBPESTAÑAS EN 1 SOLA FILA (sin saltos visuales bruscos)
   ============================================================================ */

.hub-subtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--hub-border);
  padding-bottom: 12px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hub-subtabs::-webkit-scrollbar {
  display: none;
}

.subtab-btn {
  background: var(--hub-surface-subtle);
  border: 1px solid var(--hub-border);
  color: var(--hub-text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  outline: none;
}

.subtab-btn:hover {
  background: var(--hub-surface-hover);
  color: var(--hub-text-primary);
  border-color: var(--hub-border-hover);
}

.subtab-btn.active {
  background: var(--hub-emerald);
  color: #FFFFFF;
  border-color: var(--hub-emerald);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

/* ============================================================================
   MENÚS DESPLEGABLES Y CONTEXTUALES DE FILA (.hub-dropdown)
   ============================================================================ */

.hub-dropdown {
  position: relative;
  display: inline-flex;
}

.hub-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 215px;
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border-hover);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hub-dropdown-item {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--hub-text-primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  transition: background 0.12s ease;
}

.hub-dropdown-item:hover {
  background: var(--hub-surface-hover);
}

.hub-dropdown-item.accent-ai {
  color: #A855F7;
}

.hub-dropdown-item.danger {
  color: var(--hub-danger);
}

.hub-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.hub-dropdown-divider {
  height: 1px;
  background: var(--hub-border);
  margin: 4px 2px;
}

.hub-icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--hub-surface-subtle);
  border: 1px solid var(--hub-border);
  color: var(--hub-text-secondary);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hub-icon-btn:hover {
  background: var(--hub-surface-hover);
  color: var(--hub-text-primary);
  border-color: var(--hub-border-hover);
}

/* ==========================================================================
   FASE 3 — ESTILOS DEL POS, CAJA CHICA Y TICKETS TÉRMICOS
   ========================================================================== */

.pos-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  grid-gap: 20px;
  gap: 20px;
  align-items: start;
}

.pos-catalog-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.pos-product-card {
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  cursor: pointer;
  box-shadow: var(--hub-shadow-sm);
  transition: all 0.15s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.pos-product-card:hover {
  border-color: var(--hub-emerald);
  transform: translateY(-2px);
  box-shadow: var(--hub-shadow-md);
}

.pos-product-card:active {
  transform: scale(0.98);
}

.pos-ticket-panel {
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  position: -webkit-sticky;
  position: sticky;
  top: 90px;
  overflow: hidden;
  box-shadow: var(--hub-shadow-md);
}

.pos-ticket-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--hub-border);
  background: var(--hub-card-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pos-ticket-items {
  flex: 1 1;
  overflow-y: auto;
  padding: 12px;
}

.pos-ticket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--hub-surface-subtle);
  border: 1px solid var(--hub-border-subtle);
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid var(--hub-emerald);
}

.pos-ticket-totals {
  border-top: 1px solid var(--hub-border);
  padding: 16px;
  background: var(--hub-card-elevated);
}

.quick-bill-btn {
  background: var(--hub-surface-subtle);
  border: 1px solid var(--hub-border-subtle);
  color: var(--hub-text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-bill-btn:hover {
  border-color: var(--hub-border-hover);
  background: var(--hub-card-elevated);
}

.thermal-receipt {
  background: #FFFFFF;
  color: #111827;
  font-family: 'Courier New', Courier, monospace;
  padding: 24px 20px;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
}

.thermal-divider {
  border-top: 1px dashed #6B7280;
  margin: 10px 0;
}

/* ============================================================================
   IMPRESIÓN TÉRMICA LIMPIA EN NAVEGADOR / WINDOWS (58mm y 80mm)
   ============================================================================ */

@media print {
  @page {
    margin: 0;
    size: auto;
  }

  html,
  body {
    background: #FFFFFF !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* Ocultar absolutamente todo el panel excepto la tirilla */
  body * {
    visibility: hidden !important;
  }

  .thermal-receipt,
  .thermal-receipt * {
    visibility: visible !important;
  }

  .thermal-receipt {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 78mm !important;
    margin: 0 !important;
    padding: 4mm 3mm !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  html[data-print-width="58mm"] .thermal-receipt {
    max-width: 56mm !important;
    padding: 3mm 2mm !important;
    font-size: 10px !important;
  }

  html[data-print-width="80mm"] .thermal-receipt {
    max-width: 78mm !important;
  }

  .thermal-divider {
    border-top: 1px dashed #000000 !important;
  }
}

/* ==========================================================================
   FASE 5: MÓDULOS ESPECIALIZADOS (CARWASH / PATIO + RESTAURANTES / KDS)
   ========================================================================== */

/* 1. Matrícula / Placa de Vehículo */
.plate-badge {
  display: inline-flex;
  align-items: center;
  background: #FFFFFF;
  color: #111827;
  border: 2px solid #374151;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.plate-badge::before {
  content: 'E';
  background: #1D4ED8;
  color: #F8FAFC;
  font-size: 9px;
  font-weight: 900;
  padding: 4px 4px;
  margin-right: 6px;
  margin-left: -8px;
  display: inline-block;
  line-height: 1;
}

/* 2. Kanban de Patio Carwash */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 16px;
  gap: 16px;
  margin-top: 16px;
}

.kanban-col {
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border-subtle);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--hub-border);
  font-weight: 700;
  font-size: 14px;
}

.kanban-card {
  background: var(--hub-surface-subtle);
  border: 1px solid var(--hub-border-subtle);
  border-left: 3px solid var(--hub-emerald);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.kanban-card:hover {
  border-color: var(--hub-emerald);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.bay-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--hub-surface-subtle);
  border: 1px solid var(--hub-border-subtle);
  font-size: 13px;
  font-weight: 600;
}

/* 3. Mapa de Mesas de Restaurante */
.floor-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-top: 16px;
}

.restaurant-table-card {
  background: var(--hub-card-bg);
  border: 2px solid var(--hub-border-subtle);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--hub-shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.restaurant-table-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.restaurant-table-card.table-status-free {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.restaurant-table-card.table-status-occupied {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.06);
}

.restaurant-table-card.table-status-bill-requested {
  border-color: rgba(245, 158, 11, 0.8);
  background: rgba(245, 158, 11, 0.08);
  animation: pulse-border 2s infinite;
}

.restaurant-table-card.table-status-reserved {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.06);
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* 4. Monitor de Cocina y Barra KDS */
.kds-container {
  background: var(--hub-bg);
  border-radius: 16px;
  padding: 20px;
  min-height: 80vh;
}

.kds-ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-top: 18px;
}

.kds-ticket-card {
  background: var(--hub-card-bg);
  border: 2px solid var(--hub-border-subtle);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--hub-shadow-sm);
}

.kds-ticket-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  border-bottom: 1px solid var(--hub-border);
}

.kds-ticket-header.urgency-green {
  background: #064E3B;
  color: #A7F3D0;
}

.kds-ticket-header.urgency-amber {
  background: #78350F;
  color: #FDE68A;
}

.kds-ticket-header.urgency-red {
  background: #7F1D1D;
  color: #FECACA;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.kds-dish-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hub-border-subtle);
}

.kds-dish-qty {
  font-size: 18px;
  font-weight: 800;
  color: #38BDF8;
  min-width: 28px;
}

.kds-dish-notes {
  display: inline-block;
  background: #FEF08A;
  color: #854D0E;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}




/* ============================================================================
   ESTILOS FASE 6: BARBERÍA, JOYERÍA/APARTADOS Y PUENTE OHNOVA GO
   ============================================================================ */

/* 1. Módulo Barbería y Sillones */
.chair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 20px;
}

.chair-card {
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--hub-shadow-sm);
  transition: all 0.2s ease;
}

.chair-card.occupied {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.05);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
}

.chair-card.free {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}

/* 2. Módulo Joyería y Apartados */
.layaway-progress-container {
  width: 100%;
  height: 10px;
  background: var(--hub-surface-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
}

.layaway-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #059669);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.warranty-cert-luxury {
  background: radial-gradient(circle at top right, #1E293B, #0F172A);
  border: 2px solid #F59E0B;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(245, 158, 11, 0.15);
  color: #F8FAFC;
  position: relative;
  overflow: hidden;
}

.warranty-gold-stamp {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 72px;
  height: 72px;
  border: 2px dashed #F59E0B;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F59E0B;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  transform: rotate(-15deg);
  text-transform: uppercase;
}

/* 3. Puente Ohnova Go */
.store-paused-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
  padding: 12px 18px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  animation: pulse-red 2s infinite;
}

.pin-display-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 6px;
  font-size: 24px;
  font-family: monospace;
  font-weight: 900;
  background: #0284C7;
  color: #FFFFFF;
  padding: 6px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

/* ==========================================================================
   FASE 7: ESTILOS DE ANALÍTICA FINANCIERA, PLANES Y CONSOLA SUPERADMIN
   ========================================================================== */

/* 1. Cascada de Estado de Resultados (P&L) */
.pnl-cascade-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--hub-card-elevated);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--hub-border);
}

.pnl-cascade-card {
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  box-shadow: var(--hub-shadow-sm);
  padding: 12px 14px;
  border-radius: 8px;
  flex: 1 1;
  min-width: 140px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pnl-cascade-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--hub-text-secondary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.pnl-cascade-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--hub-text-primary);
}

.pnl-cascade-operator {
  font-size: 18px;
  font-weight: 900;
  color: var(--hub-text-muted);
  padding: 0 2px;
}

.pnl-grand-total {
  background: rgba(13, 148, 136, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.4);
  box-shadow: 0 0 16px rgba(13, 148, 136, 0.2);
}

.pnl-grand-total .pnl-cascade-value {
  color: var(--hub-emerald-badge-text);
  font-size: 20px;
}

/* 2. Gráfico Financiero SVG */
.analytics-chart-container {
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  box-shadow: var(--hub-shadow-sm);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
}

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

.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  font-weight: 700;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot-sales {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38BDF8;
}

.legend-dot-profit {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
}

/* 3. Medidores de Planes y Suscripción */
.entitlement-meter-container {
  margin-bottom: 14px;
}

.entitlement-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--hub-text-secondary);
  margin-bottom: 6px;
}

.entitlement-meter-bar {
  height: 8px;
  background: var(--hub-surface-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.entitlement-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* 4. Estética Ops para Consola SuperAdmin */
.superadmin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #030712;
  border: 1px solid #1F2937;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.superadmin-badge {
  background: rgba(168, 85, 247, 0.2);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.4);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.telemetry-card {
  background: #030712;
  border: 1px solid #1F2937;
  border-radius: 10px;
  padding: 16px;
}

.telemetry-indicator-up {
  color: #10B981;
  font-weight: 800;
}

.telemetry-indicator-down {
  color: #EF4444;
  font-weight: 800;
}

/* ============================================================================
   8. COMPONENTES Y UTILIDADES DE TEMAS Y CIFRAS TABULARES
   ============================================================================ */

/* Conmutador Segmentado de Tema Claro / Oscuro en Topbar */
.hub-theme-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--hub-surface-subtle);
  border: 1px solid var(--hub-border-subtle);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}

.hub-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--hub-text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hub-theme-btn:hover {
  color: var(--hub-text-primary);
}

.hub-theme-btn.active {
  background: var(--hub-card-bg);
  color: var(--hub-emerald);
  box-shadow: var(--hub-shadow-sm);
}

.sidebar-theme-wrapper .hub-theme-switcher {
  display: flex;
  width: 100%;
}

.sidebar-theme-wrapper .hub-theme-btn {
  flex: 1 1;
  justify-content: center;
  padding: 6px 8px;
}

/* Precisión Numérica Tabular para Precios, Relojes, Placas y Arqueos */
.kpi-value,
.pos-price,
.pos-total-amount,
.pnl-amount,
.timer-badge,
.plate-badge {
  font-family: 'JetBrains Mono', monospace;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   MODO TERMINAL Y LAYOUT FLUIDO RESPONSIVE (< 900px y < 768px)
   ========================================================================== */

/* Shell Principal Fluido y Seguro contra Zoom Out */
html,
body {
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  overflow-x: hidden;
}

.hub-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 1400px;
  min-width: 0;
}

/* Sidebar en Modo Drawer (< 900px) */
.hub-sidebar-backdrop {
  display: none;
}

@media (max-width: 899px) {
  .hub-sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
  }

  .hub-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 285px !important;
    max-width: 86vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1001 !important;
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.6) !important;
    flex-shrink: 0 !important;
  }

  .hub-main {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-left: 0 !important;
  }
}

/* Header de Modo Terminal Responsive (< 768px) */
.hub-topbar-terminal-mobile {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.hub-topbar-terminal-desktop {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

@media (max-width: 767px) {
  .hub-topbar {
    padding: 0 10px !important;
    height: 56px !important;
  }

  .hub-content {
    padding: 14px 10px !important;
  }

  .hub-topbar-terminal-mobile {
    display: flex !important;
  }

  .hub-topbar-terminal-desktop {
    display: none !important;
  }

  .menu-text-desktop,
  .terminal-shortcut-f9 {
    display: none !important;
  }

  /* Apilado fluido del Banner de Showcase al 100% */
  .showcase-sync-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .showcase-sync-banner button {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Apilado fluido de Botones de Acción (Entrada / Compra, Operaciones, Nuevo) al 100% */
  .inventory-action-buttons {
    display: flex !important;
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-top: 12px !important;
  }

  .inventory-action-buttons > button,
  .inventory-action-buttons > div,
  .inventory-action-buttons .hub-dropdown,
  .inventory-action-buttons .hub-dropdown > button,
  .inventory-action-buttons .hub-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .inventory-action-buttons .hub-dropdown-menu {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* Apilado de Tarjetas KPI al 100% del ancho */
  .kpi-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 12px !important;
  }

  .kpi-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Contenedor fluido con scroll horizontal nativo para tablas */
.hub-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hub-table-container {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hub-table {
  min-width: 640px;
}

