/* ================================================================
   attendance.css
================================================================ */

/* ── LAYOUT ──────────────────────────────────────────────────── */
.attend-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--s6);
  align-items: start;
}
@media (max-width: 768px) {
  .attend-layout { grid-template-columns: 1fr; }
}

.attend-form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s6);
}

.attend-form-header { margin-bottom: var(--s5); }
.attend-form-header h2 { font-family: var(--font-display); font-size: 1.4rem; color: var(--navy); margin: 0 0 var(--s2); }
.attend-form-header p  { color: var(--navy-300); font-size: .875rem; margin: 0; }

/* ── METHOD TABS ─────────────────────────────────────────────── */
.method-tabs {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--s4);
  width: fit-content;
}
.method-tab {
  padding: .5rem var(--s4);
  font-size: .875rem;
  font-weight: 500;
  color: var(--navy-300);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--fast);
}
.method-tab.active { background: var(--navy); color: var(--white); }
.method-tab:hover:not(.active) { background: var(--border); color: var(--navy); }

/* ── CAMERA ──────────────────────────────────────────────────── */
.camera-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto var(--s4);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  aspect-ratio: 1;
}
#camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.face-guide {
  width: 200px;
  height: 200px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.4);
}
.camera-status {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.6);
  color: var(--white);
  font-size: .8rem;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.face-actions {
  display: flex;
  gap: var(--s3);
  justify-content: center;
  margin-bottom: var(--s4);
}

/* ── GPS ─────────────────────────────────────────────────────── */
.gps-status {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: .85rem;
  color: var(--navy-300);
  margin-bottom: var(--s2);
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border-radius: var(--r-md);
}

/* ── ATTEND BUTTONS ──────────────────────────────────────────── */
.attend-btns {
  display: flex;
  gap: var(--s3);
  margin-top: var(--s4);
}

/* ── ATTEND RESULT ───────────────────────────────────────────── */
.attend-result {
  margin-top: var(--s4);
  padding: var(--s4);
  border-radius: var(--r-lg);
  text-align: center;
  font-weight: 600;
}
.attend-result.success { background: var(--green-pale); color: var(--green); }
.attend-result.error   { background: #fdecea; color: var(--red); }

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.attend-sidebar { display: flex; flex-direction: column; gap: var(--s4); }
.attend-time    { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--navy); }

/* ── QR LAYOUT ───────────────────────────────────────────────── */
.qr-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: start;
}
@media (max-width: 768px) { .qr-layout { grid-template-columns: 1fr; } }

.qr-wrap, .qr-scan-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s6);
}
.qr-code-display {
  width: 220px;
  height: 220px;
  margin: 0 auto var(--s4);
  border: 3px solid var(--navy);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
}
.qr-token {
  text-align: center;
  font-family: monospace;
  font-size: .85rem;
  color: var(--navy-300);
  background: var(--surface);
  padding: var(--s2) var(--s4);
  border-radius: var(--r-md);
  margin-bottom: var(--s3);
}

/* ── LIVE DASHBOARD ──────────────────────────────────────────── */
.attend-live-stats {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s5);
}
.attend-live-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s4) var(--s5);
  min-width: 120px;
}
.als-num   { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--navy); }
.als-label { font-size: .78rem; color: var(--navy-300); font-weight: 500; }

.attend-live-list { display: flex; flex-direction: column; gap: var(--s2); }
.attend-live-item {
  display: flex;
  align-items: center;
  gap: var(--s4);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s3) var(--s4);
}
.ali-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}
.ali-body  { flex: 1; min-width: 0; }
.ali-name  { font-weight: 600; font-size: .875rem; color: var(--navy); }
.ali-meta  { font-size: .78rem; color: var(--navy-300); }
.ali-time  { font-size: .8rem; font-weight: 600; color: var(--green); flex-shrink: 0; }