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

body {
    background: #f4f7fa;
    font-family: Arial, "Segoe UI", sans-serif;
    color: #212121;
    font-size: 15px;
    min-height: 100vh;
}

/* ====== Cabecera superior y layout ====== */
.dashboard-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1.5px solid #e0e6ed;
    padding: 18px 34px 14px 34px;
    font-size: 1.13em;
    font-weight: 500;
    border-radius: 12px 12px 0 0;
}
.dashboard-cabecera span {
    color: #375eda;
    font-weight: bold;
}
.boton-salir-mini {
    color: #375eda;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.17em;
    border-radius: 7px;
    padding: 4px 7px;
    transition: background 0.16s;
}
.boton-salir-mini:hover { background: #eaf2fb; }

/* ====== Contenedor principal ====== */
.centrado-contenedor {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #f4f7fa;
    padding: 38px 0 38px 0;
}
.dashboard-layout {
    width: 1850px;
    max-width: 99vw;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 28px 0 #0002;
    padding: 0 0 25px 0;
}
.dashboard-layout-admin {
    border: 2px solid #375eda11;
}

/* ====== Card ====== */
.dashboard-card {
    padding: 24px 34px 10px 34px;
}
.dashboard-card-admin {
    border: 1.5px solid #375eda14;
}

.dashboard-card h3 {
    margin-top: 0; 
    margin-bottom: 20px;
    color: #223560;
    font-size: 1.22em;
    font-weight: bold;
    text-align: center;
}

/* ====== Botones azules ====== */
.admin-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.boton-accion-admin {
    flex: 1 1 auto;
    min-width: 110px;
    text-align: center;
    background: #3976ea;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 7px 17px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.14s;
    margin-bottom: 0;
    min-height: 32px; /* ajusta al alto de los demás */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* espacio entre icono y texto si lo hay */
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease;
}
.boton-accion-admin:hover { 
  background: #2552a7;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
 }
 .boton-accion-admin:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.filtros-panel .boton-accion-admin,
.herramientas-grid .boton-accion-admin {
  transition: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ====== Inputs ====== */
input[type="text"], input[type="date"], input[type="number"] {
    border: 1.2px solid #cdd5df;
    border-radius: 6px;
    padding: 7px 8px;
    background: #fff;
    font-size: 1em;
    color: #1a222c;
    transition: border 0.15s;
    margin-bottom: 0;
}
input[type="text"]:focus, input[type="date"]:focus, input[type="number"]:focus {
    border-color: #3976ea;
    outline: none;
}
#busqueda {
  flex: 1 1 auto;
  min-width: 500px;
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
}

/* ====== Zona superior ====== */
.zona-superior {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.zona-superior-izquierda {
    display: flex;
    align-items: center;
    gap: 13px;
}

/* ====== Tabla ====== */
.tabla-responsive {
  width: 100%;
  overflow-x: auto;       /* scroll horizontal automático */
  overflow-y: hidden;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch; /* scroll suave en móviles */
}

.tabla-responsive table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.97em;
}

#tabla-articulos-main {
  min-width: 1200px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.97em;
}
th, td {
    border-bottom: 1px solid #e2e8f0;
    padding: 7px 9px;
    text-align: left;
    vertical-align: middle;
    background: #fff;
    font-size: 1em;
    transition: background 0.11s;
}
th {
    background: #eaf2fb;
    color: #223560;
    font-weight: 600;
}
tr:last-child td { border-bottom: none; }
tr.estado-entregado {
    background: #e3f6e3 !important;
    color: #2b7d2b !important;
}

/* ====== Botones mini (editar, eliminar) ====== */
.acciones-iconos {
    display: flex;
    justify-content: center;
    align-items: center !important;
}
.btn-mini-icon {
    background: #3976ea;
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 5px 7px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-mini-icon:hover { background: #2552a7; }

/* ====== Checkbox ====== */
input[type="checkbox"] {
    accent-color: #3976ea;
    width: 17px;
    height: 17px;
    border-radius: 4px;
}

/* ====== Notificación Guardado ====== */
#notificacion-guardado {
    display: none;
    background: #33b86c;
    color: #fff;
    padding: 7px 17px;
    border-radius: 10px;
    position: fixed;
    top: 38px;
    right: 32px;
    z-index: 999;
    font-size: 1.06em;
    box-shadow: 0 1px 8px #33b86c50;
    animation: fadein 0.7s;
}
@keyframes fadein {
    0% { opacity: 0; top: 0px; }
    
}

/* ====== Filtros (admin) y Herramientas ====== */
.filtros-panel {
    display: none;
    margin: 9px 0 5px 0;
    background: #f6fafd;
    border-radius: 9px;
    padding: 10px 16px 13px 16px;
    box-shadow: 0 1px 5px #264ba61a;
}
.filtros-panel.visible { display: block; }
.filtros-grid {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}
.filtro-grupo,
.herramienta-grupo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: #f9fbff;
  border: 1px solid #dbe4f5;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  min-width: 160px;
  flex: 0 0 auto;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.filtro-grupo:hover,
.herramienta-grupo:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,.08);
}

.filtro-grupo label {
  font-size: 13px;
  font-weight: 600;
  color: #375eda;
  margin-bottom: 4px;
  border-bottom: 1px solid #dbe4f5;
  padding-bottom: 2px;
}

.filtro-grupo.boton-limpiar,
.filtro-grupo:has(> .boton-limpiar-filtros) {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.herramienta-grupo .herramienta-label {
  font-size: 13px;
  font-weight: 600;
  color: #375eda;
  margin-bottom: 4px;
  border-bottom: 1px solid #dbe4f5; /* línea separadora moderna */
  padding-bottom: 3px;
}

.herramienta-label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 3px;
    font-weight: 500; /* un poco más marcado que filtros, pero no bold */
}


.filtro-grupo input[type="date"],
.filtro-grupo select {
    min-width: 120px;
}

.boton-limpiar-filtros {
    background: #fff;
    color: #3976ea;
    border: 1.1px solid #3976ea;
    padding: 5px 11px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.14s;
}
.boton-limpiar-filtros:hover {
    background: #3976ea;
    color: #fff;
}

/* ====== Chips de filtros ====== */
.resumen-filtros {
    margin-bottom: 6px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filtro-chip {
    background: #eaf2fb;
    color: #3976ea;
    padding: 4px 12px;
    border-radius: 9px;
    font-size: 0.96em;
    font-weight: 500;
    box-shadow: 0 1px 2px #b7c3ec25;
}

/* ====== Modales ====== */
.modal-reserva {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: #2a2a2a44;
    align-items: center;
    justify-content: center;
}
.modal-contenido, 

.modal-acciones {
    display: flex;
    gap: 11px;
    margin-top: 13px;
    justify-content: flex-end;
}
.btn-azul {
    background: #3976ea;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 9px 18px;
    font-size: 1em;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.12s;
}
.btn-azul:hover { background: #2552a7; }
.btn-cancelar {
    background: #f7f7f7;
    color: #232b35;
    border: 1px solid #d9e1ea;
    border-radius: 7px;
    padding: 9px 18px;
    font-size: 1em;
    cursor: pointer;
    font-weight: 400;
}
.btn-cancelar:hover { background: #eee; }

/* ====== Tabla en modal ====== */
.modal-tabla-datos {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 0 0;
    background: #f7fafc;
}
.modal-tabla-datos th, .modal-tabla-datos td {
    padding: 6px 7px;
    font-size: 0.97em;
    border-bottom: 1px solid #eaeaea;
}
.modal-tabla-datos th { background: #eaf2fb; }
.formulario-albaran-fecha-vertical {
    display: flex;
    gap: 18px;
    margin-bottom: 11px;
}
.campo-form { display: flex; flex-direction: column; gap: 2px; }

/* ====== Tooltip ====== */
.tooltip-personalizado {
    display: none;
    position: fixed;
    z-index: 1999;
    background: #262727;
    color: #fff;
    padding: 6px 11px;
    border-radius: 7px;
    font-size: 0.95em;
    box-shadow: 0 3px 14px #0005;
    max-width: 270px;
    pointer-events: none;
    transition: opacity 0.13s;
    opacity: 0.97;
}

/* ====== Otros ====== */
::-webkit-scrollbar {
    height: 7px; width: 7px; background: #e5eaf2;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb {
    background: #b6bede;
    border-radius: 5px;
}

/* ====== Login ====== */
.login-container {
    max-width: 340px;
    margin-right: auto;
    margin-left: auto;
    padding: 32px 24px 18px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px 0 #0001;
}
.login-container h2 {
    margin-bottom: 22px;
    text-align: center;
    color: #375eda;
    font-weight: bold;
    font-size: 1.19em;
}
.form-group { margin-bottom: 13px; }
label {
    display: block;
    margin-bottom: 5px;
    color: #4b5e7c;
    font-size: 0.98em;
}
input[type="submit"] {
    width: 100%;
    padding: 11px;
    background: #3976ea;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 7px;
    font-size: 1.07em;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 7px;
}
input[type="submit"]:hover { background: #2552a7; }
.login-error {
    color: #fff;
    background: #e74c3c;
    padding: 9px;
    border-radius: 8px;
    margin-bottom: 13px;
    text-align: center;
    font-size: 0.98em;
    box-shadow: 0 1px 6px #e74c3c25;
}

/* ====== Responsive ====== */
@media (max-width: 900px) {
  .zona-superior {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .admin-botones {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  #busqueda {
    min-width: 180px;
    margin-top: 6px;
    max-width: 100%;
  }
}

@media (max-width: 500px) {
  .boton-accion-admin {
    flex: 1 1 100%;
  }
}

/* Bloque Modal Reserva */
.modal-reserva-oculto {
  display: none;
}
.modal-reserva-visible {
  display: flex;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  align-items: center;
  justify-content: center;
}
.modal-reserva-contenido {
  background: #fff;
  padding: 32px 28px 20px 28px;
  border-radius: 12px;
  max-width: 360px;
  width: 98%;
  box-shadow: 0 8px 36px rgba(60,60,100,0.18);
  position: relative;
  animation: fadeInUp .23s cubic-bezier(.22,.78,.54,1.01);
}
@keyframes fadeInUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.modal-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
}
.modal-boton {
  padding: 7px 16px;
  border: none;
  border-radius: 5px;
  font-size: 15px;
  cursor: pointer;
  background: #eee;
  color: #333;
  transition: background .17s;
}
.modal-boton-principal {
  background: #2155cd;
  color: #fff;
}
.modal-boton-principal:hover { background: #183773; }
.modal-boton-sec { background: #eee; }
.modal-boton-sec:hover { background: #ddd; }
#modal-reserva-titulo {
  margin: 0 0 18px 0;
  font-size: 22px;
  font-weight: 600;
  color: #223066;
}
.input-multiline {
  width: 100%;
  border-radius: 7px;
  padding: 8px 12px;
  resize: vertical;         /* Permite que el usuario cambie el alto si quiere */
  font-family: inherit;
  font-size: 1em;
  border: 1.5px solid #d1d5db;
  box-sizing: border-box;
  background: #fafbfc;
  min-height: 36px;
  max-height: 120px;
  transition: border .18s, box-shadow .18s;
  outline: none;
}
.input-multiline:focus {
  border-color: #4a90e2;
  background: #fff;
  box-shadow: 0 0 0 2px #d2e9fd;
}

/* ADMIN - Ajuste de ancho por columna de la tabla */
#tabla-articulos-main.admin th:nth-child(1),   /* F. Entrada */
#tabla-articulos-main.admin td:nth-child(1) {
    width: 100px;
}
#tabla-articulos-main.admin th:nth-child(2),   /* Albarán */
#tabla-articulos-main.admin td:nth-child(2) {
    width: 100px;
}
#tabla-articulos-main.admin th:nth-child(3),   /* Unid. */
#tabla-articulos-main.admin td:nth-child(3) {
    width: 60px;
    text-align: center;
}
#tabla-articulos-main.admin th:nth-child(4),   /* Artículo */
#tabla-articulos-main.admin td:nth-child(4) {
    min-width: 170px;
}
#tabla-articulos-main.admin th:nth-child(5),   /* Stock */
#tabla-articulos-main.admin td:nth-child(5) {
    width: 60px;
    text-align: center;
}
#tabla-articulos-main.admin th:nth-child(6),   /* Ref. */
#tabla-articulos-main.admin td:nth-child(6) {
    width: 80px;
}
#tabla-articulos-main.admin th:nth-child(7),   /* Reservado por */
#tabla-articulos-main.admin td:nth-child(7) {
    width: 60px;
}
#tabla-articulos-main.admin th:nth-child(8),   /* F. Venta */
#tabla-articulos-main.admin td:nth-child(8) {
    width: 100px;
}
/*#tabla-articulos-main.admin th:nth-child(9),   /* Observaciones */
/*#tabla-articulos-main.admin td:nth-child(9) {
    min-width: 180px;
    max-width: 240px;
    white-space: pre-line;
    overflow-wrap: break-word;
}*/
#tabla-articulos-main.admin th:nth-child(10),  /* Dirección de entrega */
#tabla-articulos-main.admin td:nth-child(10) {
    min-width: 160px;
    max-width: 200px;
    white-space: pre-line;
}
#tabla-articulos-main.admin th:nth-child(11),  /* F. Salida */
#tabla-articulos-main.admin td:nth-child(11) {
    width: 90px;
}
#tabla-articulos-main.admin th:nth-child(12),  /* Entregado por */
#tabla-articulos-main.admin td:nth-child(12) {
    width: 60px;
}
#tabla-articulos-main.admin th:nth-child(13),  /* Checkbox */
#tabla-articulos-main.admin td:nth-child(13) {
    width: 40px;
    text-align: center;
}
#tabla-articulos-main.admin th:nth-child(14),  /* Acciones */
#tabla-articulos-main.admin td:nth-child(14) {
    width: 90px;
    text-align: center;
}
/* Modal campos grid para albarán y fecha */
.modal-nuevo-grid {
    display: flex;
    gap: 18px;
    margin-bottom: 15px;
}
.modal-campo {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Cada fila de artículo alineada */
.modal-nuevo-articulo-fila {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
    background: #f7fafd;
    padding: 9px 8px;
    border-radius: 8px;
    position: relative;
}
.modal-nuevo-articulo-fila input[type="number"] {
    width: 62px;
}
.modal-nuevo-articulo-fila input[type="text"] {
    min-width: 130px;
}
.eliminar-fila-articulo {
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 17px;
    cursor: pointer;
    margin-left: 3px;
}
.eliminar-fila-articulo:hover {
    background: #a51409;
}

.en-edicion {
    background: #fff9b1 !important;
    outline: 1.5px solid #d3b900;
}

/* Forzar alineación vertical centrada en TODAS las celdas de la tabla principal */
#tabla-articulos-main th,
#tabla-articulos-main td {
    vertical-align: middle !important;
    padding-top: 10px;
    padding-bottom: 10px;
    /*border-right: 1px solid #e2e8f0; /*borde vertical en las filas de la tabla*/
    /* Puedes ajustar el padding según tu preferencia */
}
/* Elimina el borde derecho en la última columna */
#tabla-articulos-main th:last-child,
#tabla-articulos-main td:last-child {
    border-right: none;
}

/* Si usas flexbox dentro de celdas, fuerza el centrado también: */
#tabla-articulos-main td > *,
#tabla-articulos-main th > * {
    vertical-align: middle !important;
    align-items: center !important;
}

/* Si alguna celda tiene contenido multilínea o white-space, asegúrate que no fuerza arriba */
#tabla-articulos-main td {
    white-space: normal !important; /* o elimina pre-line si no lo necesitas */
}
.btn-mini-icon.eliminar {
    background: #e94d4d;
    border: none;
    border-radius: 6px;
    padding: 5px 7px;
    cursor: pointer;
    margin-left: 4px;
    transition: background .15s, box-shadow .2s;
    box-shadow: 0 1px 3px rgba(233,77,77,0.13);
}
.btn-mini-icon.eliminar:hover {
    background: #b40000;
}
.btn-mini-icon.eliminar svg {
    fill: #fff !important;
}
/* Resaltado morado claro de fila completa */
.fila-resaltada, .fila-resaltada td {
    background-color: #e8ddfa !important; /* Morado pastel */
    transition: background 0.18s;
}

/* Para que se vea claramente que puedes clicar esas celdas */
body.cliente tr.es-mi-reserva .td-negro[data-campo="f_venta"],
body.cliente tr.es-mi-reserva .td-negro[data-campo="obs_cliente"] {
    cursor: pointer;
    transition: background 0.12s;
}

body.cliente tr.es-mi-reserva .td-negro[data-campo="f_venta"]:hover,
body.cliente tr.es-mi-reserva .td-negro[data-campo="obs_cliente"]:hover {
    background: #eaf2fb !important;
}

#tabla-articulos-main tbody td.acciones-iconos {
    border-bottom: none !important;
}

.paginacion-articulos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 18px 0 0 0;
}
.paginacion-articulos button {
    background: #eaf2fb;
    border: none;
    color: #3976ea;
    border-radius: 7px;
    padding: 6px 13px;
    font-size: 1em;
    cursor: pointer;
    margin: 0 2px;
    font-weight: 500;
    transition: background 0.12s;
}
.paginacion-articulos button.selected,
.paginacion-articulos button:hover {
    background: #3976ea;
    color: #fff;
}

.logo-corporativo-wrapper {
    width: 100vw;
    background: transparent;
    margin-bottom: -20px;
    margin-top: 10px;
    min-height: 0;
    display: flex;
    justify-content: center;
}

.logo-corporativo-centro {
    width: 1850px;
    max-width: 99vw;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.logo-corporativo-img {
    display: block;
    width: 100%;
    max-height: 145px;
    object-fit: cover;
    border-radius: 20px;  /* Esquinas redondeadas */
    margin: 0 auto;
    box-shadow: 0 3px 28px 0 #0002;
}

.btn-cambiar-logo svg {
    stroke: #3976ea;
    transition: stroke 0.13s;
}
.btn-cambiar-logo:hover svg {
    stroke: #174db7;
}
.boton-reservado-otro {
    background: #e94d4d !important;
    color: #fff !important;
    border: 1.5px solid #e94d4d !important;
    font-weight: 600;
    opacity: 0.92;
    cursor: not-allowed;
}
.th-sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
}
.th-sortable::after {
    content: '';
    display: inline-block;
    margin-left: 7px;
    vertical-align: middle;
    border: 5px solid transparent;
    border-top-color: #b2b2b2;
    border-bottom: 0;
    transition: transform 0.14s;
}
.th-sortable.th-sort-asc::after {
    border-top-color: #375eda;
    transform: rotate(180deg);
}
.th-sortable.th-sort-desc::after {
    border-top-color: #375eda;
    transform: none;
}
.th-sortable:hover {
    color: #375eda;
}
#modal-pdf-export .modal-reserva-contenido {
  max-width: 420px;
  width: 98%;
}
#modal-pdf-export label {
  font-size: 15px;
}
#pdf-campos-checkboxes label {
  min-width: 120px;
  cursor: pointer;
}

/* ====== Estado ACTIVO para botones de barra (Filtros / Herramientas) ====== */
.boton-accion-admin.activo {
    background: #eaf2fb;             /* fondo claro */
    color: #174db7;                   /* texto azul más oscuro */
    border: 1.5px solid #174db7;      /* borde azul visible */
    box-shadow: inset 0 0 0 999px #eaf2fb; /* asegura relleno homogéneo en Safari */
}

/* Mantén coherencia también en hover cuando está activo */
.boton-accion-admin.activo:hover {
    background: #dbe9ff;
    color: #163a8a;
    border-color: #163a8a;
}

/* === Estilo para <select> en modales y formularios === */
select {
    border: 1.2px solid #cdd5df;
    border-radius: 6px;
    padding: 7px 8px;
    background-color: #fff;
    font-size: 1em;
    color: #1a222c;
    transition: border 0.15s, box-shadow 0.15s;
    appearance: none; /* quita el estilo por defecto del navegador */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 8px;
    padding-right: 32px; /* espacio para la flecha */
}

select:focus {
    border-color: #3976ea;
    outline: none;
    box-shadow: 0 0 0 2px #d2e9fd;
}

#modal-historial-chat select {
    margin-bottom: 10px; /* separación con el siguiente campo */
}

/* Modal Nuevo Albarán más ancho (no afecta a los demás modales) */
.modal-nuevo-xl {
  max-width: 1000px;             /* ancho objetivo del modal */
  width: min(98vw, 1000px);      /* respeta pantallas pequeñas */
}

/* === Nuevo Albarán: hacer el campo “Artículo” más ancho y flexible === */
.modal-nuevo-articulo-fila {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap; /* por si el ancho es muy pequeño en móvil */
}

/* Unidades: ancho fijo cómodo */
.modal-nuevo-articulo-fila .input-unidades {
  width: 72px;           /* un poco más cómodo que 62px */
  min-width: 72px;
  text-align: center;
}

/* ✅ Artículo: que ocupe todo el espacio disponible */
.modal-nuevo-articulo-fila .input-articulo {
  flex: 1 1 300px;       /* base ancha, crece y encoge según espacio */
  min-width: 260px;      /* en pantallas pequeñas no se colapsa demasiado */
}

/* Que los checks no rompan la línea y se lean bien */
.modal-nuevo-articulo-fila .check-inline {
  white-space: nowrap;
}

/* Ajuste opcional: botón eliminar pegado a la derecha cuando hay espacio */
@media (min-width: 700px) {
  .modal-nuevo-articulo-fila .eliminar-fila-articulo {
    margin-left: auto;
  }
}
/* === Botón “Añadir otro artículo” (estilo pill con borde punteado) === */
.btn-add-articulo {
  margin-top: 10px;                 /* respeta el espacio que tenías */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9px;
  background: #fff;
  color: #2155cd;
  border: 1.5px dashed #9fb7f9;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .06s;
  box-shadow: 0 1px 3px rgba(33,85,205,.08);
}

.btn-add-articulo:hover {
  background: #eaf2fb;
  border-color: #2155cd;
  box-shadow: 0 2px 8px rgba(33,85,205,.12);
}

.btn-add-articulo:active {
  transform: translateY(1px);
}

.btn-add-articulo:focus {
  outline: none;
  box-shadow: 0 0 0 3px #d2e9fd;
}

/* Icono + del botón */
.btn-add-articulo svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex: 0 0 auto;
}
/* Logo encima del cuadro de login */
.logo-container {
    text-align: center;
    margin-top: 60px;
}

.logo-login {
    max-width: 300px; /* ajusta el tamaño del logo */
    height: auto;
    display: inline-block;
}

/* Estilo uniforme para todos los campos de texto y contraseña */
.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Efecto al enfocar */
.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}
/* === Badge "R:X" (Restantes) === */
.badge-restantes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1e4fa3;
  border: 1px solid #cfe2ff;
  cursor: pointer;
  margin-left: 8px;
  user-select: none;
  transition: transform .05s ease, background .2s ease, border-color .2s ease;
}
.badge-restantes:hover { background: #e6f0ff; border-color: #bcd6ff; }
.badge-restantes:active { transform: translateY(1px); }
.badge-restantes[hidden] { display: none !important; }
.badge-restantes .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8;
}
.badge-stock{
  display:inline-block;
  padding:1px 6px;
  border-radius:10px;
  background:#eef7ff;
  color:#0b5cab;
  font-weight:600;
  font-size:0.75em;
  border:1px solid rgba(11,92,171,.2);
  line-height:1.2;
}

/* Tabla de usuarios: pequeñas mejoras visuales */
#tabla-usuarios td:nth-child(1) { width: 70px; }
#tabla-usuarios td:nth-child(3) { width: 120px; }
#tabla-usuarios td:nth-child(4) {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 6px; /* espacio entre botones */
}
/* === Inputs de modales: estilo unificado === */
.modal-campo input[type="password"],
.modal-campo input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-campo input[type="password"]:focus,
.modal-campo input[type="text"]:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.15);
    outline: none;
}

/* Placeholder más suave */
.modal-campo input::placeholder {
    color: #999;
    font-size: 13px;
}
#btn-gestionar-usuarios {
    line-height: 1; /* evita que el emoji agrande el alto */
    display: flex;
    align-items: center;
    gap: 6px; /* espacio entre icono y texto */
}

#btn-gestionar-usuarios::before {
    content: "👤";
    font-size: 14px; /* más pequeño para que encaje con el texto */
    margin-right: 4px; /* separación con el texto */
}

/* === Badge de iniciales en campo Artículo ===
   Reutiliza .badge-restantes pero sin "R:" ni el punto decorativo.
   Se muestra al final del nombre del artículo solo si iniciales > 1 */
.badge-iniciales .dot {
  display: none; /* ocultar el circulito */
}

.badge-iniciales {
  margin-left: .5rem; /* separación del texto del artículo */
  padding: 2px 8px;   /* padding uniforme */
}

.articulo-texto {
  white-space: pre-wrap; /* evita cortes raros si el nombre es largo */
}
/* === Unidades clicables solo cuando hay 2 o más === */
td[data-campo="unidades"] {
  cursor: default !important;               /* nunca mano por defecto */
}



/* Si algún día hay badge dentro de Unid., que no robe el click 
   (limitado a las celdas que SÍ son clicables) */
td[data-campo="unidades"].clickable-unidades .badge-restantes {
  pointer-events: none;
}

/* === Badges solo visuales: nunca clicables === */
.badge-iniciales,
.badge-restantes {
  pointer-events: none !important;   /* no reciben clics */
  cursor: default !important;        /* no muestran mano */
  user-select: none;                 /* no se seleccionan al arrastrar */
}

/* (ya lo teníamos) Solo muestran mano las celdas de Unid. marcadas como clicables */
td[data-campo="unidades"] { cursor: default !important; }

.modal-contenido-articulos {
  width: 98vw;
  max-width: 98vw;
}

.btn-cambiar-logo {
  position: absolute;
  top: 13px;
  right: 28px;
  background: none !important;
  color: #3976ea !important;
  border: 1.5px solid #3976ea !important;
  font-size: 15px;
  cursor: pointer;
  padding: 6px 14px !important;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.82;
  z-index: 3;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  border-radius: 7px;
  font-weight: 500;
  box-shadow: none;
}

.btn-cambiar-logo:hover {
  color: #174db7 !important;
  opacity: 1;
  background: #eaf2fb !important;
  border-color: #174db7 !important;
}

td[data-campo="unidades"].clickable-unidades {
  cursor: pointer !important;
}

/* =========================
   Botón "Anular reserva" (cliente)
   ========================= */
/* === Botón RESERVAR (verde) === */
.boton-reservar {
  background-color: #28a745; /* verde */
  color: #fff;
  border: none;
  padding: 6px 10px;
  text-align: center;
  display: inline-block;
  border-radius: 7px;
  font-weight: 600;
}
.boton-reservar:hover {
  background-color: #218838;
}

/* === Botón RESERVADO (azul, con click para anular) === */

.boton-reservar.boton-reservado {
  background: #3976ea;       /* azul */
  border: 1px solid #2552a7;
  color: #fff;
  border: none;
  padding: 6px 10px;
  text-align: center;
  display: inline-block;
}

.boton-reservar.boton-reservado .btn-linea1 {
  display: block;
  font-weight: bold;
  margin-bottom: 2px; /* 🔽 espacio mínimo */
}

.boton-reservar.boton-reservado .btn-linea2 {
  display: block;
  font-size: 0.75em;
  margin-top: 0; /* quitamos margen superior extra */
}

/* === Botón RESERVADO POR OTRO (rojo, deshabilitado) === */
.boton-reservar.boton-reservado-otro {
  background-color: #dc3545; /* rojo */
  color: #fff;
  border: none;
  padding: 6px 10px;
  text-align: center;
  display: inline-block;
}
.boton-reservar.boton-reservado-otro[disabled] {
  cursor: not-allowed;
  opacity: .95;
}
.boton-reservar.boton-reservado-otro .btn-linea1 {
  display: block;
  font-weight: bold;
  margin-bottom: 2px;
}
.boton-reservar.boton-reservado-otro .btn-linea2 {
  display: block;
  font-size: 0.75em;
  margin-top: 0;
}

/* Encabezado de tabla fijo al hacer scroll */
#tabla-articulos-main thead th {
  position: sticky;
  top: 0;
  background: #f9f9f9;   /* color de fondo para que no se superponga el texto */
  z-index: 2;            /* asegura que queda encima del body */
  border-bottom: 2px solid #ccc; /* línea separadora más marcada */
}

/* Fuente más pequeña en el encabezado */
#tabla-articulos-main thead th {
  font-size: 0.88em;   /* antes era 1em */
  padding-top: 6px;
  padding-bottom: 6px;
}
#tabla-articulos-main tbody td {
  font-size: 0.92em;
  padding-top: 6px;
  padding-bottom: 6px;
}

.modal-boton-principal.danger { background:#e94d4d; }
.modal-boton-principal.danger:hover { background:#b40000; }

/* === Etiqueta "DISPONIBLE" (verde) === */
.badge-disponible{
  display:inline-block;
  padding:2px 8px;
  border-radius:9999px;
  font-weight:600;
  background:#e9f9ee;     /* verde muy claro */
  color:#1d7f3a;          /* verde texto */
  border:1px solid #bce7c9;
  line-height:1.3;
  letter-spacing:.2px;
}
.meta-counters {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-left: 8px;
}

.meta-counters .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92em;
  line-height: 1;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  user-select: none;
}

.meta-counters .pill svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: .85;
}

/* Total (siempre visible) */
.pill-total {
  background: #eef5ff;
  color: #1e4fa3;
  border-color: #cfe2ff;
}

/* Visibles (sólo si hay filtros/búsqueda) */
.pill-visible {
  background: #f2f7ee;
  color: #2b6b1f;
  border-color: #cfe8bf;
}

@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
/* MetaCounters: respetar el atributo [hidden] siempre */
.meta-counters .pill[hidden] {
  display: none !important;
}

/* Por claridad, cuando NO esté hidden mostramos como pill */
.meta-counters .pill:not([hidden]) {
  display: inline-flex;
}

/* === Estilo especial para el modal de confirmación de eliminación === */
#modal-sistema .modal-reserva-contenido {
  text-align: center;               /* centra todo el contenido */
}

#modal-sistema #ms-title {
  color: #b40000;                   /* rojo intenso */
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

#modal-sistema #ms-body {
  text-align: center;
  font-size: 1.05em;
  line-height: 1.5;
}

/* —— Modal sistema: contenido centrado y compacto —— */
#ms-body { 
  text-align: center; 
}

/* Bloque de peligro con icono + títulos */
#ms-body .modal-danger{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 6px;                /* espacio compacto entre piezas */
}

/* Icono */
#ms-body .modal-danger-icon{
  width: 44px; 
  height: 44px; 
  line-height: 0;
  margin: 4px auto 2px;    /* muy pegado al título */
}
#ms-body .modal-danger-icon svg{ 
  display:block; 
  margin:0 auto; 
}

/* “¡¡¡ATENCIÓN!!!” */
#ms-body .modal-danger-title{
  font-weight: 800;
  font-size: 1.15em;
  color: #b40000;
  letter-spacing: .3px;
  margin: 0;               /* quita huecos extra */
}

/* Párrafos del cuerpo */
#ms-body .modal-danger p{
  margin: 6px 0 0 0;       /* reduce separación vertical */
}
#ms-body .modal-danger p:first-of-type{ margin-top: 2px; }
#ms-body .modal-danger p:last-of-type{  margin-top: 10px; }

#tabla-articulos-main tbody tr:hover {
  background-color: #e8ddfa !important; /* mismo color que .fila-resaltada */
}
/* === Scroll vertical solo en el contenido de la tabla === */
/* Contenedor con scroll vertical */
.tabla-responsive {
  max-height: 70vh;       /* altura máxima visible */
  overflow-y: auto;       /* scroll vertical aquí */
  overflow-x: auto;       /* scroll horizontal si es necesario */
}

/* Encabezado fijo */
#tabla-articulos-main thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f9f9f9;
}

/* Volvemos a dejar el tbody normal (sin scroll interno) */
#tabla-articulos-main tbody {
  display: table-row-group; /* valor por defecto */
  max-height: none;
  overflow: visible;
}

/* Separadores verticales modernos en columnas */
#tabla-articulos-main th,
#tabla-articulos-main td {
  border-right: 1px solid rgba(180, 190, 210, 0.5); /* línea suave */
}

#tabla-articulos-main th:last-child,
#tabla-articulos-main td:last-child {
  border-right: none; /* quitamos el borde en la última columna */
}

/* Opcional: un toque elegante en hover de fila */
#tabla-articulos-main tbody tr:hover td {
  background: #f7faff;
}

/* Hover/cursor solo en observaciones de artículos NO reservados */
td.obs-no-reservado {
  cursor: pointer;
  transition: background 0.12s;
}
td.obs-no-reservado:hover {
  background: #eaf2fb !important;
}

.modal-obs-acciones {
  margin-top: 12px;
  display: flex;
  justify-content: space-between; /* 👉 separa IZQUIERDA y DERECHA */
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.acciones-izq {
  display: flex;
  gap: 10px; /* separación entre DISPONIBLE y Otra observación */
}

.acciones-der {
  margin-left: auto; /* fuerza que Cancelar se vaya a la derecha */
}

/* Ampliar tamaño del modal de observaciones */
.modal-reserva-contenido.modal-obs {
  max-width: 650px;   /* antes 420px */
  width: 95%;         /* se adapta en pantallas pequeñas */
  padding: 28px 32px 24px 32px; /* más aire interno */
}

.modal-reserva-contenido.modal-obs h2 {
  margin-bottom: 16px; /* más espacio bajo el título */
}

.modal-reserva-contenido.modal-obs p {
  margin-bottom: 20px; /* separación antes de los botones */
  line-height: 1.5;    /* texto más legible */
}

/* === CHAT WIDGET GLOBAL === */
#chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-height: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: Arial, sans-serif;
  z-index: 1000;
  transition: all 0.3s ease;
}
#chat-widget.chat-collapsed { height: 40px; }
#chat-widget:not(.chat-collapsed) { height: 480px; }
#chat-widget.expandido {
  width: 75vw !important;
  max-height: 75vh !important;
  height: 75vh !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  right: auto !important;
  bottom: 40px !important;
}

/* === HEADER === */
.chat-header {
  background: #375eda;
  color: #fff;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.chat-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2em;
  cursor: pointer;
}

/* === BODY === */
.chat-body {
  flex: 1;
  padding: 10px;
  overflow-y: hidden;   /* 👈 el scroll lo maneja #chat-messages */
  display: flex;
  flex-direction: column;
}

#chat-messages {
  flex: 1;              /* ocupa todo el espacio disponible */
  overflow-y: auto;     /* scroll interno */
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  height: auto;         /* elimina altura fija */
}

/* === BURBUJAS DE MENSAJES === */
.msg {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: 14px;
  position: relative;
  word-wrap: break-word;
  line-height: 1.4;
}
.msg.admin {
  align-self: flex-end;
  background: #d1e7ff;  /* azul claro */
  border-radius: 14px 14px 0 14px;
  cursor: pointer;      /* porque se puede pinchar para ver no leídos */
}
.msg.client {
  align-self: flex-start;
  background: #f0f0f0;  /* gris claro */
  border-radius: 14px 14px 14px 0;
}
.msg strong {
  display: block;
  font-size: 0.8em;
  color: #444;
  margin-bottom: 3px;
}
.msg .timestamp {
  display: block;
  font-size: 0.7em;
  color: #777;
  margin-top: 4px;
  text-align: right;
}

/* === BURBUJA SECUNDARIA (no leídos) === */
.msg-info-no-leido {
  align-self: flex-end;
  background: #fff3cd;  /* amarillo suave */
  color: #856404;
  font-size: 0.75em;
  font-style: italic;
  border-radius: 10px;
  padding: 6px 10px;
  margin-top: -2px;
  margin-bottom: 4px;
  max-width: 60%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* === FOOTER === */
.chat-footer {
  padding: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
  border-top: 1px solid #eee;
}
.chat-footer textarea {
  flex: 1;
  resize: none;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px;
}
.chat-footer button {
  background: #375eda;
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}
#emoji-btn {
  background: transparent;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
}

/* === SEPARADOR DE FECHA === */
.msg-separator {
  display: flex;
  align-items: center;
  text-align: center;
  color: #666;
  font-size: 0.8em;
  font-style: italic;
  margin: 12px 0;
}
.msg-separator::before,
.msg-separator::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ccc;
}
.msg-separator:not(:empty)::before {
  margin-right: 10px;
}
.msg-separator:not(:empty)::after {
  margin-left: 10px;
}

/* === BADGE NUEVO MENSAJE === */
.mensaje-nuevo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #e94d4d;
  color: #fff !important;   /* 🔥 fuerza texto blanco */
  font-size: 13px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  animation: pulseBadge 0.9s infinite ease-in-out;
}
.mensaje-nuevo-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.20); }
}



/* === EMOJI PICKER === */
emoji-picker {
  --emoji-size: 1.5em;
  --category-button-size: 1.6em;
  font-size: 0.9em;
  min-width: 220px !important;
  max-width: 250px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border-radius: 1em;
  overflow-x: hidden !important;
}
emoji-picker ::-webkit-scrollbar { height: 0 !important; }
emoji-picker .scroller { overflow-x: hidden !important; }
emoji-picker [part="scroller"] {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* === Modal Observaciones: ajustar textarea === */
#modal-obs-disponible textarea {
  width: 100%;              /* que ocupe todo el ancho del modal */
  min-height: 90px;         /* más alto por defecto */
  resize: vertical;         /* que el usuario pueda agrandarlo */
  margin-top: 10px;         /* separación respecto a botones de arriba */
  margin-bottom: 14px;      /* separación respecto al botón Guardar */
  padding: 8px 10px;
  font-size: 0.95em;
  border: 1.4px solid #ccc;
  border-radius: 6px;
  background: #fafafa;
  box-sizing: border-box;
}

#modal-obs-disponible textarea:focus {
  border-color: #3976ea;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px #d2e9fd;
}

.leyenda-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 18px;
}

.leyenda-badges {
    display: flex;
    gap: 25px;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e6ed;
    padding: 12px 20px;
    border-radius: 10px;
    margin: 12px 0 18px 0;
    font-size: 0.9em;
    color: #444;
}

.leyenda-badges span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 6px;
}

.badge.verde { background: #4CAF50; }   /* Disponible */
.badge.azul  { background: #2196F3; }   /* Reservas mías */
.badge.rojo  { background: #F44336; }   /* Reservas otras tiendas */



/* Caja con borde redondeado (igual que la leyenda) */
.filtro-mis-reservas{
  display:flex;
  align-items:center;
  gap:70px;                 /* separación entre check, fecha y botón */
  flex-wrap:wrap;
  background:#fff;
  border:1px solid #e0e6ed; /* mismo borde que .leyenda-badges */
  padding:12px 16px;
  border-radius:10px;
  box-shadow: 0 1px 5px #264ba61a; /* igual que tus paneles */
}

/* Ítems dentro de la caja */
.filtro-mis-reservas label{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  font-size:.98em;
  color:#223560;
}

.filtro-mis-reservas input[type="date"]{
  min-width: 160px; /* cómodo para el placeholder dd/mm/aaaa */
}

/* Botón limpiar (ya tienes esta clase definida; aquí solo ajustes de layout) */
.filtro-mis-reservas .boton-limpiar-filtros{
  margin-left: 6px;          /* pequeño aire respecto a la fecha */
  border-radius:8px;         /* para que empate con el toque redondeado */
}

/* (Opcional) llevar el botón al extremo derecho de la caja */
.filtro-mis-reservas .boton-limpiar-filtros--a-derecha{
  margin-left:auto;
}

/* Responsive: que no se amontone en pantallas estrechas */
@media (max-width: 560px){
  .filtro-mis-reservas{ gap:12px; }
}
/* Para inputs y textareas de artículo y observaciones */
input[name="articulo"],
textarea[name="obs_cliente"],
textarea[name="obs_admin"],
input[name="direccion_entrega"] {
  text-transform: uppercase;
}
.boton-accion-admin {
  text-decoration: none;   /* 🔹 quita el subrayado */
  display: inline-block;   /* 🔹 asegura que se comporte como botón */
}
/* Historial: botones alineados en fila */
.herramienta-grupo.historial .herramienta-botones {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;   /* por si la pantalla es pequeña, que bajen en varias filas */
}

/* === Modal Gestión de Usuarios: más compacto === */
#modal-usuarios .modal-reserva-contenido {
  max-width: 750px;          /* más estrecho que el albarán */
  width: 95%;
  padding: 20px 22px;        /* menos padding */
  max-height: 80vh;          /* nunca más alto que 80% pantalla */
  display: flex;
  flex-direction: column;
}
#modal-usuarios th,
#modal-usuarios td {
  padding: 6px 10px;  /* menos espacio dentro de cada celda */
}
/* === Previsualización de referencias (modal Nuevo Albarán) === */
.preview-ref {
  font-family: "Segoe UI Semibold", "Roboto Condensed", Arial, sans-serif;
  font-weight: 600;              /* negrita ligera */
  font-size: 13px;
  color: #1a3d91;                /* azul medio */
  background: #eef4ff;           /* fondo suave */
  border: 1px solid #c7d8ff;     /* borde fino */
  padding: 2px 7px 3px 7px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
  user-select: text;             /* se puede copiar */
  line-height: 1.3;
  min-width: 70px;
  letter-spacing: 0.3px;
  margin-left: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Sutil cambio al recalcular (si luego quieres animar visualmente el refresco) */
.preview-ref.actualizando {
  background: #dfeaff;
  border-color: #a7c3ff;
  transition: background 0.2s, border-color 0.2s;
}

