/* 전자 사전의결 총회 시스템 — 공통 디자인
   종이 공문의 신뢰감 + 프라이빗뱅킹의 절제. 장식 없이 선·여백·글자 굵기로 위계를 만든다. */
@font-face {
  font-family: 'Pretendard Variable';
  src: url('../vendor/fonts/PretendardVariable.woff2') format('woff2-variations');
  font-weight: 45 920; font-style: normal; font-display: swap;
}
:root {
  --paper: #F7F5F0;
  --paper-2: #EFECE4;
  --card: #FFFFFF;
  --ink: #1D2433;
  --ink-2: #4A5263;
  --ink-3: #6B7280;
  --navy: #1F2A44;
  --navy-2: #2C3A5C;
  --line: #D9D4C7;
  --line-2: #E8E4DA;
  --yes: #1E6B52;
  --yes-bg: #E8F1EC;
  --no: #9E3A3A;
  --no-bg: #F6E9E7;
  --brass: #8A6D3B;
  --brass-bg: #F4EEE1;
  --warn: #8A5A00;
  --warn-bg: #FBF3E0;
  --focus: #2F5DA8;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(29,36,51,.06), 0 4px 16px rgba(29,36,51,.04);
  --fs: 16px;
  --mono: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  line-height: 1.6; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere;
}
.num, td.r, .tab { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
h1, h2, h3, h4 { color: var(--navy); margin: 0; line-height: 1.35; letter-spacing: -0.02em; }
h1 { font-size: 1.75rem; font-weight: 750; }
h2 { font-size: 1.3rem; font-weight: 720; }
h3 { font-size: 1.08rem; font-weight: 700; }
h4 { font-size: .95rem; font-weight: 700; }
p { margin: .4rem 0; }
a { color: var(--navy-2); }
small, .muted { color: var(--ink-3); }
.eyebrow { font-size: .78rem; letter-spacing: .08em; color: var(--brass); font-weight: 650; text-transform: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* 단추 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .55rem 1.1rem; border-radius: var(--radius);
  border: 1px solid var(--navy); background: var(--navy); color: #fff;
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--navy-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.quiet { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn.brass { background: var(--brass); border-color: var(--brass); }
.btn.danger { background: var(--no); border-color: var(--no); }
.btn.sm { min-height: 34px; padding: .3rem .75rem; font-size: .88rem; }
.btn.block { width: 100%; }
.btn.lg { min-height: 58px; font-size: 1.08rem; }

/* 입력 */
label.field { display: block; margin: .7rem 0; }
label.field > span { display: block; font-size: .85rem; color: var(--ink-2); font-weight: 600; margin-bottom: .3rem; }
input[type=text], input[type=password], input[type=date], input[type=datetime-local], input[type=number], input[type=tel], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .75rem; min-height: 44px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(31,42,68,.12); }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--navy); flex: none; }

/* 카드·표 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.card.flat { box-shadow: none; }
.card.tint { background: var(--paper-2); box-shadow: none; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t caption { text-align: left; font-weight: 700; color: var(--navy); padding: .2rem 0 .5rem; caption-side: top; }
table.t th, table.t td { border-bottom: 1px solid var(--line-2); padding: .5rem .55rem; text-align: left; vertical-align: top; }
table.t thead th { border-top: 2px solid var(--navy); border-bottom: 1px solid var(--navy); font-weight: 650; color: var(--navy); background: transparent; font-size: .85rem; white-space: nowrap; }
table.t tbody tr:last-child td { border-bottom: 1px solid var(--line); }
table.t td.r, table.t th.r { text-align: right; }
table.t tr.em td { font-weight: 700; background: var(--paper); }
table.t tr.bad td { background: var(--no-bg); }
table.t tr.warn td { background: var(--warn-bg); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 표시 */
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 650; padding: .12rem .55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: #fff; white-space: nowrap; }
.chip.yes { color: var(--yes); border-color: #B9D5C8; background: var(--yes-bg); }
.chip.no { color: var(--no); border-color: #E2C1BC; background: var(--no-bg); }
.chip.brass { color: var(--brass); border-color: #DCCDAE; background: var(--brass-bg); }
.chip.warn { color: var(--warn); border-color: #E9D3A0; background: var(--warn-bg); }
.chip.navy { color: #fff; background: var(--navy); border-color: var(--navy); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--line); }
.dot.ok { background: var(--yes); } .dot.bad { background: var(--no); } .dot.warn { background: #C08A1E; }
.note { border-left: 3px solid var(--brass); background: var(--brass-bg); padding: .75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; font-size: .93rem; }
.note.warn { border-color: #C08A1E; background: var(--warn-bg); }
.note.bad { border-color: var(--no); background: var(--no-bg); }
.note.ok { border-color: var(--yes); background: var(--yes-bg); }
.note.navy { border-color: var(--navy); background: #EEF0F5; }
.legal { font-size: .8rem; color: var(--ink-3); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .93rem; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 550; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 1rem; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }
.stat { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.stat .k { font-size: .82rem; color: var(--ink-3); font-weight: 600; }
.stat .v { font-size: 1.7rem; font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: .2rem; }
.stat .s { font-size: .8rem; color: var(--ink-3); }
.bar { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--navy); }
.formula { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .88rem; background: var(--paper); border: 1px dashed var(--line); padding: .55rem .75rem; border-radius: var(--radius); color: var(--ink-2); }

/* 알림·창 */
#toast { pointer-events: none; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: .5rem; width: min(92vw, 520px); }
.toast { background: var(--navy); color: #fff; padding: .8rem 1rem; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: .95rem; }
.toast.bad { background: var(--no); }
.toast.ok { background: var(--yes); }
.modal-back { position: fixed; inset: 0; background: rgba(20,24,33,.45); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 80; }
.modal { background: #fff; border-radius: 8px; width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 1.4rem; border-top: 4px solid var(--navy); }
.modal h3 { margin-bottom: .6rem; }
.modal .actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.info-i { display: inline-flex; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 1px solid var(--ink-3); color: var(--ink-3); font-size: .72rem; font-weight: 700; align-items: center; justify-content: center; cursor: pointer; font-style: normal; vertical-align: middle; background: #fff; }
details.basis { font-size: .88rem; }
details.basis summary { cursor: pointer; color: var(--ink-2); list-style: none; display: inline-flex; gap: .35rem; align-items: center; }
details.basis summary::-webkit-details-marker { display: none; }
details.basis[open] summary { margin-bottom: .4rem; }
.hidden { display: none !important; }
.mt0 { margin-top: 0 } .mt1 { margin-top: .5rem } .mt2 { margin-top: 1rem } .mt3 { margin-top: 1.5rem } .mb1 { margin-bottom: .5rem } .mb2 { margin-bottom: 1rem }

/* 안건 본문(회원·관리자 공통) */
.agenda-block { margin: 1.1rem 0; }
.agenda-block h4.sect { font-size: 1rem; color: var(--navy); border-bottom: 1px solid var(--line); padding-bottom: .35rem; margin-bottom: .6rem; }
.sumcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.sumcard { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; background: #fff; }
.sumcard .k { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.sumcard .v { font-size: 1.25rem; font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; }
.sumcard .c { font-size: .78rem; color: var(--brass); }
.calc { color: var(--brass); font-size: .82em; }
.calc::before { content: '자동 계산 '; font-weight: 650; }
.quote { font-size: 1.1rem; font-weight: 650; color: var(--navy); padding: .6rem 0; }
.cmp-na { color: var(--ink-3); font-style: normal; }
.flag { border: 1px solid #E9D3A0; background: var(--warn-bg); border-radius: var(--radius); padding: .7rem .9rem; font-size: .9rem; }
.flag b { color: var(--warn); }
.page-img { width: 100%; border: 1px solid var(--line); border-radius: 4px; background: #fff; display: block; }

/* 휴대폰: 표를 한 줄씩 카드로 (항목명: 값) */
@media (max-width: 600px) {
  table.t.resp thead { display: none; }
  table.t.resp, table.t.resp tbody, table.t.resp tr, table.t.resp td { display: block; width: 100%; }
  table.t.resp caption { display: block; }
  table.t.resp tr { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 .6rem; padding: .45rem .75rem; background: #fff; }
  table.t.resp tr.em { background: var(--paper); border-color: var(--navy); }
  table.t.resp td { border: 0 !important; padding: .22rem 0; display: flex; justify-content: space-between; gap: .9rem; text-align: right; }
  table.t.resp td::before { content: attr(data-label); color: var(--ink-3); font-weight: 600; text-align: left; flex: none; max-width: 45%; }
  table.t.resp td.empty { display: none; }
  table.t.resp td[colspan] { display: block; text-align: left; }
  table.t.resp td[colspan]::before { display: none; }
}

/* 인쇄 */
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .card { box-shadow: none; }
}
