/* ==========================================================
   MESA DE AYUDA INFORMÁTICA
   Diseño simple, de letra grande y alto contraste,
   pensado para que sea fácil de leer y de usar.
   ========================================================== */

:root {
    --azul:            #1d4e89;
    --azul-oscuro:     #14375f;
    --azul-claro:      #e8f0fa;
    --verde:           #1e7a46;
    --verde-oscuro:    #165c35;
    --rojo:            #b3261e;
    --rojo-oscuro:     #8c1d17;
    --naranja:         #b45309;
    --gris-texto:      #1f2933;
    --gris-suave:      #52606d;
    --gris-borde:      #cbd2d9;
    --gris-fondo:      #f3f5f8;
    --blanco:          #ffffff;
    --radio:           10px;
    --sombra:          0 1px 3px rgba(16, 42, 67, .12), 0 4px 12px rgba(16, 42, 67, .06);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 18px;
}

body {
    margin: 0;
    background: var(--gris-fondo);
    color: var(--gris-texto);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    color: var(--azul-oscuro);
    line-height: 1.25;
    margin: 0 0 .6em;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; margin-top: 1.4em; }
h3 { font-size: 1.15rem; }

p {
    margin: 0 0 1em;
}

a {
    color: var(--azul);
    font-weight: 600;
}

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

hr {
    border: 0;
    border-top: 1px solid var(--gris-borde);
    margin: 1.6em 0;
}

small,
.ayuda {
    color: var(--gris-suave);
    font-size: .9rem;
}

img {
    max-width: 100%;
    height: auto;
}

:focus-visible {
    outline: 3px solid #f5a623;
    outline-offset: 2px;
}

/* ---------- Estructura ---------- */

.contenedor {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 40px;
    flex: 1;
}

.contenedor-estrecho {
    max-width: 640px;
}

.sin-menu .contenedor {
    padding-top: 40px;
}

.pie {
    text-align: center;
    color: var(--gris-suave);
    font-size: .85rem;
    padding: 18px 10px 24px;
}

.tarjeta {
    background: var(--blanco);
    border: 1px solid var(--gris-borde);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 26px;
    margin-bottom: 24px;
}

.tarjeta-laboratorio {
    max-width: 720px;
    border: 0;
    border-top: 6px solid var(--azul);
    padding: 34px;
    box-shadow: 0 8px 24px rgba(16, 42, 67, .14);
}

.formulario-laboratorio {
    max-width: none;
}

.campo-nombre-laboratorio input {
    max-width: 220px;
    min-height: 60px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .12em;
    background: var(--azul-claro);
    border-color: var(--azul);
}

.campo-nombre-laboratorio small {
    display: block;
    margin-top: 6px;
}

.campo-nombre-laboratorio input:focus {
    background: var(--blanco);
}

.encabezado-pagina {
    margin-bottom: 20px;
}

.encabezado-pagina h1 {
    margin-bottom: .2em;
}

.encabezado-pagina p {
    color: var(--gris-suave);
    margin: 0;
}

/* ---------- Menú superior ---------- */

.menu {
    background: var(--azul-oscuro);
    color: var(--blanco);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.menu-interior {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 30px;
    flex-wrap: wrap;
}

.menu-titulo {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .2px;
}

.menu-enlaces {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.menu-enlaces a {
    color: var(--blanco);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
}

.menu-enlaces a:hover {
    background: rgba(255, 255, 255, .15);
    color: var(--blanco);
}

.menu-enlaces a.activo {
    background: var(--blanco);
    color: var(--azul-oscuro);
}

.menu-enlaces a.menu-salir {
    border: 1px solid rgba(255, 255, 255, .55);
}

/* ---------- Botones ---------- */

.btn,
button {
    display: inline-block;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 22px;
    min-height: 48px;
    background: var(--azul);
    color: var(--blanco) !important;
    transition: background .15s;
}

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

.btn-primario  { background: var(--azul); }
.btn-exito     { background: var(--verde); }
.btn-exito:hover { background: var(--verde-oscuro); }
.btn-peligro   { background: var(--rojo); }
.btn-peligro:hover { background: var(--rojo-oscuro); }

.btn-secundario {
    background: var(--blanco);
    color: var(--azul) !important;
    border-color: var(--azul);
}

.btn-secundario:hover {
    background: var(--azul-claro);
}

.btn-chico {
    font-size: .95rem;
    padding: 8px 14px;
    min-height: 40px;
}

.barra-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- Formularios ---------- */

.formulario {
    max-width: 640px;
}

.campo {
    margin-bottom: 22px;
}

label,
.etiqueta {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: var(--gris-texto);
    background: var(--blanco);
    border: 2px solid var(--gris-borde);
    border-radius: 8px;
    padding: 12px 14px;
    min-height: 48px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--azul);
    outline: 3px solid rgba(29, 78, 137, .25);
    outline-offset: 0;
}

textarea {
    resize: vertical;
    min-height: 130px;
}

.opciones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.opcion {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    margin: 0;
    padding: 12px 14px;
    background: var(--gris-fondo);
    border: 2px solid var(--gris-borde);
    border-radius: 8px;
    cursor: pointer;
}

.opcion:hover {
    border-color: var(--azul);
}

.opcion input[type="checkbox"] {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    accent-color: var(--azul);
}

.acciones-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

fieldset {
    border: 1px solid var(--gris-borde);
    border-radius: var(--radio);
    padding: 16px 18px 6px;
    margin: 0 0 22px;
}

legend {
    font-weight: 700;
    padding: 0 8px;
    color: var(--azul-oscuro);
}

.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filtros .campo {
    margin-bottom: 0;
    flex: 1 1 220px;
}

/* ---------- Avisos ---------- */

.alerta {
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    border: 1px solid;
    font-weight: 600;
}

.alerta-error {
    background: #fdecea;
    border-color: #f1aeb5;
    color: #7a1710;
}

.alerta-exito {
    background: #e6f4ea;
    border-color: #a8d5b5;
    color: #14532d;
}

.alerta-info {
    background: var(--azul-claro);
    border-color: #b5cde8;
    color: var(--azul-oscuro);
}

/* ---------- Tablas ---------- */

.tabla-responsive {
    overflow-x: auto;
    border: 1px solid var(--gris-borde);
    border-radius: var(--radio);
    background: var(--blanco);
    box-shadow: var(--sombra);
    margin-bottom: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--blanco);
}

th {
    background: var(--azul);
    color: var(--blanco);
    text-align: left;
    font-size: .95rem;
    padding: 14px 16px;
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    border-top: 1px solid var(--gris-borde);
    vertical-align: middle;
}

tbody tr:nth-child(even),
table tr:nth-child(even) td {
    background: #f8fafc;
}

table tr:hover td {
    background: var(--azul-claro);
}

.sin-datos {
    text-align: center;
    color: var(--gris-suave);
    padding: 30px 16px;
}

/* Tabla de dos columnas (ficha de datos) */
.ficha td:first-child {
    font-weight: 700;
    width: 32%;
    background: var(--gris-fondo);
}

.ficha tr:hover td {
    background: inherit;
}

.ficha tr:hover td:first-child {
    background: var(--gris-fondo);
}

/* ---------- Estados de tickets y computadoras ---------- */

.estado {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .9rem;
    font-weight: 700;
    white-space: nowrap;
    border: 2px solid;
}

.abierto,
.operativa {
    background: #e6f4ea;
    color: #14532d;
    border-color: #1e7a46;
}

.pendiente {
    background: #fff4d6;
    color: #7a4b00;
    border-color: #d99a00;
}

.cerrado,
.fuera-servicio {
    background: #eceff1;
    color: #37474f;
    border-color: #78909c;
}

.fuera-servicio {
    background: #fdecea;
    color: #7a1710;
    border-color: #b3261e;
}

/* ---------- Pantalla de inicio (botones grandes) ---------- */

.grilla-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.opcion-grande {
    display: block;
    background: var(--blanco);
    border: 2px solid var(--gris-borde);
    border-left: 8px solid var(--azul);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 24px;
    text-decoration: none;
    color: var(--gris-texto);
}

.opcion-grande:hover {
    border-color: var(--azul);
    background: var(--azul-claro);
    color: var(--gris-texto);
}

.opcion-grande strong {
    display: block;
    font-size: 1.25rem;
    color: var(--azul-oscuro);
    margin-bottom: 4px;
}

.opcion-grande span {
    color: var(--gris-suave);
    font-weight: 400;
}

/* ---------- Resumen (dashboard) ---------- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 10px;
}

.card {
    background: var(--blanco);
    border: 1px solid var(--gris-borde);
    border-left: 8px solid var(--azul);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 20px;
}

.card h3 {
    color: var(--gris-suave);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.card .numero {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--gris-texto);
}

.card.azul    { border-left-color: var(--azul); }
.card.verde   { border-left-color: var(--verde); }
.card.rojo    { border-left-color: var(--rojo); }
.card.naranja { border-left-color: #d99a00; }
.card.gris    { border-left-color: #78909c; }

/* ---------- Inicio de sesión ---------- */

.login {
    max-width: 440px;
    margin: 30px auto 0;
}

.login-marca {
    text-align: center;
    margin-bottom: 22px;
}

.login-marca h1 {
    margin-bottom: .15em;
}

.login-marca p {
    color: var(--gris-suave);
    margin: 0;
}

.login button {
    width: 100%;
}

/* ---------- Varios ---------- */

.foto-ticket {
    max-width: 320px;
    max-height: 320px;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    display: block;
}

.texto-ticket {
    background: var(--gris-fondo);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0;
}

/* ---------- Pantallas chicas ---------- */

@media (max-width: 700px) {

    html {
        font-size: 17px;
    }

    .menu-interior {
        flex-direction: column;
        align-items: flex-start;
    }

    .tarjeta {
        padding: 18px;
    }

    .btn,
    button {
        width: 100%;
    }

    .acciones .btn,
    .acciones button {
        width: auto;
    }

    .barra-acciones .btn {
        width: 100%;
    }
}

/* ---------- Impresión ---------- */

@media print {
    .menu,
    .pie,
    .barra-acciones,
    .btn {
        display: none !important;
    }

    body {
        background: #fff;
    }
}
