/*
 * Paleta Primar, tomada del sitio corporativo (primartechnologies.com):
 * fondo #040d1b, acento #4f8cff, texto #e0e3e6, tenue #9ca3af.
 * Los tonos intermedios se derivan de los azules que ya usa la marca.
 */
:root {
    --fondo: #040d1b;
    --tarjeta: #081c3a;
    --borde: #0b254b;
    --texto: #e0e3e6;
    --tenue: #9ca3af;
    --positivo: #34d399;
    --negativo: #f87171;
    --acento: #4f8cff;
    --acento-suave: rgba(79, 140, 255, .1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.barra {
    display: flex; align-items: center; gap: 1rem;
    padding: .9rem 1.5rem;
    border-bottom: 1px solid var(--borde);
}
.marca {
    font-weight: 700; letter-spacing: .02em; color: var(--acento);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 42vw;
}
.valorado { color: var(--tenue); font-size: .85rem; margin-left: auto; }
.sesion { display: flex; gap: .75rem; align-items: center; font-size: .9rem; }
.sesion a { color: var(--acento); text-decoration: none; }

main { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }

.tarjetas {
    display: grid; gap: 1rem; margin-bottom: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.tarjeta {
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.tarjeta h2 {
    margin: 0 0 .5rem; font-size: .78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em; color: var(--tenue);
}
.cifra { margin: 0; font-size: 1.7rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.cifra small { font-size: .8rem; color: var(--tenue); font-weight: 400; }
.sub { margin: .2rem 0 0; color: var(--tenue); font-size: .85rem; }
.destacada { border-color: var(--acento); }
.positiva .cifra, td.positiva { color: var(--positivo); }
.negativa .cifra, td.negativa { color: var(--negativo); }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: .6rem .5rem; border-bottom: 1px solid var(--borde); }
th:first-child, td:first-child { text-align: left; }
th { color: var(--tenue); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }

form.linea { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; color: var(--tenue); }
input, select {
    background: #030a15; color: var(--texto);
    border: 1px solid var(--borde); border-radius: 7px;
    padding: .55rem .7rem; font-size: .95rem; font-family: inherit;
}
button {
    background: var(--acento); color: #040d1b; border: 0;
    border-radius: 7px; padding: .6rem 1.2rem;
    font-weight: 650; font-size: .92rem; cursor: pointer;
}
.nota { color: var(--tenue); font-size: .82rem; margin: .8rem 0 0; }
.aviso {
    background: var(--acento-suave); border: 1px solid var(--borde);
    border-left: 3px solid var(--acento);
    border-radius: 8px; padding: .9rem 1.1rem; margin-bottom: 1.25rem;
}
.aviso ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.error { color: var(--negativo); font-size: .88rem; }

.pantalla-login { display: grid; place-items: center; min-height: 100vh; }
.login { width: min(360px, 92vw); display: flex; flex-direction: column; gap: .9rem; }
.login h1 {
    margin: 0 0 .3rem; font-size: 1.15rem; line-height: 1.3;
    color: var(--acento); text-align: center;
}

@media (max-width: 640px) {
    .barra { flex-wrap: wrap; gap: .4rem 1rem; }
    .marca { max-width: 100%; }
    .valorado { margin-left: 0; width: 100%; order: 3; }
}
