/* =========================
   VARIABLES GLOBALES
========================= */
:root {
  --primary: #1e40af;
  --secondary: #2563eb;
  --accent: #0D6EFD;

  --bg: #F1F5F9;
  --card: #FFFFFF;

  --text: #0F172A;
  --text-muted: #64748B;

  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #DC2626;

  --radius: 12px;
  --shadow: 0 10px 25px rgba(0,0,0,.08);

  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================
   RESET & BASE
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font);
}

body {
  background: var(--bg);
  color: var(--text);
  font-smoothing: antialiased;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================
   APP LAYOUT
========================= */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================
   HEADER
========================= */
.app-header {
  height: 64px;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 50%, #2563eb 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between; 
  padding: 0 24px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25), 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

.app-user-container {
  position: relative;
  cursor: pointer;
}

.app-user {
  font-size: 14px;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-user:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.app-user-container:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.user-dropdown .dropdown-item {
  width: 100%;
  padding: 14px 18px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.user-dropdown .dropdown-item:hover {
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  padding-left: 22px;
  color: var(--accent);
}

.user-dropdown .dropdown-item:active {
  background: #e2e8f0;
  transform: scale(0.98);
}

.app-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================
   CARD
========================= */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* =========================
   INPUTS
========================= */
input, select, textarea {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
}

/* =========================
   BUTTONS
========================= */
.btn {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #0b5ed7;
}

/* =========================
   UTILITIES
========================= */
/*.text-center {
  text-align: center;
}*/


.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }

/* =========================
   LOGIN LAYOUT
========================= */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 24px;
}



 /* =========================
   SIDEBAR LAYOUT
========================= */

.app-body {
  display: flex;
  min-height: calc(100vh - 64px);
  position: relative;
}

.sidebar {
  width: 260px;
  min-width: 260px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid #e5e7eb;
  padding: 16px;
  overflow-y: auto;
}

.menu-group {
  margin-bottom: 20px;
}

.menu-group h4 {
  margin: 10px 0;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.menu-group button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
}

.menu-group button:hover {
  background: var(--bg);
}

/* CONTENT */
.content {
  flex: 1;
  padding: 32px;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  min-height: calc(100vh - 64px);
  position: relative;
}

.content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

.content h2 {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.content p {
  font-size: 16px;
  color: #64748B;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}
/* SIDEBAR */
.sidebar {
  width: 260px;
  min-width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0f172a 0%, #1e40af 40%, #2563eb 100%);
  color: #fff;
  padding: 20px 12px;
  box-shadow: 2px 0 20px rgba(37, 99, 235, 0.2);
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
  pointer-events: none;
}

/* MENU GROUP */
.menu-group {
  margin-bottom: 12px;
  position: relative;
}

.menu-title {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  overflow: hidden;
}

.menu-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.menu-title::after {
  content: "▸";
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 12px;
  opacity: 0.6;
}

.menu-group:hover .menu-title {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  padding-left: 20px;
}

.menu-group:hover .menu-title::before {
  transform: scaleY(1);
}

.menu-group:hover .menu-title::after {
  transform: rotate(90deg);
  opacity: 1;
}

/* SUBMENU */
.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 16px;
  margin-top: 4px;
}

.menu-group:hover .submenu {
  max-height: 500px;
}

/* SUBMENU BUTTONS */
.submenu button {
  width: 100%;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: none;
  padding: 10px 16px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: 2px;
}

.submenu button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.submenu button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding-left: 24px;
  transform: translateX(4px);
}

.submenu button:hover::before {
  height: 60%;
}

.menu-group.open .submenu {
  max-height: 500px;
}

.menu-group.open .menu-title::after {
  transform: rotate(90deg);
  opacity: 1;
}
/* =========================
   FILTROS DE VENTAS
========================= */

.filters-grid {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.filters-grid > div {
  min-width: 160px;
}

.filter-grow {
  flex: 1;
}

/* HEADER ACTIONS */
.header-actions {
  display: flex;
  gap: 10px;
}

/* Ajuste inputs date */
.filters-grid input[type="date"] {
  max-width: 180px;
}
/* =========================
   TABLAS RESPONSIVE UNIFORMES
========================= */

.table-fixed {
  width: 100%;
  table-layout: fixed;
}

/* Distribución de columnas */
.table-fixed th:nth-child(1),
.table-fixed td:nth-child(1) { width: 15%; } /* Fecha */

.table-fixed th:nth-child(2),
.table-fixed td:nth-child(2) { width: 15%; } /* Documento */

.table-fixed th:nth-child(3),
.table-fixed td:nth-child(3) { width: 30%; } /* Cliente */

.table-fixed th:nth-child(4),
.table-fixed td:nth-child(4) { width: 15%; } /* Total */

.table-fixed th:nth-child(5),
.table-fixed td:nth-child(5) { width: 15%; } /* Estado */

.table-fixed th:nth-child(6),
.table-fixed td:nth-child(6) {
  width: 10%;
  text-align: center;
} /* Acciones */

/* Órdenes de compra (buyorders): columna Acciones con varios icon-btn */
.buys-module .table-buyorders.table-fixed th:nth-child(1),
.buys-module .table-buyorders.table-fixed td:nth-child(1) {
  width: 12%;
}
.buys-module .table-buyorders.table-fixed th:nth-child(2),
.buys-module .table-buyorders.table-fixed td:nth-child(2) {
  width: 13%;
}
.buys-module .table-buyorders.table-fixed th:nth-child(3),
.buys-module .table-buyorders.table-fixed td:nth-child(3) {
  width: 26%;
}
.buys-module .table-buyorders.table-fixed th:nth-child(4),
.buys-module .table-buyorders.table-fixed td:nth-child(4) {
  width: 13%;
}
.buys-module .table-buyorders.table-fixed th:nth-child(5),
.buys-module .table-buyorders.table-fixed td:nth-child(5) {
  width: 11%;
}
.buys-module .table-buyorders.table-fixed th:nth-child(6),
.buys-module .table-buyorders.table-fixed td:nth-child(6) {
  width: 25%;
  min-width: 220px;
  text-align: center;
}
.buys-module .table-buyorders tbody td:nth-child(6) {
  overflow: visible;
  text-overflow: clip;
}

.card {
  overflow-x: auto;
}
/* =========================
   TABLAS – HEADERS CLAROS
========================= */

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-fixed {
  table-layout: auto;
}

/* HEADERS */
.table thead th {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 13px;
  color: #475569;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  border-right: 1px solid #E2E8F0;
}

/* quitar borde derecho del último */
.table thead th:last-child {
  border-right: none;
}

/* CELDAS */
.table tbody td {
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid #E2E8F0;
  border-right: 1px solid #F1F5F9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table tbody td:last-child {
  border-right: none;
}

/* DISTRIBUCIÓN DE COLUMNAS */

/* sales */
.table-sales th:nth-child(1),
.table-sales td:nth-child(1) { width: 14%; }

.table-sales th:nth-child(2),
.table-sales td:nth-child(2) { width: 16%; }

.table-sales th:nth-child(3),
.table-sales td:nth-child(3) { width: 30%; }

.table-sales th:nth-child(4),
.table-sales td:nth-child(4) { width: 14%; }

.table-sales th:nth-child(5),
.table-sales td:nth-child(5) { width: 14%; }

.table-sales th:nth-child(6),
.table-sales td:nth-child(6) {
  width: 12%;
  text-align: center;
}
/* orders */
.table-orders th:nth-child(1),
.table-orders td:nth-child(1) { width: 12%; }

.table-orders th:nth-child(2),
.table-orders td:nth-child(2) { width: 14%; }

.table-orders th:nth-child(3),
.table-orders td:nth-child(3) { width: 20%; }

.table-orders th:nth-child(4),
.table-orders td:nth-child(4) { width: 14%; }

.table-orders th:nth-child(5),
.table-orders td:nth-child(5) { width: 14%; }

.table-orders th:nth-child(6),
.table-orders td:nth-child(6) {
  width: 12%;
  text-align: center;
}

.table-orders th:nth-child(7),
.table-orders td:nth-child(7) {
  width: 14%;
  text-align: center;
}

/* Órdenes y Productos Automotor: botones de acción (mismo estilo Gestiva) */
.orders-module .actions.orders-actions,
.products-ws-module .actions.orders-actions {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
}
.orders-module .actions.orders-actions .icon-btn,
.products-ws-module .actions.orders-actions .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 42px;
  min-height: 42px;
}
.orders-module .actions.orders-actions .icon-btn svg,
.products-ws-module .actions.orders-actions .icon-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.orders-module .actions.orders-actions .icon-btn:hover,
.products-ws-module .actions.orders-actions .icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}
.orders-module .actions.orders-actions .icon-btn.btn-view,
.products-ws-module .actions.orders-actions .icon-btn.btn-view {
  background: #DBEAFE;
  color: #1E40AF;
}
.orders-module .actions.orders-actions .icon-btn.btn-edit,
.products-ws-module .actions.orders-actions .icon-btn.btn-edit {
  background: #FEF3C7;
  color: #B45309;
}
.orders-module .actions.orders-actions .icon-btn.btn-print {
  background: #F3F4F6;
  color: #374151;
}
.orders-module .actions.orders-actions .icon-btn.btn-facturar {
  background: #D1FAE5;
  color: #065F46;
}
.orders-module .actions.orders-actions .icon-btn.btn-facturar:hover {
  background: #A7F3D0;
  color: #047857;
}
.orders-module .actions.orders-actions .icon-btn.btn-danger,
.products-ws-module .actions.orders-actions .icon-btn.btn-danger {
  background: #FEE2E2;
  color: #991B1B;
}
.orders-module .header-actions .btn-lg {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 8px;
}

/* Productos Automotor: columna Acciones (2 iconos) sin recorte */
.products-ws-module #productsWSTable col:last-child {
  min-width: 118px;
}
.products-ws-module #productsWSTable tbody td:last-child {
  white-space: nowrap;
}

/* =========================
   ALINEACIÓN ESTRUCTURAL DE TABLA
========================= */

.table.table-fixed thead th:nth-child(1),
.table.table-fixed tbody td:nth-child(1),
.table.table-fixed thead th:nth-child(2),
.table.table-fixed tbody td:nth-child(2),
.table.table-fixed thead th:nth-child(3),
.table.table-fixed tbody td:nth-child(3) {
  text-align: left;
}

.table.table-fixed thead th:nth-child(4),
.table.table-fixed tbody td:nth-child(4),
.table.table-fixed thead th:nth-child(5),
.table.table-fixed tbody td:nth-child(5),
.table.table-fixed thead th:nth-child(6),
.table.table-fixed tbody td:nth-child(6) {
  text-align: center;
}


/* =========================
   ACCIONES
========================= */

.actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.icon-btn {
  border: none;
  background: #E2E8F0;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.icon-btn:hover {
  background: #CBD5E1;
}

.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.icon-btn.danger {
  background: #FEE2E2;
}

.icon-btn.danger:hover {
  background: #FECACA;
}

/* ================================
   INFORME DE RENTABILIDAD
   ================================ */

.report-profit .table-fixed th:nth-child(1),
.report-profit .table-fixed td:nth-child(1) { width: 12%; }

.report-profit .table-fixed th:nth-child(2),
.report-profit .table-fixed td:nth-child(2) { width: 22%; }

.report-profit .table-fixed th:nth-child(3),
.report-profit .table-fixed td:nth-child(3) { width: 8%; text-align: center; }

.report-profit .table-fixed th:nth-child(4),
.report-profit .table-fixed td:nth-child(4) { width: 12%; text-align: right; }

.report-profit .table-fixed th:nth-child(5),
.report-profit .table-fixed td:nth-child(5) { width: 12%; text-align: right; }

.report-profit .table-fixed th:nth-child(6),
.report-profit .table-fixed td:nth-child(6) { width: 12%; text-align: right; }

.report-profit .table-fixed th:nth-child(7),
.report-profit .table-fixed td:nth-child(7) { width: 12%; text-align: right; }

.report-profit .table-fixed th:nth-child(8),
.report-profit .table-fixed td:nth-child(8) { width: 10%; text-align: center; }


/* ===============================
   PRODUCTOS - GRID ESPECÍFICO
   =============================== */

.products-module .table-fixed {
  table-layout: fixed;
  width: 100%;
  font-size: 12px;
}

.products-module .table-fixed th,
.products-module .table-fixed td {
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* Anchos de columnas de datos: <colgroup> en products.html (4–5 columnas dinámicas + Acciones) */

/* Acciones: icon-btn como lineups; sin overflow:hidden que recorte Eliminar */
.products-module .table-fixed thead th:last-child,
.products-module .table-fixed thead th.products-col-acciones,
.products-module .table-fixed tbody td.products-actions-cell {
  width: 104px;
  min-width: 104px;
  max-width: 120px;
  overflow: visible !important;
  text-overflow: clip;
  white-space: normal;
  vertical-align: middle;
  box-sizing: border-box;
}

.products-module .products-row-actions {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.products-module .products-row-actions .icon-btn {
  flex-shrink: 0;
}

.products-module .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #E2E8F0;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 36px;
  min-height: 36px;
}

.products-module .icon-btn:hover {
  background: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.products-module .icon-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.products-module .icon-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.products-module .icon-btn.btn-view {
  background: #DBEAFE;
  color: #1E40AF;
}

.products-module .icon-btn.btn-view:hover {
  background: #BFDBFE;
  color: #1E3A8A;
}

.products-module .icon-btn.btn-edit {
  background: #EDE9FE;
  color: #5B21B6;
}

.products-module .icon-btn.btn-edit:hover {
  background: #DDD6FE;
  color: #4C1D95;
}

.prodscom-module .icon-btn.btn-edit {
  background: #EDE9FE;
  color: #5B21B6;
}

.prodscom-module .icon-btn.btn-edit:hover {
  background: #DDD6FE;
  color: #4C1D95;
}

.products-module .icon-btn.btn-danger {
  background: #FEE2E2;
  color: #991B1B;
}

.products-module .icon-btn.btn-danger:hover {
  background: #FECACA;
  color: #7F1D1D;
}

/* CHECKBOX LOOK */
.products-module input[type="checkbox"] {
  transform: scale(1.1);
  cursor: default;
}

/* Paginación productos: alineada a la izquierda */
.products-module .pagination-products.pagination-container {
  justify-content: flex-start;
}

.products-module .pagination-products .pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.products-module .pagination-products .pagination-numbers {
  display: flex;
  gap: 0.25rem;
}

.products-module .pagination-products .pagination-numbers .btn {
  min-width: 36px;
  padding: 0.4rem 0.6rem;
}

/* Ordenamiento por columnas */
.products-module .btn-sort-header {
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.products-module .btn-sort-header:hover {
  color: var(--primary, #2563eb);
}
.products-module .sort-arrow {
  font-size: 0.85em;
  opacity: 0.8;
}

/* Modal Ver Producto: fondo azul, minimalista */
.modal-producto-ver.modal-overlay {
  background: rgba(37, 99, 235, 0.25);
  align-items: center;
  justify-content: center;
}
.modal-producto-ver .modal-producto-content {
  max-width: 640px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  border: 1px solid #e5e7eb;
}
.modal-producto-ver .modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 12px 12px 0 0;
}
.modal-producto-ver .modal-body {
  padding: 1.25rem;
  max-height: 60vh;
  overflow-y: auto;
}
.modal-producto-ver .form-grid-producto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem 1rem;
}
.modal-producto-ver .form-grid-producto label {
  display: block;
  font-size: 0.8125rem;
  color: #475569;
  margin-bottom: 0.25rem;
}
.modal-producto-ver .form-grid-producto .filter-grow {
  grid-column: span 2;
}
.modal-producto-ver .modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 0 0 12px 12px;
}

/* =========================
   NUEVO PRODUCTO – formulario sin scroll horizontal
========================= */
.new-product {
  max-width: 100%;
  overflow-x: hidden;
}
.new-product .card-new-product {
  max-width: 100%;
  overflow: hidden;
}
.new-product .form-grid-new-product {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem 1.25rem;
  margin-top: 1rem;
  width: 100%;
  box-sizing: border-box;
}
.new-product .form-grid-new-product .field {
  min-width: 0;
}
.new-product .form-grid-new-product .field label {
  display: block;
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 0.35rem;
}
.new-product .form-grid-new-product .field .input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.new-product .form-grid-new-product .field-wide {
  grid-column: 1 / -1;
}
.new-product .form-grid-new-product .field-check {
  display: flex;
  align-items: center;
}
.new-product .form-grid-new-product .label-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: 0;
}
.new-product .card-actions-new-product {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* PX Textil — nuevo producto InventarioTX (secciones) */
.products-tx-new .products-tx-form-section-title {
  margin: 1.25rem 0 0;
  padding-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}
.products-tx-new .card-new-product > h4 + p + .products-tx-form-section-title {
  margin-top: 0;
}
.products-tx-new .form-grid-new-product--checks {
  margin-top: 0.5rem;
}

/* =========================
   MODAL / POPUP
========================= */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text);
}

.modal-close,
.close-button {
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.close-button:hover {
  background: #f3f4f6;
  color: var(--text);
}

.modal-close:hover {
  background: #f3f4f6;
  color: var(--text);
}

.modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Observaciones Grid */
.observaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.observacion-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.observacion-item:hover {
  background: #f8fafc;
  border-color: var(--accent);
}

.observacion-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
}

.observacion-item input[type="checkbox"]:checked + span {
  font-weight: 600;
  color: var(--accent);
}

.observacion-item input[type="checkbox"]:checked ~ span {
  font-weight: 600;
  color: var(--accent);
}

.observacion-item span {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

/* Estilos para el input "Otro" en observaciones */
.observacion-item .obs-input-otro {
  flex: 1;
  margin-left: 8px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
  min-width: 150px;
}

.observacion-item .obs-input-otro:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.observacion-item .obs-input-otro:not([style*="display: none"]) {
  display: block !important;
}

/* Responsive para modal */
@media (max-width: 768px) {
  .modal-content {
    max-width: 100%;
    margin: 10px;
    max-height: 95vh;
  }
  
  .observaciones-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
}

/* =========================
   RESPONSIVE - SMARTPHONES
========================= */

@media (max-width: 768px) {
  /* =========================
     LAYOUT GENERAL
  ========================= */
  
  .app-body {
    flex-direction: column;
  }
  
  /* =========================
     HEADER
  ========================= */
  
  .app-header {
    padding: 0 12px;
    height: 50px;
  }
  
  .app-title {
    font-size: 16px;
  }
  
  .app-user {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  /* =========================
     SIDEBAR - MÓVIL
  ========================= */
  
  .sidebar {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
  }
  
  /* Sidebar abierto: fijo y encima del overlay para que los botones sean clicables */
  .sidebar.mobile-open {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 50px);
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  }
  
  /* Botón hamburguesa para abrir sidebar */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 8px;
    left: 12px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
  }
  
  .mobile-menu-toggle:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  }
  
  .mobile-menu-toggle:active {
    transform: scale(0.95);
  }
  
  .mobile-menu-toggle {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    left: max(12px, env(safe-area-inset-left));
    top: max(8px, env(safe-area-inset-top));
  }
  
  /* Overlay cuando sidebar está abierto (debajo del sidebar, z-index 999) */
  .sidebar-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  /* Evitar scroll del body cuando el menú está abierto */
  body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
  
  /* En móvil los submenús se muestran siempre (no hay hover) */
  .sidebar.mobile-open .submenu {
    max-height: 600px;
    overflow: visible;
  }
  
  /* Áreas táctiles más grandes para menú en móvil */
  .sidebar.mobile-open .menu-group button,
  .sidebar.mobile-open .submenu button {
    min-height: 48px;
    padding: 14px 16px;
    font-size: 15px;
    touch-action: manipulation;
  }
  
  /* =========================
     CONTENT
  ========================= */
  
  /* Espacio para el botón hamburguesa y mejor lectura en vertical */
  .content {
    padding: 16px 16px 24px 64px;
    width: 100%;
    min-height: calc(100vh - 50px);
  }
  
  .content h2 {
    font-size: 24px;
  }
  
  .content p {
    font-size: 15px;
  }
  
  /* =========================
     CARDS
  ========================= */
  
  .card {
    padding: 16px;
    border-radius: 8px;
  }
  
  /* =========================
     FILTROS - MÓVIL
  ========================= */
  
  .filters-grid {
    flex-direction: column;
    gap: 12px;
  }
  
  .filters-grid > div {
    min-width: 100%;
    width: 100%;
  }
  
  .filters-grid input[type="date"] {
    max-width: 100%;
  }
  
  /* =========================
     HEADER ACTIONS - MÓVIL
  ========================= */
  
  .module-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .header-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .header-actions .btn {
    width: 100%;
    margin-bottom: 8px;
  }
  
  /* =========================
     TABLAS - MÓVIL (CARD VIEW)
  ========================= */
  
  .table-responsive {
    overflow-x: visible;
  }
  
  .table {
    display: block;
    width: 100%;
  }
  
  .table thead {
    display: none;
  }
  
  .table tbody {
    display: block;
  }
  
  .table tbody tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  
  .table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    text-align: left !important;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  
  .table tbody td:last-child {
    border-bottom: none;
  }
  
  .table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    margin-right: 12px;
    flex-shrink: 0;
  }
  
  .table tbody td:last-child::before {
    display: none;
  }
  
  /* Acciones en móvil */
  .table tbody td:last-child {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .table tbody td:last-child .actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* =========================
     BOTONES - MÓVIL
  ========================= */
  
  .btn {
    padding: 14px 16px;
    font-size: 16px;
    min-height: 44px; /* Tamaño mínimo para touch */
    touch-action: manipulation;
  }
  
  .icon-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    font-size: 18px;
  }
  
  /* =========================
     INPUTS - MÓVIL
  ========================= */
  
  input, select, textarea {
    padding: 12px;
    font-size: 16px; /* Evita zoom en iOS */
    min-height: 44px;
    touch-action: manipulation;
  }
  
  /* =========================
     PAGINACIÓN - MÓVIL
  ========================= */
  
  .pagination-container {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .pagination-controls {
    flex-direction: column;
    width: 100%;
  }
  
  .pagination-controls .btn {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .pagination-numbers {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 100%;
  }
  
  .pagination-numbers button {
    width: 100%;
  }
  
  /* =========================
     MODULE HEADER - MÓVIL
  ========================= */
  
  .module-header h2 {
    font-size: 20px;
  }
  
  /* =========================
     LOGIN - MÓVIL
  ========================= */
  
  .login-card {
    margin: 16px;
    padding: 20px;
  }
  
  /* =========================
     MENU GROUP - MÓVIL
  ========================= */
  
  .menu-group {
    margin-bottom: 12px;
  }
  
  .menu-title {
    padding: 10px;
    font-size: 14px;
  }
  
  .submenu button {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* =========================
   TABLET (768px - 1024px)
========================= */

@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
  }
  
  .content {
    padding: 16px;
  }
  
  .filters-grid {
    flex-wrap: wrap;
  }
  
  .filters-grid > div {
    min-width: calc(50% - 8px);
  }
}

/* =========================
   UTILIDADES MÓVIL
========================= */

.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
}

/* Ocultar botón hamburguesa en desktop */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .sidebar-overlay {
    display: none !important;
  }
}

/* =========================
   ESTILOS PARA COMANDAS (COMM)
========================= */

/* Header con botones centrados */
.comm-module .comm-header-buttons {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.comm-module .comm-header-buttons h2 {
  position: absolute;
  left: 0;
}
.comm-module .comm-header-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.comm-module .comm-header-actions .btn-actualizar {
  background-color: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}
.comm-module .comm-header-actions .btn-actualizar:hover {
  background-color: #1D4ED8;
  color: #FFFFFF;
  border-color: #1D4ED8;
}
.comm-module .comm-header-actions .btn-buscar {
  background-color: transparent;
  color: inherit;
  border-color: #d1d5db;
}
.comm-module .comm-header-actions .btn-buscar:hover {
  background-color: #f3f4f6;
}

/* Badges de estado para comandas */
/* Aumentar tamaño de fuente del grid de comandas */
.comm-module .table thead th {
  font-size: 18px; /* Aumentado de 13px a 18px (+5 puntos) */
}

.comm-module .table tbody td {
  font-size: 19px; /* Aumentado de 14px a 19px (+5 puntos) */
}

/* Columna Mesa/Dirección: ancho ~30% menor que el resto, texto con wrap y alto dinámico */
.comm-module .table th.col-mesa-dir,
.comm-module .table td.col-mesa-dir {
  width: 10%;
  max-width: 10%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  vertical-align: top;
}

.comm-module .badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comm-module .badge-open {
  background-color: #FCD34D; /* Amarillo */
  color: #92400E; /* Texto oscuro para contraste */
  border: 1px solid #FBBF24;
}

.comm-module .badge-closed {
  background-color: #10B981; /* Verde */
  color: #FFFFFF; /* Texto blanco */
  border: 1px solid #059669;
}

.comm-module .badge-printed {
  background-color: #6366F1; /* Índigo */
  color: #FFFFFF;
  border: 1px solid #4F46E5;
}

/* Estado IMPRESA fuera del módulo comandas (ej. modal en pedidos) */
.badge-printed {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  background-color: #6366f1;
  color: #ffffff;
}

/* Mejora de botones de acciones en comandas */
.comm-module .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #E2E8F0;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 36px;
  min-height: 36px;
}

.comm-module .icon-btn:hover {
  background: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comm-module .icon-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.comm-module .icon-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* Estilos específicos para cada tipo de botón */
.comm-module .icon-btn.btn-view {
  background: #DBEAFE;
  color: #1E40AF;
}

.comm-module .icon-btn.btn-view:hover {
  background: #BFDBFE;
  color: #1E3A8A;
}

.comm-module .icon-btn.btn-print {
  background: #F3F4F6;
  color: #374151;
}

.comm-module .icon-btn.btn-print:hover {
  background: #E5E7EB;
  color: #1F2937;
}

.comm-module .icon-btn.btn-check {
  background: #D1FAE5;
  color: #065F46;
}

.comm-module .icon-btn.btn-check:hover {
  background: #A7F3D0;
  color: #047857;
}

/* Estilos para botones con SVG en lineups (similar a comm) */
.lineups-module .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #E2E8F0;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 36px;
  min-height: 36px;
}

.lineups-module .icon-btn:hover {
  background: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lineups-module .icon-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.lineups-module .icon-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* Estilos específicos para cada tipo de botón en lineups */
.lineups-module .icon-btn.btn-view {
  background: #DBEAFE;
  color: #1E40AF;
}

.lineups-module .icon-btn.btn-view:hover {
  background: #BFDBFE;
  color: #1E3A8A;
}

.lineups-module .icon-btn.btn-comandas {
  background: #FEF3C7;
  color: #92400E;
}

.lineups-module .icon-btn.btn-comandas:hover {
  background: #FDE68A;
  color: #78350F;
}

.lineups-module .icon-btn.btn-print {
  background: #F3F4F6;
  color: #374151;
}

.lineups-module .icon-btn.btn-print:hover {
  background: #E5E7EB;
  color: #1F2937;
}

.lineups-module .icon-btn.btn-check {
  background: #D1FAE5;
  color: #065F46;
}

.lineups-module .icon-btn.btn-check:hover {
  background: #A7F3D0;
  color: #047857;
}

.lineups-module .icon-btn.btn-danger {
  background: #FEE2E2;
  color: #991B1B;
}

.lineups-module .icon-btn.btn-danger:hover {
  background: #FECACA;
  color: #7F1D1D;
}

/* Estilos botones de acciones en sales (mismo diseño que lineups) */
.sales-module .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #E2E8F0;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 36px;
  min-height: 36px;
}

.sales-module .icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sales-module .icon-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.sales-module .icon-btn.btn-view {
  background: #DBEAFE;
  color: #1E40AF;
}

.sales-module .icon-btn.btn-view:hover {
  background: #BFDBFE;
  color: #1E3A8A;
}

.sales-module .icon-btn.btn-print {
  background: #F3F4F6;
  color: #374151;
}

.sales-module .icon-btn.btn-print:hover {
  background: #E5E7EB;
  color: #1F2937;
}

.sales-module .icon-btn.btn-send {
  background: #D1FAE5;
  color: #065F46;
}

.sales-module .icon-btn.btn-send:hover {
  background: #A7F3D0;
  color: #047857;
}

.sales-module .icon-btn.btn-danger {
  background: #FEE2E2;
  color: #991B1B;
}

.sales-module .icon-btn.btn-danger:hover {
  background: #FECACA;
  color: #7F1D1D;
}

/* Responsive para botones en móvil */
@media (max-width: 768px) {
  .lineups-module .icon-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }
  
  .lineups-module .icon-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .sales-module .icon-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }
  
  .sales-module .icon-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Modal para detalle de comanda */
.comm-module .comanda-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.comm-module .comanda-modal-content {
  background-color: #FFFFFF;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.comm-module .comanda-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #1F2937;
}

.comm-module .comanda-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #6B7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.comm-module .comanda-modal-close:hover {
  background: #F3F4F6;
  color: #1F2937;
}

.comm-module .comanda-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.comm-module .comanda-modal-loading {
  padding: 40px;
  text-align: center;
  color: #6B7280;
}

.comm-module .comanda-modal-footer {
  padding: 20px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Estilos del detalle de comanda */
.comm-module .comanda-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.comm-module .comanda-header-info h3 {
  margin: 0 0 16px 0;
  font-size: 1.25rem;
  color: #1F2937;
  font-weight: 600;
}

.comm-module .comanda-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.comm-module .comanda-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comm-module .comanda-info-label {
  font-size: 0.75rem;
  color: #6B7280;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.comm-module .comanda-info-value {
  font-size: 0.875rem;
  color: #1F2937;
  font-weight: 500;
}

.comm-module .comanda-detail-mesa-value {
  font-size: calc(0.875rem + 3pt);
}

.comm-module .comanda-products-section {
  border-top: 1px solid #E2E8F0;
  padding-top: 20px;
}

.comm-module .comanda-products-section h4 {
  margin: 0 0 16px 0;
  font-size: 1rem;
  color: #374151;
  font-weight: 600;
}

.comm-module .comanda-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comm-module .comanda-product-item {
  padding: 12px;
  background: #F9FAFB;
  border-radius: 8px;
  border-left: 3px solid #3B82F6;
}

.comm-module .comanda-product-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comm-module .comanda-product-qty {
  background: #3B82F6;
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 1.5rem;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.comm-module .comanda-product-name {
  font-size: 1.5rem;
  font-weight: 500;
  color: #1F2937;
  flex: 1;
}

.comm-module .comanda-obs {
  margin-top: 8px;
  padding-left: 40px;
  font-size: 1.5rem;
  color: #6B7280;
  font-style: italic;
  font-weight: bold;
  line-height: 1.5;
}

/* Indicador visual de comanda modificada */
.comm-module tr.comm-row-modified {
  background-color: #fff1a8;
}

.comm-module tr.comm-row-modified td {
  background-color: #fff1a8;
}

/* Item eliminado/tachado en detalle de comanda */
.comm-module .comanda-product-item.comanda-product-deleted {
  opacity: 0.72;
  text-decoration: line-through;
  border-left-color: #ef4444;
  background: #fef2f2;
}

/* Item eliminado/tachado en edición de pedido */
tr.lineup-item-deleted {
  opacity: 0.72;
}

tr.lineup-item-deleted td {
  text-decoration: line-through;
  background: #fef2f2;
}

/* Responsive para botones en móvil */
@media (max-width: 768px) {
  .comm-module .icon-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }
  
  .comm-module .icon-btn svg {
    width: 18px;
    height: 18px;
  }
  
  /* Tooltips más grandes en móvil */
  .comm-module .tooltip-text {
    font-size: 0.875rem;
    padding: 8px 12px;
  }
  
  /* Modal responsive */
  .comm-module .comanda-modal {
    padding: 10px;
  }
  
  .comm-module .comanda-modal-content {
    max-height: 95vh;
  }
  
  .comm-module .comanda-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .comm-module .comanda-modal-header,
  .comm-module .comanda-modal-body,
  .comm-module .comanda-modal-footer {
    padding: 16px;
  }
}