/* ============================================
   PLATIIS — Panel administrativo (admin.platiis.com)
   Estilo: minimalista tipo Apple. Fondo gris claro, tarjetas blancas,
   listas agrupadas que se abren al hacer clic, un solo color de acento.
   ============================================ */

@font-face { font-family: 'Poppins'; src: url('assets/fonts/poppins-400.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('assets/fonts/poppins-500.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('assets/fonts/poppins-700.woff') format('woff'); font-weight: 600 800; font-display: swap; }

:root {
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --ink: #1D1D1F;
  --ink2: #6E6E73;
  --ink3: #A1A1A6;
  --sep: rgba(0, 0, 0, .08);
  --fill: #F2F2F4;
  --green: #10C88D;
  --green-hover: #0CB27E;
  --green-ink: #0A8F63;
  --green-bg: #E6F8F0;
  --red: #E0433A;
  --red-bg: #FDEEEC;
  --amber: #B36B00;
  --amber-bg: #FFF4E0;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --bar: 52px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 8px; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Barra superior (negra translúcida, como apple.com) ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: #000; backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.bar-in { height: var(--bar); max-width: 1440px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; }
.bar-logo { height: 18px; width: auto; }
.tabs { flex: 1; display: flex; justify-content: center; gap: 4px; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; color: rgba(255,255,255,.72); font-size: 13.5px; font-weight: 500; transition: background .15s, color .15s; }
.tab svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: none; }
.tab:hover { color: #fff; }
.tab.active { background: rgba(255,255,255,.16); color: #fff; }
.badge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--green); color: #00241A; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.badge.red { background: var(--red); color: #fff; }
.badge.zero { display: none; }
.bar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; color: rgba(255,255,255,.8); }
.icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink3); box-shadow: 0 0 0 2px #111; }
.icon-btn[aria-pressed="true"] .dot { background: var(--green); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #2C2C2E; color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }

/* ---------- Vistas ---------- */
main { max-width: 1440px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; }
.page { max-width: 1040px; margin: 0 auto; padding: 28px 24px 110px; }
.page.narrow { max-width: 720px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.note { color: var(--ink2); font-size: 13px; margin: -6px 0 16px; }

/* ---------- Botones ---------- */
.btn { height: 44px; padding: 0 22px; border-radius: 999px; font-weight: 500; font-size: 14.5px; transition: background .15s, opacity .15s, transform .1s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: var(--green); color: #00241A; }
.btn.primary:hover:not(:disabled) { background: var(--green-hover); }
.btn.primary:disabled { background: var(--fill); color: var(--ink3); }
.btn.ghost { background: var(--fill); }
.btn.ghost:hover { background: #E8E8ED; }
.btn.danger { background: var(--red-bg); color: var(--red); }
.btn.danger:hover { background: #FBE0DD; }
.btn.sm { height: 34px; padding: 0 16px; font-size: 13px; }
.link { color: var(--green-ink); font-weight: 500; font-size: 13.5px; }
.link:hover { text-decoration: underline; }
.link.muted { color: var(--ink2); }

/* ---------- Toast (tipo HUD) ---------- */
.toast { position: fixed; left: 50%; top: calc(var(--bar) + 14px); transform: translate(-50%, -12px); opacity: 0; z-index: 60; background: rgba(29,29,31,.92); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 13.5px; pointer-events: none; transition: .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==================================================
   SOLICITUDES — todo en una pantalla
   ================================================== */
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - var(--bar)); }
.queue { border-right: 1px solid var(--sep); display: flex; flex-direction: column; min-height: 0; }
.queue-head { display: flex; align-items: baseline; justify-content: space-between; padding: 22px 18px 12px; }
.queue-head h1 { font-size: 22px; }
.queue-list { list-style: none; overflow-y: auto; padding: 0 10px 20px; flex: 1; }
.q-item { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 12px; border-radius: 14px; margin-bottom: 2px; }
.q-item:hover { background: rgba(0,0,0,.04); }
.q-item.sel { background: var(--card); box-shadow: var(--shadow); }
.q-name { font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-sub { color: var(--ink2); font-size: 12.5px; grid-column: 1; }
.q-time { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); }
.q-time::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.q-time.warn::before { background: #F5A623; }
.q-time.late { color: var(--red); }
.q-time.late::before { background: var(--red); }
.q-item.is-new .q-name::after { content: "Nueva"; margin-left: 8px; font-size: 10.5px; font-weight: 600; color: var(--green-ink); background: var(--green-bg); padding: 2px 7px; border-radius: 999px; vertical-align: 2px; }
.empty { color: var(--ink2); text-align: center; padding: 40px 16px; font-size: 13.5px; list-style: none; }

.detail { overflow-y: auto; min-height: 0; position: relative; display: flex; flex-direction: column; }
.d-scroll { flex: 1; padding: 22px 28px 20px; max-width: 880px; width: 100%; margin: 0 auto; }
.back { display: none; color: var(--green-ink); font-weight: 500; margin-bottom: 10px; }
.d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.d-name { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.d-sub { color: var(--ink2); font-size: 13.5px; margin-top: 3px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--green-bg); color: var(--green-ink); }
.pill.warn { background: var(--amber-bg); color: var(--amber); }
.pill.late, .pill.red { background: var(--red-bg); color: var(--red); }
.pill.gray { background: var(--fill); color: var(--ink2); }

/* Tarjeta de decisión */
.hero { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px 24px; display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; align-items: center; }
.hero-k { font-size: 12px; font-weight: 500; color: var(--ink2); text-transform: uppercase; letter-spacing: .06em; }
.hero-dec { font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin: 4px 0 6px; line-height: 1.15; }
.hero-dec.ok { color: var(--green-ink); }
.hero-dec.no { color: var(--red); }
.hero-why { color: var(--ink2); font-size: 13.5px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric { background: var(--fill); border-radius: 14px; padding: 12px 14px; }
.metric span { display: block; font-size: 12px; color: var(--ink2); white-space: nowrap; }
.metric strong { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.metric strong.bad { color: var(--red); }
.pbar { display: block; height: 4px; border-radius: 4px; background: #E5E5EA; margin-top: 8px; overflow: hidden; }
.pbar b { display: block; height: 100%; background: var(--green); border-radius: 4px; }
.pbar b.bad { background: var(--red); }
.ring { --p: 0; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(var(--c, var(--green)) calc(var(--p) * 1%), #E5E5EA 0); display: grid; place-items: center; float: right; margin-top: -2px; }
.ring::after { content: ""; width: 34px; height: 34px; border-radius: 50%; background: var(--fill); }

/* Chips de Capa 1 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 2px 18px; }
.chip { font-size: 12.5px; padding: 5px 11px; border-radius: 999px; background: var(--green-bg); color: var(--green-ink); font-weight: 500; }
.chip.no { background: var(--red-bg); color: var(--red); }
.chip-label { font-size: 12px; color: var(--ink2); align-self: center; margin-right: 4px; }

/* ---------- Listas agrupadas que se abren (estilo Ajustes de iPhone) ---------- */
.group { list-style: none; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.group + .group { margin-top: 16px; }
.row { border-top: 1px solid var(--sep); }
.row:first-child { border-top: 0; }
.row-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 15px 18px; text-align: left; min-height: 56px; }
.row-btn:hover { background: rgba(0,0,0,.02); }
.row-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: var(--fill); color: var(--ink2); }
.row-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.row-ico.g { background: var(--green-bg); color: var(--green-ink); }
.row-ico.r { background: var(--red-bg); color: var(--red); }
.row-ico.a { background: var(--amber-bg); color: var(--amber); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; font-size: 14.5px; }
.row-meta { color: var(--ink2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-val { color: var(--ink2); font-size: 13.5px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-val strong { color: var(--ink); font-weight: 500; display: block; }
.row-val .vs { display: block; }
.chev { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: var(--ink3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.row.open > .row-btn .chev { transform: rotate(90deg); }
.row-body { display: none; padding: 2px 18px 18px 60px; }
.row.open > .row-body { display: block; animation: drop .18s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.row-body.flush { padding-left: 18px; }

/* Datos de solo lectura */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--sep); font-size: 13.5px; }
.kv span { color: var(--ink2); }
.kv strong { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.src { font-size: 11.5px; color: var(--ink3); margin-top: 10px; }

/* Cálculo del motor */
.steps { display: grid; gap: 14px; }
.step-t { font-size: 12px; font-weight: 600; color: var(--ink2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.formula { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; color: var(--ink2); background: var(--fill); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; overflow-x: auto; white-space: nowrap; }
.ztab { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ztab th { font-size: 11.5px; font-weight: 500; color: var(--ink3); text-align: right; padding: 4px 6px; }
.ztab th:first-child, .ztab td:first-child { text-align: left; }
.ztab td { padding: 6px; text-align: right; border-top: 1px solid var(--sep); }
.ztab td.neg { color: var(--red); }
.ztab tr.tot td { font-weight: 600; border-top: 1.5px solid var(--ink); }

/* Barra de acciones de la solicitud */
.actions { position: sticky; bottom: 0; background: rgba(245,245,247,.86); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--sep); }
.actions-in { max-width: 880px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 12px; }
.actions .hint { flex: 1; font-size: 12.5px; color: var(--ink2); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 44px; height: 26px; border-radius: 999px; background: #E5E5EA; position: relative; transition: background .2s; flex-shrink: 0; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--green); outline-offset: 2px; }
.reject { display: none; max-width: 880px; margin: 0 auto; padding: 0 28px 14px; gap: 10px; align-items: center; }
.reject.show { display: flex; }
select, .field { height: 40px; border-radius: 10px; border: 1px solid var(--sep); background: var(--card); padding: 0 12px; font: inherit; font-size: 14px; color: var(--ink); }
.reject select { flex: 1; }

/* ==================================================
   CARTERA
   ================================================== */
.law { font-size: 12.5px; }
.seg { display: inline-flex; background: #E3E3E8; border-radius: 10px; padding: 2px; margin-bottom: 16px; max-width: 100%; overflow-x: auto; }
.seg button { height: 32px; padding: 0 16px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button .n { color: var(--ink2); font-weight: 400; margin-left: 4px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.why { font-size: 12px; color: var(--ink2); }

/* ==================================================
   RESUMEN
   ================================================== */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.tile span { display: block; font-size: 12.5px; color: var(--ink2); }
.tile strong { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile em { font-style: normal; font-size: 12px; color: var(--ink3); }
.mini { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.mini th { text-align: left; font-weight: 500; font-size: 11.5px; color: var(--ink3); padding: 4px 6px; }
.mini td { padding: 8px 6px; border-top: 1px solid var(--sep); }
.bin { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-weight: 600; font-size: 12px; }
.bin.b1 { background: var(--green-bg); color: var(--green-ink); }
.bin.b0 { background: var(--red-bg); color: var(--red); }
.feed { list-style: none; }
.feed li { display: grid; grid-template-columns: 118px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--sep); font-size: 13px; }
.feed li:first-child { border-top: 0; }
.feed time { color: var(--ink3); font-size: 12px; }

/* ==================================================
   AJUSTES
   ================================================== */
.set { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--sep); }
.set:first-child { border-top: 0; }
.set label { flex: 1; font-size: 14px; }
.set label small { display: block; color: var(--ink3); font-size: 12px; }
.set .inp { display: inline-flex; align-items: center; gap: 6px; background: var(--fill); border-radius: 10px; padding: 0 10px; height: 36px; }
.set .inp input { width: 96px; border: 0; background: transparent; font: inherit; font-size: 14px; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.set .inp input:focus { outline: none; }
.set .inp:focus-within { box-shadow: 0 0 0 2px var(--green); }
.set .inp em { font-style: normal; color: var(--ink2); font-size: 13px; }
.set.changed .inp { background: var(--green-bg); }
.set.bad .inp { background: var(--red-bg); box-shadow: 0 0 0 1.5px var(--red); }
.set-err { color: var(--red); font-size: 12px; padding: 0 0 8px; }
.sub-t { font-size: 12px; font-weight: 600; color: var(--ink2); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 2px; }
.reset { display: block; margin: 18px auto 0; }
.savebar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 8px 30px rgba(0,0,0,.14); border-radius: 999px; padding: 8px 8px 8px 20px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; white-space: nowrap; }
.savebar[hidden] { display: none; }

/* ==================================================
   CELULAR: pestañas abajo, lista → detalle
   ================================================== */
@media (max-width: 860px) {
  .bar { background: #000; backdrop-filter: none; -webkit-backdrop-filter: none; }  /* si no, las pestañas fijas quedan atrapadas en la barra */
  .bar-in { padding: 0 16px; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-around; gap: 0; background: rgba(250,250,252,.92); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--sep); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tab { flex-direction: column; height: auto; gap: 2px; padding: 4px 8px; font-size: 10.5px; color: var(--ink3); position: relative; border-radius: 10px; }
  .tab svg { display: block; width: 24px; height: 24px; }
  .tab.active { background: none; color: var(--green-ink); }
  .tab .badge { position: absolute; top: 0; left: 50%; margin-left: 6px; height: 17px; min-width: 17px; font-size: 10px; }
  .bar-in { justify-content: space-between; }
  .split { grid-template-columns: minmax(0, 1fr); height: auto; min-height: calc(100vh - var(--bar)); }
  .queue { border-right: 0; }
  .detail { overflow: visible; }
  .split.show-detail .queue { display: none; }
  .split:not(.show-detail) .detail { display: none; }
  .queue-list { padding-bottom: 90px; }
  .back { display: inline-block; }
  .d-scroll { padding: 14px 16px 16px; }
  .d-head { flex-direction: column; gap: 8px; }
  .d-name { font-size: 22px; }
  .hero { grid-template-columns: 1fr; padding: 18px; gap: 16px; }
  .hero-dec { font-size: 24px; }
  .metric strong { font-size: 17px; }
  .ring { display: none; }
  .row-body { padding-left: 18px; }
  .actions { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .actions-in { padding: 10px 16px; flex-wrap: wrap; }
  .actions .hint { flex-basis: 100%; order: 3; }
  .actions .btn { flex: 1; }
  .switch { flex-basis: 100%; }
  .reject { padding: 0 16px 12px; flex-wrap: wrap; }
  .page { padding: 18px 16px 120px; }
  h1 { font-size: 24px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile strong { font-size: 21px; }
  .feed li { grid-template-columns: 1fr; gap: 2px; }
  .savebar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .kv { grid-template-columns: 1fr; }
  .row-val .vs { display: none; }
  .seg { display: flex; }
  .seg button { flex: 1; padding: 0 8px; font-size: 12.5px; }
}
@media (max-width: 400px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics .metric:last-child { grid-column: span 2; }
}

/* ---- Mensajes y Flujos ---- */
.grp-t { font-size: 13px; font-weight: 600; color: var(--ink2); margin: 22px 4px 8px; letter-spacing: .02em; }
#mensajesRoot .grp-t:first-child, #flujosRoot > .group + .grp-t { margin-top: 22px; }
.tipo { font-size: 12.5px; color: var(--ink2); background: var(--fill); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.tipo b { color: var(--ink); }
.tipo.cobranza { background: #FFF4E0; } .tipo.promo { background: var(--green-bg); }
.chs { display: flex; gap: 18px; flex-wrap: wrap; margin: 8px 0 12px; }
.fld-w { margin-bottom: 10px; } .fld-w > small, .chips small, .prev small { display: block; color: var(--ink3); font-size: 12px; margin-bottom: 4px; }
.fld { width: 100%; border: 0; background: var(--fill); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; color: var(--ink); }
.fld:focus { outline: none; box-shadow: 0 0 0 2px var(--green); }
.ta { resize: vertical; line-height: 1.45; min-height: 90px; }
.cnt { margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.chips small { margin: 0 4px 0 0; }
.chip { font: inherit; font-size: 12px; background: var(--green-bg); color: var(--green-ink); border-radius: 999px; padding: 4px 10px; }
.chip:hover { background: #D3F2E6; }
.prev { background: #F2F2F7; border-radius: 14px; padding: 12px; margin-bottom: 8px; }
.prev small:not(:first-child) { margin-top: 10px; }
.bub { border-radius: 14px; padding: 10px 13px; font-size: 14px; line-height: 1.4; max-width: 440px; white-space: pre-wrap; word-break: break-word; }
.bub.wa { background: #D9FDD3; border-top-left-radius: 4px; }
.bub.mail { background: #fff; border: 1px solid var(--sep); max-width: none; }
.bub.mail p { margin-top: 6px; color: var(--ink2); }
.acts { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.acts .btn { margin-left: auto; }
.set-err.warn { color: #8A5A00; }
.set .inp.wide input { width: 240px; text-align: left; }
.pipe { list-style: none; display: flex; flex-direction: column; gap: 0; margin: 4px 0 12px; }
.st { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 12px; }
.st:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--sep); }
.st-i { width: 32px; height: 32px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
.st.msg .st-i { background: var(--green-bg); } .st.ia .st-i { background: #EDE7FF; } .st.humano .st-i, .st.alerta .st-i { background: #FFF4E0; }
.st-b small { display: block; color: var(--ink3); font-size: 11.5px; } .st-b b { font-weight: 500; font-size: 14px; }
.search { width: 100%; max-width: 520px; display: block; margin-bottom: 14px; height: 42px; border: 0; border-radius: 12px; background: #E3E3E8; padding: 0 14px; font: inherit; font-size: 14.5px; }
.search:focus { outline: none; box-shadow: 0 0 0 2px var(--green); }
.tiles.mini { grid-template-columns: repeat(4, 1fr); margin: 4px 0 14px; }
.tiles.mini .tile { background: var(--fill); box-shadow: none; padding: 12px 14px; }
.tiles.mini .tile strong { font-size: 20px; }
.pill.sm { height: 22px; font-size: 11.5px; padding: 0 9px; margin-left: 4px; }
.hist li { grid-template-columns: 70px 1fr; }
@media (max-width: 700px) { .tiles.mini { grid-template-columns: repeat(2, 1fr); } }

/* ---- Métricas: recuadros con borde verde Platiis y nombres en inglés ---- */
#v-metricas .m-tiles { grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 6px 0 18px; }
#v-metricas .tile { background: linear-gradient(180deg, #fff 0%, var(--green-bg) 220%); border: 1.5px solid var(--green); border-radius: 16px; box-shadow: 0 2px 10px rgba(16, 200, 141, .12); }
#v-metricas .tile span { display: block; line-height: 1.25; }
#v-metricas .tile span b { display: block; font-size: 12.5px; font-weight: 700; color: var(--green-ink); letter-spacing: .01em; }
#v-metricas .tile span i { display: block; font-style: normal; font-size: 11.5px; color: var(--ink3); margin-top: 1px; }
#v-metricas .tile strong { color: var(--ink); }
#v-metricas .tile.pend { border-style: dashed; background: #fff; box-shadow: none; }
#v-metricas .tile.pend strong { color: var(--ink3); font-size: 18px; margin-top: 8px; }
#v-metricas .m-sec { display: flex; align-items: baseline; gap: 10px; margin: 26px 4px 6px; padding-left: 10px; border-left: 4px solid var(--green); }
#v-metricas .m-sec b { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
#v-metricas .m-sec i { font-style: normal; font-size: 13px; color: var(--ink2); font-weight: 500; }
#v-metricas .cacbox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--green-bg); border: 1.5px solid var(--green); border-radius: 16px; padding: 12px 16px; margin: 0 0 12px; }
#v-metricas .cacbox label { font-size: 13px; font-weight: 600; color: var(--green-ink); flex: 1 1 100%; }
#v-metricas .cacbox .field { flex: 1 1 180px; max-width: 260px; }
#v-metricas .btn-g { background: var(--green); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; font: inherit; font-weight: 600; cursor: pointer; }
#v-metricas .btn-g:hover { background: var(--green-hover); }
@media (max-width: 900px) { #v-metricas .m-tiles { grid-template-columns: repeat(2, 1fr); } #v-metricas .m-sec { flex-direction: column; gap: 0; } }

/* ---- 26-oct-2026: Textos de la app ---- */
#textosRoot { margin-top: 28px; }
.tx-item { padding: 12px 0; border-top: 1px solid var(--line, #E5ECE9); }
.tx-item:first-child { border-top: 0; }
.tx-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.tx-id { font-size: 11.5px; color: #5B6B65; }
.tx-ta { width: 100%; box-sizing: border-box; min-height: 56px; resize: vertical; font: inherit; font-size: 13.5px; line-height: 1.45; }
.tx-acts { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.sys-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 200; max-width: min(92vw, 440px); padding: 12px 16px; border-radius: 14px; background: #10231D; color: #fff; font-size: 13.5px; transition: opacity .2s, transform .2s; }
.sys-toast.show { opacity: 1; transform: translate(-50%, 0); }
