/* ── EduAttend Frontend Styles ── */
:root {
  --ea-blue: #185FA5;
  --ea-blue-dark: #0C447C;
  --ea-green: #3B6D11;
  --ea-red: #A32D2D;
  --ea-border: #e2e8f0;
  --ea-radius: 10px;
  --ea-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* ── Shared ── */
.eduatt-card {
  background: #fff;
  border: 1px solid var(--ea-border);
  border-radius: var(--ea-radius);
  padding: 24px;
  box-shadow: var(--ea-shadow);
}
.eduatt-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ea-border);
  color: #1a202c;
}
.eduatt-field { margin-bottom: 14px; }
.eduatt-field label { display: block; font-size: 13px; color: #64748b; margin-bottom: 5px; font-weight: 500; }
.eduatt-field input,
.eduatt-field select {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--ea-border); border-radius: 7px;
  font-size: 14px; color: #1a202c; background: #fff;
  transition: border-color .15s;
}
.eduatt-field input:focus,
.eduatt-field select:focus { border-color: var(--ea-blue); outline: none; }
.req { color: #E24B4A; }

.eduatt-btn {
  display: inline-block; padding: 10px 22px;
  border-radius: 7px; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--ea-border); background: #fff; color: #1a202c;
  transition: background .15s, opacity .15s;
}
.eduatt-btn:hover { background: #f1f5f9; }
.eduatt-btn:disabled { opacity: .5; cursor: not-allowed; }
.eduatt-btn-primary { background: var(--ea-blue); color: #fff; border-color: var(--ea-blue); }
.eduatt-btn-primary:hover { background: var(--ea-blue-dark); }
.eduatt-btn-secondary { background: #f1f5f9; border-color: #cbd5e1; color: #334155; }
.eduatt-btn-block { display: block; width: 100%; text-align: center; }

.eduatt-muted { color: #94a3b8; font-size: 13px; }

/* ── Teacher Panel ── */
.eduatt-panel-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) {
  .eduatt-panel-grid { grid-template-columns: 1fr; }
}

.eduatt-qr-card { text-align: center; }
.eduatt-qr-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 220px; color: #cbd5e1; gap: 12px;
}
.eduatt-qr-placeholder p { font-size: 14px; margin: 0; }

#et-qrcode { display: inline-block; }
#et-qrcode canvas, #et-qrcode img { border-radius: 6px; display: block; }

.eduatt-class-code {
  font-size: 28px; font-weight: 700; letter-spacing: 5px;
  color: var(--ea-blue); margin: 14px 0 4px;
}
.eduatt-qr-info { font-size: 13px; color: #64748b; margin-bottom: 8px; }
.eduatt-countdown {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; background: #EAF3DE; border-radius: 20px;
  font-size: 13px; font-weight: 600; color: var(--ea-green); margin: 6px 0 12px;
}
.eduatt-countdown.expired { background: #FCEBEB; color: var(--ea-red); }

.eduatt-qr-link {
  background: #f8fafc; border-radius: 6px; padding: 8px 12px;
  font-size: 12px; color: #64748b; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 16px;
}
.eduatt-btn-copy {
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--ea-blue); padding: 0 4px;
}

.eduatt-attendance-live { text-align: left; margin-top: 4px; }
.eduatt-attendance-live h4 { font-size: 14px; margin-bottom: 8px; }
.eduatt-attendance-live ul { list-style: none; padding: 0; margin: 0; max-height: 180px; overflow-y: auto; }
.eduatt-attendance-live li {
  padding: 6px 0; border-bottom: 1px solid #f1f5f9;
  font-size: 13px; display: flex; align-items: center; gap: 6px;
}
.eduatt-attendance-live li strong { flex: 1; }
.eduatt-time { font-size: 12px; color: #94a3b8; }

.eduatt-session-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eduatt-session-table th { text-align: left; padding: 6px 8px; color: #64748b; border-bottom: 1px solid var(--ea-border); }
.eduatt-session-table td { padding: 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.eduatt-tag-expired { background: #FCEBEB; color: var(--ea-red); border-radius: 4px; padding: 2px 6px; font-size: 11px; }
.expired-row td { opacity: .6; }

/* ── Check-in Page ── */
.eduatt-checkin-wrap { max-width: 440px; margin: 0 auto; padding: 20px 0; }
.eduatt-checkin-card { padding: 32px 28px; }
.eduatt-center { text-align: center; }
.eduatt-checkin-header { text-align: center; margin-bottom: 20px; }
.eduatt-icon-circle {
  width: 64px; height: 64px; border-radius: 50%; background: #E6F1FB;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 14px;
}
.eduatt-info-table { width: 100%; font-size: 14px; border-collapse: collapse; margin-bottom: 20px; }
.eduatt-info-table td { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.eduatt-info-table td:first-child { color: #64748b; width: 110px; }

.eduatt-student-info {
  display: flex; align-items: center; gap: 14px;
  background: #f8fafc; border-radius: 8px; padding: 14px 16px; margin-bottom: 20px;
}
.eduatt-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ea-blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.eduatt-student-name { font-weight: 600; font-size: 15px; }
.eduatt-student-email { font-size: 12px; color: #64748b; }

.eduatt-success-icon { font-size: 56px; margin-bottom: 12px; }
.eduatt-big-name { font-size: 18px; font-weight: 700; color: #1a202c; margin: 0 0 8px; }
.eduatt-success-meta { font-size: 14px; color: #64748b; margin-bottom: 16px; line-height: 1.8; }
.eduatt-pulse-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 18px; background: #EAF3DE; border-radius: 20px;
  font-size: 13px; font-weight: 600; color: var(--ea-green);
  animation: pulse-bg 2s infinite;
}
@keyframes pulse-bg { 0%,100%{opacity:1} 50%{opacity:.7} }

.eduatt-spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid #e2e8f0; border-top-color: var(--ea-blue);
  animation: spin .7s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── History ── */
.eduatt-history-wrap { max-width: 800px; }
.eduatt-history-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.eduatt-history-header h3 { margin: 0; font-size: 18px; }
.eduatt-badge-count {
  background: #E6F1FB; color: var(--ea-blue);
  border-radius: 12px; padding: 3px 12px; font-size: 13px; font-weight: 600;
}
.eduatt-stats-row { display: flex; gap: 16px; margin-bottom: 20px; }
.eduatt-mini-stat {
  background: #f8fafc; border-radius: 8px; padding: 14px 20px; flex: 1; text-align: center;
}
.eduatt-mini-stat span { display: block; font-size: 28px; font-weight: 700; color: var(--ea-blue); }
.eduatt-mini-stat small { font-size: 12px; color: #64748b; }
.eduatt-history-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.eduatt-history-table th { text-align: left; padding: 10px 12px; color: #64748b; border-bottom: 2px solid var(--ea-border); }
.eduatt-history-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
