/* Identidad Andilog (manual de marca): amarillo #F2A821, azul oscuro #1C232B, blanco. Work Sans + Montserrat. */
@font-face { font-family: 'Work Sans'; font-weight: 400; font-display: swap; src: url(fonts/work-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 500; font-display: swap; src: url(fonts/work-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 600; font-display: swap; src: url(fonts/work-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 700; font-display: swap; src: url(fonts/work-sans-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url(fonts/montserrat-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url(fonts/montserrat-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url(fonts/montserrat-latin-600-normal.woff2) format('woff2'); }
:root {
  --amarillo: #F2A821; --oscuro: #1C232B; --oscuro-2: #262f3a;
  --bg: #f4f3f1; --card: #fff; --text: #1C232B; --muted: #6b7280; --line: #e4e2de;
  --brand: #F2A821; --brand-d: #9a6206; --brand-suave: #fdf3df;
  --rojo: #b91c1c; --rojo-bg: #fee2e2; --ambar: #92400e; --ambar-bg: #fef3c7; --verde: #166534; --verde-bg: #dcfce7;
  --ancho-lateral: 248px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
h1, h2, h3, h4, .num, .precio-box strong { font-family: 'Work Sans', 'Montserrat', system-ui, sans-serif; }
button, input, select, textarea { font-family: inherit; }
h2 { font-weight: 600; letter-spacing: -.01em; }
h3 { font-weight: 600; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--rojo); min-height: 1.2em; margin: 0; }


.spacer { flex: 1; }

main { max-width: 1180px; margin: 0 auto; padding: 24px 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.cabecera { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cabecera h2 { margin: 0; }

.resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.resumen .card { padding: 14px; }
.resumen .num { font-size: 28px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr.click { cursor: pointer; }
tr.click:hover td { background: #fafafa; }
.tabla { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }

.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.vencido { background: var(--rojo-bg); color: var(--rojo); }
.por_vencer { background: var(--ambar-bg); color: var(--ambar); }
.vigente { background: var(--verde-bg); color: var(--verde); }
.sin_vencimiento, .baja { background: #eef0f3; color: var(--muted); }
.disponible { background: var(--verde-bg); color: var(--verde); }
.alquilada { background: #dbeafe; color: #1e40af; }
.mantenimiento { background: var(--ambar-bg); color: var(--ambar); }

.btn { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 7px; cursor: pointer; font: inherit; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-d); }
.btn.peligro { color: var(--rojo); border-color: #f3c4c4; }
.btn.ghost { background: none; color: inherit; border-color: #4b5466; }
.btn.chico { padding: 3px 9px; font-size: 13px; }

label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #cfd4dc; border-radius: 7px; color: var(--text); background: #fff; width: 100%; }
textarea { min-height: 60px; }

dialog { border: 0; border-radius: 12px; padding: 0; width: min(560px, 94vw); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(15, 20, 30, .45); }
#dlg-form { padding: 20px; display: grid; gap: 12px; }
#dlg-form h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acciones { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

.ficha { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; margin-bottom: 18px; }
.ficha div span { display: block; font-size: 12px; color: var(--muted); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1d2330; color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.ver { opacity: 1; }
.toast.err { background: var(--rojo); }

@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  main { padding: 12px; }
}

/* Fase 2: estados de contratos y partes */
.activo, .conformado { background: var(--verde-bg); color: var(--verde); }
.pendiente { background: var(--ambar-bg); color: var(--ambar); }
.finalizado, .cancelado, .anulado { background: #eef0f3; color: var(--muted); }

/* Fase 3b: Costos */
.subnav { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.subnav button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--muted); }
.subnav button.activo { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.estimado { background: #ede9fe; color: #5b21b6; }
.param-grupo { margin-bottom: 14px; padding: 6px 18px; }
.param-grupo h3 { margin: 12px 0 4px; }
.param-grupo .nota { margin: 0 0 6px; font-size: 13px; }
.param { display: grid; grid-template-columns: minmax(220px, 1.3fr) minmax(170px, 1fr) minmax(260px, 1.4fr); gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.param-nombre { display: grid; gap: 2px; }
.param-nombre small { font-size: 12px; }
.param-meta { display: grid; grid-template-columns: 110px 1fr 140px; gap: 6px; }
.param-meta input, .param-meta select { padding: 6px 8px; font-size: 13px; }
.con-unidad { display: flex; align-items: center; gap: 6px; }
.con-unidad input { text-align: right; }
.con-unidad span { font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 60px; }
.param.pendiente-dato .con-unidad input { background: #fffbeb; border-color: #f2d48a; }
.param.modificado { background: #fff7ed; }
.check { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
.check input { width: auto; }
.precarga { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 18px; }
.barra-guardar { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; box-shadow: 0 -4px 14px rgba(0,0,0,.06); margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 900px) {
  .param { grid-template-columns: 1fr; gap: 6px; }
  .param-meta { grid-template-columns: 1fr 1fr; }
  .param-meta [data-fecha] { grid-column: span 2; }
}
.con-unidad input { flex: 1; min-width: 0; }
.toast { bottom: 90px; }
@media (max-width: 900px) { .con-unidad span { min-width: 0; } }

/* Fase 3c: Cotizar */
.cot-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
#cot-resumen { position: sticky; top: 12px; }
.cot-sec { margin-bottom: 14px; }
.cot-sec h3 { margin: 0 0 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 10px; }
.campo { display: grid; gap: 4px; align-content: start; }
.campo small { font-size: 12px; }
.fila-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.fila-item.inactiva, tr.inactiva td { opacity: .55; }
.fila-cab { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.fila-cab .check { gap: 0; }
.grid-tramo { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fila-res { margin: 8px 0 0; font-size: 13px; }
.tabla-gastos td { padding: 5px 6px; }
.tabla-gastos input, .tabla-gastos select { padding: 5px 7px; font-size: 13px; }
.tabla-gastos .con-unidad span { display: none; }
td.num, .mini td.num { text-align: right; white-space: nowrap; }
.resumen-cot h4 { margin: 14px 0 6px; }
.precio-box { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; margin-bottom: 10px; }
.precio-box strong { font-size: 26px; color: var(--brand); }
.precio-box.sin-precio { background: #f8f9fb; border-color: var(--line); }
.precio-box.sin-precio strong { color: var(--muted); }
.mini { width: 100%; font-size: 14px; }
.mini td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.mini tr.total td { font-weight: 700; border-top: 2px solid var(--text); }
.chico-txt { font-size: 12.5px; }
.falta { color: var(--ambar); font-size: 12px; font-weight: 600; }
.faltantes { margin: 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 4px; }
.link { background: none; border: 0; padding: 0; color: var(--brand-d); text-decoration: underline; cursor: pointer; font: inherit; text-align: left; }
input.invalido { border-color: var(--rojo); background: var(--rojo-bg); }
.resaltar { outline: 3px solid #fdba74; }
@media (max-width: 1000px) {
  .cot-layout { grid-template-columns: 1fr; }
  #cot-resumen { position: static; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } }
.tabla-gastos td:nth-child(1) { min-width: 170px; }
.tabla-gastos td:nth-child(2) { width: 74px; }
.tabla-gastos td:nth-child(3) { min-width: 130px; }
.tabla-gastos td:nth-child(4) { width: 84px; }
.tabla-gastos td:nth-child(5), .tabla-gastos td:nth-child(6) { width: 84px; }

/* Fase 3d: Presupuestos */
.borrador { background: #eef0f3; color: var(--text); }
.emitido { background: #dbeafe; color: #1e40af; }
.aceptado { background: var(--verde-bg); color: var(--verde); }
.rechazado { background: #eef0f3; color: var(--muted); }
.aviso { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }


/* ===== Marca: login ===== */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--oscuro); }
.login-marca { display: flex; flex-direction: column; justify-content: center; padding: 48px 8vw; color: #fff;
  background: linear-gradient(135deg, rgba(242,168,33,.10), transparent 55%), var(--oscuro); position: relative; overflow: hidden; }
.login-marca::after { content: ''; position: absolute; right: -12%; bottom: -18%; width: 60%; aspect-ratio: 1; background: url(img/isotipo.png) center/contain no-repeat; opacity: .06; }
.login-logo { width: min(340px, 80%); height: auto; }
.login-marca p { color: #c9ced6; font-family: 'Work Sans', sans-serif; font-weight: 400; letter-spacing: .04em; margin: 18px 0 0; }
.login > form { align-self: center; justify-self: center; }
.login-card { width: min(380px, 92vw); display: grid; gap: 14px; padding: 32px; border: 0; border-top: 4px solid var(--amarillo); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-card h1 { margin: 0; font-size: 24px; font-weight: 600; color: var(--oscuro); }
.login-card .muted { margin: -6px 0 6px; font-size: 13.5px; }
@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; align-content: center; gap: 24px; padding: 24px 0; }
  .login-marca { padding: 12px 24px; align-items: center; text-align: center; background: none; }
  .login-marca::after { display: none; }
  .login-logo { width: 220px; }
}

/* ===== Marca: menú lateral ===== */
.lateral { position: fixed; inset: 0 auto 0 0; width: var(--ancho-lateral); height: 100vh; height: 100dvh; background: var(--oscuro); color: #fff;
  display: flex; flex-direction: column; z-index: 30; font-family: 'Montserrat', sans-serif; }
/* Logo y cuenta fijos; solo la lista de secciones se desplaza */
.lateral-logo { flex: none; padding: 18px 20px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.lateral-logo img { width: 128px; height: auto; display: block; }
#tabs { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px 10px 12px; display: flex; flex-direction: column; gap: 1px;
  scrollbar-gutter: stable; }
/* Barra de desplazamiento integrada: pista del color del panel e indicador gris fino.
   Chrome, Edge y Safari usan ::-webkit-scrollbar (permite ocultar las flechas); Firefox, las propiedades estándar. */
@supports not selector(::-webkit-scrollbar) { #tabs { scrollbar-width: thin; scrollbar-color: #4b5562 var(--oscuro); } }
#tabs::-webkit-scrollbar { width: 8px; }
#tabs::-webkit-scrollbar-track { background: var(--oscuro); }
#tabs::-webkit-scrollbar-thumb { background: #4b5562; border-radius: 8px; border: 2px solid var(--oscuro); }
#tabs::-webkit-scrollbar-thumb:hover { background: #677181; }
#tabs::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
#tabs::-webkit-scrollbar-corner { background: var(--oscuro); }
#tabs button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 36px; text-align: left; background: none; border: 0; color: #c9ced6;
  padding: 6px 10px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; flex: none;
  transition: background .15s, color .15s; }
#tabs button svg, .salir svg, .menu-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#tabs button:hover { background: rgba(255,255,255,.045); color: #fff; }
/* Activo: fondo apenas más claro, texto blanco seminegrita y el ícono como acento amarillo */
#tabs button.activo { background: rgba(255,255,255,.08); color: #fff; font-weight: 600; }
#tabs button.activo svg { stroke: var(--amarillo); }
#tabs button:focus-visible { outline: 2px solid var(--amarillo); outline-offset: -2px; }
#tabs .grupo { font-family: 'Work Sans', sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #6f7986;
  padding: 10px 10px 3px; flex: none; }
#tabs .grupo:first-child { padding-top: 6px; }
.lateral-pie { flex: none; padding: 10px 14px 12px; border-top: 1px solid rgba(255,255,255,.07); display: grid; gap: 8px; }
#quien { font-size: 12.5px; color: #9aa3ae; line-height: 1.3; min-width: 0; }
#quien strong { display: block; color: #fff; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.salir { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 6px 12px; font-size: 13.5px; background: none; border: 1px solid rgba(255,255,255,.14); color: #c9ced6; }
.btn.salir:hover { border-color: var(--amarillo); color: var(--amarillo); }
.btn.salir:focus-visible { outline: 2px solid var(--amarillo); outline-offset: 2px; }
.contenido { margin-left: var(--ancho-lateral); min-height: 100vh; }
.barra-movil { display: none; }
.velo { display: none; }
@media (max-width: 900px) {
  .lateral { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  body.menu-abierto .lateral { transform: none; }
  body.menu-abierto .velo { display: block; position: fixed; inset: 0; background: rgba(15,20,26,.5); z-index: 25; }
  .contenido { margin-left: 0; }
  .barra-movil { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: var(--oscuro); padding: 8px 10px; min-height: 64px; }
  .barra-movil img { height: 26px; width: auto; }
  .menu-btn { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; display: flex; }
  .menu-btn svg { width: 24px; height: 24px; }
  main { padding: 16px 14px; }
}

/* ===== Marca: componentes ===== */
.btn { border-radius: 8px; font-weight: 500; }
.btn.primary { background: var(--amarillo); border-color: var(--amarillo); color: var(--oscuro); font-weight: 600; }
.btn.primary:hover { background: #e39a14; border-color: #e39a14; }
.btn.primary:disabled { background: #f6d08d; border-color: #f6d08d; }
.card { border-radius: 12px; border-color: var(--line); }
.tabla { border-radius: 12px; border-color: var(--line); }
th { color: #7a8190; background: #faf9f7; }
tr.click:hover td { background: var(--brand-suave); }
.link { color: var(--brand-d); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(242,168,33,.45); outline-offset: 0; border-color: var(--amarillo); }
.subnav button.activo { color: var(--oscuro); border-bottom-color: var(--amarillo); }
.precio-box { background: var(--brand-suave); border-color: #f5d49a; }
.precio-box strong { color: var(--oscuro); }
.resumen .card { border-top: 3px solid var(--line); }
.toast { background: var(--oscuro); }
.toast.err { background: var(--rojo); }
.aviso { background: #f7f5f1; border-color: var(--line); color: var(--text); border-left: 4px solid var(--amarillo); }
.chip.borrador { background: #eceae6; }
.resumen .card.destacado { border-top-color: var(--amarillo); background: linear-gradient(180deg, var(--brand-suave), #fff 70%); }
.login-card.card { border-top: 4px solid var(--amarillo); }

/* ===== Aviso de actualización ===== */
#avisos { position: fixed; top: 14px; left: calc(var(--ancho-lateral) + 28px); right: 28px; z-index: 40; display: grid; gap: 8px; }
#avisos:empty { display: none; }
.banner-act { display: flex; align-items: center; gap: 14px;
  background: var(--oscuro); color: #fff; border-radius: 12px; padding: 12px 14px 12px 16px; box-shadow: 0 12px 30px rgba(0,0,0,.22);
  border-left: 5px solid var(--amarillo); animation: banner-in .25s ease-out; }
.banner-act.ok { border-left-color: #22c55e; }
@keyframes banner-in { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.banner-icono svg { width: 26px; height: 26px; fill: none; stroke: var(--amarillo); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
.banner-act.ok .banner-icono svg { stroke: #4ade80; }
.banner-texto { flex: 1; display: grid; line-height: 1.3; }
.banner-texto strong { font-family: 'Work Sans', sans-serif; font-weight: 600; }
.banner-texto span { color: #c9ced6; font-size: 13.5px; }
.banner-acciones { display: flex; gap: 8px; }
.banner-act .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.banner-act .btn:not(.primary):hover { border-color: var(--amarillo); color: var(--amarillo); }
body.con-banner main { padding-top: 96px; }
@media (max-width: 900px) {
  #avisos { left: 10px; right: 10px; top: 76px; }
  .banner-act { flex-wrap: wrap; }
  .banner-acciones { width: 100%; justify-content: flex-end; }
  body.con-banner main { padding-top: 150px; }
}
.cambio-cab { display: flex; align-items: center; gap: 10px; }
#dlg-form h3 + .cambio-lista { margin-top: -4px; }
.cambio-lista { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* ===== Historial ===== */
.historial { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.historial::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.hist-item { position: relative; margin-bottom: 14px; }
.hist-punto { position: absolute; left: -26px; top: 20px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #c9c6c0; }
.hist-item.actual .hist-punto { border-color: var(--amarillo); background: var(--amarillo); box-shadow: 0 0 0 4px rgba(242,168,33,.2); }
.hist-item .card { padding: 14px 18px; }
.hist-item.actual .card { border-left: 4px solid var(--amarillo); }
.hist-cab { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.hist-item h3 { margin: 4px 0 6px; font-size: 16.5px; }
.hist-item ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 14px; }

/* ===== Auditoría UX fase 1 ===== */
/* UX-01: los hijos de la grilla no se estiran por tablas anchas (la tabla se desplaza sola) */
.cot-layout > *, #cot-form, .cot-sec { min-width: 0; }
.tabla { max-width: 100%; }
.ir-resumen { display: none; }
@media (max-width: 1000px) {
  .ir-resumen { display: flex; position: sticky; top: 76px; z-index: 15; width: 100%; justify-content: space-between; align-items: center; gap: 10px;
    margin: 0 0 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.06); min-height: 48px; }
  .ir-resumen .chip { font-weight: 600; }
}
@media (min-width: 901px) and (max-width: 1000px) { .ir-resumen { top: 8px; } }
/* UX-02: filas navegables con teclado */
tr.click:focus-visible { outline: 3px solid var(--amarillo); outline-offset: -3px; }
tr.click:focus-visible td { background: var(--brand-suave); }
.param select[data-estado] option[value="pendiente"] { color: var(--ambar); }
.param.pendiente-dato select[data-estado] { color: var(--ambar); background: #fffbeb; border-color: #f2d48a; font-weight: 600; }
.param-nombre label { color: var(--text); font-size: 14px; }

/* ===== Auditoría UX fase 2 ===== */
.falt-grupo { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; background: #fff; }
.falt-grupo summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; min-height: 32px; }
.falt-grupo summary::-webkit-details-marker { display: none; }
.falt-grupo summary::before { content: '▸'; color: var(--muted); }
.falt-grupo[open] summary::before { content: '▾'; }
.falt-grupo p { margin: 2px 0 6px; }
.volver-barra { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 12px; background: var(--brand-suave); border: 1px solid #f5d49a; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.campo-inline select { width: auto; min-height: 40px; }
.tabla-gastos .quitar { min-width: 36px; min-height: 36px; }
@media (max-width: 900px) {
  .tabla-gastos .quitar, .fila-cab .btn.peligro { min-width: 44px; min-height: 44px; }
}

.req { color: var(--rojo); font-weight: 700; }
/* UX-09: zona táctil de 48 px en el menú móvil */
@media (max-width: 900px) { .menu-btn { min-width: 48px; min-height: 48px; justify-content: center; align-items: center; } #tabs button { min-height: 44px; } .btn.salir { min-height: 44px; } }
.menu-btn:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }
.tabla, .card { position: relative; } /* contiene textos ocultos (sr-only) y evita que estiren la página */

/* Registro de operaciones */
.reg-filtros { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 12px 14px; margin-bottom: 8px; }
.reg-filtros label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); min-width: 130px; flex: 0 1 160px; }
.reg-filtros .reg-buscar { flex: 1 1 200px; }
.reg-tabla td { vertical-align: top; }
.reg-fecha { white-space: nowrap; font-variant-numeric: tabular-nums; }
.reg-cambios summary { cursor: pointer; color: var(--oscuro); font-weight: 600; white-space: nowrap; }
.reg-cambios table { margin-top: 6px; font-size: 13px; border-collapse: collapse; min-width: 280px; }
.reg-cambios th, .reg-cambios td { padding: 3px 8px; border-bottom: 1px solid var(--line); text-align: left; word-break: break-word; }
.reg-paginas { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

/* Adjuntos de documentos */
svg.clip { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.adj-lista { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.adj-btn { display: inline-flex; align-items: center; gap: 5px; max-width: 220px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--oscuro); font: inherit; font-size: 13px; cursor: pointer; }
.adj-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adj-btn:hover { border-color: var(--amarillo); background: #fffaf0; }
.adj-existentes { display: grid; gap: 6px; margin-bottom: 12px; }
.adj-tit { font-size: 13px; color: var(--muted); }
.adj-fila { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.adj-nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
label.adj-quitar { display: inline-flex; align-items: center; gap: 4px; color: var(--rojo); font-size: 13px; cursor: pointer; }
label.adj-quitar input { width: auto; margin: 0; }
