/* 삼일교회 선거인 명부 확인 - 로고 색상 포인트 #E60012 / 기본 #000000 */
:root {
  --red: #E60012;
  --red-deep: #C4000F;
  --red-soft: #FDECEE;
  --black: #000000;
  --text: #191919;
  --text-2: #5C5F66;
  --text-3: #8B8F97;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --line: #E3E5E8;
  --field: #F7F8FA;
  --ok: #0B8A4F;
  --ok-soft: #E7F6EE;
  --warn: #B45309;
  --warn-soft: #FEF3E2;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

/* 상단 로고 */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar__inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin .topbar__inner { max-width: 1140px; }
.logo { display: block; height: 34px; width: auto; }
.topbar__sub { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--text-2); }

/* 본문 */
.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.page--wide { max-width: 1140px; }

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.04);
}
.card + .card { margin-top: 16px; }

.title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: var(--black);
}
.lede { margin: 0 0 28px; color: var(--text-2); font-size: 15.5px; }

/* 폼 */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field-hint { margin: 0; font-size: 13px; color: var(--text-3); }
.opt { margin-left: 4px; font-size: 13px; font-weight: 400; color: var(--text-3); }

input[type=text], input[type=tel], input[type=password], input[type=search], textarea, select {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  background: var(--field);
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
input:hover, textarea:hover, select:hover { background: #F1F2F5; }
input:focus, textarea:focus, select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--black);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}
input[aria-invalid=true] { border-color: var(--red); background: var(--surface); }
::placeholder { color: #A9ADB4; }

.form-error { margin: 0; font-size: 14.5px; font-weight: 500; color: var(--red-deep); }

/* 버튼 */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 22px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background-color .15s, color .15s, transform .1s;
}
.btn:active { transform: scale(0.985); }
.btn--primary { background: var(--black); color: #fff; }
.btn--primary:hover { background: #2A2A2A; }
.btn--secondary { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn--secondary:hover { background: var(--field); }
.btn--text { background: transparent; color: var(--text-2); font-size: 15px; font-weight: 500; min-height: 44px; }
.btn--text:hover { color: var(--black); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn[disabled] { opacity: .5; cursor: progress; transform: none; }
.form > .btn { width: 100%; margin-top: 4px; }

.btn:focus-visible, a:focus-visible, [role=tab]:focus-visible, input[type=checkbox]:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* 결과 */
.result { text-align: center; }
.result h2 { margin: 0 0 6px; font-size: 21px; font-weight: 700; line-height: 1.4; letter-spacing: -0.03em; color: var(--black); }
.result > .btn--text { margin-top: 16px; }

.found__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
}
.found__icon.is-pop { animation: pop .38s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes pop {
  0%   { opacity: 0; transform: scale(.6); }
  100% { opacity: 1; transform: scale(1); }
}
.found p { margin: 0; color: var(--text-2); }

.missing { text-align: left; }
.missing__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.missing__head h2 { margin: 0; }
.missing__icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--warn-soft);
  color: var(--warn);
}
.missing p { margin: 0 0 10px; color: var(--text-2); font-size: 15.5px; }
.missing > .btn { width: 100%; margin-top: 10px; }

.form--request { margin-top: 20px; padding-top: 22px; border-top: 1px solid var(--line); }
.who { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; background: var(--field); border-radius: var(--r-md); }
.who__label { font-size: 13.5px; color: var(--text-3); flex: none; }
.who strong { font-weight: 600; }

.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--text-2); cursor: pointer; }
.agree input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--black); }

.done { margin-top: 16px; padding: 18px; background: var(--ok-soft); border-radius: var(--r-md); }
.done h3 { margin: 0 0 4px; font-size: 16.5px; color: var(--ok); }
.done p { margin: 0; font-size: 15px; color: var(--text-2); }

.contact { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--text-2); }
.contact:empty { display: none; }

.foot { padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 13px; color: var(--text-3); }
.foot p { margin: 0; }

/* 관리 화면 */
.login { max-width: 440px; margin: 16px auto 0; }
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.title--small { margin: 0; font-size: 22px; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-actions .btn--primary, .dash-actions .btn--secondary { font-size: 14px; }

.roster-status { margin: 6px 0 20px; font-size: 14px; color: var(--text-2); }
.roster-status p { margin: 0; }
.roster-status p + p { margin-top: 2px; color: var(--text-3); }
.roster-status .is-error { color: var(--red-deep); font-weight: 600; }

.notice { margin: -8px 0 20px; padding: 14px 16px; border-radius: var(--r-md); font-size: 14.5px; line-height: 1.6; white-space: pre-line; }
.notice.is-ok { background: var(--ok-soft); color: #075E36; }
.notice.is-error { background: var(--red-soft); color: var(--red-deep); }
.notice.is-busy { background: var(--field); color: var(--text-2); }
.notice.is-warn { background: var(--warn-soft); color: #7A3A06; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs [role=tab] {
  appearance: none;
  margin-bottom: -1px;
  padding: 12px 14px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
}
.tabs [aria-selected=true] { color: var(--black); border-bottom-color: var(--black); }
.badge {
  display: inline-block;
  min-width: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}
.badge:empty { display: none; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.toolbar input { flex: 1 1 220px; min-height: 44px; padding: 10px 14px; font-size: 15px; border-radius: var(--r-sm); }
.toolbar select { flex: 0 0 160px; min-height: 44px; padding: 10px 12px; font-size: 15px; border-radius: var(--r-sm); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14.5px; }
.table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  background: var(--field);
  border-bottom: 1px solid var(--line);
}
.table td { padding: 13px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FAFAFB; }
.table .nowrap { white-space: nowrap; }
.table .strong { font-weight: 600; }
.table .memo { min-width: 180px; max-width: 320px; white-space: pre-wrap; }
.table .yes, .table .no {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.table .yes { color: var(--ok); }
.table .no { color: var(--red-deep); }
.table tr.is-done td { color: var(--text-3); }
.table a { color: inherit; text-underline-offset: 3px; }

.check { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--black); }
.done-at { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); white-space: nowrap; }

.empty { padding: 32px 0; text-align: center; color: var(--text-3); }
.hint { margin: 12px 0 0; font-size: 13px; color: var(--text-3); }

@media (min-width: 560px) {
  .page { padding-top: 40px; }
  .card { padding: 40px 36px; }
  .title { font-size: 28px; }
  .logo { height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .found__icon.is-pop { animation: none; }
  .btn, input, textarea, select { transition: none; }
  .btn:active { transform: none; }
}
