/* Kiosco OpenTPV: una sola hoja para menú, consultor y avisos. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; overflow: hidden; }
body { background: linear-gradient(135deg, #FFD101 0%, #FFA000 100%); color: #2c2c2c; }
a { color: inherit; text-decoration: none; }
#blazor-error-ui { position: fixed; bottom: 0; left: 0; right: 0; padding: 12px; background: #b00020; color: #fff; text-align: center; z-index: 1000; font-size: 18px; }
.kiosco-main { height: 100vh; }

/* Avisos a pantalla completa */
.kiosco-aviso { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #333; padding: 20px; }
.kiosco-aviso h1 { font-size: 48px; margin: 0 0 12px; }
.kiosco-aviso p { font-size: 22px; margin: 0; }

/* Marca OpenTPV */
.marca-opentpv { font-weight: 700; letter-spacing: 0.5px; }
.marca-opentpv .open, .marca-opentpv .dominio { color: #1a1a1a; }
.marca-opentpv .tpv { color: #DC143C; }
.marca-opentpv.grande { font-size: 28px; }
.pie { text-align: center; margin-top: 20px; padding-top: 15px; border-top: 1px solid #e9ecef; font-size: 12px; color: #2c2c2c; flex-shrink: 0; }

/* Tarjetas */
.consultor-contenedor { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tarjeta {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    padding: 40px 50px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.18), 0 12px 35px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 1300px;
    max-height: calc(100vh - 40px);
    overflow: hidden;
}
.tarjeta h2 { font-size: 40px; margin: 10px 0; color: #343a40; }
.tarjeta p { font-size: 22px; margin: 6px 0 18px; color: #495057; }
.tarjeta.error h2 { color: #CA151A; }
.logo-empresa { display: block; margin: 0 auto 12px; object-fit: contain; }
.nombre-empresa { color: #343a40; font-weight: 700; margin-bottom: 20px; letter-spacing: 1px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); word-wrap: break-word; }

/* Producto */
.fila-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; color: #6c757d; }
.codigo { font-family: Consolas, "Courier New", monospace; letter-spacing: 1px; }
.lista { background: rgba(73, 80, 87, 0.08); border-radius: 30px; padding: 4px 14px; }
.descripcion { font-weight: 800; color: #212529; line-height: 1.1; margin: 10px 0; word-wrap: break-word; overflow-wrap: break-word; }
.marca { display: inline-block; align-self: center; padding: 8px 25px; background: rgba(73, 80, 87, 0.05); border-radius: 20px; color: #495057; margin-bottom: 10px; }
.precio {
    color: #CA151A;
    font-weight: 900;
    margin: 15px 0;
    padding: 25px 20px;
    background: linear-gradient(135deg, rgba(202, 21, 26, 0.08), rgba(202, 21, 26, 0.03));
    border-radius: 25px;
    border: 3px solid rgba(202, 21, 26, 0.15);
    box-shadow: 0 8px 25px rgba(202, 21, 26, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-shadow: 0 3px 8px rgba(202, 21, 26, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}
.precio .unidad { font-size: 0.35em; font-weight: 600; opacity: 0.8; }
.precio-lista.tachado { font-size: 40px; color: #6c757d; text-decoration: line-through; opacity: 0.7; }
.promocion { font-size: 28px; font-weight: 700; color: #1b8f3a; background: rgba(27, 143, 58, 0.08); border-radius: 20px; padding: 8px 20px; align-self: center; }
.etiqueta { font-size: 30px; color: #343a40; margin-top: 12px; }

/* Animación de escaneo */
.animacion-escaneo { position: relative; height: 30px; background: linear-gradient(90deg, transparent 0%, rgba(255, 209, 1, 0.1) 50%, transparent 100%); border-radius: 8px; overflow: hidden; margin: 0 auto 15px; width: 60%; }
.animacion-escaneo .linea { position: absolute; top: 50%; left: -10px; width: 2px; height: 15px; background: #FFD101; transform: translateY(-50%); animation: escaneo 2s ease-in-out infinite; box-shadow: 0 0 10px #FFD101; }
@keyframes escaneo { 0% { left: -10px; } 100% { left: calc(100% + 10px); } }
@keyframes aparecer { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.animar { animation: aparecer 0.5s ease-out; }

/* Menú por perfil */
.menu-contenedor { display: grid; grid-template-columns: 320px 1fr; height: 100vh; }
.menu-lateral { background: rgba(255, 255, 255, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 30px; text-align: center; }
.menu-logo { max-width: 240px; max-height: 160px; object-fit: contain; }
.menu-empresa { font-size: 26px; margin: 0; color: #343a40; }
.menu-principal { padding: 40px; overflow: auto; }
.menu-principal h1 { font-size: 44px; color: #212529; margin: 0 0 30px; }
.menu-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.menu-tarjeta { background: #fff; border-radius: 20px; padding: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12); transition: transform 0.15s ease; color: #212529; }
.menu-tarjeta:hover, .menu-tarjeta:active { transform: translateY(-4px); }
.menu-icono { color: #CA151A; }
.menu-titulo { font-size: 26px; font-weight: 700; }
.menu-texto { font-size: 16px; color: #6c757d; text-align: center; }

/* Gesto de supervisor */
.gesto-zona { position: fixed; top: 0; left: 0; width: 120px; height: 120px; z-index: 50; }
.gesto-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
.gesto-caja { background: #fff; border-radius: 16px; padding: 30px; width: min(420px, 90vw); text-align: center; }
.gesto-caja h3 { margin: 0 0 16px; font-size: 24px; }
.gesto-caja input { width: 100%; font-size: 28px; padding: 10px; text-align: center; border: 2px solid #ced4da; border-radius: 10px; }
.gesto-error { color: #CA151A; margin: 10px 0 0; }
.gesto-botones { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
.gesto-botones button { font-size: 20px; padding: 10px 24px; border-radius: 10px; border: 1px solid #ced4da; background: #f8f9fa; }
.gesto-botones button.primario { background: #CA151A; color: #fff; border-color: #CA151A; }

@media (max-width: 900px) {
    .tarjeta { padding: 24px; }
    .menu-contenedor { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .menu-principal h1 { font-size: 32px; }
}
