/* 공고 목록 표 (맞춤공고·전체공고 공통) — views/partials/notice-table.ejs, notice-legend.ejs */
.nl-top { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.nl-top .search-filter-bar { margin-bottom: 0; }

.nl-table td { vertical-align: middle; }
.nl-table th { white-space: nowrap; line-height: 1.4; }
/* 칸이 많아 좌우 여백을 줄이고, 기관·지역 이름은 단어 중간에서 끊지 않는다 */
.data-table.nl-table th, .data-table.nl-table td { padding-left: 10px; padding-right: 10px; }
.data-table.nl-table th:first-child, .data-table.nl-table td:first-child { padding-left: 16px; }
.data-table.nl-table th:last-child, .data-table.nl-table td:last-child { padding-right: 16px; }
.nl-table td { word-break: keep-all; }
.nl-title { min-width: 220px; }
.nl-type { width: 56px; text-align: center !important; }
.nl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.nl-tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.6; white-space: nowrap; }
.nl-tag--lg { padding: 3px 9px; font-size: var(--fs-sm); }
/* 공고 구분: 공사(주황)·용역(하늘)·물품(연두) */
.nl-tag--cnstwk { background: #fff1e6; color: #c2410c; }
.nl-tag--servc { background: #e0f2fe; color: #0369a1; }
.nl-tag--thng { background: #ecfccb; color: #4d7c0f; }
.nl-tag--qual { background: var(--color-success-bg); color: var(--color-success); }
.nl-tag--nego { background: #e6f4f1; color: #0f766e; }
.nl-tag--lowest { background: #eef2ff; color: #4338ca; }
.nl-tag--quote { background: #f5ede4; color: #8a5a2b; }
.nl-tag--limit { background: #fdecef; color: #be123c; }
.nl-tag--joint { background: var(--color-purple-bg); color: var(--color-purple); }
.nl-tag--private { background: var(--color-primary-light); color: var(--color-primary-dark); }
.nl-tag--check { background: #FFF7E6; color: #B45309; }
.nl-tag--urgent { background: var(--color-danger); color: #fff; }
.nl-tag--change { background: var(--color-warning-bg); color: var(--color-warning); }
.nl-tag--cancel { background: var(--color-text); color: #fff; }

.nl-sub { margin-top: 4px; font-size: var(--fs-xs); color: var(--color-text-muted); }
.nl-no { white-space: nowrap; letter-spacing: -0.2px; }
.nl-agency { font-size: var(--fs-sm); min-width: 150px; }
/* 수요기관은 발주기관 옆에 괄호로 (발주기관·수요기관·공고번호를 2줄로) */
.nl-demand { color: var(--color-text-muted); }
/* 첫 줄은 한 줄로 — 긴 수요기관은 …으로 줄이고 마우스를 올리면 전체 이름 */
.nl-agency__name { max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-num { text-align: right !important; white-space: nowrap; }
.nl-budget { color: var(--color-danger); font-weight: 600; }
.nl-region { font-size: var(--fs-sm); min-width: 92px; }
.nl-date { white-space: nowrap; font-size: var(--fs-base); line-height: 1.7; }
.nl-open { color: var(--color-success); font-weight: 600; }
.nl-table th:last-child, .nl-table td:last-child { white-space: nowrap; }
/* 입찰 시작·마감 두 줄 오른쪽에 D-day를 칸 세로 가운데로 */
.nl-period { display: flex; align-items: center; gap: 8px; }
.nl-dday { display: inline-block; padding: 0 6px; border-radius: 8px; font-size: var(--fs-xs); font-weight: 700; background: var(--color-gray-bg); color: var(--color-text-muted); }
.nl-dday.is-critical { background: var(--color-danger); color: #fff; }
.nl-dday.is-urgent { background: var(--color-danger-bg); color: var(--color-danger); }
.nl-dday.is-soon { background: #FFF1EB; color: #d4562a; }

/* 표시에 마우스를 올리면 바로 밑에 설명 (표 맨 아래 행은 표 밖으로 넘치지 않게 위로) */
.nl-tag[data-tip] { position: relative; cursor: help; }
.nl-tag[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); background: #1f2937; color: #fff; font-size: var(--fs-xs); font-weight: 400; line-height: 1.5; padding: 6px 9px; border-radius: 6px; white-space: nowrap; z-index: 20; pointer-events: none; }
.nl-table tbody tr:last-child .nl-tag[data-tip]:hover::after { top: auto; bottom: calc(100% + 6px); }

/* 범례: '범례 보기'에 마우스를 올리거나 누르면 레이어 */
.nl-legend { position: relative; }
.nl-legend__pop { display: none; position: absolute; right: 0; top: 100%; padding-top: 8px; z-index: 30; }
.nl-legend:hover .nl-legend__pop, .nl-legend.is-open .nl-legend__pop { display: block; }
.nl-legend__box { width: 460px; max-width: calc(100vw - 32px); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14); padding: 14px 16px; }
.nl-legend__title { font-weight: 700; margin-bottom: 10px; }
.nl-legend__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--color-text-muted); }
.nl-legend__list li { display: grid; grid-template-columns: 74px 1fr; align-items: start; gap: 8px; line-height: 1.5; }
.nl-legend__list li > :first-child { justify-self: start; }
.nl-legend__list strong { color: var(--color-text); font-weight: 600; }
.nl-legend__group { margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--color-border); }
@media (max-width: 768px) { .nl-legend__pop { right: auto; left: 0; } }

/* 검색·필터 줄은 PC에서 한 줄, 모바일에서는 줄바꿈하고 칸을 넓게 */
.nl-top .search-filter-bar { flex-wrap: nowrap; }
@media (max-width: 768px) {
  .nl-top .search-filter-bar { flex-wrap: wrap; }
  .nl-top .search-filter-bar .form-control { width: 100% !important; max-width: none !important; }
}

/* ---- 공고 상세 (오른쪽 패널·전체 화면 공통) — views/customer/notices/_detail-body.ejs, public/js/noticePanel.js ---- */
/* 업무시스템 톤: 남색 기본색, 1px 테두리, 그림자·그라데이션 최소, 본문 14px / 줄간격 1.6 */
.nd, .np {
  --nd-primary: #2563EB; --nd-primary-hover: #1D4ED8; --nd-primary-bg: #EFF6FF;
  --nd-bg: #F8FAFC; --nd-surface: #FFFFFF; --nd-border: #E2E8F0;
  --nd-text: #1E293B; --nd-muted: #475569;
  --nd-success: #15803D; --nd-success-bg: #ECFDF3; --nd-warning: #B45309; --nd-warning-bg: #FFF7ED; --nd-danger: #DC2626; --nd-danger-bg: #FEF2F2;
}

/* 패널: 화면 높이 전체, 머리는 위에 고정, 본문만 세로 스크롤 */
.np-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 1000; display: none; }
.np-overlay.is-open { display: block; }
.np { position: absolute; top: 0; right: 0; bottom: 0; width: min(1050px, 85vw); display: flex; flex-direction: column; background: var(--nd-bg); border-left: 1px solid var(--nd-border); box-shadow: -4px 0 16px rgba(15, 23, 42, 0.12); animation: np-in 0.18s ease-out; }
@keyframes np-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.np__close { position: absolute; top: 16px; right: 16px; z-index: 5; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--nd-border); background: var(--nd-surface); font-size: 18px; line-height: 1; cursor: pointer; color: var(--nd-muted); border-radius: 6px; }
.np__close:hover { background: var(--nd-bg); color: var(--nd-text); border-color: #CBD5E1; }
.np__close:focus-visible { outline: 2px solid var(--nd-primary); outline-offset: 2px; }
.np__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 32px 40px; }
.np__loading { padding: 80px 0; text-align: center; color: var(--nd-muted); font-size: var(--fs-base); }
body.np-locked { overflow: hidden; }
.np__nav { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 32px; border-top: 1px solid var(--nd-border); background: var(--nd-surface); }
.np__step { height: 38px; padding: 0 16px; border: 1px solid var(--nd-border); border-radius: 6px; background: var(--nd-surface); color: var(--nd-text); font-size: var(--fs-base); font-weight: 600; cursor: pointer; }
.np__step:hover:not(:disabled) { background: var(--nd-bg); border-color: var(--nd-primary); color: var(--nd-primary); }
.np__step:disabled { color: #94A3B8; cursor: default; }
.np__step:focus-visible { outline: 2px solid var(--nd-primary); outline-offset: 2px; }
.np__pos { color: var(--nd-muted); font-size: var(--fs-base); font-variant-numeric: tabular-nums; }
.np__nav { position: relative; }
.np__right { display: inline-flex; align-items: center; gap: 12px; }
/* 참여 의사 버튼: 아래 막대 가운데 */
.np__act { flex: 1; display: flex; justify-content: center; min-width: 0; }
.np__act .nd-decide { display: contents; }
.np__act .nd-buttons { flex-wrap: nowrap; justify-content: center; }
.np__act .btn { height: 38px; white-space: nowrap; }
.np__act .nd-btn-main { min-width: 120px; height: 38px; }
.np__act .btn.is-busy { opacity: 0.6; pointer-events: none; }
.np__act .nd-np { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); max-width: 640px; margin: 0 auto; background: #FFFBFB; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18); z-index: 6; }
.nd-short { display: none; }
.np__toast { position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translate(-50%, 6px); padding: 10px 16px; border-radius: 6px; background: #1E293B; color: #fff; font-size: var(--fs-base); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.15s; z-index: 7; }
.np__toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.np__toast.is-bad { background: var(--nd-danger); }
/* 맞춤공고 상태별 건수 카드 (조회 필터) */
/* 카드 모양은 stat-tiles.css 공통 규격 */
.nl-sum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nl-sum__item.is-primary strong b { color: var(--color-primary); }
.nl-sum__item.is-warning strong b { color: #C2410C; }
.nl-sum__item.is-purple strong b { color: #7E22CE; }
.nl-sum__item.is-danger strong b { color: var(--color-danger); }
.nl-sum .nl-sum__item--go { background: #F0FDF4; border-color: #BBF7D0; }
.nl-sum__item--go strong b { color: var(--color-success); }
.nl-sum__item--go em { display: block; font-style: normal; font-size: var(--fs-xs); color: var(--color-success); }
@media (max-width: 1100px) { .nl-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) { .nl-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 맞춤공고 위 안내: 참여 공고는 참여·입찰로 */
.nl-moved-note { margin: -4px 0 14px; font-size: var(--fs-base); color: var(--color-text-muted); }
.nl-moved-note a { font-weight: 600; }
/* 패널에서 참여로 바꾼 행: 참여·입찰로 넘어갔다는 표시 (새로고침하면 목록에서 빠진다) */
tr.is-moved td, .card-list__item.is-moved { opacity: 0.5; }
.is-moved .notice-link::after { content: '참여·입찰로 이동'; display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 4px; background: #DCFCE7; color: #15803D; font-size: var(--fs-xs); font-weight: 700; line-height: 1.6; vertical-align: 1px; }
/* 미참여로 정한 공고 — 줄을 흐리게, 상태 배지만 선명하게 */
.nl-table tr.is-declined td { background: #F8FAFC; }
.nl-table tr.is-declined td:not(.nl-status-cell) { opacity: 0.5; }
.card-list__item.is-declined { background: #F8FAFC; }
/* 대시보드에서 눌러 연 공고 줄 (?open=공고ID) */
.nl-table tr.is-focus td { background: #FFF7E6; }
.nl-table tr.is-focus td:first-child, .card-list__item.is-focus { box-shadow: inset 4px 0 0 #F59E0B; }
.card-list__item.is-focus { background: #FFF7E6; }
.card-list__item.is-declined > *:not(:last-child) { opacity: 0.5; }
/* 목록에서 지금 상세로 보고 있는 공고 */
.nl-table tr.is-viewing td { background: #EFF6FF; }
.nl-table tr.is-viewing td:first-child { box-shadow: inset 4px 0 0 #2563EB; }
.card-list__item.is-viewing { background: #EFF6FF; box-shadow: inset 4px 0 0 #2563EB; }
.is-viewing .notice-link::before { content: '보는 중'; display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 4px; background: #2563EB; color: #fff; font-size: var(--fs-xs); font-weight: 700; line-height: 1.6; vertical-align: 1px; }

.nd-page { max-width: 1050px; }
.nd { color: var(--nd-text); font-size: var(--fs-base); line-height: 1.6; }
.np .nd { max-width: 960px; margin: 0 auto; }

/* A. 머리: 공고 유형·공고명·추천점수·번호·기관 + 오른쪽 버튼 */
.nd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; padding: 20px 0 18px; border-bottom: 1px solid var(--nd-border); }
.nd--panel .nd-head { position: sticky; top: 0; z-index: 3; background: var(--nd-bg); padding-right: 52px; }
.nd--panel .nd-head::before { content: ''; position: absolute; inset: 0 -32px; background: var(--nd-bg); border-bottom: 1px solid var(--nd-border); z-index: -1; }
.nd--panel .nd-head { border-bottom: 0; }
.nd-head__main { flex: 1 1 440px; min-width: 0; }
.nd-title { margin: 6px 0 0; font-size: 21px; line-height: 1.45; font-weight: 700; color: var(--nd-text); word-break: keep-all; overflow-wrap: anywhere; }
.nd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: 8px; font-size: var(--fs-sm); color: var(--nd-muted); }
.nd-meta > span + span::before { content: ''; display: inline-block; width: 1px; height: 11px; background: #CBD5E1; margin: 0 10px; vertical-align: -1px; }
.nd-score { color: var(--nd-primary); font-weight: 600; }
.nd-meta-state { display: inline-flex; align-items: center; gap: 6px; }
.nd-meta-state .nd-state { font-size: var(--fs-base); }
.nd-score strong { font-size: var(--fs-md); font-weight: 700; }
.nd-score--warning { color: var(--nd-warning); }
.nd-score--danger { color: var(--nd-danger); }
.nd-score--gray { color: var(--nd-muted); }
.nd-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* 상세 안 버튼: 높이 38px, 14px / 600 */
.nd .btn { height: 38px; padding: 0 14px; font-size: var(--fs-base); font-weight: 600; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; box-shadow: none; }
.nd .btn--primary { background: var(--nd-primary); border-color: var(--nd-primary); color: #fff; }
.nd .btn--primary:hover:not(:disabled) { background: var(--nd-primary-hover); border-color: var(--nd-primary-hover); }
.nd .btn--secondary { background: var(--nd-surface); border: 1px solid #CBD5E1; color: var(--nd-text); }
.nd .btn--secondary:hover:not(:disabled) { background: var(--nd-bg); border-color: #94A3B8; }
/* 공고 성격 표시: 공사·용역·물품만 색, 나머지는 차분하게 (긴급·취소는 경고색 유지) */
.nd-tags { margin-top: 0; gap: 6px; }
.nd-tags .nl-tag { font-size: var(--fs-sm); padding: 1px 8px; background: var(--nd-surface); color: var(--nd-muted); border: 1px solid var(--nd-border); }
.nd-tags .nl-tag--cnstwk { background: #fff1e6; color: #c2410c; border-color: #fed7aa; }
.nd-tags .nl-tag--servc { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.nd-tags .nl-tag--thng { background: #ecfccb; color: #4d7c0f; border-color: #d9f99d; }
.nd-tags .nl-tag--urgent { background: var(--nd-danger-bg); color: var(--nd-danger); border-color: #fecaca; }
.nd-tags .nl-tag--cancel { background: var(--nd-text); color: #fff; border-color: var(--nd-text); }

/* B. 핵심 정보 2×2 */
.nd-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: 8px; }
.nd-kpi { padding: 16px 20px; min-width: 0; }
.nd-kpi + .nd-kpi { border-left: 1px solid var(--nd-border); }
.nd-kpi__label { font-size: var(--fs-sm); font-weight: 600; color: var(--nd-muted); }
.nd-kpi__value { margin-top: 4px; font-size: 22px; font-weight: 700; line-height: 1.35; color: var(--nd-text); letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.nd-kpi--key .nd-kpi__value { color: var(--nd-text); }
.nd-kpi--key.is-closed .nd-kpi__value { color: var(--nd-muted); }
.nd-kpi__text { margin-top: 4px; font-size: var(--fs-lg); font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.nd-kpi__sub { margin-top: 4px; font-size: var(--fs-sm); color: var(--nd-muted); display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 20px; }
.nd-dday { font-size: var(--fs-sm); padding: 1px 8px; border-radius: 4px; }
/* 참여 상태 표시 (점 + 글자) */
.nd-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.nd-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.nd-state--primary { color: var(--nd-primary); }
.nd-state--success { color: var(--nd-success); }
.nd-state--warning { color: var(--nd-warning); }
.nd-state--purple { color: #7E22CE; }
.nd-state--danger { color: var(--nd-danger); }
.nd-state--gray { color: var(--nd-muted); }

/* C. 일정 4단계 — 지난 일정은 흐리게, 진행 중인 단계만 강조 */
.nd-sched { margin-top: 20px; padding: 16px 20px 18px; background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: 8px; }
.nd-sched__title { margin: 0 0 14px; font-size: var(--fs-base); font-weight: 700; color: var(--nd-text); }
.nd-timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; }
.nd-timeline li { position: relative; padding: 22px 12px 0 0; min-width: 0; }
.nd-timeline li::before { content: ''; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--nd-border); }
.nd-timeline li.is-done::before { background: #94A3B8; }
.nd-timeline__dot { position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--nd-surface); border: 2px solid #CBD5E1; box-sizing: border-box; }
.nd-timeline li.is-done .nd-timeline__dot { background: #94A3B8; border-color: #94A3B8; }
.nd-timeline li.is-current .nd-timeline__dot { background: var(--nd-primary); border-color: var(--nd-primary); box-shadow: 0 0 0 4px var(--nd-primary-bg); }
.nd-timeline__label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--nd-muted); }
.nd-timeline__label em { font-style: normal; font-weight: 600; font-size: var(--fs-xs); margin-left: 4px; color: #64748B; }
.nd-timeline__date { display: block; margin-top: 2px; font-size: var(--fs-base); color: var(--nd-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nd-timeline__date b { font-weight: 700; }
.nd-timeline__none { color: #94A3B8; }
.nd-timeline li.is-done .nd-timeline__label, .nd-timeline li.is-done .nd-timeline__date { color: #64748B; }
.nd-timeline li.is-current .nd-timeline__label { color: var(--nd-primary); }
.nd-timeline li.is-current .nd-timeline__label em { color: #fff; background: var(--nd-primary); padding: 0 6px; border-radius: 4px; }
.nd-timeline li.is-current .nd-timeline__date { color: var(--nd-primary); font-weight: 600; }

/* D. 탭 — 라디오 버튼 + CSS (패널에 innerHTML로 넣어도 동작). 탭은 최대 4개 */
.nd-tabs { margin-top: 24px; }
.nd-tabs__r { position: absolute; opacity: 0; pointer-events: none; }
.nd-tabs__bar { display: flex; gap: 4px; border-bottom: 1px solid var(--nd-border); }
.nd-tabs__bar label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; font-size: var(--fs-base); font-weight: 500; color: var(--nd-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.nd-tabs__bar label:hover { color: var(--nd-text); }
.nd-pane { display: none; }
.nd-tabs__r:nth-of-type(1):checked ~ .nd-tabs__bar label:nth-child(1),
.nd-tabs__r:nth-of-type(2):checked ~ .nd-tabs__bar label:nth-child(2),
.nd-tabs__r:nth-of-type(3):checked ~ .nd-tabs__bar label:nth-child(3),
.nd-tabs__r:nth-of-type(4):checked ~ .nd-tabs__bar label:nth-child(4) { color: var(--nd-primary); font-weight: 700; border-bottom-color: var(--nd-primary); }
.nd-tabs__r:nth-of-type(1):checked ~ .nd-tabs__panes .nd-pane:nth-child(1),
.nd-tabs__r:nth-of-type(2):checked ~ .nd-tabs__panes .nd-pane:nth-child(2),
.nd-tabs__r:nth-of-type(3):checked ~ .nd-tabs__panes .nd-pane:nth-child(3),
.nd-tabs__r:nth-of-type(4):checked ~ .nd-tabs__panes .nd-pane:nth-child(4) { display: block; }
.nd-tabs__r:focus-visible ~ .nd-tabs__bar { outline: 2px solid var(--nd-primary); outline-offset: 2px; }

/* 카드 */
.nd-card { margin-top: 20px; padding: 20px 24px; border: 1px solid var(--nd-border); border-radius: 8px; background: var(--nd-surface); }
.nd-card h3 { margin: 0 0 14px; font-size: var(--fs-lg); font-weight: 700; color: var(--nd-text); line-height: 1.4; }
.nd-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.nd-card__head h3 { margin: 0; }
.nd-subhead { margin: 18px 0 8px; font-size: var(--fs-base); font-weight: 700; color: var(--nd-text); }
.nd-count { display: inline-block; margin-left: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--nd-muted); }
.nd-text { margin: 0; }
.nd-help { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--nd-muted); line-height: 1.55; }
.nd-help--top { margin: 0 0 12px; }
.nd-empty { margin: 0; color: var(--nd-muted); }
.nd-strong { font-size: var(--fs-lg); color: var(--nd-primary); }
.nd-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 0; }
.nd-dl > div { display: flex; gap: 16px; min-width: 0; padding: 10px 0; border-top: 1px solid #F1F5F9; }
.nd-dl > div:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.nd-dl dt { flex: 0 0 120px; color: var(--nd-muted); font-size: var(--fs-sm); font-weight: 500; }
.nd-dl dd { margin: 0; font-size: var(--fs-base); font-weight: 500; color: var(--nd-text); min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.nd-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nd-files a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--nd-primary); text-decoration: none; word-break: break-all; }
.nd-files a:hover { background: var(--nd-primary-bg); }

/* E. AI 추천 분석 */
.nd-ai { display: flex; gap: 24px; align-items: flex-start; }
.nd-ai__score { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 24px; border-right: 1px solid var(--nd-border); }
.nd-ai__num { font-size: 32px; font-weight: 700; line-height: 1.1; color: var(--nd-primary); font-variant-numeric: tabular-nums; }
.nd-ai__num small { font-size: var(--fs-md); font-weight: 600; margin-left: 2px; }
.nd-ai__body { flex: 1; min-width: 0; }
.nd-ai__parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.nd-ai__parts li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--nd-bg); border: 1px solid var(--nd-border); border-radius: 6px; font-size: var(--fs-base); color: var(--nd-muted); }
.nd-ai__parts strong { color: var(--nd-text); font-weight: 700; white-space: nowrap; }
.nd-gates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nd-gates li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--nd-border); border-radius: 6px; font-weight: 500; }
.nd-flag { display: inline-block; flex: 0 0 auto; font-size: var(--fs-sm); font-weight: 700; }
.nd-flag--ok { color: var(--nd-success); }
.nd-flag--warn { color: var(--nd-warning); }
.nd-flag--bad { color: var(--nd-danger); }
.nd-flag--muted { color: var(--nd-muted); }
.nd-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nd-reasons li { position: relative; padding: 8px 12px 8px 34px; border-radius: 6px; background: var(--nd-bg); }
.nd-reasons li::before { position: absolute; left: 12px; top: 8px; font-weight: 700; }
.nd-reasons--ok li::before { content: '✓'; color: var(--nd-success); }
.nd-reasons--warn li { background: var(--nd-warning-bg); }
.nd-reasons--warn li::before { content: '!'; color: var(--nd-warning); left: 15px; }
.nd-reasons--bad li { background: var(--nd-danger-bg); }
.nd-reasons--bad li::before { content: '✕'; color: var(--nd-danger); }
.nd-reasons--muted li::before { content: '•'; color: var(--nd-muted); left: 14px; }
.nd-reasons .nd-flag { margin-left: 6px; }

/* G. 참여 의사 — '참여할게요'가 주 버튼 */
.nd-card--action { border-color: #BFDBFE; }
.nd-now { font-size: var(--fs-sm); color: var(--nd-muted); display: inline-flex; align-items: center; gap: 8px; }
.nd-now .nd-state { font-size: var(--fs-base); }
.nd-buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nd-buttons form { margin: 0; }
.nd .nd-btn-main { min-width: 140px; height: 40px; font-size: var(--fs-md); }
.nd .btn.is-current, .nd .btn:disabled.is-current { opacity: 1; cursor: default; }
.nd .btn--secondary.is-current { background: var(--nd-primary-bg); border-color: var(--nd-primary); color: var(--nd-primary); }
.nd .btn--primary.is-current { background: var(--nd-success); border-color: var(--nd-success); }
.nd .btn--danger-outline { background: var(--nd-surface); color: var(--nd-danger); border: 1px solid #FCA5A5; cursor: pointer; margin-left: auto; }
.nd .btn--danger-outline:hover { background: var(--nd-danger-bg); border-color: var(--nd-danger); }
.nd .btn--danger-outline.is-current { background: var(--nd-danger-bg); border-color: var(--nd-danger); }
.nd .btn--danger { background: var(--nd-danger); border-color: var(--nd-danger); color: #fff; }
.nd-np-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nd-np { display: none; margin-top: 14px; padding: 16px 18px; border: 1px solid #FECACA; background: #FFFBFB; border-radius: 8px; }
.nd-np-toggle:checked ~ .nd-np { display: block; }
.nd-np-toggle:checked ~ .nd-buttons .nd-np-open { background: var(--nd-danger); border-color: var(--nd-danger); color: #fff; }
.nd-np__title { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: var(--fs-base); margin-bottom: 12px; }
.nd-np__close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; font-size: var(--fs-lg); line-height: 1; border-radius: 6px; cursor: pointer; color: var(--nd-muted); font-weight: 400; }
.nd-np__close:hover { background: var(--nd-danger-bg); color: var(--nd-danger); }
.nd-np__options { display: flex; flex-wrap: wrap; gap: 8px; }
.nd-np__radio { position: absolute; opacity: 0; pointer-events: none; }
.nd-np__options label { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid #CBD5E1; border-radius: 6px; font-size: var(--fs-base); cursor: pointer; background: #fff; }
.nd-np__options label:hover { border-color: var(--nd-danger); }
.nd-np__radio:checked + label { border-color: var(--nd-danger); background: var(--nd-danger); color: #fff; font-weight: 600; }
.nd-np__radio:focus-visible + label { outline: 2px solid var(--nd-danger); outline-offset: 2px; }
.nd-np__text { display: none; flex: 1 1 100%; margin-top: 4px; height: 40px; }
.nd-np__other:checked ~ .nd-np__text { display: block; }
.nd-np__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* F. 입찰 준비 현황 */
.nd-prep__pct { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.nd-prep__pct strong { font-size: 24px; font-weight: 700; color: var(--nd-primary); font-variant-numeric: tabular-nums; }
.nd-prep__pct span { font-size: var(--fs-base); color: var(--nd-muted); }
.nd-bar { height: 8px; margin-top: 8px; background: #E2E8F0; border-radius: 4px; overflow: hidden; }
.nd-bar span { display: block; height: 100%; background: var(--nd-primary); }
.nd-prep__list { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--nd-border); }
.nd-prep__list li { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #F1F5F9; }
.nd-prep__name { font-weight: 600; }
.nd-prep__desc { font-size: var(--fs-sm); color: var(--nd-muted); min-width: 0; }
.nd-prep__val { font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.nd-prep__list li.is-done .nd-prep__val { color: var(--nd-success); }
.nd-prep__list li.is-todo .nd-prep__name { color: var(--nd-warning); }
.nd-prep__list li.is-todo .nd-prep__val { color: var(--nd-warning); background: var(--nd-warning-bg); padding: 1px 8px; border-radius: 4px; }

/* H. 진행 이력 — 세로 타임라인 */
.nd-history { list-style: none; margin: 0; padding: 0; }
.nd-history li { position: relative; padding: 0 0 14px 22px; }
.nd-history li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--nd-primary); }
.nd-history li::after { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--nd-border); }
.nd-history li:last-child { padding-bottom: 0; }
.nd-history li:last-child::after { display: none; }
.nd-history li + li::before { background: #94A3B8; }
.nd-history__what strong { font-weight: 700; }
.nd-history__reason { margin-top: 2px; color: var(--nd-muted); }
.nd-history__meta { margin-top: 2px; font-size: var(--fs-sm); color: #64748B; }

/* 태블릿 */
@media (max-width: 1024px) {
  .np { width: min(1050px, 94vw); }
  .np__body { padding: 0 24px 32px; }
  .np__nav { padding: 10px 24px; }
  .nd--panel .nd-head::before { inset: 0 -24px; }
  .nd-kpi { padding: 14px 16px; }
  .nd-kpi__value { font-size: 20px; }
}
/* 모바일: 전체 화면, 핵심 정보 1열, 일정 세로, 버튼 터치 영역 44px */
@media (max-width: 768px) {
  .np { width: 100%; border-left: 0; }
  .np__close { top: 10px; right: 10px; width: 44px; height: 44px; }
  .np__body { padding: 0 16px 24px; }
  .np__nav { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .np__step { height: 44px; width: 44px; padding: 0; font-size: 20px; flex: none; }
  .np__steptxt, .np__pos { display: none; }
  .np__nav { gap: 6px; }
  .np__act .nd-buttons { gap: 4px; width: 100%; }
  .np__act .nd-buttons form, .np__act .nd-buttons > .btn { flex: 1 1 0; min-width: 0; }
  .np__act .btn, .np__act .nd-btn-main { width: 100%; min-width: 0; height: 44px; padding: 0 4px; font-size: var(--fs-sm); }
  .np__act .nd-long { display: none; }
  .np__act .nd-short { display: inline; }
  .np__act .nd-np { left: 8px; right: 8px; max-height: 60vh; overflow-y: auto; }
  /* 모바일은 화면이 낮아 머리를 고정하지 않는다 (닫기 버튼은 계속 위에 고정) */
  .nd--panel .nd-head { position: relative; padding: 14px 52px 14px 0; }
  .nd-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
  .nd-meta > span + span::before { display: none; }
  .nd-gates { grid-template-columns: 1fr; }
  .nd--panel .nd-head::before { inset: 0 -16px; }
  .nd-title { font-size: 19px; }
  .nd-actions { width: 100%; }
  .nd-actions .btn { flex: 1 1 auto; }
  .nd .btn { height: 44px; }
  .nd-kpis { grid-template-columns: 1fr; }
  .nd-kpi + .nd-kpi { border-left: 0; }
  .nd-kpi { border-bottom: 1px solid var(--nd-border); padding: 14px 16px; }
  .nd-kpi:last-child { border-bottom: 0; }
  .nd-kpi__value { font-size: 20px; }
  .nd-sched { padding: 14px 16px 4px; }
  .nd-timeline { grid-template-columns: 1fr; gap: 0; }
  .nd-timeline li { padding: 0 0 14px 26px; }
  .nd-timeline li::before { top: 14px; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; }
  .nd-timeline li:last-child::before { display: none; }
  .nd-timeline__dot { top: 3px; }
  .nd-timeline__label, .nd-timeline__date { display: inline; }
  .nd-timeline__date { margin-left: 8px; }
  .nd-tabs__bar { overflow-x: auto; scrollbar-width: none; }
  .nd-tabs__bar label { padding: 0 12px; }
  .nd-card { padding: 16px; }
  .nd-dl { grid-template-columns: 1fr; }
  .nd-dl > div:nth-child(2) { border-top: 1px solid #F1F5F9; padding-top: 10px; }
  .nd-dl dt { flex-basis: 104px; }
  .nd-ai { flex-direction: column; gap: 12px; }
  .nd-ai__score { flex-direction: row; align-items: center; padding-right: 0; border-right: 0; }
  .nd-buttons form { flex: 1 1 calc(50% - 4px); }
  .nd-buttons form .btn, .nd-buttons > .btn { width: 100%; }
  .nd-buttons > .btn { flex: 1 1 calc(50% - 4px); margin-left: 0; }
  .nd-prep__list li { grid-template-columns: 1fr auto; }
  .nd-prep__desc { grid-column: 1 / -1; grid-row: 2; }
}
/* 투찰 마감이 지난 공고 — 참여 의사 버튼 대신 안내 (notices/_detail-body.ejs) */
.nd-closed-msg { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; background: #F2F5FA; color: var(--color-text-muted); font-size: var(--fs-sm); }
.nd-closed-msg strong { margin-left: 4px; color: var(--color-text); }
