/* base.css — 팔팔생활 경로당 관리 앱 (1단계 시범) 공통 스타일 */
:root {
  --green-900: #0d2b1f;
  --green-800: #123b2a;
  --green-700: #174b38;
  --green-600: #1e5e45;
  --green-500: #2a7a58;
  --mint: #c2d9cb;
  --mint-soft: #e4efe8;
  --ivory: #f5f8f4;
  --paper: #ffffff;
  --ink: #17261f;
  --ink-soft: #33463c;
  --muted: #5d6b63;
  --line: #dde5df;
  --line-strong: #c8d5cc;
  --amber: #b45309;
  --amber-soft: #fdf1e3;
  --red: #b42318;
  --red-soft: #fdecea;
  --blue: #1d4ed8;
  --blue-soft: #e8eefc;
  --shadow: 0 1px 2px rgba(15, 40, 28, .06), 0 8px 24px rgba(15, 40, 28, .07);
  --radius: 14px;
  --font: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* hidden 속성이 항상 이기도록 (display:flex 규칙과 충돌 방지) */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--ivory);
  -webkit-text-size-adjust: 100%;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: var(--green-600); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

/* ---------------------------------------------------------------- 공통 부품 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
  transition: background .12s, border-color .12s, transform .06s;
  white-space: nowrap;
}
.btn:hover { background: #f7faf8; border-color: var(--green-500); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-600); border-color: var(--green-600); }
.btn-soft { background: var(--mint-soft); border-color: var(--mint); color: var(--green-800); }
.btn-soft:hover { background: #d8e8de; }
.btn-ghost { border-color: transparent; color: var(--muted); background: transparent; }
.btn-ghost:hover { background: #eef3f0; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-sm { padding: 8px 12px; font-size: 13.5px; border-radius: 8px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; line-height: 1.5;
  background: #eef3f0; color: var(--muted);
}
.chip-red { background: var(--red-soft); color: var(--red); }
.chip-amber { background: var(--amber-soft); color: var(--amber); }
.chip-green { background: var(--mint-soft); color: var(--green-700); }
.chip-blue { background: var(--blue-soft); color: var(--blue); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: rgba(18, 43, 31, .95); color: #fff;
  padding: 13px 22px; border-radius: 999px; font-size: 15px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  z-index: 9999; max-width: 88vw; text-align: center; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.modal-back {
  position: fixed; inset: 0; background: rgba(10, 26, 19, .45);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 500;
}
.modal {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  width: min(680px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-head { padding: 20px 24px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 19px; }
.modal-body { padding: 20px 24px; overflow: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #fafcfb; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1.5px solid var(--line-strong); border-radius: 10px; background: #fff;
  outline: none; transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(42, 122, 88, .12);
}
.field textarea { resize: vertical; min-height: 92px; line-height: 1.6; }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 15px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
