@charset "UTF-8";
/* 요청 공통 부품 — 고객·관리자 화면이 함께 쓴다 (목록 표, 등록 폼, 상세, 댓글, 이력) */

/* ---------- 확인이 필요한 요청 ---------- */
.notice {
  display: flex; align-items: center; gap: 16px;
  margin-top: 20px; padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--st-40-bg);
  border: 1px solid var(--st-40-line);
}
.notice-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface); color: var(--st-40);
}
.notice-text { flex: 1; min-width: 0; }
.notice-text strong { display: block; font-size: 15px; font-weight: 700; }
.notice-text span { display: block; font-size: 14px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-text em { font-style: normal; font-weight: 600; color: var(--text); }
.notice .btn { background: var(--st-40); color: var(--surface); }
.notice .btn:hover { background: var(--st-40-hover); }

/* =========================================================
   C-02 요청 목록
   ========================================================= */
.list-tools { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.search-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.search-bar .input-search { flex: 1 1 260px; }
.search-bar .select { width: auto; min-width: 120px; }
.date-range { display: flex; align-items: center; gap: 6px; }
.date-range .input { width: 150px; }
.date-range .cdate { flex: 1; }
.date-range > span { color: var(--text-muted); }
.filter-toggle { display: none; }
.filter-more { display: contents; }
.c-info .c-manager, .c-info .c-reg, .c-info .c-end { display: none; }

.list-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 10px; }
.list-count { font-size: 14px; color: var(--text-sub); }
.list-count b { color: var(--text); }
.list-head .select { width: auto; height: 36px; font-size: 13.5px; }

.req-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.req-table th {
  padding: 10px 12px; text-align: left; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.req-table th:first-child, .req-table td:first-child { padding-left: 24px; }
.req-table th:last-child, .req-table td:last-child { padding-right: 24px; }
.req-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.req-table tbody tr { cursor: pointer; transition: background .12s; }
.req-table tbody tr:hover { background: var(--primary-softer); }
.req-table tbody tr:last-child td { border-bottom: 0; }
.req-table .c-no { font-size: 13px; color: var(--text-muted); font-feature-settings: "tnum"; }
.req-table .c-title { white-space: normal; min-width: 220px; }
.req-table .c-title a { font-weight: 600; color: var(--text); }
.req-table tbody tr:hover .c-title a { text-decoration: underline; text-underline-offset: 3px; }
.req-table .c-sub { color: var(--text-sub); }
.req-table .c-date { font-size: 13px; color: var(--text-sub); font-feature-settings: "tnum"; }
.req-table .c-date.is-late { color: var(--st-90); font-weight: 600; }
/* 짧은 값(파트·유형·요청자·담당자·상태·날짜)은 가운데 정렬 */
.req-table th:not(:nth-child(1)):not(:nth-child(3)), .req-table td.c-part, .req-table td.c-info, .req-table td.c-user, .req-table td.c-manager, .req-table td.c-status, .req-table td.c-date { text-align: center; }
.req-table .c-title { font-size: 14.5px; }
.req-table .c-status .badge { min-width: 76px; justify-content: center; }
.req-table .c-part .chip { min-width: 52px; justify-content: center; }
.title-icons { display: inline-flex; gap: 8px; margin-left: 8px; vertical-align: middle; font-size: 12.5px; color: var(--text-muted); }
.title-icons span { display: inline-flex; align-items: center; gap: 2px; }
.tag-urgent { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; margin-right: 6px; border-radius: 5px; font-size: 11.5px; font-weight: 800; color: #fff; background: var(--st-90); vertical-align: 1px; }
.tag-late { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 4px; font-size: 11px; font-weight: 700; color: var(--st-90); background: var(--st-90-bg); }
.m-label { display: none; }

/* =========================================================
   C-03 요청 등록
   ========================================================= */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.form-sections { display: flex; flex-direction: column; gap: 16px; }
.form-section .card-body { padding: 8px 28px 28px; }
.form-section .card-head { padding: 24px 28px 14px; justify-content: flex-start; gap: 10px; }
.step-no { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--primary); background: var(--primary-soft); }

.part-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.part-card { position: relative; cursor: pointer; }
.part-card input { position: absolute; opacity: 0; pointer-events: none; }
.part-card .pc-body {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: 18px; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--surface);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.part-card:hover .pc-body { border-color: var(--border-hover); }
.part-card input:checked + .pc-body { border-color: var(--primary); background: var(--primary-softer); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .1); }
.part-card input:focus-visible + .pc-body { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .25); }
.pc-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; }
.pc-ic.part-01 { color: var(--part-01); background: var(--part-01-bg); }
.pc-ic.part-02 { color: var(--part-02); background: var(--part-02-bg); }
.pc-ic.part-99 { color: var(--part-99); background: var(--part-99-bg); }
.pc-text { display: flex; flex-direction: column; gap: 2px; }
.pc-title { font-size: 16px; font-weight: 700; }
.pc-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.pc-check { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; transition: all .15s; }
.part-card input:checked ~ .pc-check { background: var(--primary); border-color: var(--primary); color: #fff; }

.row-2 + .field, .field + .row-2 { margin-top: 20px; }
.form-section .segment { display: flex; }
.form-section .segment label { flex: 1; }
.form-section .segment span { width: 100%; justify-content: center; }
.title-count { align-self: flex-end; font-size: 12.5px; color: var(--text-muted); margin-top: -4px; }

.editor { border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .12); }
.editor-toolbar { display: flex; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--bg); }
.editor-toolbar button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--text-sub); }
.editor-toolbar button:hover { background: var(--surface); color: var(--text); }
.editor-toolbar .sep { width: 1px; margin: 6px 4px; background: var(--border); }
.editor-area { min-height: 220px; padding: 14px 16px; font-size: 15px; line-height: 1.7; outline: none; }
.editor-area:empty::before { content: attr(data-placeholder); color: var(--text-disabled); white-space: pre-line; pointer-events: none; }
.editor-area img { max-width: 100%; border-radius: 8px; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 16px; border-radius: var(--radius);
  border: 1.5px dashed var(--border-strong); background: var(--bg);
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--primary); background: var(--primary-softer); }
.dropzone .dz-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); margin-bottom: 4px; }
.dropzone strong { font-size: 15px; }
.dropzone strong u { color: var(--primary); text-underline-offset: 3px; }
.dropzone span { font-size: 13px; color: var(--text-muted); }
.file-summary { display: flex; justify-content: space-between; margin: 14px 0 8px; font-size: 13px; color: var(--text-muted); }

.contact-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.contact-head p { font-size: 13.5px; color: var(--text-muted); }
.sms-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--bg); }
.sms-row strong { display: block; font-size: 14px; }
.sms-row span { font-size: 13px; color: var(--text-muted); }

.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.form-actions .btn { height: 52px; padding: 0 28px; font-size: 15px; font-weight: 700; border-radius: 12px; }

.guide { position: sticky; top: calc(var(--header-h) + 24px); }
.guide .card-body { padding-top: 4px; }
.guide-list { display: flex; flex-direction: column; gap: 14px; }
.guide-list li { display: flex; gap: 10px; font-size: 13.5px; color: var(--text-sub); line-height: 1.55; }
.guide-list svg { margin-top: 2px; color: var(--st-50); }
.guide-list b { color: var(--text); }

/* =========================================================
   C-04 요청 상세
   ========================================================= */
.detail-head { padding: 28px; }
.dh-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dh-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--text-muted); }
.dh-meta .no { font-feature-settings: "tnum"; font-weight: 600; }
.detail-head h1 { margin-top: 10px; font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.4; }
.badge-lg { height: 32px; padding: 0 14px; font-size: 14px; }
.dh-actions { display: flex; gap: 8px; flex-shrink: 0; }
.dh-actions .btn { height: 44px; padding: 0 18px; font-size: 14.5px; }

.stepper { display: flex; margin-top: 28px; }
.stepper li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-disabled); }
.stepper li::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 2px; background: var(--border); }
.stepper li:first-child::before { display: none; }
.stepper .dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--border); color: var(--text-disabled); font-size: 12px; }
.stepper li.is-done { color: var(--text-sub); }
.stepper li.is-done .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--primary); }
.stepper li.is-current { color: var(--text); font-weight: 700; }
.stepper li.is-current .dot { background: var(--surface); border-color: var(--cta); color: var(--cta); box-shadow: 0 0 0 4px rgba(var(--cta-rgb), .15); }
.stepper.is-rejected li.is-current .dot { border-color: var(--st-90); color: var(--st-90); box-shadow: 0 0 0 4px var(--st-90-bg); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 20px; align-items: start; }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 20px; }

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.info-grid > div { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-grid dt { width: 92px; flex-shrink: 0; color: var(--text-muted); }
.info-grid dd { margin: 0; font-weight: 600; min-width: 0; }
.info-grid dd small { display: block; font-weight: 400; color: var(--text-muted); font-size: 13px; }

.content-body { font-size: 15px; line-height: 1.8; color: var(--text); white-space: pre-line; }
.content-body img { max-width: 100%; border-radius: 10px; margin: 8px 0; }
.sub-title { margin: 24px 0 10px; font-size: 14px; font-weight: 700; color: var(--text-sub); }

.result-card { border-color: var(--st-40-line); }
.result-card .card-head { gap: 8px; justify-content: flex-start; }
.result-box { padding: 16px 18px; border-radius: 12px; background: var(--st-40-bg); font-size: 15px; line-height: 1.75; white-space: pre-line; }
.result-meta { margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.reject-card { border-color: var(--st-90-bg); }
.reject-box { padding: 16px 18px; border-radius: 12px; background: var(--st-90-bg); font-size: 15px; line-height: 1.75; }

/* 댓글 */
.comment-list { display: flex; flex-direction: column; }
.comment { display: flex; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.comment:first-child { padding-top: 6px; }
.comment .avatar { width: 38px; height: 38px; }
.comment .avatar.is-staff { background: var(--primary); color: #fff; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--text-muted); }
.comment-meta b { font-size: 14px; color: var(--text); }
.comment-meta .staff-tag { height: 20px; padding: 0 6px; border-radius: 5px; display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; color: var(--primary); background: var(--primary-soft); }
.comment-text { margin-top: 6px; font-size: 14.5px; line-height: 1.7; white-space: pre-line; }
.comment .file-list { margin-top: 10px; max-width: 360px; }
.comment-del { margin-left: auto; font-size: 12.5px; color: var(--text-muted); }
.comment-del:hover { color: var(--st-90); }
.comment-write { margin-top: 18px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.comment-write:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .12); }
.comment-write textarea { display: block; width: 100%; min-height: 84px; padding: 14px 16px; border: 0; background: none; resize: vertical; font: inherit; font-size: 14.5px; color: var(--text); outline: none; }
.comment-write textarea::placeholder { color: var(--text-disabled); }
.cw-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; border-top: 1px solid var(--border); }
.cw-attach { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-sub); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.cw-attach:hover { background: var(--bg); }
.cw-files { padding: 0 12px 10px; }

/* 처리 이력: 상태 변경은 상태 색 점, 그 외(담당자·일정 변경)는 빈 점 */
.timeline li { --c: var(--border-strong); position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--border); }
.timeline li:last-child::before,
.timeline li:not(:has(~ li:not([hidden])))::before { display: none; }  /* 보이는 마지막 항목 */
.timeline li:not(:has(~ li:not([hidden]))) { padding-bottom: 0; }
.timeline li.st-10 { --c: var(--st-10); }
.timeline li.st-20 { --c: var(--st-20); }
.timeline li.st-30 { --c: var(--st-30); }
.timeline li.st-40 { --c: var(--st-40); }
.timeline li.st-50 { --c: var(--st-50); }
.timeline li.st-90 { --c: var(--st-90); }
.timeline .tl-dot { position: relative; z-index: 1; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--c); flex-shrink: 0; }
.timeline li.is-event .tl-dot { width: 10px; height: 10px; margin: 6px 3px 0; border: 2px solid var(--border-strong); background: var(--surface); box-shadow: none; }
.timeline li:first-child:not(.is-event) .tl-dot { box-shadow: 0 0 0 1px var(--c), 0 0 0 5px color-mix(in srgb, var(--c) 18%, transparent); }
.timeline strong { display: block; font-size: 14px; font-weight: 700; }
.timeline li.is-event strong { font-weight: 600; color: var(--text-sub); }
.timeline p { font-size: 13px; color: var(--text-sub); }
.timeline p b { color: var(--text); }
.timeline time { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tl-more { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 38px; margin-top: 16px; border-radius: 10px; background: var(--bg); font-size: 13px; font-weight: 600; color: var(--text-sub); }
.tl-more:hover { color: var(--text); }

.manager-card { display: flex; align-items: center; gap: 12px; }
.manager-card .avatar { width: 44px; height: 44px; background: var(--primary); color: #fff; font-size: 16px; }
.manager-card p { font-size: 13px; color: var(--text-muted); }
.manager-card strong { font-size: 15px; }
.manager-card .contact-call { margin-left: auto; }

.mobile-actions { display: none; }

/* ---------- 반응형 (목록·등록·상세) ---------- */
@media (max-width: 1024px) {
  .form-layout, .detail-layout { grid-template-columns: 1fr; }
  .guide { position: static; order: -1; }
  .guide .guide-list { flex-direction: row; flex-wrap: wrap; gap: 10px 20px; }
  .guide .guide-list li { flex: 1 1 260px; }
  .req-table th:nth-child(5), .req-table td:nth-child(5) { display: none; } /* 요청자 */
}
@media (max-width: 768px) {
  /* 목록 검색: 키워드 + 필터 버튼, 나머지는 펼쳐서 */
  .search-bar { padding: 10px; }
  .search-bar .input-search { flex: 1 1 0; }
  .filter-toggle { display: inline-flex; width: 48px; height: 48px; padding: 0; }
  .search-bar .filter-more { display: none; flex-basis: 100%; flex-direction: column; gap: 8px; }
  .search-bar.is-open .filter-more { display: flex; }
  .search-bar .select, .search-bar .cselect, .date-range, .date-range .input { width: 100%; }
  .filter-more .btn { width: 100%; height: 44px; }
  .list-head { padding: 14px 16px 6px; }

  /* 표 → 카드 */
  .req-table thead { display: none; }
  .req-table, .req-table tbody { display: block; }
  .req-table tbody tr {
    display: grid; grid-template-columns: auto 1fr auto; gap: 6px 8px; align-items: center;
    padding: 16px; border-bottom: 1px solid var(--border);
    grid-template-areas: "part no status" "title title title" "info info info";
  }
  .req-table tbody tr:last-child { border-bottom: 0; }
  .req-table td { padding: 0 !important; border: 0; white-space: normal; }
  .req-table .c-part { grid-area: part; }
  .req-table .c-no { grid-area: no; }
  .req-table .c-status { grid-area: status; }
  .req-table .c-title { grid-area: title; min-width: 0; font-size: 15px; }
  .req-table td.c-user, .req-table td.c-manager, .req-table td.c-date { display: none; }
  .req-table .c-info { grid-area: info; display: flex !important; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-muted); }
  .req-table .c-info > span { display: inline !important; color: var(--text-muted); }
  .m-label { display: inline; margin-right: 4px; color: var(--text-disabled); }

  .form-section .card-head { padding: 20px 18px 10px; }
  .form-section .card-body { padding: 6px 18px 22px; }
  .part-cards { grid-template-columns: 1fr; gap: 8px; }
  .part-card .pc-body { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; }
  .pc-check { top: 50%; transform: translateY(-50%); }
  .editor-area { min-height: 180px; font-size: 16px; }
  .contact-head { flex-direction: column; align-items: flex-start; }
  .form-actions {
    position: sticky; bottom: 0; z-index: 20;
    margin: 8px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .form-actions .btn { flex: 1; padding: 0; }
  .form-actions .btn-cta { flex: 2; }

  .detail-head { padding: 20px 18px; }
  .detail-head h1 { font-size: 20px; }
  .dh-top { flex-direction: column; }
  .dh-actions { display: none; }
  .stepper { margin-top: 22px; }
  .stepper li { font-size: 11.5px; }
  .info-grid { grid-template-columns: 1fr; }
  .comment-write textarea { font-size: 16px; }
  .mobile-actions {
    display: flex; gap: 8px;
    position: sticky; bottom: 0; z-index: 20;
    margin: 20px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .mobile-actions .btn { flex: 1; height: 50px; font-size: 15px; }
  .mobile-actions:empty { display: none; }
}

@media (max-width: 768px) {
  .notice { flex-wrap: wrap; align-items: flex-start; }
  .notice .btn { width: 100%; }
  .notice-text span { white-space: normal; }
}
