/* Tótem de la báscula · panel de la oficina (Residuos → Planificación) y aviso flotante.
   Con los tonos de Arc del ERP (--fc-*, --arc-*): vale en claro y en negro. */

.tto-panel { margin: 0 0 18px; padding: 14px; border: 1px solid var(--fc-border, #e6e6e6); border-radius: 22px; background: var(--arc-tray, #f7f7f7); }
.tto-cab { display: flex; align-items: center; gap: 12px; padding: 2px 4px 12px; }
.tto-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--fc-card, #fff); border: 1px solid var(--fc-border, #e6e6e6); color: var(--fc-ink, #111); flex: none; }
.tto-tit { flex: 1; min-width: 0; }
.tto-tit h2 { margin: 0; font-family: var(--arc-display, inherit); font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--fc-ink, #111); }
.tto-tit p { margin: 1px 0 0; font-size: 12.5px; color: var(--fc-muted, #666); }
.tto-vivo { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--fc-muted, #666); }
.tto-vivo i { width: 8px; height: 8px; border-radius: 50%; background: oklch(62% .16 150); box-shadow: 0 0 0 4px oklch(62% .16 150 / .16); animation: tto-vivo 2s ease-in-out infinite; }
@keyframes tto-vivo { 50% { box-shadow: 0 0 0 7px oklch(62% .16 150 / .05); } }
.tto-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }

.tto-op { display: grid; gap: 8px; padding: 14px 14px 12px; border-radius: 16px; background: var(--fc-card, #fff); box-shadow: 0 1px 2px oklch(0% 0 0 / .06), 0 0 0 1px oklch(0% 0 0 / .04); }
.tto-op-espera { box-shadow: 0 0 0 2px oklch(72% .16 70 / .75), 0 8px 18px -10px oklch(72% .16 70 / .55); }
.tto-op-ayuda { box-shadow: 0 0 0 2px oklch(58% .2 25 / .85), 0 8px 18px -10px oklch(58% .2 25 / .55); animation: tto-ayuda 1.4s ease-in-out infinite; }
@keyframes tto-ayuda { 50% { box-shadow: 0 0 0 4px oklch(58% .2 25 / .35), 0 8px 18px -10px oklch(58% .2 25 / .55); } }
.tto-op-fin { opacity: .72; }
.tto-op-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tto-mat { padding: 3px 10px; border: 2px solid var(--fc-ink, #111); border-radius: 8px; font-family: var(--arc-display, inherit); font-weight: 600; font-size: 15px; letter-spacing: .08em; color: var(--fc-ink, #111); background: var(--fc-card, #fff); }
.tto-paso { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--arc-tray, #f4f4f4); color: var(--fc-ink, #111); border: 1px solid var(--fc-border, #e6e6e6); }
.tto-paso i { width: 7px; height: 7px; border-radius: 50%; background: var(--fc-muted, #888); }
.tto-paso[data-tono="aviso"] { background: oklch(72% .16 70 / .14); border-color: transparent; color: oklch(45% .12 65); }
.tto-paso[data-tono="aviso"] i { background: oklch(72% .16 70); }
.tto-paso[data-tono="ok"] { background: oklch(62% .16 150 / .13); border-color: transparent; color: oklch(42% .12 150); }
.tto-paso[data-tono="ok"] i { background: oklch(62% .16 150); }
.tto-paso[data-tono="mal"] { background: oklch(58% .2 25 / .12); border-color: transparent; color: oklch(48% .18 25); }
.tto-paso[data-tono="mal"] i { background: oklch(58% .2 25); }
.tto-paso[data-tono="curso"] i { background: oklch(52% .12 255); }
html[data-theme="dark"] .tto-paso[data-tono="aviso"] { color: oklch(84% .14 75); }
html[data-theme="dark"] .tto-paso[data-tono="ok"] { color: oklch(80% .15 150); }
html[data-theme="dark"] .tto-paso[data-tono="mal"] { color: oklch(78% .17 25); }
.tto-alerta { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; background: oklch(58% .2 25); color: #fff; font-size: 12px; font-weight: 700; }
.tto-nuevos { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; background: var(--fc-ink, #111); color: var(--fc-card, #fff); font-size: 11.5px; font-weight: 600; }
.tto-hora { margin-left: auto; font-size: 12px; color: var(--fc-muted, #666); font-variant-numeric: tabular-nums; }
.tto-op-cuerpo { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; color: var(--fc-muted, #666); }
.tto-plan { margin: 0; width: 100%; font-size: 13.5px; color: var(--fc-ink, #111); }
.tto-sin { color: oklch(52% .14 65); font-weight: 600; }
html[data-theme="dark"] .tto-sin { color: oklch(84% .14 75); }
.tto-ler { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--fc-ink, #111); color: var(--fc-card, #fff); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tto-pesos { font-variant-numeric: tabular-nums; }
.tto-pesos b { color: var(--fc-ink, #111); }
.tto-motivo { width: 100%; color: oklch(50% .18 25); }
.tto-ultimo { margin: 0; padding: 7px 10px; border-radius: 10px; background: var(--arc-tray, #f6f6f6); font-size: 13px; color: var(--fc-ink, #111); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tto-ultimo span { margin-right: 7px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--fc-muted, #666); }
.tto-ultimo-totem { background: oklch(72% .16 70 / .12); }
.tto-op-acc { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Ficha ---------- */
.tto-ventana { max-width: 760px; }
.tto-v-cuerpo, #tto-v-estado { display: grid; gap: 14px; }
.tto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tto-fotos-lista { display: flex; gap: 8px; flex-wrap: wrap; }
.tto-foto { display: block; width: 104px; height: 78px; border-radius: 10px; overflow: hidden; border: 1px solid var(--fc-border, #e6e6e6); background: var(--arc-tray, #f4f4f4); }
.tto-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tto-asignar label, .tto-extra label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--fc-muted, #666); }
.tto-asignar-fila { display: flex; gap: 8px; flex-wrap: wrap; }
.tto-asignar-fila select { flex: 1 1 260px; min-width: 0; }
.tto-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tto-faltan { padding: 10px 14px; border-radius: 12px; background: oklch(72% .16 70 / .12); font-size: 13px; color: var(--fc-ink, #111); }
.tto-faltan ul { margin: 6px 0 0; padding-left: 18px; }
.tto-faltan-mal { background: oklch(58% .2 25 / .1); }
.tto-v-chat { display: grid; gap: 8px; }
.tto-hilo { display: grid; gap: 6px; max-height: 240px; overflow-y: auto; padding: 10px; border-radius: 14px; background: var(--arc-tray, #f6f6f6); border: 1px solid var(--fc-border, #e6e6e6); }
.tto-m { margin: 0; max-width: 85%; padding: 7px 11px; border-radius: 12px; background: var(--fc-card, #fff); font-size: 13.5px; color: var(--fc-ink, #111); box-shadow: 0 1px 1px oklch(0% 0 0 / .05); }
.tto-m span { display: block; font-size: 11px; color: var(--fc-muted, #666); margin-bottom: 2px; }
.tto-hilo .tto-m-oficina { justify-self: end; background: #1c1c1c; color: #fff; }
.tto-hilo .tto-m-oficina span { color: rgb(255 255 255 / .7); }
.tto-m-sistema { justify-self: center; max-width: 100%; background: transparent; box-shadow: none; color: var(--fc-muted, #666); font-size: 12.5px; text-align: center; }
.tto-m-nada { justify-self: center; background: transparent; box-shadow: none; color: var(--fc-muted, #666); }
.tto-rapidos { display: flex; gap: 6px; flex-wrap: wrap; }
.tto-escribir { display: flex; gap: 8px; }
.tto-escribir input { flex: 1; min-width: 0; }
.tto-v-acc { flex-wrap: wrap; gap: 8px; }
.tto-motivo-capa { z-index: 2000; }
.tto-motivo-txt { margin: 0 0 10px; color: var(--fc-muted, #666); font-size: 13.5px; }
.tto-campo-mal { border-color: oklch(58% .2 25) !important; }

/* ---------- Aviso flotante (cualquier pantalla) y número en el menú ---------- */
.tto-flotante { position: fixed; z-index: 90; /* bajo las ventanas del ERP (.modal, 100): nunca tapa sus botones */ right: 20px; bottom: 20px; display: flex; align-items: center; gap: 12px; max-width: min(520px, calc(100vw - 40px)); padding: 12px 12px 12px 16px; border-radius: 18px; background: var(--fc-card, #fff); color: var(--fc-ink, #111); box-shadow: 0 18px 40px -12px oklch(0% 0 0 / .35), 0 0 0 1px oklch(0% 0 0 / .06); font-size: 14px; animation: tto-flota 260ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes tto-flota { from { opacity: 0; transform: translateY(12px); } }
.tto-f-ico { width: 12px; height: 12px; border-radius: 50%; flex: none; background: oklch(72% .16 70); box-shadow: 0 0 0 5px oklch(72% .16 70 / .2); }
.tto-flotante[data-tono="mal"] .tto-f-ico { background: oklch(58% .2 25); box-shadow: 0 0 0 5px oklch(58% .2 25 / .2); }
.tto-f-txt { flex: 1; min-width: 0; font-weight: 500; }
.tto-f-x { width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: var(--fc-muted, #666); font-size: 20px; cursor: pointer; }
.nav-item .tto-nav-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; border-radius: 999px; background: oklch(58% .2 25); color: #fff; font-size: 11.5px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .tto-op-ayuda, .tto-vivo i, .tto-flotante { animation: none; } }
@media (max-width: 720px) { .tto-lista { grid-template-columns: 1fr; } .tto-grid { grid-template-columns: 1fr; } }
