/* netmon.css — NETMON
   Criterios del sistema: campos editables en celeste, grillas compactas,
   lectura cómoda en pantalla de oficina y en celular. */

:root {
  --nm-azul:      #0b3d66;
  --nm-azul-osc:  #082b48;
  --nm-celeste:   #e8f4ff;   /* campos editables */
  --nm-borde:     #c7d4df;
  --nm-texto:     #1d2b36;
  --nm-gris:      #f4f6f8;
  --nm-ok:        #1f8a4c;
  --nm-alerta:    #c9700a;
  --nm-error:     #b02020;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  color: var(--nm-texto);
  background: #fff;
}

/* ---------- Barra superior ---------- */
.nm-barra {
  display: flex; align-items: center; gap: 18px;
  background: var(--nm-azul); color: #fff;
  padding: 0 16px; height: 46px;
}
.nm-marca { color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: .5px; }
.nm-nav { display: flex; gap: 4px; flex: 1; }
.nm-grupo { position: relative; }
.nm-grupo-btn {
  background: none; border: 0; color: #fff; font: inherit;
  padding: 12px 10px; cursor: pointer; border-radius: 4px;
}
.nm-grupo-btn:hover, .nm-grupo.abierto .nm-grupo-btn { background: var(--nm-azul-osc); }
.nm-flyout {
  display: none; position: absolute; top: 100%; left: 0; z-index: 50;
  background: #fff; min-width: 230px; border: 1px solid var(--nm-borde);
  border-radius: 0 0 6px 6px; box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.nm-grupo.abierto .nm-flyout { display: block; }
.nm-flyout a {
  display: block; padding: 9px 14px; color: var(--nm-texto); text-decoration: none;
  border-bottom: 1px solid #eef2f5;
}
.nm-flyout a:last-child { border-bottom: 0; }
.nm-flyout a:hover { background: var(--nm-celeste); }
.nm-flyout a.activo { font-weight: 700; background: var(--nm-celeste); }
.nm-usuario { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.nm-usuario a { color: #cfe6ff; text-decoration: none; }
.nm-usuario a:hover { text-decoration: underline; }

/* ---------- Contenido ---------- */
.nm-main { padding: 18px 16px 60px; max-width: 1500px; margin: 0 auto; }
.nm-titulo { font-size: 20px; margin: 0 0 16px; color: var(--nm-azul); }
.nm-nota { color: #5a6b78; font-size: 13px; }

.nm-aviso {
  padding: 10px 14px; border-radius: 5px; margin-bottom: 14px;
  background: var(--nm-celeste); border: 1px solid var(--nm-borde);
}
.nm-aviso-error { background: #fdecec; border-color: #f0b4b4; color: var(--nm-error); }
.nm-aviso-ok    { background: #eaf7ee; border-color: #b4ddc2; color: var(--nm-ok); }

/* ---------- Tarjetas de estado ---------- */
.nm-tarjetas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.nm-tarjeta {
  flex: 1 1 160px; min-width: 150px; padding: 14px 16px;
  background: var(--nm-gris); border: 1px solid var(--nm-borde);
  border-left: 4px solid var(--nm-azul); border-radius: 6px;
}
.nm-tarjeta.ok     { border-left-color: var(--nm-ok); }
.nm-tarjeta.alerta { border-left-color: var(--nm-alerta); }
.nm-tarjeta.error  { border-left-color: var(--nm-error); }
.nm-tarjeta-num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.nm-tarjeta-tit { font-size: 12px; color: #5a6b78; text-transform: uppercase; letter-spacing: .4px; }

/* ---------- Grillas ---------- */
.nm-tabla { width: 100%; border-collapse: collapse; background: #fff; }
.nm-tabla th, .nm-tabla td {
  border: 1px solid var(--nm-borde); padding: 5px 8px; text-align: left; white-space: nowrap;
}
.nm-tabla th { background: var(--nm-azul); color: #fff; font-weight: 600; position: sticky; top: 0; }
.nm-tabla tbody tr:nth-child(even) { background: #fafcfe; }
.nm-tabla tbody tr:hover { background: var(--nm-celeste); }
.nm-tabla td.num { text-align: right; font-variant-numeric: tabular-nums; }
.nm-scroll { overflow: auto; max-height: 70vh; border: 1px solid var(--nm-borde); border-radius: 5px; }

/* Semáforo de señal / estado */
.nm-sem { padding: 1px 7px; border-radius: 9px; font-size: 12px; font-weight: 600; }
.nm-sem.ok     { background: #e3f6e9; color: var(--nm-ok); }
.nm-sem.alerta { background: #fdf2e0; color: var(--nm-alerta); }
.nm-sem.error  { background: #fdecec; color: var(--nm-error); }
.nm-sem.gris   { background: #eceff1; color: #5a6b78; }

/* ---------- Formularios: editable = celeste ---------- */
.nm-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.nm-campo { display: flex; flex-direction: column; gap: 3px; }
.nm-campo label { font-size: 12px; color: #5a6b78; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  background: var(--nm-celeste); border: 1px solid var(--nm-borde);
  padding: 6px 8px; border-radius: 4px; font: inherit; color: var(--nm-texto);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #7fb6e0; outline-offset: -1px; }
input[readonly], input:disabled, select:disabled { background: var(--nm-gris); color: #5a6b78; }

button, .nm-boton {
  background: var(--nm-azul); color: #fff; border: 0; padding: 7px 14px;
  border-radius: 4px; font: inherit; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .nm-boton:hover { background: var(--nm-azul-osc); }
.nm-boton-sec { background: #607d8b; }

.nm-sub {
  font-size: 14px; margin: 18px 0 8px; padding-bottom: 4px;
  color: var(--nm-azul); border-bottom: 1px solid var(--nm-borde);
}
.nm-form { max-width: 1100px; }
.nm-form label { display: block; }
.nm-form input[type=checkbox] { background: none; vertical-align: -1px; }
.nm-tabla small { color: #5a6b78; }

/* ---------- Login ---------- */
.nm-login-body { background: var(--nm-azul); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.nm-login {
  background: #fff; padding: 28px 30px; border-radius: 8px; width: 330px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); display: flex; flex-direction: column; gap: 6px;
}
.nm-login h1 { margin: 0; font-size: 22px; color: var(--nm-azul); text-align: center; }
.nm-login-sub { margin: 0 0 14px; text-align: center; color: #5a6b78; font-size: 13px; }
.nm-login label { font-size: 12px; color: #5a6b78; margin-top: 8px; }
.nm-login button { margin-top: 18px; padding: 10px; font-size: 15px; }

/* ---------- Ruedita global ---------- */
.nm-spinner {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(255,255,255,.55); align-items: center; justify-content: center;
}
.nm-spinner.visible { display: flex; }
.nm-spinner-rueda {
  width: 46px; height: 46px; border: 5px solid #cfe0ee;
  border-top-color: var(--nm-azul); border-radius: 50%;
  animation: nm-girar .8s linear infinite;
}
@keyframes nm-girar { to { transform: rotate(360deg); } }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  .nm-barra { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .nm-nav { order: 3; width: 100%; overflow-x: auto; }
  .nm-main { padding: 14px 12px 50px; }
  .nm-tabla th, .nm-tabla td { padding: 4px 6px; }
}
