:root {
  --azul: #0A3466; --naranjo: #FF9900; --titulo: #242424; --texto: #767676;
  --borde: #E3E6EB; --fondo: #F6F7F9; --ok: #2E8B57; --alerta: #D98200; --error: #C0392B;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 15px/1.5 "Ubuntu", Arial, sans-serif; }
h1, h2, h3 { font-family: "Manrope", Arial, sans-serif; color: var(--titulo); margin: 0 0 12px; }
h1 { font-size: 22px; } h2 { font-size: 16px; color: var(--azul); }
.barra { display: flex; align-items: center; gap: 28px; padding: 10px 24px; background: #fff;
  border-bottom: 3px solid var(--naranjo); }
.logo { height: 34px; }
.barra nav a { color: var(--azul); text-decoration: none; font: 600 15px "Manrope", sans-serif; padding: 6px 0;
  border-bottom: 2px solid transparent; margin-right: 18px; }
.barra nav a.activo { border-bottom-color: var(--azul); }
.sesion { margin-left: auto; font-size: 13px; }
main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.cabecera { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.grilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: 6px; padding: 18px; }
.grande { font: 700 30px var(--mono); color: var(--azul); }
.suave { color: var(--texto); font-size: 13px; }
.num, time { font-family: var(--mono); color: var(--titulo); }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--borde); border-radius: 6px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--borde); }
th { font: 600 12px "Manrope", sans-serif; text-transform: uppercase; letter-spacing: .04em; color: var(--azul);
  background: #FAFBFC; }
td.num, th.num { text-align: right; }
.estado { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.estado.ok { background: #E8F5EE; color: var(--ok); }
.estado.alerta { background: #FFF4E0; color: var(--alerta); }
.estado.error { background: #FCEBEA; color: var(--error); }
.estado.neutro { background: #EEF1F5; color: var(--texto); }
.punto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.punto.ok { background: var(--ok); } .punto.alerta { background: var(--alerta); }
.punto.error { background: var(--error); } .punto.neutro { background: #B8BFC9; }
.fila { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0;
  border-bottom: 1px dashed var(--borde); }
.fila:last-child { border-bottom: 0; }
button { font: 500 14px "Ubuntu", sans-serif; cursor: pointer; border-radius: 4px; }
.primario { background: var(--naranjo); color: #fff; border: 0; padding: 8px 16px; font-weight: 600; }
.primario:hover { background: #E68A00; }
.enlace { background: none; border: 0; color: var(--azul); padding: 0 4px; text-decoration: underline; font-size: 13px; }
.enlace.peligro { color: var(--error); }
.aviso { background: #FFF4E0; border-left: 3px solid var(--naranjo); padding: 10px 14px; margin-bottom: 16px; }
.aviso.error { background: #FCEBEA; border-left-color: var(--error); }
form.agregar { display: flex; gap: 8px; margin-bottom: 16px; }
form.agregar input { flex: 1; max-width: 360px; padding: 8px 10px; border: 1px solid #C9CED6; border-radius: 4px;
  font: 14px "Ubuntu", sans-serif; }
@media (max-width: 720px) {
  .barra { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .sesion { margin-left: 0; width: 100%; }
  table, thead, tbody, tr, td, th { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--borde); padding: 8px 0; }
  td { border: 0; padding: 4px 12px; }
  td.num { text-align: left; }
  td[data-titulo]::before { content: attr(data-titulo) ": "; color: var(--texto); font-size: 12px; }
}
.detalle { margin: 2px 0 8px 17px; }
.detalle summary { cursor: pointer; color: var(--azul); font-size: 13px; list-style: none; user-select: none; }
.detalle summary::-webkit-details-marker { display: none; }
.detalle summary::before { content: "▸ "; }
.detalle[open] summary::before { content: "▾ "; }
.detalle[open] summary { margin-bottom: 8px; }
.detalle-cuerpo { border-left: 2px solid var(--borde); padding: 2px 0 2px 12px; font-size: 13px; }
.detalle-cuerpo p { margin: 0 0 10px; }
.detalle-cuerpo h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--azul); margin: 0 0 6px; }
ul.cambios { list-style: none; margin: 0; padding: 0; }
ul.cambios li { padding: 7px 0; border-bottom: 1px dashed var(--borde); }
ul.cambios li:last-child { border-bottom: 0; }
.cambio-titulo { display: flex; align-items: baseline; gap: 8px; }
.cambio-titulo .estado { flex: none; }
.cambio-nombre { color: var(--titulo); min-width: 0; overflow-wrap: anywhere; }
.cambio-meta { font-size: 12px; color: var(--texto); margin-top: 2px; }
.cambio-meta time { font-size: 12px; }
.fila time { white-space: nowrap; }
@media (min-width: 900px) { .tarjeta.ancha { grid-column: span 2; } }
.fila > :last-child { white-space: nowrap; flex: none; }
.alarma-nombre { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ayuda { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid #B8BFC9; color: var(--texto);
  font: 600 11px "Manrope", sans-serif; cursor: help; outline: none; }
.ayuda:hover, .ayuda:focus { border-color: var(--azul); color: var(--azul); }
.ayuda .globo { visibility: hidden; opacity: 0; position: absolute; z-index: 10; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%); width: 260px; padding: 10px 12px; border-radius: 6px; background: var(--azul);
  color: #fff; font: 400 13px/1.45 "Ubuntu", sans-serif; text-align: left; box-shadow: 0 4px 14px rgba(10, 52, 102, .18);
  transition: opacity .12s; pointer-events: none; }
.ayuda .globo::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--azul); }
.ayuda:hover .globo, .ayuda:focus .globo { visibility: visible; opacity: 1; }
@media (max-width: 720px) {
  /* En pantallas chicas el globo se ancla a la fila completa para no salirse por los lados. */
  .fila { position: relative; }
  .ayuda { position: static; }
  .ayuda .globo { left: 0; right: 0; width: auto; transform: none; }
  .ayuda .globo::after { display: none; } }
