/* public/css/style.css
   Estilos generales del portal (login, listado de equipos, pantallas de
   administración). La interfaz real del equipo (views/equipo.ejs) tiene su
   propio bloque <style> autocontenido, aparte de este archivo. */

:root {
  --azul: #2f6fb0;
  --azul-oscuro: #1e4d7a;
  --fondo: #f4f6f8;
  --texto: #1f2a33;
  --borde: #d8dee3;
  --rojo: #c0392b;
  --verde: #2c8a4b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
}

a { color: var(--azul); }

.topbar {
  background: var(--azul-oscuro);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .8rem 1.5rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.topbar-brand { font-weight: bold; font-size: 1.1rem; }
.topbar-brand-sub { font-weight: normal; font-size: .8rem; opacity: .8; margin-left: .5rem; }
.topbar-nav { display: flex; align-items: center; gap: 1rem; }
.topbar-nav a { color: #cfe0f0; text-decoration: none; font-size: .9rem; }
.topbar-nav a:hover { text-decoration: underline; }
.topbar-user { font-size: .85rem; opacity: .85; }
.topbar-logout button {
  background: transparent; border: 1px solid #cfe0f0; color: #cfe0f0;
  border-radius: 4px; padding: .3rem .7rem; cursor: pointer;
}

.container { max-width: 1000px; margin: 0 auto; padding: 1.5rem; }

.pantalla-centrada {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; margin: 0; background: var(--fondo);
}
.tarjeta-login {
  background: white; border-radius: 10px; padding: 2rem; width: 100%;
  max-width: 360px; box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.tarjeta-login h1 { margin: 0 0 .2rem; font-size: 1.4rem; }
.subtitulo { color: #6b7a85; margin: 0 0 1.2rem; font-size: .9rem; }

.tarjeta {
  background: white; border-radius: 10px; padding: 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.06); margin-bottom: 1.5rem;
}
.tarjeta-formulario { max-width: 480px; }

label { display: block; margin-bottom: .9rem; font-size: .9rem; color: #45535c; }
input, select {
  display: block; width: 100%; margin-top: .3rem; padding: .55rem .6rem;
  border: 1px solid var(--borde); border-radius: 6px; font-size: 1rem;
}
button {
  background: var(--azul); color: white; border: none; border-radius: 6px;
  padding: .6rem 1.2rem; font-size: .95rem; cursor: pointer;
}
button:hover { background: var(--azul-oscuro); }
.boton {
  display: inline-block; background: var(--azul); color: white;
  text-decoration: none; padding: .5rem 1rem; border-radius: 6px; font-size: .9rem;
}
.boton-peligro { background: var(--rojo); }
.boton-peligro:hover { background: #922015; }
.form-inline { display: inline; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; align-items: end; }

.alerta { padding: .7rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: .9rem; }
.alerta-error { background: #fbe4e1; color: var(--rojo); }
.alerta-ok { background: #e2f4e7; color: var(--verde); }

.enlace-secundario { text-align: center; font-size: .85rem; margin-top: 1rem; }

.cabecera-seccion { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem; }

.filtros { display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filtros input, .filtros select { width: auto; margin: 0; min-width: 220px; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; }
.tabla-equipos, .tabla-simple { box-shadow: 0 1px 6px rgba(0,0,0,.06); }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--borde); font-size: .9rem; }
th { background: #eef2f5; font-weight: 600; color: #45535c; }
tr:last-child td { border-bottom: none; }

.estado-online { color: var(--verde); font-weight: 600; }
.estado-offline { color: var(--rojo); font-weight: 600; }
.estado-desconocido { color: #8a97a1; }

.aviso-vacio { color: #6b7a85; font-style: italic; }
.ayuda { color: #6b7a85; font-size: .85rem; }
.acciones-fila { display: flex; gap: .4rem; }
.sha { font-family: monospace; font-size: .8rem; }
