/* 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: #676c67;
  --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; }
/* MENÚ = front/menu del núcleo (web/nucleo/menu.*, 27/10): el de Kura, igual en las tres apps. Los colores salen de los tokens. */
#menu { display: flex; flex: 1 1 auto; min-height: 0; min-width: 0; }
.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); }
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; color: var(--ink-3); margin-left: 4px; } .chips button.on .k { color: inherit; opacity: .8; }
.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; grid-template-columns: minmax(0, 1fr); 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-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 .punto { border-radius: 2px; background: var(--a-recordatorio); }
.cal-ev.area-trading .punto { background: var(--a-trading); } .cal-ev.area-compliance .punto { background: var(--a-compliance); } .cal-ev.area-finance .punto { background: 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 */
/* vista previa del núcleo (front/vista, 04/11 flotante): con los tokens de la app */
.vpv, .vp { --vp-fondo: var(--surface); --vp-borde: var(--line); --vp-texto: var(--ink); --vp-radio: var(--r-window); }
.vpv-caja { box-shadow: var(--sh-overlay); }
.vpm { 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; }
.vpm iframe { width: 100%; height: 100%; border: 0; background: #e9ece9; }
@keyframes vp-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vpm { 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; }

/* 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: 4px; left: 4px; right: auto; bottom: auto; font-size: 8px; padding: 3px 4px; } /* antes abajo, encima de Claudio y de los botones de las filas */ .sug-tipo { font-size: 0; } .sug-tipo .i { width: 15px; height: 15px; } }

/* Trade: resumen de una línea por parte */
.resumen-trade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); margin-bottom: 16px; overflow: hidden; }
.rt-celda { padding: 11px 14px; border-right: 1px solid var(--line); min-width: 0; display: grid; gap: 2px; align-content: start; color: inherit; text-decoration: none; }
.rt-celda:last-child { border-right: 0; }
.rt-celda.falta { box-shadow: inset 0 2px 0 var(--red); }
.rt-plata:hover { background: var(--hover); }
.rt-rol { font-size: 11px; font-weight: 500; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.rt-nom { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-nom a { color: inherit; }
.rt-m { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.rt-m .i { width: 12px; height: 12px; vertical-align: -2px; }
.rt-celda .editor, .rt-celda form.editor { margin-top: 8px; }
/* Tareas del paso: una línea cada una */
.etapa-cab { display: flex; gap: 10px; align-items: baseline; padding: 10px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--inset); flex-wrap: wrap; }
.etapa-cab .acciones { margin-left: auto; }
.tarea { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.tarea .marca { align-self: center; }
.tarea-t { all: unset; cursor: pointer; display: flex; gap: 8px; align-items: center; min-width: 0; }
.tarea-t:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.tarea-nom { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarea-m { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.tarea.hecha .tarea-nom { color: var(--ink-3); }
.tarea.espera .tarea-nom { color: var(--ink-2); } .tarea.espera .marca { opacity: .55; }
.tarea-det { grid-column: 2 / -1; display: grid; gap: 6px; padding: 2px 0 4px; }
.crit { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--red-tint); color: var(--red); font: 700 10px/1 system-ui; flex: none; }
.historia { display: grid; } .historia > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 7px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
@media (max-width: 860px) { .resumen-trade { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rt-celda:nth-child(2n) { border-right: 0; } .rt-celda:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 640px) { .tarea { grid-template-columns: 20px minmax(0, 1fr); } .tarea-m { grid-column: 2; } }

/* Claudio señala en la página */
.marca-cl { position: fixed; z-index: 55; pointer-events: none; border-radius: 10px; box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px rgba(31,122,77,.18); animation: marca-in .35s var(--ease) both; }
.marca-cl span { position: absolute; left: 0; top: -22px; background: var(--accent); color: #fff; font: 600 11px/1 system-ui; padding: 4px 7px; border-radius: 6px; white-space: nowrap; }
.marca-cl span:empty { display: none; }
@keyframes marca-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .marca-cl { animation: none; } }
/* Claudio en su propia ventana */
body.modo-claudio #app, body.modo-claudio #cl-btn, body.modo-claudio #cl-tirador { display: none !important; }
body.modo-claudio #app[hidden] ~ #cl:not([hidden]) { display: flex !important; }
body.modo-claudio #cl { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; left: 0 !important; top: 0 !important; }
body.modo-claudio #cl header { cursor: default; }

/* Embarque */
.embarque { padding: 12px 16px; display: grid; gap: 12px; border-bottom: 1px solid var(--line); }
.emb-kv { grid-template-columns: max-content 1fr max-content 1fr; gap: 4px 14px; } .emb-kv dd { text-align: left; }
.emb-cont { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; font-size: 12px; }
.emb-ctrl { display: grid; gap: 4px; font-size: 12.5px; }
.emb-ctrl > div { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; }
.emb-ctrl .ok > span:first-child { color: var(--accent); font-weight: 700; } .emb-ctrl .no > span:first-child { color: var(--red); font-weight: 700; } .emb-ctrl .no > span:nth-child(2) { color: var(--red); }
@media (max-width: 640px) { .emb-kv { grid-template-columns: max-content 1fr; } }

/* 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); }
.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; }
}

/* Financial statements (web/estados.js): la hoja es la del núcleo (web/nucleo/hoja.css, se carga al entrar). Acá sólo el tema y lo que
   las reglas generales de tablas de la app le pisarían (td.n en mono, bordes). */
.sel-mes { display: flex; align-items: center; gap: 6px; } .sel-mes b { min-width: 118px; text-align: center; font-size: 13.5px; }
.hj-wrap { --hj-fondo: var(--inset); --hj-acento: #165c3a; border-radius: var(--r-card); }
.hj { font: 13px/1.45 system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; }
.hj-est td, .hj-est td.n { font-family: inherit; border: 0; } .hj-est th { 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 { width: 100%; }   /* el riel (íconos) lo pone front/menu con riel: 1100 */
}

@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 */
  /* align-content: start — con min-height 100dvh la grilla repartía el alto sobrante entre las dos filas y en una página
     corta quedaba un hueco de ~90px entre el menú y el título (Trades en el iPhone) */
  .shell { grid-template-columns: 1fr; align-content: start; }
  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);
    }
  .brand { padding: 0 6px 0 2px; } .brand b { display: none; }
  .mn-it[data-k=mesa] { display: none; }   /* el Workspace es de pantalla grande */
  .partes { grid-template-columns: 1fr; }
  #cl { inset: 6px !important; width: auto !important; height: auto !important; }
  #cl-tirador { display: none; }
  #cl header { cursor: default; }
}

/* Pantalla táctil (iPhone/iPad): reglas fijas del dueño — botones de ≥44 px y campos de 16 px (con menos, Safari hace zoom al
   tocar el campo). La app se diseñó densa para escritorio (botones de 22–30 px, campos de 12–13 px) y no tenía esta capa. */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea, .input { font-size: 16px !important; }
  .btn, .chips button, .mn-it, .subnav a, .tabs button, .pestanas button, #cl-btn, summary.btn, .cajon-cab { min-height: 44px; }
  .btn.xs, .btn.sm { padding-left: 12px; padding-right: 12px; }
  /* lo que quedaba chico en el barrido de iPhone: íconos de Claudio, chips de Settings, listas de plantillas, "+N more", selects con alto fijo */
  .cl-ic, #cl-enviar, .pl-chip, .tb-nueva, .mesa-doc, .pl-item, details > summary, select.input, input.input { min-height: 44px; }
  .cl-ic, #cl-enviar { min-width: 44px; }
  select.input { height: 44px !important; }
  #cl-btn kbd { display: none; } /* ⌘K no existe en el celu */
  .topbar h1 > a, .lado-cab a { display: inline-flex; align-items: center; min-height: 44px; }
  a.brand { display: inline-flex; align-items: center; min-height: 44px; }
}
/* La propuesta (New trade, alta…) se trae a la vista con scrollIntoView: que no quede su cabecera debajo del encabezado fijo */
#zona-prop { scroll-margin-top: 72px; }
.cx-error { background: var(--red-tint); color: var(--red-ink); border-radius: 8px; padding: 8px 10px; } .cx-error .mono { font-size: 11.5px; word-break: break-word; }
.cx .cx-est.mal { color: var(--red); }

/* ── Settings → Templates (piezas de lego) ── */
.pl-claudio { padding: 12px 16px; }
.pl-pide { display: flex; gap: 10px; align-items: center; }
.pl-pide .input { flex: 1; min-width: 0; }
.pl-cl { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pl-cl .i { width: 15px; height: 15px; color: var(--accent); }
.pl-pensando { display: flex; align-items: center; gap: 10px; padding: 12px 2px 2px; color: var(--ink-2); }
.pl-giro { display: inline-block; width: 14px; height: 14px; }
.pl-propuesta { display: grid; gap: 8px; padding-top: 12px; }
.pl-propuesta > p { color: var(--ink); }
.pl-cambio { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: var(--r-control); background: var(--field); cursor: pointer; }
.pl-cambio input { margin-top: 3px; accent-color: var(--accent); }
.pl-cambio.no { opacity: .6; cursor: default; }
.pl-cambio details { margin-top: 4px; }
.pl-cambio summary { color: var(--ink-3); font-size: 12px; cursor: pointer; }
.pl-mini { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
div.pl-mini { padding-left: 0; }
.pl-propuesta .acciones { justify-content: flex-end; }
.pl-grilla { align-items: start; }
.pl-lista { position: sticky; top: 12px; }
.pl-item { display: grid; gap: 1px; padding: 9px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.pl-item:hover { background: var(--hover); }
.pl-item.on { background: var(--accent-tint); }
.pl-item .mu { font-size: 11.5px; }
.pl-piezas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 16px 4px; }
.pl-ladrillo { grid-column: 1 / -1; border-radius: var(--r-control); background: var(--surface); box-shadow: var(--sh-card); overflow: hidden; }
.pl-ladrillo.mitad { grid-column: auto; }
.pl-l-cab { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; background: var(--field); border-bottom: 1px solid var(--line); min-width: 0; }
.pl-l-cab .acciones { margin-left: auto; flex-shrink: 0; }
.pl-l-n { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 600; flex-shrink: 0; }
.pl-l-desc { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pl-l-cuerpo { display: grid; gap: 6px; padding: 8px 10px 10px; }
.pl-l-cuerpo:empty { display: none; }
.pl-dos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
.pl-l-cuerpo .input { background: var(--field); }
.pl-opc { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); align-items: center; }
.pl-opc:empty { display: none; }
.pl-paleta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px solid var(--line); margin-top: 10px; }
.pl-paleta > .mu { flex-basis: 100%; }
.pl-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border: 0; border-radius: var(--r-chip); background: var(--field); box-shadow: var(--sh-hair); font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; }
.pl-chip:hover { background: var(--accent-tint); color: var(--accent-deep); }
.pl-chip .i { width: 12px; height: 12px; }
.pl-vars summary { cursor: pointer; color: var(--ink-2); }
.pl-vars > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 10px; margin-top: 8px; }
.pl-var { display: flex; gap: 6px; align-items: baseline; padding: 3px 4px; border: 0; background: none; font: inherit; font-size: 12px; text-align: left; cursor: pointer; border-radius: 4px; min-width: 0; }
.pl-var:hover { background: var(--hover); }
.pl-var .mu { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-sub { font-weight: 600; margin-bottom: 8px; }
.pl-sub .mu { font-weight: 400; }
.pl-campos { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-campo { display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 4px 0 9px; border-radius: var(--r-chip); background: var(--accent-tint); color: var(--accent-deep); font-size: 12px; }
.pl-campo button { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 0; background: none; color: inherit; cursor: pointer; border-radius: 4px; }
.pl-campo button:hover { background: rgba(0,0,0,.06); }
.pl-campo .i { width: 11px; height: 11px; }
.pl-nuevo-campo { display: flex; gap: 6px; }
.pl-nuevo-campo .input { min-width: 0; }
.pl-control { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto auto; gap: 8px; align-items: start; margin-bottom: 6px; }
.pl-control .tilde { margin-top: 8px; font-size: 12px; }
.pl-conf { display: inline-flex; align-items: center; gap: 6px; }
.papel-extras { font-size: 12px; color: var(--ink-2); padding: 0 0 6px; }
.papel-extras b { font-weight: 500; color: var(--ink); }
.papel-nuevo { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 8px; border-radius: var(--r-control); background: var(--accent-tint); color: var(--accent-deep); font-size: 12.5px; }
@media (max-width: 1100px) { .pl-grilla > .c4, .pl-grilla > .c8 { grid-column: 1 / -1; } .pl-lista { position: static; } }
@media (max-width: 640px) {
  .pl-pide { flex-wrap: wrap; } .pl-pide .input { flex-basis: 100%; order: 2; } .pl-pide .btn { order: 3; }
  .pl-piezas { grid-template-columns: minmax(0, 1fr); padding: 0 10px 4px; } .pl-ladrillo.mitad { grid-column: 1 / -1; }
  .pl-l-desc { display: none; } .pl-control { grid-template-columns: minmax(0, 1fr) auto; } .pl-control textarea { grid-column: 1 / -1; }
  .pl-nuevo-campo { flex-wrap: wrap; }
}

/* ── Risk ── */
.rg-check { display: grid; grid-template-columns: minmax(0, 1fr) 220px 180px auto; gap: 8px; align-items: center; }
.rg-check > div { grid-column: 1 / -1; }
#rg-res .banda { margin: 0 16px 14px; }
.rg-fila.mal { background: var(--red-tint); }
.chips-fila { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.pl-chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.pl-chip.on .mu { color: rgba(255,255,255,.7); }
/* cuentas bancarias: tarjeta con los 3 pasos del doble control */
.cta-lista { display: grid; gap: 10px; }
.cta { border-radius: var(--r-control); box-shadow: var(--sh-card); background: var(--surface); padding: 10px 12px; display: grid; gap: 6px; }
.cta.lista { box-shadow: 0 0 0 1px rgba(31,122,77,.35); }
.cta.rechazada, .cta.inactiva { opacity: .65; }
.cta-cab { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cta-alertas { display: grid; gap: 2px; font-size: 12px; }
.cta-alertas .mal { color: var(--red); } .cta-alertas .aviso { color: var(--orange); } .cta-alertas div { display: flex; gap: 6px; align-items: flex-start; }
.cta-alertas .i { width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; }
.cta-pasos { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 4px; counter-reset: paso; font-size: 12.5px; }
.cta-pasos li { counter-increment: paso; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-left: 26px; position: relative; color: var(--ink-2); }
.cta-pasos li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 600; background: var(--inset); color: var(--ink-3); }
.cta-pasos li.ok::before { content: '✓'; background: var(--accent); color: #fff; }
.cta-pasos li.mal::before { content: '!'; background: var(--red); color: #fff; }
.cta-pasos li.actual::before { background: var(--orange); color: #fff; }
.cta-pasos b { color: var(--ink); font-weight: 500; }
.cta-pasos .si { color: var(--accent-deep); } .cta-pasos .no { color: var(--red); }
.cta-acc { justify-content: flex-start; }
.cta-form { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding: 8px 10px; background: var(--field); border-radius: var(--r-control); }
.cta-nueva summary { cursor: pointer; }
@media (max-width: 640px) { .rg-check { grid-template-columns: minmax(0, 1fr); } }

/* ── Documents → Templates we issue: el editor es del núcleo (web/nucleo/editor.css); acá, las piezas con datos de Charlene ── */
.lnk { border: 0; background: none; padding: 0; font: inherit; color: var(--accent-deep); text-decoration: underline; cursor: pointer; }
.hb-t.ficha { display: flex; align-items: center; gap: 7px; font-family: system-ui, sans-serif; text-transform: none; }
.hb-t.ficha i { font-style: normal; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 10px; }
.hb-t.ficha span { font-weight: 400; color: var(--ink-3); }
.hb-membrete { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding-bottom: 12px; border-bottom: 2px solid #1a1c1a; font-family: system-ui, sans-serif; }
.hoja.clausulas .hb-membrete { border-bottom: 3px double #1a1c1a; }
.hb-membrete small { display: block; color: var(--ink-3); font-size: 10.5px; line-height: 1.4; }
.hb-logo { display: grid; grid-template-columns: 10px 10px; gap: 2px; } .hb-logo i { width: 10px; height: 10px; } .hb-logo i:nth-child(1) { background: #f0b90b; } .hb-logo i:nth-child(2) { background: #2f4a26; } .hb-logo i:nth-child(3) { background: #d8c8a0; } .hb-logo i:nth-child(4) { background: #1b1a15; }
.hb-titulo { text-align: right; } .hb-titulo strong { display: block; font-size: 21px; font-weight: 700; line-height: 1.1; }
.hoja.clausulas .hb-titulo strong { font-family: "Times New Roman", Times, serif; }
.hb-titulo > span { display: block; color: var(--ink-3); font-size: 12px; }
.hb-titulo table { margin: 6px 0 0 auto; font-size: 11px; border-collapse: collapse; } .hb-titulo td { padding: 1px 0 1px 14px; } .hb-titulo td:first-child { color: var(--ink-3); }
.hb-borrador { color: var(--red); font-weight: 700; font-size: 11px; font-family: system-ui, sans-serif; }
.hb-partes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.hb-parte { padding: 6px 0 0; border-top: 1px solid #d9ddd9; }
.hoja.clausulas .hb-parte { box-shadow: none; padding: 0; }
.hb-parte small { display: block; color: var(--accent); font: 600 9.5px system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.hb-parte b { display: block; } .hb-parte span { color: #545854; font-size: .92em; }
.hb-kv { display: grid; gap: 4px; font-size: .95em; } .hb-kv.dos { grid-template-columns: 1fr 1fr; } .hb-kv small { display: block; color: var(--ink-3); font: 600 9px system-ui, sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.hb-firmas { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 26px; } .hb-firmas i { display: block; border-top: 1px solid #1a1c1a; margin-bottom: 4px; } .hb-firmas small { color: var(--ink-3); }
@media (max-width: 640px) { .hb-partes, .hb-kv.dos { grid-template-columns: 1fr; } .hb-membrete { grid-template-columns: auto minmax(0, 1fr); } .hb-titulo { grid-column: 1 / -1; text-align: left; } .hb-titulo table { margin-left: 0; } }

/* ── Tareas del trade: tabla con la prueba ── */
.tk-cab, .tk { display: grid; grid-template-columns: 22px minmax(0, 1fr) 72px 92px 132px; gap: 10px; align-items: center; padding: 8px 16px; }
.tk-cab { padding-top: 6px; padding-bottom: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.tk { border-bottom: 1px solid var(--line); transition: background .12s var(--ease); }
.tk.encima { background: var(--accent-tint); box-shadow: inset 0 0 0 2px var(--accent); }
.tk-ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 700; font-size: 12px; }
.tk.ok .tk-ic { background: var(--accent); box-shadow: none; color: #fff; } .tk.ok .tk-ic .i { width: 12px; height: 12px; }
.tk.mal .tk-ic { background: var(--red); box-shadow: none; color: #fff; }
.tk.espera { color: var(--ink-3); } .tk.espera .tk-ic { box-shadow: inset 0 0 0 1.5px var(--line); }
.tk.leyendo .tk-ic { box-shadow: none; }
.tk-nom { border: 0; background: none; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; display: grid; gap: 1px; }
.tk-nom b { font-weight: 600; }
.tk.ok .tk-nom b { font-weight: 500; color: var(--ink-2); }
.tk-sub { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk.mal .tk-sub { color: var(--red); }
.tk-quien { font-size: 12px; color: var(--ink-2); }
.tk-cuando { font-size: 12px; display: grid; } .tk-cuando small { color: var(--ink-3); font-size: 11px; }
.tk-acc { justify-self: end; }
.tk-subir { cursor: pointer; }
.tk-det { grid-column: 2 / -1; display: grid; gap: 6px; padding: 4px 0 6px; }
.tk-que { font-size: 12.5px; }
.tk-prueba { font-size: 12px; padding: 7px 10px; border-radius: var(--r-control); background: var(--field); display: grid; gap: 2px; }
.tk-prueba.aceptada { background: var(--accent-tint); } .tk-prueba.rechazada, .tk-prueba.error { background: var(--red-tint); }
@media (max-width: 640px) {
  .tk-cab { display: none; }
  .tk { grid-template-columns: 22px minmax(0, 1fr) auto; row-gap: 4px; }
  .tk-quien, .tk-cuando { grid-column: 2; font-size: 11.5px; } .tk-quien { grid-row: 2; } .tk-cuando { grid-row: 3; }
  .tk-acc { grid-column: 3; grid-row: 1 / span 3; align-self: start; }
  .tk-det { grid-column: 1 / -1; }
}

/* ── Contactos & banca (ficha) ── */
.k-fila { display: grid; grid-template-columns: 132px minmax(0, 1fr) minmax(0, 220px) auto; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.k-fila .k-aut { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.k-puede { font-size: 12px; }
.k-nuevo-det summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.k-nuevo-det summary::-webkit-details-marker { display: none; }
.cta-filas { display: grid; }
.cta-fila { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.cta-fila.rechazada, .cta-fila.inactiva { opacity: .6; }
.cta-alerta { display: flex; gap: 5px; align-items: flex-start; margin-top: 3px; font-size: 12px; color: var(--red); } .cta-alerta .i { width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; }
.cta-pasitos { display: inline-flex; gap: 3px; } .cta-pasitos i { width: 18px; height: 5px; border-radius: 3px; background: var(--inset); box-shadow: inset 0 0 0 1px var(--line); }
.cta-pasitos i.ok { background: var(--accent); box-shadow: none; } .cta-pasitos i.ahora { background: var(--orange); box-shadow: none; }
/* ventana de verificación (como activar 2FA) */
.vcta-caja { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; background: var(--surface); border-radius: var(--r-window); box-shadow: var(--sh-overlay); display: grid; }
.vcta-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px 4px; }
.vcta-prog { list-style: none; margin: 0; padding: 10px 18px 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border-bottom: 1px solid var(--line); }
.vcta-prog li { display: grid; gap: 5px; justify-items: start; font-size: 11.5px; color: var(--ink-3); }
.vcta-prog li::before { content: ''; height: 4px; width: 100%; border-radius: 2px; background: var(--inset); }
.vcta-prog li.ok::before { background: var(--accent); } .vcta-prog li.ahora::before { background: var(--ink); }
.vcta-prog li.ahora { color: var(--ink); font-weight: 600; } .vcta-prog li.ok { color: var(--accent-deep); }
.vcta-prog i { display: none; }
.vcta-cuerpo { padding: 16px 18px 18px; display: grid; gap: 12px; }
.vcta-cuerpo h3 { font-size: 15px; }
.vcta-form { grid-template-columns: 1fr 1fr; }
.vcta-drop { display: grid; justify-items: center; gap: 4px; padding: 22px; border-radius: var(--r-card); border: 1.5px dashed var(--line-strong); cursor: pointer; text-align: center; }
.vcta-drop:hover, .vcta-drop.encima { border-color: var(--accent); background: var(--accent-tint); }
.vcta-drop .i { width: 20px; height: 20px; color: var(--accent); }
.vcta-res { padding: 10px 12px; border-radius: var(--r-control); background: var(--field); font-size: 12.5px; display: grid; gap: 4px; }
.vcta-res.aceptada { background: var(--accent-tint); } .vcta-res.rechazada, .vcta-res.error { background: var(--red-tint); }
.vcta-res .i { width: 13px; height: 13px; vertical-align: -2px; }
.vcta-checks { display: grid; gap: 3px; font-size: 12px; } .vcta-checks .mal { color: var(--red); } .vcta-checks .aviso { color: var(--orange); } .vcta-checks.ok { color: var(--accent-deep); }
.vcta-checks .i { width: 12px; height: 12px; vertical-align: -2px; }
.vcta-elige { display: grid; gap: 6px; }
.vcta-op { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; padding: 9px 11px; border-radius: var(--r-control); box-shadow: var(--sh-hair); cursor: pointer; }
.vcta-op:has(input:checked) { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-tint); }
.vcta-op input { accent-color: var(--accent); margin-top: 2px; }
.vcta-resumen { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--r-control); background: var(--field); font-size: 12.5px; } .vcta-resumen small { display: block; color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.vcta-fin { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 10px 0; } .vcta-fin > .i { width: 34px; height: 34px; color: var(--accent); }
.vcta-forzar { display: flex; gap: 6px; margin-top: 6px; } .vcta-forzar .input { flex: 1; }
.vcta-pie { padding: 0 18px 14px; } .lnk.peligro { color: var(--red); }
.rg-remitente summary { padding: 11px 16px; cursor: pointer; display: flex; gap: 8px; align-items: center; } .rg-remitente summary .i { width: 15px; height: 15px; }
.rg-check { grid-template-columns: auto minmax(0, 1fr) 180px auto; }
.rg-check > span { grid-column: auto; }
.rg-res .banda { margin: 10px 0 0; }
@media (max-width: 640px) { .k-fila, .cta-fila { grid-template-columns: minmax(0, 1fr) auto; } .k-puede { display: none; } .cta-pasitos { display: none; } .vcta-form { grid-template-columns: 1fr; } .rg-check { grid-template-columns: 1fr; } }
.tk-tit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tk-tit .crit { width: auto; height: auto; padding: 0 5px; border-radius: 4px; font-size: 10px; font-weight: 600; line-height: 16px; background: var(--red-tint); color: var(--red); }
@media (max-width: 640px) {
  .k-fila { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .k-fila .k-estado { grid-column: 1; grid-row: 1; } .k-fila > span:nth-child(2) { grid-column: 1; grid-row: 2; min-width: 0; overflow-wrap: anywhere; }
  .k-fila .acciones { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; }
  .cta-fila { grid-template-columns: minmax(0, 1fr) auto; } .cta-fila .tag { grid-column: 2; grid-row: 1; } .cta-fila [data-abrir] { grid-column: 1 / -1; justify-self: start; }
  .grupo-fila { flex-wrap: wrap; row-gap: 2px; }
}

/* ── Expediente (documents) ── */
.dz-cab { display: flex; align-items: center; gap: 14px; padding: 12px 16px; flex-wrap: wrap; }
.dz-barra { flex: 1; min-width: 120px; max-width: 320px; height: 6px; border-radius: 3px; background: var(--inset); overflow: hidden; display: inline-block; }
.dz-barra i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.dz-fila { display: grid; grid-template-columns: 10px minmax(0, 1fr) 150px auto; gap: 12px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.dz-punto { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.dz-fila.ok .dz-punto { background: var(--accent); box-shadow: none; } .dz-fila.falta .dz-punto { box-shadow: inset 0 0 0 1.5px var(--red); }
.dz-fila.revisar .dz-punto { background: var(--orange); box-shadow: none; } .dz-fila.mal .dz-punto { background: var(--red); box-shadow: none; }
.dz-nom { display: grid; gap: 1px; min-width: 0; } .dz-nom .mu { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-est { font-size: 12px; display: grid; } .dz-est small { color: var(--ink-3); font-size: 11px; }
.dz-fila.falta .dz-est { color: var(--red); } .dz-fila.revisar .dz-est { color: var(--orange); } .dz-fila.ok .dz-est { color: var(--accent-deep); }
.dz-pista { font-size: 11.5px; }
.dz-trade { display: grid; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.dz-trade:hover { background: var(--hover); }
.dz-trade-cab { display: flex; gap: 12px; align-items: center; }
.dz-secs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.dz-secs span { padding: 2px 8px; border-radius: var(--r-chip); background: var(--field); color: var(--ink-2); } .dz-secs b { font-weight: 600; }
.dz-secs .ok { background: var(--accent-tint); color: var(--accent-deep); } .dz-secs .mal { background: var(--red-tint); color: var(--red); }
.dz-faltan { font-size: 12px; color: var(--red); } .dz-faltan.ok { color: var(--accent-deep); }
.kyc-inter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 640px) { .dz-fila { grid-template-columns: 10px minmax(0, 1fr) auto; } .dz-est { grid-column: 2; grid-row: 2; } .dz-fila .acciones { grid-column: 3; grid-row: 1 / span 2; } .dz-fila .solo-ancho { display: none; } }
.hb-tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-family: system-ui, sans-serif; }
.hb-parte.fac { font-size: 11.5px; } .hb-parte.fac b { font-size: 12.5px; }
.hb-tabla.grande { font-size: 12.5px; } .hb-tabla.grande th { background: #f4f5f4; padding: 6px; } .hb-tabla.grande td { padding: 7px 6px; } .hb-tabla.grande td:not(:first-child), .hb-tabla.grande th:not(:first-child) { text-align: right; }
.hb-tabla.grande tr.tot td { border-top: 1.5px solid #1a1c1a; border-bottom: 0; }
.hb-letras { margin: 6px 0 0; font: 600 12px system-ui, sans-serif; }
.hb-pago { padding: 10px 12px; border-radius: 6px; box-shadow: inset 0 0 0 1px #d9ddd9; font-family: system-ui, sans-serif; font-size: 12px; }
.hb-pago > small { display: block; color: var(--accent); font: 600 9.5px system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.hb-pago td { padding: 1px 14px 1px 0; } .hb-pago td:first-child { color: var(--ink-3); }
.hb-firma1 { margin: 28px 0 0 auto; width: 240px; font: 11px system-ui, sans-serif; color: var(--ink-3); } .hb-firma1 i { display: block; border-top: 1px solid #1a1c1a; margin-bottom: 4px; }
@media (max-width: 640px) { .hb-tres { grid-template-columns: 1fr; } }
.tt-docs { display: flex; align-items: center; gap: 8px; font-size: 12px; text-decoration: none; color: var(--ink-2); padding-top: 6px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tt-docs .i { width: 14px; height: 14px; } .tt-docs .dz-barra { max-width: 90px; min-width: 60px; } .tt-docs b { font-weight: 500; color: var(--ink); }
.tt-docs .mu { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
/* calidad en el trade */
.q-cab { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 12px 16px 6px; } .q-cab .mu { font-size: 12px; }
.q-tabla td, .q-tabla th { padding-top: 6px; padding-bottom: 6px; }
.q-in { width: 76px; height: 28px; display: inline-block; text-align: right; }
.q-ok { color: var(--accent-deep); font-size: 12px; } .q-mal { color: var(--red); font-size: 12px; }
.q-pie { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.q-pie.mal { background: var(--red-tint); color: var(--red); } .q-pie .i { width: 14px; height: 14px; }
.tk.abierta { background: var(--field); }
#fl-extra:empty { display: none; } #fl-extra { border-bottom: 1px solid var(--line); }
.pq { display: grid; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.pq-lado { display: grid; gap: 4px; } .pq-lado .tag { margin: 2px 2px 0 0; } .pq .tilde { align-items: center; flex-wrap: wrap; }
/* 07/10: todos los documentos con la estética clásica del contrato, bilingües */
.hoja, .hoja.clausulas, .hoja.fichas { font-family: "Times New Roman", Times, Georgia, serif; font-size: 13px; }
.hoja .hb-t { text-transform: uppercase; font-size: .94em; letter-spacing: .05em; }
.hoja .hb-t .es-t { text-transform: none; letter-spacing: 0; font-weight: 400; font-style: italic; color: #5f645f; }
.hoja .hb-texto.es, .hoja .es { font-style: italic; }
.hoja .hb-membrete { border-bottom: 3px double #1a1c1a; font-family: inherit; }
.hoja .hb-titulo strong { font-family: inherit; }
.hoja .hb-grilla, .hoja .hb-tabla, .hoja .hb-tres, .hoja .hb-pago, .hoja .hb-kv, .hoja .hb-firmas, .hoja .hb-firma1, .hoja .hb-letras, .hoja .hb-parte small, .hoja .hb-grilla small, .hoja .hb-pago > small { font-family: inherit; }
.hoja .hb-grilla > div, .hoja .hb-parte, .hoja .hb-pago { border-radius: 0; box-shadow: inset 0 0 0 1px #9aa09a; }
.hoja .hb-parte small, .hoja .hb-pago > small { color: #1a1c1a; }
.hoja .hb-recuadro { border-radius: 0; }
/* flujo partido: punta compra | punta venta */
.flujos2 { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; padding: 14px 16px 6px; }
.fl-lado { min-width: 0; border-radius: var(--r-control); box-shadow: var(--sh-hair); padding: 10px 10px 4px; background: var(--surface); }
.fl-lado-cab { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.fl-lado-cab b { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.fl-lado-cab .mu { font-size: 12px; } .fl-lado-n { margin-left: auto; font: 600 12px var(--mono); color: var(--ink-2); }
.fl-lado .flujo1 { min-width: 0; } .fl-lado .flujo-scroll { overflow-x: auto; }
.fl-lado .fl-chev.grande { grid-row: 1; } .fl-lado .fl-nota { grid-row: 2; }
.flmini2 { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; }
.flmini-lado { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: center; min-width: 0; }
.flmini-lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
@media (max-width: 900px) { .flujos2, .flmini2 { grid-template-columns: 1fr; } }
/* arranque del trade: mandar · pedir · recibir */
.ar summary { display: flex; gap: 10px; align-items: baseline; padding: 12px 16px; cursor: pointer; flex-wrap: wrap; } .ar summary .mu { font-size: 12px; }
.ar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.ar-col { border-right: 1px solid var(--line); min-width: 0; } .ar-col:last-child { border-right: 0; }
.ar-tit { display: flex; gap: 8px; align-items: baseline; padding: 9px 14px; background: var(--field); border-bottom: 1px solid var(--line); } .ar-tit .i { width: 13px; height: 13px; vertical-align: -2px; } .ar-tit .mu { font-size: 11.5px; }
.ar-it { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.ar-it > div { display: grid; min-width: 0; } .ar-it .mu { font-size: 11.5px; } .ar-it .acciones { flex-shrink: 0; }
.ar-vacio { padding: 10px 14px; font-size: 12px; }
@media (max-width: 900px) { .ar-grid { grid-template-columns: 1fr; } .ar-col { border-right: 0; } }
.flmini2 .flmini { min-width: 0; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
@media (max-width: 640px) { .flmini2 .fl-chev b { display: none; } .tarjeta-trade { min-width: 0; overflow: hidden; } }
.cl-link { color: var(--accent-deep); font-weight: 500; }
.vf .vf-ic { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font-size: 11px; font-weight: 700; background: var(--inset); color: var(--ink-3); }
.vf.ok .vf-ic { background: var(--accent); color: #fff; } .vf.alerta .vf-ic { background: var(--red); color: #fff; } .vf.alerta .t { color: var(--red); }

/* ── Passkey / tap ─────────────────────────────────────────────────────────── */
.tap-fondo { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(20,24,20,.22); backdrop-filter: blur(1px); }
.tap-caja { width: min(360px, 100%); background: var(--surface); border-radius: var(--r-window); box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 18px 48px rgba(0,0,0,.18); padding: 20px; text-align: center; }
.tap-caja h3 { margin: 6px 0 4px; font-size: 15px; }
.tap-caja .m { margin: 4px 0; }
.tap-caja .acciones { justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.tap-ico { width: 40px; height: 40px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-deep); }
.tap-ico .i { width: 20px; height: 20px; }
.tap-err { color: var(--red); font-size: 12px; min-height: 1em; margin: 8px 0 0; }

/* ── Suscripción del calendario ───────────────────────────────────────────── */
.sus-cal { display: grid; gap: 6px; margin-top: 8px; }
.sus-url { display: flex; gap: 6px; }
.sus-url .input { flex: 1; min-width: 0; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; }
.sus-pasos { margin: 2px 0; padding-left: 18px; color: var(--ink-2); }

/* ── Cambios que propone Claudio (antes → después) ────────────────────────── */
.cl-cambio { margin-top: 8px; border-radius: var(--r-control); box-shadow: var(--sh-hair); background: var(--surface); padding: 8px 10px; font-size: 12px; }
.cl-cambio .cab { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cl-cambio .cab b { font-family: var(--mono, ui-monospace, monospace); font-weight: 600; }
.cl-cambio .etq { font-size: 10.5px; padding: 1px 6px; border-radius: var(--r-chip); background: var(--inset); color: var(--ink-2); }
.cl-cambio .etq.sens { background: var(--orange-tint); color: var(--orange); }
.cl-cambio .etq.est-aplicado { background: var(--accent-tint); color: var(--accent-deep); }
.cl-cambio .etq.est-rechazado, .cl-cambio .etq.est-deshecho { background: var(--red-tint); color: var(--red); }
.cl-cambio .dif { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 2px 8px; margin: 6px 0; }
.cl-cambio .dif .k { color: var(--ink-3); font-family: var(--mono, ui-monospace, monospace); }
.cl-cambio .dif .v { overflow-wrap: anywhere; }
.cl-cambio .dif del { color: var(--red); text-decoration: line-through; margin-right: 4px; }
.cl-cambio .dif ins { color: var(--accent-deep); text-decoration: none; font-weight: 600; }
.cl-cambio .acciones { justify-content: flex-start; flex-wrap: wrap; }
.cl-cambio .nota { color: var(--ink-2); margin: 4px 0; }

/* ── Passkeys en Team ─────────────────────────────────────────────────────── */
.pk-fila { display: flex; gap: 10px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); }
.pk-fila .mu { font-size: 12px; }

/* ── Workspace (mesa): portal 75% · a la derecha documentos 60% arriba + Claudio 40% abajo ── */
#mesa[hidden] { display: none !important; }
body.mesa .shell { width: 75vw; }
body.mesa #cl-btn { display: none !important; }
#mesa { position: fixed; z-index: 41; top: 0; left: 75vw; right: 0; height: 60vh; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#mesa header { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; min-height: 40px; }
#mesa header b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mesa header .mu { flex: 1; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mesa-cuerpo { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px 12px; }
body.mesa #cl { left: 75vw !important; right: 0 !important; top: 60vh !important; width: auto !important; height: 40vh !important; min-width: 0; min-height: 0; border-radius: 0; box-shadow: none; border: 0; border-left: 1px solid var(--line); }
body.mesa #cl header { cursor: default; }
body.mesa #cl [data-a=cerrar], body.mesa #cl [data-a=aparte], body.mesa #cl-tirador { display: none; }
.mesa-sec { margin-top: 10px; }
.mesa-sec h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; display: flex; justify-content: space-between; }
.mesa-doc { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: var(--r-chip); color: inherit; text-decoration: none; font-size: 12.5px; }
a.mesa-doc:hover { background: var(--hover); }
.mesa-doc .n { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mesa-doc .n small { display: block; color: var(--ink-3); font-size: 11px; }
.mesa-doc .e { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.mesa-doc.mal .e { color: var(--red); }
.mesa-soltar { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-control); color: var(--ink-2); font-size: 12px; cursor: pointer; }
.mesa-soltar.encima { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-deep); }
.mesa-pdf { display: flex; flex-direction: column; height: 100%; gap: 6px; }
.mesa-pdf .acciones { justify-content: flex-end; flex-wrap: wrap; }
.mesa-pdf .vp-sub { margin-right: auto; font-size: 11.5px; }
.mesa-pdf iframe { flex: 1; width: 100%; min-height: 0; border: 0; border-radius: var(--r-control); box-shadow: var(--sh-hair); background: #fff; }
.mesa-pista { margin-top: 12px; }
/* Ventana /docs (Workspace en ventanas): el panel de documentos ocupa toda la ventana */
body.modo-docs #app, body.modo-docs #cl-btn { display: none !important; }
body.modo-docs #mesa { inset: 0; left: 0; width: auto; height: auto; border: 0; }
/* Claudio en su ventana: el chat de adentro de la página no aparece */
body.sin-chat #cl, body.sin-chat #cl-btn { display: none !important; }
/* Connections: tarjetas chicas, 4 por fila */
.cx-grilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .cx-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cx-grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cx { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: center; text-align: left; padding: 10px 12px; border: 0; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-card); font: inherit; color: inherit; cursor: pointer; }
.cx:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px rgba(0,0,0,.05); }
.cx b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx .cx-est, .cx small { grid-column: 2; font-size: 11.5px; color: var(--ink-3); }
.cx .cx-est.ok { color: var(--accent-deep); } .cx .cx-est.aviso { color: var(--orange); }
.cx small { font-size: 11px; }
.cx-caja { text-align: left; width: min(420px, 100%); }
.cx-caja h3 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.cx-caja .acciones { justify-content: flex-end; flex-wrap: wrap; align-items: center; }

/* ── Trade simple (07/10): pasos + checklist a la izquierda, documentos a la derecha ── */
.tr-cuerpo { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.tr-cuerpo > .panel { margin: 0; }
@media (max-width: 1100px) { .tr-cuerpo { grid-template-columns: minmax(0, 1fr); } }
.tr-mas { margin-top: 14px; }
.tr-mas > summary { padding: 12px 16px; cursor: pointer; font-weight: 600; font-size: 13px; }
/* Pasos: hechos en verde, el actual en color (rojo si está tarde), los que no llegaron en gris */
.pasos { list-style: none; margin: 0; padding: 14px 14px 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; counter-reset: p; }
.paso button { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--r-control); background: var(--inset); font: inherit; color: var(--ink-3); cursor: pointer; position: relative; }
.paso .pc { grid-row: 1 / 3; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: #dfe2df; color: var(--ink-3); }
.paso .pn { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paso .pk { font-size: 11px; font-family: ui-monospace, monospace; }
.paso.hecho button { background: var(--accent-tint); color: var(--accent-deep); }
.paso.hecho .pc { background: var(--accent); color: #fff; }
.paso.actual button { background: #e8effb; color: #1d4f9e; box-shadow: inset 0 0 0 1.5px #2563c9; }
.paso.actual .pc { background: #2563c9; color: #fff; }
.paso.actual.aviso button { background: var(--orange-tint); color: var(--orange); box-shadow: inset 0 0 0 1.5px var(--orange); }
.paso.actual.aviso .pc { background: var(--orange); }
.paso.actual.tarde button { background: var(--red-tint); color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.paso.actual.tarde .pc { background: var(--red); }
.paso.futuro button { opacity: .75; }
.paso.sel button::after { content: ''; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--ink-3); }
@media (max-width: 640px) { .pasos { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 10px; } .paso .pn, .paso .pk { display: none; } .paso button { justify-content: center; padding: 8px 0; grid-template-columns: auto; } .paso .pc { grid-row: auto; } }
.pasos-mini { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 6px; }
.pasos-mini i { width: 14px; height: 6px; border-radius: 3px; background: #dfe2df; }
.pasos-mini i.hecho { background: var(--accent); }
.pasos-mini i.actual { background: #2563c9; } .pasos-mini i.actual.aviso { background: var(--orange); } .pasos-mini i.actual.tarde { background: var(--red); }
.tr-docs span { display: block; font-size: 12px; white-space: nowrap; }
.tr-docs .i { width: 13px; height: 13px; vertical-align: -2px; }
/* Documentos del trade */
.td-grupo { padding: 6px 14px 4px; }
.td-grupo h4 { margin: 8px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.td-grupo h4 .i { width: 13px; height: 13px; }
.td-grupo h4 .k { background: var(--inset); border-radius: 8px; padding: 0 6px; font-size: 10.5px; }
.td-fila { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.td-fila > div { flex: 1; min-width: 0; }
.td-fila b { display: block; font-size: 12.5px; font-weight: 600; }
.td-fila .mu { font-size: 11.5px; }
.td-fila.revisar b { color: var(--orange); }
.td-fila.ok { padding-left: 14px; padding-right: 14px; }
.td-vacio { font-size: 12px; padding: 4px 0 6px; }
.td-bandeja { padding: 4px 14px 8px; }
/* Calendario simple */
.cal-grupo { padding: 10px 16px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; }
.cal-grupo.mal { color: var(--red); }
.cal-ley { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 16px 12px; font-size: 11.5px; color: var(--ink-3); border-top: 1px solid var(--line); }
.cal-ley i { display: inline-block; vertical-align: -1px; margin-right: 5px; }
/* Listas cortas: una línea, 4–6 a la vista, el resto "+N more" */
.td-fila { justify-content: space-between; padding: 6px 0; }
.td-fila > b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.td-mas > summary { list-style: none; cursor: pointer; font-size: 12px; color: var(--ink-3); padding: 6px 0; border-top: 1px solid var(--line); }
.td-mas > summary::-webkit-details-marker { display: none; }
.cal-lado .td-mas > summary { padding: 8px 16px; }
details.papel { margin: 6px 0; }
details.papel > summary.papel-res { cursor: pointer; font-size: 12.5px; color: var(--orange); padding: 8px 10px; border-radius: var(--r-control); background: var(--orange-tint); list-style: none; }
details.papel > summary.papel-res::-webkit-details-marker { display: none; }
details.papel > summary .i { width: 13px; height: 13px; vertical-align: -2px; }
details.papel[open] > summary.papel-res { margin-bottom: 8px; }
/* Calendario: el mes manda; al costado, lo de ahora en pocas líneas */
.cal-dash { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.cal-dash > .panel { margin: 0; }
@media (max-width: 1100px) { .cal-dash { grid-template-columns: minmax(0, 1fr); } .cal-lado { order: -1; } }
.cal-li { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 12.5px; }
.cal-li:hover { background: var(--hover); }
.cal-li-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-li-f { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.cal-li-f.mal { color: var(--red); }
#sug-plegable { margin-top: 14px; }
/* Ventana de "ver más" (al-modal): el contenido con scroll propio, la página no se estira */
.tap-caja.modal-mas { width: min(720px, 100%); max-height: 84vh; padding: 0; display: flex; flex-direction: column; text-align: left; overflow: hidden; }
.modal-mas-cab { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px 18px; border-bottom: 1px solid var(--line); }
.modal-mas-cuerpo { overflow-y: auto; padding: 6px 18px 16px; }
.modal-mas-cuerpo .cal-li { padding-left: 0; padding-right: 0; }
details.al-modal[open] > :not(summary) { display: none; }
/* Los dos lados del trade: completos y con color por estado */
.lados { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 10px; }
@media (max-width: 640px) { .lados { grid-template-columns: minmax(0, 1fr); } }
.lado { --c: #2563c9; --cf: #eef3fc; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 0 0 12px; min-width: 0; overflow: hidden; }
/* el estado tiñe el encabezado entero (no una franja): azul firmado · naranja sin firmar · verde completo · rojo vencido */
.lado.firmado { --c: #2563c9; --cf: #eef3fc; } .lado.curso { --c: var(--orange); --cf: var(--orange-tint); }
.lado.hecho { --c: var(--accent); --cf: var(--accent-tint); } .lado.tarde { --c: var(--red); --cf: var(--red-tint); } .lado.vacio { --c: #b9bdb9; --cf: var(--inset); }
.lado-cab { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-width: 0; padding: 11px 16px; background: var(--cf); }
.lado .lado-kv, .lado .lado-pasos { padding-left: 16px; padding-right: 16px; }
.lado-cab a { color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lado-rol { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--c); font-weight: 700; }
.lado-est { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--surface); color: var(--c); white-space: nowrap; }
.lado-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 10px 0; font-size: 12.5px; }
.lado-kv dt { color: var(--ink-3); } .lado-kv dd { margin: 0; overflow-wrap: anywhere; }
.lado-kv .falta { color: var(--red); } .lado-kv .aviso { color: var(--orange); } .lado-kv .i { width: 12px; height: 12px; vertical-align: -1px; color: var(--accent); }
.lado-pasos { display: flex; gap: 6px; flex-wrap: wrap; }
.lp { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: #eceeec; color: var(--ink-3); }
.lp b { font-family: ui-monospace, monospace; font-weight: 600; margin-left: 2px; }
.lp.hecho { background: var(--accent-tint); color: var(--accent-deep); }
.lp.actual { background: #e8effb; color: #1d4f9e; box-shadow: inset 0 0 0 1.5px #2563c9; }
.lp.actual.aviso { background: var(--orange-tint); color: var(--orange); box-shadow: inset 0 0 0 1.5px var(--orange); }
.lp.actual.tarde { background: var(--red-tint); color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.tr-linea { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 12.5px; color: var(--ink-2); margin: 0 2px 14px; }
.tr-linea a { color: inherit; text-decoration: none; } .tr-linea a:hover b { text-decoration: underline; }
.tr-linea .mal { color: var(--red); } .tr-linea .aviso { color: var(--orange); }
.tr-linea .i { width: 13px; height: 13px; vertical-align: -2px; }
button.lp { border: 0; font: inherit; font-size: 11.5px; cursor: pointer; }
button.lp:hover { filter: brightness(.97); }
button.lp.sel { outline: 2px solid var(--ink); outline-offset: 1px; }
.tr-cuerpo .etapa-cab { border-top: 0; }
/* Documentos del trade: qué · de quién · su botón */
.td-q { flex: 1; min-width: 0; }
.td-q b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; font-size: 12.5px; }
.td-q small { display: block; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-grupo h4 { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink); }
.aviso-xs { font-size: 11px; color: var(--orange); white-space: nowrap; }
.td-bandeja .subir-papel { padding: 10px 12px; font-size: 12px; }
/* Contraparte: lo que falta para aprobar, en grupos numerados */
.qf-grupo { border-top: 1px solid var(--line); padding: 12px 16px 8px; }
.qf-grupo:first-child { border-top: 0; }
.qf-cab { display: flex; gap: 6px 10px; align-items: flex-start; margin-bottom: 6px; flex-wrap: wrap; }
.qf-cab > div { flex: 1 1 200px; min-width: 0; }
.qf-cab b { display: block; font-size: 13.5px; }
.qf-cab b .k { background: var(--inset); border-radius: 8px; padding: 0 6px; font-size: 11px; font-weight: 600; margin-left: 4px; }
.qf-cab .mu { font-size: 12px; }
.qf-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #2563c9; color: #fff; font-size: 11.5px; font-weight: 700; flex: none; margin-top: 1px; }
.qf-grupo .fila { padding-left: 32px; }
.qf-pub { border-top: 1px solid var(--line); }
.qf-pub > summary { padding: 10px 16px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; list-style: none; }
.qf-pub > summary::-webkit-details-marker { display: none; }
.qf-pub > summary .i { width: 13px; height: 13px; vertical-align: -2px; }
button.cal-li { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.cal-li-f.hora { color: var(--ink); font-weight: 600; }
.ev-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 10px 0 14px; font-size: 13px; }
.ev-kv dt { color: var(--ink-3); } .ev-kv dd { margin: 0; overflow-wrap: anywhere; }
.ev-kv dd { text-align: left; }
/* Login con Google */
.btn.google { display: flex; justify-content: center; gap: 10px; background: var(--surface); box-shadow: var(--sh-btn); color: var(--ink); text-decoration: none; height: 38px; align-items: center; font-weight: 600; }
.login-o { text-align: center; font-size: 12px; margin: 2px 0; }
.cx-ancha { width: min(560px, 100%); }
.cx-cuerpo { max-height: 60vh; overflow-y: auto; }
.td-mas-doc { margin-left: auto; text-transform: none; font-weight: 500; }
.td-form { display: flex; gap: 6px; margin: 4px 0 8px; flex-wrap: wrap; }
.td-form .input { flex: 1; min-width: 140px; height: 30px; }
.td-x { width: 22px; height: 22px; opacity: .5; } .td-x:hover { opacity: 1; }
.aviso-undo { border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; margin-left: 6px; }
#avisos > div { pointer-events: auto; }
.kl-lista { display: grid; gap: 2px; }
.kl-fila { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; border-top: 1px solid var(--line); font-size: 12.5px; cursor: pointer; }
.kl-fila > span { flex: 1; } .kl-fila.off > span { color: var(--ink-3); text-decoration: line-through; }
/* Needs you: lo que la IA no pudo y espera a una persona */
.nec { display: grid; gap: 2px; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--r-card); background: var(--orange-tint); }
.cal-lado .nec { margin: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.nec > b { font-size: 12px; color: var(--orange); display: flex; gap: 6px; align-items: center; }
.nec > b .i { width: 13px; height: 13px; }
.nec-li { display: flex; gap: 8px; align-items: baseline; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; color: var(--ink); }
.nec-li span { flex: 1; min-width: 0; } .nec-li small { color: var(--ink-3); white-space: nowrap; }
.nec-li:hover span { text-decoration: underline; }
/* La vista previa del PDF siempre adelante (antes quedaba detrás de las ventanas de "ver más") */
.vpm { z-index: 600 !important; }
/* Flow chart por lado (el de antes, adaptado): verde hecho, azul el actual (naranja/rojo si está tarde), gris lo que no llegó */
.lado-flujo { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 0; padding: 0 16px; margin-top: 4px; }
.lado-flujo .fl-chev.grande { grid-row: auto; height: 46px; }
.lado-flujo .fl-chev.grande.actual { background: #2563c9; color: #fff; }
.lado-flujo .fl-chev.grande.sel { box-shadow: inset 0 -4px 0 rgba(0,0,0,.35); }
.lado-flujo .fl-chev.grande:not(.ok):not(.actual):not(.warn):not(.bad) { color: var(--ink-2); }
/* Paso elegido: tareas a la izquierda, sus documentos a la derecha */
.paso-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0; }
.paso-docs { border-top: 1px solid var(--line); padding-bottom: 8px; }
@media (max-width: 1100px) { .paso-grid { grid-template-columns: minmax(0, 1fr); } .paso-docs { border-left: 0; border-top: 1px solid var(--line); } }
.td-ok { font-size: 11.5px; color: var(--accent-deep); white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.td-ok .i { width: 12px; height: 12px; }
/* File cabinet: una carpeta por trade */
.ov-form { display: grid; gap: 6px; margin-top: 8px; }
.ov-form .acciones { justify-content: flex-end; }
/* Documentos del paso: To receive | To send / Sent */
.docs-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.docs-dos > .td-grupo + .td-grupo { border-left: 1px solid var(--line); }
@media (max-width: 760px) { .docs-dos { grid-template-columns: minmax(0, 1fr); } .docs-dos > .td-grupo + .td-grupo { border-left: 0; border-top: 1px solid var(--line); } }
.hist-mail span small { display: block; color: var(--ink-3); font-size: 11px; }
.hist-mail.entra b { color: #2563c9; } .hist-mail.sale b { color: var(--accent-deep); }
#avisos { z-index: 700 !important; }
.spec-ed .input { height: 28px; font-size: 12.5px; }
.spec-ed .input.n { width: 80px; text-align: right; }
.spec-ed td { padding-top: 4px; padding-bottom: 4px; }
.spec-nueva .input { background: var(--field); }
.td-fila.deal b { color: var(--ink); }
.deal-form { flex-direction: column; } .deal-form textarea { height: auto; padding: 8px 10px; font-size: 12.5px; }
.pc-mal { color: var(--red); font-size: inherit; }
.tbl-simple { width: 100%; border-collapse: collapse; font-size: 12.5px; } .tbl-simple th, .tbl-simple td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); } .tbl-simple th { color: var(--ink-3); font-weight: 600; }
.pl-campos .pl-nuevo-campo { display: inline-flex; } .pl-campos .pl-nuevo-campo .input { height: 28px; width: 140px; font-size: 12.5px; }
.pl-control { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; } .pl-control .input { flex: 1; height: 32px; }
.pl-mas > summary { cursor: pointer; font-size: 12.5px; list-style: none; }
.leido-cab { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin: 2px 0 8px; }
.ev-kv.leido dt { white-space: nowrap; } .leido-pie { margin-top: 12px; font-size: 11.5px; }
/* Trade 08/10: arriba el flujo de cada lado; el paso = We send | We receive (50/50); abajo contrato | mails (50/50) */
.lado { padding-bottom: 10px; } .lado .lado-flujo { margin-top: 10px; }
.td-grupo h4 { flex-wrap: wrap; white-space: nowrap; } /* en el celu las acciones bajan de línea en vez de partir el título palabra por palabra */
.td-grupo h4 .td-mas-doc { margin-left: auto; display: inline-flex; gap: 4px; }
.tr-bajo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.tr-bajo > .panel { margin: 0; }
@media (max-width: 900px) { .tr-bajo { grid-template-columns: minmax(0, 1fr); } }
.tr-resumen .rs-lado { padding: 10px 16px 0; } .tr-resumen .rs-lado + .rs-lado { border-top: 1px solid var(--line); margin-top: 8px; }
.tr-resumen .rs-cab { font-weight: 600; font-size: 13px; display: flex; gap: 8px; align-items: center; } .tr-resumen .rs-cab a { color: inherit; }
.tr-resumen .lado-kv { padding: 0 !important; margin: 6px 0 4px; }
.tr-resumen .tr-linea { padding: 10px 16px 14px; margin: 8px 0 0; border-top: 1px solid var(--line); }
.ml-fila { display: flex; gap: 8px; align-items: baseline; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.ml-dir { font-weight: 700; } .ml-fila.entra .ml-dir { color: #2563c9; } .ml-fila.sale .ml-dir { color: var(--accent-deep); }
.ml-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ml-f { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
/* Tareas en las columnas del paso: pendientes arriba, hechas en gris */
.tk-mini { gap: 8px; } /* hecho = tinta gris (no opacidad: con .55 el texto quedaba en 2,2:1, ilegible) */
.tk-mini.hecho .td-q b { color: var(--ink-2); font-weight: 400; } .tk-mini.hecho .td-q small, .tk-mini.hecho .btn.ghost { color: var(--ink-3); } .tk-mini.hecho .tk-dot.ok { background: #7fae94; }
.tk-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #b9bdb9; display: grid; place-items: center; flex: none; }
.tk-dot.ok { background: var(--accent); box-shadow: none; color: #fff; } .tk-dot.ok .i { width: 11px; height: 11px; }
.tk-dot.mal { box-shadow: inset 0 0 0 1.5px var(--red); }
.tk-mini .crit { font-size: 10px; color: var(--red); font-weight: 600; margin-left: 4px; }
/* File cabinet: la carpeta se abre ahí mismo; los documentos como archivos, en orden de fecha */
tr.mes-fila td { background: var(--inset); padding: 7px 12px; font-size: 12px; }
tr.mes-fila td b { font-weight: 600; } tr.mes-fila td span { float: right; color: var(--ink-3); font-family: ui-monospace, monospace; font-size: 11.5px; }
/* Directory: tabla + filtro a la derecha */
/* Cajones por mes / año en tablas: el mes y el año de hoy abiertos; tocar la fila abre o cierra */
tbody.cajon-mes:not(.abierto) > tr:not(.mes-fila) { display: none; }
tbody.cajon-mes.anio-cerrado { display: none; }
tr.mes-fila, tr.anio-fila { cursor: pointer; user-select: none; }
tr.mes-fila td b::before, tr.anio-fila td b::before { content: '▸'; display: inline-block; width: 14px; color: var(--ink-3); transition: transform .15s; }
tbody.abierto > tr.mes-fila td b::before, tbody.abierto > tr.anio-fila td b::before { transform: rotate(90deg); }
tr.anio-fila td { background: #e9ece9; padding: 8px 12px; font-size: 12.5px; } tr.anio-fila td span { float: right; color: var(--ink-3); font-family: ui-monospace, monospace; font-size: 11.5px; }
/* File cabinet y Our KYC: las piezas del núcleo (web/nucleo/archivo.css, gabinete .ar y legajo .lg); acá sólo el tema de la app.
   (.cajon/.cajon-anio quedan para los cajones de año de Finance.) */
.ar, .lg { --ar-fondo: var(--inset); --ar-carpeta: var(--surface); --ar-texto: var(--ink); --ar-gris: var(--ink-3); --ar-borde: var(--line); --ar-acento: var(--accent);
  --ar-hover: var(--hover); --ar-sombra: var(--sh-card); --ar-radio: var(--r-card); --ar-mal: var(--red); --ar-aviso: var(--orange); }
.cajon { border-top: 1px solid var(--line); } .cajon-anio { margin-bottom: 6px; border: 0; }
/* Specs, clauses & services: ventana ancha, pestañas, compra | venta lado a lado, campos que parecen texto hasta que los tocás */
.cx-xl { width: min(980px, 100%); }
.det-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 12px; }
.det-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; margin-bottom: -1px; }
.det-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; } .det-tabs .k { color: var(--ink-3); font-size: 11px; font-family: ui-monospace, monospace; margin-left: 2px; }
.det-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } @media (max-width: 760px) { .det-dos { grid-template-columns: 1fr; } }
.det-col { min-width: 0; } .det-cab { font-size: 12.5px; padding: 4px 0 8px; border-bottom: 1px solid var(--line); color: var(--ink-2); } .det-cab .lado-rol { color: var(--ink-3); margin-right: 4px; }
table.det-specs { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
table.det-specs th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 11px; padding: 6px 4px; } table.det-specs th.n { text-align: right; }
table.det-specs th:nth-child(1) { width: auto; } table.det-specs th:nth-child(2), table.det-specs th:nth-child(3) { width: 64px; } table.det-specs th:nth-child(4) { width: 58px; } table.det-specs th:nth-child(5) { width: 64px; }
table.det-specs td { padding: 1px 2px; border-top: 1px solid var(--line); } table.det-specs td.n { text-align: right; }
input.plano { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 6px 6px; font: inherit; color: var(--ink); min-width: 0; }
input.plano.n { text-align: right; font-family: ui-monospace, monospace; font-size: 12px; }
input.plano:hover { border-color: var(--line); } input.plano:focus { outline: none; border-color: var(--accent); background: var(--surface); }
table.det-specs tr:hover .cl-ic, .det-fila:hover .cl-ic { opacity: 1; } table.det-specs .cl-ic, .det-fila .cl-ic { opacity: .35; }
.det-mas { display: flex; gap: 8px; align-items: center; padding: 8px 0 0; } .det-nota { font-size: 11.5px; margin: 12px 0 0; }
.det-lista { border-top: 1px solid var(--line); } .det-fila { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.det-fila .det-k { color: var(--ink-2); } .det-fila.det-cl { grid-template-columns: minmax(0, 1fr) auto; font-size: 12.5px; line-height: 1.45; }
.det-col > .det-fila { grid-template-columns: minmax(0, 1fr) auto; }
.det-nueva { display: flex; gap: 6px; align-items: center; padding: 8px 0; flex-wrap: wrap; } .det-nueva .input { height: 30px; font-size: 12.5px; } .det-add { margin-top: 8px; }
/* mails: una frase; tocar abre el original */
.ml-fila[data-mail], .hist-mail[data-mail] { cursor: pointer; } .ml-fila[data-mail]:hover, .hist-mail[data-mail]:hover { background: var(--hover); }
.mail-orig .mo-cab { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 4px 10px; font-size: 12.5px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mail-orig .mo-cab dt { color: var(--ink-3); } .mail-orig .mo-res { font-size: 12.5px; background: var(--inset); border-radius: 8px; padding: 8px 10px; margin: 10px 0; }
.mail-orig pre { white-space: pre-wrap; word-break: break-word; font: 13px/1.55 system-ui, sans-serif; margin: 0; max-height: 55vh; overflow: auto; }
.mail-orig .mo-adj { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .mail-orig .mo-adj span { font-size: 11.5px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
/* Chat del equipo: columna a la izquierda, junto al menú (⌘J) */
body.con-eq .shell { grid-template-columns: 212px 340px minmax(0, 1fr); }
.eq { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); min-width: 0; }
.eq[hidden] { display: none; }
.eq-cab { display: flex; align-items: center; gap: 6px; padding: 12px 10px 10px 14px; border-bottom: 1px solid var(--line); }
.eq-cab > b { font-size: 14px; margin-right: auto; }
.eq-filtro { display: flex; gap: 2px; background: var(--inset); border-radius: 7px; padding: 2px; }
.eq-filtro button { border: 0; background: none; font: inherit; font-size: 11.5px; padding: 3px 8px; border-radius: 5px; color: var(--ink-2); cursor: pointer; }
.eq-filtro button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.eq-busca { padding: 8px 10px; border-bottom: 1px solid var(--line); } .eq-busca[hidden] { display: none; } .eq-busca .input { width: 100%; height: 30px; font-size: 12.5px; }
.eq-hilo { flex: 1; overflow-y: auto; padding: 4px 0 8px; overscroll-behavior: contain; }
.eq-mas { text-align: center; font-size: 11px; color: var(--ink-3); padding: 8px; }
.eq-dia { display: flex; align-items: center; gap: 8px; padding: 10px 14px 4px; font-size: 11px; color: var(--ink-3); } .eq-dia::before, .eq-dia::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.eq-m { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 6px 12px 6px 14px; }
.eq-m:hover { background: var(--hover); }
.eq-av { width: 28px; height: 28px; border-radius: 8px; background: var(--inset); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.eq-m.claudio .eq-av { background: #16231c; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 7px; }
.eq-m.claudio .eq-av i { background: #3fbf7f; border-radius: 1px; } .eq-m.claudio .eq-av i:nth-child(2), .eq-m.claudio .eq-av i:nth-child(3) { background: #e8c547; }
.eq-q { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; flex-wrap: wrap; } .eq-q .mu { font-size: 11px; }
.eq-tag { font-size: 10.5px; font-family: ui-monospace, monospace; background: var(--inset); color: var(--ink-2); border-radius: 4px; padding: 1px 5px; text-decoration: none; }
.eq-tag:hover { background: var(--hover-2); }
.eq-t { font-size: 13px; line-height: 1.45; color: var(--ink); word-wrap: break-word; }
.eq-m.claudio .eq-t { font-size: 12.5px; color: var(--ink-2); } .eq-m.claudio.leccion .eq-t { color: var(--accent-deep); }
.eq-k { color: var(--ink-3); font-size: 11.5px; }
.eq-cita { font-size: 11.5px; color: var(--ink-3); border-left: 2px solid var(--line-strong); padding-left: 6px; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-acc { display: flex; gap: 8px; margin-top: 2px; opacity: 0; transition: opacity .12s; } .eq-m:hover .eq-acc, .eq-acc:focus-within { opacity: 1; }
.eq-acc a, .eq-acc button { font: inherit; font-size: 11.5px; color: var(--ink-3); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.eq-acc a:hover, .eq-acc button:hover, .eq-acc button.on { color: var(--ink); }
.eq-m.claudio .eq-acc button[data-v] { opacity: 1; }
.eq-pensando { font-size: 11.5px; color: var(--ink-3); padding: 4px 14px; display: flex; align-items: center; gap: 3px; }
.eq-pensando[hidden] { display: none; } .eq-pensando i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: eqp 1s infinite; } .eq-pensando i:nth-child(2) { animation-delay: .15s; } .eq-pensando i:nth-child(3) { animation-delay: .3s; margin-right: 4px; }
@keyframes eqp { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.eq-pie { border-top: 1px solid var(--line); padding: 8px 10px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: end; }
.eq-pie textarea { resize: none; border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 13px; height: 34px; max-height: 140px; background: var(--field); min-width: 0; }
.eq-pie textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.eq-resp, .eq-sobre { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; } .eq-resp[hidden] { display: none; } .eq-resp .cl-ic { margin-left: auto; }
.eq-sobre:empty { display: none; }
.eq-chip { font: inherit; font-size: 11px; border: 1px dashed var(--line-strong); background: none; border-radius: 999px; padding: 2px 8px; color: var(--ink-3); cursor: pointer; } .eq-chip.on { border-style: solid; color: var(--accent-deep); border-color: var(--accent); }
@media (min-width: 641px) and (max-width: 1100px) { body.con-eq .shell { grid-template-columns: 64px 300px minmax(0, 1fr); } }
@media (max-width: 640px) { .eq { position: fixed; inset: 0; z-index: 400; height: 100dvh; } body.con-eq .shell { grid-template-columns: minmax(0, 1fr); } .eq-acc { opacity: 1; } }
/* Claudio: archivos */
#cl-adj { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px; } #cl-adj:empty { display: none; } #cl-adj { padding-top: 6px; }
.cl-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; background: var(--inset); border-radius: 6px; padding: 2px 4px 2px 7px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-chip button { border: 0; background: none; padding: 0 2px; cursor: pointer; display: inline-grid; } .cl-chip .i { width: 11px; height: 11px; }
.cl-yo-adj { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; } .cl-yo .cl-chip { background: rgba(255,255,255,.18); color: inherit; }
.cl-clip { display: grid; place-items: center; width: 26px; height: 30px; cursor: pointer; color: var(--ink-3); flex: none; } .cl-clip:hover { color: var(--ink); } .cl-clip .i { width: 16px; height: 16px; }
#cl.soltando { outline: 2px dashed var(--accent); outline-offset: -6px; }
.cl-ops { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.eq-m.claudio .eq-av i { display: block; }
.eq-m.claudio .eq-av { place-items: stretch; }
/* Claudio privado (costado) vs Team (todos): una marca chica en cada encabezado */
.cl-priv, .eq-todos { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border-radius: 4px; padding: 1px 5px; vertical-align: 2px; margin-left: 4px; }
.cl-priv { background: #eef0f3; color: #5b6472; } .eq-todos { background: #e6f3ec; color: var(--accent-deep); }
.cl-compartir { display: block; margin-top: 6px; border: 0; background: none; padding: 0; font: inherit; font-size: 11px; color: var(--ink-3); cursor: pointer; } .cl-compartir:hover { color: var(--accent-deep); }
/* Calendario con datos: cada cosa del mes es un botón con su dato; la fila de la derecha lleva una segunda línea */
.cal-dia { display: flex; flex-direction: column; gap: 1px; cursor: pointer; text-align: left; min-width: 0; }
button.cal-ev { width: 100%; border: 0; background: none; font: inherit; font-size: 11px; padding: 1px 3px; margin: 0 -3px; border-radius: 4px; cursor: pointer; text-align: left; min-width: 0; color: var(--ink-2); }
button.cal-ev:hover, button.cal-ev:focus-visible { background: var(--hover-2); color: var(--ink); }
.cal-ev .cal-tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cal-li-t small { display: block; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.cal-li { align-items: flex-start !important; } .cal-li .punto { margin-top: 6px; }
.ev-caja { width: min(520px, 100%); }
.ev-kv dd small { display: block; color: var(--ink-3); font-size: 12px; }
.ev-sec { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; font-size: 13px; }
.ev-sec .ev-kv { margin-top: 8px; }
.ev-tareas { margin: 6px 0 0; padding-left: 18px; } .ev-tareas li { margin-bottom: 3px; }

/* ── Más lugar para la hoja (14/10: "necesito poder cerrar todo") ──
   Focus: fuera menú, chat del equipo, Workspace, Claudio, encabezado y lista de documentos; queda la hoja (y el costado si está abierto).
   Esc o "Exit focus" lo deshace. "Side panel" cierra la biblioteca de cláusulas y los campos. */
body.foco .shell, body.foco.con-eq .shell { grid-template-columns: minmax(0, 1fr) !important; width: auto !important; }
body.foco aside.nav, body.foco .eq, body.foco #mesa, body.foco #cl, body.foco #cl-btn, body.foco #cl-tirador,
body.foco .content > .topbar, body.foco .content > .subnav, body.foco .pl-claudio { display: none !important; }
body.foco main.content { padding: 12px 16px 48px; }
/* ── Cargas por camión (paso Loading): lista por vagón, fila editable en línea, mail EPA ── */
.cg { border-top: 1px solid var(--line); }
.cg .tbl { box-shadow: none; margin: 0; border-radius: 0; }
.cg .q-cab .acciones { margin-left: auto; }
.cg-batch > td { background: var(--inset); font-size: 11.5px; color: var(--ink-2); padding: 6px 16px; border-top: 1px solid var(--line); }
.cg-batch b { color: var(--ink); }
.cg-batch .acciones { float: right; display: inline-flex; gap: 6px; align-items: center; }
.cg-src { font-size: 10.5px; color: var(--ink-3); margin-left: 5px; font-family: var(--sans); }
.cg-src.manual { color: var(--orange); }
.cg-edit td, .cg-sitio td { padding: 5px 6px; }
.cg-edit .input { height: 30px; min-width: 88px; font-size: 12.5px; box-shadow: var(--sh-hair); }
.cg-edit select.input { min-width: 140px; }
.cg-edit td.n .input { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.cg-edit .acciones { display: inline-flex; gap: 4px; align-items: center; }
.cg-prop > td { background: var(--accent-tint); }
.cg-sitio .td-form { margin: 2px 0; align-items: center; }
.cg-asunto { font-size: 12.5px; margin-bottom: 6px; }
.cg-mail { font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: var(--r-control); background: var(--field); box-shadow: var(--sh-hair); }
.cg-mail p { margin: 0 0 10px; }
.cg-mail table { width: auto; font-size: 12.5px; margin: 10px 0 12px; } .cg-mail th, .cg-mail td { border: 1px solid var(--line-strong); padding: 4px 9px; height: auto; background: var(--surface); }
.cg-mail th { color: var(--ink); background: var(--inset); }
.cg-mail img { max-width: 100%; height: auto; display: block; margin: 8px 0 12px; border-radius: 6px; box-shadow: var(--sh-hair); }
.cg-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-bottom: 10px; }
.cg-adj { font-size: 12px; margin-top: 8px; }
@media (max-width: 640px) { .cg-campos { grid-template-columns: minmax(0, 1fr); } .cg-batch .acciones { float: none; display: flex; margin-top: 6px; } .cg-edit .input { min-width: 70px; } }
@media (pointer: coarse) { .cg-edit .input, .cg-sitio .input { min-height: 44px; } .cg-batch .acciones .btn { min-height: 44px; } }
/* cargas: la fila en edición no se corta a la derecha (botones en una línea, campos elásticos) · ventana del mail sin ancho mínimo */
.cg-edit td:last-child { white-space: nowrap; }
.cg-edit .acciones { flex-wrap: nowrap; }
.cg-edit .input { width: 100%; min-width: 72px; }
.cg-edit select.input { min-width: 118px; }
.cg-asunto { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cg-adj { margin: 0 0 10px; }
.cg-ventana { min-width: 0; max-width: 100%; }
.cg-mail-tabla { overflow-x: auto; max-width: 100%; }
/* celu: cada camión es una ficha (etiqueta · dato), la edición apila los campos a todo el ancho, el botón del batch queda a la vista */
@media (max-width: 640px) {
  .cg .cg-tabla thead { display: none; }
  .cg .cg-tabla table, .cg .cg-tabla tbody, .cg .cg-tabla tfoot, .cg .cg-tabla tr { display: block; width: 100%; }
  .cg .cg-tabla tr { padding: 8px 16px 10px; border-bottom: 1px solid var(--line); }
  .cg .cg-tabla td { display: flex; align-items: center; gap: 8px; padding: 3px 0; border: 0; min-width: 0; height: auto; }
  .cg .cg-tabla td[data-l]::before { content: attr(data-l); color: var(--ink-3); font-size: 11px; flex: 0 0 82px; font-family: var(--sans, system-ui); }
  .cg .cg-tabla td.n { text-align: left; justify-content: flex-start; }
  .cg .cg-tabla td:empty { display: none; }
  .cg .cg-tabla td:first-child { font-size: 14px; }
  .cg .cg-tabla tr.cg-batch { background: var(--inset); }
  .cg .cg-tabla .cg-batch > td { display: block; padding: 0; background: none; }
  .cg-batch .acciones { float: none; display: flex; justify-content: flex-start; margin-top: 8px; }
  .cg .cg-tabla tr.tot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .cg .cg-tabla tr.tot > td { padding: 0; }
  .cg-edit .input, .cg-edit select.input { flex: 1; min-width: 0; }
  .cg .cg-tabla .cg-edit td:last-child { white-space: normal; }
  .cg-edit .acciones { flex-wrap: wrap; justify-content: flex-start; }
  .cg .cg-tabla .cg-sitio > td { display: block; }
}
/* ── Celu (dueño 21/10): los chips de filtro en una sola línea que se desliza; UN solo flotante (Claudio): el Team chat es una pestaña
   del menú de arriba, con su contador. (Los filtros plegados detrás de un botón los pone ahora la lista del núcleo.) ── */
@media (max-width: 640px) {
  .barra-filtros .chips { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -12px; padding: 0 12px; }
  .barra-filtros .chips::-webkit-scrollbar { display: none; }
  .barra-filtros .chips button { flex: none; white-space: nowrap; }
  .brand { order: -2; }
}
/* ── Listas del núcleo (web/nucleo/lista.js + lista.css @ d6c26c7 = v4, vendoreadas de arlem-nucleo). lista.css se carga ANTES de este
   archivo, así estas variables (los tokens de Charlene) pisan las suyas a igual especificidad. El módulo habla "lenguaje de chip":
   buscador, ítems del menú de columna, fechas y pastillas del encabezado comparten alto / radio / borde / fondo (--ln-*), y acá se les
   da LO MISMO que a los chips de filtro de la app (.chips button, los presets Active / Blocked / All de /trades: 28 px, radio --r-chip,
   filete --line, fondo --surface, 13 px; 44 px y 16 px en pantalla táctil, como el resto de la capa `pointer: coarse`). Dueño 21/10:
   "quedó rotísimo el buscador y sin CSS como los filtros que tienen arriba". OJO: nada de reglas sobre `.ln input / .ln button`: le
   ganan a las del módulo (la × de la pastilla, el título del encabezado) y lo rompen — sólo variables y tema. ── */
.ln { --ln-fondo: var(--surface); --ln-texto: var(--ink); --ln-gris: var(--ink-3); --ln-borde: var(--line); --ln-acento: var(--accent); --ln-fila-abierta: var(--inset);
  --ln-control-fondo: var(--surface); --ln-radio: var(--r-chip); --ln-alto-control: 28px; --ln-fuente-control: 13px; font-size: 13px; background: transparent; }
.ln-ventana { border: 0; border-radius: var(--r-card); box-shadow: var(--sh-card); }
.ln-enc { font-size: 11px; letter-spacing: .01em; background: var(--inset); } /* como los <th> de la app */
.ln-enc .ln-tit { font-weight: 500; }
.ln .ln-c > button.ln-tit:hover, .ln .ln-c > .ln-tit.ln-abierto { background: var(--hover-2); } /* el encabezado ya es --inset: el título tocado necesita un gris más (no el de adentro de la pastilla) */
.ln-menu { border: 0; box-shadow: var(--sh-overlay); z-index: 51; } /* el menú de columna como los demás flotantes de la app (.tb-menu); por encima de Claudio (40) y del menú del celu (30) */
.ln-velo:not([hidden]) { z-index: 50; }
@media (min-width: 700px) { .ln-menu { border-radius: var(--r-card); } } /* en el celu el módulo lo hace hoja pegada abajo (radio sólo arriba) */
.ln .mono { font-size: 12.5px; }
.ln .rojo { color: var(--red); } .ln .verde { color: var(--accent-deep); } .ln .gris { color: var(--ink-3); }
.ln .punto { margin-right: 6px; vertical-align: middle; position: relative; top: -1px; }
/* el detalle en la fila: etiqueta gris · dato, en una fila que se envuelve; `.celu` = lo que en el teléfono no tiene columna */
.ln-detalle { white-space: normal; }
.ln-det { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; font-size: 12.5px; }
.ln-det > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ln-det > span > .mu { font-size: 11.5px; }
.ln-det .btn { margin-left: auto; }
.ln-det .celu { display: none; }
.ln-det .acciones { display: flex; gap: 6px; align-items: center; margin-left: auto; }
@media (max-width: 699px) { .ln-det .celu { display: inline-flex; } .ln-det .btn, .ln-det .acciones { margin-left: 0; width: 100%; justify-content: center; } }
@media (pointer: coarse) { .ln { --ln-alto-control: 44px; --ln-fuente-control: 16px; } .ln-enc .ln-c > .ln-tit { min-height: 44px; } } /* chips y buscador 44 / 16 (sin zoom de iOS); el título del encabezado también se toca */
.cash-mas summary { padding: 11px 16px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
/* Página con lista del núcleo (body.con-lista, la pone armarLista) en el celu: la tira de números en UNA fila que se desliza (si no,
   la lista quedaba en su piso de 200 px y la página crecía) y abajo el aire justo para el flotante de Claudio (44 + 18 + 10). */
@media (max-width: 860px) { body.con-lista main.content { padding-bottom: 72px; } }
@media (max-width: 640px) {
  body.con-lista .stats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -12px 12px; padding: 1px 12px; background: none; box-shadow: none; border-radius: 0; }
  body.con-lista .stats::-webkit-scrollbar { display: none; }
  body.con-lista .stat { flex: 0 0 140px; border: 0; margin: 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 8px 12px 7px; }
  body.con-lista .stat .v { font-size: 18px; margin-top: 2px; } body.con-lista .stat .d { display: none; } /* en la tira van etiqueta y número; el detalle, en la lista */
  body.con-lista .stats, body.con-lista .cash-mas { margin-bottom: 10px; }
}
/* ── Counterparties = directorio del núcleo (web/nucleo/directorio.css, arlem-nucleo front/directorio). Tema con los tokens de la app:
   panel blanco con filete de sombra (sin borde), acento verde, naranja = falta, rojo = baja. La pieza mide la lista y la ficha; acá sólo
   colores, letra y el alto (la página no crece: la lista y la ficha scrollean adentro; abajo queda el aire del flotante de Claudio). */
.dr { --dr-acento: var(--accent); --dr-acento-suave: var(--accent-tint); --dr-texto: var(--ink); --dr-gris: var(--ink-3); --dr-borde: var(--line);
  --dr-linea: rgba(0,0,0,.05); --dr-fondo: var(--page); --dr-panel: var(--surface); --dr-falta: var(--orange); --dr-peligro: var(--red);
  --dr-radio: var(--r-control); --dr-ancho: 320px; --dr-alto: calc(100dvh - 204px);
  font-family: inherit; font-size: 13px; border: 0; box-shadow: var(--sh-card); border-radius: var(--r-card); background: var(--surface); }
.dr-tit h2 { font-size: 15px; } .dr-fnom h2 { font-size: 18px; }
.dr-ficha { background: var(--surface); }
.dr-cuerpo .panel { box-shadow: var(--sh-hair); }
.dr-cuerpo .grupo-fila { margin: 0 -2px; }
.cp-elegir { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.cp-elegir .panel { margin: 0; }
/* Overview en tarjetas (núcleo 1c84730): la tira .dr-resumen y las tarjetas .dr-grupos las pone la pieza; acá sólo lo de Charlene */
.cp-ficha .dr-grupos { margin-bottom: 14px; }
.cp-ficha .dr-grupo { box-shadow: var(--sh-hair); border: 0; } .cp-ficha .dr-resumen { box-shadow: var(--sh-hair); border: 0; }
.cp-ficha .dr-kv .punto { margin-right: 6px; }
.dr-dato-v.cp-peligro { color: var(--red); }
.cp-gcab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cp-gcab .dr-link { text-transform: none; letter-spacing: 0; font-size: 13px; }
.dr-grupo.cp-editando, .dr-grupo.cp-ancha { grid-column: 1 / -1; }
/* Tarjetas de abajo (25/10): People, Usual terms, Contacts, Bank accounts — filas al ras de la tarjeta, "None" si está vacía */
.cp-n { color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.cp-vacia { margin: 0 0 10px; color: var(--ink-3); font-size: 13px; }
.cp-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.cp-item .mu { font-size: 12px; }
.cp-form { margin: 6px 0 10px; padding-top: 10px; border-top: 1px solid var(--line); grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); align-items: end; }
.cp-form[hidden] { display: none !important; }
.cp-form .tilde { padding-bottom: 8px; }
div.cp-form { display: grid; gap: 10px; grid-template-columns: 1fr; } div.cp-form form { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); align-items: end; }
.dr-grupo .k-fila, .dr-grupo .cta-fila { padding-left: 0; padding-right: 0; }
.dr-grupo .k-fila:last-child, .dr-grupo .cta-fila:last-child { border-bottom: 0; }
.dr-grupo .k-tabla, .dr-grupo .cta-filas { border-top: 1px solid var(--line); }
.dr-grupo .k-tabla:has(> .cp-vacia), .dr-grupo .cta-filas:has(> .cp-vacia) { border-top: 0; }
.cp-alta { display: flex; flex-direction: column; gap: 16px; }
.cp-alta select.dr-in { height: 44px; font-size: 15px; }
.cp-nota-baja { margin-bottom: 10px; } .cp-nota-baja .mu { margin-right: 6px; }
.cp-kyc-acc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cp-vistas { margin-bottom: 10px; }
.cp-historia { margin-top: 12px; } .cp-historia > summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.cp-trade { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; }
.cp-trade:hover { background: var(--hover); }
.cp-trades-pie { margin-top: 12px; }
@media (max-width: 700px) {
  .dr { --dr-alto: auto; box-shadow: none; background: transparent; }
  .dr-lado { border-radius: var(--r-card); box-shadow: var(--sh-card); }
  .dr.dr-con-ficha .dr-ficha { border-radius: var(--r-card); box-shadow: var(--sh-card); }
  /* sin ficha abierta, en el celu el "Who is writing to us?" va debajo de la lista (en la compu ocupa el lugar vacío de la ficha) */
  .dr:not(.dr-con-ficha) .dr-ficha { display: flex; padding: 14px 0 0; background: transparent; }
  .dr:not(.dr-con-ficha) .cp-elegir > p { display: none; }
}

/* Editor de plantillas (front/editor del núcleo) con los tokens de Charlene */
.tb { --ed-acento: var(--accent); --ed-acento-hondo: var(--accent-deep); --ed-acento-suave: var(--accent-tint); --ed-texto: var(--ink); --ed-texto-2: var(--ink-2); --ed-gris: var(--ink-3); --ed-linea: var(--line); --ed-linea-fuerte: var(--line-strong); --ed-panel: var(--surface); --ed-campo: var(--field); --ed-hover: var(--hover); --ed-hover-2: var(--hover-2); --ed-naranja: var(--orange); --ed-naranja-suave: var(--orange-tint); --ed-rojo: var(--red); --ed-radio: var(--r-card); --ed-radio-control: var(--r-control); --ed-radio-chip: var(--r-chip); --ed-sombra: var(--sh-card); --ed-sombra-flota: var(--sh-overlay); --ed-curva: var(--ease); }
/* ── Settings (25/10): secciones a la izquierda, la hoja a la derecha; en el celu las secciones son una fila que se desliza ── */
.aj { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: 20px; align-items: start; }
.aj-menu { position: sticky; top: 64px; display: grid; gap: 18px; }
.aj-grupo { display: grid; gap: 2px; }
.aj-grupo > span { font-size: 11px; font-weight: 500; color: var(--ink-3); padding: 0 10px 4px; }
.aj-menu a { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: var(--r-control); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.aj-menu a:hover { background: var(--hover); color: var(--ink); }
.aj-menu a.on { background: var(--accent-tint); color: var(--accent-deep); }
.aj-menu a .k { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--red); }
.aj-hoja { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-hair); padding: 4px 20px 20px; min-width: 0; }
.aj-hoja > h2 { font-size: 15px; font-weight: 600; margin: 14px 0 12px; }
.aj-hoja .pad { padding-left: 0; padding-right: 0; }
.aj-hoja .tbl { box-shadow: none; margin: 0 -20px; border-radius: 0; }
.aj-hoja .grupo-fila { margin: 16px -20px 0; }
.aj-hoja .fila.sin-marca { padding-left: 0; padding-right: 0; }
.aj-hoja { position: relative; }
.cp-form .acciones { justify-content: flex-start; }
.aj-kv { margin: 0 0 6px; max-width: 520px; }
.aj-sub { font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: 20px 0 6px; }
.aj-pie { font-size: 12px; margin: 12px 0 0; }
.aj-salir { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.aj-hoja .pk-fila { padding-left: 0; padding-right: 0; }
@media (max-width: 860px) {
  .aj { grid-template-columns: 1fr; gap: 12px; }
  /* celu: pestañas con filete abajo, como .subnav (Documents), en una fila que se desliza */
  .aj-menu { position: static; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; border-bottom: 1px solid var(--line); }
  .aj-menu::-webkit-scrollbar { display: none; }
  .aj-grupo { display: contents; } .aj-grupo > span { display: none; }
  .aj-menu a { flex: none; height: auto; min-height: 38px; padding: 8px 12px; border-radius: 0; background: none; color: var(--ink-3); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .aj-menu a:hover { background: none; }
  .aj-menu a.on { background: none; color: var(--ink); border-bottom-color: var(--ink); }
  .aj-hoja { padding: 4px 14px 16px; } .aj-hoja .tbl { margin: 0 -14px; } .aj-hoja .grupo-fila { margin: 16px -14px 0; }
}

/* Plazos del núcleo (web/nucleo/plazo.*): chip del día ("tomorrow", "Thu 29 Oct", rojo si venció) y el selector con un toque */
.pz-chip, .pz-menu { --pz-acento: var(--accent); --pz-acento-suave: var(--accent-tint); --pz-texto: var(--ink); --pz-gris: var(--ink-3); --pz-borde: var(--line-strong);
  --pz-fondo: var(--surface); --pz-mal: var(--red); }

/* Entregas (web/entregas.js): estado por unidad, la fila extra del editor y la cantidad final */
.en-est { display: inline-block; font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: var(--r-chip); background: var(--inset); color: var(--ink-2); white-space: nowrap; }
.en-est.en-embarcado, .en-est.en-transito { background: color-mix(in srgb, #2563c9 12%, transparent); color: #1d4f9e; }
.en-est.en-descargado, .en-est.en-cerrado { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-deep); }
.en-est.en-pendiente_cierre { background: color-mix(in srgb, #c46a00 14%, transparent); color: #8a4b00; }
.en .en-peso { display: inline-flex; gap: 4px; }
.en .en-peso .input:last-child { min-width: 56px; width: 60px; }
.en-mas td { border-top: 0; }
.en-mas-fila { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 2px 0; }
.en-mas-fila .input { flex: 1; }
.en-final { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.en-final .td-form { flex: 1; }
@media (max-width: 640px) { .en-final { flex-wrap: wrap; } }

/* ── Buy / sell calculator (/calculator, 05/11): formulario a la izquierda, la cuenta con su fórmula a la derecha ── */
.cc-simple { padding: 16px; max-width: 880px; }
.cc-fila { display: flex; gap: 12px; }
.cc-fila > * { flex: 1; min-width: 0; }
.cc-c i { font-style: normal; color: var(--ink-3); font-size: 11px; }
.cc-simple input[inputmode] { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; font-size: 16px; }
.cc-modo { border: 0; background: none; color: var(--accent-deep); font-size: 11px; cursor: pointer; padding: 0 0 0 4px; }
.cc-res { margin: 22px 0 14px; padding: 18px 16px; border-radius: var(--r-card); background: var(--inset); text-align: center; }
.cc-res.bien { background: var(--accent-tint); color: var(--accent-deep); }
.cc-res.mal { background: var(--red-tint); color: var(--red-ink); }
.cc-top { align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cc-top > * { flex: 0 0 auto; }
.cc-sabes { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.cc-sw { display: inline-flex; border-radius: var(--r-chip); background: var(--inset); padding: 2px; }
.cc-sw button { border: 0; background: none; padding: 5px 14px; border-radius: 5px; font-size: 13px; cursor: pointer; color: var(--ink-3); }
.cc-sw button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-hair); font-weight: 600; }
.cc-seg2 { margin-top: 8px; align-items: end; }
.cc-peso { flex: 0 0 150px; margin-left: auto; opacity: .8; }
.cc-chica { font-size: 13px; }
.cc-chica b { font-family: var(--mono); font-weight: 600; }
.cc-m { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.08); }
.cc-grande { font-size: 22px; line-height: 1.2; }
.cc-grande b { font-family: var(--mono); font-weight: 600; }
.cc-tit { font-size: 13px; margin-bottom: 8px; }
.cc-tres { display: flex; gap: 12px; justify-content: center; }
.cc-cel { flex: 1; min-width: 0; }
.cc-cel > span { font-size: 11px; opacity: .75; }
.cc-grande i { font-style: normal; font-size: 12px; opacity: .75; }
.cc-seg { margin-top: 12px; align-items: end; }
.cc-imp { flex: 0 0 auto; padding-bottom: 4px; }
.cc-pie { display: flex; justify-content: flex-end; }
@media (max-width: 640px) { .cc-fila { flex-wrap: wrap; } .cc-fila > * { flex: 1 1 40%; } .cc-top { flex-wrap: nowrap; } .cc-top > * { flex: 0 0 auto; } .cc-peso { flex: 1 1 40%; margin-left: 0; } .cc-tres { flex-wrap: wrap; } .cc-grande { font-size: 18px; } .cc-tres { gap: 6px; } }

/* 06/11: con un papel abierto (vista previa propia o la del núcleo), Claudio queda ENCIMA: se le pide el cambio mirando el documento */
body:has(#vp) #cl, body:has(#vp) #cl-btn { z-index: 650; }
body:has(.vpv) #cl, body:has(.vpv) #cl-btn { z-index: 2147483001; }

/* ── Documents › Templates we issue (06/11): sin editor — la lista y el PDF como sale; los cambios se le piden a Claudio ── */
.plv { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.plv-lista { position: sticky; top: 12px; max-height: calc(100dvh - 190px); overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 1px; align-content: start; }
.plv-lista a { display: grid; gap: 1px; padding: 7px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.plv-lista a small { color: var(--ink-3); font-size: 11px; }
.plv-lista a:hover { background: var(--field); }
.plv-lista a.on { background: var(--field); border-left-color: var(--accent); font-weight: 600; }
.plv-hoja { display: flex; flex-direction: column; min-width: 0; }
.plv-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 0 10px; }
.plv-cab .acciones { margin-left: auto; display: flex; gap: 6px; }
.plv-hoja iframe { width: 100%; height: calc(100dvh - 220px); min-height: 520px; border: 0; background: transparent; }
.plv-ejemplo { margin: 0; padding: 7px 14px; background: var(--inset); color: var(--ink-2); font-size: 12.5px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) {
  .plv { grid-template-columns: minmax(0, 1fr); }
  .plv-lista { position: static; max-height: 30vh; }
  .plv-hoja iframe { height: 70vh; min-height: 0; }
}

/* Documents › Documents we read (07/11): ficha de lectura, sin editor */
.plv-grupo { padding: 10px 10px 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.plv-grupo:first-child { padding-top: 2px; }
.plv-lista a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plv-lista a small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plv-falta { margin: 12px 10px 4px; font-size: 12.5px; color: var(--ink-3); }
.plv-ficha { gap: 12px; }
.plv-ficha .panel { margin: 0; padding: 14px 16px; }
.plv-ficha .pl-sub { margin: 0 0 4px; }
.plf-campos { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.plf-campos li { background: var(--field); border-radius: 6px; padding: 3px 9px; font-size: 12.5px; }
.plf-controles { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.plf-paso { margin: 8px 0 0; }
.plf-vals { margin-top: 6px; }
@media (max-width: 900px) { .plv-lista { max-height: 34vh; } }

/* Cash · Funding (07/11) */
.fd-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.fd-form .input { height: 32px; font-size: 13px; width: auto; min-width: 0; }
.fd-form input[name=nombre], .fd-form input[name=concepto], .fd-form input[name=cargo] { flex: 1 1 160px; }
.fd-campos { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.fd-campos .input { height: 28px; font-size: 12px; width: auto; }
.fd-form [hidden], .fd-campos [hidden] { display: none; }
@media (max-width: 700px) { .fd-fila { flex-direction: column; align-items: stretch; } .fd-campos { justify-content: flex-start; } }

/* Settings · Company (07/11): datos, socios, cuentas y condiciones, sin bandas grises */
.emp-campos { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.emp-campos textarea { min-height: 0; resize: vertical; }
.emp-guardar { justify-content: flex-start; margin-top: 12px; }
.aj-sub .mu { font-weight: 400; font-size: 12px; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.emp-socios, .emp-ctas { display: grid; gap: 8px; max-width: 760px; }
.emp-socio { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 60px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.emp-pct { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.emp-socio-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.emp-socio-form .input { height: 30px; font-size: 13px; flex: 1 1 140px; }
.emp-socio-form [name=porcentaje] { flex: 0 0 72px; }
.emp-cta { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; }
.emp-cta.lista { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.emp-cta-cab { display: flex; align-items: center; gap: 8px; }
.emp-cta-datos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; font-size: 13px; }
.emp-cta-datos small { display: block; color: var(--ink-3); font-size: 11px; margin-bottom: 1px; }
.emp-cta-dir { grid-column: 1 / -1; }
.emp-cta-pie { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; border-top: 1px solid var(--line); padding-top: 10px; }
.emp-gt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
@media (max-width: 700px) {
  .emp-campos { grid-template-columns: 1fr; }
  .emp-socio { grid-template-columns: minmax(0, 1fr) 56px auto; }
  .emp-socio > .mu:not(.emp-cap) { grid-column: 1 / -1; grid-row: 2; }
  .emp-cap { display: none; }
  .emp-cta-datos { grid-template-columns: 1fr 1fr; }
}

/* 07/11: Edit · Deactivate · Delete arriba de la ficha de la contraparte; Delete en rojo, su confirmación debajo del nombre */
.dr .dr-facts .dr-b:last-child { color: var(--red, #b4232a); }
.cp-borrar .conf { margin: 4px 0 14px; }
.dr .dr-fpie { display: none; } /* el Deactivate de abajo de la pieza: ya está arriba (cpDesactivar lo usa por debajo) */

/* Products & terms dentro de Settings (07/11): pestañas sin caja, a todo el ancho de la hoja */
.aj-hoja .cat-tabs { margin: 0 -20px; padding: 0 12px; } .aj-hoja .chips-fila { padding-top: 12px; }
@media (max-width: 860px) { .aj-hoja .cat-tabs { margin: 0 -14px; } }

.cc-otro { margin-top: 10px; align-items: stretch; }
.cc-otro > .campo { flex: 0 0 240px; }
.cc-otro .cc-res { flex: 1; margin: 0; padding: 10px; }
.cc-otro .cc-res.vacio { display: none; }
@media (max-width: 640px) { .cc-otro > .campo { flex: 1 1 100%; } .cc-otro .cc-res { flex: 1 1 100%; } }
.cc-pie { margin-top: 12px; }
@media (max-width: 640px) { .cc-imp { flex: 1 1 100% !important; } .cc-imp .cc-sw { display: flex; } .cc-imp .cc-sw button { flex: 1; } }
.cc-rail { flex: 1.6 1 0 !important; }
.cc-railp { display: flex; gap: 6px; }
.cc-railp select { flex: 1.6; min-width: 0; }
.cc-railp input { flex: 1; min-width: 0; width: 70px; }
.cc-log { margin-top: 8px; font-size: 12px; opacity: .75; }
@media (max-width: 640px) { .cc-rail { flex: 1 1 100% !important; } }
.cc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.cc-g { min-width: 0; }
.cc-gt { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.cc-gi { display: flex; gap: 6px; align-items: flex-start; }
.cc-gi label { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cc-gi label i { font-style: normal; font-size: 10.5px; color: var(--ink-3); text-align: right; }
.cc-gi input { width: 100%; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; font-size: 16px; }
.cc-sel { flex: 1.3 1 0; min-width: 0; width: auto !important; font-family: inherit; text-align: left; font-size: 13px !important; }
.cc-trucks { flex: 0 0 64px !important; }
.cc-otro { margin-top: 12px; align-items: start; }
.cc-otro .cc-res { align-self: stretch; }
.cc-mbloque { margin-top: 12px; max-width: 880px; }
.cc-mbloque .cc-g { max-width: 340px; }
.cc-calc { opacity: .45; }
.cc-mbloque > .cc-gt { font-size: 13px; margin-bottom: 8px; }
@media (max-width: 640px) { .cc-grid { grid-template-columns: minmax(0, 1fr); } }
.cc-nota { font-size: 11px; color: var(--ink-3); margin-top: 8px; }
.cc-top { flex-wrap: wrap !important; gap: 8px; }
