/* ============================================================
   Mix Compras – Estilos personalizados Laboratorios Anteii
   Complementa Tailwind CSS CDN
   ============================================================ */

/* ── Variables de marca ──────────────────────────────────── */
:root {
  --color-anteii:        #E8520A;
  --color-anteii-dark:   #c44208;
  --color-anteii-light:  #fef0e8;
  --color-text:          #3D3D3D;
  --color-sidebar-bg:    #1a1f2e;
  --color-sidebar-hover: #2d3548;
  --color-sidebar-active:#E8520A;
  --sidebar-width:       256px;
  --sidebar-collapsed:   64px;
}

/* ── Reset y base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--color-text);
  background: #f3f4f6;
  font-size: 14px;
  line-height: 1.6;
}

/* ── Layout principal ────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s ease;
  display: flex;
  flex-direction: column;
}

.main-content.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed);
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: var(--color-sidebar-bg);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 70px;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-anteii);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  color: white;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-logo-text small {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  padding: 12px 20px 4px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar.collapsed .nav-section-title { opacity: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  position: relative;
  border-radius: 0;
}

.nav-item:hover {
  background: var(--color-sidebar-hover);
  color: white;
}

.nav-item.active {
  background: rgba(232, 82, 10, 0.2);
  color: var(--color-anteii);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-anteii);
  border-radius: 0 2px 2px 0;
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item .nav-label {
  white-space: nowrap;
  overflow: hidden;
  font-size: 13.5px;
  transition: opacity 0.2s;
}

.sidebar.collapsed .nav-label { opacity: 0; width: 0; }

/* Tooltip al colapsar */
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-toggle {
  position: absolute;
  right: -12px;
  top: 80px;
  width: 24px;
  height: 24px;
  background: var(--color-anteii);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sidebar-toggle:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
/* La flecha apunta a la izquierda para colapsar; al estar colapsado gira y apunta
   a la derecha para indicar "expandir". */
.sidebar-toggle svg {
  transition: transform 0.3s ease;
}
.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Page content ────────────────────────────────────────── */
.page-content {
  padding: 24px;
  flex: 1;
}

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

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}

.page-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.card-body {
  padding: 20px;
}

/* ── Stat cards (dashboard) ──────────────────────────────── */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 4px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card.orange { border-left-color: var(--color-anteii); }
.stat-card.green  { border-left-color: #10b981; }
.stat-card.yellow { border-left-color: #f59e0b; }
.stat-card.red    { border-left-color: #ef4444; }
.stat-card.blue   { border-left-color: #3b82f6; }
.stat-card.purple { border-left-color: #8b5cf6; }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.orange { background: #fef0e8; color: var(--color-anteii); }
.stat-icon.green  { background: #d1fae5; color: #059669; }
.stat-icon.yellow { background: #fef3c7; color: #d97706; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }
.stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* ── Botones ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-anteii);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn-primary:hover { background: var(--color-anteii-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  color: var(--color-text);
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-secondary:hover { border-color: var(--color-anteii); color: var(--color-anteii); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-danger:hover { background: #dc2626; }

.btn-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-success:hover { background: #059669; }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 6px; }

/* ── Formularios ─────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-label .required { color: #ef4444; margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--color-text);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-anteii);
  box-shadow: 0 0 0 3px rgba(232,82,10,0.1);
}

.form-input.error,
.form-select.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.form-error { font-size: 12px; color: #ef4444; margin-top: 4px; }
.form-hint  { font-size: 12px; color: #9ca3af; margin-top: 4px; }

.form-textarea { resize: vertical; min-height: 80px; }

/* Grid de formularios */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

@media (max-width: 640px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ── Tablas ───────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 12.5px;
}

.data-table thead th {
  background: #f9fafb;
  padding: 7px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}

.data-table tbody tr:hover { background: #fafafa; }
.data-table tbody tr:last-child { border-bottom: none; }

.data-table tbody td {
  padding: 7px 10px;
  color: var(--color-text);
  vertical-align: middle;
}

/* Celdas de folio/código/números: nunca parten de línea y alinean dígitos */
.data-table td.col-folio,
.data-table th.col-folio {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* Descripciones largas: truncan con elipsis en vez de crecer sin control */
.data-table td.col-desc {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green  { background: #d1fae5; color: #065f46; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-gray   { background: #f3f4f6; color: #4b5563; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
}

.modal-box {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

.modal-box.sm  { max-width: 400px; }
.modal-box.md  { max-width: 560px; }
.modal-box.lg  { max-width: 740px; }
.modal-box.xl  { max-width: 900px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 17px; font-weight: 700; }

.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #f3f4f6; display: flex; gap: 8px; justify-content: flex-end; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ── Toast notifications ─────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  min-width: 280px;
  max-width: 360px;
  pointer-events: all;
  animation: toastIn 0.3s ease;
  backdrop-filter: blur(8px);
}

.toast-success { background: #059669; color: white; }
.toast-error   { background: #dc2626; color: white; }
.toast-warning { background: #d97706; color: white; }
.toast-info    { background: #2563eb; color: white; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Search input ────────────────────────────────────────── */
.search-box {
  position: relative;
}

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

.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

/* ── Semáforo KPI ─────────────────────────────────────────── */
.kpi-green  { background: #d1fae5; color: #065f46; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.kpi-yellow { background: #fef3c7; color: #92400e; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.kpi-red    { background: #fee2e2; color: #991b1b; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }

/* ── Print styles ────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  .card { box-shadow: none; border: 1px solid #e5e7eb; }
}

/* ── Animación de carga ───────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   PROCESO FLOW — Barra visual del flujo de trabajo
   ══════════════════════════════════════════════════════════════ */
.proceso-flow {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.proceso-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px 12px;
  position: relative;
  text-align: center;
  transition: background .2s;
  border-right: 1px solid #e5e7eb;
  min-width: 0;
}
.proceso-step:last-child { border-right: none; }

/* Flecha entre pasos */
.proceso-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid #e5e7eb;
  z-index: 2;
}

/* Icono circular */
.proceso-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  flex-shrink: 0;
  transition: all .2s;
}
.proceso-step-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .01em;
  color: #6b7280;
}
.proceso-step-sub {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 2px;
  line-height: 1.2;
}

/* Estado: pendiente (gris) */
.proceso-step.pending .proceso-step-icon {
  background: #f3f4f6;
  color: #9ca3af;
}
.proceso-step.pending .proceso-step-label { color: #9ca3af; }

/* Estado: completado (verde) */
.proceso-step.done {
  background: #f0fdf4;
}
.proceso-step.done::after { border-left-color: #f0fdf4; }
.proceso-step.done .proceso-step-icon {
  background: #dcfce7;
  color: #166534;
}
.proceso-step.done .proceso-step-label { color: #166534; }

/* Estado: activo / actual (naranja anteii) */
.proceso-step.active {
  background: #fef0e8;
}
.proceso-step.active::after { border-left-color: #fef0e8; }
.proceso-step.active .proceso-step-icon {
  background: var(--color-anteii);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(232,82,10,.2);
}
.proceso-step.active .proceso-step-label {
  color: var(--color-anteii);
  font-weight: 700;
}

/* Estado: rechazado (rojo) */
.proceso-step.rejected {
  background: #fff5f5;
}
.proceso-step.rejected::after { border-left-color: #fff5f5; }
.proceso-step.rejected .proceso-step-icon {
  background: #fee2e2;
  color: #991b1b;
}
.proceso-step.rejected .proceso-step-label { color: #991b1b; }

/* Responsive: en mobile apilar verticalmente */
@media (max-width: 640px) {
  .proceso-flow {
    flex-direction: column;
    border-radius: 10px;
  }
  .proceso-step {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 14px;
  }
  .proceso-step:last-child { border-bottom: none; }
  .proceso-step::after { display: none; }
  .proceso-step-icon { margin-bottom: 0; }
}

/* ── Contenedor de ayuda contextual ───────────────────────── */
.ayuda-card {
  border-left: 4px solid var(--color-anteii);
  background: #fef0e8;
  border-radius: 0 10px 10px 0;
  padding: 14px 16px;
  margin-bottom: 1rem;
}
.ayuda-card.ayuda-blue {
  border-left-color: #3b82f6;
  background: #eff6ff;
}
.ayuda-card.ayuda-green {
  border-left-color: #22c55e;
  background: #f0fdf4;
}
.ayuda-card.ayuda-purple {
  border-left-color: #8b5cf6;
  background: #f5f3ff;
}
.ayuda-card.ayuda-red {
  border-left-color: #ef4444;
  background: #fff5f5;
}
.ayuda-card-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ayuda-card-body {
  font-size: 12px;
  color: #374151;
  line-height: 1.6;
}
.ayuda-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ayuda-step-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #374151;
}
.ayuda-step-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-anteii);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ── Colores de texto de marca ───────────────────────────── */
.text-anteii { color: var(--color-anteii); }
.bg-anteii   { background: var(--color-anteii); }
.border-anteii { border-color: var(--color-anteii); }

/* ── Responsive mobile overlay sidebar ───────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 39;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 50;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-overlay.active {
    display: block;
  }
  .main-content {
    margin-left: 0 !important;
  }
  .page-content {
    padding: 16px;
  }
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ── Items dinámicos en formularios ──────────────────────── */
.items-table-wrapper {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.items-table th {
  background: #f9fafb;
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}

.items-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}

.items-table tr:last-child td { border-bottom: none; }

/* ── Barcode print section ────────────────────────────────── */
.barcode-print-area {
  text-align: center;
  padding: 20px;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  background: #fafafa;
}
