/* JL Tanques — mismo sistema de diseño que el Monitor CCTV (JL VMS):
   tema DÍA por defecto (papel/tinta/rojo de JL) y NOCHE a elección (tema.js). */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Fira+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-0: #f5f2ed;
  --bg-1: #ffffff;
  --bg-2: #efebe4;
  --bg-3: #e4ded4;
  --line: #e0d9cd;
  --line-2: #cdc4b4;
  --text: #090b0d;
  --muted: #5d6870;
  --dim: #636d74;
  --accent: #11151a;
  --accent-soft: rgba(17, 21, 26, .07);
  --ok: #17734f;
  --ok-soft: rgba(23, 115, 79, .10);
  --warn: #8a5a00;
  --warn-soft: rgba(138, 90, 0, .11);
  --err: #d20a17;
  --err-soft: rgba(210, 10, 23, .09);
  --on-err: #ffffff;
  --info: #3a4fb8;
  --info-soft: rgba(58, 79, 184, .10);

  /* Agua y series del histórico (orden fijo por tanque). */
  --agua: #2a78d6;
  --agua-2: #86b6ef;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --grid: #e1e0d9;
  --eje: #c3c2b7;

  --font-ui: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-data: 'Fira Code', 'Cascadia Code', Consolas, monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(9, 11, 13, .05), 0 6px 18px rgba(9, 11, 13, .05);
}

:root[data-tema="oscuro"] {
  --bg-0: #070b12;
  --bg-1: #0c121c;
  --bg-2: #111a28;
  --bg-3: #16202f;
  --line: #1d2938;
  --line-2: #2b3d55;
  --text: #e6edf7;
  --muted: #8ca0b8;
  --dim: #5a6b80;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, .12);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .12);
  --err: #f87171;
  --err-soft: rgba(248, 113, 113, .14);
  --info: #818cf8;
  --info-soft: rgba(129, 140, 248, .12);
  --agua: #3987e5;
  --agua-2: #1c5cab;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --grid: #1f2a38;
  --eje: #34465c;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: light; }
html[data-tema="oscuro"] { color-scheme: dark; }
body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg-0);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 600; line-height: 1.25; }
.num { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ── Barra superior y pestañas ─────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; height: 64px;
  background: color-mix(in srgb, var(--bg-1) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: none; }
.brand-logo { height: 34px; width: auto; }
.brand-title { font-size: 15px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.brand-sub { font-family: var(--font-data); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.topbar-nav { display: flex; gap: 4px; margin-left: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav a {
  display: flex; align-items: center; gap: 8px; flex: none;
  padding: 9px 16px; border-radius: var(--radius-sm);
  color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
  transition: color .2s, background .2s;
}
.topbar-nav a:hover { color: var(--text); background: var(--bg-2); }
.topbar-nav a.active { color: var(--accent); background: var(--accent-soft); border-color: var(--line-2); }
.topbar-nav svg, .ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.nav-badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--err); color: var(--on-err);
  font-family: var(--font-data); font-size: 12px; font-weight: 600;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.live-badge {
  font-family: var(--font-data); font-size: 11.5px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; letter-spacing: .04em;
  color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft);
}
.actualizado { font-family: var(--font-data); font-size: 12px; color: var(--muted); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; font-weight: 600; padding: 8px 14px; min-height: 36px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); cursor: pointer;
}
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--bg-2); }
.btn.sm { padding: 5px 10px; min-height: 32px; font-size: 12px; }

/* ── Contenido ──────────────────────────────────────────────── */
.vista { max-width: 1280px; margin: 0 auto; padding: 24px; outline: none; }
.cargando, .vacio { color: var(--muted); padding: 48px 0; text-align: center; }
.encabezado { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.encabezado h1 { font-size: 24px; }
.encabezado .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }

.panel {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 16px; margin-bottom: 12px; }

/* Selector segmentado (copropiedad, rango) */
.segmentos { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.segmentos button {
  border: 1px solid transparent; background: transparent; cursor: pointer;
  padding: 7px 14px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--muted); min-height: 36px;
}
.segmentos button:hover { color: var(--text); }
.segmentos button[aria-pressed="true"] { background: var(--bg-1); color: var(--text); border-color: var(--line-2); box-shadow: var(--shadow); }
.controles { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }

/* Chips de estado: siempre ícono + texto, nunca solo color */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.chip .ico { width: 14px; height: 14px; }
.chip.ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.chip.warn { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.chip.err { color: var(--err); background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.chip.neutro { color: var(--muted); background: var(--bg-2); border-color: var(--line); }

/* ── Resumen (multi-copropiedad) ───────────────────────────── */
.grid-sitios { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.tarjeta-sitio { display: block; cursor: pointer; transition: border-color .2s, transform .2s; }
.tarjeta-sitio:hover { border-color: var(--line-2); transform: translateY(-1px); }
.tarjeta-sitio:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ts-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ts-cab h2 { font-size: 18px; margin: 0; }
.ts-reserva { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 4px; }
.ts-reserva .pct { font-family: var(--font-data); font-size: 44px; font-weight: 600; line-height: 1; }
.ts-reserva .pct small { font-size: 22px; color: var(--muted); }
.ts-litros { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.barra-tanque { display: grid; grid-template-columns: minmax(90px, 130px) 1fr 58px; gap: 10px; align-items: center; margin-top: 8px; font-size: 14px; }
.barra-tanque .nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-tanque .val { font-family: var(--font-data); text-align: right; font-weight: 600; }
.barra { position: relative; height: 12px; border-radius: 4px; background: var(--bg-3); overflow: visible; }
.barra > span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--agua); }
.barra.estimada > span { background: repeating-linear-gradient(45deg, var(--agua) 0 4px, var(--agua-2) 4px 8px); }
.barra .marca { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .55; border-radius: 1px; }
.ts-pie { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }

/* ── Vista SCADA ───────────────────────────────────────────── */
.scada-cab { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kpis { display: flex; flex-wrap: wrap; gap: 28px; }
.kpi .etq { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi .val { font-family: var(--font-data); font-size: 30px; font-weight: 600; line-height: 1.2; }
.kpi .val small { font-size: 15px; color: var(--muted); font-weight: 500; }
.scada-svg { width: 100%; height: auto; display: block; margin-top: 8px; }
.scada-svg .pared { fill: var(--bg-2); stroke: var(--line-2); stroke-width: 2; }
.scada-svg .pared.estimada { stroke-dasharray: 7 5; }
.scada-svg .agua { fill: var(--agua); transition: y .8s ease, height .8s ease; }
.scada-svg .superficie { stroke: color-mix(in srgb, var(--bg-1) 55%, var(--agua)); stroke-width: 2; }
.scada-svg .pct { font-family: var(--font-data); font-weight: 600; fill: var(--text); paint-order: stroke; stroke: var(--bg-1); stroke-width: 5px; stroke-linejoin: round; }
.scada-svg .nombre { font-weight: 700; fill: var(--text); font-size: 17px; }
.scada-svg .detalle { fill: var(--muted); font-size: 13.5px; font-family: var(--font-data); }
.scada-svg .umbral { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .6; }
.scada-svg .umbral-txt { fill: var(--muted); font-size: 11.5px; font-family: var(--font-data); }
.scada-svg .tubo { fill: none; stroke: var(--line-2); stroke-width: 10; stroke-linecap: round; }
.scada-svg .tubo-agua { fill: none; stroke: var(--agua); stroke-width: 4; stroke-linecap: round; opacity: .75; }
.scada-svg .sensor { fill: var(--text); }
.scada-svg .sensor-off { fill: var(--err); }
.scada-svg .onda { fill: none; stroke: var(--text); stroke-width: 1.5; opacity: .55; }

.tabla-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--bg-2); padding: 10px 12px; white-space: nowrap; }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
td.num, th.num { text-align: right; }

/* ── Histórico ─────────────────────────────────────────────── */
.grafico { position: relative; }
.grafico svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.grafico .grid line { stroke: var(--grid); stroke-width: 1; }
.grafico .eje-y text, .grafico .eje-x text { fill: var(--muted); font-size: 12px; font-family: var(--font-data); }
.grafico .base { stroke: var(--eje); stroke-width: 1; }
.grafico .serie { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.grafico .serie.estimada { stroke-dasharray: 6 4; }
.grafico .umbral { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.grafico .umbral-txt { fill: var(--muted); font-size: 11.5px; font-family: var(--font-data); }
.grafico .etq-final { font-size: 12.5px; font-weight: 600; fill: var(--text); }
.grafico .cruz { stroke: var(--muted); stroke-width: 1; }
.grafico .punto { stroke: var(--bg-1); stroke-width: 2; }
.leyenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; margin-bottom: 8px; }
.leyenda span { display: inline-flex; align-items: center; gap: 8px; }
.leyenda i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.leyenda i.estimada { background-image: linear-gradient(90deg, currentColor 60%, transparent 60%) !important; background-size: 6px 3px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.stat { background: var(--bg-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat .etq { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .val { font-family: var(--font-data); font-size: 20px; font-weight: 600; }
details.tabla-datos { margin-top: 16px; }
details.tabla-datos summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; padding: 6px 0; }
details.tabla-datos .tabla-wrap { max-height: 360px; overflow-y: auto; margin-top: 8px; }

.tooltip {
  position: fixed; z-index: 60; pointer-events: none;
  background: var(--bg-1); color: var(--text); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 8px 12px; font-size: 13px; min-width: 150px;
}
.tooltip .tt-t { font-family: var(--font-data); color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.tooltip .tt-f { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tooltip .tt-f b { font-family: var(--font-data); }
.tooltip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }

/* ── Alertas ───────────────────────────────────────────────── */
.lista-alertas { display: flex; flex-direction: column; gap: 10px; }
.alerta {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: start;
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg-1); border: 1px solid var(--line); border-left-width: 5px;
}
.alerta.activa { border-left-color: var(--err); background: color-mix(in srgb, var(--err-soft) 60%, var(--bg-1)); }
.alerta.cerrada { border-left-color: var(--line-2); }
.alerta .icono { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); }
.alerta.activa .icono { background: var(--err); color: var(--on-err); }
.alerta .icono .ico { width: 22px; height: 22px; }
.alerta h3 { font-size: 16px; }
.alerta .donde { font-size: 13.5px; color: var(--muted); }
.alerta .msg { font-size: 14px; margin-top: 4px; }
.alerta .cuando { text-align: right; font-size: 13px; color: var(--muted); font-family: var(--font-data); white-space: nowrap; }

/* ── Celular ───────────────────────────────────────────────── */
@media (max-width: 760px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 16px 0; gap: 8px; }
  .brand-logo { height: 28px; }
  .topbar-right { margin-left: auto; }
  .actualizado { display: none; }
  .topbar-nav { order: 3; width: 100%; margin: 0 -16px; padding: 0 12px 8px; }
  .topbar-nav a { padding: 8px 12px; font-size: 14px; }
  .vista { padding: 16px; }
  .grid-sitios { grid-template-columns: 1fr; }
  .ts-reserva .pct { font-size: 38px; }
  .kpis { gap: 18px; }
  .kpi .val { font-size: 24px; }
  .alerta { grid-template-columns: 38px 1fr; }
  .alerta .icono { width: 38px; height: 38px; }
  .alerta .cuando { grid-column: 2; text-align: left; }
}

.grid-sitios > .panel { margin-top: 0; }
@media (max-width: 1100px) {
  .actualizado { display: none; }
  .brand-sub { display: none; }
  .topbar { gap: 10px; padding: 0 16px; }
  .topbar-nav a { padding: 9px 12px; }
}
td.num { white-space: nowrap; }
.stat .det { font-size: 12.5px; color: var(--muted); font-family: var(--font-data); }

/* SCADA en celular: un tanque por tarjeta, dos por fila */
.scada-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 8px; }
.scada-grid .scada-svg { margin-top: 0; }
.scada-nota { font-size: 13px; color: var(--muted); margin-top: 6px; }

@media (max-width: 760px) {
  .topbar-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; overflow: visible; margin: 0 -8px; padding: 0 0 8px; width: calc(100% + 16px); }
  .topbar-nav a { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 12.5px; justify-content: center; position: relative; }
  .topbar-nav .nav-badge { position: absolute; top: 2px; right: 50%; margin-right: -26px; min-width: 18px; height: 18px; font-size: 11px; }
}
:root[data-tema="oscuro"] .brand-logo { background: #f5f2ed; border-radius: 8px; padding: 3px 6px; }

/* ── Formularios, ingreso y diálogos ───────────────────────── */
.btn.primario { background: var(--accent); color: var(--bg-1); border-color: var(--accent); }
.btn.primario:hover { filter: brightness(1.12); }
.btn.peligro { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, transparent); background: transparent; }
.btn.grande { min-height: 46px; font-size: 15px; width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .segmentos button:focus-visible, .topbar-nav a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.campo { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.campo input, .campo select {
  font: inherit; font-weight: 400; font-size: 16px; color: var(--text);
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 44px; width: 100%;
}
.campo input:focus, .campo select:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.campo .ayuda, .ayuda { font-size: 13px; font-weight: 400; color: var(--muted); }
.error { color: var(--err); background: var(--err-soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; font-weight: 600; }

.pagina-ingreso { display: grid; place-items: center; padding: 16px; }
.ingreso { width: 100%; max-width: 400px; }
.ingreso-caja { display: grid; gap: 16px; padding: 32px 28px; }
.ingreso-logo { height: 64px; margin: 0 auto; }
:root[data-tema="oscuro"] .ingreso-logo { background: #f5f2ed; border-radius: 10px; padding: 6px 10px; }
.ingreso-caja h1 { text-align: center; font-size: 22px; margin-bottom: -10px; }
.ingreso-caja .sub { text-align: center; color: var(--muted); font-size: 14px; }

dialog.modal {
  margin: auto;
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0;
  background: var(--bg-1); color: var(--text); box-shadow: var(--shadow);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
}
dialog.modal::backdrop { background: rgba(9, 11, 13, .55); }
.modal form, .modal .cuerpo { display: grid; gap: 16px; padding: 22px; }
.modal h2 { font-size: 19px; }
.modal .acciones { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.secreto {
  font-family: var(--font-data); font-size: 20px; font-weight: 600; letter-spacing: .04em;
  background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
  padding: 12px 14px; text-align: center; word-break: break-all; user-select: all;
}
.comando { font-family: var(--font-data); font-size: 13px; background: var(--bg-2); border-radius: var(--radius-sm); padding: 10px 12px; word-break: break-all; user-select: all; }

.accesos { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 12px; max-height: 300px; overflow-y: auto; }
.acceso-sitio { padding: 10px 0; border-bottom: 1px solid var(--line); }
.acceso-sitio:last-child { border-bottom: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.check.completo { font-weight: 700; }
.acceso-tanques { display: flex; flex-wrap: wrap; gap: 0 18px; padding-left: 30px; }
.acceso-tanques .check { font-size: 14px; }
.acceso-tanques.deshabilitado { opacity: .5; }

/* ── Menú de usuario ───────────────────────────────────────── */
.usuario-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 220px; }
.usuario-btn .ini { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--bg-1); font-size: 12px; font-weight: 700; flex: none; }
.usuario-btn .nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-usuario { position: absolute; right: 16px; top: 58px; z-index: 40; min-width: 220px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px; }
.menu-usuario .quien { padding: 8px 10px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-usuario button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.menu-usuario button:hover { background: var(--bg-2); }

/* ── Administración ────────────────────────────────────────── */
.tabla-admin td { vertical-align: top; }
.tabla-admin .acc { display: flex; gap: 6px; flex-wrap: wrap; }
.etq-rol { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.resumen-acceso { font-size: 13.5px; }
.barra-acciones { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
@media (max-width: 760px) {
  .usuario-btn .nom { display: none; }
  .menu-usuario { top: 50px; right: 8px; }
}
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .topbar-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .topbar-nav a { font-size: 11.5px; }
}
