/* ═══════════ 🙋 Chamada (attendance.js) + 🎤 Chamada lúdica (attendance-fun.js) ═══════════ */

.fq-filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 12px; }
.fq-date { display: flex; align-items: center; gap: 4px; }
.fq-date input { width: auto; padding: 5px 8px; }
.fq-lessons { display: flex; align-items: center; gap: 4px; font-size: 0.66rem; font-weight: 800; color: var(--muted2); }
.fq-ln {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  background: var(--bg3); border: 1px solid var(--border); color: var(--muted2);
  font-weight: 900; font-size: 0.78rem;
}
.fq-ln.active { background: var(--gold3); border-color: var(--gold); color: var(--gold); }

.fq-topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.fq-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.fq-counts { display: flex; gap: 6px; flex-wrap: wrap; }
.fq-count { padding: 5px 10px; border-radius: 8px; font-weight: 900; font-size: 0.82rem; background: var(--bg2); border: 1px solid var(--border); }
.fq-count.p { color: var(--green); }
.fq-count.f { color: var(--red); }
.fq-count.a { color: var(--orange); }
.fq-count.j { color: var(--purple); }
.fq-state { margin-bottom: 6px; font-size: 0.7rem; }
.fq-st { color: var(--muted2); font-weight: 700; }
.fq-st.ok { color: var(--green); }
.fq-st.warn { color: var(--orange); }

/* ── Cards de aluno ── */
.fq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 7px; }
.fq-stu {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  min-height: 58px; padding: 7px 9px;
  border-radius: 10px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--border);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation;
  transition: background .12s, border-color .12s, transform .08s;
}
.fq-stu:active { transform: scale(0.98); }
.fq-n { position: absolute; top: 3px; left: 6px; font-size: 0.52rem; color: var(--muted); font-weight: 800; }
.fq-av { flex-shrink: 0; font-size: 1.3rem; line-height: 1; }
.fq-info { flex: 1; min-width: 0; }
.fq-nm { font-size: 0.74rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fq-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.fq-streak { font-size: 0.58rem; font-weight: 800; color: var(--gold); }
.fq-pct { font-size: 0.56rem; font-weight: 800; padding: 0 4px; border-radius: 4px; }
.fq-pct.bad { color: var(--red); background: rgba(248, 113, 113, 0.12); }
.fq-pct.warn { color: var(--orange); background: rgba(251, 146, 60, 0.12); }
.fq-badge { display: flex; flex-direction: column; align-items: center; font-size: 1.05rem; line-height: 1.1; flex-shrink: 0; }
.fq-badge span { font-size: 0.5rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.3px; margin-top: 1px; }
.fq-miss {
  margin-top: 3px !important; font-size: 0.62rem !important; text-transform: none !important;
  padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.3); border: 1px solid currentColor;
}
.fq-stu.st-p .fq-badge { color: var(--green); }
.fq-stu.st-f { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.45); }
.fq-stu.st-f .fq-badge { color: var(--red); }
.fq-stu.st-a { background: rgba(251, 146, 60, 0.1); border-color: rgba(251, 146, 60, 0.45); }
.fq-stu.st-a .fq-badge { color: var(--orange); }
.fq-stu.st-j { background: rgba(167, 139, 250, 0.1); border-color: rgba(167, 139, 250, 0.45); }
.fq-stu.st-j .fq-badge { color: var(--purple); }
.fq-actionbar { display: flex; gap: 8px; align-items: center; }

/* ── Frequência ── */
.fq-table td { font-size: 0.72rem; }
.fq-bar { position: relative; height: 18px; border-radius: 9px; background: var(--bg3); overflow: hidden; min-width: 96px; }
.fq-bar-in { height: 100%; background: var(--green); opacity: 0.5; }
.fq-bar-in.warn { background: var(--orange); }
.fq-bar-in.bad { background: var(--red); }
.fq-bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.64rem; font-weight: 900; }
.fq-dots { text-align: left !important; }
.fq-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 2px; background: var(--border2); }
.fq-dot.p { background: var(--green); }
.fq-dot.a { background: var(--orange); }
.fq-dot.f { background: var(--red); }
.fq-dot.j { background: var(--purple); }
.fq-alert { font-size: 0.62rem !important; font-weight: 800; text-align: left !important; }
.fq-alert.bad { color: var(--red); }
.fq-alert.warn { color: var(--orange); }
.fq-sess-list { display: flex; flex-wrap: wrap; gap: 5px; }
.fq-sess {
  font-size: 0.66rem; padding: 5px 9px; border-radius: 8px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--border); color: var(--muted2);
}
.fq-sess:hover { color: var(--text); border-color: var(--border2); }
.fq-sess b { color: var(--green); }
.fq-sess b.fq-f { color: var(--red); }

.fq-sum-row { padding: 5px 0; border-top: 1px solid var(--border); }
.fq-sum-row:first-of-type { border-top: 0; }
.fq-sum-s { font-size: 0.74rem; font-weight: 800; margin-bottom: 4px; }
.fq-sum-d { font-size: 0.64rem; color: var(--muted2); margin-top: 3px; }

@media (max-width: 600px) {
  .fq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .fq-stu { padding: 6px 7px; gap: 6px; min-height: 54px; }
  .fq-av { font-size: 1.1rem; }
  .fq-nm { font-size: 0.68rem; }
  .fq-date input { max-width: 140px; }
}

/* ═══════════ 🎤 Chamada lúdica (tela cheia) ═══════════ */
#lc-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9990;
  background: radial-gradient(ellipse at top, #1a1f3a 0%, #080B14 70%);
  color: var(--text);
  overflow-y: auto;
}
#lc-overlay.open { display: block; }
.lc-setup, .lc-run, .lc-end { max-width: 1100px; margin: 0 auto; padding: 16px 18px 30px; min-height: 100%; display: flex; flex-direction: column; }
.lc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lc-title { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.05rem; color: var(--gold); flex: 1; }
.lc-x {
  background: var(--bg3); border: 1px solid var(--border2); color: var(--muted2);
  border-radius: 9px; padding: 7px 12px; cursor: pointer; font-weight: 800; font-size: 0.78rem;
}
.lc-x:hover { color: var(--text); }
.lc-sec { font-size: 0.66rem; font-weight: 900; color: var(--muted2); text-transform: uppercase; letter-spacing: 0.6px; margin: 16px 0 8px; }
.lc-ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px; }
.lc-ch { padding: 10px 12px; border-radius: 10px; cursor: pointer; background: var(--bg2); border: 1px solid var(--border); }
.lc-ch:hover { border-color: var(--border2); }
.lc-ch.active { border-color: var(--gold); background: var(--gold3); }
.lc-ch-l { font-weight: 800; font-size: 0.8rem; }
.lc-ch.active .lc-ch-l { color: var(--gold); }
.lc-ch-h { font-size: 0.62rem; color: var(--muted2); margin-top: 2px; }
.lc-prompt { margin-top: 10px; font-size: 0.9rem; }
.lc-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: 0.76rem; font-weight: 700; color: var(--muted2); }
.lc-row > span:first-child { min-width: 110px; }
.lc-chk { cursor: pointer; }
.lc-note { font-size: 0.64rem; color: var(--muted); font-weight: 600; }
.lc-pill {
  padding: 7px 12px; border-radius: 16px; cursor: pointer;
  background: var(--bg3); border: 1px solid var(--border); color: var(--muted2);
  font-weight: 800; font-size: 0.74rem;
}
.lc-pill.active { background: var(--gold3); border-color: var(--gold); color: var(--gold); }
.lc-start { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.lc-btn {
  border: 0; border-radius: 12px; cursor: pointer;
  padding: 14px 18px; min-height: 56px;
  font: inherit; font-weight: 900; font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .08s, filter .12s;
}
.lc-btn:hover { filter: brightness(1.1); }
.lc-btn:active { transform: scale(0.97); }
.lc-btn:disabled { opacity: 0.4; cursor: default; }
.lc-btn kbd { font-size: 0.6rem; font-family: inherit; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.25); opacity: 0.8; }
.lc-btn.go { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #000; min-width: 260px; }
.lc-btn.ok { background: linear-gradient(135deg, #10b981, var(--green)); color: #00110a; }
.lc-btn.p { background: rgba(52, 211, 153, 0.16); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.4); }
.lc-btn.a { background: rgba(251, 146, 60, 0.16); color: var(--orange); border: 1px solid rgba(251, 146, 60, 0.4); }
.lc-btn.f { background: rgba(248, 113, 113, 0.16); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.4); }
.lc-btn.later, .lc-btn.back { background: var(--bg3); color: var(--muted2); border: 1px solid var(--border2); }

.lc-prog { flex: 1; height: 8px; border-radius: 4px; background: var(--bg3); overflow: hidden; }
.lc-prog-in { height: 100%; background: linear-gradient(90deg, var(--teal), var(--green)); transition: width .3s; }
.lc-stats { font-weight: 900; font-size: 0.82rem; white-space: nowrap; }

.lc-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 14px 0; }
.lc-who { display: flex; align-items: center; gap: 18px; animation: lcIn .35s ease; }
.lc-av { font-size: clamp(3rem, 8vw, 5.5rem); line-height: 1; }
.lc-av img, .lc-av svg, .lc-av canvas { width: clamp(64px, 11vw, 120px) !important; height: auto !important; }
.lc-av > *, .lc-av .s-avatar-emoji { font-size: inherit !important; width: auto; height: auto; line-height: 1; }
.lc-num { font-size: clamp(0.8rem, 1.6vw, 1rem); color: var(--muted2); font-weight: 800; }
.lc-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: clamp(1.6rem, 5vw, 3.4rem); line-height: 1.1; color: #fff; }
.lc-marked { font-size: 0.86rem; color: var(--gold); font-weight: 800; margin-top: 4px; }
.lc-card {
  width: min(900px, 100%);
  background: rgba(17, 24, 39, 0.85); border: 1px solid var(--border2); border-radius: 18px;
  padding: clamp(14px, 3vw, 28px); text-align: center;
  animation: lcIn .45s ease;
}
.lc-q { font-size: clamp(1.1rem, 2.8vw, 1.8rem); font-weight: 800; line-height: 1.35; }
.lc-q.big { font-size: clamp(2rem, 7vw, 4.6rem); font-weight: 900; letter-spacing: 1px; }
.lc-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 16px; text-align: left; }
.lc-opt { padding: 10px 14px; border-radius: 10px; background: var(--bg3); border: 1px solid var(--border); font-size: clamp(0.85rem, 1.8vw, 1.15rem); font-weight: 700; }
.lc-opt b { color: var(--gold); margin-right: 6px; }
.lc-opt.right { background: rgba(52, 211, 153, 0.18); border-color: var(--green); }
.lc-ans { margin-top: 16px; min-height: 44px; }
.lc-ans.on { font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 900; color: var(--green); }
.lc-extra { font-size: 0.85rem; color: var(--muted2); font-weight: 700; margin-top: 4px; }
.lc-reveal { background: transparent; border: 1px dashed var(--border2); color: var(--muted2); border-radius: 10px; padding: 9px 14px; cursor: pointer; font: inherit; font-weight: 800; font-size: 0.8rem; }
.lc-reveal kbd { font-size: 0.6rem; font-family: inherit; opacity: 0.7; }
.lc-ctrl { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding-top: 10px; }
.lc-ctrl .lc-btn { flex: 1 1 140px; max-width: 240px; }

.lc-end-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.lc-end-stats div { min-width: 120px; text-align: center; padding: 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--border); }
.lc-end-stats b { display: block; font-size: 2.2rem; font-weight: 900; color: var(--gold); }
.lc-end-stats span { font-size: 0.72rem; color: var(--muted2); font-weight: 800; }
.lc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-chip { padding: 5px 11px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--border); font-size: 0.78rem; font-weight: 800; }

@keyframes lcIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
  .lc-setup, .lc-run, .lc-end { padding: 12px 12px 24px; }
  .lc-who { flex-direction: column; text-align: center; gap: 8px; }
  .lc-ctrl .lc-btn { flex: 1 1 calc(50% - 8px); min-height: 50px; font-size: 0.82rem; padding: 10px; }
  .lc-ctrl .lc-btn kbd { display: none; }
  .lc-btn.go { min-width: 0; width: 100%; }
  .lc-row > span:first-child { min-width: 100%; }
}
