:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-main: #f1f5f9;
  --header-bg: #0f172a;
  --header-border: #1e293b;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-dark: #0f172a;
  --primary-blue: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #0284c7;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOPBAR HEADER ESTILO ERP MODERNO */
/* TOPBAR HEADER ESTILO ERP MODERNO COMPACTO */
.erp-topbar {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  color: #ffffff;
  padding: 0 0.85rem;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.brand-logo img { height: 32px !important; max-height: 32px !important; width: auto !important; max-width: 48px !important; object-fit: contain !important; flex-shrink: 0 !important; }
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.4px;
  white-space: nowrap;
}

.brand-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

/* NAVEGACIÓN PRINCIPAL (COMPACTA, 1 SOLA LÍNEA) */
.erp-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.35rem 0.52rem;
  border-radius: 6px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 600;
  transition: all 0.15s ease;
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.nav-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-link .arrow-down {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-left: 1px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.nav-item:hover > .nav-link .arrow-down,
.nav-item.open > .nav-link .arrow-down {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-link:hover, .nav-item.active .nav-link {
  background-color: #1e293b;
  color: #ffffff;
}

.nav-link:hover svg, .nav-item.active .nav-link svg {
  opacity: 1;
  stroke: #f59e0b;
}

.nav-link.highlight {
  background: #1e293b;
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.nav-badge {
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 9999px;
  margin-left: 0.2rem;
}

/* DROPDOWN MENU */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 2px;
  background-color: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  min-width: 230px;
  padding: 0.4rem;
  display: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.45);
  z-index: 105;
}

/* Puente invisible amplio para que el cursor no pierda el hover al bajar del botón al menú */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  background: transparent;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 5px;
  transition: all 0.15s;
  white-space: nowrap;
}

.dropdown-item:hover {
  background-color: #1e293b;
  color: #ffffff;
  transform: translateX(2px);
}

.nav-item:hover > .dropdown-menu,
.nav-item.open > .dropdown-menu {
  display: block !important;
}

/* BOTONES DE ACCIÓN RÁPIDA EN CABECERA */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  white-space: nowrap;
  transition: all 0.15s;
  line-height: 1;
}

.btn-header-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.btn-header-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-header-dark {
  background-color: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
}

.btn-header-dark:hover {
  background-color: #334155;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background-color: #1e293b;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.user-avatar {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}


/* CONTENEDOR PRINCIPAL */
.main-wrapper {
  flex: 1;
  max-width: 1540px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}

@media (max-width: 1400px) {
  .main-wrapper {
    padding: 1rem 0.75rem;
  }
  .panel-card {
    padding: 1.1rem 0.85rem !important;
  }
}

/* BANNER DE ALERTAS */
.alert-banner {
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.alert-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #fef3c7;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.alert-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #92400e;
}

.alert-text p {
  font-size: 0.83rem;
  color: #b45309;
}

.btn-alert {
  background-color: #1e293b;
  color: #ffffff;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.83rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s;
}

.btn-alert:hover {
  background-color: #0f172a;
}

/* TARJETAS DE KPIS Y MÉTRICAS */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-icon-pill {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.icon-emerald { background: #ecfdf5; color: #059669; }
.icon-sky { background: #f0f9ff; color: #0284c7; }
.icon-amber { background: #fffbeb; color: #d97706; }
.icon-rose { background: #fff1f2; color: #e11d48; }
.icon-indigo { background: #eef2ff; color: #4f46e5; }

.kpi-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 0.35rem;
}

.kpi-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-pill {
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.pill-green { background: #dcfce7; color: #15803d; }
.pill-blue { background: #e0f2fe; color: #0369a1; }
.pill-amber { background: #fef3c7; color: #92400e; }
.pill-red { background: #fee2e2; color: #b91c1c; }

/* SECCIONES Y PANELES */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 1.5rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--card-border);
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* TABLAS ESTILO ERP */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.erp-table th {
  background-color: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--card-border);
}

.erp-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-main);
  font-size: 0.85rem;
  vertical-align: middle;
}

.erp-table tr:hover td {
  background-color: #f8fafc;
}

/* BADGES DE ESTADO */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-success { background: #dcfce7; color: #166534; }
.status-warning { background: #fef3c7; color: #92400e; }
.status-danger { background: #fee2e2; color: #991b1b; }
.status-info { background: #e0f2fe; color: #075985; }

/* FORMULARIOS Y FILTROS */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--card-border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  transition: border-color 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-dark {
  background-color: #0f172a;
  color: #ffffff;
}

.btn-dark:hover {
  background-color: #1e293b;
}

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

.btn-success:hover {
  background-color: #059669;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

/* FLASH MESSAGES */
.flash-msg {
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.flash-danger { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.flash-success { background: #dcfce7; color: #166534; border-left: 4px solid #10b981; }
.flash-info { background: #e0f2fe; color: #075985; border-left: 4px solid #0284c7; }

/* FOOTER */
.erp-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  border-top: 1px solid var(--card-border);
  margin-top: auto;
  background: #ffffff;
}

/* RESPONSIVE DESIGN PARA MENÚ SUPERIOR Y TOPBAR */
@media (max-width: 1366px) {
  .erp-topbar {
    padding: 0 0.65rem;
    gap: 0.3rem;
  }
  .erp-nav {
    gap: 0.15rem;
  }
  .nav-link {
    padding: 0.32rem 0.44rem;
    font-size: 0.77rem;
    gap: 0.28rem;
  }
}

@media (max-width: 1280px) {
  .erp-topbar {
    padding: 0 0.5rem;
    gap: 0.25rem;
  }
  .erp-nav {
    gap: 0.1rem;
  }
  .nav-link {
    padding: 0.3rem 0.38rem;
    font-size: 0.75rem;
    gap: 0.22rem;
  }
  .brand-badge {
    display: none;
  }
}

@media (max-width: 1080px) {
  .erp-topbar {
    gap: 0.2rem;
  }
  .brand-logo span span {
    display: none;
  }
  .nav-link {
    padding: 0.28rem 0.32rem;
    font-size: 0.71rem;
    gap: 0.18rem;
  }
  .user-profile span:first-child {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ==========================================
   PUNTO DE VENTA (POS) ESPECIALIZADO CERÁMICOS
   ========================================== */
.pos-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 58px);
  overflow: hidden;
}

.pos-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}

.pos-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: #f8fafc;
}

/* PANEL IZQUIERDO: CATÁLOGO */
.pos-catalog-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #e2e8f0;
}

.pos-catalog-header {
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex-shrink: 0;
}

.pos-search-wrapper {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 0.5rem;
}

.pos-search-input {
  border: none;
  background: transparent;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  width: 100%;
  outline: none;
  color: #0f172a;
}

.pos-filter-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-chip {
  padding: 0.3rem 0.65rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.filter-chip:hover {
  background: #e2e8f0;
}

.filter-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.pos-grid {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 0.75rem;
  align-content: start;
}

.product-pos-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.product-pos-card:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.15);
}

.card-badge-format {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.product-pos-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin-top: 0.8rem;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.1rem;
}

.product-pos-meta {
  font-size: 0.7rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.product-pos-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px dashed #e2e8f0;
  padding-top: 0.4rem;
}

.product-pos-price {
  font-weight: 900;
  font-size: 0.95rem;
  color: #059669;
}

.product-pos-stock {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.stock-ok { color: #0284c7; }
.stock-low { color: #e11d48; }

/* PANEL DERECHO: CARRITO DE VENTAS */
.pos-cart-panel {
  width: 410px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: -3px 0 15px rgba(0,0,0,0.03);
}

.cart-customer-section {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.cart-items-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-items-header {
  padding: 0.5rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  display: flex;
  align-items: flex-start;
  transition: border-color 0.15s;
}

.cart-item-row:hover {
  border-color: #cbd5e1;
}

.cart-empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}

.cart-totals-section {
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #475569;
}

.cart-total-row.final-total {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  padding-top: 0.4rem;
  margin-top: 0.2rem;
  border-top: 1px dashed #cbd5e1;
}

.btn-checkout {
  margin-top: 0.6rem;
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-checkout:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* MODAL DE COBRANZA */
.pos-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.pos-modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  box-shadow: 0 20px 35px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
}

.pos-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pos-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

.pos-modal-footer {
  padding: 0.85rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.checkout-amount-box {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.checkout-amount-box strong {
  font-size: 1.45rem;
  color: #059669;
  font-weight: 900;
}

.voucher-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

.voucher-option-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.voucher-option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.voucher-option-card .card-inner {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem;
  text-align: center;
  transition: all 0.15s;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  height: 100%;
}

.voucher-option-card input[type="radio"]:checked + .card-inner {
  border-color: #f59e0b;
  background: #fffbeb;
}

.voucher-option-card .card-inner strong {
  font-size: 0.82rem;
  color: #0f172a;
}

.voucher-option-card .card-inner small {
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.2;
}

.btn-pay-tab {
  padding: 0.4rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-pay-tab.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.payment-detail-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem;
}

.change-display {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 1.1rem;
  font-weight: 900;
  color: #059669;
  text-align: right;
}

@media (max-width: 992px) {
  .pos-container {
    height: auto;
    overflow: visible;
  }
  .pos-layout {
    flex-direction: column;
  }
  .pos-cart-panel {
    width: 100%;
    box-shadow: none;
    border-top: 2px solid #e2e8f0;
  }
  .voucher-selector-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   DROPDOWN FLOTANTE DE AUTOCOMPLETADO DE CLIENTES (ADEL ERP)
   ========================================================================== */
.customer-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 10050;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.22), 0 4px 10px -2px rgba(15, 23, 42, 0.1);
  max-height: 290px;
  overflow-y: auto;
  padding: 0.35rem 0;
}

.customer-suggestion-item {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background-color 0.12s ease, border-left-color 0.12s ease;
  border-left: 3px solid transparent;
}

.customer-suggestion-item:last-child {
  border-bottom: none;
}

.customer-suggestion-item:hover,
.customer-suggestion-item.active {
  background-color: #f8fafc;
  border-left-color: #2563eb;
}

.sug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.doc-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.badge-ruc {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.badge-dni {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.source-tag {
  font-size: 0.68rem;
  font-weight: 700;
}

.source-sale {
  color: #059669;
}

.source-quote {
  color: #d97706;
}

.sug-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  line-height: 1.3;
}

.sug-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   ADEL PRODUCT COMBOBOX INTELIGENTE (+3,000 PRODUCTOS)
   ========================================================================== */
.adel-combobox-wrapper {
  position: relative;
  width: 100%;
}

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

.adel-combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 10050;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.25);
  max-height: 380px;
  overflow-y: auto;
}

.combobox-item {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background-color 0.1s ease, border-left-color 0.1s ease;
  border-left: 3px solid transparent;
}

.combobox-item:last-child {
  border-bottom: none;
}

.combobox-item:hover,
.combobox-item.active {
  background-color: #f8fafc;
  border-left-color: #0284c7;
}

.combobox-token-highlight {
  background: #fef08a;
  color: #854d0e;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 800;
}

