/* SGCE · diversos.css — extraído de index.html (divisão por seção; cascata preservada) */
/* ── CARREGANDO AGORA (tempo real) ── */
.live-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:14px; margin-bottom:6px; }
.live-card { background:var(--g700); border:1px solid var(--g500); border-left:3px solid var(--accent); border-radius:10px; padding:14px 16px; }
.live-head { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text); margin-bottom:6px; }
.live-pulse { width:9px; height:9px; border-radius:50%; background:var(--accent); flex-shrink:0; animation:livepulse 1.4s ease-in-out infinite; }
.live-pulse.idle { background:var(--gold); }
.live-card.live-idle { border-left-color:var(--gold); }
@keyframes livepulse { 0%,100%{ box-shadow:0 0 0 0 rgba(93,189,93,.55);} 50%{ box-shadow:0 0 0 6px rgba(93,189,93,0);} }
.live-user { font-size:12px; color:var(--text2); margin-bottom:10px; }
.live-metrics { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; font-size:10px; color:var(--text3); text-transform:uppercase; letter-spacing:.4px; margin-bottom:12px; }
.live-metrics span { display:block; font-size:17px; font-weight:700; color:var(--text); letter-spacing:0; text-transform:none; }
.live-stop { width:100%; background:transparent; border:1px solid var(--red); color:var(--red); border-radius:7px; padding:8px 0; font-size:11px; font-weight:700; cursor:pointer; transition:all .15s; }
.live-idle-bar { font-size:11px; font-weight:600; border-radius:7px; padding:7px 11px; margin-bottom:8px; display:flex; align-items:center; gap:7px; }
.live-idle-bar.within  { background:rgba(93,189,93,.12);  color:#5dbd5d; border:1px solid rgba(93,189,93,.3); }
.live-idle-bar.billing { background:rgba(240,180,41,.13); color:var(--gold); border:1px solid rgba(240,180,41,.35); }
.live-stop:hover:not(:disabled) { background:var(--red); color:#fff; }
.live-stop:disabled { opacity:.45; cursor:not-allowed; }
/* ── QR Scanner — tela cheia mobile ─────────────────────────── */
#qr-scan-overlay {
  position: fixed; inset: 0; background: #000;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; z-index: 9999;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}
.qr-scan-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; position: relative; z-index: 2;
}
.qr-scan-header-title { color: #fff; font-size: 16px; font-weight: 700; }
.qr-scan-header-sub  { color: rgba(255,255,255,.55); font-size: 12px; margin-top: 2px; }
#qr-scan-close-btn {
  background: rgba(255,255,255,.12); border: none; color: #fff;
  border-radius: 50%; width: 36px; height: 36px; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.qr-viewfinder-wrap {
  flex: 1; width: 100%; display: flex; align-items: center; justify-content: center;
  position: relative;
}
#qr-reader { width: 100%; height: 100%; }
#qr-reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.qr-frame-corners {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  display: flex; align-items: center; justify-content: center;
}
.qr-frame-corners::before, .qr-frame-corners::after,
.qr-corner-bl, .qr-corner-br {
  content: ''; position: absolute; width: 44px; height: 44px;
  border-color: #4be087; border-style: solid; border-width: 0;
}
.qr-frame-corners::before { top: calc(50% - 110px); left: calc(50% - 110px); border-top-width: 4px; border-left-width: 4px; border-radius: 6px 0 0 0; }
.qr-frame-corners::after  { top: calc(50% - 110px); right: calc(50% - 110px); border-top-width: 4px; border-right-width: 4px; border-radius: 0 6px 0 0; }
.qr-corner-bl { bottom: calc(50% - 110px); left: calc(50% - 110px); border-bottom-width: 4px; border-left-width: 4px; border-radius: 0 0 0 6px; }
.qr-corner-br { bottom: calc(50% - 110px); right: calc(50% - 110px); border-bottom-width: 4px; border-right-width: 4px; border-radius: 0 0 6px 0; }
.qr-scan-line {
  position: absolute; left: calc(50% - 106px); width: 212px; height: 2px;
  background: linear-gradient(90deg, transparent, #4be087, transparent);
  animation: qr-scan-anim 2s ease-in-out infinite; z-index: 4;
}
@keyframes qr-scan-anim {
  0%   { top: calc(50% - 106px); opacity:1; }
  48%  { top: calc(50% + 106px); opacity:1; }
  50%  { opacity: 0; }
  52%  { top: calc(50% - 106px); opacity:0; }
  54%  { opacity: 1; }
  100% { top: calc(50% + 106px); opacity:1; }
}
.qr-scan-hint {
  color: rgba(255,255,255,.7); font-size: 13px; text-align: center;
  padding: 14px 24px 6px; z-index: 2;
}
.qr-scan-footer {
  width: 100%; padding: 14px 24px 28px; z-index: 2; display: flex; gap: 10px;
}
.qr-btn-cancel {
  flex: 1; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 12px; padding: 15px; font-size: 15px; cursor: pointer;
}
.qr-btn-manual {
  flex: 1; background: var(--accent); border: none;
  color: #fff; border-radius: 12px; padding: 15px; font-size: 15px;
  cursor: pointer; font-weight: 600;
}
/* ── Botão QR hero (mobile) ─────────────────────────────────── */
.qr-hero-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; background: var(--accent); border: none; color: #fff;
  border-radius: 16px; padding: 18px 24px; font-size: 16px; font-weight: 700;
  cursor: pointer; width: 100%; box-shadow: 0 4px 20px rgba(26,107,58,.4);
  letter-spacing: 0.2px;
}
.qr-hero-btn i { font-size: 32px; }
.qr-hero-btn span { font-size: 11px; font-weight: 400; opacity: .8; margin-top: -2px; }
.live-empty { background:var(--g700); border:1px dashed var(--g500); border-radius:10px; padding:18px; text-align:center; font-size:12px; color:var(--text3); margin-bottom:6px; }

.btn-login:disabled { opacity: 0.7; cursor: not-allowed; }

/* IDENTIDADE DA INSTITUIÇÃO */
.cfg-inst-note {
  font-size: 11px; color: var(--text3); background: var(--g700);
  border: 1px solid var(--g500); border-radius: 6px;
  padding: 9px 13px; margin-bottom: 16px; line-height: 1.6;
}




/* BOTÕES DE TEMA */
.tema-btn {
  padding: 7px 16px; border-radius: 20px; border: 2px solid var(--g500);
  background: var(--g700); color: var(--text2); font-size: 12px; cursor: pointer;
  transition: all .15s; display: inline-flex; align-items: center; gap: 7px;
}
.tema-btn:hover { border-color: var(--accent); color: var(--text); }
.tema-btn.ativo  { border-color: var(--accent); background: var(--g600); color: var(--text); font-weight: 600; }
.tema-btn::before { content:''; display:inline-block; width:10px; height:10px; border-radius:50%; background: var(--accent); flex-shrink:0; }
#tbtn-verde::before   { background:#5dbd5d; }
#tbtn-azul::before    { background:#4db6e8; }
#tbtn-roxo::before    { background:#9b7fe8; }
#tbtn-laranja::before { background:#e8954d; }
#tbtn-cinza::before   { background:#8892b0; }


/* AVATAR COM FOTO */
.user-av-foto {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: cover; display: block;
}
#perfil-avatar-foto {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--accent);
}
.foto-upload-area {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  padding: 16px; background: var(--g700); border: 1px solid var(--g600);
  border-radius: 10px;
}
/* BOTÃO EDITAR USUÁRIO / ESTAÇÃO */
.btn-edit-usr, .btn-edit-est {
  background: none; border: 1px solid var(--g500); border-radius: 5px;
  padding: 4px 12px; color: var(--text3); font-size: 11px; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.btn-edit-usr:hover, .btn-edit-est:hover { border-color: var(--accent); color: var(--accent); }
.btn-del {
  background: none; border: 1px solid var(--g500); border-radius: 5px;
  padding: 4px 12px; color: var(--text3); font-size: 11px; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.btn-del:hover { border-color: var(--red); color: var(--red); }
.btn-del-perm { padding: 4px 9px; font-size: 12px; }
.btn-del-perm:hover { background: rgba(224,80,80,0.12); }
.btn-edit-usr:hover { border-color: var(--accent); color: var(--accent); }

/* ══════════════════════════════════════════════════════
   RESPONSIVIDADE MOBILE — cobertura completa
   ══════════════════════════════════════════════════════ */

/* Fix base: login box fluido */
.lbox { width: min(360px, 94vw) !important; }

/* Fix base: tabelas sempre com scroll */
.tw { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }

