/* ============================================================
   DANGOFE OS LIQUID V2 — taller.css
   MÓDULO TALLER DE INVERSORES (DANGOFE-TALLER-047 · v1.0.47)
   Recepción, estados, inventario, garantía, consulta pública y
   control de visibilidad/roles del técnico. Estética Liquid Glass
   (prefijo tal-).
   ============================================================ */

.tal-wrap { display: flex; flex-direction: column; gap: 16px; }

/* ---------- encabezado ---------- */
.tal-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.5rem; }
.tal-sub { margin: 4px 0 0; opacity: .75; font-size: .92rem; line-height: 1.45; }

/* ---------- tarjetas ---------- */
.tal-card {
  border-radius: 18px; padding: 16px 18px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 14px;
}
.tal-card h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.1rem; flex-wrap: wrap; }
.tal-card h4 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: .95rem; opacity: .9; }
.tal-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.tal-badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; margin-left: 6px;
  background: rgba(56,189,248,.2); border: 1px solid rgba(56,189,248,.5);
}

/* ---------- panel de visibilidad ---------- */
.tal-vis { border-color: rgba(250,204,21,.3); }
.tal-toggles { display: flex; flex-wrap: wrap; gap: 12px; }
.tal-toggle {
  flex: 1 1 240px; min-width: 220px; display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--glass-bg); border: 1px solid var(--glass-border); cursor: pointer;
}
.tal-toggle input { margin-top: 3px; }
.tal-toggle__txt { display: flex; flex-direction: column; gap: 2px; font-size: .86rem; }
.tal-toggle__txt em { font-style: normal; font-size: .74rem; opacity: .68; }
.tal-field--max { max-width: 360px; }

/* ---------- chips de filtro por estado ---------- */
.tal-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tal-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-input); color: inherit;
  cursor: pointer; font: inherit; font-size: .82rem; transition: all .15s ease;
}
.tal-chip:hover { background: var(--glass-bg-hover); }
.tal-chip--on { background: rgba(99,132,255,.3); border-color: rgba(99,132,255,.6); font-weight: 600; }
.tal-chip__n {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; padding: 0 5px;
  border-radius: 999px; background: rgba(0,0,0,.25); font-size: .72rem; font-weight: 700;
}

/* ---------- píldoras de estado ---------- */
.tal-pill {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 600;
  border: 1px solid var(--glass-border); background: var(--glass-bg-strong);
}
/* Estados vigentes (v1.0.70) */
.tal-est-recibido            { background: rgba(148,163,184,.2); border-color: rgba(148,163,184,.5); }
.tal-est-en-cola             { background: rgba(129,140,248,.2); border-color: rgba(129,140,248,.5); }
.tal-est-en-mesa-de-chequeo  { background: rgba(56,189,248,.18); border-color: rgba(56,189,248,.5); }
.tal-est-en-prueba           { background: rgba(251,146,60,.2); border-color: rgba(251,146,60,.5); }
.tal-est-listo               { background: rgba(74,222,128,.2); border-color: rgba(74,222,128,.5); }
.tal-est-entregado           { background: rgba(34,197,94,.28); border-color: rgba(34,197,94,.6); }
.tal-est-cancelado           { background: rgba(248,113,113,.2); border-color: rgba(248,113,113,.5); }
/* Estados de cotización (v1.0.75) */
.tal-est-diagnostico-completado { background: rgba(56,189,248,.2); border-color: rgba(56,189,248,.55); }
.tal-est-cotizacion-enviada     { background: rgba(250,204,21,.2); border-color: rgba(250,204,21,.55); }
.tal-est-cotizacion-aprobada    { background: rgba(74,222,128,.2); border-color: rgba(74,222,128,.55); }
.tal-est-cotizacion-declinada   { background: rgba(248,113,113,.2); border-color: rgba(248,113,113,.55); }
.tal-est-en-reparacion          { background: rgba(168,85,247,.2); border-color: rgba(168,85,247,.5); }
/* Estados heredados (para historiales antiguos) */
.tal-est-diagnostico         { background: rgba(56,189,248,.18); border-color: rgba(56,189,248,.5); }
.tal-est-esperando-aprobacion{ background: rgba(250,204,21,.18); border-color: rgba(250,204,21,.5); }
.tal-est-reparacion          { background: rgba(168,85,247,.2); border-color: rgba(168,85,247,.5); }
.tal-est-pruebas             { background: rgba(251,146,60,.2); border-color: rgba(251,146,60,.5); }
.tal-chip.tal-est-recibido, .tal-chip.tal-est-en-cola, .tal-chip.tal-est-en-mesa-de-chequeo,
.tal-chip.tal-est-en-prueba, .tal-chip.tal-est-listo, .tal-chip.tal-est-entregado,
.tal-chip.tal-est-cancelado, .tal-chip.tal-est-diagnostico, .tal-chip.tal-est-esperando-aprobacion,
.tal-chip.tal-est-reparacion, .tal-chip.tal-est-pruebas,
.tal-chip.tal-est-diagnostico-completado, .tal-chip.tal-est-cotizacion-enviada,
.tal-chip.tal-est-cotizacion-aprobada, .tal-chip.tal-est-cotizacion-declinada,
.tal-chip.tal-est-en-reparacion { border-width: 1px; }

/* ---------- tabla ---------- */
.tal-tablewrap { overflow-x: auto; }
.tal-tabla { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tal-tabla th, .tal-tabla td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--glass-border); }
.tal-tabla th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; opacity: .68; font-weight: 600; }
.tal-tabla td.tal-r, .tal-tabla th.tal-r { text-align: right; white-space: nowrap; }
.tal-tabla tbody tr[data-abrir] { cursor: pointer; }
.tal-tabla tbody tr[data-abrir]:hover { background: var(--glass-bg); }
.tal-tabla tr.tal-anulado { opacity: .5; text-decoration: line-through; }
.tal-mono { font-family: ui-monospace, monospace; font-size: .82rem; }
.tal-tel { opacity: .65; font-size: .8rem; }

/* ---------- detalle ---------- */
.tal-detalle { border-color: rgba(99,132,255,.35); }
.tal-detgrid { display: flex; flex-wrap: wrap; gap: 14px 24px; font-size: .9rem; }
.tal-detgrid > div { flex: 1 1 200px; }
.tal-lbl {
  display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  opacity: .6; font-weight: 600; margin-bottom: 2px;
}
.tal-nota { font-size: .9rem; line-height: 1.5; }
.tal-nota textarea {
  width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-input); color: inherit;
  font: inherit; font-size: .88rem; outline: none; resize: vertical;
}
.tal-sec {
  display: flex; flex-direction: column; gap: 10px; padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}
.tal-presup { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* ---------- cotización (v1.0.75) ---------- */
.tal-cotizacion { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tal-cotizacion__aviso {
  flex-basis: 100%; font-size: .82rem; line-height: 1.45; padding: 8px 12px; border-radius: 10px;
  background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.4);
}
.tal-cotform {
  display: flex; flex-direction: column; gap: 10px; flex-basis: 100%;
  padding: 12px; border-radius: 12px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.tal-cotform input, .tal-cotform textarea {
  width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-input); color: inherit;
  font: inherit; font-size: .88rem; outline: none; resize: vertical;
}
.tal-cotform__nota { font-size: .78rem; line-height: 1.45; opacity: .7; }
.tal-totales { display: flex; flex-wrap: wrap; gap: 14px 28px; padding-top: 12px; border-top: 1px solid var(--glass-border); }
.tal-totales > div { font-size: 1rem; }
.tal-total { font-weight: 700; font-size: 1.1rem; }
.tal-mo { display: inline-flex; align-items: center; gap: 6px; }
.tal-mo input { width: 130px; }
.tal-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tal-hist li { font-size: .84rem; }
.tal-hist__meta { opacity: .6; font-size: .76rem; margin-left: 6px; }
.tal-hist__nota { opacity: .8; font-size: .82rem; margin-top: 2px; }
.tal-cierre { gap: 14px; }
.tal-enlace, .tal-factura { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tal-url {
  display: inline-block; padding: 5px 9px; border-radius: 8px; max-width: 100%;
  background: rgba(0,0,0,.28); border: 1px solid var(--glass-border);
  font-family: ui-monospace, monospace; font-size: .74rem; word-break: break-all;
}

/* ---------- fotos y videos ---------- */
.tal-fotos { display: flex; flex-wrap: wrap; gap: 10px; }
.tal-foto { position: relative; display: block; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; border: 1px solid var(--glass-border); }
.tal-foto img, .tal-foto video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.tal-foto--video { width: 140px; }
.tal-foto__etq {
  position: absolute; left: 4px; bottom: 4px; padding: 1px 7px; border-radius: 999px;
  font-size: .64rem; font-weight: 700; letter-spacing: .02em;
  background: rgba(0,0,0,.6); color: #fff; pointer-events: none;
}
.tal-file { position: relative; overflow: hidden; }
.tal-file-wrap { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tal-input {
  padding: 6px 10px; border-radius: 10px; font: inherit; color: inherit;
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
}
.tal-input:focus { border-color: rgba(99,132,255,.65); outline: none; }
.tal-input--xs { padding: 3px 8px; font-size: .78rem; border-radius: 8px; }

/* ---------- formularios ---------- */
.tal-form {
  padding: 14px 16px; border-radius: 14px; margin: 4px 0;
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
  display: flex; flex-direction: column; gap: 12px;
}
.tal-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.tal-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 180px; min-width: 150px; }
.tal-field span { font-size: .82rem; opacity: .78; }
.tal-field input, .tal-field select, .tal-field textarea {
  padding: 9px 12px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: var(--glass-bg-input); color: inherit; font: inherit; font-size: .9rem;
  outline: none; transition: border-color .15s ease; width: 100%; box-sizing: border-box;
}
.tal-field input:focus, .tal-field select:focus, .tal-field textarea:focus { border-color: rgba(99,132,255,.65); }

/* ---------- buscador de piezas embebido (DANGOFE-taller-072) ---------- */
.tal-buscador { display: flex; flex-direction: column; gap: 8px; }
.tal-buscador-res {
  display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto;
}
.tal-buscador-res:empty { display: none; }
.tal-buscador-item {
  display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%;
  padding: 9px 12px; border-radius: 12px; cursor: pointer; font: inherit; color: inherit;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
  transition: background .15s ease, border-color .15s ease;
}
.tal-buscador-item:hover { background: var(--glass-bg-hover); border-color: rgba(99,132,255,.6); }
.tal-buscador-item.is-agotado { opacity: .62; }
.tal-buscador-nom { font-size: .9rem; font-weight: 600; }
.tal-buscador-meta { font-size: .74rem; opacity: .7; }
.tal-buscador-stock { font-size: .74rem; opacity: .82; }
.tal-buscador-item.is-agotado .tal-buscador-stock { color: #f87171; opacity: 1; }
.tal-buscador-vacio { font-size: .8rem; opacity: .6; padding: 6px 4px; }

/* ---------- gastos del técnico en la ficha (DANGOFE-taller-072) ---------- */
.tal-gastos-lista { display: flex; flex-direction: column; gap: 8px; }
.tal-gastos-vacio { font-size: .82rem; padding: 4px 2px; }
.tal-gasto-item {
  display: flex; flex-direction: column; gap: 3px;
  padding: 9px 12px; border-radius: 12px;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
}
.tal-gasto-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tal-gasto-concepto { font-size: .9rem; font-weight: 600; }
.tal-gasto-monto { font-size: .9rem; font-weight: 700; white-space: nowrap; }
.tal-gasto-meta { font-size: .74rem; opacity: .75; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.tal-gasto-est {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px;
  font-size: .68rem; font-weight: 700; text-transform: capitalize;
  background: rgba(148,163,184,.2); border: 1px solid rgba(148,163,184,.5);
}
.tal-gasto-est--aprobado, .tal-gasto-est--contabilizado {
  background: rgba(74,222,128,.2); border-color: rgba(74,222,128,.5);
}
.tal-gasto-est--rechazado { background: rgba(248,113,113,.2); border-color: rgba(248,113,113,.5); }
.tal-gasto-est--enviado, .tal-gasto-est--revisado {
  background: rgba(56,189,248,.18); border-color: rgba(56,189,248,.5);
}

/* ---------- botones ---------- */
.tal-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tal-actions--right { justify-content: flex-end; }
/* DANGOFE-taller-077: indicador «Cambios sin guardar» del diagnóstico. */
.tal-dirty { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: #b45309; opacity: .9; }
.tal-dirty svg { stroke: currentColor; }
.tal-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: var(--glass-bg-input); color: inherit; cursor: pointer;
  font: inherit; font-size: .9rem; transition: all .18s ease;
}
.tal-btn:hover { background: var(--glass-bg-active); }
.tal-btn--primary { background: rgba(99,132,255,.28); border-color: rgba(99,132,255,.55); font-weight: 600; }
.tal-btn--primary:hover { background: rgba(99,132,255,.4); }
.tal-btn--danger { background: rgba(248,113,113,.2); border-color: rgba(248,113,113,.5); }
.tal-btn--danger:hover { background: rgba(248,113,113,.34); }
.tal-btn--xs { padding: 5px 10px; font-size: .78rem; border-radius: 9px; }
.tal-btn:disabled { opacity: .6; cursor: default; }

/* ---------- distintivos ---------- */
.tal-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  border: 1px solid var(--glass-border); background: var(--glass-bg-strong);
}
.tal-tag--ok { background: rgba(74,222,128,.18); border-color: rgba(74,222,128,.45); }
.tal-tag--warn { background: rgba(250,204,21,.16); border-color: rgba(250,204,21,.45); }
.tal-tag--danger { background: rgba(248,113,113,.16); border-color: rgba(248,113,113,.45); }
.tal-tag--info { background: rgba(56,189,248,.16); border-color: rgba(56,189,248,.45); }

/* ---------- utilidades ---------- */
.tal-muted { opacity: .6; font-size: .82rem; }
.tal-error { color: #ff8f8f; font-size: .9rem; display: flex; align-items: center; gap: 6px; padding: 14px; }
.tal-nomas { opacity: .6; font-size: .82rem; text-align: center; padding: 14px; }


/* ---------- estimado de cobro (DANGOFE-FIX-048) ---------- */
.tal-estcfg {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border-soft, rgba(255,255,255,.08));
  display: flex; flex-direction: column; gap: 10px;
}
.tal-estcfg h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .98rem; }
.tal-estcfg__grid { display: flex; flex-wrap: wrap; gap: 12px; }
.tal-estimado {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-md, 12px);
  background: var(--bg-input, rgba(255,255,255,.05));
  border: 1px solid var(--border-soft, rgba(255,255,255,.1));
  display: flex; flex-direction: column; gap: 10px;
}
.tal-estimado__head { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.tal-estimado__grid { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.tal-estimado__grid > div { font-size: .95rem; display: flex; flex-direction: column; gap: 2px; }
.tal-estimado__grid .tal-total { font-weight: 700; font-size: 1.08rem; }



/* ---------- estimado por tramos de capacidad (DANGOFE-TALLER-049) ---------- */
.tal-estcfg__ayuda {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-md, 12px);
  background: var(--bg-input, rgba(255,255,255,.05));
  border: 1px solid var(--border-soft, rgba(255,255,255,.08));
  line-height: 1.4;
}
.tal-tramos { display: flex; flex-direction: column; gap: 12px; }
.tal-tramos__vacio {
  padding: 12px 14px; border-radius: var(--radius-md, 12px);
  border: 1px dashed var(--border-soft, rgba(255,255,255,.16));
  background: var(--bg-input, rgba(255,255,255,.03));
}
.tal-tramo {
  padding: 12px 14px; border-radius: var(--radius-md, 12px);
  background: var(--bg-input, rgba(255,255,255,.05));
  border: 1px solid var(--border-soft, rgba(255,255,255,.1));
  display: flex; flex-direction: column; gap: 10px;
}
.tal-tramo__grid { display: flex; flex-wrap: wrap; gap: 12px; }
.tal-tramo__grid .tal-field { flex: 1 1 130px; min-width: 120px; }
.tal-tramo__grid .tal-field--et { flex: 1 1 100%; }
.tal-tramo__del { align-self: flex-start; }
.tal-estcfg__defaults {
  margin-top: 4px; padding-top: 12px;
  border-top: 1px dashed var(--border-soft, rgba(255,255,255,.12));
  display: flex; flex-direction: column; gap: 10px;
}
.tal-estcfg__defaults h5 {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: .9rem; opacity: .9;
}
.tal-estimado__meta {
  display: flex; align-items: center; gap: 6px;
  font-size: .85rem; opacity: .85;
}
.tal-estimado__chequeo {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-md, 12px);
  font-size: .9rem; line-height: 1.4;
  background: var(--bg-warn, rgba(255,193,90,.12));
  border: 1px solid var(--border-warn, rgba(255,193,90,.35));
}

/* ---------- inventario FASE 1 (DANGOFE-TALLER-059) ---------- */
.tal-invfin {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-md, 12px);
  background: var(--bg-input, rgba(255,255,255,.05));
  border: 1px solid var(--border-soft, rgba(255,255,255,.1));
}
.tal-invfin__it {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-radius: 10px;
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
}
.tal-invfin__it span { font-size: .74rem; opacity: .72; }
.tal-invfin__it b { font-size: 1.02rem; }
.tal-invfin__it--ok { border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.1); }
.tal-invcat {
  font-size: .8rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  opacity: .8; background: var(--glass-bg);
}
.tal-invcat td { padding: 8px 10px !important; }
.tal-invcompat { display: block; font-size: .74rem; opacity: .65; margin-top: 2px; }
.tal-nowrap { white-space: nowrap; }
.tal-form--entrada { border-color: rgba(56,189,248,.3); }
.tal-mini { font-size: .78rem; opacity: .72; margin: 0 0 4px; }
@media (min-width: 640px) {
  .tal-invfin { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- comisión del técnico FASE 2 (DANGOFE-TALLER-060) ---------- */
.tal-comcfg { border-color: rgba(56,189,248,.28); }
.tal-comcfg__defaults {
  margin-top: 4px; padding-top: 12px;
  border-top: 1px dashed var(--border-soft, rgba(255,255,255,.12));
  display: flex; flex-direction: column; gap: 8px;
}
.tal-comcfg__defaults h5 {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: .9rem; opacity: .9;
}
.tal-comcfg__tec { flex: 1 1 180px; min-width: 160px; }

/* ============================================================
   RESUMEN DEL TALLER — tarjetas KPI Liquid Glass (v1.0.93)
   Rediseño del mini-tablero: 4 tarjetas en rejilla responsive
   (1 col móvil · 2 col tableta · 4 col escritorio), fondos
   semitransparentes con backdrop-filter, acentos de color y
   acciones que filtran/abren los registros reales. Compatible
   con claro/oscuro, fondos configurables, prefers-reduced-motion
   y navegación por teclado.
   ============================================================ */

/* Acentos por tarjeta (RGB para combinar con alpha en ambos temas) */
.tal-kpi--azul     { --kpi-rgb: 59, 130, 246; }   /* azul   */
.tal-kpi--morado   { --kpi-rgb: 139, 92, 246; }   /* morado */
.tal-kpi--amarillo { --kpi-rgb: 245, 158, 11; }   /* amarillo */
.tal-kpi--rojo     { --kpi-rgb: 239, 68, 68; }    /* rojo   */

/* Contenedor: hereda el Liquid Glass de .glass-card; solo maquetación */
.tal-resumen { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.tal-resumen__head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.tal-resumen__head h3 {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 700; color: var(--text-primary);
}
.tal-resumen__head h3 svg { opacity: .85; }

/* Indicador real de última actualización (punto verde con glow) */
.tal-resumen__stamp {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .74rem; font-weight: 600; color: var(--text-secondary);
  padding: 4px 10px; border-radius: 999px;
  background: rgba(74, 222, 128, .10);
  border: 1px solid rgba(74, 222, 128, .28);
}
.tal-resumen__dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .18), 0 0 8px rgba(74, 222, 128, .6);
  animation: tal-dot-pulse 2.4s ease-in-out infinite;
}
@keyframes tal-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* Rejilla responsive: móvil 1 · tableta 2 · escritorio 4 */
.tal-kpi-grid {
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 640px) {
  .tal-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .tal-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Tarjeta KPI = botón Liquid Glass con acento propio */
.tal-kpi {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 12px;
  text-align: left; cursor: pointer; width: 100%;
  padding: 14px; border-radius: var(--radius-md, 14px);
  color: var(--text-primary); font: inherit;
  background:
    linear-gradient(155deg,
      rgba(var(--kpi-rgb), .16) 0%,
      rgba(var(--kpi-rgb), .05) 42%,
      rgba(var(--glass-rgb), .04) 100%);
  border: 1px solid rgba(var(--kpi-rgb), .30);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow:
    0 8px 22px var(--glass-shadow, rgba(0, 0, 0, .35)),
    inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: transform .18s ease, box-shadow .18s ease,
    border-color .18s ease, background .18s ease;
  transform: perspective(700px) translateZ(0);
}
/* Reflejo interno superior (efecto 3D sutil) */
.tal-kpi::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10) 0%, transparent 38%);
  z-index: 0;
}
.tal-kpi > * { position: relative; z-index: 1; }

/* Halo de color difuso (esquina de la tarjeta) */
.tal-kpi__glow {
  position: absolute; top: -30%; right: -20%;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--kpi-rgb), .38) 0%, transparent 70%);
  filter: blur(6px); z-index: 0; pointer-events: none;
  opacity: .85; transition: opacity .18s ease, transform .18s ease;
}

/* Icono en pastilla de color */
.tal-kpi__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px;
  color: rgb(var(--kpi-rgb));
  background: rgba(var(--kpi-rgb), .16);
  border: 1px solid rgba(var(--kpi-rgb), .30);
}
.tal-kpi__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tal-kpi__num {
  font-size: 1.9rem; font-weight: 800; line-height: 1;
  letter-spacing: -.02em; color: var(--text-primary);
}
.tal-kpi__ttl {
  font-size: .82rem; font-weight: 600; line-height: 1.2;
  color: var(--text-secondary);
}
.tal-kpi__act {
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 6px; font-size: .74rem; font-weight: 600;
  color: rgb(var(--kpi-rgb)); opacity: .95;
}
.tal-kpi__act svg { transition: transform .18s ease; }

/* Estados interactivos + efecto 3D sutil */
.tal-kpi:hover {
  transform: perspective(700px) translateY(-3px);
  border-color: rgba(var(--kpi-rgb), .55);
  box-shadow:
    0 16px 34px var(--glass-shadow, rgba(0, 0, 0, .45)),
    0 0 0 1px rgba(var(--kpi-rgb), .18),
    inset 0 1px 0 rgba(255, 255, 255, .18);
}
.tal-kpi:hover .tal-kpi__glow { opacity: 1; transform: scale(1.12); }
.tal-kpi:hover .tal-kpi__act svg { transform: translateX(3px); }
.tal-kpi:active { transform: perspective(700px) translateY(-1px); }
.tal-kpi:focus-visible {
  outline: 2px solid rgb(var(--kpi-rgb)); outline-offset: 2px;
}

/* Comisión propia (fila informativa bajo las tarjetas) */
.tal-kpi-com {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-md, 12px);
  font-size: .82rem; color: var(--text-secondary);
  background: rgba(74, 222, 128, .08);
  border: 1px solid rgba(74, 222, 128, .28);
}
.tal-kpi-com svg { color: #4ade80; flex: 0 0 auto; }
.tal-kpi-com strong { color: var(--text-primary); font-size: .95rem; }
.tal-kpi-com__sub { opacity: .75; font-size: .74rem; }

/* Días de antigüedad en alerta (columna del tablero — se conserva) */
.tal-dias--alerta { color: #f59e0b; font-weight: 700; }

/* ---------- Skeleton del resumen (misma maquetación, sin salto) ---------- */
.tal-kpi--sk {
  cursor: default; pointer-events: none;
  --kpi-rgb: 148, 163, 184;
  min-height: 92px;
}
.tal-sk-el {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg,
    rgba(148, 163, 184, .10) 25%,
    rgba(148, 163, 184, .20) 37%,
    rgba(148, 163, 184, .10) 63%);
  background-size: 400% 100%;
  animation: tal-sk-shimmer 1.4s ease infinite;
}
.tal-kpi--sk .tal-kpi__ico { border: 0; background: none; }
.tal-kpi--sk .tal-kpi__ico.tal-sk-el { width: 42px; height: 42px; border-radius: 12px; }
.tal-sk-el--num  { width: 54px; height: 26px; }
.tal-sk-el--ttl  { width: 100%; max-width: 130px; height: 12px; margin-top: 6px; }
.tal-sk-el--act  { width: 80px; height: 11px; margin-top: 8px; }
.tal-sk-el--stamp { width: 120px; height: 24px; border-radius: 999px; }
@keyframes tal-sk-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- Accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .tal-kpi, .tal-kpi__glow, .tal-kpi__act svg { transition: none; }
  .tal-kpi:hover { transform: none; }
  .tal-kpi:hover .tal-kpi__glow { transform: none; }
  .tal-kpi:hover .tal-kpi__act svg { transform: none; }
  .tal-resumen__dot { animation: none; }
  .tal-sk-el { animation: none; }
}


/* ---------- comisión por capacidad + entrega/factura FASE B (DANGOFE-taller-071) ---------- */
.tal-comcfg__tramos {
  margin-top: 4px; padding-top: 12px;
  border-top: 1px dashed var(--border-soft, rgba(255,255,255,.12));
  display: flex; flex-direction: column; gap: 8px;
}
.tal-comcfg__tramos h5 {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: .9rem; opacity: .9;
}
.tal-comtramo { border-color: rgba(56,189,248,.28); }
.tal-comtramo__activo { align-self: end; }
.tal-comtramo__rango {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 10px; padding: 4px 10px; border-radius: 10px;
  font-size: .8rem; letter-spacing: .02em;
  color: #7dd3fc;
  background: rgba(56,189,248,.10);
  border: 1px solid rgba(56,189,248,.28);
}
.tal-comtramo__rango strong { color: #e0f2fe; }
.tal-tramos__vacio { font-size: .82rem; opacity: .7; margin: 0; }

.tal-factura-int, .tal-comision-mia {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-md, 12px);
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
}
.tal-comision-mia { border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.tal-factura-int .tal-lbl, .tal-comision-mia .tal-lbl {
  font-size: .78rem; opacity: .72; margin-right: 2px;
}

.tal-entrega { display: flex; flex-direction: column; gap: 10px; }
.tal-entrega__form {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-md, 12px);
  background: var(--glass-bg-soft);
  border: 1px solid rgba(56,189,248,.3);
}
.tal-entrega__form h4 {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: .95rem; opacity: .95;
}
.tal-form__grid {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
@media (min-width: 640px) {
  .tal-form__grid { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   SOLICITUDES DE PIEZAS DEL TÉCNICO — BANDEJA ADMIN (v1.0.74)
   Una solicitud NO agrega stock; el inventario solo sube con lo
   COMPRADO confirmado por línea. Estética Liquid Glass (prefijo tal-).
   ============================================================ */
.tal-field--wide { flex: 1 1 100%; min-width: 100%; }
.tal-linkbtn {
  background: none; border: none; color: inherit; cursor: pointer;
  font: inherit; font-size: .82rem; padding: 4px 0; opacity: .85;
  display: inline-flex; align-items: center; gap: 6px;
}
.tal-linkbtn:hover { opacity: 1; text-decoration: underline; }

/* ---------- filtros ---------- */
.tal-sol-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tal-sol-sel {
  padding: 8px 10px; border-radius: var(--radius-md, 12px);
  border: 1px solid var(--glass-border); background: var(--glass-bg-input);
  color: inherit; font: inherit; font-size: .88rem; flex: 1 1 160px; min-width: 140px;
}

/* ---------- lista de solicitudes ---------- */
.tal-sol-lista { display: flex; flex-direction: column; gap: 10px; }
.tal-solcard {
  border-radius: var(--radius-md, 14px);
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
  overflow: hidden;
}
.tal-solcard--open { border-color: rgba(99,132,255,.4); }
.tal-solcard__top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; cursor: pointer;
}
.tal-solcard__top:hover { background: var(--glass-bg-input); }
.tal-solcard__id { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.tal-solcard__meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-left: auto; font-size: .78rem; opacity: .72;
}
.tal-solcard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.tal-solcard__chevron { opacity: .6; display: inline-flex; }
.tal-solcard__body {
  padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--glass-border);
}
.tal-solcard__obs {
  margin: 8px 0 0; font-size: .85rem; opacity: .82;
  display: flex; align-items: flex-start; gap: 6px;
}
.tal-solcard__acts {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: flex-end; padding-top: 4px;
}

/* ---------- badges de estado ---------- */
.tal-solbadge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: .7rem; font-weight: 600;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
}
.tal-solbadge--pendiente { background: rgba(148,163,184,.18); border-color: rgba(148,163,184,.45); }
.tal-solbadge--en-revision { background: rgba(56,189,248,.18); border-color: rgba(56,189,248,.5); }
.tal-solbadge--compra-parcial,
.tal-solbadge--parcial { background: rgba(250,204,21,.16); border-color: rgba(250,204,21,.5); }
.tal-solbadge--comprada { background: rgba(74,222,128,.18); border-color: rgba(74,222,128,.5); }
.tal-solbadge--no-comprada,
.tal-solbadge--rechazada { background: rgba(248,113,113,.16); border-color: rgba(248,113,113,.5); }
.tal-solbadge--cerrada { background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.35); opacity: .8; }

/* ---------- tabla de líneas ---------- */
.tal-sol-tabla { font-size: .85rem; }
.tal-sol-linea-extra td { padding-top: 0; }
.tal-sol-adicform { margin-top: 6px; }
.tal-sol-adic {
  padding: 10px 12px; border-radius: var(--radius-md, 12px);
  background: var(--glass-bg-input); border: 1px solid rgba(250,204,21,.3);
  display: flex; flex-direction: column; gap: 10px; margin-top: 6px;
}

/* ---------- formulario de procesamiento ---------- */
.tal-proc-form {
  padding: 12px 14px; border-radius: var(--radius-md, 12px);
  background: var(--glass-bg-input); border: 1px solid rgba(74,222,128,.3);
  display: flex; flex-direction: column; gap: 12px;
}
.tal-proc-linea {
  display: flex; flex-direction: column; gap: 8px;
  padding-bottom: 10px; border-bottom: 1px dashed var(--glass-border);
}
.tal-proc-linea:last-of-type { border-bottom: none; padding-bottom: 0; }
.tal-proc-nom { font-size: .9rem; font-weight: 600; }
.tal-proc-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.tal-proc-foot {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  justify-content: space-between;
}



/* ---------- DANGOFE-taller-078: skeleton de carga + «Ver más» ----------
   Esqueleto con la MISMA maquetación que el mini-tablero y el tablero reales
   (tarjeta, KPIs, chips y filas) para que al llegar los datos no haya salto de
   altura ni parpadeo. Superficies Liquid Glass con las variables canónicas.
   El «shimmer» respeta prefers-reduced-motion. */
.tal-sk { pointer-events: none; }
.tal-sk-line {
  height: 12px; border-radius: 8px; background: var(--glass-bg-input);
  overflow: hidden; position: relative;
}
.tal-sk-line--title { height: 20px; width: 42%; max-width: 240px; margin-bottom: 4px; }
.tal-sk-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tal-sk-card {
  min-height: 62px; border-radius: 12px;
  border: 1px solid var(--glass-border);
}
.tal-sk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tal-sk-chip {
  display: inline-block; height: 28px; width: 92px; border-radius: 999px;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
  overflow: hidden; position: relative;
}
.tal-sk-table { display: flex; flex-direction: column; }
.tal-sk-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 10px; border-bottom: 1px solid var(--glass-border);
}
.tal-sk-cell {
  flex: 1 1 0; height: 14px; border-radius: 8px;
  background: var(--glass-bg-input); overflow: hidden; position: relative;
}
.tal-sk-cell--sm { flex: 0 0 90px; }
.tal-sk-cell--pill { flex: 0 0 120px; height: 22px; border-radius: 999px; }
/* Brillo en movimiento (shimmer) sobre cada superficie del esqueleto. */
.tal-sk-line::after, .tal-sk-chip::after, .tal-sk-cell::after, .tal-sk-card::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%, var(--glass-bg-hover) 50%, rgba(255,255,255,0) 100%);
  animation: tal-sk-shimmer 1.3s ease-in-out infinite;
}
@keyframes tal-sk-shimmer { 100% { transform: translateX(100%); } }
@media (min-width: 640px) {
  .tal-sk-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .tal-sk-line::after, .tal-sk-chip::after, .tal-sk-cell::after, .tal-sk-card::after {
    animation: none;
  }
}
/* Botón «Ver más» del render por lotes del tablero. */
.tal-vermas { display: flex; justify-content: center; padding-top: 12px; }


/* ---------- DANGOFE-taller-080: clientes y datos fiscales ---------- */
/* Casilla «solicita comprobante fiscal» en la recepción. */
.tal-check {
  display: flex; align-items: center; gap: 8px; margin: 4px 0 2px;
  font-size: .88rem; cursor: pointer;
}
.tal-check input { width: 16px; height: 16px; }

/* Buscador de cliente central existente. */
.tal-cli-buscar { position: relative; margin-bottom: 10px; }
.tal-cli-res {
  position: absolute; left: 0; right: 0; z-index: 20; margin-top: 4px;
  max-height: 260px; overflow-y: auto; border-radius: 10px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-strong);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.tal-cli-item {
  display: block; width: 100%; text-align: left; padding: 9px 12px;
  border: 0; border-bottom: 1px solid var(--glass-border);
  background: transparent; color: inherit; font-size: .86rem; cursor: pointer;
}
.tal-cli-item:last-child { border-bottom: 0; }
.tal-cli-item:hover { background: var(--glass-bg-hover); }
.tal-cli-vacio { padding: 9px 12px; font-size: .82rem; opacity: .65; }

/* Bloque de datos fiscales en el detalle del servicio. */
.tal-fiscal .tal-detgrid { margin-top: 8px; }
.tal-fiscal-form {
  margin-top: 10px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--glass-border); background: var(--glass-bg);
}
.tal-fiscal-form .tal-grid { margin-bottom: 6px; }



/* ====================================================================
   DANGOFE-taller-082: relojes en vivo, garantía y mensajería del detalle
   Superficies Liquid Glass con las variables canónicas. Las animaciones
   respetan prefers-reduced-motion (ver bloque al final).
   ==================================================================== */

/* ---------- relojes en vivo (tiempo total / en reparación) ---------- */
.tal-reloj { display: block; }
.tal-reloj__val {
  display: inline-block; font-family: ui-monospace, monospace; font-weight: 700;
  font-size: 1rem; letter-spacing: .02em; line-height: 1.3;
  will-change: opacity;
}
.tal-reloj__val--vivo { color: rgba(99,132,255,.95); }
/* Latido sutil del reloj activo (solo opacidad). */
.tal-reloj__val--vivo::after {
  content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 7px;
  border-radius: 999px; background: rgba(74,222,128,.9); vertical-align: middle;
  animation: tal-reloj-latido 1.6s ease-in-out infinite;
}
@keyframes tal-reloj-latido { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.tal-reloj__sub { display: block; font-size: .72rem; opacity: .6; margin-top: 2px; }

/* ---------- garantía ---------- */
.tal-gar {
  display: flex; flex-direction: column; gap: 2px;
}
.tal-gar__val { font-weight: 700; font-size: .95rem; }
.tal-gar--activa .tal-gar__val { color: rgba(74,222,128,.95); }
.tal-gar--pend .tal-gar__val { color: rgba(250,204,21,.95); }
.tal-gar__msg {
  font-size: .78rem; line-height: 1.4; opacity: .75; margin-top: 2px;
}

/* ---------- mensajería con el cliente ---------- */
.tal-msgs { gap: 12px; }
.tal-msgs__lista {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 360px; overflow-y: auto; padding: 4px 2px;
}
.tal-msgs__vacio {
  display: flex; align-items: center; gap: 8px;
  font-size: .84rem; opacity: .6; padding: 14px 6px;
}
.tal-msg {
  max-width: 78%; display: flex; flex-direction: column; gap: 4px;
  padding: 9px 12px; border-radius: 14px;
  border: 1px solid var(--glass-border); background: var(--glass-bg);
  word-break: break-word;
}
.tal-msg--mio {
  align-self: flex-end; background: rgba(99,132,255,.22);
  border-color: rgba(99,132,255,.45); border-bottom-right-radius: 5px;
}
.tal-msg--otro {
  align-self: flex-start; border-bottom-left-radius: 5px;
}
.tal-msg__autor { font-size: .72rem; font-weight: 700; opacity: .7; }
.tal-msg__texto { font-size: .9rem; line-height: 1.45; white-space: pre-wrap; }
.tal-msg__meta { font-size: .68rem; opacity: .55; align-self: flex-end; }
.tal-msg__audio { width: 240px; max-width: 100%; height: 38px; }
.tal-msg__img { display: block; }
.tal-msg__img img {
  max-width: 220px; max-height: 220px; border-radius: 10px; display: block;
  border: 1px solid var(--glass-border);
}
.tal-msg__file {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: .84rem; padding: 6px 10px; border-radius: 10px; color: inherit;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
}
.tal-msg__file:hover { background: var(--glass-bg-hover); }
.tal-msgs__composer {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--glass-border);
}
.tal-msgs__composer textarea {
  width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-input); color: inherit;
  font: inherit; font-size: .9rem; outline: none; resize: vertical; min-height: 46px;
}
.tal-msgs__composer textarea:focus { border-color: rgba(99,132,255,.65); }
.tal-msgs__acciones { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tal-msg__recstate {
  font-size: .8rem; font-weight: 600; color: rgba(248,113,113,.95);
}

@media (prefers-reduced-motion: reduce) {
  .tal-reloj__val--vivo::after { animation: none; }
}


/* =====================================================================
   DANGOFE-taller-084 · Facturación y pago SEPARADOS (Liquid Glass) + pulido
   ===================================================================== */
.tal-facpago {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 14px;
  background: var(--glass-bg-soft, rgba(255,255,255,.04));
  border: 1px solid var(--glass-border);
}
.tal-facpago .tal-lbl { font-weight: 600; opacity: .85; }
.tal-facpago__badges { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* Guion tenue para celdas sin dato (columna Total/Factura de la lista). */
.tal-dim { opacity: .45; }

/* =====================================================================
   DANGOFE-taller-101 · Renglones EDITABLES de la factura (taller-100)
   Móvil: descripción a lo ancho; cantidad y precio en dos columnas.
   ===================================================================== */
.tal-facedit {
  display: flex; flex-direction: column; gap: 10px; margin: 10px 0;
  padding: 12px; border-radius: 14px;
  background: var(--glass-bg-soft, rgba(255,255,255,.04));
  border: 1px solid var(--glass-border);
}
.tal-facedit > .tal-muted { margin: 0; }
.tal-facedit > .tal-btn { align-self: flex-start; }
.tal-facrow {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end;
}
.tal-facrow + .tal-facrow {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--glass-border);
}
.tal-facrow .tal-field { min-width: 0; }
.tal-facrow .tal-field:first-child { grid-column: 1 / -1; }
.tal-facrow [data-fac-quitar] { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 640px) {
  .tal-facrow { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; }
  .tal-facrow .tal-field:first-child, .tal-facrow [data-fac-quitar] { grid-column: auto; }
  .tal-facrow [data-fac-quitar] { margin-bottom: 4px; }
  .tal-facrow + .tal-facrow { margin-top: 0; padding-top: 0; border-top: 0; }
}
.tal-facedit__total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding-top: 10px; border-top: 1px solid var(--glass-border); font-size: .92rem;
}
.tal-facedit__total strong { font-size: 1.05rem; }



/* =====================================================================
   DANGOFE-taller-094 · Rediseño Liquid Glass del LISTADO DE SERVICIOS
   Contenedor translúcido, encabezado con buscador, filtros agrupados y
   tarjetas horizontales interactivas (sustituyen la tabla). Solo capa
   visual: la lógica de datos/estados/permisos/paginación no cambia.
   ===================================================================== */

/* ---------- contenedor Liquid Glass del listado ---------- */
.tal-lista-card {
  position: relative; overflow: hidden;
  padding: 18px 20px; gap: 16px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.02) 46%, rgba(255,255,255,0) 100%),
    var(--glass-bg-soft, var(--glass-bg));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--glass-shadow, 0 18px 46px rgba(0,0,0,.28));
}
/* Reflejo interno superior (efecto cristal). */
.tal-lista-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  opacity: .6; pointer-events: none;
}

/* ---------- encabezado ---------- */
.tal-lista-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.tal-lista-head__tit { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tal-lista-head__ico {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  color: rgb(99,132,255);
  background: rgba(99,132,255,.16);
  border: 1px solid rgba(99,132,255,.32);
}
.tal-lista-head__txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tal-lista-head__txt h3 { margin: 0; font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.tal-lista-head__sub { font-size: .84rem; opacity: .7; }
.tal-lista-head__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- buscador ---------- */
.tal-buscador {
  position: relative; display: inline-flex; align-items: center;
  min-width: 220px;
}
.tal-buscador__ico {
  position: absolute; left: 12px; display: inline-flex; align-items: center;
  opacity: .55; pointer-events: none;
}
.tal-buscador__inp {
  width: 100%; box-sizing: border-box;
  padding: 10px 14px 10px 36px; border-radius: 12px;
  font: inherit; font-size: .88rem; color: var(--text-primary);
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.tal-buscador__inp::placeholder { color: var(--text-secondary); opacity: .8; }
.tal-buscador__inp:focus {
  outline: none; border-color: rgba(99,132,255,.6);
  box-shadow: 0 0 0 3px rgba(99,132,255,.18);
  background: var(--glass-bg-hover);
}

/* ---------- selector «Otros estados» ---------- */
.tal-otros { position: relative; display: inline-flex; align-items: center; }
.tal-otros__sel {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  font: inherit; font-size: .82rem; color: inherit; cursor: pointer;
  padding: 6px 30px 6px 14px; border-radius: 999px;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
  transition: background .15s ease, border-color .15s ease;
}
.tal-otros__sel:hover { background: var(--glass-bg-hover); }
.tal-otros__sel:focus-visible { outline: 2px solid rgba(99,132,255,.7); outline-offset: 2px; }
.tal-otros__ico {
  position: absolute; right: 10px; display: inline-flex; align-items: center;
  opacity: .6; pointer-events: none;
}
.tal-otros--on .tal-otros__sel {
  background: rgba(99,132,255,.3); border-color: rgba(99,132,255,.6); font-weight: 600;
}

/* Punto de color dentro de las píldoras de filtro principales. */
.tal-chip__dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 999px;
  flex: 0 0 auto;
}

/* ---------- lista de tarjetas horizontales ---------- */
.tal-srv-lista { display: flex; flex-direction: column; gap: 10px; }
.tal-srv {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 16px;
  background: var(--glass-bg-soft, rgba(255,255,255,.05));
  border: 1px solid var(--glass-border);
  cursor: pointer; text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.tal-srv:hover {
  transform: translateY(-2px);
  background: var(--glass-bg-hover);
  border-color: rgba(99,132,255,.4);
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}
.tal-srv:active { transform: translateY(0); }
.tal-srv:focus-visible {
  outline: 2px solid rgba(99,132,255,.75); outline-offset: 2px;
}
.tal-srv--sel {
  border-color: rgba(99,132,255,.6);
  background: rgba(99,132,255,.12);
  box-shadow: inset 0 0 0 1px rgba(99,132,255,.35);
}
.tal-srv--anulado { opacity: .5; }
.tal-srv--anulado .tal-srv__eqname,
.tal-srv--anulado .tal-srv__num { text-decoration: line-through; }

.tal-srv__num { flex: 0 0 116px; font-size: .82rem; opacity: .9; }
.tal-srv__cli { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tal-srv__cliname {
  font-weight: 600; font-size: .92rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tal-srv__tel {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; opacity: .62;
}
.tal-srv__tel svg { opacity: .8; }
.tal-srv__eq { flex: 1 1 190px; min-width: 0; display: flex; align-items: center; gap: 10px; }
.tal-srv__eqico {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  color: var(--text-secondary);
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
}
.tal-srv__eqtxt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tal-srv__eqname {
  font-size: .9rem; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tal-srv__eqsub { font-size: .76rem; opacity: .6; }
.tal-srv__est { flex: 0 0 auto; min-width: 156px; }
.tal-srv__est .tal-pill { gap: 7px; }
.tal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; flex: 0 0 auto; }
.tal-srv__total {
  flex: 0 0 104px; text-align: right; font-weight: 600; font-size: .9rem;
  white-space: nowrap;
}
.tal-srv__fac { flex: 0 0 132px; display: flex; justify-content: flex-start; }
.tal-facpill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; white-space: nowrap;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}
.tal-facpill--ok {
  color: rgb(34,197,94);
  background: rgba(34,197,94,.16); border-color: rgba(34,197,94,.5);
}
.tal-facpill--warn {
  color: rgb(202,138,4);
  background: rgba(250,204,21,.16); border-color: rgba(250,204,21,.5);
}
.tal-facpill--danger {
  color: rgb(239,68,68);
  background: rgba(248,113,113,.16); border-color: rgba(248,113,113,.5);
}
.tal-srv__go {
  flex: 0 0 34px; margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  color: var(--text-secondary);
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.tal-srv:hover .tal-srv__go {
  transform: translateX(3px);
  color: rgb(99,132,255); background: rgba(99,132,255,.16); border-color: rgba(99,132,255,.4);
}

/* ---------- pie: conteo + paginación ---------- */
.tal-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-top: 6px;
}
.tal-foot__count { font-size: .82rem; opacity: .68; }
.tal-foot__pag { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tal-pag-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  color: inherit; background: var(--glass-bg-input); border: 1px solid var(--glass-border);
  transition: background .15s ease, border-color .15s ease;
}
.tal-pag-btn:hover:not(:disabled) { background: var(--glass-bg-hover); border-color: rgba(99,132,255,.4); }
.tal-pag-btn:disabled { opacity: .4; cursor: default; }
.tal-pag-btn:focus-visible { outline: 2px solid rgba(99,132,255,.7); outline-offset: 2px; }
.tal-pag-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px;
  font-weight: 700; font-size: .86rem; color: #fff;
  background: rgba(99,132,255,.9); border: 1px solid rgba(99,132,255,.9);
}
.tal-pag-de { font-size: .8rem; opacity: .6; }
.tal-foot__show { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; opacity: .8; }
.tal-foot__sel {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  font: inherit; font-size: .82rem; color: inherit; cursor: pointer;
  padding: 5px 24px 5px 10px; border-radius: 9px;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.tal-foot__sel:focus-visible { outline: 2px solid rgba(99,132,255,.7); outline-offset: 2px; }

/* ---------- esqueleto de la lista (mismas cajas que las tarjetas) ---------- */
.tal-srv--sk { pointer-events: none; cursor: default; }
.tal-srv--sk:hover { transform: none; box-shadow: none; border-color: var(--glass-border); background: var(--glass-bg-soft, rgba(255,255,255,.05)); }
.tal-sk-cell--tiny { flex: 0 0 70px; height: 10px; }
.tal-sk-cell--ico { flex: 0 0 36px; height: 36px; border-radius: 10px; }
.tal-sk-cell--go { flex: 0 0 34px; height: 34px; border-radius: 999px; margin-left: auto; }

/* ---------- responsive: tarjeta vertical en móvil (sin ocultar datos) ---------- */
@media (max-width: 860px) {
  .tal-srv {
    flex-wrap: wrap; align-items: flex-start; row-gap: 8px;
  }
  .tal-srv__num { flex: 0 0 auto; order: 1; }
  .tal-srv__go { order: 2; }
  .tal-srv__cli { flex: 1 1 100%; order: 3; }
  .tal-srv__eq { flex: 1 1 100%; order: 4; }
  .tal-srv__est { flex: 0 0 auto; min-width: 0; order: 5; }
  .tal-srv__total { flex: 0 0 auto; order: 6; text-align: left; }
  .tal-srv__fac { flex: 0 0 auto; order: 7; }
  .tal-lista-head__tools { width: 100%; }
  .tal-buscador { flex: 1 1 auto; }
}

/* ---------- accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .tal-srv, .tal-srv__go, .tal-buscador__inp, .tal-pag-btn { transition: none; }
  .tal-srv:hover { transform: none; }
  .tal-srv:hover .tal-srv__go { transform: none; }
}



/* ============================================================
   DANGOFE-TALLER-095 · v1.0.95
   Rediseño Liquid Glass del DETALLE del servicio (dashboard):
   encabezado compacto, timeline horizontal de etapas, tres
   paneles (Trabajo técnico / Recursos y evidencias / Control y
   cierre), franja de métricas, historial desplegable y selector
   de PREVISUALIZACIÓN de rol. 100% visual: reutiliza handlers,
   IDs y visibilidad real por permisos del backend.
   ============================================================ */

.tal-dash { display: flex; flex-direction: column; gap: 14px; }

/* ---------- encabezado compacto ---------- */
.tal-dash__head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px;
  padding: 12px 16px; border-radius: var(--radius-md, 14px);
}
.tal-back { flex: 0 0 auto; }
.tal-dash__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tal-dash__num { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.tal-dash__cells {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  flex: 1 1 320px; min-width: 0;
}
.tal-hcell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tal-hcell .tal-lbl { font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.tal-hcell__v {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .95rem; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px;
}
.tal-hcell--total { margin-left: auto; text-align: right; align-items: flex-end; }
.tal-hcell__total { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); }

/* ---------- selector de previsualización de rol ---------- */
.tal-roleswitch {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
  flex: 0 0 auto;
}
.tal-role {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 14px; border-radius: 999px;
  font: inherit; font-size: .82rem; font-weight: 600;
  color: var(--text-secondary);
  transition: background var(--t-fast, .15s), color var(--t-fast, .15s);
}
.tal-role:hover { color: var(--text-primary); }
.tal-role.is-on {
  color: var(--text-primary);
  background: rgba(var(--accent-rgb, 56,132,222), .22);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb, 56,132,222), .4);
}

/* ---------- timeline horizontal de etapas ---------- */
.tal-tlwrap { padding: 14px 16px; border-radius: var(--radius-md, 14px); overflow-x: auto; }
.tal-tl {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: flex-start; gap: 0; min-width: min-content;
}
.tal-tl__step {
  position: relative; flex: 1 1 0; min-width: 108px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 0 6px;
}
/* línea conectora entre nodos */
.tal-tl__step::before {
  content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px;
  background: var(--glass-border); z-index: 0;
}
.tal-tl__step:first-child::before { display: none; }
.tal-tl__dot {
  position: relative; z-index: 1;
  width: 32px; height: 32px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; color: #fff;
  background: rgb(var(--tl-rgb, 148,163,184));
  box-shadow: 0 2px 8px rgba(var(--tl-rgb, 148,163,184), .45);
}
.tal-tl__lbl {
  font-size: .78rem; font-weight: 600; color: var(--text-primary);
  line-height: 1.25; max-width: 130px;
}
.tal-tl__date { font-size: .7rem; color: var(--text-secondary); }
.tal-tl__step.is-actual .tal-tl__dot {
  outline: 3px solid rgba(var(--tl-rgb, 148,163,184), .35); outline-offset: 2px;
}
.tal-tl__step.is-actual .tal-tl__lbl { color: rgb(var(--tl-rgb, 148,163,184)); }
.tal-tl__empty { color: var(--text-secondary); font-size: .88rem; padding: 4px 2px; }

/* ---------- franja de métricas ---------- */
.tal-metastrip {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  padding: 12px 16px; border-radius: var(--radius-md, 14px);
}
.tal-mcell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tal-metastrip .tal-lbl {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; opacity: .7;
}

/* ---------- rejilla de tres paneles ---------- */
.tal-dash__cols {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
  align-items: start;
}
.tal-panel { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.tal-panel__head { display: flex; align-items: flex-start; gap: 10px; }
.tal-panel__head > svg { flex: 0 0 auto; opacity: .85; margin-top: 2px; }
.tal-panel__t { flex: 1 1 auto; min-width: 0; }
.tal-panel__t h3 { margin: 0; font-size: 1.02rem; color: var(--text-primary); }
.tal-panel__sub { margin: 3px 0 0; font-size: .8rem; color: var(--text-secondary); line-height: 1.4; }
.tal-panel__badge {
  flex: 0 0 auto; align-self: flex-start;
  padding: 2px 10px; border-radius: 999px; font-size: .7rem; font-weight: 600;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

/* ---------- bloques «solo administrador» ---------- */
.tal-solo-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .66rem; font-weight: 600; letter-spacing: .02em;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(250,204,21,.14); border: 1px solid rgba(250,204,21,.4);
  color: var(--text-secondary);
}
/* Previsualización TÉCNICO: oculta lo exclusivo de administrador.
   NOTA: esto es SOLO visual; la visibilidad real sigue dependiendo
   de los permisos del backend/front. */
.tal-preview-tecnico .tal-solo-admin { display: none !important; }

/* ---------- historial y auditoría desplegable ---------- */
.tal-audit { padding: 12px 16px; border-radius: var(--radius-md, 14px); }
.tal-audit__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.tal-audit__head > svg { opacity: .85; }
.tal-audit__last { color: var(--text-secondary); font-size: .82rem; }
.tal-audit__head #tal-hist-toggle { margin-left: auto; }
.tal-audit .tal-hist { margin-top: 12px; }
.tal-audit .tal-hist[hidden] { display: none; }

/* ---------- servicio anulado ---------- */
.tal-dash.is-anulado .tal-dash__head { opacity: .92; }

/* ---------- accesibilidad: foco visible ---------- */
.tal-role:focus-visible,
.tal-back:focus-visible,
#tal-hist-toggle:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb, 56,132,222), .8); outline-offset: 2px;
}

/* ---------- responsive ----------
   DANGOFE-TALLER-097 · rejilla real 3 / 2 / 1: escritorio 3 columnas, tablet
   2 columnas (≤1200px) y móvil 1 columna (≤760px). Nada se oculta: las tres
   secciones lógicas siempre quedan accesibles, solo cambia la disposición. */
@media (max-width: 1200px) {
  .tal-dash__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tal-dash__cols { grid-template-columns: 1fr; }
  .tal-hcell--total { margin-left: 0; text-align: left; align-items: flex-start; }
  .tal-hcell__v { max-width: 100%; }
}
@media (max-width: 560px) {
  .tal-dash__head, .tal-metastrip { padding: 12px; }
  .tal-roleswitch { width: 100%; justify-content: center; }
}

/* ---------- accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .tal-role { transition: none; }
}

/* ===========================================================================
   DANGOFE-TALLER-096 · v1.0.96
   - Rediseño «Liquid Glass» del Diagnóstico (solo visual): tarjetas de vidrio
     esmerilado que distinguen el campo EDITABLE del SOLO LECTURA.
   - Nota de «mano de obra definida en la cotización» (bloqueo con cotización).
   =========================================================================== */
/* DANGOFE-TALLER-097 · el diagnóstico y las notas SIEMPRE se apilan (una sola
   columna). El panel «Trabajo técnico» ocupa un tercio del ancho en escritorio,
   demasiado estrecho para poner «Condición de entrada» y «Accesorios» lado a
   lado sin recortarlos. minmax(0,1fr) impide además que un texto largo sin
   espacios fuerce la pista más ancha que la columna y desborde la tarjeta. */
.tal-diag-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 4px;
}
.tal-diag-field {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
  padding: 14px 16px; border-radius: 16px;
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
}
.tal-diag-field--edit {
  background: var(--glass-bg);
  border-color: rgba(var(--accent-rgb, 56,132,222), .45);
}
.tal-diag-field--edit::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 3px; background: rgba(var(--accent-rgb, 56,132,222), .75);
}
/* DANGOFE-TALLER-097 · flex-wrap evita que la insignia («Solo lectura» /
   «Editable») se encime sobre el título cuando la columna es estrecha: si no
   caben en una línea, la insignia baja a la siguiente. */
.tal-diag-field__head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px 10px;
}
.tal-diag-field__t {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0;
  font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
  font-weight: 700; opacity: .82; overflow-wrap: anywhere;
}
.tal-diag-field__t svg { opacity: .7; flex: 0 0 auto; }
.tal-diag-badge {
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.tal-diag-badge--edit {
  color: rgba(var(--accent-rgb, 56,132,222), 1);
  background: rgba(var(--accent-rgb, 56,132,222), .14);
  border: 1px solid rgba(var(--accent-rgb, 56,132,222), .4);
}
.tal-diag-badge--ro {
  opacity: .7; background: var(--glass-bg-hover); border: 1px solid var(--glass-border);
}
.tal-diag-ta {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-input); color: inherit;
  font: inherit; font-size: .9rem; line-height: 1.5; outline: none; resize: vertical;
}
.tal-diag-ta:focus {
  border-color: rgba(var(--accent-rgb, 56,132,222), .7);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 56,132,222), .16);
}
.tal-diag-val {
  font-size: .9rem; line-height: 1.5; white-space: pre-wrap;
  /* DANGOFE-TALLER-097 · overflow-wrap:anywhere corta palabras larguísimas
     (URLs, seriales) sin desbordar la tarjeta. */
  word-break: break-word; overflow-wrap: anywhere; max-width: 100%;
}
.tal-mo-nota {
  display: block; font-size: .74rem; line-height: 1.4; opacity: .7; margin-top: 3px;
}


/* ===========================================================================
   DANGOFE-TALLER-097 · v1.0.97
   1) Detalle responsive SIN cortes: refuerza el ajuste de texto en paneles y
      celdas, y evita zonas sueltas debajo del dashboard (vista enfocada).
   2) Panel de GARANTÍA visible en «Control y cierre».
   =========================================================================== */

/* ---------- vista ENFOCADA del detalle ----------
   Con el detalle abierto se ocultan la lista, el mini tablero, el inventario y
   las solicitudes para que no aparezcan sueltos bajo el dashboard (p. ej. el
   botón «Inventario de piezas»). El botón «Volver» restituye todo. */
.tal-wrap--detalle #tal-mini,
.tal-wrap--detalle #tal-tablero,
.tal-wrap--detalle #tal-invzone,
.tal-wrap--detalle #tal-viszone,
.tal-wrap--detalle #tal-solzone { display: none !important; }

/* ---------- ajuste de texto general dentro de los paneles ----------
   Blindaje contra recortes horizontales: cualquier contenido del panel puede
   encoger y las palabras larguísimas se parten. No cambia el diseño visible. */
.tal-panel { min-width: 0; }
.tal-panel .tal-sec { min-width: 0; }
.tal-detgrid > div,
.tal-totales > div { overflow-wrap: anywhere; min-width: 0; }
.tal-hcell__v,
.tal-mcell { overflow-wrap: anywhere; }

/* ---------- panel de GARANTÍA (Control y cierre) ---------- */
.tal-gar-panel {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 14px 16px; border-radius: 16px;
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
}
.tal-gar-panel__head {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
  font-weight: 700; opacity: .82;
}
.tal-gar-panel__head svg { opacity: .7; flex: 0 0 auto; }
.tal-gar-panel__estado { display: flex; flex-wrap: wrap; gap: 6px; }
.tal-gar-panel__msg {
  margin: 0; font-size: .86rem; line-height: 1.45; color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.tal-gar-panel__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px 16px;
}
.tal-gar-panel__grid > div { font-size: .9rem; min-width: 0; overflow-wrap: anywhere; }
.tal-gar-panel__grid .tal-lbl {
  display: block; font-size: .68rem; letter-spacing: .04em;
  text-transform: uppercase; opacity: .7; margin-bottom: 1px;
}
.tal-gar-panel__terms {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 8px; border-top: 1px solid var(--glass-border);
}
.tal-gar-term .tal-lbl {
  display: block; font-size: .68rem; letter-spacing: .04em;
  text-transform: uppercase; opacity: .7; margin-bottom: 2px;
}
.tal-gar-term p {
  margin: 0; font-size: .84rem; line-height: 1.45; color: var(--text-secondary);
  overflow-wrap: anywhere;
}



/* ===========================================================================
   DANGOFE-TALLER-098 · v1.0.98
   Rediseño del detalle en PESTAÑAS (Propuesta 1):
   - Tarjeta RESUMEN de 5 celdas (.tal-sumgrid).
   - Encabezado compacto: «Última actualización» (.tal-dash__upd).
   - Pestañas de contenido (.tal-tabs / .tal-tab / .tal-tabpane).
   - Rejilla de dos columnas dentro de la pestaña técnica (.tal-cols2).
   - Barra de acción fija inferior (.tal-actionbar) con menú «Más acciones»
     (.tal-menu). Todo hereda el tema Liquid Glass mediante variables.
   =========================================================================== */

/* ---------- «Última actualización» en el encabezado compacto ---------- */
.tal-dash__upd { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-left: auto; text-align: right; }
.tal-dash__upd .tal-lbl {
  font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; opacity: .7;
}
.tal-dash__upd-v { font-size: .9rem; font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }

/* ---------- tarjeta RESUMEN de 5 celdas ---------- */
.tal-sumgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 18px; padding: 16px; border-radius: var(--radius-md, 14px);
}
.tal-rcell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tal-rcell .tal-lbl {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; opacity: .7;
}
.tal-rcell .tal-lbl svg { opacity: .8; flex: 0 0 auto; }
.tal-rcell__v {
  display: flex; flex-direction: column; gap: 1px;
  font-size: .96rem; font-weight: 600; color: var(--text-primary);
  min-width: 0; word-break: break-word; overflow-wrap: anywhere;
}
.tal-rcell__sub { font-size: .78rem; font-weight: 500; color: var(--text-secondary); overflow-wrap: anywhere; }

/* ---------- pestañas de contenido ---------- */
.tal-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 4px; border-radius: 999px;
  background: var(--glass-bg-input); border: 1px solid var(--glass-border);
}
.tal-tab {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  font: inherit; font-size: .86rem; font-weight: 600; color: var(--text-secondary);
  transition: background var(--t-fast, .15s), color var(--t-fast, .15s);
  white-space: nowrap;
}
.tal-tab svg { opacity: .8; flex: 0 0 auto; }
.tal-tab:hover { color: var(--text-primary); }
.tal-tab.is-on {
  color: var(--text-primary);
  background: rgba(var(--accent-rgb, 56,132,222), .22);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb, 56,132,222), .4);
}
.tal-tab:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb, 56,132,222), .8); outline-offset: 2px;
}
/* DANGOFE-taller-099 · la barra de acción inferior es sticky (position:sticky;
   bottom:0). Sin espacio inferior, los últimos campos de la pestaña
   «Facturación y garantía» (monto de cotización, RNC/nombre fiscal) quedan
   atrapados BAJO la barra y no se pueden terminar de escribir. Este colchón
   permite desplazarlos por ENCIMA de la barra fija. */
.tal-tabpanes { display: block; padding-bottom: 96px; }
.tal-tabpane { display: none; }
.tal-tabpane.is-on { display: block; }

/* ---------- rejilla de dos columnas (pestaña técnica) ---------- */
.tal-cols2 {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
  align-items: start;
}
.tal-cols2 > .tal-panel { min-width: 0; }

/* ---------- historial a ancho completo ---------- */
.tal-hist--full { margin-top: 4px; }

/* ---------- barra de acción fija inferior ---------- */
.tal-actionbar {
  position: sticky; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 16px;
  border-radius: var(--radius-md, 14px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 -6px 24px rgba(0,0,0,.16);
}
.tal-actionbar__info {
  flex: 1 1 220px; min-width: 0;
  font-size: .85rem; font-weight: 600; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tal-actionbar__right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.tal-actionbar__go {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .95rem; font-weight: 700; padding: 10px 20px; white-space: nowrap;
}
.tal-actionbar__go[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- menú «Más acciones» ---------- */
.tal-menu { position: relative; flex: 0 0 auto; }
.tal-menu__pop {
  position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 50;
  min-width: 220px; max-width: 280px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border-radius: 14px;
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
}
.tal-menu__pop[hidden] { display: none; }
.tal-menu__item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer;
  padding: 9px 12px; border-radius: 10px;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--text-primary);
  transition: background var(--t-fast, .15s);
}
.tal-menu__item svg { opacity: .8; flex: 0 0 auto; }
.tal-menu__item:hover { background: var(--glass-bg-hover); }
.tal-menu__item--danger { color: rgb(239,68,68); }
.tal-menu__item--danger:hover { background: rgba(239,68,68,.12); }

/* La barra fija no debe tapar el último contenido de la pestaña. */
.tal-dash { padding-bottom: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .tal-cols2 { grid-template-columns: 1fr; }
  /* DANGOFE-taller-099 · en pantallas estrechas la barra fija se apila en
     columna y ocupa más alto; se amplía el colchón inferior. */
  .tal-tabpanes { padding-bottom: 140px; }
}
@media (max-width: 640px) {
  .tal-tabs { flex-wrap: nowrap; overflow-x: auto; border-radius: 14px; }
  .tal-tab { flex: 0 0 auto; }
  .tal-dash__upd { margin-left: 0; text-align: left; }
  .tal-actionbar { flex-direction: column; align-items: stretch; }
  .tal-actionbar__info { white-space: normal; }
  .tal-actionbar__right { justify-content: space-between; }
  .tal-actionbar__go { flex: 1 1 auto; justify-content: center; }
  .tal-menu__pop { left: 0; right: auto; min-width: 0; width: 100%; max-width: none; }
}


/* ===========================================================================
   DANGOFE-taller-102 · v1.0.102 — SISTEMA VISUAL PROFESIONAL DEL TALLER
   Capa FINAL y coherente sobre las anteriores (todo bajo .tal-wrap, así no
   afecta a otros módulos):
   - Tokens propios por tema (superficies, líneas, etiquetas, sombras).
   - Botón principal = acción principal de la app (--action-primary-*).
   - Estados con su color también en CLARO (themes.css v1.0.48 los pintaba
     de gris con [data-theme='light'] .tal-pill/.tal-btn/.tal-tag).
   - Línea de tiempo: completado en verde, solo la etapa actual con color.
   - Barra de acción de vidrio real (desenfoque + saturación).
   =========================================================================== */

/* ---------- tokens ---------- */
.tal-wrap {
  --tal-r-lg: 20px; --tal-r-md: 14px; --tal-r-sm: 10px;
  --tal-accent: var(--accent-rgb, 56, 132, 222);
  --tal-done: 34, 197, 94;
  --tal-surface: rgba(255, 255, 255, .035);
  --tal-surface-hi: rgba(255, 255, 255, .065);
  --tal-line: rgba(255, 255, 255, .08);
  --tal-line-hi: rgba(255, 255, 255, .15);
  --tal-label: rgba(232, 236, 244, .56);
  --tal-shadow: 0 10px 30px rgba(0, 0, 0, .32);
  --tal-bar-bg: rgba(16, 18, 26, .66);
  --tal-mix: #fff;              /* mezcla para el texto de color (legible) */
}
[data-theme='light'] .tal-wrap {
  --tal-surface: rgba(255, 255, 255, .55);
  --tal-surface-hi: rgba(255, 255, 255, .92);
  --tal-line: rgba(15, 23, 42, .075);
  --tal-line-hi: rgba(15, 23, 42, .13);
  --tal-label: #6b7280;
  --tal-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px rgba(15, 23, 42, .06);
  --tal-bar-bg: rgba(255, 255, 255, .72);
  --tal-mix: #000;
}

/* ---------- color por estado (una sola variable por estado) ---------- */
.tal-est-recibido                { --est-rgb: 100, 116, 139; }
.tal-est-en-cola                 { --est-rgb: 99, 102, 241; }
.tal-est-en-mesa-de-chequeo,
.tal-est-diagnostico-completado,
.tal-est-diagnostico             { --est-rgb: 14, 165, 233; }
.tal-est-cotizacion-enviada,
.tal-est-esperando-aprobacion    { --est-rgb: 234, 179, 8; }
.tal-est-cotizacion-aprobada     { --est-rgb: 34, 197, 94; }
.tal-est-cotizacion-declinada,
.tal-est-cancelado               { --est-rgb: 239, 68, 68; }
.tal-est-en-reparacion,
.tal-est-reparacion              { --est-rgb: 168, 85, 247; }
.tal-est-en-prueba,
.tal-est-pruebas                 { --est-rgb: 249, 115, 22; }
.tal-est-listo                   { --est-rgb: 16, 185, 129; }
.tal-est-entregado               { --est-rgb: 22, 163, 74; }

.tal-wrap .tal-pill {
  gap: 6px; padding: 3px 10px; font-size: .74rem; font-weight: 650; letter-spacing: .01em;
  color: var(--text-primary);
  background: var(--tal-surface-hi); border: 1px solid var(--tal-line-hi);
}
.tal-wrap .tal-pill[class*='tal-est-'] {
  color: color-mix(in srgb, rgb(var(--est-rgb)) 72%, var(--tal-mix));
  background: rgba(var(--est-rgb), .12);
  border-color: rgba(var(--est-rgb), .32);
}

/* ---------- etiquetas y títulos ---------- */
.tal-wrap .tal-lbl,
.tal-wrap .tal-rcell .tal-lbl,
.tal-wrap .tal-metastrip .tal-lbl,
.tal-wrap .tal-dash__upd .tal-lbl {
  color: var(--tal-label); opacity: 1;
  font-size: .68rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
}
/* Encabezado de sección: icono y texto en la MISMA línea (antes se apilaban). */
.tal-wrap .tal-cardhead h4 {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--tal-label); opacity: 1;
}
.tal-wrap .tal-cardhead h4 svg { flex: 0 0 auto; }
/* DANGOFE-taller-103: títulos de los formularios de factura/entrega con el
   icono en la misma línea (en producción el icono quedaba encima). */
.tal-wrap .tal-facturar__box h4,
.tal-wrap .tal-entrega__form h4 {
  display: flex; align-items: center; gap: 8px; margin: 4px 0 2px;
  font-size: 1rem; font-weight: 700; color: var(--text-primary);
}
.tal-wrap .tal-panel__head { align-items: center; gap: 12px; }
.tal-wrap .tal-panel__head > svg {
  box-sizing: content-box; padding: 8px; margin: 0; border-radius: 11px; opacity: 1;
  color: rgb(var(--tal-accent));
  background: rgba(var(--tal-accent), .1);
  box-shadow: inset 0 0 0 1px rgba(var(--tal-accent), .18);
}
.tal-wrap .tal-panel__t h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.tal-wrap .tal-panel__badge {
  align-self: center; background: var(--tal-surface-hi); border-color: var(--tal-line-hi);
  color: var(--tal-label); font-weight: 650;
}

/* ---------- superficies del detalle ---------- */
.tal-wrap .tal-dash { gap: 16px; }
.tal-wrap .tal-dash__head,
.tal-wrap .tal-sumgrid,
.tal-wrap .tal-tlwrap,
.tal-wrap .tal-metastrip,
.tal-wrap .tal-panel { border-radius: var(--tal-r-lg); box-shadow: var(--tal-shadow); }
.tal-wrap .tal-dash__head { padding: 14px 18px; }
.tal-wrap .tal-dash__id { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.tal-wrap .tal-dash__num { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.tal-wrap .tal-dash__id .tal-pill { font-size: .8rem; padding: 4px 12px; }
.tal-wrap .tal-sumgrid { padding: 18px 20px; gap: 16px 24px; }
.tal-wrap .tal-rcell__v { font-size: 1rem; font-weight: 650; }
.tal-wrap .tal-rcell__sub { color: var(--tal-label); font-weight: 500; }
.tal-wrap .tal-metastrip { padding: 14px 20px; gap: 12px 32px; }
.tal-wrap .tal-mcell { font-weight: 600; }
.tal-wrap .tal-panel { padding: 18px 20px; gap: 16px; }
.tal-wrap .tal-sec { border-top-color: var(--tal-line); padding-top: 14px; }

/* ---------- línea de tiempo ---------- */
.tal-wrap .tal-tlwrap { padding: 18px 16px 14px; }
.tal-wrap .tal-tl__step::before { top: 14px; height: 2px; background: rgba(var(--tal-done), .45); }
.tal-wrap .tal-tl__dot {
  width: 30px; height: 30px; font-size: .78rem;
  color: rgb(var(--tal-done));
  background: color-mix(in srgb, rgb(var(--tal-done)) 12%, var(--bg-page, #fff));
  box-shadow: inset 0 0 0 1.5px rgba(var(--tal-done), .55);
}
.tal-wrap .tal-tl__lbl { font-size: .76rem; font-weight: 600; color: var(--text-secondary); }
.tal-wrap .tal-tl__date { font-size: .68rem; color: var(--tal-label); }
.tal-wrap .tal-tl__step.is-actual .tal-tl__dot {
  color: #fff; background: rgb(var(--tl-rgb, var(--tal-done)));
  outline: 0; box-shadow: 0 0 0 4px rgba(var(--tl-rgb, var(--tal-done)), .18),
    0 4px 14px rgba(var(--tl-rgb, var(--tal-done)), .4);
}
.tal-wrap .tal-tl__step.is-actual .tal-tl__lbl {
  color: color-mix(in srgb, rgb(var(--tl-rgb, var(--tal-done))) 75%, var(--tal-mix)); font-weight: 750;
}

/* ---------- pestañas (control segmentado) ---------- */
.tal-wrap .tal-tabs {
  gap: 4px; padding: 5px; border-radius: 16px;
  background: var(--tal-surface); border: 1px solid var(--tal-line);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
}
.tal-wrap .tal-tab { border-radius: 11px; padding: 9px 16px; color: var(--tal-label); }
.tal-wrap .tal-tab:hover { color: var(--text-primary); background: var(--tal-surface-hi); }
.tal-wrap .tal-tab.is-on {
  color: var(--text-primary); background: var(--tal-surface-hi);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), inset 0 0 0 1px var(--tal-line-hi);
}

/* ---------- campos del diagnóstico ---------- */
.tal-wrap .tal-diag-field {
  background: var(--tal-surface); border-color: var(--tal-line);
  box-shadow: none; border-radius: var(--tal-r-md);
}
.tal-wrap .tal-diag-field--edit {
  background: var(--tal-surface-hi);
  border-color: rgba(var(--tal-accent), .35);
  box-shadow: 0 0 0 3px rgba(var(--tal-accent), .06);
}
.tal-wrap .tal-diag-field__t { color: var(--tal-label); opacity: 1; font-size: .72rem; }
.tal-wrap .tal-diag-badge--ro { opacity: 1; color: var(--tal-label); background: transparent; border-color: var(--tal-line-hi); }
.tal-wrap .tal-diag-val { color: var(--text-primary); }

/* ---------- campos de texto y selectores ---------- */
.tal-wrap .tal-diag-ta,
.tal-wrap .tal-msgs__composer textarea,
.tal-wrap .tal-field input,
.tal-wrap .tal-field select,
.tal-wrap .tal-field textarea,
.tal-wrap .tal-mo input,
.tal-wrap .tal-buscador__inp {
  background: var(--tal-surface-hi); border: 1px solid var(--tal-line-hi); color: var(--text-primary);
  border-radius: 12px;
}
.tal-wrap .tal-diag-ta:focus,
.tal-wrap .tal-msgs__composer textarea:focus,
.tal-wrap .tal-field input:focus,
.tal-wrap .tal-field select:focus,
.tal-wrap .tal-field textarea:focus,
.tal-wrap .tal-buscador__inp:focus {
  outline: none; border-color: rgba(var(--tal-accent), .6);
  box-shadow: 0 0 0 3px rgba(var(--tal-accent), .15);
}

/* ---------- botones ---------- */
.tal-wrap .tal-btn {
  font-weight: 600; color: var(--text-primary);
  background: var(--tal-surface-hi); border: 1px solid var(--tal-line-hi);
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.tal-wrap .tal-btn:hover:not(:disabled) { border-color: rgba(var(--tal-accent), .4); background: var(--tal-surface-hi); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.tal-wrap .tal-btn:active:not(:disabled) { transform: translateY(1px); }
.tal-wrap .tal-btn--primary {
  color: var(--action-primary-text, #fff); background: var(--action-primary-bg, #111);
  border-color: var(--action-primary-border, transparent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
}
.tal-wrap .tal-btn--primary:hover:not(:disabled) {
  background: var(--action-primary-bg, #111); border-color: var(--action-primary-border, transparent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22); filter: brightness(1.08);
}
.tal-wrap .tal-btn--danger { color: rgb(220, 38, 38); background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .35); }
.tal-wrap .tal-btn:focus-visible { outline: 2px solid rgba(var(--tal-accent), .8); outline-offset: 2px; }

/* ---------- etiquetas de estado (también en claro) ---------- */
.tal-wrap .tal-tag { background: var(--tal-surface-hi); border-color: var(--tal-line-hi); font-weight: 650; }
.tal-wrap .tal-tag--ok     { --tag-rgb: 22, 163, 74; }
.tal-wrap .tal-tag--warn   { --tag-rgb: 217, 119, 6; }
.tal-wrap .tal-tag--danger { --tag-rgb: 220, 38, 38; }
.tal-wrap .tal-tag--info   { --tag-rgb: 2, 132, 199; }
.tal-wrap .tal-tag--ok, .tal-wrap .tal-tag--warn, .tal-wrap .tal-tag--danger, .tal-wrap .tal-tag--info {
  color: color-mix(in srgb, rgb(var(--tag-rgb)) 80%, var(--tal-mix));
  background: rgba(var(--tag-rgb), .1); border-color: rgba(var(--tag-rgb), .3);
}

/* ---------- tabla de piezas ---------- */
.tal-wrap .tal-tablewrap { border: 1px solid var(--tal-line); border-radius: var(--tal-r-md); background: var(--tal-surface); }
.tal-wrap .tal-tabla th {
  background: transparent; color: var(--tal-label); opacity: 1;
  font-size: .68rem; font-weight: 650; letter-spacing: .06em;
}
.tal-wrap .tal-tabla th, .tal-wrap .tal-tabla td { border-bottom-color: var(--tal-line); padding: 10px 12px; }
.tal-wrap .tal-tabla tbody tr:last-child td { border-bottom: 0; }

/* ---------- totales ---------- */
.tal-wrap .tal-totales {
  gap: 12px 28px; padding: 14px 16px; border-top: 0;
  border-radius: var(--tal-r-md); background: var(--tal-surface); border: 1px solid var(--tal-line);
  align-items: flex-end;
}
.tal-wrap .tal-totales .tal-total { margin-left: auto; text-align: right; font-size: 1.2rem; font-weight: 800; }

/* ---------- mensajería ---------- */
.tal-wrap .tal-msgs { border-top: 0; padding-top: 0; }
.tal-wrap .tal-msgs__lista { gap: 12px; max-height: 420px; padding: 4px 4px 8px; }
.tal-wrap .tal-msg {
  max-width: 82%; padding: 10px 14px; border-radius: 16px; gap: 4px;
  background: var(--tal-surface-hi); border: 1px solid var(--tal-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.tal-wrap .tal-msg--otro { border-bottom-left-radius: 6px; }
.tal-wrap .tal-msg--mio {
  background: rgba(var(--tal-accent), .12); border-color: rgba(var(--tal-accent), .26);
  border-bottom-right-radius: 6px;
}
.tal-wrap .tal-msg__autor { font-size: .72rem; font-weight: 700; color: var(--tal-label); opacity: 1; }
.tal-wrap .tal-msg__texto { font-size: .92rem; line-height: 1.5; }
.tal-wrap .tal-msg__meta { font-size: .68rem; color: var(--tal-label); opacity: 1; }
.tal-wrap .tal-msgs__composer { border-top-color: var(--tal-line); padding-top: 12px; }
.tal-wrap .tal-msgs__acciones #tal-msg-enviar { margin-left: auto; }
.tal-wrap .tal-msgs__vacio { color: var(--tal-label); opacity: 1; justify-content: center; }

/* ---------- barra de acción de vidrio ---------- */
.tal-wrap .tal-actionbar,
.tal-actionbar {
  bottom: 12px; padding: 10px 12px 10px 18px; border-radius: 18px;
  background: var(--tal-bar-bg, rgba(16, 18, 26, .66));
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .12);
}
[data-theme='light'] .tal-actionbar { background: rgba(255, 255, 255, .72); }
.tal-actionbar__info { font-weight: 500; color: var(--text-secondary); }
.tal-actionbar__info strong { color: var(--text-primary); font-weight: 750; }
.tal-actionbar__go { border-radius: 12px; padding: 10px 18px; }
.tal-actionbar__estado {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 14px; border-radius: 12px;
  font-size: .88rem; font-weight: 650; color: var(--text-secondary);
  background: rgba(127, 127, 127, .1); border: 1px dashed rgba(127, 127, 127, .35);
}
.tal-actionbar__estado.is-hecho {
  color: rgb(22, 163, 74); background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .35);
}
.tal-menu__pop {
  background: var(--tal-bar-bg, rgba(16, 18, 26, .8));
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
}
[data-theme='light'] .tal-menu__pop { background: rgba(255, 255, 255, .9); }

/* ---------- resumen: tarjeta «Por facturar» y rejilla de 5 ---------- */
.tal-kpi--verde { --kpi-rgb: 16, 185, 129; }
@media (min-width: 1024px) {
  .tal-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

/* ---------- listado ---------- */
.tal-wrap .tal-srv { background: var(--tal-surface); border-color: var(--tal-line); }
.tal-wrap .tal-srv:hover {
  background: var(--tal-surface-hi); border-color: rgba(var(--tal-accent), .35);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .1);
}
.tal-wrap .tal-srv__num { color: var(--tal-label); opacity: 1; }
.tal-wrap .tal-chip { background: var(--tal-surface-hi); border-color: var(--tal-line-hi); color: var(--text-primary); }
.tal-wrap .tal-chip:hover { border-color: rgba(var(--tal-accent), .4); }
.tal-wrap .tal-chip--on,
.tal-wrap .tal-otros--on .tal-otros__sel {
  background: rgba(var(--tal-accent), .14); border-color: rgba(var(--tal-accent), .5); font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(var(--tal-accent), .2);
}
.tal-wrap .tal-chip__n { opacity: .7; font-weight: 700; }
.tal-wrap .tal-facpill--pend {
  color: color-mix(in srgb, rgb(16, 185, 129) 78%, var(--tal-mix));
  background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .4);
}
.tal-wrap .tal-chip--pf {
  gap: 6px; color: color-mix(in srgb, rgb(16, 185, 129) 78%, var(--tal-mix));
  background: rgba(16, 185, 129, .14); border-color: rgba(16, 185, 129, .45);
}
.tal-wrap .tal-nomas { color: var(--tal-label); opacity: 1; }

/* ===========================================================================
   DANGOFE-taller-104 · v1.0.104
   =========================================================================== */
/* El menú «Más acciones» se abre HACIA ARRIBA, fuera de la barra; .glass-soft
   trae overflow:hidden y lo recortaba (se veía una caja vacía). */
.tal-wrap .tal-actionbar, .tal-actionbar { overflow: visible; }

/* Piezas del inventario dentro de la factura */
.tal-facinv {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: var(--tal-r-md, 14px);
  background: var(--tal-surface-hi, rgba(255,255,255,.06)); border: 1px dashed var(--tal-line-hi, var(--glass-border));
}
.tal-facinv[hidden] { display: none; }
.tal-facinv__bar { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; align-items: end; }
.tal-facinv__bar .tal-field, .tal-facfecha .tal-field { min-width: 0; } /* .tal-field trae min-width:150px */
.tal-facinv .tal-buscador-res { max-height: 240px; overflow-y: auto; }
.tal-facinv .tal-buscador-item[disabled] { opacity: .5; cursor: not-allowed; }
.tal-facinv > .tal-muted { margin: 0; display: flex; align-items: center; gap: 6px; }

/* Fecha de entrega/facturación + garantía en vivo */
.tal-facfecha { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 10px 14px; align-items: end; }
.tal-facgar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px; font-size: .86rem; line-height: 1.4;
  color: color-mix(in srgb, rgb(22, 163, 74) 80%, var(--tal-mix, #000));
  background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .3);
}
.tal-facgar:empty { display: none; }
.tal-facgar.is-pronto, .tal-garbadge.is-pronto, .tal-rcell--gar.is-pronto .tal-rcell__v {
  color: color-mix(in srgb, rgb(217, 119, 6) 85%, var(--tal-mix, #000));
}
.tal-facgar.is-pronto { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .35); }
.tal-facgar.is-vencida { color: color-mix(in srgb, rgb(220, 38, 38) 80%, var(--tal-mix, #000)); background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .3); }

/* Garantía en el resumen del detalle */
.tal-rcell--gar.is-vigente .tal-rcell__v { color: color-mix(in srgb, rgb(22, 163, 74) 80%, var(--tal-mix, #000)); }
.tal-rcell--gar.is-vencida .tal-rcell__v { color: color-mix(in srgb, rgb(220, 38, 38) 80%, var(--tal-mix, #000)); }

/* Corregir fecha de entrega (panel de garantía) */
.tal-garfecha { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--tal-line, var(--glass-border)); }
.tal-garfecha > .tal-btn { align-self: flex-start; }
.tal-garfecha__form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.tal-garfecha__form[hidden] { display: none; }
.tal-garfecha__form .tal-field { flex: 0 1 220px; }

/* Garantía restante en cada fila del listado */
.tal-wrap .tal-srv__est { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tal-garbadge {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: .7rem; font-weight: 650; padding: 2px 8px; border-radius: 999px;
  color: color-mix(in srgb, rgb(22, 163, 74) 80%, var(--tal-mix, #000));
  background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .28);
}
.tal-garbadge.is-pronto { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .32); }
.tal-garbadge.is-vencida { color: var(--tal-label, #888); background: transparent; border-color: var(--tal-line-hi, var(--glass-border)); }

@media (max-width: 640px) {
  .tal-facfecha { grid-template-columns: 1fr; }
  .tal-facinv__bar { grid-template-columns: minmax(0, 1fr) 90px; }
}

/* ---------- barra de acción en móvil ----------
   En columna, la base «flex: 1 1 220px» del texto se convertía en 220 px de
   ALTO: la barra tapaba media pantalla con un hueco vacío. Ahora es compacta:
   una línea de contexto y los botones en fila. */
@media (max-width: 640px) {
  /* nowrap: con «column + wrap» el ancho de la línea lo fija el texto más largo
     y los botones se salían de la pantalla. */
  .tal-wrap .tal-actionbar { flex-wrap: nowrap; gap: 8px; padding: 10px; bottom: 8px; border-radius: 16px; }
  .tal-actionbar__info { flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .8rem; }
  .tal-actionbar__right { flex-wrap: nowrap; }
  .tal-actionbar__go, .tal-actionbar__estado { flex: 1 1 auto; justify-content: center; padding: 10px 12px; font-size: .9rem; }
  .tal-actionbar__estado { white-space: normal; text-align: center; }
  .tal-wrap .tal-dash__num { font-size: 1.2rem; }
  .tal-wrap .tal-sumgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 14px; }
  .tal-wrap .tal-tabpanes { padding-bottom: 110px; }
}

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .tal-wrap .tal-btn, .tal-wrap .tal-tab { transition: none; }
  .tal-wrap .tal-btn:active:not(:disabled) { transform: none; }
}


/* ===========================================================================
   DANGOFE-taller-105 · v1.0.105 — monto FACTURADO en el listado + INGRESOS
   =========================================================================== */
/* Listado: monto facturado (o cotizado) con su etiqueta */
.tal-wrap .tal-srv__total { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex-basis: 118px; }
.tal-srv__monto { font-weight: 700; }
.tal-srv__monto.is-cot { font-weight: 600; color: var(--text-secondary); }
.tal-srv__tlbl { font-size: .66rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--tal-label, #888); }
.tal-srv__tlbl.is-fac { color: color-mix(in srgb, rgb(22, 163, 74) 80%, var(--tal-mix, #000)); }
@media (max-width: 860px) { .tal-wrap .tal-srv__total { align-items: flex-start; flex-basis: auto; } }

/* Ingresos del taller */
.tal-wrap { --tal-bar: #2563eb; --tal-bar-hi: #1d4ed8; }
[data-theme='dark'] .tal-wrap { --tal-bar: #60a5fa; --tal-bar-hi: #93c5fd; }
.tal-wrap--detalle #tal-ingresos { display: none !important; }
.tal-ing { padding: 18px 20px; gap: 16px; }
.tal-ing.is-cargando { opacity: .7; }
.tal-ing__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.tal-ing__head h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; }
.tal-ing__filtros { display: flex; align-items: flex-end; gap: 8px 10px; flex-wrap: wrap; }
.tal-ing__presets { display: flex; gap: 6px; flex-wrap: wrap; }
.tal-ing__fecha { display: flex; flex-direction: column; gap: 3px; font-size: .7rem; font-weight: 650; color: var(--tal-label, #888); text-transform: uppercase; letter-spacing: .05em; }
.tal-ing__fecha input {
  padding: 6px 10px; border-radius: 10px; font: inherit; font-size: .85rem; text-transform: none; letter-spacing: 0; font-weight: 500;
  color: var(--text-primary); background: var(--tal-surface-hi, var(--glass-bg-input)); border: 1px solid var(--tal-line-hi, var(--glass-border));
}
.tal-ing__fichas { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tal-ing__ficha {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--tal-r-md, 14px);
  background: var(--tal-surface, rgba(255,255,255,.04)); border: 1px solid var(--tal-line, var(--glass-border));
}
.tal-ing__flbl { font-size: .72rem; font-weight: 650; color: var(--tal-label, #888); }
.tal-ing__fval { font-size: 1.25rem; font-weight: 750; letter-spacing: -.01em; color: var(--text-primary); }
.tal-ing__ficha.is-hero .tal-ing__fval { font-size: 1.55rem; }
.tal-ing__ficha.is-pend .tal-ing__fval { color: color-mix(in srgb, rgb(217, 119, 6) 85%, var(--tal-mix, #000)); }
.tal-ing__fsub { font-size: .72rem; color: var(--tal-label, #888); }
.tal-ing__grafica { position: relative; }
.tal-ing__gtit { font-size: .76rem; font-weight: 650; color: var(--tal-label, #888); margin-bottom: 4px; }
.tal-ing__svg { width: 100%; overflow: hidden; }
.tal-ing__svg svg { display: block; }
.tal-ing__grid { stroke: var(--tal-line, rgba(127,127,127,.2)); stroke-width: 1; }
.tal-ing__base { stroke: var(--tal-line-hi, rgba(127,127,127,.35)); stroke-width: 1; }
.tal-ing__eje { font-size: 11px; fill: var(--tal-label, #888); font-family: inherit; }
.tal-ing__valor { font-size: 11px; font-weight: 700; fill: var(--text-secondary); font-family: inherit; }
.tal-ing__barra { fill: var(--tal-bar); transition: fill .12s ease; }
.tal-ing__barra.is-on { fill: var(--tal-bar-hi); }
.tal-ing__hit { fill: transparent; cursor: pointer; outline: none; }
.tal-ing__hit:focus-visible { fill: rgba(var(--tal-accent, 56,132,222), .08); }
.tal-ing__tip {
  position: absolute; z-index: 5; min-width: 170px; pointer-events: none;
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; font-size: .8rem;
  background: var(--tal-bar-bg, rgba(16,18,26,.92)); color: var(--text-primary);
  border: 1px solid var(--glass-border); box-shadow: 0 10px 28px rgba(0,0,0,.2);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
[data-theme='light'] .tal-ing__tip { background: rgba(255,255,255,.96); }
.tal-ing__tip[hidden] { display: none; }
.tal-ing__tip b { font-size: .84rem; margin-bottom: 2px; }
.tal-ing__tip span { display: flex; justify-content: space-between; gap: 14px; }
.tal-ing__tip i { font-style: normal; color: var(--tal-label, #888); }
.tal-ing__tabla summary { cursor: pointer; font-size: .82rem; font-weight: 650; color: var(--text-secondary); padding: 4px 0; }
.tal-ing__tabla .tal-tablewrap { margin-top: 8px; }
.tal-ing__vacio, .tal-ing__cargando {
  display: flex; align-items: center; gap: 8px; padding: 14px; border-radius: var(--tal-r-md, 14px);
  color: var(--tal-label, #888); background: var(--tal-surface, transparent); border: 1px dashed var(--tal-line-hi, var(--glass-border));
}
@media (max-width: 640px) {
  .tal-ing { padding: 14px; }
  .tal-ing__filtros { width: 100%; }
  .tal-ing__fecha { flex: 1 1 130px; }
  .tal-ing__fichas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tal-ing__fval, .tal-ing__ficha.is-hero .tal-ing__fval { font-size: 1.1rem; white-space: nowrap; }
}

/* ===========================================================================
   DANGOFE-taller-106 · v1.0.106 — CAJA PROPIA DEL TALLER + COBROS
   =========================================================================== */
.tal-wrap { --tal-in: 22, 163, 74; --tal-out: 220, 38, 38; --tal-warn: 217, 119, 6; }
[data-theme='dark'] .tal-wrap { --tal-in: 74, 222, 128; --tal-out: 248, 113, 113; --tal-warn: 251, 191, 36; }
.tal-wrap--detalle #tal-caja { display: none !important; }

/* Avisos (también los usa el formulario de factura) */
.tal-alert {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--tal-r-sm, 10px);
  font-size: .84rem; line-height: 1.45; border: 1px solid var(--tal-line-hi, var(--glass-border)); background: var(--tal-surface, transparent);
}
.tal-alert svg { flex: 0 0 auto; margin-top: 2px; }
.tal-alert--warn { border-color: rgba(var(--tal-warn), .45); background: rgba(var(--tal-warn), .1); }
.tal-alert--error { border-color: rgba(var(--tal-out), .45); background: rgba(var(--tal-out), .08); }

/* Tarjeta plegable */
.tal-caja { padding: 0; gap: 0; overflow: hidden; }
.tal-caja.is-cargando .tal-caja__cuerpo { opacity: .7; }
.tal-caja__toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; margin: 0;
  background: transparent; border: 0; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
.tal-caja__toggle:focus-visible { outline: 2px solid rgba(var(--tal-accent), .8); outline-offset: -2px; border-radius: var(--tal-r-lg, 20px); }
.tal-caja__ico {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 12px; background: rgba(var(--tal-in), .14); color: rgb(var(--tal-in));
}
.tal-caja__tt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.tal-caja__tt b { font-size: 1.02rem; font-weight: 700; }
.tal-caja__tt small { font-size: .74rem; color: var(--tal-label, #888); }
.tal-caja__saldo { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; }
.tal-caja__saldo small { font-size: .66rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--tal-label, #888); }
.tal-caja__saldo b { font-size: 1.08rem; font-weight: 750; white-space: nowrap; }
.tal-caja__alerta {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; flex: 0 0 auto;
  color: color-mix(in srgb, rgb(var(--tal-warn)) 85%, var(--tal-mix, #000)); background: rgba(var(--tal-warn), .14); border: 1px solid rgba(var(--tal-warn), .4);
}
.tal-caja__chev { flex: 0 0 auto; color: var(--tal-label, #888); display: inline-flex; }
.tal-caja__cuerpo { display: flex; flex-direction: column; gap: 14px; padding: 0 18px 18px; }

.tal-caja__acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.tal-wrap .tal-caja__acciones .tal-btn.is-on { box-shadow: 0 0 0 2px rgba(var(--tal-accent), .45); }
.tal-caja__form, .tal-caja__subform {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--tal-r-md, 14px);
  background: var(--tal-surface, transparent); border: 1px solid var(--tal-line-hi, var(--glass-border));
}
.tal-caja__subform { margin: 4px 0 8px; background: var(--tal-surface-hi, transparent); }
.tal-caja__form h4 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: .95rem; }
.tal-caja__form .tal-muted, .tal-caja__subform .tal-muted { margin: 0; }
@media (min-width: 640px) { .tal-form__grid .tal-field--ancho { grid-column: span 2; } }

/* Primer uso */
.tal-caja__setup {
  display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--tal-r-md, 14px);
  border: 1px dashed var(--tal-line-hi, var(--glass-border)); background: var(--tal-surface, transparent);
}
.tal-caja__setup h4 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: .98rem; }
.tal-caja__setup p { margin: 0; }
.tal-caja__pasos { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.tal-caja__pasos li.is-ok { color: color-mix(in srgb, rgb(var(--tal-in)) 80%, var(--tal-mix, #000)); }
.tal-caja__pasos li svg { display: inline-block; vertical-align: -2px; }

/* Cobros que siguen en la Caja Chica general */
.tal-caja__traslado {
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--tal-r-md, 14px);
  border: 1px solid rgba(var(--tal-warn), .45); background: rgba(var(--tal-warn), .08);
}
.tal-caja__traslado p { margin: 0; font-size: .82rem; }
.tal-caja__trhead { display: flex; align-items: center; gap: 6px; color: color-mix(in srgb, rgb(var(--tal-warn)) 80%, var(--tal-mix, #000)); }
.tal-caja__trrow {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto; gap: 8px 12px; align-items: end;
  padding-top: 8px; border-top: 1px solid rgba(var(--tal-warn), .25);
}
.tal-caja__trinfo { font-size: .86rem; align-self: center; overflow-wrap: anywhere; }
.tal-caja__trinfo a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tal-caja__trcta { min-width: 0; }

/* Filtros, fichas y cuentas */
.tal-caja__filtros { display: flex; align-items: flex-end; gap: 8px 10px; flex-wrap: wrap; }
.tal-ing__fecha select {
  padding: 6px 10px; border-radius: 10px; font: inherit; font-size: .85rem; text-transform: none; letter-spacing: 0; font-weight: 500;
  color: var(--text-primary); background: var(--tal-surface-hi, var(--glass-bg-input)); border: 1px solid var(--tal-line-hi, var(--glass-border));
  max-width: 220px;
}
.tal-ing__ficha.is-in .tal-ing__fval { color: color-mix(in srgb, rgb(var(--tal-in)) 85%, var(--tal-mix, #000)); }
.tal-ing__ficha.is-out .tal-ing__fval, .tal-ing__ficha.is-neg .tal-ing__fval { color: color-mix(in srgb, rgb(var(--tal-out)) 85%, var(--tal-mix, #000)); }
.tal-caja__ctas { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tal-cta {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: var(--tal-r-md, 14px); min-width: 0;
  background: var(--tal-surface, transparent); border: 1px solid var(--tal-line, var(--glass-border));
}
.tal-cta.is-off { opacity: .6; }
.tal-cta.is-neg { border-color: rgba(var(--tal-out), .45); }
.tal-cta__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tal-cta__top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.tal-cta__ico {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: 0 0 auto;
  border-radius: 8px; background: var(--tal-surface-hi, transparent); border: 1px solid var(--tal-line, transparent);
}
.tal-cta__saldo { font-size: 1.2rem; font-weight: 750; letter-spacing: -.01em; margin: 2px 0; }
.tal-cta.is-neg .tal-cta__saldo { color: color-mix(in srgb, rgb(var(--tal-out)) 85%, var(--tal-mix, #000)); }
.tal-cta__meta { font-size: .76rem; color: var(--tal-label, #888); overflow-wrap: anywhere; }
.tal-cta__meta b { color: var(--text-secondary); font-weight: 650; }
.tal-cta__meta.is-warn { color: color-mix(in srgb, rgb(var(--tal-warn)) 85%, var(--tal-mix, #000)); }
.tal-caja__benefs { display: flex; flex-direction: column; gap: 6px; }
.tal-caja__benef { display: flex; align-items: flex-start; gap: 8px; font-size: .86rem; line-height: 1.45; }
.tal-caja__benef svg { flex: 0 0 auto; margin-top: 3px; }
.tal-caja__benef.is-warn { color: color-mix(in srgb, rgb(var(--tal-warn)) 85%, var(--tal-mix, #000)); }

/* Movimientos */
.tal-caja__movhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.tal-caja__movhead h4 { margin: 0; font-size: .92rem; }
.tal-caja__movs { display: flex; flex-direction: column; }
.tal-caja__lista { display: flex; flex-direction: column; border-top: 1px solid var(--tal-line, var(--glass-border)); }
.tal-mov {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center;
  padding: 10px 2px; border-bottom: 1px solid var(--tal-line, var(--glass-border));
}
.tal-mov__fecha { font-size: .8rem; color: var(--tal-label, #888); white-space: nowrap; }
.tal-mov__det { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tal-mov__concepto { font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.tal-mov__meta { font-size: .74rem; color: var(--tal-label, #888); overflow-wrap: anywhere; }
.tal-mov__meta a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tal-mov__anul { font-size: .74rem; color: color-mix(in srgb, rgb(var(--tal-out)) 85%, var(--tal-mix, #000)); display: inline-flex; align-items: center; gap: 4px; }
.tal-mov__monto { font-weight: 750; white-space: nowrap; text-align: right; display: inline-flex; align-items: center; gap: 3px; justify-content: flex-end; }
.tal-mov__monto.is-in { color: color-mix(in srgb, rgb(var(--tal-in)) 85%, var(--tal-mix, #000)); }
.tal-mov__monto.is-out { color: color-mix(in srgb, rgb(var(--tal-out)) 85%, var(--tal-mix, #000)); }
.tal-mov__monto.is-trf { color: var(--text-secondary); }
.tal-mov__acc { min-width: 0; }
.tal-mov.is-anulado .tal-mov__concepto, .tal-mov.is-anulado .tal-mov__monto { text-decoration: line-through; opacity: .6; }
.tal-caja__mas { align-self: center; margin-top: 8px; }

/* Configuración */
.tal-caja__conf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tal-caja__confsec { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tal-caja__confsec > .tal-muted { margin: 0 0 4px; }
.tal-caja__confhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tal-caja__confhead b { display: inline-flex; align-items: center; gap: 6px; }
.tal-caja__confrow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; font-size: .84rem;
  border-radius: var(--tal-r-sm, 10px); background: var(--tal-surface-hi, transparent); border: 1px solid var(--tal-line, transparent);
}
.tal-caja__confrow > span { min-width: 0; overflow-wrap: anywhere; }
.tal-caja__confrow .tal-btn { flex: 0 0 auto; }
.tal-caja__confrow.is-off { opacity: .6; }

/* Cobro en el detalle del servicio */
.tal-cobro {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; margin-bottom: 12px; border-radius: var(--tal-r-md, 14px);
  background: var(--tal-surface, transparent); border: 1px solid var(--tal-line-hi, var(--glass-border));
}
.tal-cobro > .tal-btn { align-self: flex-start; }
.tal-cobro .tal-muted { margin: 0; }
.tal-cobro__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tal-cobro__head .tal-lbl { display: inline-flex; align-items: center; gap: 6px; }
.tal-cobro__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tal-cobro__nums > div {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--tal-r-sm, 10px);
  background: var(--tal-surface-hi, transparent); border: 1px solid var(--tal-line, transparent); min-width: 0;
}
.tal-cobro__nums span { font-size: .7rem; font-weight: 650; color: var(--tal-label, #888); }
.tal-cobro__nums b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tal-cobro__nums .is-pend b { color: color-mix(in srgb, rgb(var(--tal-warn)) 85%, var(--tal-mix, #000)); }
.tal-cobro__nums .is-ok b { color: color-mix(in srgb, rgb(var(--tal-in)) 85%, var(--tal-mix, #000)); }
.tal-cobro__lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tal-cobro__item {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--tal-line, transparent); font-size: .84rem;
}
.tal-cobro__f { color: var(--tal-label, #888); font-size: .78rem; white-space: nowrap; }
.tal-cobro__d { min-width: 0; overflow-wrap: anywhere; color: var(--text-secondary); }
.tal-cobro__m { white-space: nowrap; }
.tal-cobro__item.is-anulado .tal-cobro__m { text-decoration: line-through; opacity: .6; }
.tal-cobro__form {
  display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--tal-r-sm, 10px);
  background: var(--tal-surface-hi, transparent); border: 1px solid var(--tal-line, transparent);
}
.tal-cobro__form h4 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: .92rem; }
.tal-fac-cobro .tal-cobro__campos { margin-top: 6px; }

@media (max-width: 760px) {
  .tal-caja__trrow { grid-template-columns: 1fr; }
  .tal-caja__trrow .tal-btn { justify-self: start; }
  .tal-caja__conf { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tal-caja__toggle { padding: 12px 14px; gap: 10px; }
  .tal-caja__tt small { display: none; }
  .tal-caja__cuerpo { padding: 0 14px 14px; }
  .tal-caja__filtros .tal-ing__fecha { flex: 1 1 130px; }
  .tal-ing__fecha select { max-width: none; width: 100%; }
  .tal-mov { grid-template-columns: minmax(0, 1fr) auto; }
  .tal-mov__fecha { grid-column: 1 / -1; }
  .tal-mov__acc { grid-column: 1 / -1; }
  .tal-mov__acc:empty { display: none; }
  .tal-cobro__nums b { font-size: .9rem; }
  .tal-cobro__item { grid-template-columns: minmax(0, 1fr) auto; }
  .tal-cobro__f { grid-column: 1 / -1; }
}
/* Fichas de la caja: 4 en fila cuando cabe y montos sin partirse */
.tal-caja .tal-ing__fichas { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.tal-caja .tal-ing__fval { white-space: nowrap; font-size: 1.15rem; }
.tal-caja .tal-ing__ficha.is-hero .tal-ing__fval { font-size: 1.3rem; }

/* ===========================================================================
   DANGOFE-taller-107 · v1.0.107 — REVISIÓN DEL INVENTARIO (costos y precios)
   =========================================================================== */
.tal-invfin__it small { font-size: .7rem; opacity: .7; }
.tal-invfin__it--neg { border-color: rgba(var(--tal-out, 220, 38, 38), .45); background: rgba(var(--tal-out, 220, 38, 38), .08); }
.tal-invfin__it--neg b { color: color-mix(in srgb, rgb(var(--tal-out, 220, 38, 38)) 85%, var(--tal-mix, #000)); }
#tal-invrev:empty { display: none; }
.tal-invrev { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.tal-invrev__bloque {
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--tal-r-md, 14px);
  background: var(--tal-surface, transparent); border: 1px solid var(--tal-line-hi, var(--glass-border));
}
.tal-invrev__bloque.is-warn { border-color: rgba(var(--tal-warn, 217, 119, 6), .45); background: rgba(var(--tal-warn, 217, 119, 6), .08); }
.tal-invrev__bloque.is-ok { flex-direction: row; align-items: center; gap: 8px; color: color-mix(in srgb, rgb(var(--tal-in, 22, 163, 74)) 85%, var(--tal-mix, #000)); }
.tal-invrev__bloque.is-info { flex-direction: row; align-items: flex-start; gap: 8px; font-size: .84rem; }
.tal-invrev__bloque.is-info svg, .tal-invrev__bloque.is-ok svg { flex: 0 0 auto; margin-top: 2px; }
.tal-invrev__bloque > .tal-muted, .tal-invrev__margen .tal-muted { margin: 0; }
.tal-invrev__tit { display: flex; align-items: center; gap: 6px; font-size: .92rem; }
.tal-invrev__bloque.is-warn .tal-invrev__tit { color: color-mix(in srgb, rgb(var(--tal-warn, 217, 119, 6)) 80%, var(--tal-mix, #000)); }
.tal-invrev__item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 10px; border-top: 1px solid rgba(var(--tal-warn, 217, 119, 6), .25);
}
.tal-invrev__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 320px; font-size: .86rem; }
.tal-invrev__txt span { color: var(--text-secondary); overflow-wrap: anywhere; }
.tal-invrev__acc { display: flex; flex-wrap: wrap; gap: 6px; }
.tal-invrev__margen { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; }
.tal-invrev__margen .tal-field { flex: 0 0 auto; min-width: 0; }
.tal-invrev__margen .tal-muted { flex: 1 1 260px; font-size: .82rem; }
.tal-invrev__pct { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.tal-invrev__pct input { width: 84px; }
.tal-invrev__tabla { max-height: 340px; overflow: auto; }
.tal-invrev__tabla thead th { position: sticky; top: 0; z-index: 1; background: var(--tal-surface-hi, var(--glass-bg)); }
.tal-invrev__tabla tr.is-sosp td { opacity: .75; }
.tal-invrev__chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.tal-invrev__chk input { width: 16px; height: 16px; flex: 0 0 auto; }
@media (max-width: 640px) {
  .tal-invrev__acc .tal-btn { flex: 1 1 auto; }
}

/* DANGOFE-taller-108 · contacto del taller en el portal de clientes */
.tal-portalcfg {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border-soft, rgba(255,255,255,.08));
  display: flex; flex-direction: column; gap: 10px;
}
.tal-portalcfg h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .98rem; }
.tal-portalcfg .tal-sub { margin: 0; }
.tal-portalcfg__fila { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.tal-portalcfg__fila .tal-field { flex: 0 1 260px; min-width: 0; }

/* DANGOFE-taller-109 · aviso de equipos sin tarifa de comisión */
.tal-sintarifa { margin-bottom: 10px; }
/* DANGOFE-taller-109 · en formularios en COLUMNA los campos no se estiran: el
   «flex: 1 1 180px» pensado para filas dejaba huecos de ~100 px (recepción). */
.tal-form > .tal-field, .tal-form > label.tal-field { flex: 0 0 auto; }

/* DANGOFE-taller-110 · tarifas por capacidad unificadas (comisión + estimado) */
.tal-comtramo__rango { color: #0369a1; }
.tal-comtramo__rango strong { color: #0c4a6e; }
[data-theme='dark'] .tal-comtramo__rango { color: #7dd3fc; }
[data-theme='dark'] .tal-comtramo__rango strong { color: #e0f2fe; }
.tal-comtramo__etq { flex: 2 1 260px; }
.tal-comtramo__grupo {
  margin: 10px 0 2px; padding: 10px 12px; border-radius: 12px;
  background: var(--tal-surface, rgba(255,255,255,.04)); border: 1px solid var(--tal-line, var(--glass-border));
}
.tal-comtramo__gtit { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }

/* DANGOFE-taller-111 · técnico asignado en el detalle */
.tal-mcell--tec { min-width: 170px; }
.tal-asig {
  margin-top: 2px; padding: 6px 10px; border-radius: 10px; font: inherit; font-size: .88rem; font-weight: 600; max-width: 100%;
  color: var(--text-primary); background: var(--tal-surface-hi, var(--glass-bg-input)); border: 1px solid var(--tal-line-hi, var(--glass-border));
}
.tal-asig:focus { outline: 2px solid rgba(var(--tal-accent), .6); outline-offset: 1px; }

/* DANGOFE-taller-112 · pagar comisiones al técnico desde la caja del taller */
.tal-compago__todos { align-self: flex-start; font-size: .86rem; font-weight: 600; }
.tal-compago__lista { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.tal-compago {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: var(--tal-surface, transparent); border: 1px solid var(--tal-line, var(--glass-border));
}
.tal-compago:hover { border-color: rgba(var(--tal-accent), .45); }
.tal-compago:has(input:checked) { border-color: rgba(var(--tal-accent), .6); background: rgba(var(--tal-accent), .07); }
.tal-compago input { flex: 0 0 auto; width: 18px; height: 18px; }
.tal-compago__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; font-size: .88rem; overflow-wrap: anywhere; }
.tal-compago__txt small { font-size: .76rem; color: var(--tal-label, #888); }
.tal-compago .tal-tag { flex: 0 0 auto; white-space: nowrap; }
.tal-compago__m { flex: 0 0 auto; font-size: .95rem; white-space: nowrap; }
.tal-compago__total {
  padding: 10px 12px; border-radius: 12px; font-size: .92rem;
  background: rgba(var(--tal-accent), .08); border: 1px solid rgba(var(--tal-accent), .3);
}
@media (max-width: 560px) {
  .tal-compago__lista { max-height: none; overflow: visible; }
  .tal-compago { flex-wrap: wrap; }
  .tal-compago__txt { flex-basis: calc(100% - 30px); }
  .tal-compago .tal-tag { margin-left: 28px; }
  .tal-compago__m { margin-left: auto; }
}
