/* ============================================================
   Traductor Universal — Estilos (colores del mockup aprobado)
   ============================================================ */
:root{
  --azul:#3498db; --azul-oscuro:#2980b9;
  --verde:#27ae60;
  --rojo:#e74c3c;
  --texto:#2c3e50; --texto-suave:#607080; --muted:#9aa0a6;
  --borde:#d8dee4; --fondo:#eef2f5; --card:#ffffff;
  --radio:12px;
}
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--fondo); color:var(--texto);
  min-height:100vh; display:flex; flex-direction:column;
  -webkit-tap-highlight-color:transparent;
}
.container{
  width:100%; max-width:440px; margin:0 auto; padding:32px 20px; flex:1;
}
h1{ font-size:1.7rem; color:var(--azul); margin:0 0 4px; font-weight:700; text-align:center; }
h2{ font-size:1.3rem; margin:0 0 18px; font-weight:600; text-align:center; }
.subtitulo{ color:var(--texto-suave); text-align:center; line-height:1.5; margin:0 0 28px; }

.card{
  background:var(--card); border:1px solid var(--borde); border-radius:var(--radio);
  padding:22px; margin-bottom:16px;
}

label{ display:block; font-size:.9rem; color:var(--texto-suave); margin:14px 0 6px; }
input, select{
  width:100%; padding:12px 14px; font-size:1rem; border:1px solid var(--borde);
  border-radius:10px; background:#fff; color:var(--texto);
}
input:focus, select:focus{ outline:none; border-color:var(--azul); }

.btn{
  display:block; width:100%; text-align:center; text-decoration:none;
  padding:14px; font-size:1.05rem; font-weight:600; border:none; border-radius:10px;
  cursor:pointer; margin-top:14px;
}
.btn-azul{ background:var(--azul); color:#fff; }
.btn-verde{ background:var(--verde); color:#fff; }
.btn-borde{ background:#fff; color:var(--azul); border:1px solid var(--azul); }
.btn-texto{ background:none; color:var(--rojo); font-weight:500; }
.btn:active{ transform:scale(.99); }

.errores{
  background:#fdecea; border:1px solid #f5c6c2; color:#a33;
  padding:12px 14px; border-radius:10px; font-size:.92rem; margin-bottom:8px;
}
.errores ul{ margin:0; padding-left:18px; }
.exito{
  background:#eafaf1; border:1px solid #bde8cf; color:#1e7a48;
  padding:12px 14px; border-radius:10px; margin-bottom:8px;
}

.enlace{ display:block; text-align:center; margin-top:16px; color:var(--azul); text-decoration:none; font-size:.95rem; }

.codigo-chip{
  display:inline-block; background:#eaf2fb; color:#185fa5; font-weight:700;
  padding:10px 18px; border-radius:22px; font-size:1.25rem; letter-spacing:1px; margin-top:6px;
}

.selector-idioma{
  display:flex; justify-content:center; flex-wrap:wrap; gap:4px;
  padding:12px 10px 0; max-width:440px; margin:0 auto;
}
.selector-idioma .lang{
  text-decoration:none; color:var(--texto-suave); font-size:.8rem; font-weight:600;
  padding:4px 9px; border-radius:14px; border:1px solid transparent;
}
.selector-idioma .lang.activo{ background:#eaf2fb; color:#185fa5; border-color:#cfe0f3; }

/* --- Dashboard: eventos --- */
.ancho{ max-width:900px; }
.seccion-titulo{ font-size:1rem; font-weight:600; color:var(--texto); margin:0 0 12px; }
.evento-item{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 0; border-bottom:1px solid #eef1f4; }
.evento-item:last-child{ border-bottom:none; }
.evento-nombre{ font-size:.98rem; color:var(--texto); font-weight:500; }
.evento-codigo{ font-size:.85rem; color:var(--muted); }
.fila-acciones{ display:flex; gap:8px; align-items:center; }
.btn-mini{ border:none; border-radius:8px; padding:9px 13px; font-size:.85rem; font-weight:600; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:5px; }
.btn-mini.verde{ background:var(--verde); color:#fff; }
.btn-mini.icono{ background:#fff; border:1px solid var(--borde); color:var(--texto-suave); padding:9px 11px; }
.btn-mini.rojo{ background:#fff; border:1px solid #f0b4ae; color:var(--rojo); padding:9px 11px; }
.btn-dashed{ display:block; text-align:center; border:1px dashed #c3ccd4; color:var(--azul); font-weight:600; padding:11px; border-radius:9px; text-decoration:none; margin-top:12px; cursor:pointer; background:none; width:100%; font-size:.95rem; }
.form-inline-grupo{ display:flex; gap:8px; }
.form-inline-grupo input{ flex:1; }
.oculto{ display:none; }

/* --- Admin --- */
.admin-stats{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.stat{ flex:1; min-width:90px; background:#fff; border:1px solid var(--borde); border-radius:12px; padding:14px; text-align:center; }
.stat .num{ font-size:1.6rem; font-weight:700; color:var(--azul); }
.stat .lbl{ font-size:.8rem; color:var(--texto-suave); }
.tabla-wrap{ overflow-x:auto; background:#fff; border:1px solid var(--borde); border-radius:12px; margin-bottom:16px; }
table.datos{ width:100%; border-collapse:collapse; font-size:.88rem; }
table.datos th, table.datos td{ text-align:left; padding:10px 12px; border-bottom:1px solid #eef1f4; white-space:nowrap; }
table.datos th{ background:#f7f9fb; color:var(--texto-suave); font-weight:600; }
table.datos tr:last-child td{ border-bottom:none; }
.badge-admin{ background:#eafaf1; color:#1e7a48; font-size:.75rem; font-weight:600; padding:2px 8px; border-radius:10px; }
.sesion{ background:#fff; border:1px solid var(--borde); border-radius:12px; padding:14px; margin-bottom:10px; }
.sesion-cab{ display:flex; justify-content:space-between; align-items:center; }
.punto-vivo{ display:inline-block; width:9px; height:9px; border-radius:50%; background:#27ae60; margin-right:6px; }

/* --- Mini gráficas (admin) --- */
.mini-chart{ display:flex; align-items:flex-end; gap:6px; height:78px; overflow-x:auto; }
.mini-barra-wrap{ display:flex; flex-direction:column; align-items:center; justify-content:flex-end; flex:1; min-width:18px; height:100%; }
.mini-barra{ width:100%; max-width:16px; background:var(--azul); border-radius:3px 3px 0 0; }
.mini-barra-lbl{ font-size:.65rem; color:var(--muted); margin-top:4px; }

.barra-h-fila{ display:flex; align-items:center; gap:10px; padding:6px 0; }
.barra-h-lbl{ width:42px; font-size:.8rem; color:var(--texto-suave); font-weight:600; }
.barra-h-pista{ flex:1; background:#eef1f4; border-radius:6px; height:10px; overflow:hidden; }
.barra-h-rellena{ height:100%; background:var(--verde); border-radius:6px; }
.barra-h-num{ width:26px; text-align:right; font-size:.8rem; color:var(--texto-suave); }

.pie{ text-align:center; color:var(--muted); font-size:.8rem; padding:18px; }

.btn-instalar{ position:fixed; left:16px; right:16px; bottom:16px; max-width:410px; margin:0 auto; background:var(--verde); color:#fff; border:none; border-radius:10px; padding:14px; font-size:1rem; font-weight:600; box-shadow:0 6px 16px rgba(0,0,0,.18); z-index:50; cursor:pointer; }

/* --- QR y pantalla fija --- */
.qr-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.6); display:none; align-items:center; justify-content:center; z-index:100; padding:20px; }
.qr-overlay.abierto{ display:flex; }
.qr-caja{ background:#fff; border-radius:16px; padding:22px; text-align:center; max-width:320px; width:100%; }
.qr-caja img{ width:240px; height:240px; max-width:78vw; border-radius:8px; }
.sala-top{ display:flex; justify-content:space-between; align-items:center; gap:10px; }

/* ============================================================
   Temas para el Walkie-Talkie (Transmisor)
   ============================================================ */
:root {
  --radio-bg-1: #3a4048;
  --radio-bg-2: #22262c;
  --radio-border: rgba(255, 255, 255, 0.08);
  --lcd-bg: #0e2b28;
  --lcd-border: #08201d;
  --lcd-color: #7CFC9A;
  --lcd-color-glow: rgba(124, 252, 154, 0.6);
  --ptt-bg-1: #f39c12;
  --ptt-bg-2: #d35400;
  --ptt-border: #7a4410;
  --ptt-shadow: #7a2f0a;
  --led-off: #5a6b7b;
}

.tema-militar {
  --radio-bg-1: #556b2f;
  --radio-bg-2: #2e3b1c;
  --radio-border: rgba(255, 255, 255, 0.05);
  --lcd-bg: #1c2612;
  --lcd-border: #0f150a;
  --lcd-color: #ffd700;
  --lcd-color-glow: rgba(255, 215, 0, 0.5);
  --ptt-bg-1: #b22222;
  --ptt-bg-2: #8b0000;
  --ptt-border: #4a0000;
  --ptt-shadow: #300000;
}

.tema-cyberpunk {
  --radio-bg-1: #1e0030;
  --radio-bg-2: #050010;
  --radio-border: #ff007f;
  --lcd-bg: #0c001c;
  --lcd-border: #ff007f;
  --lcd-color: #00ffff;
  --lcd-color-glow: rgba(0, 255, 255, 0.8);
  --ptt-bg-1: #ff007f;
  --ptt-bg-2: #c00060;
  --ptt-border: #800040;
  --ptt-shadow: #500028;
}

.tema-vintage {
  --radio-bg-1: #8b4513;
  --radio-bg-2: #4a2508;
  --radio-border: rgba(255, 255, 255, 0.1);
  --lcd-bg: #2d1e10;
  --lcd-border: #1a0f05;
  --lcd-color: #ff9f43;
  --lcd-color-glow: rgba(255, 159, 67, 0.6);
  --ptt-bg-1: #cd7f32;
  --ptt-bg-2: #8c4c1c;
  --ptt-border: #5c2f0f;
  --ptt-shadow: #3d1c08;
}

