* { box-sizing: border-box; }
:root {
    /* 공통 디자인 토큰 */
    --radius-lg: 12px;     /* 대형 컨테이너·배경 카드 */
    --radius-md: 8px;      /* 중간 박스(알림·KPI·모달 내부 등) */
    --radius-sm: 6px;      /* 인풋·버튼 등 컨트롤 */
    --ctl-h: 36px;         /* 입력/버튼 공통 높이 */
    --shadow-card: 0 2px 10px rgba(20, 40, 80, .07);   /* 공통 소프트 그림자 */
    /* 상태 고유색(요청·처리완료·확인) — 뱃지·차트·KPI·띠 전부 동일하게 사용 */
    --st-requested: #D9614D;
    --st-resolved: #4488C9;
    --st-confirmed: #4FA07C;
    --st-confirmed-soft: #A8B4AC;   /* 확인(종료) 차분한 회색 — 통계 차트·KPI 공통 */
}
body { margin: 0; font-family: "Malgun Gothic", system-ui, sans-serif; font-size: 15px; color: #222; background: linear-gradient(160deg, #d0e0f3 0%, #aec6e7 100%) fixed; min-height: 100vh; }
header { background: linear-gradient(100deg, #182a48 0%, #294870 58%, #356099 100%); color: #fff; padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 10px rgba(15,25,50,.18); position: sticky; top: 0; z-index: 200; }
header h1 { font-size: 19px; margin: 0; }
header h1.brand { display: flex; align-items: center; gap: 11px; }
.user-box { display: flex; align-items: center; gap: 10px; }
.user-box .who { color: #cdd7ea; }
.user-box .who b { color: #fff; }
.navlink { color: #cdd7ea; text-decoration: none; padding: 4px 8px; border-radius: 4px; background: rgba(255,255,255,.08); }
.navlink:hover { background: rgba(255,255,255,.2); color: #fff; }
/* 최초 진입 안내 — 오른쪽 위 '사용자 가이드' 버튼을 눌러 보도록 유도(닫기 가능) */
.navlink.nav-attn { background: rgba(130,195,255,.5); color: #fff; animation: navAttn 1.1s ease-in-out infinite; }
@keyframes navAttn {
  0%,100% { box-shadow: 0 0 0 2px rgba(255,255,255,.55), 0 0 12px 3px rgba(150,210,255,.85), 0 0 24px 7px rgba(150,210,255,.4); }
  50% { box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 0 22px 7px rgba(170,220,255,1), 0 0 44px 15px rgba(150,210,255,.75); }
}
/* 등록 유도: '신규 등록' · '새 결함 등록' 버튼 발광 펄스 */
.btn.reg-attn { animation: regAttn 1.05s ease-in-out infinite; }
@keyframes regAttn {
  0%,100% { box-shadow: 0 0 0 0 rgba(74,144,217,.6), 0 0 12px 3px rgba(74,144,217,.5); }
  50% { box-shadow: 0 0 0 8px rgba(74,144,217,0), 0 0 22px 8px rgba(74,144,217,.9); }
}
.guide-hint { position: fixed; top: 58px; right: 16px; z-index: 320; max-width: 312px;
    background: #1f2d44; color: #eaf1fb; border-radius: 12px; padding: 12px 38px 13px 14px;
    box-shadow: 0 10px 32px rgba(15,30,60,.32); font-size: 13px; line-height: 1.55; animation: ghPop .28s ease both; }
.guide-hint .gh-arrow { position: absolute; top: -7px; right: 54px; width: 14px; height: 14px;
    background: #1f2d44; transform: rotate(45deg); border-radius: 3px; }
.guide-hint b { color: #fff; }
.guide-hint .gh-title { display: block; margin-bottom: 2px; font-size: 13.5px; }
.guide-hint .gh-close { position: absolute; top: 7px; right: 9px; background: none; border: none;
    color: #aab8cc; font-size: 19px; line-height: 1; cursor: pointer; padding: 2px 5px; border-radius: 6px; }
.guide-hint .gh-close:hover { color: #fff; background: rgba(255,255,255,.12); }
@keyframes ghPop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
/* 최초 로그인 환영 모달 — 4단계 가이드 요약 */
.welcome-modal { max-width: 580px; }
.welcome-modal > h3 { display: flex; align-items: center; gap: 8px; }
.welcome-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 8px; }
.wm-step { display: flex; flex-direction: column; gap: 3px; border: 1px solid #eceff4; border-radius: 14px; padding: 14px 15px; background: #fff; box-shadow: 0 2px 10px rgba(20,40,80,.05); transition: box-shadow .16s ease, transform .16s ease; }
.wm-step:hover { box-shadow: 0 8px 22px rgba(20,40,80,.1); transform: translateY(-2px); }
.wm-step .gs-no { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #4a90d9; color: #fff; font-weight: 800; font-size: 13px; margin-bottom: 5px; box-shadow: 0 2px 6px rgba(20,40,80,.18); }
.wm-step b { color: #1f2d44; font-size: 14.5px; }
.wm-step > span:last-child { color: #6b7a8d; font-size: 12px; line-height: 1.45; }
.wm-step.gs-1 .gs-no { background: var(--st-requested); }
.wm-step.gs-2 .gs-no { background: #6c5ce7; }
.wm-step.gs-3 .gs-no { background: var(--st-resolved); }
.wm-step.gs-4 .gs-no { background: var(--st-confirmed); }
@media (max-width: 560px) { .welcome-steps { grid-template-columns: 1fr; } }
.wm-point { display: flex; align-items: center; gap: 7px; margin: 4px 0 0; padding: 8px 11px; background: #eef5fc; border: 1px solid #cfe0f3; border-radius: var(--radius-md); color: #2b3a55; font-size: 12.5px; line-height: 1.45; }
.wm-point b { color: #1f6fc2; }
/* 환영 모달이 열린 동안 헤더(가이드 버튼)를 백드롭 위로 띄워 강조 */
body.welcome-spotlight header { z-index: 1100; }
body.welcome-spotlight #navGuide { background: rgba(130,195,255,.55) !important; color: #fff !important; animation: guideGlow 1.05s ease-in-out infinite !important; }
@keyframes guideGlow {
  0%,100% { box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 12px 3px rgba(130,200,255,.85), 0 0 26px 8px rgba(130,200,255,.45); }
  50% { box-shadow: 0 0 0 3px #fff, 0 0 22px 7px rgba(160,215,255,1), 0 0 46px 16px rgba(130,200,255,.8); }
}
/* 가이드 버튼을 가리키는 통통 튀는 발광 화살표 포인터(환영 모달 동안) */
.guide-pointer { position: fixed; z-index: 1200; width: 88px; text-align: center; pointer-events: none; animation: gpBounce 1s ease-in-out infinite; }
.guide-pointer .gp-arrow { display: block; color: #ffd24a; font-size: 16px; line-height: 1; text-shadow: 0 0 9px rgba(255,210,74,.95); }
.guide-pointer .gp-label { display: inline-block; margin-top: 2px; background: #1f2d44; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; box-shadow: 0 4px 12px rgba(15,30,60,.45); }
@keyframes gpBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* 개발 전용 빠른 계정 전환 바 */
.devbar { background: #fffbe6; border-bottom: 1px solid #f0e0a0; padding: 6px 16px; font-size: 12px; color: #7a6a00;
          display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.devbar a { padding: 4px 10px; background: #fff; border: 1px solid #e0cf6a; border-radius: 4px; text-decoration: none; color: #5a4d00; white-space: nowrap; line-height: 1.2; }
.devbar a:hover { background: #fff3bf; }
.devbar select { padding: 4px 8px; border: 1px solid #e0cf6a; border-radius: 4px; background: #fff; color: #5a4d00; font-size: 12px; line-height: 1.2; max-width: 280px; }
.devbar a.admin { background: #4a90d9; color: #fff; border-color: #4a90d9; font-weight: 600; }
.devbar a.admin:hover { background: #3a7bc0; }

.flash { padding: 12px 16px; margin: 8px 16px 0; border-radius: var(--radius-md); }
.flash.ok { background: #e6f4ea; color: #1e7e34; border: 1px solid #b7e1c1; }
.flash.err { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }

.toolbar { display: flex; gap: 10px 13px; align-items: center; padding: 13px 18px; background: linear-gradient(180deg, #eef4fc 0%, #dfe9f7 100%); border-bottom: 1px solid #cbdcef; flex-wrap: wrap; box-shadow: 0 1px 4px rgba(20,40,80,.05); }
.toolbar .field { display: flex; flex-direction: row; align-items: center; gap: 7px; }
.toolbar .field > label { font-size: 12.5px; color: #314a66; font-weight: 700; letter-spacing: .1px; white-space: nowrap; }
.toolbar .field .range { display: flex; align-items: center; gap: 5px; color: #5a6b7b; }
/* 기간 필터: 날짜 텍스트 숨기고 달력 아이콘만 — 선택 시 채워진(파란) 아이콘, 미선택 시 회색 */
.date-pick { position: relative; display: inline-flex; }
.date-pick input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; pointer-events: none; }
.date-ico { display: inline-flex; align-items: center; justify-content: center; width: var(--ctl-h); height: var(--ctl-h); padding: 0; border: 1px solid #c3d2e4; border-radius: var(--radius-sm); background: #fff; color: #9aa7b8; cursor: pointer; box-shadow: 0 1px 2px rgba(20,40,80,.05); }
.date-ico:hover { border-color: #9cb6d6; color: #5a6b7b; }
.date-pick.set .date-ico { color: #fff; background: var(--st-resolved); border-color: var(--st-resolved); }
.toolbar .field .range .date-tilde { color: #8aa0b8; margin: 0 1px; }
.toolbar select, .toolbar input { height: var(--ctl-h); padding: 0 11px; border: 1px solid #c3d2e4; border-radius: var(--radius-sm); font-size: 13.5px; background: #fff; color: #25303c; box-shadow: 0 1px 2px rgba(20,40,80,.05); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
/* 툴바 컨트롤·버튼 높이 동기화(수평 베이스라인 일치) */
.toolbar .btn, .toolbar button { height: var(--ctl-h); box-sizing: border-box; display: inline-flex; align-items: center; }
.toolbar select { appearance: none; -webkit-appearance: none; -moz-appearance: none; padding-right: 30px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a90d9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; }
.toolbar select:hover, .toolbar input:hover { border-color: #9cb6d6; }
.toolbar select:focus, .toolbar input:focus { outline: none; border-color: #4a90d9; box-shadow: 0 0 0 3px rgba(74,144,217,.18); }

/* 버튼 — 브랜드 톤 통일(기본=블루 그라데이션, 경고=앰버, 보조=연한, 신규=블루 강조) */
.btn { padding: 7px 15px; border: none; border-radius: var(--radius-sm); cursor: pointer; background: linear-gradient(135deg, #4a90d9, #3a78bf); color: #fff; text-decoration: none; display: inline-block; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px rgba(58,120,191,.28); transition: filter .15s ease, transform .04s ease; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn.ok { background: linear-gradient(135deg, #4a90d9, #3a78bf); box-shadow: 0 2px 6px rgba(58,120,191,.28); }
.btn.sec { background: #eef1f6; color: #46545f; border: 1px solid #d9e0e8; box-shadow: none; }
.btn.sec:hover { background: #e3e8ef; filter: none; }
.btn.warn { background: linear-gradient(135deg, #f3a330, #e07d1a); box-shadow: 0 2px 6px rgba(224,125,26,.3); }
/* 신규 등록 강조 버튼(툴바 우측, 눈에 띄게) */
.btn.new { margin-left: auto; background: linear-gradient(135deg, #4a90d9, #2f6fd0); font-weight: 700; font-size: 14px; padding: 9px 20px; border-radius: var(--radius-sm); box-shadow: 0 3px 10px rgba(47,111,208,.42); }
.btn.new:hover { filter: brightness(1.07); }

.layout { display: grid; grid-template-columns: var(--list-col, minmax(0, 1.5fr)) 12px minmax(0, 1fr); padding: 12px 16px; }   /* 목록을 기본적으로 넓게 → 9컬럼이 가로 스크롤 없이 들어가게 */
/* 그리드 칸이 내용(넓힌 표)에 끌려 늘어나지 않도록 — 목록은 내부에서 가로 스크롤 */
.layout > .panel { min-width: 0; }
.splitter { cursor: col-resize; position: relative; }
.splitter::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: #d6dbe2; border-radius: 1px; }
.splitter:hover::before, .splitter.dragging::before { background: #4a90d9; width: 4px; }
/* 이미지 드래그앤드롭 대상 편집기 강조 */
.editor.drag-over, .cmt-editor.drag-over { outline: 2px dashed #4a90d9; outline-offset: -2px; background: #f0f7ff; }
/* 저장·상태전이 처리 중 표시(전체 페이지 새로고침 동안 '처리 중…') */
.busy-overlay { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; background: rgba(255,255,255,.55); cursor: progress; }
.busy-overlay.on { display: flex; }
.busy-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 26px; background: #fff; border: 1px solid #e1e4e8; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.14); }
.busy-spinner { width: 34px; height: 34px; border: 4px solid #dbe3ec; border-top-color: #4a90d9; border-radius: 50%; animation: busy-spin .8s linear infinite; }
.busy-text { font-size: 13px; color: #44515f; font-weight: 600; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
/* 편집기 인라인 이미지 크기조절 모서리 핸들 */
.img-edit-handle { position: absolute; z-index: 2500; display: none; width: 14px; height: 14px; background: #4a90d9; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.45); cursor: nwse-resize; }
/* 편집기 이미지 삭제 버튼(호버 시 우상단 X) */
.img-del-btn { position: absolute; z-index: 2600; display: none; width: 22px; height: 22px; align-items: center; justify-content: center; background: #e0392b; color: #fff; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.4); cursor: pointer; font-size: 16px; line-height: 1; font-weight: 700; }
.img-del-btn:hover { background: #c0392b; }
.img-hint { margin: 5px 0 2px; font-size: 11px; color: #8a96a3; }
.img-hint b { color: #4a90d9; font-weight: 600; }
.dlist .no-col { text-align: center; color: #97a2ae; font-size: 11px; font-weight: 500; }
.panel { background: #fff; border: 1px solid #e6ebf1; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.panel h2 { font-size: 14px; margin: 0; padding: 10px 14px; background: linear-gradient(180deg, #f7f9fc, #edf1f7); color: #2b3a55; border-bottom: 1px solid #e6ebf1; border-radius: var(--radius-lg) var(--radius-lg) 0 0; font-weight: 700; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 8px; border-bottom: 1px solid #eee; text-align: left; font-size: 12px; }
th { background: #fafbfc; color: #555; }
th.sorted { background: #eef5ff; }
/* 정렬 가능한 컬럼 헤더 */
.sort-th { display: inline-flex; align-items: center; gap: 3px; color: #555; text-decoration: none; white-space: nowrap; }
.sort-th:hover { color: #1c4f8f; }
th.sorted .sort-th { color: #1c4f8f; font-weight: 700; }
.sort-ind { font-size: 10px; color: #aab2bd; }
th.sorted .sort-ind { color: #4a90d9; }
tr.row { cursor: pointer; }
tr.row:nth-child(even) { background: #fafbfc; }
tr.row:hover { background: #f0f7ff; }
tr.row.sel { background: #dceeff; }
/* 비활성(관리자 숨김) 결함 — 관리자에게만 흐리게 표시 */
tr.row.inactive { opacity: .5; }
.inactive-tag { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: #8a93a3; border-radius: 3px; padding: 0 5px; margin-right: 4px; vertical-align: middle; }
/* 상태별 좌측 색상 띠 */
tr.row.st-REQUESTED td:first-child { box-shadow: inset 3px 0 0 var(--st-requested); }
tr.row.st-RESOLVED td:first-child { box-shadow: inset 3px 0 0 var(--st-resolved); }
tr.row.st-CONFIRMED td:first-child { box-shadow: inset 3px 0 0 var(--st-confirmed); }
/* 결함제목 강조 */
.title-cell { font-weight: 600; color: #1f2d3d; }
/* 분류·인물 태그 */
.cat-tag { display: inline-block; padding: 1px 7px; border-radius: 4px; background: #eef0f3; color: #555; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
/* 결함분류 색 구분 */
.cat-tag.cat-DEFECT  { background: #fdecea; color: #c0392b; border-color: #f3c0bb; }
.cat-tag.cat-IMPROVE { background: #eaf3fb; color: #2471a3; border-color: #bcd9f0; }
.cat-tag.cat-ADD     { background: #eafaf1; color: #1e8449; border-color: #bce8cf; }
.cat-tag.cat-DATA    { background: #f5eef8; color: #8e44ad; border-color: #ddc8ea; }
.cat-tag.cat-INQUIRY { background: #fdf0e1; color: #b96d12; border-color: #f4d8b0; }
.cat-tag.cat-ETC     { background: #f2f3f4; color: #566573; border-color: #d6dade; }
.person-tag { font-size: 12px; color: #333; }
.person-tag.reporter { color: #333; }
.person-tag.assignee { color: #333; font-weight: 600; }

.badge { padding: 2px 9px; border-radius: 10px; color: #fff; font-size: 11px; white-space: nowrap; font-weight: 700; border: 1px solid transparent; }
.b-REQUESTED { background: var(--st-requested); color: #fff; border-color: transparent; }
.b-RESOLVED { background: var(--st-resolved); color: #fff; border-color: transparent; }
.b-CONFIRMED { background: var(--st-confirmed-soft); color: #fff; border-color: transparent; }   /* 확인 칩: 차분한 회색(통계·KPI와 통일) */

/* 중요도 배지 */
/* 중요도: 분류(채워진 틴트)와 다른 느낌 — 아웃라인(흰 배경 + 긴급도 색 테두리·글자) */
.prio-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1.5px solid transparent; background: #fff; white-space: nowrap; }
.prio-URGENT { color: #c0392b; border-color: #df8e87; }
.prio-HIGH   { color: #cf6a13; border-color: #efb481; }
.prio-NORMAL { color: #69737f; border-color: #c4ccd4; }
.prio-LOW    { color: #3f7cb0; border-color: #a9cae9; }

.detail { padding: 12px; }
.fields { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 6px 10px; align-items: center; margin-bottom: 10px; }
.fields label { color: #777; font-size: 12px; }
.fields .v { font-weight: 600; }
.section { border: 1px solid #eee; border-radius: 5px; margin-top: 10px; }
.section > .st { padding: 6px 10px; background: #f7f8fa; font-weight: bold; border-bottom: 1px solid #eee; }
.section > .sb { padding: 10px; }
.assignee-line { margin-bottom: 8px; padding: 6px 10px; background: #eaf7ef; border: 1px solid #b7e1c1; border-radius: 5px; color: #1e7e34; font-size: 13px; }
.desc { background: #fcfcfc; border: 1px solid #e5e7eb; padding: 8px; border-radius: var(--radius-sm); min-height: 40px; }
/* 결함세부내용 본문 글씨 크기를 결함제목(본문 15px)과 동일하게 */
/* 세부내용 본문을 제목값과 동일한 15px로 강제 — 붙여넣기/리치텍스트의 인라인 폰트 크기까지 무시(통일) */
.section .sb > .desc, .section .sb > .desc * { font-size: 15px !important; }
.section .sb > .desc > :first-child { margin-top: 0; }   /* 문단 첫/끝 여백 정리 — 제목값과 동일 정렬 */
.section .sb > .desc > :last-child { margin-bottom: 0; }
.desc img { max-width: 100%; height: auto; }

/* 결함세부내용 리치 에디터 */
.editor { min-height: 130px; border: 1px solid #ccc; border-top: none; border-radius: 0 0 4px 4px; padding: 8px; background: #fff; overflow: auto; }
.editor:focus { outline: 2px solid #bcd6f5; }
.editor:empty:before { content: attr(data-placeholder); color: #aaa; }
.editor img { max-width: 100%; height: auto; }
/* 본문 목록 서식이 에디터/상세보기 모두에서 보이도록 */
.editor ul, .desc ul { padding-left: 22px; list-style: disc; }
.editor ol, .desc ol { padding-left: 22px; list-style: decimal; }
.editor li, .desc li { margin: 2px 0; }

/* 서식 툴바 */
.rte-toolbar { display: flex; align-items: center; gap: 2px; padding: 4px 6px; border: 1px solid #ccc; border-radius: 4px 4px 0 0; background: #f4f6f9; }
.rte-toolbar button { min-width: 30px; height: 28px; padding: 0 8px; border: 1px solid transparent; border-radius: 4px; background: none; cursor: pointer; font-size: 13px; color: #333; }
.rte-toolbar button:hover { background: #e3e8ef; border-color: #cdd5e0; }
.rte-toolbar .sep { width: 1px; height: 18px; background: #d0d6de; margin: 0 4px; }
.timeline li { margin-bottom: 6px; }
.muted { color: #999; }

/* 첨부 삭제 (텍스트 버튼) */
.attach-list li { margin: 2px 0; }
.link-del { border: none; background: none; color: #c0392b; cursor: pointer; font-size: 11px; padding: 0 2px; text-decoration: underline; }
.link-del:hover { color: #922b21; }

/* 댓글 */
.cmt-list { margin-bottom: 10px; }
.cmt-thread { padding: 8px 0; border-bottom: 1px solid #eef0f3; }
.cmt-thread:last-child { border-bottom: none; }
.cmt { padding: 8px 0; }
.cmt-replies { margin: 6px 0 2px 22px; border-left: 2px solid #e6eaef; padding-left: 12px; }
.cmt.reply { padding: 6px 0; }
.cmt-reply-box { margin: 6px 0 2px 22px; }
.cmt-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.cmt-head b { color: #111827; font-weight: 700; }
.cmt-head .muted { font-size: 12px; color: #6b7280; }
.cmt-actions { margin-left: auto; display: flex; gap: 4px; }
.cmt-body { margin-top: 5px; }
.cmt-editor { min-height: 56px; border: 1px solid #ccc; border-radius: 4px; padding: 8px; background: #fff; overflow: auto; }
.cmt-editor:focus { outline: 2px solid #bcd6f5; }
.cmt-editor:empty:before { content: attr(data-placeholder); color: #aaa; }
.cmt-editor img { max-width: 100%; height: auto; }
.cmt-edit-box { margin-top: 6px; }
.cmt-edit-actions { margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.cmt-edit-actions .btn { font-size: 12px; padding: 4px 10px; }
.cmt-hist { margin-top: 6px; background: #f7f8fa; border: 1px solid #eef0f3; border-radius: 5px; padding: 8px; }
.cmt-hist-item { padding: 4px 0; border-bottom: 1px dashed #e0e4ea; }
.cmt-hist-item:last-child { border-bottom: none; }
.cmt-new { margin-top: 8px; border-top: 1px solid #eef0f3; padding-top: 10px; }

/* 참여자(요청자 → 담당자) 강조 */
.people { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.person { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 8px; min-width: 120px; border: 1px solid; text-align: left; }
.person .role { font-size: 11px; opacity: .85; }
.person .pname { font-size: 15px; font-weight: 700; line-height: 1.3; }
.person.reporter { background: #eef5ff; border-color: #b8d4f5; color: #1c4f8f; }
.person.assignee { background: #eaf7ef; border-color: #b7e1c1; color: #1e7e34; }
.person.assignee.past { background: #f1f3f5; border-color: #d6dade; color: #7a828c; }
.person.assignee.current { box-shadow: 0 0 0 2px #b7e1c1; }
.person.assignee.done { background: #e8efe9; border-color: #bcd0c2; color: #5a7062; }   /* 조치 완료(처리완료·확인) — 머티드 그린(완료 표시) */
.person.confirmer { background: #f3eefe; border-color: #d4c2f0; color: #6c3fb5; }
.person.confirmer.past { background: #f1f3f5; border-color: #d6dade; color: #7a828c; }   /* 확인 전: 아직 미확인 → 회색 */
.person.confirmer.current { box-shadow: 0 0 0 2px #d4c2f0; }                              /* 확인 완료: 강조 링 */
/* 진행 단계 강조: 각 역할은 고유색 유지(요청자·조치자·확인자), 현재 단계만 링(box-shadow)으로 강조.
   미도달·교체 단계만 회색(past)으로 구분(투명도 dim은 조치자 색이 죽어 제거). */
.people .person { transition: box-shadow .15s ease; }
.tl-flow.assignee-flow { color: #6c5ce7; font-weight: 600; }
.people .arrow { color: #9aa7b8; font-size: 18px; }
.reject-flag { display: inline-block; margin-left: 8px; font-size: 11px; color: #fff; background: #e67e22; border-radius: 10px; padding: 1px 8px; }

/* 세로 타임라인(진행 이력) */
.vtimeline { list-style: none; margin: 0; padding: 0; position: relative; }
.vtimeline:before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: #e3e7ee; }
.vtimeline li { position: relative; padding: 0 0 14px 26px; }
.vtimeline li:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #bbb; border: 3px solid #fff; box-shadow: 0 0 0 1px #e3e7ee; }
.tl-SAVE .tl-dot { background: #8a93a3; }
.tl-EDIT .tl-dot { background: #b08968; }
.tl-ASSIGN .tl-dot { background: #6c5ce7; }
.tl-RESOLVE .tl-dot { background: #2980b9; }
.tl-CONFIRM .tl-dot { background: #27ae60; }
.tl-REJECT .tl-dot { background: #e67e22; }
.tl-RECLASSIFY .tl-dot { background: #16a085; }
.tl-DEACTIVATE .tl-dot { background: #7a828c; }
.tl-ACTIVATE .tl-dot { background: #138d75; }
.tl-OVERRIDE .tl-dot { background: #c0392b; }
.tl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-action { font-size: 11px; font-weight: 700; color: #fff; padding: 1px 9px; border-radius: 10px; background: #8a93a3; }
.a-SAVE { background: #8a93a3; }
.a-EDIT { background: #b08968; }
.a-ASSIGN { background: #6c5ce7; }
.a-RESOLVE { background: #2980b9; }
.a-CONFIRM { background: #27ae60; }
.a-REJECT { background: #e67e22; }
.a-RECLASSIFY { background: #16a085; }
.a-DEACTIVATE { background: #7a828c; }
.a-ACTIVATE { background: #138d75; }
.a-OVERRIDE { background: #c0392b; }

/* 작은 인라인 버튼(분류 변경 등) */
.mini-btn { margin-left: 6px; padding: 1px 8px; font-size: 11px; border: 1px solid #cdd5e0; border-radius: 4px; background: #f4f6f9; color: #44515f; cursor: pointer; }
/* 결함 분류 수정하기: 뱃지/버튼 혼동 방지 — 텍스트 링크 스타일 */
.mini-btn.cat-edit-btn { margin-left: 8px; padding: 0; border: none; background: none; box-shadow: none; color: #3b82f6; text-decoration: underline; font-weight: 600; font-size: 12px; }
.mini-btn.cat-edit-btn:hover { color: #2563eb; }
.mini-btn:hover { background: #e3e8ef; border-color: #b6c1cf; }
/* 결함분류 수정: 분류 태그와 헷갈리지 않게 '액션 버튼'으로 구분(파란 톤·연필 아이콘) */
.cat-edit-btn { background: #eaf2fb; color: #1f6fb2; border-color: #a9cdee; font-weight: 600; padding: 2px 10px; }
.cat-edit-btn:hover { background: #d6e7f8; border-color: #7fb4e6; }
/* 배포 버전·빌드/기동 시각 우하단 표시 */
.build-stamp { position: fixed; left: 4px; bottom: 3px; z-index: 50; font-size: 10px; color: #aab4bf; background: transparent; border: none; border-radius: 0; padding: 0; box-shadow: none; }
.build-stamp b { color: #5a6b7b; font-weight: 700; }
/* 목록 총건수 + 페이지네이션 */
.list-count { font-size: 12px; font-weight: 600; color: #6b7a89; }
/* 페이지네이션 — 상단 타이틀 라인 우측. 테두리 없는 미니멀 링크 + 원형 호버, 활성=블루+언더라인 */
.pager { display: inline-flex; align-items: center; gap: 1px; padding: 0; flex-wrap: wrap; }
.pager .pg { font-size: 12.5px; min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; border: none; border-radius: 999px; color: #5a6b7b; text-decoration: none; background: transparent; font-weight: 600; }
.pager .pg:hover { background: #e8f0fb; color: #2b6cb0; }
.pager .pg.cur { color: #2b6cb0; font-weight: 800; background: transparent; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.pager .pg.disabled { color: #cdd5de; pointer-events: none; background: transparent; }
/* 목록 헤더: 타이틀(좌) + 페이저·새로고침(우) */
.panel h2.list-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.list-head-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.list-refresh { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border-radius: 999px; color: #2b6cb0; background: #eef4fc; border: 1px solid #cfe0f5; text-decoration: none; font-size: 15px; line-height: 1; }
.list-refresh:hover { background: #dceafb; }
.tl-flow { font-size: 12px; color: #555; }
.tl-time { font-size: 11px; color: #999; margin-left: auto; }
.tl-meta { font-size: 12px; color: #444; margin-top: 3px; }
.tl-comment { font-size: 12px; color: #333; background: #f7f8fa; border: 1px solid #eef0f3; border-radius: 5px; padding: 6px 9px; margin-top: 5px; white-space: pre-wrap; }

form.reg label, form.act label { display: block; margin: 8px 0 3px; font-size: 12px; color: #555; }
form.reg input, form.reg select, form.reg textarea,
form.act textarea, form.act select { width: 100%; padding: 6px 8px; border: 1px solid #ccc; border-radius: var(--radius-sm); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actbox { border: 1px solid #e1e4e8; border-radius: 5px; padding: 10px; margin-top: 8px; background: #fbfdff; }
.placeholder { padding: 40px; text-align: center; color: #aaa; }
/* 결함 미선택 시 빈 상세 영역 — 빈 화면 대신 안내형 빈 상태(세로 중앙 정렬로 아래 여백 채움) */
.empty-state { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; color: #6b7785; }
.empty-state .es-logo { width: 60px; height: 60px; margin: 0 auto 14px; opacity: .92; filter: drop-shadow(0 6px 14px rgba(47,111,208,.25)); }
.empty-state .es-title { font-size: 18px; font-weight: 800; color: #2b3a55; margin: 0 0 6px; }
.empty-state .es-sub { font-size: 13px; color: #8a93a3; margin: 0 0 18px; }
.empty-state .es-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 22px; flex-wrap: wrap; }
.empty-state .es-tips { list-style: none; padding: 0; margin: 0 auto; max-width: 440px; text-align: left; display: grid; gap: 10px; }
.empty-state .es-tips li { background: #f7f9fc; border: 1px solid #eef1f6; border-radius: var(--radius-md); padding: 11px 14px; font-size: 13px; color: #4a5663; }

/* 모달 (확인/반려) */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; border-radius: var(--radius-lg); padding: 20px; width: 460px; max-width: 92vw; box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.modal h3 { margin: 0 0 12px; font-size: 16px; }
.modal label { display: block; margin: 10px 0 4px; color: #555; font-size: 12px; }
.modal textarea, .modal select { width: 100%; padding: 7px 9px; border: 1px solid #ccc; border-radius: var(--radius-sm); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal-note { margin: 10px 0 0; font-size: 12px; color: #8a6d3b; background: #fcf8e3; border: 1px solid #faebcc; border-radius: 4px; padding: 6px 9px; }

/* 결함분류 안내 */
.cat-guide { margin: 6px 0 4px; border: 1px solid #e1e4e8; border-radius: 5px; background: #fbfdff; padding: 6px 10px; }
.cat-guide summary { cursor: pointer; font-size: 12px; font-weight: 600; color: #2b3a55; }
.cat-guide ul { margin: 8px 0 2px; padding-left: 18px; }
.cat-guide li { font-size: 12px; color: #555; margin: 3px 0; }

/* 결함분류 안내 아래 '처리 흐름' 링크 */
.proc-link { margin: 6px 0 2px; font-size: 12px; }
.proc-link a { color: #1c4f8f; font-weight: 600; text-decoration: none; }
.proc-link a:hover { text-decoration: underline; }

/* 칸 너비를 키워 표가 패널보다 넓어지면 목록 영역만 가로 스크롤(상세/스플리터로 넘치지 않게) */
.dlist-wrap { overflow-x: auto; max-width: 100%; }
/* 결함 목록 — 폭 고정·말줄임. 기본 중앙 정렬, 장문 컬럼(시스템·테스트명·결함제목)만 좌측 정렬+좌측 패딩 */
.dlist { table-layout: fixed; width: 100%; }   /* min-width 없이 패널 폭에 맞춤 → 기본 가로 스크롤 없음. 컬럼 폭 합을 줄여 제목 열이 접히지 않게 */
.dlist th, .dlist td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; padding: 12px 6px; }
/* 뱃지 칸(진행상태·분류·중요도)은 잘리지 않게 — 최소 크기 유지·항상 전체 표시 */
.dlist td:nth-child(2), .dlist td:nth-child(6), .dlist td:nth-child(9) { overflow: visible; }
/* 정렬 헤더: 정렬 아이콘(⇅)을 라벨 '앞'에 두고 셀 가운데 정렬(데이터와 동일 정렬) */
.dlist thead th .sort-th { display: flex; align-items: center; justify-content: center; gap: 5px; }
.dlist thead th .sort-ind { flex: none; }
/* (모든 컬럼 가운데 정렬 — 장문 컬럼 좌측정렬 규칙 제거) */
/* 헤더: 셀 간 세로 구분선 없음, 헤더↔바디 하단 실선만 */
.dlist thead th { position: relative; border-right: none; border-bottom: 2px solid #e2e8f0; }
.code-cell { font-family: ui-monospace, "Consolas", monospace; font-size: 11px; color: #5a6b7b; white-space: nowrap; }
/* 칸별 너비 조절 핸들 — 평소엔 숨김(헤더 깔끔하게), 경계 호버 시에만 표시 */
.col-grip { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 2; }
.col-grip:hover { box-shadow: inset -2px 0 0 rgba(43, 108, 176, .55); background: rgba(43, 108, 176, .12); }

/* 프로세스 안내 흐름도 */
.flow { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.flow-node { flex: 1; min-width: 130px; border: 2px solid; border-radius: 8px; padding: 12px; text-align: center; background: #fff; }
.flow-node .fn-badge { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.flow-node .fn-desc { font-size: 11px; color: #555; }
.flow-node.n-req { border-color: var(--st-requested); } .flow-node.n-req .fn-badge { color: var(--st-requested); }
.flow-node.n-res { border-color: var(--st-resolved); } .flow-node.n-res .fn-badge { color: var(--st-resolved); }
.flow-node.n-conf { border-color: var(--st-confirmed); } .flow-node.n-conf .fn-badge { color: var(--st-confirmed); }
.flow-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 100px; font-size: 11px; color: #777; text-align: center; }
.flow-arrow .fa-label { font-weight: 700; color: #2b3a55; font-size: 13px; }
.flow-reject { margin-top: 10px; padding: 8px 12px; background: #fff5ec; border: 1px dashed #e6a564; border-radius: 6px; color: #b9651a; font-size: 12px; }
/* 사용자 가이드: 4단계 한눈에 */
.ico { vertical-align: -.18em; }   /* 텍스트 옆 인라인 라인 아이콘 정렬 */
.guide-step .gs-ic svg { display: block; margin: 0 auto; }
.card.guide-hero { background: linear-gradient(180deg, #f3f9ff 0%, #ffffff 72%); border: 1px solid #d8e6f7; }
.card.guide-hero > h2 { font-size: 21px; }
.guide-steps { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; }
.guide-step { position: relative; flex: 1; min-width: 186px; border: 1px solid #e3e9f1; border-top: 4px solid #4a90d9; border-radius: var(--radius-lg); padding: 20px 16px 18px; background: #fff; text-align: center; box-shadow: 0 4px 16px rgba(20,40,80,.09); transition: transform .15s ease, box-shadow .15s ease; }
.guide-step:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(20,40,80,.15); }
.guide-step .gs-no { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #4a90d9; color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 2px 6px rgba(20,40,80,.2); }
.guide-step .gs-ic { font-size: 38px; line-height: 1; margin: 10px 0 8px; }
.guide-step .gs-t { font-size: 16.5px; font-weight: 800; color: #2b3a55; margin-bottom: 7px; }
.guide-step .gs-d { font-size: 12.5px; color: #5a6b7b; line-height: 1.55; }
.guide-arrow { display: flex; align-items: center; color: #b6c0cf; font-size: 26px; font-weight: 700; }
/* 단계별 색 — 진행상태 흐름과 일치(요청·배정·처리완료·확인) */
.guide-step.gs-1 { border-top-color: var(--st-requested); } .guide-step.gs-1 .gs-no { background: var(--st-requested); } .guide-step.gs-1 .gs-ic { color: var(--st-requested); }
.guide-step.gs-2 { border-top-color: #6c5ce7; } .guide-step.gs-2 .gs-no { background: #6c5ce7; } .guide-step.gs-2 .gs-ic { color: #6c5ce7; }
.guide-step.gs-3 { border-top-color: var(--st-resolved); } .guide-step.gs-3 .gs-no { background: var(--st-resolved); } .guide-step.gs-3 .gs-ic { color: var(--st-resolved); }
.guide-step.gs-4 { border-top-color: var(--st-confirmed); } .guide-step.gs-4 .gs-no { background: var(--st-confirmed); } .guide-step.gs-4 .gs-ic { color: var(--st-confirmed); }
@media (max-width: 860px) { .guide-arrow { transform: rotate(90deg); justify-content: center; width: 100%; } .guide-step { min-width: 0; } }

/* 프로세스 상태머신 SVG (요청→처리완료→확인 + 반려 루프 + 요청 자기루프) */
.flow-diagram { overflow-x: auto; padding: 8px 0 2px; }
.flow-diagram svg { display: block; min-width: 680px; max-width: 820px; margin: 0 auto; height: auto; }
.sm-node rect { fill: #fff; stroke-width: 2.5; }
.sm-node.req rect { stroke: var(--st-requested); }
.sm-node.res rect { stroke: var(--st-resolved); }
.sm-node.conf rect { stroke: var(--st-confirmed); stroke-width: 3.5; }
.sm-node > text { text-anchor: middle; font-weight: 800; fill: #2b3a55; font-size: 16px; }
.sm-node text.sub { font-weight: 600; fill: #98a2b0; font-size: 11px; }
.svg-lbl { text-anchor: middle; font-size: 13px; font-weight: 700; }
.svg-sub { text-anchor: middle; font-size: 11px; fill: #98a2b0; }

/* 프로세스 표 */
.proc-table { width: 100%; border-collapse: collapse; }
.proc-table th, .proc-table td { border: 1px solid #e6e9ee; padding: 7px 10px; text-align: left; font-size: 12px; vertical-align: top; }
.proc-table th { background: #f3f5f8; color: #444; }
.proc-rules { margin: 4px 0; padding-left: 18px; }
.proc-rules li { margin: 6px 0; font-size: 13px; }

/* 로그인 */
body.login-page { min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #243b55 0%, #3a5a82 45%, #4a90d9 100%); padding: 20px; }
.login-wrap { width: 372px; max-width: 92vw; margin: 0; background: #fff; border: none; border-radius: var(--radius-lg);
    padding: 36px 32px 30px; box-shadow: 0 24px 60px rgba(15,25,50,.42); transform: scale(1.3); transform-origin: center; }
.login-brand { text-align: center; margin-bottom: 20px; }
.login-logo { width: 54px; height: 54px; margin: 0 auto 14px; filter: drop-shadow(0 8px 16px rgba(47,111,208,.42)); }
.login-wrap h1 { font-size: 23px; text-align: center; margin: 0; color: #1b2c49; letter-spacing: -.3px; font-weight: 800; }
.login-wrap h1 .accent { color: #4a90d9; }
.login-wrap p.sub { text-align: center; color: #97a3b0; margin: 7px 0 0; font-size: 12px; }
.login-wrap label { display: block; margin: 14px 0 5px; color: #5a6b7b; font-size: 12px; font-weight: 600; }
.login-wrap input { width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid #d7dee7; border-radius: var(--radius-sm);
    font-size: 14px; transition: border-color .15s ease, box-shadow .15s ease; }
.login-wrap input:focus { outline: none; border-color: #4a90d9; box-shadow: 0 0 0 3px rgba(74,144,217,.18); }
.login-wrap button { width: 100%; margin-top: 20px; padding: 12px; font-size: 15px; font-weight: 700; color: #fff;
    border: none; border-radius: var(--radius-sm); cursor: pointer; background: linear-gradient(135deg, #4a90d9, #3a78bf);
    box-shadow: 0 6px 16px rgba(74,144,217,.4); transition: filter .15s ease, transform .05s ease; }
.login-wrap button:hover { filter: brightness(1.06); }
.login-wrap button:active { transform: translateY(1px); }

/* 비밀번호 표시/숨김 토글 (눈 아이콘) */
.pw-field { position: relative; display: block; }
.pw-field input { width: 100%; box-sizing: border-box; padding-right: 44px; }
/* .login-wrap button 등 상위 버튼 스타일을 확실히 덮도록 특이도를 높이고 박스 속성 초기화 */
.pw-field .pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    margin: 0; padding: 0; border: none; background: none; box-shadow: none; cursor: pointer;
    color: #9aa7b4; border-radius: 6px; filter: none; }
.pw-field .pw-toggle:hover { color: #4a90d9; background: rgba(74,144,217,.08); filter: none; }
.pw-field .pw-toggle:active { transform: translateY(-50%); }
.pw-field .pw-toggle svg { display: block; }
/* 숨김(기본)=슬래시 눈, 표시(on)=뜬 눈 */
.pw-field .pw-toggle .ic-eye { display: none; }
.pw-field .pw-toggle.on .ic-eye-off { display: none; }
.pw-field .pw-toggle.on .ic-eye { display: block; }

/* 관리자/통계 폼 */
.page { max-width: 980px; margin: 16px auto; padding: 0 16px; }
.page.wide { max-width: 1400px; }
.card { background: #fff; border: 1px solid #e8ecf1; border-radius: var(--radius-lg); padding: 13px 16px; margin-bottom: 13px; box-shadow: var(--shadow-card); }
.card h2 { margin-top: 0; font-size: 15px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #eef1f5; }
.form-grid { display: grid; grid-template-columns: 160px 1fr; gap: 10px 12px; align-items: center; }
.form-grid input[type=text], .form-grid input[type=password], .form-grid select { width: 100%; padding: 7px 9px; border: 1px solid #ccc; border-radius: var(--radius-sm); }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.chart-wrap { position: relative; height: 248px; }
.chart-wrap.sm { height: 226px; }
.chart-toggle { float: right; font-size: 11.5px; font-weight: 600; color: #4a90d9; background: #eef4fc; border: 1px solid #cfe0f5; border-radius: 6px; padding: 3px 9px; cursor: pointer; }
/* 카드 접기/펼치기 토글(제목 클릭) */
.card-fold { background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; font-weight: 700; }
.card-fold .cc-caret { display: inline-block; width: 15px; color: #4a90d9; }
.chart-toggle:hover { background: #dceaf9; }
/* 통계 KPI 요약 — 여백·그림자로 시인성 강화 */
.kpi { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.kpi .box { flex: 1; min-width: 84px; background: #fff; border: 1px solid #e8ecf1; border-radius: 8px; padding: 8px 8px 7px; text-align: center; box-shadow: 0 1px 3px rgba(20,40,80,.05); transition: box-shadow .15s ease, transform .15s ease; }
.kpi .box:hover { box-shadow: 0 6px 18px rgba(20,40,80,.1); transform: translateY(-2px); }
.kpi .box .n { font-size: 30px; font-weight: 800; color: #2b3a55; line-height: 1.05; letter-spacing: -.5px; margin-bottom: 6px; }
.kpi .box .l { color: #8a93a3; font-size: 11.5px; margin-top: 0; font-weight: 700; }
/* 사용자별 진행 현황 표 */
.ustat th, .ustat td { text-align: center; padding: 6px 8px; }
.ustat th:first-child, .ustat td.uname { text-align: left; }
.ustat td.uname { font-weight: 600; color: #1f2d3d; }
.ubar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #eef0f3; }
.ubar span { display: block; height: 100%; }

/* 상태 KPI 강조 */
.kpi .box.st-req { border-top: 3px solid var(--st-requested); }
.kpi .box.st-req .n { color: var(--st-requested); }
.kpi .box.st-res { border-top: 3px solid var(--st-resolved); }
.kpi .box.st-res .n { color: var(--st-resolved); }
.kpi .box.st-conf { border-top: 3px solid var(--st-confirmed-soft); }
.kpi .box.st-conf .n { color: var(--st-confirmed-soft); }

/* 이미지 보기(확대) / 빨간펜 표시 모달 */
.desc img { cursor: zoom-in; }
.editor img, .cmt-editor img { cursor: default; }
.editor img:hover, .cmt-editor img:hover, .desc img:hover { outline: 2px solid rgba(74,144,217,.6); outline-offset: 1px; }
.img-modal { position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 2000; display: none; flex-direction: column; }
.img-modal.open { display: flex; }
.img-modal-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #1f2d3d; color: #fff; flex-wrap: wrap; }
.img-modal-title { font-weight: 600; font-size: 14px; margin-right: auto; }
.img-modal-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.img-modal-bar .btn { font-size: 12px; padding: 5px 12px; }
.img-modal-hint { color: #cfe3f7; font-size: 12px; margin-right: 4px; }
.tool-btn { font-size: 12px; padding: 5px 10px; border: 1px solid #5a6b7b; background: #2c3e50; color: #fff; border-radius: 4px; cursor: pointer; }
.tool-btn.active { background: #c0392b; border-color: #c0392b; font-weight: 700; }
.img-modal-notice { background: #33404d; color: #ffe9b0; font-size: 12px; padding: 5px 12px; border-top: 1px solid #2c3742; }
.img-modal-open { color: #cfe3f7; font-size: 12px; text-decoration: underline; cursor: pointer; }
.img-modal-close { background: transparent; border: none; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 6px; }
.img-modal-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 14px; }
.img-modal-stage img, .img-modal-stage canvas { max-width: 94vw; max-height: 82vh; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.img-modal-stage canvas { touch-action: none; cursor: crosshair; }

/* 로그인 이력 표 — User-Agent는 길어서 말줄임(+title 전체 표시) */
.audit-table td, .audit-table th { font-size: 11.5px; white-space: nowrap; }
.audit-table .ua-cell { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }

/* 관리자 대시보드 타일 */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.admin-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; background: #fff;
    border: 1px solid #e3e9f1; border-radius: 12px; text-decoration: none; color: inherit;
    box-shadow: 0 1px 4px rgba(20, 40, 80, .05); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.admin-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20, 40, 80, .12); border-color: #9cc0ea; }
.admin-ico { font-size: 30px; line-height: 1; }
.admin-tt { font-size: 16px; font-weight: 700; color: #1b2c49; }
.admin-desc { font-size: 12.5px; color: #8a93a3; line-height: 1.4; }
/* 헤더 '관리자' 진입 버튼 강조 */
.navlink.admin-link { background: rgba(255, 255, 255, .2); font-weight: 700; }
.navlink.admin-link:hover { background: rgba(255, 255, 255, .34); color: #fff; }

/* ===== 모바일 / 좁은 화면: 마스터-디테일을 세로로 적층(목록 위 · 상세 아래) ===== */
@media (max-width: 0px) {   /* 모바일 전용 화면 제거 — 모든 기기에서 데스크톱과 동일 레이아웃(비활성) */
    body { font-size: 14px; }

    /* 로그인: 모바일에선 1.3배 확대 해제(카드가 화면을 넘어 정렬이 깨지는 문제) */
    .login-wrap { transform: none; width: 340px; }

    /* 헤더: 줄바꿈 허용 */
    header { flex-wrap: wrap; gap: 8px 10px; padding: 9px 12px; }
    header h1, header h1.brand { font-size: 17px; gap: 8px; }
    .user-box { gap: 7px; flex-wrap: wrap; }
    .user-box .who { font-size: 12px; }
    .navlink { padding: 3px 7px; }

    /* 결함관리: 목록(위) + 상세(아래) 세로 적층, 스플리터 숨김 */
    .layout { grid-template-columns: 1fr; padding: 8px 10px; gap: 12px; }
    .splitter { display: none; }

    /* 목록 표 → 카드형(가로 스크롤 없이 화면 폭에 꽉 맞춤) */
    .layout > .panel:first-child colgroup,
    .layout > .panel:first-child thead { display: none; }
    .layout > .panel:first-child table,
    .layout > .panel:first-child tbody { display: block; width: 100%; }
    .layout > .panel:first-child tbody tr { display: block; }
    .layout > .panel:first-child tr.row {
        display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px;
        padding: 12px 14px; margin: 0 0 10px; border: 1px solid #e6ebf1;
        border-left: 4px solid #cbd5e1; border-radius: 10px; box-shadow: 0 1px 3px rgba(20,40,80,.06);
        cursor: pointer; -webkit-tap-highlight-color: rgba(74,144,217,.15);
    }
    .layout > .panel:first-child tr.row.sel { border-left-color: #4a90d9; background: #f3f8fe; }
    .layout > .panel:first-child tr.row:active { background: #eaf3fd; }
    .layout > .panel:first-child tr.row td {
        display: flex; align-items: baseline; gap: 6px; border: none; padding: 1px 0; font-size: 12.5px;
    }
    .layout > .panel:first-child tr.row td::before {
        content: attr(data-label); color: #8a93a3; font-weight: 700; font-size: 11px; white-space: nowrap;
    }
    /* 제목: 카드 맨 위, 전체 폭, 크게 */
    .layout > .panel:first-child td.title-cell {
        grid-column: 1 / -1; order: -1; font-size: 15px; font-weight: 700; line-height: 1.35;
        padding-bottom: 6px; border-bottom: 1px solid #eef2f6; margin-bottom: 2px; white-space: normal;
    }
    .layout > .panel:first-child td.title-cell::before { display: none; }
    .layout > .panel:first-child td.placeholder { display: block; grid-column: 1 / -1; text-align: center; }

    /* 모바일 카드: 핵심 정보만 — 결함ID·시스템·테스트명·No 숨김(상세에서 확인) */
    .layout > .panel:first-child tr.row td.no-col,
    .layout > .panel:first-child tr.row td[data-label="결함ID"],
    .layout > .panel:first-child tr.row td[data-label="시스템"],
    .layout > .panel:first-child tr.row td[data-label="테스트명"],
    .layout > .panel:first-child tr.row td[data-label="요청자"] { display: none !important; }

    /* 선택 카드 바로 아래에 펼쳐지는 상세(아코디언). 카드와 시각적으로 연결 */
    .layout > .panel:first-child tr.row.sel { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
    .layout > .panel:first-child .md-detail-row > td { display: block; padding: 0; border: none; }
    .layout > .panel:first-child .md-detail-row #detailPanel {
        margin: 0 0 12px; border: 1px solid #cfe0f3; border-top: none; border-left: 4px solid #4a90d9;
        border-radius: 0 0 10px 10px; box-shadow: 0 3px 10px rgba(20, 40, 80, .10);
    }

    /* 터치 최적화: 탭 타깃 키우기 */
    .pager .pg { padding: 10px 14px; font-size: 14px; }
    .btn, .btn.new, .btn.ok, .btn.sec, .btn.warn { min-height: 40px; }

    /* 필터 툴바: 각 필드가 한 줄 차지, 입력칸 넓게 */
    .toolbar { gap: 9px 12px; padding: 11px 12px; }
    .toolbar .field { width: 100%; }
    .toolbar .field > label { min-width: 58px; }
    .toolbar select, .toolbar input { flex: 1; min-width: 0; }
    .toolbar .field .range { flex: 1; }

    /* 통계: 카드·차트 1열 */
    .page, .page.wide { padding: 0 10px; }
    .chart-grid { grid-template-columns: 1fr; }
    .kpi .box { min-width: 64px; padding: 7px 6px; }
    .kpi .box .n { font-size: 17px; }

    /* 상세 내부 2열 그리드 → 1열 */
    .grid2 { grid-template-columns: 1fr; }
    .fields { grid-template-columns: auto 1fr; }
    .form-grid { grid-template-columns: 1fr; gap: 4px 0; }
}
