/* 입찰 탭 (bid.js, 목업 docs/mockups/bid.html v2, 11-18). 색은 앱 변수만 — 지금 쓰는 따뜻한 회색(warm-gray.css)을 그대로 따른다.
   레이아웃: 위 제목 + 보기 단추 → 판정 칩 → 2열 카드. 카드를 누르면 탭 위에 팝업. */
.page.bid { position: relative; gap: 0; padding: 0; overflow-y: auto; min-height: 0; flex: 1; }
.bd-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 20px; padding: 22px 26px 6px; }
.bd-top .eb { font-size: 13.5px; font-weight: 600; color: var(--accent); }
.bd-top h2 { margin: 2px 0 2px; font-size: 23px; line-height: 1.3; color: var(--head); letter-spacing: -.01em; }
.bd-top small { font-size: 12.5px; color: var(--dim); }
.bd-top .bad { color: var(--red); }
.bd-views { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.bd-views button { height: 30px; padding: 0 11px; border: 0; border-radius: 15px; background: none; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.bd-views button:hover { background: var(--surface2); color: var(--head); }
.bd-views button[aria-pressed="true"] { background: var(--fg); color: #fff; }
.bd-hint { margin: 8px 26px 0; padding: 9px 14px; border-radius: 12px; background: var(--surface2); font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bd-hint button { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.bd-hint.ok { background: var(--accent-soft); }
.bd-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 26px 4px; }
.bd-filters .chip { height: 30px; padding: 0 13px; font-size: 13px; }
.bd-filters .chip[aria-pressed="true"] { background: var(--fg); color: #fff; border-color: var(--fg); }
.bd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; padding: 12px 26px 28px; align-items: start; }
.bd-empty { margin: 30px 26px; padding: 26px; border-radius: 16px; background: var(--surface2); color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.bd-empty b { color: var(--head); font-size: 15px; }
.bd-empty.sm { margin: 0; grid-column: 1 / -1; }

.bd-card { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); font: inherit; text-align: left; color: inherit; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.bd-card:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(40, 32, 24, .07); }
.bd-card.gone { background: var(--surface2); }
.bd-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 600; }
.bd-card .match { display: inline-flex; align-items: center; gap: 6px; }
.bd-card .match.ok { color: var(--green); } .bd-card .match.warn { color: var(--amber); } .bd-card .match.x { color: var(--red); } .bd-card .match.done { color: var(--dim); }
.bd-card .bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.bd-card .bars i { width: 3px; border-radius: 1px; background: currentColor; opacity: .22; }
.bd-card .bars i:nth-child(1) { height: 6px; } .bd-card .bars i:nth-child(2) { height: 9px; } .bd-card .bars i:nth-child(3) { height: 12px; }
.bd-card .bars i.on { opacity: 1; }
.bd-card .due { color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-card .due.calm { color: var(--muted); }
.bd-card .ttl { font-size: 16px; line-height: 1.45; color: var(--head); font-weight: 700; text-wrap: balance; }
.bd-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-card .tg { min-height: 24px; padding: 2px 8px; border-radius: 6px; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; background: var(--surface2); color: var(--muted); }
.bd-card .tg .ic { width: 12px; height: 12px; }
.bd-card .tg.warn { background: rgba(180, 120, 40, .12); color: var(--amber); font-weight: 600; }
.bd-card .tg.x { background: rgba(163, 78, 67, .1); color: var(--red); font-weight: 600; }
.bd-card .org { font-size: 12.5px; color: var(--dim); }
.bd-card .rec { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 9px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); }
.bd-card .rec b { font: 700 14.5px var(--display); font-stretch: 104%; color: var(--head); font-variant-numeric: tabular-nums; }
.bd-card .rec .m { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-card .rec .m.dim { color: var(--dim); font-weight: 500; }

/* 팝업 */
.bd-scrim { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: rgba(40, 34, 28, .3); }
.bd-sheet { width: 600px; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; background: var(--card); border-radius: 20px; box-shadow: 0 20px 60px rgba(40, 32, 24, .25); overflow: hidden; }
.bd-sheet .sh { flex: none; display: flex; align-items: flex-start; gap: 10px; padding: 20px 22px 10px; }
.bd-sheet .sh h3 { flex: 1; margin: 0; font-size: 19px; line-height: 1.4; color: var(--head); text-wrap: balance; }
.bd-sheet .x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.bd-sheet .x:hover { background: var(--surface2); }
.bd-sheet .x .ic { width: 18px; height: 18px; }
.bd-sheet .sb { flex: 1; min-height: 0; overflow-y: auto; padding: 0 22px 8px; display: flex; flex-direction: column; gap: 12px; }
.bd-sheet .kv { border: 1px solid var(--line); border-radius: 12px; }
.bd-sheet .kv div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 14px; font-size: 13.5px; border-top: 1px solid var(--line-soft); }
.bd-sheet .kv div:first-child { border-top: 0; }
.bd-sheet .kv span { flex: none; color: var(--dim); }
.bd-sheet .kv b { color: var(--head); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.bd-sheet .kv b.ok { color: var(--green); } .bd-sheet .kv b.warn { color: var(--amber); } .bd-sheet .kv b.x { color: var(--red); }
.bd-sheet .box { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: var(--text); }
.bd-sheet .box.why { background: var(--surface2); }
.bd-sheet .box.guide { background: var(--accent-soft); }
.bd-sheet .bt { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.bd-sheet .bt .ic { width: 14px; height: 14px; }
.bd-sheet .big { font: 700 22px/1.3 var(--display); font-stretch: 104%; color: var(--head); font-variant-numeric: tabular-nums; }
.bd-sheet .big small { font: 500 13px var(--font); color: var(--muted); margin-left: 3px; }
.bd-sheet .sub { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.bd-sheet .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.bd-sheet .cols div { font-size: 12px; color: var(--muted); }
.bd-sheet .cols b { display: block; font: 700 15px/1.3 var(--display); color: var(--head); font-variant-numeric: tabular-nums; }
.bd-sheet .note { margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.bd-sheet .rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.bd-sheet .rules li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6px; }
.bd-sheet .rules .mk { font-weight: 700; text-align: center; }
.bd-sheet .rules .ok .mk { color: var(--green); } .bd-sheet .rules .warn .mk, .bd-sheet .rules .note .mk { color: var(--amber); } .bd-sheet .rules .x .mk { color: var(--red); }
.bd-sheet .sec-t { font-size: 13.5px; font-weight: 700; color: var(--head); margin-bottom: -4px; }
.bd-sheet .sec-t small { font-weight: 400; color: var(--dim); font-size: 12px; margin-left: 4px; }
.bd-sheet .hist, .bd-sheet .files { border: 1px solid var(--line); border-radius: 12px; }
.bd-sheet .hist > div, .bd-sheet .files > div { padding: 9px 14px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.bd-sheet .hist > div:first-child, .bd-sheet .files > div:first-child { border-top: 0; }
.bd-sheet .hist .r1 { display: flex; justify-content: space-between; gap: 10px; }
.bd-sheet .hist .r1 span:last-child { color: var(--dim); font-size: 12px; white-space: nowrap; }
.bd-sheet .hist .r2 { color: var(--muted); font-variant-numeric: tabular-nums; }
.bd-sheet .hist .r2 b { color: var(--head); }
.bd-sheet .files > div { display: flex; align-items: center; gap: 8px; }
.bd-sheet .files .ic { width: 15px; height: 15px; color: var(--dim); }
.bd-sheet .files .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-sheet .files a { font-weight: 600; color: var(--accent); text-decoration: none; }
.bd-sheet .docs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.bd-sheet .docs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.bd-sheet .docs li:first-child { border-top: 0; }
.bd-sheet .docs small { display: block; font-size: 12px; color: var(--dim); }
.bd-lnk { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; }
.bd-sheet .sf { flex: none; padding: 12px 22px 18px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); }
.bd-sheet .sf .go { height: 50px; border-radius: 14px; background: var(--fg); color: #fff; font-size: 15.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.bd-sheet .sf .close { height: 42px; border: 0; border-radius: 14px; background: var(--surface2); color: var(--muted); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.bd-sheet .sf small { text-align: center; font-size: 12px; color: var(--dim); }
.page.bid .st { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface2); color: var(--muted); }
.page.bid .st.ok { color: var(--green); } .page.bid .st.warn { color: var(--amber); } .page.bid .st.x { color: var(--red); }

/* 보조 화면 */
.bd-pad { padding: 10px 26px 28px; display: flex; flex-direction: column; gap: 12px; }
.bd-pad .fine { margin: 0; font-size: 13px; color: var(--muted); }
.bd-pad h4 { margin: 6px 0 4px; font-size: 14px; color: var(--head); }
.bd-pad h4 small { font-weight: 400; color: var(--dim); font-size: 12px; margin-left: 4px; }
.bd-pad .tbl td small { display: block; font-size: 11.5px; color: var(--dim); }
.bd-pad .tbl td.r, .bd-pad .tbl th.r { text-align: right; }
.bd-pad input[type=date], .bd-form select, .bd-form input { height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); color: var(--head); font: inherit; font-size: 13px; }
.bd-pad .btn-line.sm { height: 28px; padding: 0 11px; font-size: 12px; }
.bd-form { display: grid; grid-template-columns: minmax(0, 300px) 180px; gap: 14px 20px; align-items: center; }
.bd-form label { font-size: 14px; font-weight: 600; color: var(--head); }
.bd-form label small { display: block; font-weight: 400; font-size: 12px; color: var(--dim); }
.bd-kpis { display: flex; flex-wrap: wrap; gap: 26px; }
.bd-kpis div { font-size: 12.5px; color: var(--muted); }
.bd-kpis b { display: block; font: 700 21px/1.25 var(--display); font-stretch: 104%; color: var(--head); font-variant-numeric: tabular-nums; }
.bd-kpis small { display: block; font-size: 11.5px; color: var(--dim); }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px 26px; }
.bd-hist { display: block; width: 100%; height: auto; aspect-ratio: 56 / 15; }
.bd-grid .tbl { min-width: 0; }                                      /* 되짚어 보기 표가 좁은 칸을 넘지 않게 */
.bd-grid .tbl td { white-space: normal; }
.bd-hist text { font: 11px var(--font); fill: var(--muted); }
.bd-hist .gl { stroke: var(--line); }
.bd-hist .bar { fill: var(--accent); fill-opacity: .7; }
.bd-hist .mk { stroke: var(--head); stroke-dasharray: 3 3; }
@media (max-width: 640px) { .bd-form { grid-template-columns: 1fr; } .bd-sheet .cols { grid-template-columns: 1fr 1fr; } }
/* 첨부 요약 · 원가 (11-18) */
.bd-card .tg.car { background: var(--accent-soft); color: var(--head); font-weight: 600; }
.bd-card .rec .m.neg, .bd-sheet .neg { color: var(--red); }
.bd-sheet .pos { color: var(--green); }
.bd-sheet .box.spec { background: var(--surface2); }
.bd-sheet .big.sm { font-size: 17px; }
.bd-sheet .sub.acc { color: var(--accent); font-weight: 600; margin-top: 2px; }
.bd-sheet .terms { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }
.bd-sheet .terms small { color: var(--dim); font-size: 11.5px; }
.bd-sheet .note b { color: var(--red); font-weight: 600; }
.bd-sheet .sf .ask { height: 44px; border: 0; border-radius: 14px; background: var(--accent-soft); color: var(--head); font: inherit; font-size: 14.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.bd-sheet .sf .ask .ic { width: 17px; height: 17px; }
.bd-prices { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.bd-prices .pr { padding: 5px 10px; border-radius: 10px; background: var(--surface2); display: inline-flex; gap: 6px; align-items: baseline; }
.bd-form.add { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
.bd-form.add input[type=text] { width: 100%; }
