*{box-sizing:border-box}
:root{
  --bg1:#0d47a1;
  --bg2:#6a00ff;
  --panel:#ffffff12;
  --line:#ffffff30;
  --txt:#fff;
}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu;
  background:linear-gradient(135deg,var(--bg1),var(--bg2));
  color:var(--txt);
  min-height:100vh;
}
header{
  padding:16px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}
.logo{
  height:80px;
  width:auto;
  filter:drop-shadow(0 0 8px rgba(0,0,0,.35));
}
h1{margin:0;font-size:26px;line-height:1}
main{padding:16px;max-width:1100px;margin:0 auto}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:16px}
.grid{display:grid;grid-template-columns:2fr 1fr;gap:16px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:16px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
label{display:flex;flex-direction:column;gap:6px;font-size:14px}
input,button{
  padding:10px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#ffffff10;
  color:var(--txt);
}
button{cursor:pointer}
button.secondary{background:#00000030}
small,.muted{opacity:.85}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}
.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;border:1px solid var(--line)}
.ok{background:#00c85333}
.exp{background:#ff174433}
footer{padding:24px;text-align:center;opacity:.8}
.center{display:flex;align-items:center;justify-content:center;flex-direction:column}
.nav{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
a.btn{
  display:inline-block;
  padding:12px 16px;
  border:1px solid #fff;
  border-radius:12px;
  background:rgba(255,255,255,.15);
  color:#fff;
  text-decoration:none;
}
a.btn:hover{background:rgba(255,255,255,.25)}
a,.btn-link{color:#fff;text-decoration:none}
.btn-link:hover{text-decoration:underline}

/* === SCANNER === */
.scanner{
  position:relative;
  width:100%;
  max-width:480px;
  aspect-ratio:4/3;
  margin:0 auto;
  border-radius:16px;
  overflow:hidden;
  background:#000;
}
.scanner video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  z-index:1;
  visibility:visible;
  opacity:1;
}
.scanner canvas#overlay{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:2;
  pointer-events:none;
}
.scanner .frame{
  position:absolute;
  inset:12px;
  border:4px solid #33ff66aa;
  border-radius:12px;
  pointer-events:none;
  z-index:3;
}

/* === MEMBRESÍA === */
.member-box{
  margin-top:12px;
  padding:12px;
  border-radius:12px;
  background:#ffffff10;
}
.warn{background:#ffccaa;color:#000;padding:10px;border-radius:10px}

/* === RESPONSIVE === */
@media (max-width:900px){.grid{grid-template-columns:1fr}}
@media (max-width:768px){
  header{flex-direction:column;align-items:center;gap:10px;text-align:center}
  .logo{height:90px}
  h1{font-size:clamp(22px,5vw,28px);line-height:1.15}
}

/* ==== Fondo elegante solo en la pantalla inicial ==== */
body.index-screen::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.8)),
    url('billar.jpg') no-repeat center center/cover;
  opacity: 0.9; /* Ajusta la intensidad del fondo */
  z-index: -1;
  filter: blur(2px);
}

/* Mantiene todo el contenido por encima del fondo */
body.index-screen {
  position: relative;
  z-index: 1;
  background: transparent;
}

/* === LOGO AJUSTABLE CON EFECTO DE ENTRADA Y RESPLANDOR === */
body.index-screen .logo{
  height: clamp(130px, 22vw, 260px); /* Escala automática segun pantalla */
  width: auto;
  margin-bottom: 20px;
  animation: logoZoomFade 1.5s ease-out, logoGlow 3s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.35));
}

/* Animación de entrada */
@keyframes logoZoomFade {
  0% { transform: scale(0.7); opacity: 0; filter: blur(4px); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

/* Efecto de resplandor pulsante */
@keyframes logoGlow {
  0% { filter: drop-shadow(0 0 5px rgba(255,255,255,0.2)) drop-shadow(0 0 10px rgba(255,255,255,0.1)); }
  50% { filter: drop-shadow(0 0 12px rgba(255,255,255,0.4)) drop-shadow(0 0 20px rgba(255,255,255,0.3)); }
  100% { filter: drop-shadow(0 0 5px rgba(255,255,255,0.2)) drop-shadow(0 0 10px rgba(255,255,255,0.1)); }
}
/* ===== Mejora visual de bordes y botones ===== */

/* Bordes un poco ms blancos en inputs, selects, botones y links tipo botn */
input,
select,
button,
.btn,
.btn-link {
  border-color: rgba(255, 255, 255, 0.38) !important;
}

/* Hover un poco ms visible */
input:focus,
select:focus,
button:focus,
.btn:focus,
.btn-link:focus,
input:hover,
select:hover,
button:hover,
.btn:hover,
.btn-link:hover {
  border-color: rgba(255, 255, 255, 0.62) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Botn especial WhatsApp */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1.6px solid rgba(255, 255, 255, 0.35);
  background: #25D366;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.1;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
  border-color: rgba(255, 255, 255, 0.7);
  opacity: 0.96;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-whatsapp:active {
  transform: translateY(0);
}

/* Si el link de WhatsApp queda debajo del texto, que tenga aire */
#alta-msg .btn-whatsapp {
  margin-top: 10px;
}
/* ===== Select bonito para bartender y selects del sistema ===== */
select {
  width: 100%;
  min-height: 52px;
  padding: 12px 44px 12px 16px;
  border-radius: 16px;
  border: 1.6px solid rgba(255, 255, 255, 0.38) !important;
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.85) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.85) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 13px) calc(50% - 3px);
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
}

select:hover {
  border-color: rgba(255, 255, 255, 0.6) !important;
  background-color: rgba(255, 255, 255, 0.11);
}

select:focus {
  border-color: rgba(255, 255, 255, 0.72) !important;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.08);
  background-color: rgba(255, 255, 255, 0.12);
}

select option {
  background: #2d1d7a;
  color: #ffffff;
}

/* Ajuste especial por si el select de bartender queda muy angosto */
#inp-staff {
  max-width: 100%;
}