/* ---------- Tokens ---------- */
:root {
    --tinta: #10151F;       /* navbar / texto fuerte */
    --fondo: #F5F6F8;       /* fondo de página */
    --tarjeta: #FFFFFF;
    --borde: #E4E7EC;
    --texto-muted: #64748B;
    --azul: #2E5BFF;        /* acción primaria */
    --azul-oscuro: #1E3FCC;
    --verde: #16A34A;       /* entrada / activo */
    --rojo: #DC2626;        /* salida / inactivo */
    --radio: 10px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    background: var(--fondo);
    color: var(--tinta);
    -webkit-font-smoothing: antialiased;
}

/* ---------- Navbar ---------- */
.navbar {
    background: var(--tinta);
    padding: 0.9rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.marca {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #fff;
}

.marca-barras {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
}

.marca-barras i {
    display: inline-block;
    width: 3px;
    background: var(--azul);
    border-radius: 1px;
}
.marca-barras i:nth-child(1) { height: 60%; }
.marca-barras i:nth-child(2) { height: 100%; }
.marca-barras i:nth-child(3) { height: 40%; }
.marca-barras i:nth-child(4) { height: 80%; }
.marca-barras i:nth-child(5) { height: 55%; }
.marca-barras i:nth-child(6) { height: 100%; }
.marca-barras i:nth-child(7) { height: 65%; }

.marca-texto {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 0.3rem; }

.nav-links a {
    color: #C6CCD8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.06); }

.nav-links a.activo {
    color: #fff;
    background: var(--azul);
}

/* ---------- Layout ---------- */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 2.5rem 1.75rem;
}

h1 {
    font-size: 1.6rem;
    margin: 0 0 0.4rem;
    letter-spacing: -0.01em;
}

/* ---------- Dashboard (home) ---------- */
.hero {
    background: var(--tinta);
    color: #fff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero h1 { color: #fff; font-size: 1.9rem; }

.hero p {
    color: #A9B1C2;
    max-width: 480px;
    margin: 0.5rem 0 0;
}

.hero-barras {
    position: absolute;
    right: -10px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.35;
}
.hero-barras i {
    display: inline-block;
    width: 6px;
    height: 80%;
    background: var(--azul);
}
.hero-barras i:nth-child(odd) { height: 55%; background: #3E63D9; }
.hero-barras i:nth-child(3n) { height: 95%; }

.tarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.1rem;
}

.tarjeta {
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 1.4rem;
    text-decoration: none;
    color: var(--tinta);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tarjeta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 21, 31, 0.08);
    border-color: var(--azul);
}

.tarjeta-icono {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: #EEF2FF;
    color: var(--azul);
}

.tarjeta h3 { margin: 0; font-size: 1.05rem; }
.tarjeta p { margin: 0; color: var(--texto-muted); font-size: 0.9rem; line-height: 1.4; }

/* ---------- Tables ---------- */
.tabla {
    border-collapse: collapse;
    width: 100%;
    margin-top: 1.2rem;
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    overflow: hidden;
}

.tabla th, .tabla td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--borde);
    font-size: 0.9rem;
}

.tabla th {
    background: #FAFBFC;
    color: var(--texto-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.tabla tr:last-child td { border-bottom: none; }

/* ---------- Forms ---------- */
form label {
    display: block;
    margin-top: 0.9rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--texto-muted);
}

form input {
    padding: 0.55rem 0.7rem;
    width: 320px;
    max-width: 100%;
    border: 1px solid var(--borde);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    margin-top: 0.25rem;
}

form input:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(46, 91, 255, 0.15);
}

button {
    margin-top: 1.2rem;
    padding: 0.6rem 1.3rem;
    cursor: pointer;
    background: var(--azul);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.15s ease;
}

button:hover { background: var(--azul-oscuro); }

/* ---------- Marcaje (scanner) page ---------- */
#lector-container {
    background: var(--tinta);
    border-radius: var(--radio);
    padding: 1.2rem;
    display: inline-block;
}

#lector-container video {
    border-radius: 8px;
    border: none !important;
}

#resultado {
    margin-top: 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
}
