/* Panel de túneles — estética sobria Gasparini (índigo #1a237e) */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --indigo: #1a237e;
  --indigo-osc: #121858;
  --indigo-claro: #e8eaf6;
  --gris: #5c6370;
  --borde: #d9dce3;
  --fondo: #f4f5f9;
  --ok: #2e7d32;
  --mal: #c62828;
}
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--fondo);
  color: #22262e;
  font-size: 15px;
}

/* ── Login ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card {
  background: #fff; border: 1px solid var(--borde); border-radius: 10px;
  width: 360px; padding: 34px 32px; box-shadow: 0 8px 30px rgba(26,35,126,.10);
}
.login-card h1 { font-size: 19px; color: var(--indigo); margin-bottom: 4px; }
.login-card .sub { color: var(--gris); font-size: 13px; margin-bottom: 24px; }
label { display: block; font-size: 13px; color: var(--gris); margin: 14px 0 5px; }
input[type=text], input[type=password] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--borde); border-radius: 6px;
  font-size: 15px; outline: none;
}
input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-claro); }
button.principal {
  width: 100%; margin-top: 22px; padding: 10px; background: var(--indigo); color: #fff;
  border: 0; border-radius: 6px; font-size: 15px; cursor: pointer;
}
button.principal:hover { background: var(--indigo-osc); }
.error { color: var(--mal); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ── Barra superior ── */
header {
  background: var(--indigo); color: #fff; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
header h1 { font-size: 17px; font-weight: 600; }
header .der { display: flex; gap: 14px; align-items: center; font-size: 13px; }
header button { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 5px; padding: 7px 14px; cursor: pointer; }
header button:hover { background: rgba(255,255,255,.25); }

main { max-width: 1100px; margin: 28px auto; padding: 0 20px; }
.acciones-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.acciones-top h2 { font-size: 16px; color: var(--indigo); }

/* ── Tabla ── */
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--borde); border-radius: 8px; overflow: hidden; }
th { background: var(--indigo-claro); color: var(--indigo); text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; padding: 10px 12px; }
td { padding: 10px 12px; border-top: 1px solid var(--borde); font-size: 14px; vertical-align: middle; }
tr:hover td { background: #fafbfe; }
.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.estado .punto { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.estado.online { color: var(--ok); } .estado.online .punto { background: var(--ok); }
.estado.offline { color: var(--mal); } .estado.offline .punto { background: var(--mal); }
.chip { font-size: 12px; background: var(--indigo-claro); color: var(--indigo); border-radius: 10px; padding: 2px 9px; }
.chip.off { background: #fdecea; color: var(--mal); }
td.acciones { white-space: nowrap; }
td.acciones button {
  border: 1px solid var(--borde); background: #fff; color: var(--indigo);
  border-radius: 5px; padding: 5px 9px; margin-right: 5px; cursor: pointer; font-size: 12.5px;
}
td.acciones button:hover { background: var(--indigo-claro); }
td.acciones button.peligro { color: var(--mal); }
td.acciones button.peligro:hover { background: #fdecea; }
.mono { font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; }
.gris { color: var(--gris); font-size: 12.5px; }

/* ── Modal ── */
.modal-fondo { position: fixed; inset: 0; background: rgba(18,24,88,.45); display: flex; align-items: center; justify-content: center; z-index: 10; }
.modal {
  background: #fff; border-radius: 10px; width: min(560px, 92vw); padding: 26px 28px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.modal h3 { color: var(--indigo); font-size: 16px; margin-bottom: 16px; }
.modal .fila-botones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal button { padding: 8px 16px; border-radius: 6px; border: 1px solid var(--borde); background: #fff; cursor: pointer; }
.modal button.principal { width: auto; margin: 0; background: var(--indigo); color: #fff; border: 0; }
.clave-box {
  background: #f6f7fb; border: 1px dashed var(--indigo); border-radius: 6px;
  padding: 12px; font-family: Consolas, monospace; font-size: 12.5px;
  word-break: break-all; margin: 10px 0;
}
.aviso { font-size: 13px; color: var(--gris); }
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--indigo); color: #fff;
  padding: 12px 20px; border-radius: 8px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.toast.visible { opacity: 1; }
.vacio { text-align: center; color: var(--gris); padding: 40px 0; }
