:root {
  --bg: #f4f6f9; --panel: #fff; --ink: #1b2430; --muted: #667085; --line: #e3e7ee;
  --brand: #1f4fd8; --brand-soft: #eaf0ff; --ok: #12805c; --ok-soft: #e6f6ef;
  --warn: #b25e09; --warn-soft: #fff4e5; --gray-soft: #f0f2f5; --red: #c0352b;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
em { font-style: normal; color: var(--muted); font-size: 13px; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.logo { background: var(--brand); color: #fff; font-weight: 800; border-radius: 8px; padding: 6px 8px; }
.badge { font-size: 13px; padding: 5px 10px; border-radius: 99px; background: var(--gray-soft); white-space: nowrap; }
.badge.live { background: var(--ok-soft); color: var(--ok); }
.badge.demo { background: var(--warn-soft); color: var(--warn); }
.banner { background: var(--warn-soft); color: #7a3f00; border-bottom: 1px solid #f3d3a6; padding: 10px 24px; font-size: 14px; }

.layout { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; gap: 20px; padding: 20px 24px; max-width: 1400px; margin: 0 auto; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.form { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
h2 { margin: 0 0 12px; font-size: 18px; }
.field { display: block; margin: 0 0 14px; border: 0; padding: 0; font-weight: 600; font-size: 14px; }
legend { padding: 0; margin-bottom: 6px; }
.field input, .field select, .row2 select, .row2 input, .combo input { width: 100%; margin-top: 5px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 400; background: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.combo { position: relative; }
.combo-list { position: absolute; left: 0; right: 0; top: 100%; max-height: 280px; overflow: auto; margin: 2px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.08); z-index: 10; }
.combo-list li { padding: 7px 8px; border-radius: 6px; cursor: pointer; font-weight: 400; font-size: 14px; }
.combo-list li:hover, .combo-list li.active { background: var(--brand-soft); }
.combo-list .code { color: var(--brand); font-weight: 700; margin-right: 6px; font-variant-numeric: tabular-nums; }
.combo-list .path { display: block; color: var(--muted); font-size: 12px; }
.selected { margin-top: 8px; font-weight: 400; font-size: 13px; padding: 8px 10px; background: var(--gray-soft); border-radius: 8px; }
.selected.ok { background: var(--brand-soft); color: var(--ink); }
.selected.err { background: #fdecea; color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; user-select: none; }
.chip input { display: none; }
.chip:has(input:checked), .chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
button.chip { font: inherit; font-size: 13px; }
.samples { margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.samples .chips { margin-top: 6px; }
.note { font-size: 12px; color: var(--muted); }
button.primary { width: 100%; padding: 12px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
button.ghost { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 14px; cursor: pointer; }

.results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.summary h2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.kpi { border-radius: 10px; padding: 10px 12px; text-decoration: none; color: inherit; }
.kpi b { display: block; font-size: 24px; }
.kpi.now { background: var(--ok-soft); } .kpi.prepare { background: var(--warn-soft); } .kpi.closed { background: var(--gray-soft); }
.profile-line { font-size: 13px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select { padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; background: #fff; }

.bucket h3 { margin: 4px 0 10px; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.bucket h3 .dot { width: 10px; height: 10px; border-radius: 50%; }
.bucket.now .dot { background: var(--ok); } .bucket.prepare .dot { background: var(--warn); } .bucket.closed .dot { background: #98a2b3; }
.bucket .desc { margin: -6px 0 10px; font-size: 13px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; break-inside: avoid; }
.card .tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--gray-soft); }
.tag.type-loan { background: #e8f1ff; color: #1849a9; }
.tag.type-grant { background: #ecfdf3; color: #067647; }
.tag.type-tax { background: #f4ebff; color: #6941c6; }
.tag.type-voucher { background: #fff1f3; color: #c01048; }
.tag.type-procurement { background: #fef6ee; color: #b93815; }
.tag.sample { background: #fff4e5; color: var(--warn); font-weight: 700; }
.tag.status-open { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.tag.status-upcoming { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.tag.status-closed { background: #eaecf0; color: #475467; font-weight: 700; }
.card h4 { margin: 0; font-size: 16px; line-height: 1.35; }
.card .meta { font-size: 13px; color: var(--muted); }
.card dl { margin: 0; display: grid; grid-template-columns: 88px 1fr; gap: 4px 10px; font-size: 13px; }
.card dt { color: var(--muted); }
.card dd { margin: 0; }
.card .sec { font-size: 13px; }
.card .sec b { display: block; margin-bottom: 2px; font-size: 13px; }
.card ul { margin: 0; padding-left: 18px; }
.sec.why b { color: var(--ok); } .sec.gap b { color: var(--warn); } .sec.next b { color: var(--brand); }
.sec.check { color: var(--muted); }
.card .src { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.card .src a { color: var(--brand); font-weight: 600; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.none { font-size: 14px; color: var(--muted); padding: 12px; background: #fff; border: 1px dashed var(--line); border-radius: 10px; }
.disclaimer { font-size: 12px; color: var(--muted); }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 20px; }
.print-head { display: none; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 12px; }
  .form { position: static; max-height: none; }
  .top { padding: 10px 12px; }
  .cards { grid-template-columns: 1fr; }
  .kpis { gap: 6px; } .kpi b { font-size: 20px; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11.5px; }
  .top, .form, .filters, .no-print, .foot, .banner { display: none !important; }
  .layout { display: block; padding: 0; }
  .panel { border: 0; padding: 0; }
  .print-head { display: block; margin-bottom: 8px; }
  .cards { display: block; }
  .card { margin-bottom: 8px; page-break-inside: avoid; border-color: #ccc; }
  details { display: block; } details > * { display: block; }
  details summary { display: none; }
  a { color: #000; }
  .card .src a::after { content: " (" attr(href) ")"; font-weight: 400; }
}

/* ---------- 고객용 화면 ---------- */
.primary-sm { padding: 8px 12px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
body.customer .form, body.customer .top, body.customer .foot { display: none; }
body.customer .layout { display: block; max-width: 1100px; }
body.customer { background: #f7f8fb; }
.hero { background: linear-gradient(135deg, #14306f, #1f4fd8); color: #fff; border-radius: 18px; padding: 32px; margin-bottom: 22px; }
.hero-sub { opacity: .8; font-size: 14px; }
.hero h1 { margin: 8px 0 20px; font-size: 32px; line-height: 1.3; }
.hero h1 em { font-style: normal; color: #ffd84d; font-size: inherit; }
.hero-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hero-kpis div { background: rgba(255,255,255,.12); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.hero-kpis b { display: block; font-size: 30px; }
.hero-kpis .hot b { color: #ffd84d; }
.hero-types { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.hero-types .tag { background: rgba(255,255,255,.18); color: #fff; }
.hero-warn { margin: 14px 0 0; background: #fff4e5; color: #7a3f00; padding: 8px 12px; border-radius: 8px; font-weight: 700; }
.csec { margin-bottom: 26px; }
.csec h2 { font-size: 21px; margin: 0 0 4px; } .csec h2 span { color: var(--brand); }
.csec.prepare h2 span { color: var(--warn); } .csec.closed h2 span { color: #667085; }
.csec .desc { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ccard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; border-top: 5px solid var(--ok); }
.ccard.prepare { border-top-color: var(--warn); } .ccard.closed { border-top-color: #98a2b3; opacity: .92; }
.ccard h4 { margin: 0; font-size: 18px; line-height: 1.35; }
.ctop { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cday { margin-left: auto; font-weight: 800; font-size: 14px; color: var(--ok); }
.cday.urgent { color: var(--red); }
.camt { font-weight: 700; font-size: 15px; background: var(--gray-soft); border-radius: 8px; padding: 8px 10px; }
.ccard .sec { font-size: 14px; } .ccard ul { margin: 0; padding-left: 18px; }
.csrc { margin-top: auto; color: var(--brand); font-weight: 700; text-decoration: none; font-size: 14px; }
.cfoot { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding: 16px 0 30px; }
@media (max-width: 700px) { .hero { padding: 20px; } .hero h1 { font-size: 23px; } .hero-kpis { grid-template-columns: 1fr 1fr; } .ccards { grid-template-columns: 1fr; } }
.more { display: block; margin: 12px auto 0; }

/* ---------- 목록형 결과(직원·고객 공통) ---------- */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar h2 { margin: 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.segb { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 14px; text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.segb b { display: block; font-size: 24px; }
.segb.on { border: 2px solid var(--brand); background: var(--brand-soft); }
.disclaimer.warn { color: #b25e09; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 64px; background: var(--bg); padding: 8px 0; z-index: 3; }
body.customer .tabs { top: 0; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 13px; font: inherit; font-size: 14px; cursor: pointer; }
.tab small { color: var(--muted); }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); } .tab.on small { color: #cfd4dc; }
.list { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.row { border-bottom: 1px solid var(--line); } .row:last-of-type { border-bottom: 0; }
.rowhead { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; cursor: pointer; }
.rowhead:hover { background: #fafbfc; }
.rtitle { font-weight: 700; font-size: 16px; line-height: 1.4; }
.agency { font-size: 13px; color: var(--muted); margin-top: 2px; }
.rt { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.dday { display: inline-block; font-weight: 800; font-size: 13.5px; padding: 3px 10px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.dday.urgent { background: #fef3f2; color: var(--red); } .dday.soft, .dday.closed { background: var(--gray-soft); color: var(--muted); }
.type { font-size: 12.5px; padding: 3px 9px; border-radius: 6px; background: var(--gray-soft); color: var(--muted); font-weight: 600; max-width: 230px; text-align: right; }
.type.t-loan { background: #e8f1ff; color: #1849a9; } .type.t-grant { background: #ecfdf3; color: #067647; } .type.t-tax { background: #f4ebff; color: #6941c6; }
.type.t-voucher { background: #fdf2fa; color: #c11574; } .type.t-procurement { background: #fef6ee; color: #b93815; }
.flag { font-size: 11.5px; color: #b54708; background: #fffaeb; padding: 1px 7px; border-radius: 6px; margin-left: 6px; white-space: nowrap; }
.arrow { color: #98a2b3; font-size: 12px; } .row.open .arrow { display: inline-block; transform: rotate(180deg); }
.detail { display: none; padding: 0 18px 16px 128px; font-size: 14.5px; }
.row.open .detail { display: block; }
.dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dgrid h4 { margin: 0 0 4px; font-size: 13.5px; } .dgrid ul { margin: 0; padding-left: 18px; }
.dgrid .g h4 { color: var(--ok); } .dgrid .gh { color: #b54708 !important; margin-top: 10px !important; } .dgrid .n h4 { color: var(--brand); }
.dgrid .info, .dgrid .c { grid-column: 1 / -1; font-size: 13px; color: var(--muted); background: #f9fafb; border-radius: 10px; padding: 9px 12px; }
.dgrid .c b { color: var(--ink); } .dgrid .c .src { margin-top: 6px; }
.go { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--brand); text-decoration: none; }
.more { display: block; width: 100%; padding: 13px; border: 0; border-top: 1px solid var(--line); background: #fff; font: inherit; color: var(--brand); font-weight: 700; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1b2430; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50; }
/* 고객용 */
.cwrap { max-width: 980px; margin: 0 auto; }
.cbrand { font-size: 13.5px; color: var(--muted); font-weight: 600; margin-top: 10px; }
.ch1 { font-size: 30px; line-height: 1.35; margin: 6px 0 4px; letter-spacing: -.5px; } .ch1 b { color: var(--brand); }
.clead { color: var(--muted); margin: 0 0 20px; }
.cstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cstat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; } .cstat span { font-size: 14px; color: var(--muted); }
.cstat b { display: block; font-size: 34px; letter-spacing: -1px; } .cstat.hot b { color: var(--red); }
.ch2 { font-size: 20px; margin: 28px 0 12px; }
.top3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pick { background: #fff; border-radius: 16px; padding: 18px; border: 2px solid var(--brand-soft); display: flex; flex-direction: column; gap: 8px; }
.pick .rank { font-size: 13px; font-weight: 800; color: var(--brand); } .pick h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.pick .why { font-size: 14px; color: var(--muted); } .pick .go { margin-top: auto; }
.cseg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.cfoot { font-size: 13px; color: var(--muted); margin-top: 26px; }
@media (max-width: 760px) {
  .rowhead { grid-template-columns: 1fr; gap: 6px; padding: 13px 14px; } .rt { justify-content: flex-start; } .type { text-align: left; }
  .detail { padding: 0 14px 14px; } .dgrid { grid-template-columns: 1fr; }
  .ch1 { font-size: 22px; } .cstats { gap: 6px; } .cstat { padding: 12px; } .cstat b { font-size: 24px; } .cstat span { font-size: 12px; }
  .top3 { grid-template-columns: 1fr; } .seg { gap: 6px; } .segb { padding: 8px 10px; font-size: 12.5px; } .segb b { font-size: 20px; }
  .tabs { top: 0; }
}
@media print { .tabs, .more, .arrow, .toast { display: none !important; } .detail { display: block !important; } .rowhead { grid-template-columns: 90px 1fr auto; } }
.brand div { white-space: nowrap; }
@media (max-width: 760px) {
  .top { position: static; flex-wrap: wrap; }
  .badge { white-space: normal; font-size: 12px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab { flex: 0 0 auto; }
  .filters select { flex: 1 1 45%; }
}

.amt { font-size: 13px; font-weight: 800; color: #b42318; background: #fef3f2; padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.pamt { font-size: 16px; font-weight: 800; color: #b42318; background: #fef3f2; border-radius: 8px; padding: 6px 10px; }
.cstat.money b { color: #b42318; }
.cstats { grid-template-columns: repeat(3, 1fr); }

/* ===================== A안(네이비) 디자인 ===================== */
:root { --brand: #245eaf; --brand-soft: #e8eef7; --navy: #152c49; --ink: #152c49; --bg: #f3f6fa; --line: #d9e3ef; --muted: #5f6b7a;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
body { letter-spacing: -.015em; }
h1, h2, .ch1, .ch2, .bar h2, .form h2 { font-family: "Noto Serif KR", serif; }
.top { background: var(--navy); border-bottom: 0; color: #fff; }
.logoimg { width: 40px; height: 40px; border-radius: 5px; }
.brand strong { letter-spacing: .06em; font-family: "Noto Serif KR", serif; }
.brand small { color: #aebdd0; }
.badge { background: rgba(255,255,255,.1); color: #dbe6f3; border: 1px solid #2c4a72; border-radius: 4px; }
.badge.live, .badge.demo { background: rgba(255,255,255,.1); color: #dbe6f3; }
.panel { border-radius: 6px; } .form { border-top: 3px solid var(--navy); }
/* 버튼 공통: 크게·굵게·단색 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 4px; font: inherit; font-size: 14.5px; font-weight: 700; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn-main { background: var(--brand); color: #fff !important; }
.btn-line { background: #fff; color: var(--navy) !important; border-color: var(--navy); }
.btn-white { background: #fff; color: var(--navy) !important; min-height: 52px; font-size: 16px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
button.primary { min-height: 52px; background: var(--navy); border-radius: 4px; font-size: 16px; }
.chip { border-radius: 4px; min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.chip:has(input:checked), .chip.on { background: var(--navy); border-color: var(--navy); }
/* 결과 상단 */
.segb { border-radius: 4px; } .segb b { font-family: "Noto Serif KR", serif; font-size: 28px; }
.segb.on { background: var(--navy); border: 1px solid var(--navy); color: #c9d6e6; } .segb.on b { color: #fff; }
.tabs { gap: 0; background: transparent; }
.tab { border-radius: 0; min-height: 44px; font-weight: 600; margin-right: -1px; }
.tab:first-child { border-radius: 4px 0 0 4px; } .tab:last-child { border-radius: 0 4px 4px 0; }
.tab.on { background: var(--navy); border-color: var(--navy); }
/* 목록: 표 느낌 */
.list { border-radius: 4px; border-top: 2px solid var(--navy); }
.rowhead { grid-template-columns: 96px 1fr auto; }
.rowmore { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1.5px solid #c7d6e7; border-radius: 4px; background: #fff; font: inherit; font-size: 13px; font-weight: 700; color: var(--navy); cursor: pointer; white-space: nowrap; }
.row.open .rowmore { background: var(--navy); color: #fff; border-color: var(--navy); }
.row.open .rowhead { background: #f7f9fc; }
.dday { border-radius: 4px; background: #f3f7fc; color: var(--brand); border: 1px solid #c7d6e7; }
.dday.urgent { background: #fbf1f1; color: #a4282b; border-color: #e9c4c4; }
.dday.soft, .dday.closed { background: #fff; border: 1px solid var(--line); }
.amt { background: none; color: var(--navy); font-size: 14.5px; padding: 0; }
.type { border-radius: 4px; }
.go { margin-top: 12px; }
.more { display: flex; margin: 0 auto; width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
/* 고객용 */
body.customer .layout { max-width: none; padding: 0; }
body.customer #results { gap: 0; }
body.customer #backBtn { margin: 12px auto; }
.chead { background: linear-gradient(180deg, #1b3a63 0%, #152c49 100%); color: #fff; padding-bottom: 80px; }
.cwrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; width: 100%; }
.chin { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; padding-bottom: 30px; }
.clogo { display: flex; align-items: center; gap: 12px; } .clogo img { width: 44px; height: 44px; border-radius: 5px; }
.clogo b { font-family: "Noto Serif KR", serif; letter-spacing: .06em; font-size: 17px; } .clogo small { display: block; color: #aebdd0; font-size: 12px; }
.cdate { font-size: 13px; color: #c9d6e6; border: 1px solid #2c4a72; padding: 6px 12px; border-radius: 4px; }
.ch1 { color: #fff; font-size: 34px; margin: 0 0 8px; } .ch1 b { color: #a9c8f2; }
.clead { color: #c3cfdd; margin: 0; }
.cstats { margin-top: -56px; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 6px; gap: 0; box-shadow: 0 10px 30px rgba(21,44,73,.08); }
.cstat { border: 0; border-right: 1px solid var(--line); border-radius: 0; } .cstat:last-child { border-right: 0; }
.cstat b { font-family: "Noto Serif KR", serif; } .cstat.money b { color: var(--brand); } .cstat.hot b { color: #a4282b; }
.ch2 { border-bottom: 2px solid var(--navy); padding-bottom: 10px; margin-top: 36px; }
.pick { border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 4px; }
.pick .rank { color: var(--brand); font-family: "Noto Serif KR", serif; letter-spacing: .1em; }
.pamt { background: none; color: var(--navy); font-family: "Noto Serif KR", serif; font-size: 20px; padding: 0; }
.pick .go { width: 100%; }
.cta { margin-top: 40px; background: var(--navy); color: #fff; border-radius: 6px; padding: 26px 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta h3 { font-family: "Noto Serif KR", serif; margin: 0 0 4px; font-size: 20px; } .cta p { margin: 0; color: #c3cfdd; font-size: 14px; }
.cfoot { padding-bottom: 40px; }
@media (max-width: 760px) {
  .rowhead { grid-template-columns: 1fr; } .rt { flex-wrap: wrap; }
  .ch1 { font-size: 24px; } .cdate { display: none; } .cstats { grid-template-columns: 1fr 1fr 1fr; }
  .cta .btn { width: 100%; } .tab { flex: 0 0 auto; }
}
@media print { .top, .chead .chin { display: none !important; } .chead { background: none; color: #000; padding: 0; } .ch1, .clead { color: #000; } .cstats { margin-top: 10px; box-shadow: none; } .rowmore, .cta { display: none !important; } }
.pamt small { display: block; font-family: 'Noto Sans KR', sans-serif; font-size: 12px; color: var(--muted); font-weight: 400; }

.sizeauto { margin-top: 8px; font-weight: 400; font-size: 13px; line-height: 1.55; background: #f3f7fc; border: 1px solid #c7d6e7; border-radius: 4px; padding: 9px 11px; color: #152c49; }
.sizeauto small { color: var(--muted); font-size: 11.5px; } .sizeauto .warn { color: #a4282b; }
.linkbtn { border: 1.5px solid #152c49; background: #fff; color: #152c49; font: inherit; font-size: 12.5px; font-weight: 700; border-radius: 4px; padding: 3px 8px; cursor: pointer; margin-top: 4px; }

.notice { grid-column: 1 / -1; border: 1px solid #c7d6e7; border-radius: 4px; background: #fff; }
.notice.none { padding: 10px 12px; font-size: 13px; color: var(--muted); background: #f7f9fc; }
.notice .nh { padding: 10px 12px; background: #f3f7fc; border-bottom: 1px solid #d9e3ef; font-size: 13.5px; }
.notice .nh b { color: var(--navy); margin-right: 8px; } .notice .nh span { color: var(--muted); font-size: 12px; }
.nrow { display: grid; grid-template-columns: 110px 1fr; border-bottom: 1px solid #edf1f6; } .nrow:last-child { border-bottom: 0; }
.nk { padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--navy); background: #fafbfd; }
.nv { padding: 8px 12px; font-size: 13.5px; }
.ex { white-space: pre-line; line-height: 1.6; } .ex + .ex { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e3e8ef; }
.ex.miss { color: #8a94a3; }
@media (max-width: 760px) { .nrow { grid-template-columns: 1fr; } .nk { padding-bottom: 2px; } }
@media print { .notice { break-inside: avoid; } }

/* ===================== 화면 폭 활용·정렬 다듬기 ===================== */
.top { padding: 12px 28px; }
.layout { max-width: 1760px; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; padding: 22px 28px 40px; }
.form { top: 80px; max-height: calc(100vh - 100px); padding: 20px; }
.form h2 { font-size: 19px; }
.samples .chips .chip, #recentProfiles .chip { min-height: 32px; font-size: 13px; padding: 0 10px; }
.summary { padding: 18px 22px; }
.summary .bar h2 { font-size: 22px; }
.profile-line { margin-top: 4px; }
.seg { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 12px; }
.segb { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.segb b { display: inline; font-size: 26px; line-height: 1; }
.filters { gap: 8px; flex-wrap: wrap; }
.filters select { min-height: 38px; border-radius: 4px; }
.disclaimer { margin: 10px 0 0; }
/* 탭: 한 줄 유지, 넘치면 옆으로 밀어 보기 */
.tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding: 10px 0 8px; }
.tab { flex: 0 0 auto; padding: 0 14px; white-space: nowrap; font-size: 14px; }
/* 목록: 칸 너비 고정 표 */
.lhead, .rowhead { display: grid; grid-template-columns: 96px minmax(0, 1fr) 150px 170px 104px; gap: 16px; align-items: center; }
.lhead { padding: 10px 18px; font-size: 12.5px; color: var(--muted); background: #f7f9fc; border-bottom: 1px solid var(--line); }
.rowhead { padding: 14px 18px; }
.rtitle { font-size: 15.5px; line-height: 1.45; word-break: keep-all; }
.agency { margin-top: 3px; }
.c-amt .amt { font-weight: 800; font-size: 14.5px; color: var(--navy); white-space: normal; word-break: keep-all; }
.c-amt .amt.none { font-weight: 500; font-size: 13px; color: #9aa4b2; }
.c-type .type { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; text-align: left; font-size: 12.5px; padding: 4px 9px; }
.c-btn { text-align: right; }
.rowmore { min-height: 36px; padding: 0 12px; }
.detail { padding: 2px 18px 18px 130px; }
.dday { min-width: 64px; text-align: center; }
@media (max-width: 1200px) {
  .layout { grid-template-columns: 320px minmax(0, 1fr); padding: 18px; gap: 18px; }
  .lhead, .rowhead { grid-template-columns: 84px minmax(0, 1fr) 128px 104px; }
  .lhead > div:nth-child(4), .c-type { display: none; }
  .detail { padding-left: 118px; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .form { position: static; max-height: none; }
}
@media (max-width: 760px) {
  .lhead { display: none; }
  .rowhead { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "d amt btn" "t t t"; gap: 8px 10px; padding: 14px; }
  .rowhead > div:nth-child(1) { grid-area: d; } .rowhead .t { grid-area: t; } .c-amt { grid-area: amt; } .c-btn { grid-area: btn; }
  .c-type { display: none; }
  .segb { flex-direction: column; align-items: flex-start; font-size: 12.5px; padding: 10px; } .segb b { font-size: 22px; }
  .detail { padding: 0 14px 14px; }
  .top { padding: 10px 14px; }
}
/* 고객용도 같은 폭 규칙 */
body.customer .lhead, body.customer .rowhead { grid-template-columns: 96px minmax(0, 1fr) 150px 170px 104px; }
@media (max-width: 1200px) { body.customer .lhead, body.customer .rowhead { grid-template-columns: 84px minmax(0, 1fr) 128px 104px; } }
@media (max-width: 760px) { body.customer .rowhead { grid-template-columns: auto minmax(0, 1fr) auto; } }
.c-amt .amt.none { border: 0 !important; background: none !important; padding: 0; }
.c-amt .amt { border: 0; background: none; padding: 0; }
@media (max-width: 1500px) { .lhead, .rowhead { grid-template-columns: 90px minmax(0, 1fr) 130px 150px 100px; gap: 14px; } .detail { padding-left: 122px; } }
@media (max-width: 760px) { .tabs { position: static; } .c-amt .amt.none { display: none; } }
.cwrap { max-width: 1320px; }

/* 개선안 1~3 */
.clead2 { color: var(--muted); margin: -4px 0 12px; font-size: 14px; }
.urg { margin: 14px 0 0; padding: 0; list-style: none; border: 1px solid #f0cccc; background: #fdf5f5; border-radius: 4px; }
.urg li { display: grid; grid-template-columns: 84px minmax(0,1fr) auto auto; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid #f3dede; font-size: 14px; }
.urg li:last-child { border: 0; } .urg .dd { font-weight: 800; color: #a4282b; } .urg b { color: var(--navy); white-space: nowrap; }
.opps { display: grid; gap: 8px; }
.opp { display: grid; grid-template-columns: 90px minmax(0,1fr) auto; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 14px 18px; }
.onum { font-family: "Noto Serif KR", serif; font-size: 32px; text-align: center; color: var(--navy); } .onum small { font-size: 14px; }
.ob { font-size: 15px; } .ob small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; } .ob .oex { color: #8a94a3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.road { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 18px; }
.road .m { font-weight: 800; color: var(--brand); border-bottom: 3px solid var(--brand); padding-bottom: 6px; margin-bottom: 10px; }
.rc { background: #f3f7fc; border: 1px solid var(--line); border-radius: 4px; padding: 10px; font-size: 13px; margin-bottom: 8px; line-height: 1.5; color: var(--muted); }
.rc b { display: block; color: var(--navy); font-size: 13.5px; } .rc.j { background: var(--navy); border-color: var(--navy); color: #c9d6e6; } .rc.j b { color: #fff; } .rc.empty { background: none; border-style: dashed; }
@media (max-width: 760px) { .opp { grid-template-columns: 64px 1fr; } .osvc { grid-column: 1 / -1; } .road { grid-template-columns: 1fr; } .urg li { grid-template-columns: 70px 1fr; } .urg li b, .urg li .btn { grid-column: 2; justify-self: start; } }
@media print { .osvc, .urg .btn { display: none; } }
.ob { min-width: 0; }
@media (max-width: 760px) { .opp { grid-template-columns: 64px minmax(0, 1fr); } .osvc { white-space: normal; text-align: center; width: 100%; min-height: 46px; } .onum { font-size: 26px; } }
.topr { display: flex; align-items: center; gap: 10px; } .guidebtn { color: #fff; font-weight: 700; text-decoration: none; border: 1.5px solid #3b5a85; border-radius: 4px; padding: 7px 14px; font-size: 14px; white-space: nowrap; } .guidebtn:hover { background: rgba(255,255,255,.08); }
@media (max-width: 760px) { .topr { width: 100%; justify-content: space-between; } }

/* ===================== 휴대폰 화면 최종 정리 (맨 마지막에 두어 위 설정을 덮음) ===================== */
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .layout { padding: 10px; gap: 12px; }
  .panel, .summary { padding: 14px; }
  .summary .bar h2 { font-size: 19px; }
  .actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .actions .btn { min-height: 40px; font-size: 13.5px; padding: 0 8px; }
  .actions #custBtn { grid-column: 1 / -1; }
  .profile-line { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .seg { grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 8px; }
  .segb { flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; font-size: 12px; }
  .segb b { font-size: 20px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .filters > .muted { display: none; }
  .filters select { width: 100%; font-size: 12.5px; min-height: 36px; }
  .disclaimer { font-size: 11.5px; }
  .tabs { position: static; padding: 6px 0; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
  .tab { min-height: 38px; padding: 0 12px; font-size: 13px; }
  /* 목록: 한 줄 머리(상태·금액·펼침) + 사업명 + 기관 */
  .lhead { display: none !important; }
  .list { border-radius: 6px; }
  .lhead, .rowhead, body.customer .rowhead { grid-template-columns: auto minmax(0, 1fr) auto !important; grid-template-areas: "d amt btn" "t t t"; gap: 6px 10px; padding: 12px 14px; }
  .rowhead > div:nth-child(1) { grid-area: d; } .rowhead .t { grid-area: t; } .c-amt { grid-area: amt; align-self: center; } .c-btn { grid-area: btn; }
  .c-type { display: none !important; }
  .dday { min-width: 0; padding: 2px 8px; font-size: 12.5px; }
  .c-amt .amt { font-size: 13.5px; } .c-amt .amt.none { display: none; }
  .rowmore { min-height: 30px; padding: 0 4px; border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; }
  .row.open .rowmore { background: none; color: var(--brand); }
  .rtitle { font-size: 15px; line-height: 1.45; }
  .agency { font-size: 12px; }
  .detail { padding: 0 14px 14px !important; }
  .dgrid { grid-template-columns: 1fr; gap: 10px; }
  .notice .nh span { display: block; }
  .nrow { grid-template-columns: 1fr; } .nk { padding: 8px 10px 0; background: none; } .nv { padding: 4px 10px 10px; font-size: 13px; }
  .more { min-height: 46px; }
  /* 고객용 */
  .chin { padding-top: 12px; padding-bottom: 16px; }
  .ch1 { font-size: 22px; } .clead { font-size: 13px; }
  .chead { padding-bottom: 60px; }
  .cwrap { padding: 0 12px; }
  .cstats { grid-template-columns: repeat(3, 1fr) !important; }
  .cstat { padding: 10px; } .cstat span { font-size: 11.5px; } .cstat b { font-size: 22px; }
  .ch2 { font-size: 18px; margin-top: 26px; }
  .top3 { grid-template-columns: 1fr; gap: 8px; } .pick { padding: 14px; } .pick h3 { font-size: 15px; } .pamt { font-size: 18px; }
  .urg li { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding: 10px 12px; font-size: 13.5px; }
  .urg li b { display: none; } .urg li .btn { grid-column: auto; min-height: 32px; padding: 0 10px; font-size: 12.5px; }
  .opp { padding: 12px; gap: 10px; } .onum { font-size: 24px; } .ob { font-size: 14px; }
  .road { padding: 12px; gap: 10px; }
  .cta { padding: 18px; } .cta h3 { font-size: 17px; }
}
.segb .sm { display: none; }
@media (max-width: 760px) { .segb .lg { display: none; } .segb .sm { display: inline; } .cstat span { white-space: nowrap; } }
