/* Mostrador de RYM Music — admin.ritmosymas.com/mostrador (2026-11-10)
   Acento: naranja de Tienda (#F5820A) solo en acciones principales y selección.
   Verde = lo decide quien atiende; naranja = pasa a Eduardo; rojo = nunca. Bazar = olivo.
   Móvil (<768): una pantalla a la vez, con barra inferior. Tableta: temas + detalle.
   Escritorio (>=1200): temas + detalle + respuestas rápidas. */

:root, [data-theme="dark"] {
  --bg: #07080F; --bg2: #0C0E18; --s1: #10121C; --s2: #171A27; --s3: #1F2231;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.15);
  --tx: #F2F2F5; --tx2: #C9CBD5; --mut: #A3A6B4; --hint: #7D8091;
  --o: #F5820A; --o-tx: #F5A04A; --o-dim: rgba(245,130,10,.12); --o-b: rgba(245,130,10,.45); --on-o: #1A0E00;
  --g: #3CC79A; --g-dim: rgba(29,158,117,.12); --g-b: rgba(29,158,117,.45);
  --r: #F07574; --r-dim: rgba(226,75,74,.10); --r-b: rgba(226,75,74,.45);
  --bz: #B5CF7C; --bz-dim: rgba(86,111,40,.18); --bz-b: rgba(167,196,106,.35);
  --scrim: rgba(3,4,8,.62);
  --shadow: 0 12px 40px rgba(0,0,0,.45);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F4F4F1; --bg2: #FFFFFF; --s1: #FFFFFF; --s2: #F0F0EC; --s3: #E4E4DF;
  --line: rgba(20,20,30,.10); --line2: rgba(20,20,30,.20);
  --tx: #14151C; --tx2: #383A45; --mut: #5C5F6B; --hint: #80838F;
  --o-tx: #B35A00; --o-dim: rgba(245,130,10,.12); --o-b: rgba(204,102,0,.45);
  --g: #137A59; --g-dim: rgba(29,158,117,.10); --g-b: rgba(19,122,89,.40);
  --r: #B83231; --r-dim: rgba(226,75,74,.08); --r-b: rgba(184,50,49,.40);
  --bz: #4A6020; --bz-dim: rgba(86,111,40,.10); --bz-b: rgba(86,111,40,.35);
  --scrim: rgba(20,20,30,.40);
  --shadow: 0 12px 40px rgba(20,20,30,.16);
  color-scheme: light;
}
:root {
  --ease-out: cubic-bezier(.23,1,.32,1);
  --ease-drawer: cubic-bezier(.32,.72,0,1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-h: 'Manrope', 'Inter', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--tx); font: 400 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
input, textarea { font-size: 16px; } /* 16px evita el zoom de iOS al enfocar */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--o); outline-offset: 2px; border-radius: 10px; }
/* El panel recibe el foco al abrir un tema (para lectores de pantalla): sin contorno visible */
.detalle:focus, .detalle:focus-visible { outline: none; }
[hidden] { display: none !important; }
.ti { line-height: 1; }
html:not(.ti-ready) .ti { opacity: 0; }

/* Respuesta al presionar: todo lo que se toca baja un poco */
.press { transition: transform 160ms var(--ease-out), background-color 180ms ease, border-color 180ms ease, color 180ms ease; user-select: none; -webkit-user-select: none; }
.press:active { transform: scale(.97); }
.press:disabled, .press[aria-disabled="true"] { transform: none; cursor: not-allowed; }

/* ── Estructura ─────────────────────────────────────────── */
.app { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.top {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: var(--bg2); border-bottom: 1px solid var(--line);
}
.brand { flex: none; display: flex; flex-direction: column; gap: 1px; }
.brand-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--o-tx); }
.brand-name { font: 800 20px/1.1 var(--font-h); }
.tema-btn { flex: none; margin-left: auto; width: 44px; height: 44px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); color: var(--tx2); display: grid; place-items: center; font-size: 20px; }
.chat-chip {
  display: flex; align-items: center; gap: 10px; min-height: 44px; flex: 0 1 auto; min-width: 0;
  padding: 6px 10px 6px 6px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line);
  text-align: left;
}
.chat-av { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--s3); display: grid; place-items: center; font: 800 13px var(--font-h); color: var(--o-tx); }
.chat-txt { display: flex; flex-direction: column; min-width: 0; }
.chat-lbl { font-size: 11px; color: var(--mut); }
.chat-who { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-who.vacio { color: var(--mut); font-weight: 500; }
.chat-caret { color: var(--hint); font-size: 16px; }

.stage { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.panel { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--bg); }
.lateral { display: none; }

/* Móvil: el detalle entra desde la derecha, como una app */
.temas { transition: transform 280ms var(--ease-drawer), visibility 0s linear 0s; }
.detalle { transform: translateX(100%); visibility: hidden; transition: transform 280ms var(--ease-drawer), visibility 0s linear 280ms; box-shadow: -12px 0 32px rgba(0,0,0,.25); }
body[data-screen="detalle"] .detalle { transform: none; visibility: visible; transition: transform 280ms var(--ease-drawer), visibility 0s; }
body[data-screen="detalle"] .temas { transform: translateX(-22%); visibility: hidden; transition: transform 280ms var(--ease-drawer), visibility 0s linear 280ms; }
.detalle.arrastrando, .temas.arrastrando { transition: none; }

.tabbar {
  flex: none; display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  padding: 6px 6px calc(8px + var(--safe-b)); background: var(--bg2); border-top: 1px solid var(--line);
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; justify-content: center; border-radius: 12px; color: var(--mut); font-size: 11px; font-weight: 600; }
.tab .ti { font-size: 22px; }
.tab[aria-current="page"] { color: var(--o-tx); }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--o); color: var(--on-o); font: 800 10px/18px var(--font); text-align: center; }

/* ── Inicio: buscador y temas ──────────────────────────── */
.temas-inner { padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 14px; max-width: 720px; margin: 0 auto; }
#guard:empty, #aviso-pronto:empty { display: none; }
#guard { display: flex; flex-direction: column; gap: 10px; }
.panel, .lateral { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.search {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 14px;
  border-radius: 14px; background: var(--s2); border: 1px solid var(--line2); transition: border-color 180ms ease;
}
.search:focus-within { border-color: var(--o-b); }
.search > .ti { color: var(--o-tx); font-size: 20px; }
.search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: none; color: var(--tx); font-weight: 500; }
.search input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--hint); }
.search input::-webkit-search-cancel-button { display: none; }
.search-x { width: 36px; height: 36px; border-radius: 10px; background: var(--s3); display: grid; place-items: center; color: var(--tx2); }

.grupo { display: flex; flex-direction: column; gap: 6px; }
.grupo-t { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); padding: 4px 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.tu { background: var(--g); } .dot.ed { background: var(--o); } .dot.otro { background: var(--hint); } .dot.regla { background: var(--r); }

.fila {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px;
  border-radius: 14px; background: var(--s1); border: 1px solid var(--line); text-align: left;
}
.fila-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--s3); color: var(--tx2); }
.fila-ic.tu { background: var(--g-dim); color: var(--g); }
.fila-ic.ed { background: var(--o-dim); color: var(--o-tx); }
.fila-ic.regla { background: var(--r-dim); color: var(--r); }
.fila-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fila-t { font-size: 15px; font-weight: 600; }
.fila-s { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila > .ti-chevron-right { color: var(--hint); font-size: 18px; }
.fila[aria-current="true"] { border-color: var(--o-b); background: var(--o-dim); }
.fila-n { font: 700 12px var(--font); color: var(--mut); }

.aviso {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 14px; width: 100%; text-align: left;
  background: var(--s1); border: 1px solid var(--line);
}
.aviso > .ti { font-size: 19px; flex: none; margin-top: 1px; }
.aviso-tx { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.aviso-t { font-weight: 700; font-size: 14px; }
.aviso-s { font-size: 14px; color: var(--tx2); }
.aviso.rojo { background: var(--r-dim); border-color: var(--r-b); } .aviso.rojo > .ti, .aviso.rojo .aviso-t { color: var(--r); }
.aviso.naranja { background: var(--o-dim); border-color: var(--o-b); } .aviso.naranja > .ti, .aviso.naranja .aviso-t { color: var(--o-tx); }
.aviso.verde { background: var(--g-dim); border-color: var(--g-b); } .aviso.verde > .ti, .aviso.verde .aviso-t { color: var(--g); }

/* ── Detalle ───────────────────────────────────────────── */
.det { display: flex; flex-direction: column; min-height: 100%; }
.det-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.det-back { flex: none; width: 44px; height: 44px; border-radius: 13px; background: var(--s2); display: grid; place-items: center; font-size: 20px; }
.det-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.det-t { margin: 0; font: 800 19px/1.2 var(--font-h); }
.det-quien { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mut); }
.det-body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 16px; max-width: 760px; width: 100%; margin: 0 auto; }
.det-foot {
  position: sticky; bottom: 0; z-index: 2; padding: 12px 16px; background: var(--bg2);
  border-top: 1px solid var(--line); display: flex; gap: 10px;
}
.det-foot .btn { flex: 1; }
.det-foot .btn-ghost { flex: 0 1 auto; }

.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-t { margin: 0; font: 800 16px/1.25 var(--font-h); }
.sec-s { margin: 0; font-size: 14px; color: var(--mut); }
.lbl { font-size: 13px; font-weight: 600; color: var(--mut); }
.nota { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--tx2); }
.nota > .ti { flex: none; color: var(--o-tx); font-size: 18px; margin-top: 1px; }

.card { padding: 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.card-k { font-size: 12px; color: var(--mut); }
.card-v { font: 800 18px/1.25 var(--font-h); }
.card-s { font-size: 13px; color: var(--mut); }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid-2 { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.card.si .card-k { color: var(--g); font-weight: 700; }
.card.no { background: var(--r-dim); border-color: var(--r-b); }
.card.no .card-k { color: var(--r); font-weight: 700; }
.card.bazar { background: var(--bz-dim); border-color: var(--bz-b); }
.card.bazar .card-v { color: var(--bz); }

.big { padding: 18px; border-radius: 16px; background: var(--o-dim); border: 1px solid var(--o-b); display: flex; flex-direction: column; gap: 2px; }
.big-k { font-size: 13px; font-weight: 600; color: var(--o-tx); }
.big-v { font: 800 38px/1.1 var(--font-h); letter-spacing: -.02em; color: var(--o-tx); font-variant-numeric: tabular-nums; }

/* Campos */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--mut); }
.field em { font-style: normal; font-weight: 500; color: var(--hint); }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 13px; background: var(--s2);
  border: 1px solid var(--line2); outline: none; color: var(--tx); transition: border-color 180ms ease;
}
.field textarea { resize: none; min-height: 88px; line-height: 1.45; }
.field input:focus, .field textarea:focus { border-color: var(--o-b); }
.field.err input { border-color: var(--r-b); }
.money { position: relative; }
.money::before { content: '$'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mut); font-weight: 700; }
.money input { padding-left: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.campos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Lista de revisión */
.prog { display: flex; flex-direction: column; gap: 6px; }
.prog-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--mut); }
.prog-row b { color: var(--o-tx); } .prog.listo .prog-row b { color: var(--g); }
.prog-bar { height: 6px; border-radius: 3px; background: var(--s3); overflow: hidden; }
.prog-bar i { display: block; height: 100%; width: 100%; background: var(--o); border-radius: 3px; transform-origin: left; transition: transform 320ms var(--ease-out); }
.prog.listo .prog-bar i { background: var(--g); }

.check {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; text-align: left;
  background: var(--s1); border: 1px solid var(--line);
}
.check-box { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; color: var(--bg); margin-top: 1px; transition: background-color 180ms ease, border-color 180ms ease; }
.check-box .ti { font-size: 15px; opacity: 0; transform: scale(.6); transition: opacity 160ms ease, transform 200ms var(--ease-out); }
.check-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.check-t { font-weight: 600; font-size: 15px; }
.check-s { font-size: 13px; color: var(--mut); }
.check[aria-pressed="true"] { background: var(--g-dim); border-color: var(--g-b); }
.check[aria-pressed="true"] .check-box { background: var(--g); border-color: var(--g); }
.check[aria-pressed="true"] .check-box .ti { opacity: 1; transform: none; }
.check.cuadro .check-box { border-radius: 8px; }

/* Selector segmentado */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--s2); }
.seg button { min-height: 44px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--mut); padding: 0 8px; }
.seg button[aria-pressed="true"] { background: var(--o-dim); color: var(--o-tx); box-shadow: inset 0 0 0 1px var(--o-b); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 600; background: var(--s1); border: 1px solid var(--line); color: var(--tx2); }
.chip[aria-pressed="true"] { background: var(--o-dim); border-color: var(--o); color: var(--o-tx); }
.chip b { font-weight: 800; }

/* Mensaje listo para copiar */
.msg { padding: 14px; border-radius: 14px; background: var(--s1); border: 1px dashed var(--line2); display: flex; flex-direction: column; gap: 10px; }
.msg-k { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hint); }
.msg-t { margin: 0; font-size: 15px; line-height: 1.5; color: var(--tx); white-space: pre-line; overflow-wrap: anywhere; }
.msg-acc { display: flex; flex-wrap: wrap; gap: 8px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 14px; font-size: 15px; font-weight: 700; border: 1px solid transparent; white-space: nowrap;
}
.btn .ti { font-size: 19px; }
.btn-primary { background: var(--o); color: var(--on-o); }
.btn-ghost { background: var(--s2); border-color: var(--line2); color: var(--tx); }
.btn-wa { background: var(--g-dim); border-color: var(--g-b); color: var(--g); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn-sm .ti { font-size: 17px; }
.btn:disabled { background: var(--s2); border-color: var(--line); color: var(--mut); white-space: normal; text-align: center; line-height: 1.25; }
.btn-lbl { display: inline-flex; align-items: center; gap: 8px; transition: filter 200ms ease, opacity 200ms ease; }
.btn.cambiando .btn-lbl { filter: blur(2px); opacity: .6; }
.btn.hecho { background: var(--g-dim); border-color: var(--g-b); color: var(--g); }
.btn-primary.hecho { background: var(--g); border-color: var(--g); color: #06140E; }
[data-theme="light"] .btn-primary.hecho { color: #FFFFFF; }

/* Accesos a Historial y Respuestas en la lista: en móvil ya están en la barra inferior */
.solo-ancho { display: none; }

/* Cotización: resultados del catálogo, renglones, total y envío */
.res { display: flex; flex-direction: column; gap: 6px; }
.res:empty { display: none; }
.res-i { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); text-align: left; }
.res-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.res-t { font-size: 14px; font-weight: 600; }
.res-s { font-size: 12px; color: var(--mut); }
.res-p { font: 800 15px var(--font-h); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.res-p s { display: block; font: 500 12px var(--font); color: var(--hint); }
.res-i > .ti { color: var(--o-tx); font-size: 20px; }
.lineas { display: flex; flex-direction: column; gap: 8px; }
.linea { padding: 12px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.linea-top { display: flex; align-items: flex-start; gap: 10px; }
.linea-t { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.35; }
.linea-lnk { color: var(--o-tx); margin-left: 4px; }
.linea-libre { flex: 1; }
.linea-libre input { min-height: 44px; }
.linea-x { flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--s2); color: var(--mut); display: grid; place-items: center; font-size: 18px; }
.linea-ctl { display: flex; align-items: center; gap: 10px; }
.paso-cant { flex: none; display: inline-flex; align-items: center; border-radius: 12px; background: var(--s2); border: 1px solid var(--line2); }
.paso-cant button { width: 40px; height: 44px; display: grid; place-items: center; font-size: 17px; color: var(--tx); }
.paso-cant b { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.linea-precio { flex: 1; min-width: 0; }
.linea-precio input { min-height: 44px; }
.linea-sub { flex: none; min-width: 84px; text-align: right; font: 800 15px var(--font-h); font-variant-numeric: tabular-nums; }
.linea-aviso { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--o-tx); }
.total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 16px; border-radius: 16px; background: var(--o-dim); border: 1px solid var(--o-b); }
.total-k { font-size: 13px; font-weight: 700; color: var(--o-tx); }
.total-v { font: 800 30px/1.1 var(--font-h); letter-spacing: -.02em; color: var(--o-tx); font-variant-numeric: tabular-nums; }
.total-s { flex-basis: 100%; font-size: 12px; color: var(--mut); }
.det-foot:has(.envia) { flex-direction: column; gap: 6px; }
.envia { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.envia .btn { padding: 0 10px; min-width: 0; }
.envia .envia-wa { grid-column: 1 / -1; }
.btn .spin { width: 16px; height: 16px; }
.pdf-listo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: var(--g-dim); border: 1px solid var(--g-b); }
.pdf-listo > .ti { flex: none; font-size: 22px; color: var(--g); }
.pdf-listo-tx { flex: 1 1 calc(100% - 40px); min-width: 0; display: flex; flex-direction: column; font-size: 12px; color: var(--mut); }
.pdf-listo .btn { flex: 1 1 0; }
.pdf-listo-tx b { font-size: 14px; color: var(--tx); }
.pdf-listo-tx span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-t b { font-weight: 700; }
.envia-falta { margin: 0; min-height: 16px; font-size: 12px; color: var(--mut); text-align: center; }
.envia-falta:empty { display: none; }

/* Ayudar al cliente */
/* Neutro: el naranja ya significa "pasa a Eduardo" */
.dot.ayuda { background: var(--tx); }
.fila-ic.ayuda { background: var(--s3); color: var(--tx); }
.cuentas { display: flex; flex-direction: column; gap: 8px; }
.cuenta { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); }
.cuenta-b { font-size: 12px; font-weight: 600; color: var(--mut); }
.cuenta-n { grid-row: 2; font: 700 16px var(--font); font-variant-numeric: tabular-nums; letter-spacing: .02em; overflow-wrap: anywhere; }
.cuenta .btn { grid-row: 1 / span 2; grid-column: 2; }
.small-mut { margin: 0; font-size: 12px; color: var(--mut); }
.flujo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.flujo-i { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; }
.flujo-i:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 2px; width: 2px; background: var(--line2); }
.flujo-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--o-dim); border: 1px solid var(--o-b); color: var(--o-tx); font: 800 14px var(--font-h); }
.flujo-c { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.flujo-t { margin: 4px 0 0; font: 800 16px/1.3 var(--font-h); }
.flujo-d { margin: 0; font-size: 14px; color: var(--tx2); }
.dest .sec-t { display: flex; align-items: center; gap: 8px; }
.dest .sec-t .ti { color: var(--o-tx); font-size: 20px; }
.ped-et { flex: none; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.ped-et.naranja { background: var(--o-dim); color: var(--o-tx); }
.ped-et.verde { background: var(--g-dim); color: var(--g); }
.ped-et.rojo { background: var(--r-dim); color: var(--r); }
.ped-pasos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ped-pasos .ped-t { overflow-wrap: anywhere; }
.ped-pasos li { display: flex; flex-direction: column; gap: 6px; }
.ped-dot { height: 6px; border-radius: 3px; background: var(--s3); }
.ped-pasos li.hecho .ped-dot { background: var(--g); }
.ped-pasos li.actual .ped-dot { background: var(--o); }
.ped-t { font-size: 11px; line-height: 1.25; color: var(--mut); }
.ped-pasos li.actual .ped-t { color: var(--tx); font-weight: 700; }
.ped-fuera { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--r); font-weight: 600; }
.ped-dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: 13px; }
.ped-dl dt { color: var(--mut); }
.ped-dl dd { margin: 0; color: var(--tx2); overflow-wrap: anywhere; }

/* Decisión del 50/50 */
.resultado { padding: 16px; border-radius: 16px; border: 1px solid var(--line2); background: var(--s1); display: flex; flex-direction: column; gap: 4px; transition: background-color 200ms ease, border-color 200ms ease; }
.resultado-k { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); }
.resultado-t { font: 800 20px/1.25 var(--font-h); }
.resultado-s { font-size: 14px; color: var(--tx2); }
.resultado.verde { background: var(--g-dim); border-color: var(--g-b); } .resultado.verde .resultado-k { color: var(--g); }
.resultado.naranja { background: var(--o-dim); border-color: var(--o-b); } .resultado.naranja .resultado-k { color: var(--o-tx); }
.resultado.rojo { background: var(--r-dim); border-color: var(--r-b); } .resultado.rojo .resultado-k { color: var(--r); }

/* Línea de tiempo del apartado */
.tl { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); }
.tl-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--mut); }
.tl-bar { position: relative; height: 10px; border-radius: 5px; background: var(--s3); }
.tl-bar i { position: absolute; inset: 0 70% 0 0; border-radius: 5px; background: var(--o); }

/* Lista "nunca" */
.nunca { display: flex; flex-direction: column; gap: 10px; }
.nunca-i { padding: 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.nunca-no { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; color: var(--r); }
.nunca-si { display: flex; gap: 8px; align-items: flex-start; color: var(--tx2); font-size: 14px; }
.nunca-si .ti { color: var(--g); }

/* Historial */
.hist { display: flex; flex-direction: column; gap: 10px; }
.reg { padding: 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.reg.vencida { border-color: var(--r-b); }
.reg.pronto { border-color: var(--o-b); }
.reg-top { display: flex; align-items: flex-start; gap: 10px; }
.reg-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.reg-t { font-weight: 700; font-size: 15px; }
.reg-s { font-size: 13px; color: var(--mut); overflow-wrap: anywhere; }
.reg-monto { font: 800 17px var(--font-h); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.reg-monto small { display: block; font: 600 12px var(--font); color: var(--mut); }
.reg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--tx2); }
.reg-meta .ti { color: var(--mut); }
.reg-meta .rojo { color: var(--r); font-weight: 700; } .reg-meta .naranja { color: var(--o-tx); font-weight: 700; } .reg-meta .verde { color: var(--g); font-weight: 700; }
.reg-acc { display: flex; flex-wrap: wrap; gap: 8px; }
.vacio-box { padding: 28px 16px; text-align: center; color: var(--mut); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.vacio-box .ti { font-size: 32px; color: var(--hint); }
.cargando { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px; color: var(--mut); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--o); animation: giro .6s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

/* Hoja inferior (chat actual) */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity 240ms ease; }
.sheet-card {
  position: relative; width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto;
  padding: 10px 18px calc(18px + var(--safe-b)); border-radius: 22px 22px 0 0; background: var(--bg2);
  border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px;
  transform: translateY(100%); transition: transform 300ms var(--ease-drawer);
}
.sheet.abierta .sheet-scrim { opacity: 1; }
.sheet.abierta .sheet-card { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line2); margin: 0 auto 4px; }
.sheet-t { margin: 0; font: 800 20px var(--font-h); }
.sheet-sub { margin: -8px 0 0; font-size: 14px; color: var(--mut); }
.sheet-actions { display: flex; gap: 10px; margin-top: 4px; }
.sheet-actions .btn { flex: 1; }

/* Aviso flotante */
.toast {
  position: fixed; left: 0; right: 0; top: calc(78px + var(--safe-t)); margin: 0 auto; z-index: 60; display: flex; align-items: center; gap: 8px;
  width: max-content; max-width: min(calc(100vw - 32px), 440px); padding: 12px 16px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line2);
  box-shadow: var(--shadow); font-size: 14px; font-weight: 600;
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 200ms ease, transform 240ms var(--ease-out);
}
.toast .ti { flex: none; font-size: 18px; }
.toast.ver { opacity: 1; transform: none; }
.toast.ok .ti { color: var(--g); } .toast.err .ti { color: var(--r); }

@media (hover: hover) and (pointer: fine) {
  .fila:hover, .check:hover, .chip:hover { border-color: var(--line2); }
  .fila[aria-current="true"]:hover { border-color: var(--o-b); }
  .btn-primary:hover:not(:disabled) { background: #FF9122; }
  .btn-ghost:hover:not(:disabled) { border-color: var(--o-b); }
  .tab:hover { color: var(--tx); }
}

/* ── Tableta: temas + detalle lado a lado ─────────────── */
@media (min-width: 768px) {
  .tabbar { display: none; }
  .stage { display: grid; grid-template-columns: 320px minmax(0,1fr); }
  .panel, .lateral { position: static; inset: auto; min-height: 0; overflow-y: auto; }
  .temas, body[data-screen="detalle"] .temas { transform: none; visibility: visible; transition: none; border-right: 1px solid var(--line); background: var(--bg2); }
  .detalle, body[data-screen="detalle"] .detalle { transform: none; visibility: visible; transition: none; box-shadow: none; }
  .det-back { display: none; }
  .temas-inner { padding: 16px 14px 28px; }
  .det-head { padding: 14px 24px; }
  .det-body { padding: 20px 24px 28px; }
  .det-foot { padding: 12px 24px calc(12px + var(--safe-b)); background: var(--bg); }
  .solo-ancho { display: flex; }
  .toast { top: calc(84px + var(--safe-t)); }
  .sheet { align-items: center; }
  .sheet-card { border-radius: 20px; transform: translateY(16px) scale(.98); opacity: 0; transition: transform 220ms var(--ease-out), opacity 180ms ease; }
  .sheet.abierta .sheet-card { transform: none; opacity: 1; }
  .sheet-grip { display: none; }
}

/* ── Escritorio: + respuestas rápidas a la derecha ────── */
@media (min-width: 1200px) {
  .stage { grid-template-columns: 300px minmax(0,1fr) 360px; }
  .lateral { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-left: 1px solid var(--line); background: var(--bg2); }
  .solo-sin-lateral { display: none !important; }
}

/* La Rumbera personalizada (2026-11-26) */
.envia.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rum-sw { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rum-sw button { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line2); color: var(--tx); font-size: 14px; font-weight: 600; text-align: left; transition: background-color 160ms ease, border-color 160ms ease; }
.rum-sw button[aria-pressed="true"] { background: var(--o-dim); border-color: var(--o-b); color: var(--o-tx); }
.rum-c { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--ban); box-shadow: inset 0 -5px 0 var(--fil), inset 0 0 0 1px rgba(255,255,255,.18); }
.rum-file { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); }
.rum-thumb { flex: none; width: 56px; height: 56px; border-radius: 10px; display: grid; place-items: center; color: #8A8F9C; font-size: 22px;
  background: #EEF0F4 center / contain no-repeat; border: 1px solid var(--line); }
.rum-file-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rum-file-t { font-weight: 600; font-size: 15px; }
.rum-file-t em { font-style: normal; font-weight: 500; color: var(--hint); font-size: 13px; }
.rum-file-s { font-size: 13px; color: var(--mut); overflow-wrap: anywhere; }
.rum-subir { flex: none; cursor: pointer; }
.rum-subir:focus-within { outline: 2px solid var(--o); outline-offset: 2px; }
/* fondo claro fijo en los dos temas: la Rumbera negra no se pierde y se ve como impresa */
.rum-prev { position: relative; border-radius: 16px; background: #EEF0F4; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.rum-prev canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.rum-prev .cargando, .rum-prev .vacio-box { color: #5C5F6B; }
@media (min-width: 560px) { .rum-sw { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  .temas, .detalle, body[data-screen="detalle"] .detalle, body[data-screen="detalle"] .temas,
  .sheet-card, .toast, .prog-bar i, .check-box .ti { transition-property: opacity, visibility, background-color, border-color, color !important; }
  body[data-screen="detalle"] .temas { transform: none; }
  .press:active { transform: none; }
}
