/* Portal Vifer v3 · pase 30: la TERMINAL. Densa, negra, codigos en ambar y cifras en cian: un terminal de mercado
   con la operacion del cliente. Solo transform/opacity animados; reduced-motion apaga todo. */

.tm { gap: 12px; }
.tm-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.tm-top__l, .tm-top__r { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.tm-title { margin: 0; font-family: var(--font-body); font-weight: 700; font-size: clamp(26px, 3vw, 34px); line-height: 1; letter-spacing: -0.02em; }
.tm-live { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid rgba(77, 213, 153, 0.35); border-radius: var(--r-pill); color: var(--success); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.tm-live__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: tm-blink 1.6s ease-in-out infinite; }
@keyframes tm-blink { 50% { opacity: 0.25; } }
.tm-seal { padding: 3px 9px; border: 1px solid rgba(240, 179, 74, 0.4); border-radius: 4px; color: var(--warning); font-size: 11px; letter-spacing: 0.12em; }
.tm-clock { color: var(--warning); font-size: 13px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.tm-help { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

/* Linea de comandos */
.tm-cmd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 10px; padding: 8px 10px; border: 1px solid var(--border-mid); border-radius: 8px; background: var(--surface-1); }
.tm-cmd__p { color: var(--warning); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.tm-cmd__in { min-width: 0; padding: 6px 4px; border: 0; background: transparent; color: var(--cyan-bright); font-size: 14px; text-transform: uppercase; caret-color: var(--warning); }
.tm-cmd__in::placeholder { color: var(--fg-dim); text-transform: none; }
.tm-cmd__in:focus { outline: none; }
.tm-cmd:focus-within { border-color: var(--border-cyan-strong); box-shadow: 0 0 0 3px var(--cyan-tint-12); }
.tm-cmd__go { padding: 6px 14px; border: 0; border-radius: 4px; background: var(--warning); color: #140d00; font-weight: 700; font-size: 12.5px; letter-spacing: 0.08em; cursor: pointer; }
.tm-cmd__go:hover, .tm-cmd__go:focus-visible { background: #ffc766; }
.tm-cmd__msg { grid-column: 1 / -1; min-height: 0; color: var(--fg-muted); font-size: 12px; }
.tm-cmd__msg:empty { display: none; }

/* Teclas de funcion */
.tm-keys { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tm-key { display: inline-flex; flex: none; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--border-subtle); border-radius: 5px; background: var(--surface-1); color: var(--fg-muted); font-size: 12px; cursor: pointer; transition: transform 0.15s var(--ease-out), border-color 0.15s, color 0.15s; }
.tm-key b { color: var(--warning); font-weight: 600; }
.tm-key:hover, .tm-key:focus-visible { border-color: var(--border-cyan); color: var(--fg); transform: translateY(-1px); }
.tm-key:active { transform: translateY(0); }

/* Rejilla de paneles: 12 columnas, cada panel con su sitio */
.tm-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
.tp { position: relative; grid-column: span 12; min-width: 0; display: grid; align-content: start; gap: 8px; padding: 12px 14px 14px; border: 1px solid var(--border-subtle); border-radius: 8px; background: linear-gradient(180deg, #0a0d12, #07090c); scroll-margin-top: calc(var(--top-h) + 40px); }
.tp:focus { outline: none; }
.tp:focus-visible { box-shadow: 0 0 0 2px var(--border-cyan-strong); }
.tp::after { content: ""; position: absolute; inset: -1px; border: 1px solid var(--warning); border-radius: 8px; opacity: 0; pointer-events: none; }
.tp.is-hot::after { animation: tm-hot 1.4s var(--ease-out); }
@keyframes tm-hot { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }
.tp__h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tp__code { flex: none; padding: 2px 6px; border-radius: 3px; background: rgba(240, 179, 74, 0.14); color: var(--warning); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; }
.tp__t { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.tp__h > :last-child:not(.tp__t) { flex: none; margin-left: auto; font-size: 11.5px; }
.tp__s { margin: 0; color: var(--fg-muted); font-size: 12.5px; line-height: 1.45; max-width: 92ch; }
.tp__foot { margin: 6px 0 0; color: var(--fg-muted); font-size: 13px; }
.tm-dim { color: var(--fg-dim); }
.tm-scroll { min-width: 0; overflow-x: auto; }
.tm-big { margin: 0; font-size: clamp(28px, 3vw, 40px); color: var(--success); font-weight: 600; letter-spacing: -0.02em; }

@media (min-width: 1100px) {
  .tp--oper, .tp--kpi { grid-column: span 12; }
  .tp--kpi .tm-watch { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tp--emb, .tp--cint, .tp--anom { grid-column: span 4; }
  .tp--can, .tp--tema, .tp--mat, .tp--prev { grid-column: span 6; }
  .tp--din, .tp--val { grid-column: span 6; } .tp--sis, .tp--alr { grid-column: span 12; }
}
@media (min-width: 760px) and (max-width: 1099px) {
  .tp--kpi, .tp--emb, .tp--cint, .tp--anom, .tp--can, .tp--tema, .tp--din, .tp--sis { grid-column: span 6; }
}

/* Indices */
.tm-idx { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none; border: 1px solid var(--border-subtle); border-radius: 6px; overflow: hidden; background: var(--border-subtle); }
.tm-idx__i { display: grid; gap: 3px; padding: 10px 12px; background: var(--surface-1); }
.tm-idx__k { color: var(--fg-muted); font-size: 11px; letter-spacing: 0.08em; }
.tm-idx__v { color: var(--cyan-bright); font-size: 24px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tm-idx__d { min-height: 18px; font-size: 12px; }
.tm-idx__i .spark { width: 100%; }

/* Operacion: recurso x franja */
.tm-op { display: grid; gap: 3px; min-width: max-content; }
.tm-op__r { display: grid; grid-template-columns: 96px repeat(var(--cols), minmax(30px, 1fr)) 48px; gap: 3px; align-items: center; }
.tm-op__hd::after { content: ""; }
.tm-op__pc { color: var(--cyan-bright); font-size: 11.5px; text-align: right; }
.tm-op__pc.is-total { color: var(--warning); font-weight: 700; }
.tm-op__ft { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-subtle); }
.tm-op__bar { display: grid; gap: 3px; justify-items: center; font-size: 10.5px; color: var(--fg-muted); }
.tm-op__bf { display: block; width: 100%; height: 26px; border-radius: 2px; background: rgba(0, 194, 209, 0.5); transform-origin: bottom; transform: scaleY(var(--p, 0)); }
.tm-op__n { color: var(--fg-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-op__col { color: var(--fg-dim); font-size: 10.5px; text-align: center; white-space: nowrap; }
.tm-cell { display: inline-block; height: 22px; min-width: 14px; border-radius: 3px; background: rgba(var(--ink-rgb), 0.05); border: 1px solid rgba(var(--ink-rgb), 0.06); }
.tm-op .tm-cell { display: block; }
.tm-cell.is-booked { background: rgba(122, 140, 170, 0.45); border-color: transparent; }
.tm-cell.is-vifer { background: var(--cyan); border-color: transparent; }
.tm-cell.is-refill { background: var(--success); border-color: transparent; box-shadow: 0 0 10px rgba(77, 213, 153, 0.45); }
.tm-cell.is-pending { background: transparent; border: 1px dashed var(--warning); }
.tm-cell.is-past { opacity: 0.55; }
.tm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--fg-muted); font-size: 12.5px; }
.tm-legend li { display: inline-flex; align-items: center; gap: 7px; }
.tm-legend .tm-cell { width: 14px; height: 14px; }
.tm-legend b { color: var(--fg); }

/* Cuatro cifras */
.tm-watch { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tm-watch__i { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 10px; border: 1px solid var(--border-subtle); border-radius: 6px; background: var(--surface-1); }
.tm-watch__k { color: var(--fg-muted); font-size: 12.5px; }
.tm-watch__v { grid-row: span 2; align-self: center; color: var(--cyan-bright); font-size: 22px; font-weight: 600; }
.tm-watch__b { color: var(--fg-dim); font-size: 11.5px; }
.tm-watch__i .tm-lift { grid-column: 1 / -1; width: 100%; height: 44px; }
.tm-lift__pre { fill: rgba(var(--ink-rgb), 0.05); }
.tm-lift__before { stroke: var(--fg-dim); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.tm-lift__live { stroke: var(--warning); stroke-width: 1.2; vector-effect: non-scaling-stroke; }

/* Embudo */
.tm-fun { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.tm-fun__i { display: grid; grid-template-columns: minmax(80px, 30%) minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; font-size: 13px; }
.tm-fun__l { color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-fun__track { height: 12px; border-radius: 2px; background: rgba(var(--ink-rgb), 0.05); overflow: hidden; }
.tm-fun__bar { display: block; height: 100%; background: rgba(122, 140, 170, 0.6); transform-origin: left; transform: scaleX(var(--p, 0)); animation: tm-grow 0.8s var(--ease-out); }
.tm-fun__i.is-vifer .tm-fun__bar { background: var(--cyan); }
.tm-fun__i.is-vifer .tm-fun__l { color: var(--cyan-bright); }
.tm-fun__i > .mono:last-child { text-align: right; }
@keyframes tm-grow { from { transform: scaleX(0); } }

/* Cinta */
.tm-tape { display: grid; margin: 0; padding: 0; list-style: none; max-height: 330px; overflow-y: auto; font-size: 12px; border-top: 1px solid var(--border-subtle); }
.tm-tape__r { display: grid; grid-template-columns: 40px 34px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 4px 2px; border-bottom: 1px solid rgba(var(--ink-rgb), 0.04); }
.tm-tape__r.is-new { animation: tm-in 0.6s var(--ease-out); background: rgba(0, 194, 209, 0.06); }
@keyframes tm-in { from { opacity: 0; transform: translateY(-6px); } }
.tm-tape__t { color: var(--fg-dim); }
.tm-tape__c { font-weight: 700; color: var(--success); }
.is-handoff .tm-tape__c, .is-retry .tm-tape__c, .is-alert .tm-tape__c { color: var(--warning); }
.is-fail .tm-tape__c, .is-drop .tm-tape__c { color: var(--danger); }
.tm-tape__w { min-width: 0; overflow: hidden; color: var(--fg-muted); text-decoration: none; white-space: nowrap; text-overflow: ellipsis; }
.tm-tape__w b { color: var(--fg); font-weight: 500; }
.tm-tape__w:hover, .tm-tape__w:focus-visible { color: var(--cyan-bright); }
.tm-tape__ms { color: var(--cyan); text-align: right; }

/* Anomalias */
.tm-anom { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tm-anom__i { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; padding: 8px 10px; border-left: 3px solid var(--fg-dim); border-radius: 0 6px 6px 0; background: var(--surface-1); font-size: 13px; color: var(--fg-muted); }
.tm-anom__h { color: var(--fg); }
.tm-anom__z { color: var(--fg); }
.tm-anom__s { grid-column: 2 / -1; font-size: 10.5px; letter-spacing: 0.1em; color: var(--fg-dim); }
.tm-anom__i.is-hi { border-left-color: var(--danger); } .tm-anom__i.is-hi .tm-anom__z, .tm-anom__i.is-hi .tm-anom__s { color: var(--danger); }
.tm-anom__i.is-mid { border-left-color: var(--warning); } .tm-anom__i.is-mid .tm-anom__z, .tm-anom__i.is-mid .tm-anom__s { color: var(--warning); }

/* Tablas densas */
.tm-tbl { font-size: 13px; }
.tm-tbl th { padding: 6px 8px; color: var(--fg-dim); font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; cursor: help; }
.tm-tbl td { padding: 7px 8px; white-space: nowrap; }
.tm-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tm-tbl td.is-bad { color: var(--danger); }
.tm-tbl tbody tr:hover { background: rgba(0, 194, 209, 0.04); }
.tm-pc { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; }
.tm-pc:hover b, .tm-pc:focus-visible b { color: var(--cyan-bright); }
.tm-pc .tm-dim { font-size: 11.5px; }
.tm-bud, .tm-share { display: inline-block; width: 70px; height: 7px; border-radius: 2px; background: rgba(var(--ink-rgb), 0.07); overflow: hidden; vertical-align: middle; }
.tm-bud__f, .tm-share__f { display: block; height: 100%; background: var(--success); transform-origin: left; transform: scaleX(var(--p, 0)); }
.tm-share__f { background: var(--cyan); }

/* Temas */
.tm-mov { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tm-mov__i { display: grid; grid-template-columns: minmax(0, 1fr) 50px 64px 90px; gap: 10px; align-items: center; font-size: 13px; }
.tm-mov__t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--fg); }
.tm-mov__i > b { text-align: right; }
.tm-sent { position: relative; height: 7px; border-radius: 2px; background: rgba(var(--ink-rgb), 0.07); overflow: hidden; }
.tm-sent__p, .tm-sent__n { position: absolute; inset: 0; transform: scaleX(var(--p, 0)); }
.tm-sent__p { background: var(--success); transform-origin: left; }
.tm-sent__n { background: var(--danger); transform-origin: right; }

/* Prevision */
.tm-band__area { fill: rgba(0, 194, 209, 0.14); }
.tm-band__hist { fill: none; stroke: var(--cyan); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.tm-band__fut { fill: none; stroke: var(--cyan-bright); stroke-width: 2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.tm-band__now { stroke: var(--warning); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.tm-band__dot { fill: var(--cyan-bright); }
.tm-band__lbl { fill: var(--warning); }

/* Sistemas */
.tm-sys { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 20px; }
.tm-sys__l { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.tm-sys__l li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(var(--ink-rgb), 0.05); }
.tm-sys__l li > b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.tm-sys__l li:not(:has(.int__dot)) { grid-template-columns: minmax(0, 1fr) auto auto; }

/* Resumen: acciones de la cabecera */
.cc-head__acts { justify-content: flex-end; gap: 8px; }

@media (max-width: 640px) {
  .tm-cmd__p { display: none; }
  .tm-cmd { grid-template-columns: minmax(0, 1fr) auto; }
  .tm-fun__i { grid-template-columns: minmax(70px, 34%) minmax(0, 1fr) auto; }
  .tm-fun__i > .mono:last-child { display: none; }
  .tm-mov__i { grid-template-columns: minmax(0, 1fr) 40px 60px; }
  .tm-mov__i .tm-sent { display: none; }
  .tm-tape__r { grid-template-columns: 38px 30px minmax(0, 1fr); }
  .tm-tape__ms { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-live__dot, .tp.is-hot::after, .tm-fun__bar, .tm-tape__r.is-new { animation: none; }
  .tm-key { transition: none; }
}

/* Sectores por noches (hoteles, residencias): 14 columnas mas estrechas para que quepa la ocupacion */
.tm-op.is-night .tm-op__r { grid-template-columns: 104px repeat(var(--cols), minmax(22px, 1fr)) 42px; }

/* ---- Hito 2: la terminal que actua ---- */
.tm-grid { align-items: start; grid-auto-flow: row dense; }
.app:has(.tm) .ai-fab { display: none; }

@media (min-width: 760px) and (max-width: 1099px) { .tp--alr, .tp--val { grid-column: span 12; } }

/* Huecos que se pulsan y la vista de 7 dias */
.tm-op button.tm-cell { width: 100%; padding: 0; font: inherit; cursor: pointer; transition: transform 0.15s var(--ease-out); }
.tm-op button.tm-cell:hover { transform: scale(1.08); }
.tm-op button.tm-cell:focus-visible { outline: 2px solid var(--warning); outline-offset: 1px; }
.tm-cell.is-lvl { background: rgba(0, 194, 209, calc(0.08 + var(--v, 0) * 0.82)); border-color: transparent; }
.tm-pend ul { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.tm-pend__i { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; width: 100%; padding: 7px 10px; border: 1px dashed rgba(240, 179, 74, 0.45); border-radius: 6px; background: rgba(240, 179, 74, 0.05); color: var(--fg); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.tm-pend__i:hover, .tm-pend__i:focus-visible { border-style: solid; background: rgba(240, 179, 74, 0.1); }
.tm-pend__go { color: var(--warning); font-size: 12px; }

/* Objetivo de cada indice */
.tm-idx__d { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tm-goal { padding: 1px 6px; border-radius: 3px; font-size: 10.5px; }
.tm-goal.is-met { background: rgba(77, 213, 153, 0.12); color: var(--success); }
.tm-goal.is-miss { background: rgba(240, 179, 74, 0.14); color: var(--warning); }

/* Anomalias y piezas que se pulsan */
.tm-anom > li { list-style: none; }
.tm-anom button.tm-anom__i { width: 100%; border: 0; border-left: 3px solid var(--fg-dim); font: inherit; font-size: 13px; text-align: left; cursor: pointer; transition: background-color 0.15s; }
.tm-anom button.tm-anom__i:hover, .tm-anom button.tm-anom__i:focus-visible { background: var(--surface-2); }
.tm-anom button.tm-anom__i.is-hi { border-left-color: var(--danger); } .tm-anom button.tm-anom__i.is-mid { border-left-color: var(--warning); }
button.tm-pc { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }

/* Detalle lateral */
.tm-dr__t { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; line-height: 1.25; }
.tm-dr__t .tm-cell { width: 18px; height: 18px; flex: none; }
.tm-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; }
.tm-dl > div { padding: 8px 10px; border: 1px solid var(--border-subtle); border-radius: 6px; background: var(--surface-1); }
.tm-dl dt { color: var(--fg-dim); font-size: 11.5px; }
.tm-dl dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: 14px; color: var(--fg); }
.tm-dr__ev { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.tm-dr__ev li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(var(--ink-rgb), 0.05); }
.tm-dr__ev a { min-width: 0; overflow: hidden; color: var(--fg-muted); text-decoration: none; white-space: nowrap; text-overflow: ellipsis; }
.tm-dr__ev a:hover, .tm-dr__ev a:focus-visible { color: var(--cyan-bright); }

/* Alertas */
.tm-al td { vertical-align: middle; }
.tm-al__th { width: 64px; padding: 4px 6px; }
.tm-al select.input { min-width: 112px; padding: 4px 8px; font-size: 13px; }
.tm-al__h { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.tm-al__i { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 8px; border-left: 3px solid var(--warning); border-radius: 0 6px 6px 0; background: var(--surface-1); }
.tm-al__i.is-ack { border-left-color: var(--cyan); } .tm-al__i.is-resolved { border-left-color: var(--fg-dim); color: var(--fg-muted); }
.tm-warn { color: var(--warning); }

/* Cinta en dos lineas: la pieza y, debajo, quien y que */
.tm-tape__r { align-items: start; }
.tm-tape__w { display: grid; }
.tm-tape__w b, .tm-tape__d { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tm-tape__d { color: var(--fg-dim); font-size: 11.5px; }

/* Leyenda de tono */
.tm-legend--tone { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--fg-dim); font-size: 11.5px; }
.tm-sw { display: inline-block; width: 10px; height: 6px; border-radius: 1px; }
.tm-sw.is-pos { background: var(--success); } .tm-sw.is-neg { background: var(--danger); margin-left: 6px; }

@media (max-width: 640px) {
  .tm-scroll { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tm-pend__i { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .tm-pend__i > .tm-dim { display: none; }
  .tm-al__i { grid-template-columns: minmax(0, 1fr) auto; }
  .tm-al__i > .mono { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .tm-op button.tm-cell { transition: none; } .tm-op button.tm-cell:hover { transform: none; } }

/* DIN: cada formula con su resultado */
.tm-din { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tm-din li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 8px 10px; border: 1px solid var(--border-subtle); border-radius: 6px; background: var(--surface-1); }
.tm-din__k { grid-column: 1 / -1; color: var(--fg-muted); font-size: 13px; }
.tm-din__f { color: var(--fg); font-size: 13px; overflow-wrap: anywhere; }
.tm-din__v { color: var(--success); font-size: 15px; text-align: right; white-space: nowrap; }
/* Dia cerrado en la vista de 7 dias */
.tm-cell.is-closed { background: repeating-linear-gradient(135deg, rgba(var(--ink-rgb), 0.06) 0 4px, transparent 4px 8px); border-color: rgba(var(--ink-rgb), 0.06); }
/* Nota y asignacion de un hueco */
.tm-note { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--border-subtle); border-radius: 8px; }
.tm-note .btn { justify-self: start; }

/* Cerrado en 7 dias y resumen de anomalias */
.tm-cell.is-closed { display: flex; align-items: center; justify-content: center; overflow: hidden; background: repeating-linear-gradient(135deg, rgba(var(--ink-rgb), 0.12) 0 3px, transparent 3px 7px); color: var(--fg-muted); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.tm-anom__sum { margin: 0; padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.tm-anom__sum.is-calm { background: rgba(77, 213, 153, 0.08); color: var(--success); }
.tm-anom__sum.is-alert { background: rgba(239, 107, 107, 0.1); color: var(--danger); }
/* Movil: lo de la derecha de cada cabecera de panel baja a su propia linea */
@media (max-width: 640px) {
  .tp__h { flex-wrap: wrap; }
  .tp__h > :last-child:not(.tp__t) { flex: 1 1 100%; margin-left: 0; }
  .tp__h .row { flex-wrap: wrap; gap: 6px 10px; }
}

/* Vista experta en claro: la linea de comandos se lee sobre blanco */
.tm-cmd__go { color: var(--fg-on-cyan); }
