* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --face: #10b981;
  --zoom: #3b82f6;
  --sub: #f59e0b;
  --absent: #ef4444;
  --error: #dc2626;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.screen { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
.hidden { display: none !important; }

/* ===== 인증 화면 ===== */
#auth-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}
.auth-card {
  background: var(--card);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.auth-card h1 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.5rem; }
.auth-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1rem;
  outline: none;
}
.auth-card input:focus { border-color: var(--primary); }
.auth-card button {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}
.auth-card button:hover { background: var(--primary-dark); }
.error { color: var(--error); margin-top: 0.75rem; font-size: 0.9rem; min-height: 1.2rem; }
.loading { color: var(--muted); padding: 2rem; text-align: center; }

/* ===== 헤더 ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
header h1 { font-size: 1.4rem; }
.btn-secondary {
  background: white;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}
.btn-secondary:hover { background: #f3f4f6; }

/* ===== 요약 카드 ===== */
h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.section-title { font-size: 1rem; margin: 1.5rem 0 0.75rem; color: var(--muted); }

.summary-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}
.summary-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.badge {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}
.date { color: var(--muted); font-size: 0.95rem; }
.big-number { font-size: 1.75rem; font-weight: 700; color: var(--text); }
.big-pct { font-size: 1.1rem; color: var(--primary); font-weight: 600; margin-bottom: 1rem; }

.status-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.status-pill {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
}
.status-pill.face { background: var(--face); }
.status-pill.zoom { background: var(--zoom); }
.status-pill.sub { background: var(--sub); }
.status-pill.absent { background: var(--absent); }

/* ===== 부서별 ===== */
.dept-list { display: grid; gap: 0.5rem; }
.dept-card {
  background: var(--card);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.dept-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}
.dept-head strong { font-size: 1rem; }
.dept-head span { color: var(--primary); font-weight: 600; font-size: 0.95rem; }
.dept-stats { color: var(--muted); font-size: 0.85rem; }

/* ===== 모바일 ===== */
@media (max-width: 640px) {
  header { flex-direction: column; align-items: stretch; }
  header h1 { text-align: center; }
  .big-number { font-size: 1.4rem; }
  .status-pill { flex: 1 0 calc(50% - 0.25rem); text-align: center; }
}
