/* 2026-10-01: 굳멤버스·조은웰스 계산기와 같은 모양·색 (남색 → 오렌지) */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-h: #f3f5f8;
  --text: #1f2733;
  --muted: #677285;
  --line: #e2e6ec;
  --brand: #e8710a;
  --brand-2: #c25a02;
  --brand-soft: #fff1e4;
  --ok-bg: #e6f4ec; --ok: #1f7a4a;
  --err-bg: #fdecea; --err: #b42318;
  --info-bg: #fff1e4; --info: #c25a02;
  --warn-bg: #fdf3e2; --warn: #9a5b00;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif; font-size: 14px; line-height: 1.55;
}
a { color: var(--brand); }
h1 { font-size: 22px; margin: 0 0 16px; font-weight: 700; }
h2 { font-size: 15px; margin: 0 0 14px; }
h3 { font-size: 15px; margin: 0 0 10px; }

/* 위쪽 막대 */
.topbar {
  position: sticky; top: 0; z-index: 20; height: 54px; display: flex; align-items: center; gap: 14px;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(16,24,40,.05);
}
.no-nav .topbar { padding-left: 20px; }
.burger { width: 54px; height: 54px; border: 0; background: var(--brand); color: #fff; font-size: 20px; cursor: pointer; flex: none; }
.burger:hover { background: var(--brand-2); }
.brand { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; text-decoration: none; color: var(--text); }
.brand b { font-size: 17px; color: var(--brand); }
.brand span { font-size: 16px; font-weight: 600; }
.who { margin-left: auto; padding-right: 16px; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* 왼쪽 메뉴 + 본문 */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100vh - 54px); }
.has-nav .shell { grid-template-columns: 240px minmax(0, 1fr); }
.has-nav.nav-hidden .shell { grid-template-columns: minmax(0, 1fr); }
.has-nav.nav-hidden .side { display: none; }
.side { border-right: 1px solid var(--line); padding: 14px 10px 40px; background: #fff; display: grid; align-content: start; gap: 2px; }
.side .nav { display: block; padding: 8px 12px; border-radius: 6px; font-weight: 700; font-size: 14px; color: var(--text); text-decoration: none; }
.side .nav:hover { background: var(--panel-h); }
.side .nav.on { background: var(--brand); color: #fff; }

.wrap { padding: 24px 30px 30px; min-width: 0; max-width: 1340px; }
.no-nav .wrap { max-width: 1100px; margin: 0 auto; width: 100%; }
.foot { color: var(--muted); font-size: 12.5px; padding: 26px 0 0; }
.no-nav .foot { text-align: center; }

/* 화면 제목 */
.page-head { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* 카드: 첫 h2 는 회색 제목 줄 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px 20px; margin-bottom: 18px; overflow: hidden; }
.card > h2:first-child { margin: -16px -20px 16px; padding: 10px 20px; font-size: 14.5px; font-weight: 600; background: var(--panel-h); border-bottom: 1px solid var(--line); }
.card-b { display: grid; gap: 12px; }
.card-b > p { margin: 0; }
.card.narrow { max-width: 420px; margin: 40px auto; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 13px; }

/* 로그인 화면 */
.login { max-width: 400px; margin: 60px auto 0; }
.login-brand { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-bottom: 18px; }
.login-brand b { font-size: 26px; color: var(--brand); }
.login-brand span { font-size: 20px; font-weight: 600; }

/* 업무도구 카드 (계산기 대시보드의 빠른 링크와 같은 모양) */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.linkcard { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 20px 14px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; text-align: center; text-decoration: none; color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.linkcard:hover { border-color: var(--brand); box-shadow: 0 3px 10px rgba(232,113,10,.12); }
.linkcard .ico { color: var(--brand); display: grid; }
.linkcard b { font-size: 15px; }
.linkcard small { font-size: 12.5px; color: var(--muted); }
.linkcard small.ok { color: var(--ok); }

@media (max-width: 860px) {
  .has-nav .shell, .has-nav.nav-hidden .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 54px; left: 0; bottom: 0; width: 260px; z-index: 15; overflow-y: auto; box-shadow: 4px 0 16px rgba(0,0,0,.12); display: none; }
  .has-nav.nav-open .side { display: grid; }
  .has-nav.nav-hidden .side { display: none; }
  .wrap { padding: 18px 16px 30px; }
  .brand span { display: none; }
  .who span { display: none; }
}

.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.form.inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
legend { font-weight: 600; padding: 0 4px; }
input, select { font: inherit; padding: 8px 10px; border: 1px solid #c5ced8; border-radius: 6px; background: #fff; }
input:focus, select:focus { outline: 2px solid #f6b98a; border-color: var(--brand); }

.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 6px; padding: 7px 14px; font-size: 13.5px;
}
.btn:hover { background: var(--brand-2); }
.btn.ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn.ghost:hover { background: #fff; border-color: var(--brand); }
.btn.small { padding: 4px 11px; font-size: 12.5px; }

.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; }
.flash.success { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.flash.info { background: var(--info-bg); color: var(--info); }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--brand); border-color: var(--brand); font-weight: 600; }

.table { width: 100%; border-collapse: collapse; }
.table { font-size: 13px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--panel-h); font-size: 12px; color: var(--muted); font-weight: 600; }
.table tr.off td { color: var(--muted); }
.table tr.warn td { background: var(--warn-bg); }
.card:has(> .table) { overflow-x: auto; }
.tag { display: inline-block; font-size: 12px; padding: 1px 6px; border-radius: 4px; background: #eceff3; color: var(--muted); margin-left: 4px; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }

.pager { display: flex; gap: 4px; margin-top: 12px; }
.pager a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; }
.pager a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
