/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* BODY + FONDO CON LOGO */
body {
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 0;
}

/* Marca de agua de fondo */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("/rfid/imagenes/macpherson-logo.png") center center no-repeat;
    background-size: 60%;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}


/* Contenedor principal */
.contenedor {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    text-align: center;
    padding: 20px;
}

/* LOGO SUPERIOR */
.logo {
    width: 100%;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.94);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.logo img {
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
    display: block;
}

/* Reloj */
.reloj {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 28px;
    letter-spacing: 2px;
}

/* Formulario */
.formulario {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Input */
.formulario input {
    padding: 18px;
    font-size: 20px;
    border-radius: 10px;
    border: none;
    outline: none;
    text-align: center;
    background: #1e293b;
    color: #ffffff;
}

/* Botón */
.formulario button {
    padding: 16px;
    font-size: 18px;
    border-radius: 10px;
    border: none;
    background: #2563eb;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.formulario button:hover {
    background: #1d4ed8;
}

/* Teclado numérico */
.teclado {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.teclado button {
    padding: 20px;
    font-size: 22px;
    border: none;
    border-radius: 12px;
    background: #1e293b;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.teclado button:hover {
    background: #334155;
}

.teclado button:active {
    transform: scale(0.98);
}

/* Responsive para pantallas más bajas o estrechas */
@media (max-width: 768px) {
    body::before {
        background-size: 85%;
        opacity: 0.40;
    }

    .contenedor {
        max-width: 95%;
        padding: 14px;
    }

    .logo {
        margin-bottom: 16px;
        padding: 12px;
    }

    .logo img {
        max-height: 70px;
    }

    .reloj {
        font-size: 34px;
        margin-bottom: 20px;
    }

    .formulario {
        gap: 14px;
    }

    .formulario input {
        padding: 16px;
        font-size: 18px;
    }

    .formulario button {
        padding: 14px;
        font-size: 17px;
    }

    .teclado {
        margin-top: 20px;
        gap: 12px;
    }

    .teclado button {
        padding: 18px;
        font-size: 18px;
    }
}

.mensaje-resultado {
    margin-top: 18px;
    padding: 16px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.mensaje-resultado.ok {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #dcfce7;
}

.mensaje-resultado.error {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fee2e2;
}

.oculto {
    display: none;
}
