/* ============================================================
   Sistema para Taller Mecánico: estilos
   Branding: azul #174f98 / gris claro #EBEBEB
   ============================================================ */

:root {
  --azul:        #174f98;
  --azul-osc:    #0f3a72;
  --azul-claro:  #2e68b5;
  --gris:        #EBEBEB;
  --gris-borde:  #d4d4d4;
  --texto:       #1f2937;
  --texto-suave: #6b7280;
  --blanco:      #ffffff;
  --rojo:        #d23b3b;
  --rojo-bg:     #fde8e8;
  --rojo-bg-hover: #fbdcdc;
  --ambar:       #c87f0a;
  --ambar-bg:    #fdf3e0;
  --verde:       #1f8a4c;
  --verde-bg:    #e6f4ec;
  --nav-sep:     rgba(159,187,224,.45);
  --sombra:      0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.06);
  --radio:       10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--texto);
  background: var(--gris);
  font-size: 14px;
}

body { display: flex; flex-direction: column; }
#app { display: flex; flex: 1; min-height: 0; overflow: hidden; }

/* ---------- Banner de datos de prueba (danger, punta a punta) ---------- */
.demo-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 44px 11px 16px; position: relative;
  background: var(--rojo); color: #fff; font-weight: 600; font-size: 13.5px;
  text-align: center;
}
.demo-banner a {
  color: #fff; font-weight: 800; text-decoration: underline;
  background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 6px;
}
.demo-banner a:hover { background: rgba(255,255,255,.32); }
.demo-cerrar {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; font-size: 16px; cursor: pointer;
  opacity: .85; line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.demo-cerrar:hover { opacity: 1; background: rgba(255,255,255,.2); }

/* ---------- Sidebar ---------- */
#sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--azul);
  color: #dce7f5;
  display: flex; flex-direction: column;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand-logo {
  width: 42px; height: 42px; flex-shrink: 0;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
/* Cuando hay un logo cargado: sin fondo ni recorte, se adapta al ancho */
.brand-logo.con-logo { background: transparent; width: auto; max-width: 160px; border-radius: 4px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { color: #fff; font-size: 15px; }
.brand-text span { font-size: 11px; color: #aac4e6; }

#nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
#nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin: 2px 0;
  color: #cfdcef; text-decoration: none;
  border-radius: 8px; font-weight: 500;
  transition: background .15s, color .15s;
}
#nav a:hover { background: rgba(255,255,255,.10); color: #fff; }
#nav a.active { background: var(--blanco); color: var(--azul); }

.sidebar-footer {
  padding: 14px 16px; font-size: 11px; color: #9fbbe0;
  border-top: 1px solid rgba(255,255,255,.12); text-align: center;
}
.sidebar-footer a { color: #fff; font-weight: 600; }

/* ---------- Main ---------- */
#main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
#topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: var(--blanco);
  border-bottom: 1px solid var(--gris-borde);
}
#pageTitle { margin: 0; font-size: 20px; color: var(--azul); }
.topbar-right { display: flex; gap: 8px; align-items: center; }
#content { flex: 1; overflow-y: auto; padding: 24px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid transparent; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--azul); color: #fff; transition: filter .15s, background .15s;
}
.btn:not(:disabled):hover { filter: brightness(1.08); }
.btn.secundario { background: var(--blanco); color: var(--azul); border-color: var(--azul); }
.btn.gris { background: #fff; color: var(--texto); border-color: var(--gris-borde); }
.btn.peligro { background: var(--rojo); }
.btn.peligro.secundario { background: #fff; color: var(--rojo); border-color: var(--rojo); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.icon-btn {
  background: none; border: none; cursor: pointer; font-size: 16px;
  color: var(--texto-suave); padding: 4px 6px; border-radius: 6px;
}
.icon-btn:hover, .icon-btn:focus-visible {
  background: var(--gris); color: var(--texto);
  outline: 2px solid var(--azul); outline-offset: 1px;
}
.icon-btn:disabled {
  opacity: .4; cursor: not-allowed; filter: grayscale(1);
}
.icon-btn:disabled:hover, .icon-btn:disabled:focus-visible {
  background: none; color: var(--texto-suave); outline: none;
}

/* Inputs deshabilitados (campo de solo lectura, p.ej. stock en edición) */
input:disabled, select:disabled, textarea:disabled {
  background: var(--gris); color: var(--texto-suave); cursor: not-allowed; opacity: 1;
}

/* ---------- Tarjetas ---------- */
.card {
  background: var(--blanco); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: 18px;
}
.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar .spacer { flex: 1; }

/* ---------- Buscador / inputs ---------- */
input, select, textarea {
  font: inherit; color: var(--texto);
  padding: 8px 10px; border: 1px solid var(--gris-borde);
  border-radius: 8px; background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(23,79,152,.12); }
.search { min-width: 240px; }
label { font-size: 12px; font-weight: 600; color: var(--texto-suave); display: block; margin-bottom: 4px; }
.campo { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Tablas ---------- */
.tabla-wrap { background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--azul); color: #fff; text-align: left;
  padding: 11px 14px; font-size: 12px; font-weight: 600;
  position: sticky; top: 0;
}
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--gris); }
tbody tr:hover { background: #f6f9fd; }
tbody tr.fila-baja { background: var(--rojo-bg); }
tbody tr.fila-baja:hover { background: var(--rojo-bg-hover); }
tbody tr.fila-deudor { background: #fff4e8; }
tbody tr.fila-deudor:hover { background: #ffecd4; }
tbody tr.fila-abierta { background: #eef4fc; }
tbody tr.fila-abierta:hover { background: #e3ecf8; }
tbody tr.fila-sin-stock { background: var(--rojo-bg); }
tbody tr.fila-sin-stock:hover { background: var(--rojo-bg-hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.acciones { display: flex; gap: 4px; justify-content: flex-end; }
.vacio { padding: 40px; text-align: center; color: var(--texto-suave); }

/* ---------- Badges de estado ---------- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.badge.normal   { background: var(--verde-bg); color: var(--verde); }
.badge.bajo     { background: var(--ambar-bg); color: var(--ambar); }
.badge.sin_stock{ background: var(--rojo-bg);  color: var(--rojo); }

/* ---------- Dashboard cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat {
  background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra);
  padding: 18px; display: flex; flex-direction: column; gap: 6px;
  border-left: 5px solid var(--azul);
}
.stat .valor { font-size: 30px; font-weight: 800; color: var(--azul); line-height: 1; }
.stat .etiqueta { color: var(--texto-suave); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.stat.alerta { border-left-color: var(--rojo); }
.stat.alerta .valor { color: var(--rojo); }
.stat.aviso  { border-left-color: var(--ambar); }
.stat.aviso .valor { color: var(--ambar); }

.seccion-titulo { margin: 6px 0 12px; color: var(--azul); font-size: 16px; }

/* ---------- Autocomplete ---------- */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--gris-borde); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14); max-height: 280px; overflow-y: auto;
}
.ac-item { padding: 9px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; border-left: 3px solid transparent; }
.ac-item:hover { background: #f0f5fb; }
.ac-item.activo { background: #dce7f5; border-left-color: var(--azul); }
.ac-item .ac-cod { font-weight: 700; color: var(--azul); }
.ac-item .ac-nom { color: var(--texto); flex: 1; margin: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-empty { padding: 12px; color: var(--texto-suave); text-align: center; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,30,55,.45);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: #fff; border-radius: 12px; width: min(560px, 92vw);
  max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--gris);
}
.modal-header h3 { margin: 0; color: var(--azul); font-size: 17px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--gris); display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #fff; border-left: 4px solid var(--azul); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); padding: 12px 16px; min-width: 240px;
  animation: slidein .2s ease;
  display: flex; align-items: flex-start; gap: 10px;
}
.toast > span { flex: 1; }
.toast-cerrar {
  background: none; border: none; cursor: pointer; color: var(--texto-suave);
  font-size: 14px; padding: 0 2px; line-height: 1;
}
.toast-cerrar:hover { color: var(--texto); }
.toast.exito { border-left-color: var(--verde); }
.toast.error { border-left-color: var(--rojo); }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Ayuda ---------- */
.ayuda-card { max-width: 680px; }
.ayuda-card p { line-height: 1.6; }
.ayuda-acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.muted { color: var(--texto-suave); }
.hidden { display: none !important; }
.help-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gris); }

/* ---------- Separador del menú (azul suave) ---------- */
.nav-sep { border: 0; border-top: 1px solid var(--nav-sep); margin: 10px 14px; }

/* ---------- Encabezados ordenables ---------- */
th.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
th.th-sort:hover { background: var(--azul-osc); }
th.th-activo { background: var(--azul-osc); }
.th-flecha { font-size: 10px; opacity: .8; }

/* ---------- Paginación ---------- */
.paginacion {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; padding: 12px 4px 4px;
}
.pag-btns { display: flex; align-items: center; gap: 6px; }
.pag-actual { font-size: 12px; color: var(--texto); padding: 6px 8px; background: var(--gris); border-radius: 4px; font-weight: 600; }

/* ---------- Filas ocultas (archivadas) ---------- */
tr.fila-archivada { color: var(--texto-suave); background-color: #fafafa; font-style: italic; }
tr.fila-archivada:hover { background-color: #f1f1f1; }
.badge.oculto { background: #e5e7eb; color: #4b5563; }

/* ---------- Badges propios de Gomería ---------- */
.badge.Abierta   { background: var(--ambar-bg); color: var(--ambar); }
.badge.Terminada { background: #e3ecf8;         color: var(--azul); }
.badge.Cobrada   { background: var(--verde-bg); color: var(--verde); }
.badge.Anulada   { background: var(--rojo-bg);  color: var(--rojo); }
.badge.Entrada   { background: var(--verde-bg); color: var(--verde); }
.badge.Salida    { background: var(--ambar-bg); color: var(--ambar); }
.badge.Nueva     { background: #e3ecf8;         color: var(--azul); }
.badge.Usada     { background: #e5e7eb;         color: #4b5563; }
.badge.Flota     { background: #e3ecf8;         color: var(--azul); }
.badge.Individual{ background: #e5e7eb;         color: #4b5563; }
.ord-add-servicios {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.ord-add-servicios .campo {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.ord-add-servicios .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Crear a medida */
#nav a.nav-medida { background: rgba(255,255,255,.16); color: #fff; font-weight: 700; }
#nav a.nav-medida:hover { background: rgba(255,255,255,.24); }
#nav a.nav-medida.active { background: var(--blanco); color: var(--azul); }
.medida { max-width: 820px; margin: 0 auto; padding: 18px 0 10px; }
.medida-titulo { margin: 0 0 12px; color: var(--azul); font-size: 38px; line-height: 1.15; font-weight: 800; text-align: center; }
.medida-bajada { margin: 0 0 24px; color: var(--texto-suave); font-size: 17px; text-align: center; }
.medida-form { padding: 24px; }
.medida-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.medida-form input:not([type=hidden]), .medida-form select, .medida-form textarea { width: 100%; }
.medida-form textarea { resize: vertical; }
.medida-enviar { width: 100%; justify-content: center; text-align: center; padding: 14px; font-size: 16px; font-weight: 700; }
.medida-alt { margin-top: 18px; padding: 20px 24px; text-align: center; }
.medida-alt h3 { margin: 0 0 4px; color: var(--azul); font-size: 18px; }
.medida-alt p { margin: 0; color: var(--texto-suave); }
.medida-alt .ayuda-acciones { justify-content: center; }
@media (max-width: 640px) {
  .ord-add-servicios { flex-direction: column; align-items: stretch; }
  .ord-add-servicios .btn { width: 100%; }
}

/* ---------- Ventanas estrechas ---------- */
@media (max-width: 900px) {
  #sidebar { width: 72px; }
  #sidebar .brand-text,
  #sidebar nav a span,
  #sidebar .sidebar-footer { display: none; }
  #sidebar nav a { justify-content: center; padding: 12px 8px; }
  #sidebar .brand { justify-content: center; }
  .grid-2 { grid-template-columns: 1fr; }
  .search { min-width: 0; width: 100%; }
}

/* =================================================================== *
 *  Taller mecánico
 * =================================================================== */
input, select, textarea { width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; }
.modal.ancho { width: min(760px, 94vw); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; margin: 0 0 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .span2 { grid-column: span 2; }
.form-col { display: flex; flex-direction: column; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 14px; }
.filtros .campo { margin: 0; min-width: 150px; }
.filtros .check { margin: 0 0 9px; }
.btn-grupo { display: flex; flex-wrap: wrap; gap: 8px; }
.card-titulo { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-titulo h3, .card h3 { margin: 0 0 10px; color: var(--azul); font-size: 15px; }
.card-titulo h3 { margin: 0; }
.aviso { background: var(--ambar-bg); color: #7a4d06; }
.aviso-peligro { background: var(--rojo-bg); color: var(--rojo); font-weight: 600; }
tbody tr.fila-anulada td, .hist-orden.fila-anulada { opacity: .6; }
.ticket-pre { background: #fff; border: 1px solid var(--gris); border-radius: 8px; padding: 12px; font-family: 'Courier New', monospace;
  font-size: 12px; line-height: 1.3; white-space: pre; overflow: auto; max-height: 52vh; margin: 0; }
.input-placa { text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }

/* Placa estilo chapa */
.placa { display: inline-block; font-family: 'Courier New', monospace; font-weight: 800; letter-spacing: 1px; background: #fff;
  border: 2px solid var(--texto); border-radius: 5px; padding: 1px 7px; color: var(--texto); white-space: nowrap; }
.placa.grande { font-size: 24px; padding: 4px 14px; border-width: 3px; }

/* Números de arriba */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra); padding: 12px 14px; display: grid;
  grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; color: var(--texto); text-decoration: none; }
.kpi[href]:hover { box-shadow: 0 0 0 2px var(--azul-claro); }
.kpi-icono { grid-row: span 2; font-size: 24px; align-self: center; }
.kpi-valor { font-size: 20px; font-weight: 800; color: var(--azul); }
.kpi-texto { font-size: 12px; color: var(--texto-suave); }
.kpi.alerta .kpi-valor { color: var(--ambar); }

/* Tablero de tres columnas */
.tablero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.tablero-col { background: #dfe6f0; border-radius: var(--radio); padding: 12px; min-height: 200px; }
.tablero-col h3 { margin: 0; font-size: 15px; color: var(--azul); display: flex; justify-content: space-between; }
.tablero-col.col-presupuesto { background: #f3ead8; }
.tablero-col.col-lista { background: #dcefe3; }
.contador { background: var(--blanco); border-radius: 999px; padding: 0 9px; font-size: 13px; }
.tablero-ayuda { font-size: 11px; margin: 2px 0 10px; }
.tablero-vacio { text-align: center; color: var(--texto-suave); padding: 24px 8px; font-size: 13px; }
.ot-card { display: block; background: var(--blanco); border-radius: 8px; box-shadow: var(--sombra); padding: 10px 12px; margin-bottom: 10px;
  color: var(--texto); text-decoration: none; border-left: 4px solid var(--azul); }
.col-presupuesto .ot-card { border-left-color: var(--ambar); }
.col-lista .ot-card { border-left-color: var(--verde); }
.ot-card:hover { box-shadow: 0 0 0 2px var(--azul-claro); }
.ot-card.demorada { border-left-color: var(--rojo); }
.ot-card-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 12px; }
.ot-card-veh { font-weight: 700; }
.ot-card-cli, .ot-card-mot { font-size: 12px; color: var(--texto-suave); margin-top: 2px; }
.ot-card-mot { font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ot-card-pie { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; margin-top: 6px; }
.ot-card-total { text-align: right; font-weight: 800; color: var(--azul); margin-top: 4px; }

/* Orden de trabajo */
.ot-cab { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ot-cab-placa { display: flex; gap: 14px; align-items: center; }
.ot-cab-veh { font-size: 17px; font-weight: 700; }
.ot-cab-datos { display: flex; flex-wrap: wrap; gap: 18px; }
.ot-cab-datos > div { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.ot-cab-datos .muted { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.ot-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; align-items: start; margin-bottom: 14px; }
.ot-totales { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-top: 12px; }
.ot-totales > div { display: flex; gap: 16px; font-size: 13px; }
.ot-total { font-size: 20px !important; color: var(--azul); }
.entregar-total { display: flex; justify-content: space-between; align-items: center; background: #eef4fc; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.ot-acciones { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; position: sticky; bottom: 0; }
.badge.estado-presupuesto { background: var(--ambar-bg); color: var(--ambar); }
.badge.estado-en-taller   { background: #e3ecf8; color: var(--azul); }
.badge.estado-lista       { background: var(--verde-bg); color: var(--verde); }
.badge.estado-entregada   { background: #e5e7eb; color: #374151; }
.badge.estado-anulada     { background: var(--rojo-bg); color: var(--rojo); }
.badge.tipo-mo { background: #e3ecf8; color: var(--azul); }
.badge.tipo-repuesto { background: var(--verde-bg); color: var(--verde); }
.badge.tipo-otro { background: #e5e7eb; color: #4b5563; }
.badge.gris { background: #e5e7eb; color: #4b5563; }
.ac-stock { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--verde); }
.ac-stock.bajo { color: var(--ambar); }
.ac-stock.sin_stock { color: var(--rojo); }

/* Historial del vehículo */
.hist-orden { border-top: 1px solid var(--gris); padding: 10px 0; }
.hist-orden:first-of-type { border-top: 0; }
.hist-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hist-total { margin-left: auto; font-weight: 800; color: var(--azul); }
.hist-items { margin: 6px 0 0 18px; padding: 0; font-size: 13px; }
.hist-diag { font-size: 12px; margin-top: 4px; }

/* Recordatorios */
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.rec-card { display: flex; flex-direction: column; gap: 6px; border-left: 4px solid var(--ambar); }
.rec-card.vencido { border-left-color: var(--rojo); }
.rec-card.avisado { border-left-color: var(--verde); opacity: .85; }
.rec-cab { display: flex; justify-content: space-between; align-items: center; }
.rec-avisado { color: var(--verde); font-size: 12px; font-weight: 700; }

/* Ajustes */
.ajustes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; align-items: start; }
.mec-fila { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--gris); }
.mec-fila.inactivo { opacity: .6; }

@media (max-width: 1100px) {
  .tablero, .ot-grid { grid-template-columns: 1fr; }
}

a.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.input-placa::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }
.ot-cab-datos a + .muted { font-size: 12px; font-weight: 400; text-transform: none; }

@media (max-width: 700px) { .medida-dos { grid-template-columns: 1fr; gap: 0; } .medida-titulo { font-size: 28px; } }
