:root {
    --azul: #1d3557;
    --azul-claro: #457b9d;
    --gris-fondo: #f4f6f8;
    --gris-borde: #d9dde2;
    --texto: #1b1f23;
    --verde: #2a9d5c;
    --rojo: #d64545;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--gris-fondo);
    color: var(--texto);
}

a { color: var(--azul-claro); text-decoration: none; }
a:hover { text-decoration: underline; }

.barra-superior {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--azul);
    color: white;
    padding: 0.75rem 1.5rem;
}
.barra-superior a { color: white; }
.barra-superior .marca { font-weight: 700; font-size: 1.1rem; }
.barra-superior nav { display: flex; gap: 1.25rem; flex: 1; }
.barra-superior .sesion { display: flex; align-items: center; gap: 0.75rem; margin: 0; }
.barra-superior .sesion button {
    background: transparent; border: 1px solid rgba(255,255,255,.5); color: white;
    border-radius: 4px; padding: 0.25rem 0.75rem; cursor: pointer;
}

.contenido { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

.mensajes { list-style: none; padding: 0; margin: 0 0 1rem; }
.mensaje { padding: 0.6rem 1rem; border-radius: 4px; margin-bottom: 0.5rem; }
.mensaje-success { background: #e7f6ec; color: var(--verde); border: 1px solid var(--verde); }
.mensaje-error { background: #fbeaea; color: var(--rojo); border: 1px solid var(--rojo); }

.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.tarjeta {
    background: white; border: 1px solid var(--gris-borde); border-radius: 6px;
    padding: 1rem; text-align: center;
}
.tarjeta .numero { font-size: 1.8rem; font-weight: 700; color: var(--azul); }
.tarjeta .etiqueta { color: #555; font-size: 0.85rem; text-transform: uppercase; letter-spacing: .03em; }

table { width: 100%; border-collapse: collapse; background: white; }
th, td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--gris-borde); font-size: 0.92rem; }
th { background: #eef1f4; font-weight: 600; }
tr:hover td { background: #fafbfc; }

.filtros { display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: end; }
.filtros label { display: block; font-size: 0.8rem; color: #555; margin-bottom: 0.2rem; }
select, input[type="text"], input[type="password"] {
    padding: 0.4rem 0.55rem; border: 1px solid var(--gris-borde); border-radius: 4px; font-size: 0.92rem;
}
button, .boton {
    background: var(--azul-claro); color: white; border: none; border-radius: 4px;
    padding: 0.45rem 0.9rem; cursor: pointer; font-size: 0.9rem;
}
button:hover, .boton:hover { background: var(--azul); text-decoration: none; }
.boton-secundario { background: white; color: var(--azul-claro); border: 1px solid var(--azul-claro); }

.etiqueta-estatus {
    display: inline-block; padding: 0.15rem 0.55rem; border-radius: 12px;
    font-size: 0.78rem; font-weight: 600; background: #eef1f4; color: #444;
}

.panel-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.tarjeta-login {
    background: white; border: 1px solid var(--gris-borde); border-radius: 8px;
    padding: 2rem; width: 320px;
}
.tarjeta-login h1 { font-size: 1.2rem; margin-top: 0; color: var(--azul); }
.tarjeta-login .campo { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.tarjeta-login button { width: 100%; padding: 0.6rem; }

.seccion { background: white; border: 1px solid var(--gris-borde); border-radius: 6px; padding: 1.25rem; margin-bottom: 1.5rem; }
.seccion h2 { margin-top: 0; font-size: 1.05rem; color: var(--azul); }

.formulario-linea { display: flex; gap: 0.6rem; align-items: end; flex-wrap: wrap; }

.paginacion { display: flex; gap: 0.75rem; margin-top: 1rem; align-items: center; }

.error-requerimiento { color: var(--rojo); }

dl.detalle { display: grid; grid-template-columns: 160px 1fr; gap: 0.4rem 1rem; margin: 0; }
dl.detalle dt { font-weight: 600; color: #555; }
dl.detalle dd { margin: 0; }
