/* 2026-11-04 (19) 견적 결과 날짜가 고른 기간 밖이면 주황(.iqx-qr-day--out) */
/* 2026-11-04 (13) 견적 결과 배지 옆 수주일 · 실주일(.iqx-qr-day) */
/* 2026-11-04 (11) 견적 결과 칸 넓힘 230px · 오른쪽 여백 · 길면 줄바꿈 (잘림) */
/* 2026-11-04 (10) ② 수주 · 실주 칸 '그중 이전 견적 n건'(.iqd-prev 주황) */
/* 2026-11-04 (4) 문의 목록 '견적 결과' 칸(.iqx-qr · .iqx-st--won/prog/hold/lost/none, 휴대폰은 연락처 오른쪽) */
/* 2026-11-04 (3) 넓은 화면에서 ① ② 좌우로(.iqd-two) */
/* 2026-11-04 (2) 요약판 ① 들어온 문의 · ② 온라인 견적 두 덩어리(.iqd-blk · 칸 3개 .iqd-grid3 · '영업 현황과 같은 숫자' .iqd-same) */
/* 2026-11-04 요약판 칸 4개(.iqd-grid) · 막대 4줄(.iqd-bars · .iqd-head · .iqd-pk 담당자 누름) — inquiry.js _iqDashRender · _iqBarHtml */
/* 2026-10-22 (8) 견적 여러 개 · 견적 연결 상자(.iqlk-*, inquiry-link.js) */
/* 2026-10-22 (7) 견적번호 누름 글자(.iq-qlink) */
/* 2026-10-22 온라인 문의 (inquiry.js .iq-*) — 새 파일. 기준표 --ds-* 사용, 숫자 칸은 영업 현황판(salesboard.css .sb-perf-*) 모양을 같이 씀
   문의 작성 = 견적 작성 화면과 같은 카드(.form-section)·버튼 줄(.action-bar), 목록 = 구매 수주와 같은 표(.ras-table) */

#panel-inquiry{flex-direction:column;}
.iq-req{color:#dc2626;}
.iq-subtxt{font-size:var(--ds-fs-sm);color:var(--ds-gray-400);font-weight:400;}
.iq-mt{margin-top:var(--ds-sp-2);}
.iq-link{background:none;border:none;padding:0;cursor:pointer;color:var(--ds-gray-900);font:inherit;text-align:left;}
.iq-link:hover b{color:var(--ds-primary);text-decoration:underline;}
.iq-qlink{background:none;border:none;padding:0;margin:0;cursor:pointer;font:inherit;color:var(--ds-primary);text-decoration:underline;text-underline-offset:2px;}   /* 2026-10-22 (7) 견적번호 → 견적서 보기 */
.iq-qlink:hover{color:var(--ds-brand);}

/* ── 문의 작성 페이지 ── */
.iqw{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--bg);}
.iqw-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:10px 12px;-webkit-overflow-scrolling:touch;}
.iqw-grid{display:flex;gap:12px;align-items:flex-start;max-width:1100px;}
.iqw-form{flex:1;min-width:0;max-width:760px;}
.iqw-side{width:300px;flex:none;display:flex;flex-direction:column;gap:10px;position:sticky;top:0;}
.iqw-box,.iqw-chk{background:#fff;border:1px solid #dde3ee;border-radius:8px;padding:12px 14px;font-size:var(--ds-fs-sm);color:var(--ds-gray-600);line-height:1.5;}
.iqw-box h4,.iqw-chk h4{margin:0 0 8px;font-size:var(--ds-fs-base);color:var(--ds-gray-900);font-weight:600;}
.iqw-box ul,.iqw-chk ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px;}
.iqw-box li b,.iqw-chk li b{color:var(--ds-gray-900);font-weight:600;}
.iqw-chk[hidden]{display:none !important;}
.iqw-chk--warn{background:#fffbeb;border-color:#fde68a;color:#92400e;}
.iqw-chk--warn li b{color:#92400e;}
.iqw-chk--in{display:none;margin-top:10px;}
.iqw-chk-n{font-weight:600;}
.iqw-edit{margin-bottom:10px;padding:10px 14px;border:1px solid #fde68a;background:#fffbeb;border-radius:8px;color:#92400e;font-size:var(--ds-fs-md);}
.iqw-edit[hidden]{display:none !important;}
.iqw-edit .iq-subtxt{display:block;margin-top:2px;color:#a16207;}
.iqw .form-section .form-row:last-child{margin-bottom:0;}
.iq-chips{display:flex;flex-wrap:wrap;gap:6px;}
.iq-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:var(--ds-line) solid var(--ds-gray-200);border-radius:999px;font-size:var(--ds-fs-sm);color:var(--ds-gray-900);background:#fff;cursor:pointer;user-select:none;}
.iq-chip input{margin:0;}
.iq-chip.on{border-color:var(--ds-primary);background:var(--ds-primary-soft);color:var(--ds-primary);}
.iq-ta{height:auto !important;min-height:112px;resize:vertical;line-height:1.6;}

/* 접힘 (견적 품목 창 .qm-fold-* 와 같은 모양) */
.iq-folds{margin-top:10px;border:var(--ds-line) solid var(--ds-gray-200);border-radius:var(--ds-radius-lg);overflow:hidden;}
.iq-fold-head{width:100%;display:flex;justify-content:space-between;align-items:center;gap:var(--ds-sp-2);padding:var(--ds-sp-3) 14px;background:#fff;border:none;cursor:pointer;text-align:left;font-size:var(--ds-fs-base);color:var(--ds-gray-900);}
.iq-fold-head.open{background:var(--ds-gray-50);}
.iq-fold-head:disabled{cursor:default;}
.iq-fold-title{font-weight:400;flex:none;}
.iq-fold-sum{display:flex;align-items:center;gap:6px;min-width:0;font-size:var(--ds-fs-sm);color:var(--ds-gray-600);}
.iq-fold-sum > span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.iq-caret{display:inline-flex;flex:none;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:var(--ds-primary-soft);color:var(--ds-primary);font-size:var(--ds-fs-base);line-height:1;padding-bottom:3px;transition:transform .15s;}
.iq-fold-head.open .iq-caret,.iqm-head.open .iq-caret{transform:rotate(180deg);padding-bottom:0;padding-top:3px;}
.iq-fold-body{padding:12px 14px;border-top:var(--ds-line) solid var(--ds-gray-200);}
.iq-fold-body[hidden]{display:none !important;}
.iq-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;}

/* 견적 작성 화면 위 안내 띠 */
.iq-qbanner{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:10px;padding:10px 14px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:8px;color:#1e3a8a;font-size:var(--ds-fs-md);}
.iq-qbanner .iq-subtxt{display:block;margin-top:2px;color:#3b5b9a;}
.iq-qb-btns{display:flex;gap:6px;flex:none;}

/* ── 문의 목록 ── */
.iql{flex:1;min-height:0;display:flex;flex-direction:column;}
.iqd{margin:0 0 10px;padding:12px 14px;border:1px solid #f1f5f9;border-radius:8px;background:#fff;}
.iqd:empty{display:none;}
.iqd-t{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;margin-bottom:8px;font-weight:600;color:var(--ds-gray-900);font-size:var(--ds-fs-base);}
.iqd-sub{color:var(--ds-gray-400);font-weight:400;font-size:var(--ds-fs-sm);}
.iqd .iqd-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
.iqd .sb-perf-item small{font-size:11px;color:var(--ds-gray-400);text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.iqd .sb-perf-item small.iqd-prev{color:var(--ds-warn,#d97706);}   /* 2026-11-04 (10) 그중 이전 견적 n건 */
.iqd .sb-perf-item strong.iqd-late{color:#c2410c;}
.iqd-bar{display:flex;height:8px;border-radius:999px;overflow:hidden;margin-top:10px;background:var(--ds-gray-100,#f1f5f9);}
.iqd-bar i{display:block;}
.iqd-ch{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:8px;font-size:var(--ds-fs-sm);color:var(--ds-gray-600);}
.iqd-ch b{color:var(--ds-gray-900);font-variant-numeric:tabular-nums;}
.iqd-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px;vertical-align:middle;}
/* 2026-11-04 막대 4줄(유입 상세 · 담당자별 · 견적 안 함 사유 · 실주 사유): 제목 · 숫자 한 줄 + 아래 막대, 담당자 이름 누르면 그 사람 요약 */
.iqd-bars{display:flex;flex-direction:column;gap:12px;margin-top:12px;}
.iqd-row .iqd-bar{margin-top:0;}
.iqd .iqd-head{margin:0 0 6px;align-items:baseline;}
.iqd-bt{font-weight:600;color:var(--ds-gray-600);}
.iqd-bt b{color:var(--ds-gray-900);}
.iqd-s{font-size:11px;color:var(--ds-gray-400);font-weight:400;}
.iqd-z,.iqd-z b{color:#cbd5e1;}
.iqd-pk{cursor:pointer;border-radius:4px;padding:0 3px;margin:0 -3px;}
.iqd-pk:hover{background:#f0f6fc;}
.iqd-pk.iqd-sel{background:var(--ds-primary-soft,#e8f0f8);color:var(--ds-brand,#1B3A6B);font-weight:700;}
.iqd-who{color:var(--ds-primary,#2E7FC1);font-weight:700;}
.iqd .iqd-grid.iqd-grid3{grid-template-columns:repeat(3,minmax(0,1fr));}
.iqd-note{margin-top:10px;font-size:11px;line-height:1.6;color:var(--ds-gray-400);}
.iqd-note b{color:var(--ds-gray-600);font-weight:600;}
.iqd-blk + .iqd-blk{margin-top:16px;padding-top:14px;border-top:var(--ds-line) dashed var(--ds-gray-200);}
/* 2026-11-04 (3) 넓은 화면(1280px~)은 ① ② 좌우로, 좁으면 위아래 그대로 */
@media (min-width:1280px){
  .iqd-two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 24px;align-items:start;}
  .iqd-two > .iqd-blk + .iqd-blk{margin-top:0;padding-top:0;border-top:none;padding-left:24px;border-left:var(--ds-line) dashed var(--ds-gray-200);}
}
.iqd-same{display:inline-block;margin-left:6px;font-size:11px;font-weight:600;color:#0369a1;background:#e0f2fe;border-radius:4px;padding:1px 6px;}
.iqd-clr{margin-left:2px;border:var(--ds-line) solid #cbd5e1;background:#fff;border-radius:6px;font-size:11px;padding:1px 8px;cursor:pointer;font-family:inherit;color:var(--ds-gray-600);}
.iqm{margin-top:10px;border:var(--ds-line) solid var(--ds-gray-200);border-radius:var(--ds-radius-lg);overflow:hidden;}
.iqm-head{width:100%;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 14px;background:var(--ds-gray-50);border:none;font-size:var(--ds-fs-base);color:var(--ds-gray-900);cursor:pointer;text-align:left;}
.iqm-sum{display:flex;align-items:center;gap:6px;font-size:var(--ds-fs-sm);color:var(--ds-gray-600);}
.iqm-body{padding:10px 14px 12px;border-top:var(--ds-line) solid var(--ds-gray-200);}
.iqm-year{height:32px !important;min-width:96px;margin-bottom:6px;border:var(--ds-line) solid var(--ds-gray-200);border-radius:var(--ds-radius-md);padding:0 8px;}
.iqm-cap{font-size:var(--ds-fs-sm);font-weight:600;color:var(--ds-gray-600);margin:4px 0 6px;}
.iqm-wrap{overflow-x:auto;margin-bottom:12px;}
.iqm-t{width:100%;border-collapse:collapse;font-size:var(--ds-fs-sm);font-variant-numeric:tabular-nums;}
.iqm-t th{padding:6px 8px;background:var(--ds-gray-50);color:var(--ds-gray-600);font-weight:600;text-align:left;white-space:nowrap;border-bottom:var(--ds-line) solid var(--ds-gray-200);}
.iqm-t td{padding:5px 8px;border-bottom:var(--ds-line) solid #f1f5f9;white-space:nowrap;color:var(--ds-gray-900);}
.iqm-t .n{text-align:right;}
.iqm-t tr.t td{font-weight:700;background:var(--ds-gray-50);}
.iqm-note{font-size:11px;color:var(--ds-gray-400);}

.iqx-table th:nth-child(1){width:100px;} .iqx-table th:nth-child(2){width:84px;} .iqx-table th:nth-child(3){width:96px;}
.iqx-table th:nth-child(5){width:140px;} .iqx-table th:nth-child(6){width:110px;} .iqx-table th:nth-child(7){width:200px;}
.iqx-table td{vertical-align:middle;white-space:nowrap;}
.iqx-table td.iqx-co{white-space:normal;}
.iqx-co b{display:block;font-weight:600;color:var(--ds-gray-900);}
.iqx-co small{display:block;color:var(--ds-gray-600);font-size:var(--ds-fs-sm);}
.iqx-table tbody tr{cursor:pointer;}
@media (hover:hover){ .iqx-table tbody tr:hover td{background:var(--ds-gray-50);} }
.iqx-table tr.iqx-hit td{background:#fffbeb !important;}
.iqx-st{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:600;vertical-align:middle;}
.iqx-st--wait{background:#eff6ff;color:#1d4ed8;}
.iqx-st--done{background:#ecfdf5;color:#047857;}
.iqx-st--no{background:#f1f5f9;color:#475569;}
.iqx-sub{display:block;font-size:var(--ds-fs-sm);color:var(--ds-gray-600);margin-top:2px;}
/* 2026-11-04 (4) 견적 결과 칸 (연결 견적 영업 상태) */
.iqx-table th:nth-child(8){width:230px;}   /* 2026-11-04 (11) 120 → 230 (수정본 번호 · 실주 사유가 잘렸음) */
.iqx-table th:nth-child(8),.iqx-table td.iqx-qr{padding-right:20px;}
.iqx-st--won{background:#059669;color:#fff;}
.iqx-st--prog{background:#eff6ff;color:#1d4ed8;}
.iqx-st--hold{background:#fff7ed;color:#c2410c;}
.iqx-st--lost{background:#fef2f2;color:#b91c1c;}
.iqx-st--none{background:#f1f5f9;color:#94a3b8;}
.iqx-qr-none{color:#cbd5e1;}
/* 2026-11-04 (15) 검색칸이 드롭들 맨 뒤 — 드롭 묶음을 오른쪽으로, 검색칸 너비 */
#iql .list-toolbar .lt-filters{margin-left:auto;flex-wrap:wrap;justify-content:flex-end;}
#iql .list-toolbar .lt-filters .lt-search{margin-left:0;width:220px;}
.iqx-qr-day{margin-left:6px;font-size:var(--ds-fs-sm);color:var(--ds-gray-600);vertical-align:middle;font-variant-numeric:tabular-nums;}   /* 2026-11-04 (13) 수주일 · 실주일 */
.iqx-qr-day.iqx-qr-day--out{color:var(--ds-warn,#d97706);font-weight:600;}   /* 2026-11-04 (19) 고른 기간 밖 */
.iqx-table td.iqx-qr{text-align:left;white-space:normal;}   /* 2026-11-04 (7) 응대 결과 칸과 같게 왼쪽 · (11) 길면 줄바꿈 */
.iqx-sub.iqx-late{color:#c2410c;}

/* ── 문의 상세 창 ── */
.iq-modal{width:min(600px,96vw);}
.iq-modal .modal-header h2{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.iq-modal .modal-header h2 .iqx-st{font-size:12px;}
.iq-mbody{display:flex;flex-direction:column;gap:6px;}
.iq-mbody > *{flex-shrink:0;}   /* 내용이 길면 줄어들지 말고 창 안에서 스크롤 */
.iq-sec{font-size:var(--ds-fs-sm);font-weight:600;color:var(--ds-gray-600);margin:8px 0 0;}
.iq-dl{display:grid;grid-template-columns:118px 1fr;margin:0;border:var(--ds-line) solid var(--ds-gray-200);border-radius:var(--ds-radius-lg);overflow:hidden;}
.iq-dl dt,.iq-dl dd{margin:0;padding:8px 12px;font-size:var(--ds-fs-base);border-top:var(--ds-line) solid var(--ds-gray-200);word-break:break-all;}
.iq-dl dt{background:var(--ds-gray-50);color:var(--ds-gray-600);font-size:var(--ds-fs-sm);}
.iq-dl dt:first-of-type,.iq-dl dd:first-of-type{border-top:none;}
.iq-dl a{color:var(--ds-primary);text-decoration:none;font-weight:600;}
.iq-folds .iq-dl{border:none;border-radius:0;}
.iq-fold-body .iq-dl{margin:-12px -14px;}
.iq-memo,.iq-pre{white-space:pre-line;line-height:1.6;word-break:break-word;}
.iq-memo{margin-top:4px;padding:10px 12px;border:var(--ds-line) solid var(--ds-gray-200);border-radius:var(--ds-radius-lg);font-size:var(--ds-fs-base);}
.iq-res{padding:10px 12px;border-radius:var(--ds-radius-lg);font-size:var(--ds-fs-base);}
.iq-res .iq-subtxt{display:block;margin-top:2px;}
.iq-res--done{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;}
.iq-res--no{background:#f8fafc;border:1px solid var(--ds-gray-200);color:var(--ds-gray-900);}
.iq-reason{margin-top:10px;padding:12px;border:var(--ds-line) solid #f59e0b;background:#fffbeb;border-radius:var(--ds-radius-lg);display:flex;flex-direction:column;gap:8px;}
.iq-reason .field-label{margin:0 0 4px;}
.iq-foot{justify-content:space-between !important;}
.iq-foot-l,.iq-foot-r{display:flex;gap:6px;align-items:center;}
.iq-foot-l{margin-right:auto;}
.iq-del{color:#b91c1c !important;}

@media (max-width:760px){
  .iqw-grid{flex-direction:column;}
  .iqw-side{width:100%;position:static;}
  .iqw-chk--side{display:none !important;}
  .iqw-chk--in{display:block;}
}
@media (max-width:600px){
  .iqd .iqd-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .iqd .iqd-grid > :nth-child(5){grid-column:1 / -1;}
  .iqd .iqd-grid.iqd-grid3{grid-template-columns:repeat(2,minmax(0,1fr));}
  .iqd .iqd-grid.iqd-grid3 > :nth-child(3){grid-column:1 / -1;}
  .list-toolbar .lt-filters .toolbar-select{min-width:0 !important;}
  #iql .list-toolbar .lt-filters .lt-search{flex:1 1 100%;width:100%;}   /* 2026-11-04 (15) 휴대폰은 검색칸 한 줄 */
  .iqx-table,.iqx-table tbody{display:block;}
  .iqx-table thead{display:none;}
  .iqx-table tr{display:grid;grid-template-columns:1fr auto;grid-template-areas:"dt st" "co co" "ch own" "tel qr";gap:2px 8px;padding:12px;margin-bottom:8px;border:var(--ds-line) solid var(--ds-gray-200);border-radius:var(--ds-radius-lg);background:#fff;}
  .iqx-table td{display:block;padding:0;border:none;background:none !important;font-size:var(--ds-fs-md);}
  .iqx-table td[colspan]{grid-column:1 / -1;text-align:center;white-space:normal;}
  .iqx-table tr.iqx-hit{background:#fffbeb;border-color:#f59e0b;}
  .iqx-dt{grid-area:dt;font-size:var(--ds-fs-sm) !important;color:var(--ds-gray-600);}
  .iqx-st-td{grid-area:st;text-align:right;}
  .iqx-co{grid-area:co;}
  .iqx-ch{grid-area:ch;font-size:var(--ds-fs-sm) !important;color:var(--ds-gray-600);}
  .iqx-own{grid-area:own;text-align:right;font-size:var(--ds-fs-sm) !important;color:var(--ds-gray-600);}
  .iqx-tel{grid-area:tel;font-size:var(--ds-fs-sm) !important;color:var(--ds-gray-600);}
  .iqx-qr{grid-area:qr;text-align:right;}
  .iqx-qr .iqx-sub{display:inline;margin-left:4px;}
  .iqx-kind{display:none !important;}
  .iq-dl{grid-template-columns:112px 1fr;}
  .iq-dl dt{white-space:nowrap;}
}

/* ── 2026-10-22 (8) 견적 여러 개 · 견적 연결 (inquiry-link.js .iqlk-*) ── */
.iqlk-qs{display:flex;flex-direction:column;gap:6px;margin-top:8px;}
.iqlk-q{display:grid;grid-template-columns:1fr auto auto;grid-template-areas:"no amt del" "meta meta del";gap:2px 10px;align-items:center;padding:8px 10px;background:#fff;border:var(--ds-line) solid #a7f3d0;border-radius:var(--ds-radius-md);color:var(--ds-gray-900);}
.iqlk-q-no{grid-area:no;font-weight:700;min-width:0;}
.iqlk-q-amt{grid-area:amt;font-weight:700;text-align:right;font-variant-numeric:tabular-nums;}
.iqlk-q-meta{grid-area:meta;font-size:var(--ds-fs-sm);color:var(--ds-gray-600);}
.iqlk-q-del{grid-area:del;}
.iqlk-no-txt{color:var(--ds-gray-400);text-decoration:line-through;}
.iqlk-tag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;background:var(--ds-gray-100,#f1f5f9);color:var(--ds-gray-600);font-size:11px;font-weight:600;vertical-align:middle;}
.iqlk-tag--won{background:#059669;color:#fff;}
.iqlk-tag--del{background:#fee2e2;color:#b91c1c;}
.iqlk-del-btn{padding:4px 10px;font-size:var(--ds-fs-sm);background:#fff;border:var(--ds-line) solid var(--ds-gray-200);border-radius:var(--ds-radius-md);color:var(--ds-gray-600);cursor:pointer;}
.iqlk-del-btn:hover{border-color:#dc2626;color:#dc2626;}
.iqlk-box{margin-top:10px;padding:12px;border:var(--ds-line) solid #93c5fd;background:#eff6ff;border-radius:var(--ds-radius-lg);display:flex;flex-direction:column;gap:6px;}
.iqlk-h b{font-size:var(--ds-fs-base);color:var(--ds-gray-900);}
.iqlk-h .iq-subtxt{display:block;margin-top:2px;}
.iqlk-row{display:grid;grid-template-columns:20px 1fr auto;grid-template-areas:"r no amt" "r meta meta";gap:2px 8px;align-items:center;padding:8px 10px;background:#fff;border:var(--ds-line) solid var(--ds-gray-200);border-radius:var(--ds-radius-md);cursor:pointer;}
.iqlk-row:has(input:checked){border-color:var(--ds-primary);box-shadow:0 0 0 1px var(--ds-primary);}
.iqlk-row--off{cursor:default;opacity:.6;}
.iqlk-row input{grid-area:r;margin:0;}
.iqlk-no{grid-area:no;font-weight:700;color:var(--ds-brand);}
.iqlk-amt{grid-area:amt;font-weight:700;text-align:right;font-variant-numeric:tabular-nums;}
.iqlk-meta{grid-area:meta;font-size:var(--ds-fs-sm);color:var(--ds-gray-600);}
.iqlk-off{display:block;color:#b45309;}
.iqlk-none{padding:6px 0;font-size:var(--ds-fs-sm);color:var(--ds-gray-600);}
.iqlk-find{display:flex;gap:6px;margin-top:4px;}
.iqlk-find .field-input{flex:1;min-width:0;}
