/* 입찰·지원사업 관리 전용 (회계 ERP app.css 위에 덧붙임) */
.brand-sub { font-weight: 400; color: #9fb0c6; font-size: 13px; margin-left: 4px; }
.nav-soon { color: #6f7f94; font-size: 12px; padding: 0 8px; white-space: nowrap; }
@media (max-width: 1100px) { .nav-soon { display: none; } }

/* 우선순위 A/B/C */
.prio { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; font-size: 11px; font-weight: 700; vertical-align: middle; }
.prio-A { background: #d64545; color: #fff; }
.prio-B { background: #f1c75b; color: #5a4200; }
.prio-C { background: #dfe4ec; color: #4a5568; }

/* 상태 색 */
.badge.st-idle, .st-select.st-idle { background: #eef1f6; color: #4a5568; }
.badge.st-work, .st-select.st-work { background: #fff3d6; color: #7a5300; }
.badge.st-sent, .st-select.st-sent { background: #e3ecfb; color: #2a56b3; }
.badge.st-won, .st-select.st-won { background: #e3f6ec; color: #1d6b45; }
.badge.st-lost, .st-select.st-lost { background: #fbe6e6; color: #8d2323; }
.badge.st-pass, .st-select.st-pass { background: #f1f1f1; color: #8a8f98; }
.st-select { border: 1px solid transparent; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 600; width: auto; margin: 0; cursor: pointer; }

/* D-day */
.dday { display: inline-block; font-weight: 700; font-size: 12px; padding: 1px 7px; border-radius: 6px; background: #eef1f6; color: #4a5568; font-variant-numeric: tabular-nums; }
.dday.soon { background: #fff3d6; color: #7a5300; }
.dday.urgent { background: #d64545; color: #fff; }
.dday.past { background: #e5e7eb; color: #9aa1ab; text-decoration: line-through; }
.dday.big { font-size: 16px; padding: 3px 10px; }

/* 추정 / 확정 / 원문 확인 */
.tag-est, .tag-ok, .vchk { display: inline-block; font-size: 10px; font-weight: 600; padding: 0 6px; border-radius: 4px; vertical-align: middle; line-height: 17px; }
.tag-est { border: 1px dashed #c9a24a; color: #8a6a1a; }
.tag-ok { background: #e3f6ec; color: #1d6b45; }
.vchk { background: #e3ecfb; color: #2a56b3; margin-left: 4px; }

/* 일정 구분 */
.kind { display: inline-block; min-width: 34px; text-align: center; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; vertical-align: middle; }
.k-마감 { background: #fbe6e6; color: #8d2323; }
.k-접수 { background: #e3ecfb; color: #2a56b3; }
.k-공고 { background: #e3f6ec; color: #1d6b45; }
.k-준비 { background: #eef1f6; color: #4a5568; }
.k-기타 { background: #f5f0ff; color: #5b3fa0; }

.evlist { list-style: none; margin: 0; padding: 0; }
.evlist li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.evlist li:last-child { border-bottom: 0; }
.evlist li.done { opacity: .45; }
.evlist li.done a, .evlist li.done b { text-decoration: line-through; }
.evlist li.past { opacity: .6; }
.evlist li.fixed { background: #fbfdfb; }
.evlist.compact li { display: block; }
.evlist.compact li .small { margin: 2px 0; }
.ev-actions { margin-left: auto; white-space: nowrap; }
.linkbtn { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0 4px; font: inherit; }
.linkbtn.danger { color: var(--danger); }

.tile-link { display: block; color: inherit; }
.tile-link:hover { text-decoration: none; border-color: var(--primary); }
.tile-value small { font-size: 14px; color: var(--muted); font-weight: 400; }

.tasklist, .loglist, .declist, .links { margin: 0; padding: 0; }
.tasklist { list-style: none; }
.tasklist li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tasklist li .grow { flex: 1; }
.tasklist li.done .grow { color: var(--muted); text-decoration: line-through; }
.chk { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; color: var(--primary); padding: 0; }
.loglist { list-style: none; max-height: 520px; overflow: auto; }
.loglist li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.loglist li.lk-import { color: #6b7684; font-size: 12px; }
.loglist li.lk-status .pre-line { font-weight: 600; }
.declist { padding-left: 18px; }
.declist li { margin-bottom: 6px; font-size: 13px; }
.links { list-style: none; }
.links li { padding: 3px 0; word-break: break-all; font-size: 13px; }

.pre-line { white-space: pre-line; margin: 0; }
.clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 340px; }
.dl.wide { grid-template-columns: 130px 1fr; }

/* 상세: 상태 단계 버튼 */
.flowbar { display: flex; flex-wrap: wrap; gap: 4px; }
.fstep { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); }
.fstep:hover { border-color: var(--primary); color: var(--primary); }
.fstep.past { background: #f3f6fb; color: #6b7684; }
.fstep.cur { font-weight: 700; border-color: transparent; cursor: default; }
.fstep.cur.st-idle { background: #4a5568; color: #fff; }
.fstep.cur.st-work { background: #c98a12; color: #fff; }
.fstep.cur.st-sent { background: var(--primary); color: #fff; }
.fstep.cur.st-won { background: var(--ok); color: #fff; }
.fstep.cur.st-lost { background: var(--danger); color: #fff; }
.fstep.cur.st-pass { background: #9aa1ab; color: #fff; }

details.readme > summary { cursor: pointer; list-style: none; }
details.readme > summary::-webkit-details-marker { display: none; }
.md { margin-top: 12px; font-size: 13px; overflow-x: auto; }
.md table { border-collapse: collapse; margin: 8px 0; }
.md th, .md td { border: 1px solid var(--line); padding: 4px 8px; vertical-align: top; }
.md h1 { font-size: 18px; margin: 12px 0 8px; }
.md h2 { font-size: 15px; margin: 16px 0 6px; }

details.add-ev { margin-top: 10px; position: relative; }
details.add-ev > summary { cursor: pointer; color: var(--primary); list-style: none; }
details.add-ev > summary::-webkit-details-marker { display: none; }
details.add-ev .pop { position: absolute; right: 0; top: calc(100% + 6px); width: 520px; max-width: 92vw; z-index: 40; box-shadow: 0 10px 30px rgba(0,0,0,.15); }

.months { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.month.now { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.month.old { opacity: .7; }
@media (max-width: 960px) { .months { grid-template-columns: 1fr; } }

.danger-zone { border-color: #f3bcbc; }
textarea { font: inherit; }

/* ---------- 2단계: 서류·파일·신청서 ---------- */
.ftype { display: inline-block; min-width: 38px; text-align: center; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 4px; border-radius: 4px; background: #eef1f6; color: #4a5568; }
.table.files td { vertical-align: top; }
.upload-row { margin-top: 10px; flex-wrap: wrap; }
.upload-row input[type=file] { max-width: 280px; }
.suggest { margin-top: 10px; padding: 10px; background: #f7f9fc; border-radius: 8px; }
.suggest .chips { margin: 6px 0 8px; }
.suggest .chip { cursor: pointer; }
.progress { height: 6px; background: #eef1f6; border-radius: 999px; overflow: hidden; margin: 4px 0 6px; }
.progress span { display: block; height: 100%; background: var(--ok); }
.outline-mini { margin: 6px 0 0; padding-left: 20px; font-size: 13px; }
.outline-mini li { margin: 2px 0; }

.draft-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.draft-side { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; }
.side-md { font-size: 12px; }
.side-md table { font-size: 11px; }
@media (max-width: 1100px) { .draft-wrap { grid-template-columns: 1fr; } .draft-side { position: static; max-height: none; } }
.section .sec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.section .sec-head h2 { margin: 0 0 6px; }
.section .hint { margin: 0 0 4px; font-size: 12px; color: #4a5568; background: #f7f9fc; padding: 4px 8px; border-radius: 6px; }
.section .hint.limit { background: #fff6e0; color: #7a5300; }
.section textarea { width: 100%; margin-top: 6px; line-height: 1.7; font-size: 14px; resize: vertical; }
.sec-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 6px; }
.sec-meta { margin-left: auto; }
.sec-meta[open] { flex-basis: 100%; margin-left: 0; padding: 10px; background: #f7f9fc; border-radius: 8px; }
.sec-meta summary { cursor: pointer; color: var(--primary); }
.save-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(244,246,249,.95); border-top: 1px solid var(--line); margin: 0 -2px 16px; z-index: 5; }
.box-light { background: #f7f9fc; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.card.conflict { border-color: #f3bcbc; }
.mono { font-family: Consolas, "D2Coding", monospace; font-size: 13px; width: 100%; }
.suggest .chip input[type=checkbox], .tasklist input[type=checkbox] { width: auto; margin: 0; padding: 0; }
.suggest .chip { padding: 4px 10px; }

/* ---------- 3단계: 공고함 ---------- */
.tiles { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.lv { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 22px; border-radius: 6px; font-weight: 700; font-size: 12px; }
.lv-상 { background: #d64545; color: #fff; }
.lv-중 { background: #f1c75b; color: #5a4200; }
.lv-하 { background: #dfe4ec; color: #4a5568; }
.lv-제외 { background: #f1f1f1; color: #9aa1ab; }
.chips.tight { gap: 4px; margin-top: 4px; }
.chip.ok { background: #e3f6ec; color: #1d6b45; font-size: 11px; padding: 1px 8px; }
.chip.warn { background: #fff3d6; color: #7a5300; font-size: 11px; padding: 1px 8px; }
.table.notices td { vertical-align: top; }
.n-actions { white-space: nowrap; }
.n-actions form.inline, .n-actions details { display: inline-block; vertical-align: top; margin: 0 2px 4px 0; }
details.dd-inline { position: relative; }
details.dd-inline > summary { list-style: none; cursor: pointer; }
details.dd-inline > summary::-webkit-details-marker { display: none; }
.pop-form { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 10px; display: flex; flex-direction: column; gap: 6px; width: 300px; white-space: normal; }
.src-status { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 16px; }
.src { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #eef1f6; color: #4a5568; }
.src b { margin-right: 4px; }
.src.ok { background: #e3f6ec; color: #1d6b45; }
.src.warn { background: #fff3d6; color: #7a5300; }
.src.fail { background: #fbe6e6; color: #8d2323; }
.manual-sites { margin-left: auto; }
.manual-sites summary { cursor: pointer; color: var(--primary); }
.fb-check { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; }
.fb-check input, .table input[type=checkbox], .chip input[type=checkbox] { width: auto; margin: 0; }
.bulk-bar { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding-top: 10px; }
.bulk-bar select { width: auto; }
.filter-bar .fb-field.fb-check { flex-direction: row; align-items: center; align-self: flex-end; padding-bottom: 8px; }

/* ---------- 4단계: 입찰 ---------- */
.can { font-weight: 600; font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.can-가능 { background: #e3f6ec; color: #1d6b45; }
.can-확인필요 { background: #fff3d6; color: #7a5300; }
.can-못냄 { background: #fbe6e6; color: #8d2323; }
.card.ready.warn { border-color: #f1dca3; }
.card.ready .chip { text-decoration: none; }
.card.ready .chip:hover { background: #e3e8f0; }
.mono-inline { font-family: Consolas, "D2Coding", monospace; }
