/* ==========================================
   GLOBALES
========================================== */

/* --- VARIABLES --- */
:root {
  --primary: #e52120;
  --primary-dark: #c41c1a;
  --bg: #f4f5f7;
  --text-color: #333;
  --text-secondary: #444;
  --border-color: #d4d6da;
  --input-bg: #fafafa;
  --shadow: 0 8px 20px rgba(0,0,0,0.08);
  --font-family-base: "Poppins", sans-serif;
  --padding-x-main: 35px;
  --light-gray: #eeeeee;
  --border-color-dark: #dadada;
  --color-danger: #d32f2f;
  --color-danger-dark: #c82333;
}


/* --- RESETEO BÁSICO Y ESTILOS GLOBALES --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
}

html, body {
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
}

body:has(.login-card) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  background: var(--bg);
}

h1 {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-color);
}

h2 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-color);
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-color);
}

h4 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-color);
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

footer {
    text-align: center;
    padding: 12px;
    font-size: 12px;
    color: #666;
    margin-top: auto;
}

/* --- AJUSTES DE NAVEGADOR --- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #fafafa inset !important;
    box-shadow: 0 0 0 30px #fafafa inset !important;
    -webkit-text-fill-color: var(--text-color) !important;
    color: var(--text-color) !important;
}


/* --- BOTONES --- */
.btn {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  transition: background 0.25s, opacity 0.25s;
}

.btn:hover:enabled {
  background: var(--primary-dark);
}

.btn:disabled {
  background: #bdbdbd;
  color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-primary { background: var(--primary); }
.btn-primary:hover:enabled { background: var(--primary-dark); }

.btn-success { background-color: var(--color-success); }
.btn-success:hover:enabled { background-color: var(--color-success-dark); }

.btn-danger { background-color: var(--color-danger); }
.btn-danger:hover:enabled { background-color: var(--color-danger-dark); }

.btn-cancel {
  background: #777;
  color: #fff;
}
.btn-cancel:hover:enabled {
  background: #555;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-action {
    width: auto;
    padding: 10px 14px;
    font-weight: 500;
}

.btn-table {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    white-space: nowrap;
}


/* --- FORMULARIOS --- */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group.row {
    flex-direction: row;
    align-items: center;
}

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

.form-group.row label {
    flex-basis: 100px;
    flex-shrink: 0;
    margin-right: 10px;
    margin-bottom: 0;
    line-height: 1.2;
}

.form-group.row > div {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    transition: border-color 0.25s, background-color 0.25s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

.form-control-sm {
    padding: 8px 12px;
    font-size: 12px;
}

.form-control.disabled,
.form-control[readonly],
.form-control[disabled] {
    background-color: var(--light-gray);
    color: var(--text-color-disabled);
    border: 1px solid var(--border-color-dark);
    cursor: not-allowed;
    opacity: 1;
}

.form-control.disabled:hover,
.form-control[readonly]:hover,
.form-control[disabled]:hover,
.form-control.disabled:focus,
.form-control[readonly]:focus,
.form-control[disabled]:focus {
    background-color: var(--light-gray);
    border-color: var(--border-color-dark);
    box-shadow: none;
    outline: none;
}

.error-message {
    color: var(--color-danger);
    font-size: 0.75em;
    margin-top: 2px;
    display: block;
}

.form-group.row .error-message {
    width: 100%;
    flex-basis: 100%;
    text-align: left;
    padding-left: 0;
}

.password-wrapper { position: relative; }

.password-wrapper input { padding-right: 35px; }

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    color: #777;
}

.toggle-password:hover { color: #333; }


/* --- GRID Y LAYOUTS --- */
.flex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}


/* --- TARJETAS --- */
.card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
}

.card-view {
    cursor: pointer;
    text-align: center;
    height: 140px;
}

.card:hover:not(.selected),
.dashboard-card-btn.active {
    background: #ffeaea;
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: none;
}

.card.selected {
    border: 2px solid var(--primary) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #ffeaea;
}


/* --- ENCABEZADO Y NAVEGACIÓN --- */
header {
  background: var(--primary);
  color: #fff;
  padding: 25px var(--padding-x-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

header .btn {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  width: auto;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

header .btn:hover {
  background: #ffeaea !important;
  color: var(--primary);
  border-color: var(--primary);
}

main {
    padding: var(--padding-x-main);
    flex-grow: 1;
}

.actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0px;
}

.actions-bar .form-control {
    width: 260px;
    margin-bottom: 0;
}
.actions-bar .btn {
    width: auto;
    margin-top: 0;
}


/* --- TABLAS --- */
.table-wrapper {
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: 15px;
  overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 275px);
    overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: 13px;
  white-space: normal;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

table th {
  background: #f1f1f1;
  font-weight: 600;
  color: var(--text-secondary);
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid #eee;
  padding: 25px 15px;
}

table tr:hover { background: #f9f9f9; }
table tr:nth-child(even) { background: #fcfcfc; }

table td.actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

table td .btn-table {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(220, 220, 220, 0.5);
    color: var(--text-secondary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
}

table td .btn-table:hover {
    background: rgba(240, 240, 240, 0.9);
    border-color: rgba(180, 180, 180, 0.7);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

table td.numeric-cell { text-align: right; }
table td.center-cell { text-align: center; }

.table-scroll-container {
    max-height: 400px; /* Altura máxima para el scroll vertical, puedes ajustarla */
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Para que el encabezado de la tabla se quede fijo en la parte superior del scroll */
.data-table thead {
    position: sticky;
    top: 0;
    background-color: #fff; /* Fondo para que las celdas no se vean a través */
    z-index: 10;
}


/* --- MODALES --- */
.modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show,
.modal.active { 
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    padding: 35px;
    max-width: 480px;
    width: 100%;
    max-height: 75vh;
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1051;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-scroll {
    overflow-y: auto;
    flex-grow: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.modal-scroll::-webkit-scrollbar {
    display: none;
}

.modal-actions {
  text-align: right;
  margin-top: 20px;
  display: flex;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.modal .data-table {
    table-layout: fixed;
}

.modal .table-responsive {
    overflow-x: hidden;
}

.swal2-container .swal-custom-large-align {
    width: 1200px !important;
    max-width: 95% !important;
    text-align: left !important;
}

/* --- SWAL --- */
.swal2-popup {
  font-family: var(--font-family-base);
  font-size: 13px;
  width: 350px;
  padding: 15px;
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.swal2-title {
  font-size: 22px !important;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0;
}

.swal2-html-container {
  font-size: 13px !important;
  color: var(--text-secondary);
  padding-bottom: 10px;
}

.swal2-styled {
  font-size: 13px !important;
  padding: 10px 14px !important;
  border-radius: 7px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.swal2-confirm {
  background-color: var(--primary) !important;
  color: #fff !important;
}

.swal2-confirm:hover {
  background-color: var(--primary-dark) !important;
}

.swal2-cancel {
  background-color: var(--light-gray) !important;
  color: var(--text-color) !important;
}

.swal2-cancel:hover {
  background-color: var(--border-color-dark) !important;
}

.swal2-container.swal2-center {
    z-index: 9999 !important;
}

.swal2-container .swal2-actions {
    margin: 0px;
}





/* Estilo general para todos los modales de resumen y historial */
.swal2-container .swal2-resumen-popup {
  font-family: 'Poppins', sans-serif !important;
  width: 570px !important;
  max-width: 90% !important;
  height: auto !important;
  padding: 25px 35px !important;
  background: #f8f9fa !important;
  border-radius: 12px !important;
  color: #333 !important;
  z-index: 99999 !important;
  font-size: 13px !important;
}

/* Ancho específico para el modal de historial */
.swal2-container.historial-modal-ancho .swal2-resumen-popup {
  width: 1000px !important;
}

/* Título del modal */
.swal2-resumen-popup .swal2-title {
  font-size: 1.5em !important;
  font-weight: 600 !important;
  color: #673e01 !important;
  border-bottom: 2px solid #673e01 !important;
  padding-bottom: 0.5em !important;
  margin: 0 !important;
}

/* Contenedor del contenido HTML con scroll */
.swal2-resumen-popup .swal2-html-container {
  text-align: left !important;
  margin: 20px 15px 15px 15px;
  padding: 0px;
  max-height: 400px;
  overflow-y: auto;
}

/* Estilo para los contenedores de tabla */
.swal2-resumen-popup .resumen-table-container {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 0;
}

/* Estilo para las tablas */
.swal2-resumen-popup .resumen-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  font-size: 13px;
  table-layout: fixed;
}

/* Celdas y encabezados de la tabla */
.swal2-resumen-popup .resumen-table th,
.swal2-resumen-popup .resumen-table td {
  border: 1px solid #e0e0e0;
  padding: 10px 12px;
  text-align: left;
}

/* Encabezados fijos de la tabla */
.swal2-resumen-popup .resumen-table th {
  background-color: #f2f2f2;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Pie de página */
.swal2-resumen-popup .resumen-footer {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 2px solid #673e01;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
}

/* Título del resumen */
.swal2-resumen-popup .detalles-pedido-title {
    font-size: 14px;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
    color: var(--text-color);
}

/* Contenedor del resumen de costos */
.swal2-resumen-popup .costos-resumen-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px 20px;
    margin-top: 15px;
}

.swal2-resumen-popup .costos-resumen-card p {
    margin: 5px 0;
    line-height: 1.5;
}

.swal2-resumen-popup .costos-resumen-card p:last-of-type {
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 10px;
}

/* Estilos para el formulario de asignación de costos */
.asignar-costo-form-container {
    padding: 15px;
}

.asignar-costo-form-container .form-group {
    margin-bottom: 20px;
}

.asignar-costo-form-container label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.asignar-costo-form-container .swal2-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: none;
    transition: border-color 0.3s;
    margin: 0px;
    height: auto;
    font-size: 13px;
}

.asignar-costo-form-container .swal2-input:focus {
    border-color: #673e01;
    outline: none;
}

























/* --- TRANSICIONES --- */
.fade-collapse {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease-in-out, max-height 0.4s ease-in-out;
    margin-bottom: 0;
}
.fade-collapse.show {
    opacity: 1;
    max-height: 800px;
    padding-bottom: 15px;
}

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



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

.login-card {
  padding: 35px 40px; 
  max-width: 400px; 
  width: 100%; 
  background-color: #fff; 
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.login-card .form-control {
    padding: 12px 14px;
}
.login-card .btn {
    margin-top: 15px;
}

.dashboard-card-btn {
  padding: 24px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 80px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  background-color: #f9f9f9;
}

nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}



/* ==========================================
   CLIENTES
========================================== */


/* --- DIRECCIONES DE ENTREGA --- */
.direccion-section {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  background-color: #f9f9f9;
  margin-top: 20px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.direccion-section .direccion-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

#direccionesContainer.direcciones-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 15px;
    padding: 0;
    margin-top: 15px;
}

.direccion-card {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    position: relative;
    font-size: 0.9rem;
    flex-basis: calc(50% - 7.5px);
    max-width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    cursor: pointer;
    text-align: left;
}

.direccion-card:hover {
    background: #ffeaea;
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: none;
}

.direccion-card.selected {
    border: 2px solid var(--primary) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #ffeaea;
}

.direccion-card.direccion-card-edit {
    border-left: 5px solid var(--primary);
    width: 100%;
    margin-bottom: 15px;
}

.direccion-card p {
    font-size: 0.8em;
    margin: 0;
    line-height: 1.2;
    color: #555;
}

.direccion-card p:first-child {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
}

.direccion-card-edit .form-group.row {
    align-items: center;
    margin-bottom: 10px;
}

.direccion-card-edit .form-group.row label {
    flex-basis: 90px;
    flex-shrink: 0;
    margin-right: 10px;
    margin-bottom: 0;
}

.direccion-card .card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.direccion-card .card-actions .btn {
    width: auto;
    padding: 10px 14px;
    font-size: 12px;
}

.direccion-card .btn-action-agregardirecciones {
    font-size: 12px;
}



/* ==========================================
   ORDENES DE PRODUCCION
========================================== */

/* --- COSTOS --- */
.cost-cards-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    font-weight: 500;
}
.cost-card {
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}
.cost-card.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-weight: 500;
}


/* ==========================================
   INVENTARIO
========================================== */

/* --- CARDS --- */
.inventarios-nav {
    grid-template-columns: repeat(3, 1fr);
}

/* --- TABLA --- */
#inventario-content .table-responsive {
    max-height: calc(100vh - 365px);
}

/* --- BOTONES TIPO DE AJUSTE ENTRADA Y SALIDA --- */
.toggle-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    overflow: hidden;
}
.toggle-btn {
    flex: 1;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s, color 0.25s;
    text-align: center;
    color: var(--text-color);
}
.toggle-btn:hover:not(.active) {
    background-color: var(--light-gray);
}
.toggle-btn.active {
    background-color: var(--primary);
    color: #fff;
    font-weight: 600;
  }



  /* ==========================================
   PEDIDOS
========================================== */

/* --- COMBOBOX Y RESULTADOS DE BUSQUEDA --- */
.cliente-combobox-wrapper,
.producto-combobox-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#resultadosClienteContainerGlobal,
#resultadosProductoContainerGlobal {
    z-index: 2000;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-top: none;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    display: none;
}

.resultados-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resultados-container li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.resultados-container li:hover {
    background-color: #f0f0f0;
}


/* --- LISTA DE PRODUCTOS DEL PEDIDO --- */
.pedido-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.pedido-item {
    display: flex;
    align-items: center;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 13px;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pedido-item-qty {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pedido-item-qty input {
    width: 84px;
    text-align: center;
    font-size: 13px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 9px;
}

.pedido-item-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 80px;
    text-align: right;
}


/* --- TOTALES --- */
.total-pedido-container {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.subtotal-info, .total-info {
    display: flex;
    flex-direction: column;
}

.total-info .label {
    font-weight: 600;
    font-size: 15px;
}

.total-info .value {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}


/* --- SECCION ICONO DE NUMERO CON PASO --- */
.modal-header-section {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.modal-step-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center; 
    justify-content: center;
}


/* --- BOTON ELIMINAR PRODUCTO --- */
.btn-eliminar-producto {
    padding: 5px 8px;
    font-size: 18px;
    border-radius: 10px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-eliminar-producto:hover {
    background-color: var(--light-gray); /* Change to a light grey color on hover */
}


/* Estilos para el modal de personalización (crear pedido) */
.swal2-container.swal2-detalles-popup .swal2-popup {
    font-family: var(--font-family-base);
    width: 450px;
    padding: 25px;
    border-radius: 12px;
    background-color: #f8f9fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.swal2-container.swal2-detalles-popup .swal2-title {
    font-size: 1.5em !important;
    font-weight: 600 !important;
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
    padding-bottom: 10px !important;
    margin-bottom: 25px !important;
}

/* Contenedor principal de los elementos de personalización */
.swal-producto-item-moderno {
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.swal-producto-item-moderno:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Título del producto dentro del modal */
.swal-producto-nombre {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* Campo de entrada de texto */
.swal2-input.producto-detalle-input {
    width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 7px !important;
    padding: 10px !important;
    font-size: 12px !important;
    color: var(--text-color) !important;
    transition: border-color 0.3s, box-shadow 0.3s;
    height: auto !important;
    margin: 0 !important;
}

.swal2-input.producto-detalle-input::placeholder {
    color: var(--text-secondary);
}

.swal2-input.producto-detalle-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.3) !important;
    outline: none !important;
}

/* Scrollbar personalizado para el contenedor de productos */
.swal2-html-container::-webkit-scrollbar {
    width: 8px;
}

.swal2-html-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.swal2-html-container::-webkit-scrollbar-thumb {
    background: var(--light-gray);
    border-radius: 10px;
}

.swal2-html-container::-webkit-scrollbar-thumb:hover {
    background: var(--border-color-dark);
}


  /* ==========================================
   ORDENES DE PRODUCCION
========================================== */

/* --- MODAL NUEVA ORDEN DE PRODUCCION (CONSOLIDADOS) --- */

.modal-wide-produccion {
    max-width: 1200px;
    width: 90%;
}

.modal-wide-produccion .modal-content {
    width: 100%;
}

.modal-body-produccion {
    display: flex;
    gap: 20px;
    padding: 20px;
    align-items: flex-start;
}

.card-summary {
    flex: 0 0 300px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

#resumen-consolidado-lista {
    flex-grow: 1;
    max-height: 400px; 
    overflow-y: auto;  
    padding-right: 5px; 
}

#resumen-consolidado-lista p {
    margin: 5px 0;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color-dark);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

#resumen-consolidado-lista p:last-child {
    border-bottom: none;
}

.table-scroll-container {
    flex-grow: 1;
    min-width: 0;
    min-height: 300px;
}

.modal-wide-produccion .data-table thead th:nth-child(1) {
    width: 50px;
}

.modal-wide-produccion .data-table thead th:nth-child(2) {
    width: 100px;
}

.modal-wide-produccion .data-table thead th:nth-child(3) {
    width: 100px;
}

.modal-wide-produccion .data-table thead th:nth-child(4) {
    width: 250px;
}

.modal-wide-produccion .data-table thead th:nth-child(5) {
    width: 100px;
}

.modal-wide-produccion .data-table thead th:nth-child(6) {
    width: auto;
}



  /* ==========================================
   OPERACIONES
========================================== */

/* --- CARDS PARA CLIENTES O TRANSPORTSTAS (MODAL FINALIZAR ENTREGA) --- */

.card-option {
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 20px;
        text-align: center;
        cursor: pointer;
        background-color: #f9f9f9;
        transition: all 0.2s ease-in-out; 
        flex: 1;
        min-width: 150px;
        font-size: 15px;
    }

    .card-option:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border-color: #007bff; 
    }

    .card-option p {
        margin: 10px 0 0 0;
        font-weight: 600;
        color: #333;
    }

    .card-option.selected {
        background-color: #e7f3ff; 
        border-color: #007bff; 
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: scale(1.03);
    }






