/*
 * Estilos propios de la app Fraschina (sobre AdminLTE 3 / Bootstrap 4).
 * Se cargan en todas las páginas desde config/adminlte.php (plugin "Fraschina").
 */

:root {
  --fr-marca: #1f4e79;
  --fr-marca-suave: #e8f0f8;
  --fr-borde: #dee2e6;
  --fr-encabezado-tabla: #f1f4f8;
  --fr-texto-suave: #6c757d;
  --fr-navbar-alto: 57px;
}

/* ---------- Marca y menú ---------- */
.brand-link .brand-text { letter-spacing: .02em; }
.brand-link .brand-text b { font-weight: 700; }
.main-sidebar .nav-sidebar .nav-link p { font-size: .95rem; }
.main-sidebar .nav-treeview .nav-link p { font-size: .9rem; }

/* ---------- Encabezados de página ---------- */
.content-header h1,
.content > .container-fluid > h1,
.content > .container > h1,
.content .container > h1:first-child {
  font-size: 1.6rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: .75rem;
}
.content-header { padding-top: 1rem; padding-bottom: .25rem; }
.card-title { font-weight: 600; }

/* ---------- Tablas ---------- */
.table { color: #212529; }
.table thead th {
  background: var(--fr-encabezado-tabla);
  border-bottom: 2px solid var(--fr-borde);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #495057;
  vertical-align: middle;
  white-space: nowrap;
}
/* Encabezado fijo al hacer scroll (debajo de la barra superior fija). Opcional: clase .table-sticky */
.table-sticky > thead > tr > th {
  position: sticky;
  top: var(--fr-navbar-alto);
  z-index: 3;
}
.table td { vertical-align: middle; }
.table-hover tbody tr:hover,
.content .table tbody tr:hover { background-color: var(--fr-marca-suave); }
.table-sm td, .table-sm th { padding: .35rem .5rem; }

/* Acciones al final de la fila: botones del mismo tamaño y alineados */
td .btn-xs, td .btn.btn-xs {
  min-width: 28px;
  height: 26px;
  padding: 0 .4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  line-height: 1;
  border-radius: .25rem;
  margin: 0 1px;
}
td form.d-inline, td form[style*="inline"] { display: inline-flex !important; }

/* ---------- Formularios ---------- */
label { font-weight: 600; color: #343a40; }
.form-control:focus { border-color: #80a8d0; box-shadow: 0 0 0 .15rem rgba(31, 78, 121, .15); }
input.form-control[type="number"] { text-align: right; }

/* ---------- Tarjetas ---------- */
.card { border-radius: .5rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04); }
.card-header { background: #fff; }

/* ---------- Paginación ---------- */
.pagination { flex-wrap: wrap; }

/* ---------- Tablero de inicio ---------- */
.inicio-saludo { font-size: 1.1rem; color: var(--fr-texto-suave); margin-bottom: 1rem; }
.inicio-tarjeta { transition: transform .1s ease-in-out, box-shadow .1s ease-in-out; }
.inicio-tarjeta:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, .12); text-decoration: none; }
.inicio-tarjeta .inner p { font-weight: 600; }
.lista-compacta li { padding: .35rem 0; border-bottom: 1px solid #f1f1f1; }
.lista-compacta li:last-child { border-bottom: 0; }

/* ---------- Reparto ---------- */
.reparto-tabla td input { border: 1px solid #ced4da; border-radius: .2rem; padding: .1rem .25rem; }
.reparto-tabla td input:focus { outline: none; border-color: #80a8d0; box-shadow: 0 0 0 .12rem rgba(31, 78, 121, .15); }
.reparto-tabla td input.factura-difiere { background: #dc3545; color: #fff; border-color: #b02a37; font-weight: 700; }
.reparto-titulo small { font-size: 1.1rem; }
.reparto-fecha { display: inline-block; background: var(--fr-marca, #1f4e79); color: #fff; font-weight: 700; font-size: 1.6rem; border-radius: .4rem; padding: .1rem .7rem; vertical-align: middle; }
.reparto-tabla { font-size: .85rem; }
.reparto-tabla th { white-space: nowrap; vertical-align: middle !important; }
.reparto-tabla td { vertical-align: middle !important; }
.reparto-tabla td.c-fantasia, .reparto-tabla td.c-razon { text-align: left; min-width: 9rem; }
.reparto-tabla td.c-fantasia a { font-weight: 600; color: var(--fr-marca, #1f4e79); }
.reparto-tabla td.c-pedido { white-space: nowrap; }
.reparto-tabla .reparto-campo { height: auto; padding: .15rem .3rem; font-size: .85rem; }
.reparto-tabla td.c-chofer .reparto-campo { width: 3rem; }
.reparto-tabla td.c-orden .reparto-campo { width: 4rem; }
.reparto-tabla td.c-ffac .reparto-campo { width: 8.5rem; }
.reparto-tabla td.c-nfac .reparto-campo { width: 6.5rem; }
.reparto-tabla td.c-ifac .reparto-campo { width: 8.5rem; }
.reparto-tabla td.c-ifac .reparto-campo { padding-right: calc(.3rem + 2px); } /* flechitas un poco separadas del borde */
/* En la computadora: campos, impresora y acciones al ancho justo; el resto del ancho queda para los nombres */
@media (min-width: 768px) {
  .reparto-tabla td.c-pedido, .reparto-tabla td.c-tipo, .reparto-tabla td.c-chofer, .reparto-tabla td.c-orden, .reparto-tabla td.c-ffac, .reparto-tabla td.c-nfac, .reparto-tabla td.c-ifac { width: 1%; }
  .reparto-tabla td.c-imp, .reparto-tabla td.c-recibo, .reparto-tabla td.c-abrir, .reparto-tabla td.c-guardar { width: 1%; white-space: nowrap; padding-left: .2rem; padding-right: .2rem; }
  /* Mismo cuadradito relleno que los botones de acción de los demás listados */
  .reparto-tabla td.c-recibo .btn, .reparto-tabla td.c-abrir .btn { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 26px; padding: 0 .4rem; border: 0; font-size: .8rem; line-height: 1; }
  .reparto-tabla th.c-angosta { width: 1%; padding-left: .2rem; padding-right: .2rem; }
}
/* Flechitas de aumentar/disminuir separadas del número (Chrome / Edge) */
.reparto-tabla input[type=number]::-webkit-inner-spin-button { margin-left: 16px; }
.popover-productos { max-width: 520px; }
.popover-productos td, .popover-productos th { white-space: nowrap; padding: .15rem .35rem; }
.popover-productos td.popover-texto { white-space: normal; min-width: 260px; }
.reparto-imprimir { background: #fff3cd !important; }
.reparto-tareas { background: #f6f9fc; }

/* ---------- Clases usadas por pantallas existentes (antes dependían de Tailwind, que no se carga) ---------- */
.text-xs { font-size: .8rem !important; }
.text-md { font-size: .95rem !important; }
.fs-xs { font-size: .75rem !important; }
.fs-sm { font-size: .875rem !important; }
.text-blue { color: #1f6fd1 !important; }
.text-orange { color: #fd7e14 !important; }
.text-red-600 { color: #dc3545 !important; }
.text-gray-900 { color: #212529 !important; }
.text-rigth { text-align: right !important; }
.bg-red { background-color: #f8d7da !important; }
.bg-yellow-300 { background-color: #fff3cd !important; }
.bg-blue-600, .bg-blue-900, .bg-green-600 { height: 1px; border: 0; opacity: .5; }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-900 { background-color: #1e3a8a; }
.bg-green-600 { background-color: #16a34a; }
.bold { font-weight: 700 !important; }

/* ---------- Impresión desde el navegador ---------- */
@media print {
  .main-sidebar, .main-header, .btn, form[method="GET"], .pagination { display: none !important; }
  .content-wrapper { margin-left: 0 !important; }
  .table thead th { position: static; }
}

/* ---------- Listados heredados (plantilla común de ~35 pantallas: barra__index, max-w-8xl...) ---------- */
/* Título fuera de tarjeta → encabezado de página */
.content .col-12 > .card-header:first-child {
  background: transparent;
  border: 0;
  padding: .25rem 0 .75rem;
}
.content .col-12 > .card-header:first-child .card-title {
  float: none;
  font-size: 1.6rem;
  font-weight: 600;
  color: #212529;
}
/* Contenedor → tarjeta */
.content .max-w-8xl { max-width: none; padding: 0 !important; }
.content .max-w-8xl > .bg-white {
  background: #fff;
  border-radius: .5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
}
.content .max-w-8xl > .bg-white > .p-2 { padding: 1rem !important; overflow-x: auto; }
.content .col-12 > .col-12 { padding: 0; }
.content .col-12 > .col-12 > .py-2 { padding-top: 0 !important; }

/* Barra de acciones: botones a la izquierda, buscador a la derecha */
.barra__index {
  display: flex !important;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-start !important;
  align-items: center;
  margin-bottom: 1rem !important;
}
.barra__index .div__buscar { margin-left: auto; }
.barra__index .div__nuevo form { margin: 0; }
.barra__index .btn { height: calc(2.25rem + 2px); }
.form__buscar { flex-wrap: nowrap; }
.form__buscar input[type="text"] {
  min-width: 260px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  margin-right: 0 !important;
}
.form__buscar input[type="submit"], .form__buscar button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
}

/* Botones de acción heredados (btn-xs / btn-2xs sin .btn) */
.btn-xs:not(.btn), .btn-2xs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 .4rem;
  border-radius: .25rem;
  border: 0;
  font-size: .8rem;
  color: #fff;
  text-decoration: none;
}
.btn-xs.btn-warning:not(.btn), .btn-2xs.btn-warning { color: #212529; }
/* Celdas de acciones con d-flex: display:flex rompe la celda de la tabla y los botones se superponen
   con la columna anterior. Se mantiene como celda y los botones en línea. */
.table td.d-flex { display: table-cell !important; white-space: nowrap; text-align: right; }
.table td.d-flex > *, .table td.d-flex > form { display: inline-block; vertical-align: middle; margin: 0 1px !important; }
/* ...pero los botones siguen siendo flex para que el ícono quede centrado en el cuadrado */
.table td.d-flex > a.btn-xs, .table td.d-flex > a.btn-2xs, .table td.d-flex > a.btn-sm,
.table td.d-flex > button { display: inline-flex !important; }
.btn-xs > i, .btn-2xs > i, td .btn-sm > i:only-child { line-height: 1; vertical-align: 0; margin: 0; }

/* ---------- Botones de los formularios (Guardar / Cancelar) ---------- */
.form-acciones { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.form-acciones .btn { margin: 0 !important; font-size: 1rem; padding: .375rem .9rem; }
.btn > i + span, .btn > i:first-child:not(:only-child) { margin-right: .3rem; }
/* Texto que solo se ve en el celular (d-md-none): en la computadora el ícono queda solo y centrado en su botón */
@media (min-width: 768px) {
  .btn > i:first-child:has(+ .d-md-none:last-child) { margin-right: 0; }
}

/* Barras de botones en pantallas angostas: que bajen de renglón en vez de salirse o pisarse */
@media (max-width: 767.98px) {
  .form-acciones .btn { flex: 1 1 auto; }
  .content form .btn + .btn, .content form .btn + a.btn, .content form a.btn + .btn { margin-top: .25rem; }
  .barra__index { flex-wrap: wrap; gap: .5rem; }
  .barra__index > * { max-width: 100%; }
  .content-header .btn, .card-header .btn { margin-top: .25rem; }
  .card-header.d-flex, .content-header .d-flex { flex-wrap: wrap; gap: .5rem; }
  .btn-group-toggle, .btn-group:not(.btn-group-vertical) { flex-wrap: wrap; }
}

/* ---------- Celular y tablet ---------- */
@media (max-width: 767.98px) {
  .content-header h1, .content .col-12 > .card-header:first-child .card-title { font-size: 1.3rem; }
  .barra__index .div__buscar { margin-left: 0; width: 100%; }
  .form__buscar input[type="text"] { min-width: 0; flex: 1; }
  .card-body, .content .max-w-8xl > .bg-white > .p-2 { padding: .75rem !important; }
  .table { font-size: .85rem; }
}

/* Columna de acciones: solo el ancho necesario, botones juntos a la derecha */
.table tr:has(> td.d-flex:last-child) > td.d-flex:last-child,
.table tr:has(> td.d-flex:last-child) > th:last-child { width: 1%; white-space: nowrap; }

/* Secciones dentro de formularios largos */
.form-seccion {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fr-marca);
  border-bottom: 1px solid var(--fr-borde);
  padding-bottom: .4rem;
  margin: 1.5rem 0 .75rem;
}
.form-seccion:first-child, form > .form-seccion:first-of-type { margin-top: 0; }
.form-seccion i { width: 1.2rem; opacity: .8; }

/* ---------- Reparto en el celular (vista chofer) ---------- */
.parada .parada-orden {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--fr-marca); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.parada .parada-items li { padding: .15rem 0; border-bottom: 1px dashed #eee; }
.parada .parada-items li:last-child { border-bottom: 0; }
.parada .card-footer .btn { min-height: 2.6rem; }
@media (max-width: 991.98px) {
  .reparto-scroll { overflow-x: auto; }
}

/* ---------- Reparto (oficina) en pantallas chicas: una tarjeta por pedido ---------- */
@media (max-width: 767.98px) {
  .reparto-titulo { font-size: 1.6rem; }
  .reparto-titulo small { display: block; font-size: .95rem; margin-top: .2rem; }
  .reparto-fecha { font-size: 1.15rem; }
  .reparto-barra { flex-direction: column; align-items: stretch !important; gap: .5rem; }
  .reparto-acciones { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; }
  .reparto-acciones .btn { margin: 0 !important; }
  .reparto-fechas { width: 100%; }
  .reparto-fechas .form-control { flex: 1; min-width: 0; width: auto !important; }
  .reparto-fechas .btn { margin: 0 0 0 .3rem !important; }

  .reparto-scroll { overflow-x: visible; }
  .reparto-tabla, .reparto-tabla tbody, .reparto-tabla tfoot { display: block; border: 0; }
  .reparto-tabla thead { display: none; }
  .reparto-tabla tbody tr {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
      "fant fant fant ped"
      "razon razon razon tipo"
      "chofer orden imp imp"
      "ffac ffac nfac nfac"
      "ifac ifac ifac ifac"
      "recibo abrir abrir guardar";
    gap: .35rem .5rem;
    background: #fff;
    border: 1px solid var(--fr-borde, #dee2e6);
    border-radius: .5rem;
    padding: .6rem .7rem;
    margin-bottom: .75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  }
  .reparto-tabla tbody td { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; background: none !important; }
  .reparto-tabla td.c-fecha, .reparto-tabla td.c-vacio { display: none; }
  .reparto-tabla td.c-fantasia { grid-area: fant; }
  .reparto-tabla td.c-fantasia a { font-size: 1.05rem; font-weight: 700; }
  .reparto-tabla td.c-pedido { grid-area: ped; text-align: right !important; color: var(--fr-marca); font-size: .85rem; white-space: nowrap; }
  .reparto-tabla td.c-razon { grid-area: razon; color: #6c757d; font-weight: 400; font-size: .85rem; }
  .reparto-tabla td.c-tipo { grid-area: tipo; text-align: right !important; color: #6c757d; font-size: .85rem; }
  .reparto-tabla td.c-chofer { grid-area: chofer; }
  .reparto-tabla td.c-orden { grid-area: orden; }
  .reparto-tabla td.c-imp { grid-area: imp; align-self: end; text-align: right !important; font-size: 1.1rem; }
  .reparto-tabla td.c-imp.reparto-imprimir { background: none !important; }
  .reparto-tabla td.c-ffac { grid-area: ffac; }
  .reparto-tabla td.c-nfac { grid-area: nfac; }
  .reparto-tabla td.c-ifac { grid-area: ifac; }
  .reparto-tabla td.c-recibo { grid-area: recibo; }
  .reparto-tabla td.c-abrir { grid-area: abrir; }
  .reparto-tabla td.c-guardar { grid-area: guardar; display: flex !important; align-items: center; justify-content: center; }
  /* Rótulo arriba de cada campo */
  .reparto-tabla td[data-label]::before {
    content: attr(data-label); display: block; font-size: .7rem; font-weight: 600;
    color: #6c757d; text-transform: uppercase; letter-spacing: .02em; margin-bottom: .1rem;
  }
  /* Campos a todo el ancho y con letra de 16px (el iPhone no hace zoom al tocarlos) */
  .reparto-tabla td input { width: 100% !important; font-size: 16px !important; padding: .3rem .4rem; text-align: left !important; }
  .reparto-tabla td.c-chofer input, .reparto-tabla td.c-orden input { text-align: center !important; }
  /* Botones de acción grandes para el dedo */
  .reparto-tabla td.c-recibo .btn, .reparto-tabla td.c-abrir .btn {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 2.6rem; margin: 0 !important;
    border: 1px solid var(--fr-borde, #dee2e6); border-radius: .4rem; background: #f8f9fa;
  }
  .reparto-tabla td .btn i.fs-xs { font-size: 1.1rem !important; }
  .reparto-tabla tfoot tr { display: flex; flex-direction: column; gap: .25rem; padding: .25rem .2rem; }
  .reparto-tabla tfoot td { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; }
  .popover-productos { max-width: calc(100vw - 16px); }
}

/* ---------- Listados en el celular: cada fila es una tarjeta (lo arma public/js/fraschina.js) ---------- */
@media (max-width: 767.98px) {
  .tabla-tarjetas, .tabla-tarjetas tbody { display: block; width: 100% !important; border: 0 !important; }
  .tabla-tarjetas thead { display: none; }
  .tabla-tarjetas tbody tr {
    display: block;
    background: #fff !important;
    border: 1px solid var(--fr-borde) !important; border-left-width: 1px;
    border-radius: .5rem;
    padding: .5rem .7rem;
    margin-bottom: .6rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  }
  .tabla-tarjetas tbody td {
    display: block; position: relative; overflow-wrap: anywhere;
    border: 0 !important; padding: .15rem 0 !important;
    text-align: left !important; white-space: normal !important; height: auto !important;
    background: none !important;
  }
  .tabla-tarjetas tbody td:empty, .tabla-tarjetas td:empty { display: none; }
  .tabla-tarjetas tbody td.celda-continua { padding-left: 40% !important; }
  .tabla-tarjetas script { display: none !important; }
  /* Rótulo a la izquierda y el dato (con todo lo que tenga adentro) en la columna de la derecha */
  .tabla-tarjetas tbody td[data-label] { padding-left: 40% !important; min-height: 1.4rem; }
  .tabla-tarjetas tbody td[data-label]::before {
    content: attr(data-label);
    position: absolute; left: 0; top: .2rem; width: 37%;
    font-size: .72rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .02em;
  }
  /* El primer dato es el título de la tarjeta */
  .tabla-tarjetas tbody td:first-child { font-weight: 700; font-size: .95rem; padding-left: 0 !important; }
  .tabla-tarjetas tbody td:first-child::before { display: none; }
  .tabla-tarjetas tbody td.celda-acciones { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; padding: .4rem 0 0 !important; }
  .tabla-tarjetas tbody td.celda-acciones::before { display: none; }
  .tabla-tarjetas tbody td.celda-acciones > *, .tabla-tarjetas tbody td.celda-acciones > div > * { margin: 0 .15rem !important; }
  .tabla-tarjetas tbody td.celda-acciones .btn-xs, .tabla-tarjetas tbody td.celda-acciones .btn-sm, .tabla-tarjetas tbody td.celda-acciones a.btn {
    min-width: 2.2rem; min-height: 2.2rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .4rem;
  }
  .tabla-tarjetas tbody td.celda-acciones form { margin: 0; display: inline-flex; }
  .tabla-tarjetas tbody tr.fila-unica td { display: block; text-align: center !important; font-weight: 400; }
  /* Totales: una tarjeta más, con los mismos rótulos */
  .tabla-tarjetas tfoot { display: block; }
  .tabla-tarjetas tfoot tr { display: block; padding: .5rem .7rem; border-top: 2px solid var(--fr-borde); }
  .tabla-tarjetas tfoot td, .tabla-tarjetas tfoot th { display: block; position: relative; border: 0 !important; padding: .1rem 0 !important; text-align: left !important; font-weight: 700; }
  .tabla-tarjetas tfoot [data-label] { padding-left: 40% !important; }
  .tabla-tarjetas tfoot [data-label]::before { content: attr(data-label); position: absolute; left: 0; width: 37%; font-size: .72rem; color: #6c757d; text-transform: uppercase; }
  /* La barra superior nunca más ancha que la pantalla */
  .main-header { max-width: 100vw; }
}

/* ---------- Agenda General ---------- */
.agenda-tabla .agenda-tel { white-space: nowrap; }
.agenda-tabla .c-acciones { width: 1%; white-space: nowrap; }
.agenda-tabla .c-nombre { font-weight: 700; }
.agenda-tabla .c-empresa { color: var(--fr-marca); font-weight: 600; }
.agenda-tabla .c-profesion { color: #6c757d; }
.agenda-tabla td.c-mail a { word-break: break-all; }
.agenda-tabla td.c-obs { min-width: 16rem; }
.agenda-tabla td.c-direccion { min-width: 9rem; }
.agenda-tabla td.c-contacto { min-width: 12rem; }
@media (max-width: 767.98px) {
  .agenda-tabla, .agenda-tabla tbody { display: block; border: 0; }
  .agenda-tabla thead { display: none; }
  .agenda-tabla tbody tr {
    display: block; position: relative;
    background: #fff !important;
    border: 1px solid var(--fr-borde); border-radius: .5rem;
    padding: .6rem .7rem; margin-bottom: .75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    font-size: .9rem;
  }
  .agenda-tabla tbody td { display: block; border: 0 !important; padding: .1rem 0 !important; }
  .agenda-tabla tbody td:empty { display: none; }
  .agenda-tabla .c-nombre { font-size: 1.05rem; padding-right: 5rem; }
  .agenda-tabla td.c-obs { min-width: 0; }
  .agenda-tabla td.c-telefonos { margin-top: .3rem; }
  /* Teléfonos grandes para tocar y llamar */
  .agenda-tabla .agenda-tel { padding: .2rem 0; }
  .agenda-tabla .agenda-tel a { font-size: 1.05rem; font-weight: 600; }
  .agenda-tabla .agenda-tel a::before { content: '\f095'; font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free'; font-weight: 900; font-size: .85em; margin-right: .35rem; }
  .agenda-tabla td.c-obs { color: #6c757d; font-style: italic; }
  .agenda-tabla td.c-acciones { position: absolute; top: .55rem; right: .6rem; width: auto; padding: 0 !important; }
  .agenda-tabla td.c-acciones .d-flex { gap: .4rem; }
  .agenda-tabla td.c-acciones .btn-xs { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border-radius: .4rem; }
  .agenda-tabla td.c-acciones form { margin: 0; }
}

/* Vistas escritas con clases de Bootstrap 5 (form-select, form-label) sobre AdminLTE / Bootstrap 4 */
.form-select {
  display: block; width: 100%; height: calc(2.25rem + 2px); padding: .375rem 1.75rem .375rem .75rem;
  font-size: 1rem; line-height: 1.5; color: #495057; background-color: #fff;
  border: 1px solid #ced4da; border-radius: .25rem; box-shadow: inset 0 0 0 transparent;
}
.form-select:focus { border-color: #80bdff; outline: 0; }
.form-select.is-invalid { border-color: #dc3545; }
.form-label { display: inline-block; margin-bottom: .5rem; }

/* Selectores con buscador (Tom Select) en filtros en línea: que no queden angostos */
.form-inline .ts-wrapper { min-width: 220px; }
.form-inline .ts-wrapper.mr-2 { margin-right: .5rem; }
