/* Charlene Ops — estética de Kura (beautifului.dev): página gris verdosa, paneles blancos con filete de
   sombra (sin bordes), un acento verde, letra del sistema a 13px, números en mono. Menú a la izquierda. */
:root {
  --a-trading: #2563c9; --a-compliance: #9c4fd1; --a-finance: #1f8a5b; --a-recordatorio: #5b6470;
  color-scheme: light;
  --page: #f4f5f4; --surface: #fff; --inset: #f2f3f2; --field: #f7f8f7; --hover: #f3f5f3; --hover-2: #e9ece9;
  --ink: #1a1c1a; --ink-2: #545854; --ink-3: #6f746f;
  --line: rgba(0,0,0,.08); --line-strong: rgba(0,0,0,.16);
  --accent: #1f7a4d; --accent-deep: #165c3a; --accent-tint: #e3f0e8;
  --orange: #a9560f; --orange-tint: #fcefe2; --red: #b4232a; --red-tint: #fbe7e7;
  --cobro: #1f7a4d; --pago: #c0492f;
  --r-chip: 6px; --r-control: 8px; --r-card: 10px; --r-window: 14px;
  --sh-hair: 0 0 0 1px rgba(0,0,0,.07);
  --sh-card: 0 0 0 1px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.05);
  --sh-btn: 0 0 0 1px rgba(0,0,0,.09), 0 1px 2px rgba(0,0,0,.08);
  --sh-overlay: 0 0 0 1px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.08), 0 18px 44px rgba(0,0,0,.16);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.23, 1, .32, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 13px/1.45 system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; background: var(--page); color: var(--ink); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent-tint); color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; font-weight: 600; }
h1 { font-size: 15px; } h2 { font-size: 13px; } h3 { font-size: 13px; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
[hidden] { display: none !important; }
input, select, textarea, button { font: inherit; color: inherit; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mu { color: var(--ink-3); }
.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: rgba(0,0,0,.14); border-radius: 10px; border: 2px solid var(--page); }
}

/* ── Armazón: menú a la izquierda ─────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 100dvh; }
aside.nav { position: sticky; top: 0; align-self: start; height: 100dvh; overflow: hidden; background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
/* El menú nunca se estira con la página: ocupa la pantalla y, si no entra, se desplaza adentro */
.menu { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin: 0 -4px; padding: 0 4px; }
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 14px; text-decoration: none; }
.brand .logo { width: 24px; height: 24px; display: block; flex: none; }
.brand b { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; }
.brand b span { color: var(--accent); }
.tab { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--r-control); color: var(--ink-2); font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.tab .i { opacity: .75; }
.tab:hover { background: var(--hover); color: var(--ink); }
.tab.on { background: var(--accent-tint); color: var(--accent-deep); }
.tab.on .i { opacity: 1; }
.tab .k { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.tab .k.mal { color: var(--red); }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.area { display: grid; gap: 2px; margin-bottom: 12px; }
.area-t { display: flex; align-items: center; gap: 4px; width: 100%; height: 24px; border: 0; background: none; cursor: pointer; font: inherit; font-size: 11px; font-weight: 500; color: var(--ink-3); padding: 0 10px 0 4px; letter-spacing: .01em; border-radius: var(--r-control); text-align: left; }
.area-t:hover { color: var(--ink); background: var(--hover); }
.area-t .chev { width: 12px; height: 12px; transform: rotate(90deg); transition: transform .15s; }
.area-t .k { margin-left: auto; font-family: var(--mono); font-size: 11px; }
.area-t .k.mal { color: var(--red); }
.area.cerrada { margin-bottom: 4px; }
.area.cerrada .area-t .chev { transform: none; }
.area.cerrada .tab { display: none; }
.navfoot { margin-top: auto; padding: 8px 6px 0; display: grid; gap: 4px; font-size: 11.5px; color: var(--ink-3); }
.navfoot .ia { display: flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.navfoot .yo { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navfoot #b-salir { justify-self: start; padding-left: 0; }
.navfoot .ia::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.navfoot .ia.off::before { background: var(--orange); }
main.content { min-width: 0; padding: 0 26px 96px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 12px 0 10px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--page) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { margin-right: auto; display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.topbar h1 a { color: var(--ink-3); text-decoration: none; font-weight: 500; }
.topbar h1 a:hover { color: var(--ink); }
.topbar .sub { color: var(--ink-3); font-weight: 400; font-size: 12.5px; }

/* ── Botones, campos, etiquetas ──────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: var(--r-control); border: 0;
  background: var(--surface); color: var(--ink); box-shadow: var(--sh-btn); font-weight: 500; font-size: 12.5px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .12s var(--ease); }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(.5px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 0 0 1px var(--accent-deep), 0 1px 2px rgba(0,0,0,.12); }
.btn.primary:hover { background: var(--accent-deep); }
.btn.solid { background: var(--ink); color: #fff; box-shadow: none; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover-2); color: var(--ink); }
.btn.peligro { color: var(--red); }
.btn.peligro:hover { background: var(--red-tint); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.xs { height: 22px; padding: 0 7px; font-size: 11px; border-radius: var(--r-chip); }
.btn .i { width: 14px; height: 14px; }
.cargando { position: relative; color: transparent !important; pointer-events: none; }
.cargando::after { content: ''; position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink-3); border-right-color: transparent; animation: girar .7s linear infinite; }
.btn.primary.cargando::after, .btn.solid.cargando::after { border-color: #fff; border-right-color: transparent; }
@keyframes girar { to { transform: rotate(360deg); } }

.campo { display: grid; gap: 5px; min-width: 0; }
.campo > span { font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.campo input, .campo select, .campo textarea, .input { width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: var(--r-control); background: var(--surface);
  box-shadow: var(--sh-hair); font-size: 13px; transition: box-shadow .15s; }
.campo textarea, textarea.input { height: auto; padding: 8px 10px; line-height: 1.45; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .input:focus { outline: 0; box-shadow: 0 0 0 2px var(--accent); }
.campo.falta input, .campo.falta select { box-shadow: 0 0 0 1px rgba(169,86,15,.45); background: var(--orange-tint); }
.campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.campos .ancho { grid-column: 1 / -1; }
.tilde { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.tilde input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--accent); }
.err { color: var(--red); font-size: 12px; }
.acciones { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: var(--r-chip); font-size: 11px; font-weight: 500; white-space: nowrap;
  background: var(--inset); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.tag.ok { background: var(--accent-tint); color: var(--accent-deep); box-shadow: inset 0 0 0 1px rgba(31,122,77,.22); }
.tag.aviso { background: var(--orange-tint); color: var(--orange); box-shadow: inset 0 0 0 1px rgba(169,86,15,.22); }
.tag.mal { background: var(--red-tint); color: var(--red); box-shadow: inset 0 0 0 1px rgba(180,35,42,.2); }
.tag.ley { background: var(--ink); color: #fff; box-shadow: none; }
.tag .i { width: 12px; height: 12px; }
.punto { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ink-3); display: inline-block; }
.punto.mal { background: var(--red); } .punto.aviso { background: var(--orange); } .punto.ok { background: var(--accent); }

/* ── Paneles, tiras de números, tablas ───────────────────────────────────────────────── */
.panel { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); margin-bottom: 16px; min-width: 0; overflow: hidden; }
.panel .pad { padding: 14px 16px; }
.panel-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-cab h2 { display: flex; align-items: center; gap: 8px; }
.panel-cab .sub { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.grilla { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-bottom: 16px; }
.grilla > * { margin-bottom: 0; }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); margin-bottom: 16px; overflow: hidden; }
.stat { padding: 13px 16px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: -1px; min-width: 0; color: inherit; }
.stat .l { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.stat .v { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-top: 3px; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .d { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }
.stat.hero .v { color: var(--accent-deep); }
.stat .v.mal { color: var(--red); }
a.stat { text-decoration: none; transition: background .15s; } a.stat:hover { background: var(--hover); }

.tbl { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); margin-bottom: 16px; overflow-x: auto; }
.panel .tbl { box-shadow: none; border-radius: 0; margin: 0; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th { text-align: left; font-size: 11px; font-weight: 500; color: var(--ink-3); letter-spacing: .01em; padding: 0 10px; height: 32px; background: var(--inset); border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 16px; } th:last-child, td:last-child { padding-right: 16px; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.35; }
tr:last-child > td { border-bottom: 0; }
td.n, th.n { text-align: right; } td.n { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover > td { background: var(--hover); }
tr.tot > td { font-weight: 600; background: var(--inset); border-top: 1px solid var(--line-strong); }
tr.hecho > td { color: var(--ink-3); }
td .sec { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
td.fecha { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
td a { text-decoration: none; } td a:hover { text-decoration: underline; }
.vacio { padding: 36px 20px; text-align: center; color: var(--ink-2); display: grid; gap: 6px; justify-items: center; }
.vacio b { color: var(--ink); font-size: 13px; }
.vacio p { max-width: 54ch; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 28px; padding: 0 10px; border-radius: var(--r-chip); border: 0; background: var(--surface); box-shadow: var(--sh-hair); color: var(--ink-2); font-weight: 500; cursor: pointer; }
.chips button:hover { background: var(--hover); color: var(--ink); }
.chips button.on { background: var(--ink); color: #fff; box-shadow: none; }
.chips .k { font-family: var(--mono); font-size: 11px; opacity: .7; margin-left: 4px; }
.barra-filtros { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }

.pestanas { display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pestanas button { height: 38px; padding: 0 10px; border: 0; background: none; color: var(--ink-3); font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pestanas button:hover { color: var(--ink); }
.pestanas button.on { color: var(--ink); border-bottom-color: var(--ink); }
.pestanas .k { font-family: var(--mono); font-size: 11px; margin-left: 4px; color: var(--ink-3); }
.pestanas .k.mal { color: var(--red); }

/* ── Partes del trade (compra · venta · logística · otros) ───────────────────────────── */
.partes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.parte { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 13px 16px 14px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.parte.falta { box-shadow: 0 0 0 1px rgba(180,35,42,.4), 0 1px 2px rgba(0,0,0,.05); }
.parte-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.parte-nom { font-size: 14px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.parte-nom a { text-decoration: none; } .parte-nom a:hover { text-decoration: underline; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 12.5px; margin: 0; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.kv dd.n { font-family: var(--mono); font-size: 12px; }
.parte ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 12.5px; }
.parte li { display: flex; justify-content: space-between; gap: 8px; }

.banda { display: flex; gap: 9px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-card); margin-bottom: 16px; font-size: 12.5px; }
.banda .i { margin-top: 1px; }
.banda.mal { background: var(--red-tint); color: #7d1a1f; box-shadow: inset 0 0 0 1px rgba(180,35,42,.18); }
.banda.aviso { background: var(--orange-tint); color: #6e3809; box-shadow: inset 0 0 0 1px rgba(169,86,15,.2); }
.banda.ok { background: var(--accent-tint); color: var(--accent-deep); box-shadow: inset 0 0 0 1px rgba(31,122,77,.2); }

.fila { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.fila:last-child { border-bottom: 0; }
.fila.sin-marca { grid-template-columns: minmax(0, 1fr) auto; }
.fila .t { font-size: 13px; }
.fila .m { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.fila.hecho .t { color: var(--ink-3); }
.fila .acc { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
/* Con mouse, las acciones de cada fila aparecen al pasar por encima (menos ruido); en el celu, siempre */
@media (hover: hover) and (pointer: fine) { .checklist .fila .acc { opacity: 0; transition: opacity .15s; } .checklist .fila:hover .acc, .checklist .fila:focus-within .acc { opacity: 1; } }
.marca { width: 18px; height: 18px; border-radius: 5px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: var(--surface); display: grid; place-items: center; padding: 0; cursor: pointer; margin-top: 1px; color: #fff; }
.marca:hover { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.marca.si { background: var(--accent); box-shadow: none; }
.marca.no { box-shadow: inset 0 0 0 1.5px var(--line); background: var(--inset); cursor: default; }
.marca .i { width: 12px; height: 12px; stroke-width: 2.4; }
.grupo-fila { padding: 7px 16px; background: var(--inset); border-bottom: 1px solid var(--line); font-size: 11px; color: var(--ink-3); font-weight: 500; display: flex; justify-content: space-between; }
.editor { margin-top: 8px; display: grid; gap: 8px; padding: 10px; border-radius: var(--r-control); background: var(--field); box-shadow: var(--sh-hair); }
.dice { display: flex; gap: 8px; padding: 8px 10px; border-radius: var(--r-control); background: var(--orange-tint); color: #6e3809; font-size: 12.5px; }
.dice .i { margin-top: 1px; }
.conf { margin-top: 8px; display: grid; gap: 8px; padding: 12px; border-radius: var(--r-control); background: #fffafa; box-shadow: 0 0 0 1px rgba(180,35,42,.22); }
.conf .dice { background: var(--red-tint); color: #7d1a1f; }

/* Gráfico de plata (columnas arriba = cobros, abajo = pagos; línea = saldo acumulado) */
.graf { padding: 10px 16px 12px; position: relative; }
.graf svg { display: block; width: 100%; height: auto; overflow: visible; }
.graf .eje { fill: var(--ink-3); font-size: 10.5px; font-family: var(--mono); }
.graf .grilla-l { stroke: rgba(0,0,0,.07); stroke-width: 1; }
.graf .cero { stroke: rgba(0,0,0,.3); stroke-width: 1; }
.graf .cobro { fill: var(--cobro); } .graf .pago { fill: var(--pago); }
.graf .col.on .cobro, .graf .col.on .pago { opacity: .8; }
.graf .hoy { fill: var(--inset); }
.graf .saldo { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.graf circle.saldo-p { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.graf .lbl { fill: var(--ink-2); font-size: 10.5px; font-family: var(--mono); }
.graf .col { cursor: default; } .graf .col rect.hit { fill: transparent; }
.leyenda { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-2); flex-wrap: wrap; }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda .sw { width: 10px; height: 10px; border-radius: 3px; }
.leyenda .ln { width: 14px; height: 2px; background: var(--ink); border-radius: 2px; }
.tip { position: absolute; pointer-events: none; background: var(--surface); box-shadow: var(--sh-overlay); border-radius: var(--r-control); padding: 8px 10px; font-size: 12px; min-width: 180px; z-index: 5; }
.tip b { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 500; margin-bottom: 4px; }
.tip div { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.tip div span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tip i { width: 10px; height: 2px; display: inline-block; border-radius: 2px; }
.tip .num { font-weight: 600; }

/* Calendario */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cab { padding: 8px 10px; font-size: 11px; color: var(--ink-3); font-weight: 500; background: var(--inset); border-bottom: 1px solid var(--line); }
.cal-dia { min-height: 96px; padding: 6px 7px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface);
  text-align: left; display: flex; flex-direction: column; gap: 3px; cursor: pointer; font: inherit; min-width: 0; transition: background .15s; }
.cal-dia:nth-child(7n + 7) { border-right: 0; }
.cal-dia:hover { background: var(--hover); }
.cal-dia.fuera { background: var(--field); color: var(--ink-3); }
.cal-dia.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-n { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.cal-dia.hoy .cal-n { background: var(--accent); color: #fff; border-radius: 5px; padding: 0 5px; align-self: flex-start; }
.cal-ev { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev .punto { width: 6px; height: 6px; }
.cal-ev.mal { color: var(--red); }
.cal-mas { font-size: 11px; color: var(--ink-3); }

/* Propuesta (texto → datos), la abre Claudio */
.propuesta { background: var(--surface); border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--accent), 0 4px 14px rgba(0,0,0,.08); margin-bottom: 16px; overflow: hidden; }
.propuesta-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--accent-tint); border-bottom: 1px solid rgba(31,122,77,.18); flex-wrap: wrap; }
.propuesta-cab b { color: var(--accent-deep); }
.propuesta-cab p { color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.propuesta .pad { padding: 14px 16px; }
.propuesta-cuerpo { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.propuesta-cuerpo > section { padding: 14px 16px; border-right: 1px solid var(--line); display: grid; gap: 10px; align-content: start; min-width: 0; }
.propuesta-cuerpo > section:last-child { border-right: 0; }
.propuesta-cuerpo h3 { font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.propuesta-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); background: var(--field); flex-wrap: wrap; }
.faltan { display: flex; gap: 5px; flex-wrap: wrap; }
details.mas > summary { font-size: 12px; padding: 2px 0; }
details.mas > summary:hover { color: var(--ink); }

.avisos { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(480px, calc(100vw - 32px)); }
.avisos > div { padding: 10px 14px; border-radius: var(--r-card); background: var(--ink); color: #fff; font-size: 12.5px; box-shadow: var(--sh-overlay); animation: toastin .28s var(--ease); }
.avisos > div.mal { background: var(--red); }
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } }

.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(340px, 100%); display: grid; gap: 14px; background: var(--surface); padding: 24px; border-radius: var(--r-window); box-shadow: var(--sh-overlay); }

details > summary { cursor: pointer; list-style: none; } details > summary::-webkit-details-marker { display: none; }
.plegable > summary { display: flex; align-items: center; gap: 6px; padding: 9px 16px; color: var(--ink-2); font-weight: 500; }
.plegable > summary .i { transition: transform .15s var(--ease); width: 14px; height: 14px; }
.plegable[open] > summary .i { transform: rotate(90deg); }
.previa { width: 100%; max-height: 380px; object-fit: contain; border-radius: var(--r-control); background: var(--inset); box-shadow: var(--sh-hair); }
object.previa { height: 380px; }

/* ── Claudio: ventana flotante que se mueve y se agranda (diseño de Outreach) ─────────── */
#cl-btn { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 20px; border: 0;
  background: var(--ink); color: #fff; font-weight: 500; font-size: 13px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.22); }
#cl-btn kbd { font-family: var(--mono); font-size: 10.5px; opacity: .55; }
#cl { position: fixed; z-index: 41; display: flex; flex-direction: column; background: #f7f8fa; border: 1px solid #e2e5e9; border-radius: 12px;
  box-shadow: 0 12px 44px rgba(0,0,0,.28); overflow: hidden; min-width: 300px; min-height: 280px; }
#cl[hidden], #cl-btn[hidden], #app[hidden] ~ #cl-btn, #app[hidden] ~ #cl { display: none !important; }
#cl header { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; border-bottom: 1px solid #e2e5e9; font-size: 13px; cursor: grab; user-select: none; touch-action: none; background: #fff; }
#cl.arrastrando header { cursor: grabbing; }
#cl header b { flex: 1; display: flex; align-items: center; gap: 7px; }
#cl header b::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
#cl header .mu { font-weight: 400; font-size: 11.5px; }
.cl-ic { background: transparent; border: 0; color: #666d76; padding: 5px 6px; border-radius: 5px; cursor: pointer; display: grid; place-items: center; }
.cl-ic:hover { background: rgba(102,109,118,.09); color: #17191c; }
.cl-ic .i { width: 14px; height: 14px; }
#cl-tirador { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; z-index: 2; touch-action: none; }
#cl-tirador::after { content: ''; position: absolute; right: 5px; bottom: 5px; width: 6px; height: 6px; border-right: 2px solid #8b929b; border-bottom: 2px solid #8b929b; opacity: .6; border-radius: 1px; }
#cl-hilo { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.cl-yo, .cl-el { padding: 8px 11px; border-radius: 11px; font-size: 13px; line-height: 1.5; max-width: 94%; overflow-wrap: anywhere; }
.cl-yo { background: #17191c; color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; white-space: pre-wrap; }
.cl-el { background: #fff; border: 1px solid #e2e5e9; align-self: flex-start; border-bottom-left-radius: 3px; }
.cl-el b { font-weight: 650; }
.cl-el .acciones { justify-content: flex-start; margin-top: 8px; }
.cl-bienv { color: #666d76; font-size: 12.5px; display: grid; gap: 7px; }
.cl-tip { background: transparent; border: 1px solid #d3d8de; padding: 7px 10px; border-radius: 9px; text-align: left; cursor: pointer; font-size: 12.5px; color: #17191c; }
.cl-tip:hover { background: rgba(102,109,118,.09); }
.cl-tareas { align-self: flex-start; display: grid; gap: 1px; }
.cl-tarea { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #666d76; padding: 2px 0; }
.cl-tarea .cl-tick { width: 13px; display: grid; place-items: center; color: var(--accent); }
.cl-tarea .cl-tick .i { width: 12px; height: 12px; stroke-width: 2.2; }
.cl-tarea.on .cl-tick { color: #666d76; animation: cl-late 1s ease-in-out infinite; }
.cl-tarea.mal .cl-tick { color: var(--red); }
@keyframes cl-late { 50% { opacity: .3; } }
.cl-bui { align-self: flex-start; display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; background: #fff; border: 1px solid #e2e5e9; border-radius: 11px; }
.cl-px { display: grid; grid-template-columns: repeat(3, 4px); gap: 1.5px; }
.cl-px i { display: block; width: 4px; height: 4px; border-radius: 1px; background: #17191c; opacity: .15; animation: cl-pixel 650ms ease-in-out infinite; }
.cl-px i:nth-child(2) { animation-delay: 70ms } .cl-px i:nth-child(3) { animation-delay: 140ms } .cl-px i:nth-child(4) { animation-delay: 210ms } .cl-px i:nth-child(5) { animation-delay: 280ms }
.cl-px i:nth-child(6) { animation-delay: 350ms } .cl-px i:nth-child(7) { animation-delay: 420ms } .cl-px i:nth-child(8) { animation-delay: 490ms } .cl-px i:nth-child(9) { animation-delay: 560ms }
@keyframes cl-pixel { 0%, to { opacity: .15 } 18%, 42% { opacity: 1 } 62% { opacity: .15 } }
.cl-lbl { font-size: 12.5px; font-weight: 500; color: transparent; background-clip: text; -webkit-background-clip: text;
  background-image: linear-gradient(90deg, #666d76 35%, #17191c 50%, #666d76 65%); background-size: 200% 100%; animation: cl-shimmer 1.4s linear infinite; white-space: nowrap; }
@keyframes cl-shimmer { 0% { background-position: 150% } to { background-position: -50% } }
.cl-t { font-family: var(--mono); font-size: 11px; color: #666d76; font-variant-numeric: tabular-nums; }
#cl-prompt { display: flex; gap: 7px; align-items: flex-end; padding: 9px; border-top: 1px solid #e2e5e9; background: #fff; }
#cl-prompt .pr { font-family: var(--mono); color: var(--accent); padding: 0 0 8px 3px; font-weight: 600; }
#cl-txt { flex: 1; min-height: 34px; height: 34px; max-height: 110px; padding: 7px 10px; border: 1px solid #d3d8de; border-radius: 6px; font-size: 13px; resize: none; overflow-y: auto; background: #fff; }
#cl-txt:focus { outline: 0; border-color: #b9c0c8; box-shadow: 0 0 0 3px rgba(102,109,118,.09); }
#cl-enviar { height: 34px; width: 34px; border-radius: 8px; border: 0; background: #17191c; color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
#cl-enviar .i { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .cl-px i, .cl-lbl, .cl-tarea.on .cl-tick { animation: none; } .cl-lbl { color: #666d76; } }

/* ── Celular ─────────────────────────────────────────────────────────────────────────── */
/* Checklist: tareas que esperan a otra */
.checklist .fila.espera .t { color: var(--ink-2); }
.checklist .fila.espera .marca { opacity: .55; }

/* Papeles recibidos (OCR) */
.subir-papel { display: flex; align-items: center; gap: 8px; margin: 10px 16px; padding: 14px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-card); cursor: pointer; flex-wrap: wrap; }
.subir-papel:hover, .subir-papel.encima { border-color: var(--accent); background: var(--accent-tint); }
.papel { margin: 0 16px 10px; padding: 12px 14px; border-radius: var(--r-card); box-shadow: var(--sh-hair); background: var(--surface); }
.papel-cab { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.papel-alertas { display: grid; gap: 3px; margin-bottom: 8px; font-size: 12px; color: var(--orange); }
.papel-alertas .i { width: 13px; height: 13px; vertical-align: -2px; }
.papel-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; margin-bottom: 8px; }
.papel-campos input.corregido { box-shadow: 0 0 0 1.5px var(--accent); }
.papel-pie { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 12px; }
.lector { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); border-top-color: transparent; animation: girar 0.8s linear infinite; vertical-align: -1px; }
@keyframes girar { to { transform: rotate(360deg); } }

/* Next steps */
.sug { border-top: 1px solid var(--line); }
.sug summary { list-style: none; display: flex; gap: 10px; align-items: flex-start; padding: 11px 16px; cursor: pointer; }
.sug summary::-webkit-details-marker { display: none; }
.sug summary:hover { background: var(--hover); }
.sug summary .punto { margin-top: 6px; flex: none; }
.sug-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.sug-t .mu { font-size: 12px; }
.sug-tipo { font-size: 11.5px; color: var(--accent-deep); display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.sug-tipo .i { width: 13px; height: 13px; }
.sug-msj { margin: 0 16px 10px 34px; background: var(--field); border-radius: var(--r-control); padding: 10px 12px; box-shadow: var(--sh-hair); }
.sug-asunto { font-weight: 600; margin: 4px 0 6px; }
.sug-msj pre { margin: 0; white-space: pre-wrap; font: 12.5px/1.5 system-ui, -apple-system, sans-serif; color: var(--ink); max-height: 320px; overflow: auto; }
.sug-acc { padding: 0 16px 12px 34px; justify-content: flex-start; flex-wrap: wrap; }
.sug-panel .panel-cab h2 .i { width: 15px; height: 15px; }

/* Pestañas de sección (Counterparties: Directory · KYC · OFAC · ISCC; Cash flow · Bank; Accounts · Statements) */
.subnav { display: flex; gap: 2px; margin: -8px 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subnav a { padding: 8px 12px; color: var(--ink-3); font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--ink); border-bottom-color: var(--ink); }
.subnav .k { font: 500 11px var(--mono); color: var(--ink-3); } .subnav .k.mal { color: var(--red); }

/* Áreas del calendario: color + etiqueta (el color nunca va solo) */
.area-cuadro { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; background: var(--a-recordatorio); }
.area-trading.area-cuadro { background: var(--a-trading); } .area-compliance.area-cuadro { background: var(--a-compliance); } .area-finance.area-cuadro { background: var(--a-finance); }
.area-chip:not(.on) { opacity: .55; } .area-chip:not(.on) .area-cuadro { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.chips button.area-chip.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-btn); }
.cal-ev { border-left: 3px solid var(--a-recordatorio); padding-left: 4px; }
.cal-ev.area-trading { border-left-color: var(--a-trading); } .cal-ev.area-compliance { border-left-color: var(--a-compliance); } .cal-ev.area-finance { border-left-color: var(--a-finance); }
.area-fila { box-shadow: inset 3px 0 0 var(--a-recordatorio); }
.area-fila.area-trading { box-shadow: inset 3px 0 0 var(--a-trading); } .area-fila.area-compliance { box-shadow: inset 3px 0 0 var(--a-compliance); } .area-fila.area-finance { box-shadow: inset 3px 0 0 var(--a-finance); }
.tag.area-recordatorio { background: #eceef0; color: var(--a-recordatorio); }
.c3 { grid-column: span 3; }
.recordar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.recordar .input { height: 30px; width: auto; } .recordar [name=texto] { min-width: 280px; flex: 1; }

/* Vista previa flotante */
.vp { position: fixed; inset: 0; z-index: 60; background: rgba(20,24,20,.22); backdrop-filter: blur(1px); display: grid; place-items: center; padding: 3vh 3vw; animation: vp-in .16s var(--ease); }
.vp-caja { width: min(940px, 100%); height: min(94vh, 1240px); background: var(--surface); border-radius: var(--r-window); box-shadow: var(--sh-overlay); display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.vp-cab { display: flex; gap: 10px; align-items: center; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.vp-cab .acciones { margin-left: auto; }
.vp iframe { width: 100%; height: 100%; border: 0; background: #e9ece9; }
@keyframes vp-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vp { animation: none; } }

/* Celdas largas de la base de contrapartes: dos líneas y el resto al pasar el mouse */
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.base-cp td:nth-child(3) { max-width: 240px; }

/* Modo demo */
#marca-demo { position: fixed; top: 10px; right: 12px; z-index: 70; font: 700 11px/1 var(--mono); letter-spacing: .14em; color: #fff; background: #b4232a; padding: 6px 9px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.18); pointer-events: auto; }
body.con-demo .topbar { padding-right: 70px; }
@media (max-width: 640px) { body.con-demo .topbar { padding-right: 0; } #marca-demo { top: auto; bottom: 74px; right: 10px; } .sug-tipo { font-size: 0; } .sug-tipo .i { width: 15px; height: 15px; } }

/* Volver */
.topbar .volver { margin-right: 4px; padding-left: 6px; flex: none; }
.topbar .volver .i { transform: rotate(180deg); }

/* ── Flujo del trade: una fila de 5 procesos (proveedor → cliente) ── */
.flujo-scroll { overflow-x: auto; padding: 14px 16px 6px; }
.flujo1 { display: grid; grid-template-columns: repeat(var(--n), minmax(120px, 1fr)); gap: 0 4px; min-width: 640px; }
.flujo1 > * { min-width: 0; }
.fl-punta { grid-row: 1; font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 0 4px 8px; border-bottom: 2px solid var(--line-strong); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-punta.cli { margin-left: 6px; }
.fl-chev { height: 28px; margin: 3px 0; border: 0; padding: 0; cursor: pointer; background: #dfe3df; display: grid; place-items: center;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%, 11px 50%); transition: filter .15s; }
.fl-chev.first { clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%); }
.fl-chev.ok { background: var(--accent); } .fl-chev.warn { background: #d99447; } .fl-chev.bad { background: var(--red); }
.fl-chev.none { background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(0,0,0,.05) 5px 6px); }
.fl-chev:hover { filter: brightness(1.06) saturate(1.1); }
.fl-chev.grande { grid-row: 2; height: 52px; margin: 0; display: grid; align-content: center; gap: 1px; padding: 0 18px 0 22px; text-align: left; justify-items: start; color: var(--ink); }
.fl-chev.grande.first { padding-left: 12px; }
.fl-chev.grande.ok, .fl-chev.grande.warn, .fl-chev.grande.bad { color: #fff; }
.fl-chev.grande .fl-nombre { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fl-chev.grande .fl-cuenta { font: 500 11px var(--mono); opacity: .8; }
.fl-chev.grande.sel { box-shadow: inset 0 -4px 0 rgba(0,0,0,.28); }
.flujo1 .fl-nota { grid-row: 3; }
.fl-nota { text-align: center; padding: 0 2px 6px; display: grid; justify-items: center; }
.fl-nota .pin { width: 1px; height: 8px; background: var(--line-strong); }
.fl-nota .box { max-width: 100%; font-size: 11px; line-height: 1.3; padding: 3px 7px; border-radius: 6px; cursor: pointer; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fl-nota .box.espera { background: var(--orange-tint); color: var(--orange); }
.fl-nota .box.mal { background: var(--red-tint); color: var(--red); }
.fl-nota .box.nota { background: var(--inset); color: var(--ink); }
.fl-nota .box.vacia { color: var(--ink-3); border: 1px dashed var(--line-strong); }
/* Lista de trades: tarjetas con el flujo chico */
.tarjetas-trade { display: grid; gap: 10px; margin-bottom: 16px; }
.tarjeta-trade { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 12px 16px 12px; cursor: pointer; display: grid; gap: 8px; transition: box-shadow .15s; }
.tarjeta-trade:hover { box-shadow: var(--sh-card), 0 4px 14px rgba(0,0,0,.06); }
.tt-cab { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tt-der { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: 12.5px; }
.tt-partes { display: flex; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.flmini { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
.flmini .fl-chev { height: 22px; margin: 0; cursor: inherit; }
.flmini .fl-chev b { font-size: 10.5px; font-weight: 600; color: rgba(0,0,0,.55); padding-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.flmini .fl-chev.ok b, .flmini .fl-chev.bad b, .flmini .fl-chev.warn b { color: #fff; }
.flmini .fl-chev.none b { color: var(--ink-3); }
.flmini .fl-chev.actual { box-shadow: inset 0 -3px 0 rgba(0,0,0,.35); }
.flmini .fl-chev.corte { margin-left: 8px; }
.flmini-sig { font-size: 12px; }
.tt-alerta { font-size: 12px; color: var(--red); display: flex; gap: 6px; align-items: center; }

/* Papeles que se emiten (factura, estado de cuenta): hoja blanca, sin menú ni Claudio; imprime limpio */
.modo-imp .shell { grid-template-columns: minmax(0, 1fr); }
.modo-imp aside.nav, .modo-imp #cl-btn, .modo-imp #cl { display: none !important; }
.barra-imp { display: flex; justify-content: space-between; max-width: 900px; margin: 4px auto 14px; gap: 10px; flex-wrap: wrap; }
.visor-pdf { display: block; width: 100%; max-width: 900px; height: calc(100dvh - 120px); margin: 0 auto 10px; border: 0; border-radius: var(--r-card); box-shadow: var(--sh-card); background: #fff; }
.barra-imp .btn .i { transform: none; }
.barra-imp a.btn .i { transform: rotate(180deg); }
.hoja-imp { max-width: 820px; margin: 0 auto 40px; background: var(--surface); box-shadow: var(--sh-card); border-radius: var(--r-card); padding: 40px 44px; display: grid; gap: 26px; font-size: 13px; }
.hoja-imp .panel { box-shadow: none; margin: 0; }
.hoja-imp .panel-cab { padding-left: 0; padding-right: 0; }
.membrete { display: flex; justify-content: space-between; color: var(--ink-2); line-height: 1.55; }
.membrete b { color: var(--ink); }
.imp-titulo { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-top: 2px solid var(--ink); padding-top: 18px; }
.imp-titulo h1 { font-size: 22px; letter-spacing: -.01em; margin: 0; }
.imp-titulo .kv { min-width: 220px; }
.imp-partes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; line-height: 1.55; }
.imp-partes .mu, .imp-banco > .mu { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.imp-tabla { width: 100%; border-collapse: collapse; }
.imp-tabla th { text-align: left; font-size: 11px; font-weight: 500; color: var(--ink-3); border-bottom: 1px solid var(--line); padding: 8px 0; }
.imp-tabla td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.imp-tabla .n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; padding-left: 16px; }
.imp-tabla tfoot td { border-bottom: 0; font-weight: 600; font-size: 14px; }
.falta-dato { color: var(--red); background: var(--red-tint); padding: 0 4px; border-radius: 4px; }
@media print {
  body, .content { background: #fff !important; padding: 0 !important; }
  .barra-imp, #avisos { display: none !important; }
  .hoja-imp { box-shadow: none; padding: 0; max-width: none; }
  .falta-dato { background: none; }
}

/* Tablet: el menú queda a la izquierda pero sólo con íconos (el nombre sale al pasar el mouse) */
@media (min-width: 641px) and (max-width: 1100px) {
  .shell { grid-template-columns: 64px minmax(0, 1fr); }
  aside.nav { padding: 12px 8px; align-items: center; }
  .brand { padding: 4px 0 14px; } .brand b { display: none; }
  .menu { margin: 0; padding: 0; width: 100%; }
  .area { justify-items: center; margin-bottom: 8px; }
  .area-t { display: none; }
  .area.cerrada .tab { display: flex; }
  .tab { font-size: 0; width: 44px; height: 40px; padding: 0; justify-content: center; position: relative; gap: 0; }
  .tab .i { opacity: .85; width: 18px; height: 18px; }
  .tab .k { position: absolute; top: 3px; right: 3px; margin: 0; font-size: 9.5px; line-height: 1; padding: 2px 3px; border-radius: 6px; background: var(--surface); }
  .area + .area { border-top: 1px solid var(--line); padding-top: 8px; }
  .navfoot .yo { display: none; } .navfoot { justify-items: center; padding: 8px 0 0; } .navfoot .ia { font-size: 0; }
  #b-salir { font-size: 10.5px; }
}

@media (max-width: 860px) {
  main.content { padding: 0 12px 96px; }
  .topbar { position: static; padding-top: 12px; flex-wrap: wrap; }
  .grilla > * { grid-column: span 12; }
  .cal-tx, .cal-mas { display: none; }
  .flmini .fl-chev b { display: none; }
  .flujo1 { grid-template-columns: repeat(var(--n), 118px); min-width: 0; }
  .flujo-scroll { padding: 12px 10px 4px; scroll-snap-type: x proximity; }
  .fl-etapa { scroll-snap-align: center; }
  .tt-der { margin-left: 0; width: 100%; }
  .hoja-imp { padding: 22px 16px; overflow-wrap: anywhere; }
  .imp-tabla { table-layout: fixed; font-size: 12px; }
  .imp-tabla th:first-child, .imp-tabla td:first-child { width: 55%; }
  .imp-pu { display: none; }
  .imp-tabla .n { padding-left: 8px; }
  .imp-titulo .kv { min-width: 0; width: 100%; }
  .imp-partes, .imp-titulo { grid-template-columns: 1fr; flex-direction: column; }
  .cal-dia .cal-ev { display: inline-flex; margin-right: 2px; }
  .partes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .propuesta-cuerpo { grid-template-columns: 1fr; }
  .propuesta-cuerpo > section { border-right: 0; border-bottom: 1px solid var(--line); }
  .fila { padding: 10px 12px; }
  .fila .acc { grid-column: 2 / -1; justify-content: flex-start; }
  .fila.sin-marca .acc { grid-column: 1 / -1; }
  .solo-ancho { display: none; }
  th:first-child, td:first-child { padding-left: 12px; } th:last-child, td:last-child { padding-right: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  /* Celular: el menú es una fila arriba que se desplaza de costado */
  .shell { grid-template-columns: 1fr; }
  aside.nav { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 2px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line);
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  aside.nav::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .brand { padding: 0 6px 0 2px; } .brand b { display: none; }
  .tab { height: 30px; padding: 0 9px; } .tab .i { display: none; } .tab .k { margin-left: 4px; }
  .nav-sep, .navfoot, .area-t { display: none; }
  .area { display: contents; }
  .menu { display: contents; }
  .area.cerrada .tab { display: flex; }
  .partes { grid-template-columns: 1fr; }
  #cl { inset: 6px !important; width: auto !important; height: auto !important; }
  #cl-tirador { display: none; }
  #cl header { cursor: default; }
}
