/* Revisión de incidencias en el tiempo: mapa con reproductor, ficha, avisos, cronología y registro en directo. */
body.rev { display: flex; flex-direction: column; }
.topbar .brand { text-decoration: none; color: inherit; }
.rev-badge { margin-right: auto; cursor: help; }
.rev-badge.rev-hist { background: rgba(143, 142, 134, .14); color: var(--text-secondary); border-color: rgba(143, 142, 134, .45); }
.top-right { margin-left: auto; }

.rev-bar { gap: 12px; }
.rev-bar input[type="datetime-local"] { background: var(--surface-1); color: var(--text-primary); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 13px; color-scheme: dark; }
.rev-id { cursor: default; }
.rev-id small { margin-left: 2px; }
.rev-note { font-size: 12px; max-width: 640px; }

.rev-empty { margin: 10px 18px; padding: 16px 20px; max-width: 880px; color: var(--text-secondary); }
.rev-empty h2 { margin: 0 0 8px; font-size: 16px; color: var(--text-primary); }
.rev-empty ul { margin: 0 0 10px; padding-left: 20px; }
.rev-status { margin: 10px 18px; padding: 12px 16px; border-radius: 8px; background: var(--surface-1); border: 1px solid var(--border); color: var(--text-secondary); }
.rev-status.error { border-color: rgba(208, 59, 59, .6); color: #f08a8a; }

.rev-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 12px; padding: 0 18px 14px; align-items: start; }
.rev-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rev-map-panel { position: relative; height: 58vh; min-height: 360px; overflow: hidden; }
#rmap { position: absolute; inset: 0; background: #121315; }
#rmap.zoom-hi .tm-lbl, .tm.focus .tm-lbl { display: block; }
.tm.focus .tm-svg { transform: rotate(var(--rot, 0deg)) scale(1.35); }

.rev-player { display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
.rev-play { min-width: 44px; font-size: 14px; }
.rev-speed { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border); border-radius: 8px; padding: 5px 6px; font: inherit; }
.rev-slider { flex: 1 1 220px; accent-color: var(--accent); min-width: 160px; }
.rev-time { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; font-variant-numeric: tabular-nums; min-width: 82px; }
.rev-time b { font-size: 16px; }
.rev-time small { color: var(--text-muted); font-size: 11.5px; }

.rev-chart-card { padding: 10px 12px; }
.rev-chart { height: 170px; }
.rev-chart .rev-ref-lbl { fill: var(--text-muted); font-size: 10.5px; }
.rev-chart-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; }
.rev-legend { position: absolute; right: 12px; top: 0; display: flex; gap: 12px; font-size: 11.5px; color: var(--text-secondary); }
.rev-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rev-legend i { width: 12px; height: 3px; border-radius: 2px; }

.rev-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; position: sticky; top: 64px; max-height: calc(100vh - 76px); overflow-y: auto; }
.rev-card { padding: 12px 14px; }
.rev-card-head { display: flex; gap: 10px; align-items: flex-start; }
.rev-card-head .ico { width: 24px; height: 24px; }
.rev-card-head h2 { margin: 2px 0 6px; font-size: 15px; line-height: 1.3; }
.rev-detail { color: var(--text-secondary); margin: 0 0 10px; font-size: 12.5px; }
.rev-card .facts { margin-bottom: 0; }
.rev-card .facts dd { white-space: normal; }
.rev-box { display: flex; flex-direction: column; min-height: 0; }
.rev-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.rev-list .alert { cursor: pointer; }
.rev-list .alert.rev-key { box-shadow: inset 0 0 0 1px var(--sev); }
.rev-timeline { gap: 2px; position: relative; }
.rev-pre { border-bottom: 1px solid var(--border); padding-bottom: 4px; margin-bottom: 4px; }
.rev-pre summary { cursor: pointer; color: var(--text-muted); font-size: 12px; padding: 4px 6px; }
.panel-head h2 small { font-weight: 400; margin-left: 4px; }
.rev-ev { display: grid; grid-template-columns: 58px 84px 1fr; gap: 8px; align-items: baseline; width: 100%; text-align: left; border: 0; border-left: 3px solid transparent; background: transparent; padding: 5px 6px; border-radius: 4px; cursor: pointer; font-size: 12px; color: var(--text-secondary); }
.rev-ev:hover { background: var(--surface-2); }
.rev-ev time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rev-ev.mine { border-left-color: var(--sev); color: var(--text-primary); }
.rev-ev.future { opacity: .45; }
.rev-ev.now { background: var(--accent-soft); }
.rev-ev-t { min-width: 0; }
.rev-kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-secondary); }
.rev-kind.k-open { color: var(--text-primary); }
.rev-kind.k-escalate { color: #f08a8a; }
.rev-kind.k-resolve { color: #3fbf3f; }
.rev-kind.k-active { color: var(--text-muted); }
.rev-kind.k-discard { color: var(--text-muted); }
.rev-live { margin: 8px 12px 12px; max-height: 220px; overflow-y: auto; }
.rev-live li.future { opacity: .45; }
.rev-toast-time { color: var(--text-muted); }

@media (max-width: 1100px) {
  .rev-grid { grid-template-columns: minmax(0, 1fr); }
  .rev-side { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .rev-grid, .rev-bar { padding-left: 12px; padding-right: 12px; }
  .rev-map-panel { height: 48vh; }
  .rev-badge { display: none; }
}
/* casos de seguridad guardados */
.rev-case { margin: 0 18px 10px; padding: 10px 14px; }
.rev-case p { margin: 4px 0; font-size: 13px; }
.rev-case-head { display: flex; gap: 10px; align-items: center; }
.rev-cases { display: grid; gap: 8px; margin: 8px 0 12px; }
.rev-case-item { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); text-decoration: none; background: var(--surface-2); }
.rev-case-item:hover { border-color: var(--accent); }
.rev-case-item span { color: var(--text-secondary); font-size: 12.5px; }
.rev-case-item small { color: var(--text-muted); }
.rev-case-item.off { opacity: .6; cursor: default; }
/* aviso público de un caso delicado (recreación de Urda) */
.rev-case-aviso { border-left: 3px solid #8fa3bf; background: rgba(143, 163, 191, .10); padding: 6px 10px; border-radius: 4px; color: var(--text-primary) !important; }
.rev-case .rev-case-aviso { margin: 8px 0; }
@media (max-width: 640px) {
  .rev-case { margin: 0 12px 10px; padding: 10px 12px; }
  .rev-case-head { flex-wrap: wrap; gap: 6px; }
  .rev-empty { margin: 10px 12px; padding: 14px; }
  .rev-bar .scope { flex: 1 1 100%; min-width: 0; }
  .rev-bar .scope input, .rev-bar .scope select { flex: 1 1 0; width: 100%; min-width: 0; max-width: none; }
  .rev-player .btn { min-height: 40px; }
  .rev-ev { grid-template-columns: 52px 70px 1fr; }
}
