body {
    background: #f4f5f7;
}

/* Header/footer de marca, compartidos por todas las páginas del panel */
.idear-brand-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 14px 16px;
    text-align: center;
}

.idear-brand-logo {
    max-height: 52px;
    width: auto;
}

.idear-vorknext-footer {
    text-align: center;
    padding: 18px 16px 28px;
}

.idear-vorknext-footer a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 12px;
    text-decoration: none;
}

.idear-vorknext-footer a:hover {
    color: #555;
}

.idear-vorknext-logo {
    height: 34px;
    width: auto;
}

/* Variante para la pantalla oscura del lector de puerta */
.puerta-header-logo {
    height: 26px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
    /* el logo es negro sobre transparente: se invierte a blanco para que
       se lea sobre el fondo oscuro del lector */
    filter: brightness(0) invert(1);
}

.idear-vorknext-footer-dark {
    padding: 6px 16px 10px;
}

.idear-vorknext-footer-dark a {
    color: #999;
}

/* Puerta / lector QR */
.puerta-body {
    margin: 0;
    background: #111;
    color: #fff;
    font-family: -apple-system, Helvetica, Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
}

#puerta-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.puerta-header {
    padding: 12px 16px;
    background: #000;
    font-size: 14px;
    text-align: center;
    letter-spacing: .02em;
}

#reader {
    flex: 1;
    background: #000;
}

#reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.estado {
    padding: 10px 16px;
    text-align: center;
    font-size: 14px;
    color: #aaa;
    background: #000;
}

.resultado {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    transition: opacity .15s ease;
    /* Mantener presionado para pausar no tiene que disparar la selección de
       texto ni el menú de "copiar" nativo del navegador en mobile. */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.resultado.oculto {
    display: none;
}

.resultado.ok {
    background: rgba(16, 124, 65, 0.97);
}

.resultado.error {
    background: rgba(180, 30, 30, 0.97);
}

.resultado.ok.dosxuno {
    background: rgba(29, 78, 216, 0.97);
}

.resultado-badge-2x1 {
    display: inline-block;
    background: #fff;
    color: #1d4ed8;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: .03em;
    padding: 8px 22px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.resultado-badge-2x1.oculto {
    display: none;
}

.resultado-hint {
    position: absolute;
    bottom: 22px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 13px;
    opacity: .75;
    letter-spacing: .02em;
}

.audio-hint {
    padding: 8px 16px;
    text-align: center;
    font-size: 13px;
    color: #ffcf5c;
    background: #000;
    border-top: 1px solid #222;
}

.audio-hint.oculto {
    display: none;
}

.resultado-icono {
    font-size: 90px;
    line-height: 1;
    margin-bottom: 16px;
}

.resultado-titulo {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
}

.resultado-detalle {
    font-size: 18px;
    opacity: .92;
    max-width: 480px;
}

@keyframes flashOk {
    0% { background: #0c3; }
    100% { background: #111; }
}

@keyframes flashError {
    0% { background: #c00; }
    100% { background: #111; }
}

body.flash-ok {
    animation: flashOk .6s ease-out;
}

body.flash-error {
    animation: flashError .6s ease-out;
}
