:root {
    --navy: #0a2647;
    --navy-dark: #061a33;
    --blueprint: #2f6fed;
    --bg: #f7f9fc;
    --border: #e3e8f0;
    --text: #151a22;
    --muted: #67717e;
    --grid-line: transparent;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    font-size: 16px;
}

a { color: var(--navy); text-decoration: none; }

.container { max-width: 1600px; margin: 0 auto; padding: 20px 16px 60px; }

h1, h2, h3 { letter-spacing: 0.2px; }
h1 { position: relative; padding-bottom: 10px; }
h1::after { content: ''; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; background: var(--blueprint); }

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--navy);
    color: #fff;
    padding: 15px 16px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 44, 94, 0.18);
}
.topbar .logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 36px; margin-right: auto; letter-spacing: 0.5px; }
.logo-mark { height: 40px; width: auto; background: transparent; }
.logo-badge {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
    background: var(--blueprint); color: #fff; font-size: 16px; font-weight: 900;
}
.topbar select { padding: 8px; border-radius: 4px; border: none; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar-right a {
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.15s;
}
.topbar-right a:hover { background: rgba(255, 255, 255, 0.25); }
.topbar-right span { opacity: 0.9; padding: 8px 4px; }
.topbar-user { display: flex; align-items: center; gap: 7px; }
.user-avatar {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
    background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 11px; font-weight: 800;
}

.muted { color: var(--muted); }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash-success { background: #e6f4ea; color: #1e7a34; }
.flash-error { background: #fdecea; color: #b3261e; }
.flash-info { background: #eef2f7; color: #374151; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 20px 0 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions-stacked { display: grid; grid-template-columns: max-content; gap: 8px; }
.actions-stacked .btn { text-align: center; }
.dashboard-actions-fixed { position: absolute; left: 10mm; z-index: 1; }
.dashboard-sidebar-panel {
    position: absolute; left: 0; top: 0; z-index: 0;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-right: none;
}
.dashboard-actions-fixed .btn { background: transparent; border-color: transparent; color: #b7c4d6; text-align: left; font-size: 17px; font-weight: 800; transform-origin: left center; transition: transform 0.15s, color 0.15s; padding-left: calc(18px - 5mm); padding-right: calc(18px - 5mm); }
.dashboard-actions-fixed .btn:hover { background: transparent; border-color: transparent; box-shadow: none; text-decoration: none; transform: scale(1.1); color: #fff; }
.dashboard-actions-fixed .btn-blue { color: #ffffff; }
/* 팀 아코디언 메뉴 */
.dash-team-btn { display: flex !important; justify-content: space-between; align-items: center; width: 100%; border-radius: 8px; }
.dash-team-btn.active { color: #ffffff !important; background: rgba(76, 141, 237, 0.18); box-shadow: inset 3px 0 0 var(--blueprint); }
.dash-team-btn.active .dash-team-arrow { display: inline-block; transform: rotate(180deg); }
.dash-team-arrow { transition: transform 0.2s; display: inline-block; font-size: 12px; margin-left: 4px; }
.dash-team-menu { display: none; flex-direction: column; padding-left: 8px; border-left: 2px solid rgba(255, 255, 255, 0.14); margin-left: 6px; }
.dash-team-menu.open { display: flex; }
.dash-sub-btn { font-size: 14px !important; font-weight: 600 !important; padding-left: 8px !important; white-space: nowrap !important; min-width: 160px; color: #94a3b8 !important; }
.dash-sub-btn:hover { color: #fff !important; }
@media (max-width: 700px) {
    .dash-team-menu { border-left: none; padding-left: 0; margin-left: 0; }
    .dash-sub-btn { font-size: 14px !important; font-weight: 400 !important; }
}
.dashboard-disk-info { position: absolute; left: 10mm; z-index: 1; font-size: 12px; color: #93a4bf; }
.dashboard-disk-info-label { font-weight: 600; margin-bottom: 2px; color: #fff; }
@media (max-width: 700px) {
    .dashboard-sidebar-panel { display: none; }
    .dashboard-disk-info { display: none; }
    .dashboard-actions-fixed { position: static; left: auto; z-index: auto; display: flex; flex-wrap: wrap; }
    .dashboard-actions-fixed .btn { background: #fff; border: 1px solid var(--border); color: var(--text); text-align: center; font-size: 15px; font-weight: 400; transform: none; }
    .dashboard-actions-fixed .btn:hover { background: #f3f8fd; border-color: var(--blueprint); box-shadow: 0 2px 6px rgba(0, 44, 94, 0.08); transform: none; color: var(--text); }
    .dashboard-actions-fixed .btn-blue { background: var(--blueprint); border-color: var(--blueprint); color: #fff; }
    .dashboard-actions-fixed .btn-blue:hover { background: var(--navy); border-color: var(--navy); }
    .dash-team-btn.active { box-shadow: none; }
    .dash-sub-btn { color: var(--text) !important; }
    .dash-sub-btn:hover { color: var(--text) !important; }
    #dashboard-main-content { margin-left: 0 !important; }
}

.btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: 15px;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { border-color: var(--blueprint); background: #f3f8fd; box-shadow: 0 2px 6px rgba(0, 44, 94, 0.08); }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 6px; background: #fff; border: 1px solid var(--border); color: var(--text); cursor: pointer; }
.btn-sm:hover { border-color: var(--blueprint); background: #f3f8fd; }
.btn-danger { background: #fdecea; color: #b3261e; border-color: #f5c2c0; }
.btn-blue { background: var(--blueprint); color: #fff; border-color: var(--blueprint); }
.btn-blue:hover { background: var(--navy); border-color: var(--navy); }

.status-counts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* 품질팀 대시보드(메인화면)도 공정 품질현황 페이지와 동일하게 화면을 넓게 사용 (그래프 자체 크기는 max-width로 고정되어 그대로 유지됨) */
main.container:has(.quality-dash-page) { max-width: calc(100vw - 60mm + 32px); }
/* 상단 카드(최근 불량등록/결재대기)와 그 아래 년도 필터 사이 간격이 붙어 보여서 여유를 둠 */
.quality-dash-page > .filter-bar { margin-top: 16px; }

/* 품질팀 대시보드 - "고객 품질 현황" + "차종별 등록현황" 그래프를 한 줄에 나란히 */
.quality-charts-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 16px; margin-top: 20px; }
.quality-charts-row > .quality-chart-card,
.quality-charts-row > .chart-cell { flex: 1 1 460px; max-width: 640px; }
/* "고객사 등록 귀책사 현황" 카드만 폭 상한 없이 우측 남은 공간을 채움 (높이는 같은 행 stretch로 좌측 차트와 자동 동일) */
.quality-charts-row > .resp-chart-cell { flex: 1 1 380px; max-width: none; }

/* "고객사 등록 귀책사 현황" 차트 - 공정 품질현황의 "불량률(PPM)·손실비" 이중축 콤보 차트와 동일 스타일(직접 라벨/크로스헤어 툴팁) */
.rc-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 2px 0 6px; flex-shrink: 0; }
.rc-legend-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text); }
.rc-legend-dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.rc-chart-svg { width: 100%; flex: 1; min-height: 208px; display: block; overflow: visible; }
.rc-grid-line { stroke: var(--border); stroke-width: 1; }
.rc-axis-label { fill: var(--muted); font-size: 9.5px; font-family: inherit; }
.rc-axis-label.rc-cat { text-anchor: middle; }
/* 가로축(월/차종/귀책사/원인) 라벨만 더 크고 진하게 - 세로축(수치) 라벨은 기존 크기·색상 유지 */
.rc-axis-label.rc-x { font-size: 12px; fill: #151a22; }
.rc-line-el { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rc-endpoint-dot { stroke: #fff; stroke-width: 1.5; }
.rc-crosshair-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; pointer-events: none; }
.rc-hover-dot { opacity: 0; pointer-events: none; }
.rc-hover-overlay { fill: transparent; cursor: pointer; }
.rc-chart-tooltip {
    position: fixed; pointer-events: none; z-index: 20; opacity: 0; transition: opacity .08s;
    background: var(--navy); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 11.5px;
    font-weight: 600; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.2); transform: translate(-50%, -100%);
}
.rc-chart-tooltip .rc-tt-name { color: #9db4d9; font-weight: 700; margin-right: 6px; }
.rc-chart-tooltip.show { opacity: 1; }
.rc-chart-tooltip.rc-below { transform: translate(-50%, 0); }

/* "공정 품질현황" 요약 3개 차트 (불량률·손실비 / 차종별 불량률 도넛 / 불량유형 파레토) - 공정 품질현황 모듈과 동일 레이아웃 비율(5:2.5:2.5) */
.pqd-chart-box { display: flex; gap: 14px; margin-top: 14px; height: 400px; }
.pqd-chart-card {
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; display: flex; flex-direction: column; min-width: 0;
    box-shadow: 0 1px 3px rgba(10,30,60,.05);
}
.pqd-chart-card.pqd-w-25 { flex: 2.5; }
.pqd-chart-card.pqd-w-50 { flex: 5; }
.pqd-chart-body { flex: 1; padding: 14px 16px 10px; display: flex; flex-direction: column; min-height: 0; }

/* 품질팀 대시보드 - 월별 발생 추이 그래프 */
.quality-chart-card {
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 44, 94, 0.05);
}
.quality-chart-title-bar {
    background: var(--navy); color: #fff; text-align: center;
    font-size: 15px; font-weight: 700; padding: 11px 16px;
}
.quality-chart-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.quality-chart-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.quality-chart-title-col { display: flex; flex-direction: column; gap: 6px; }
.quality-chart-title { font-size: 13px; color: var(--muted); font-weight: 600; }
.quality-chart-year-select { font-size: 13px; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--border); font-family: inherit; }
.quality-chart-year-row { display: flex; align-items: center; gap: 10px; }
.quality-chart-total { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.quality-chart-total strong { color: #c0392b; font-size: 14px; }
.quality-chart-toggle { display: flex; background: #eef2fb; border-radius: 999px; padding: 3px; gap: 2px; height: fit-content; }
.quality-chart-toggle button {
    border: none; background: transparent; padding: 7px 14px; border-radius: 999px;
    font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit;
    transition: background 0.15s, color 0.15s;
}
.quality-chart-toggle button.active { background: #c0392b; color: #fff; }
.quality-chart-canvas-wrap { flex: 1; min-height: 208px; position: relative; }

/* 품질팀 대시보드 - 차종별 등록현황 그래프 */
.chart-cell {
    background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 44, 94, 0.05); min-height: 289px; display: flex; flex-direction: column;
    flex: 1 1 460px; max-width: 640px;
}
.chart-title-bar { background: var(--navy); color: #fff; text-align: center; font-size: 15px; font-weight: 700; padding: 11px 16px; }
.chart-controls { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 0; gap: 10px; flex-wrap: wrap; }
.chart-year-select {
    font-size: 13px; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--border);
    font-family: inherit; background: #fff;
}
.mode-toggle { display: flex; background: #eef2fb; border-radius: 999px; padding: 3px; gap: 2px; }
.mode-toggle button {
    border: none; background: transparent; padding: 6px 13px; border-radius: 999px;
    font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; font-family: inherit;
    transition: background .15s, color .15s;
}
.mode-toggle button.active { background: var(--blueprint); color: #fff; }

.donut-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 4px 8px 8px; background: linear-gradient(180deg, #fbfcfe, #f4f6fa); }
.donut-svg-holder { position: relative; width: 100%; max-width: 480px; overflow: hidden; }
.donut-svg-holder svg { width: 100%; height: auto; display: block; overflow: hidden; }

/* explode 오프셋은 JS에서 path 좌표 자체에 미리 계산해 넣음(CSS transform 불필요), hover 확대만 transform으로 처리 */
.glow-seg-group { cursor: pointer; transition: transform .18s ease; transform-origin: 210px 136px; }
.glow-seg-group:hover { transform: scale(1.045); }
/* 조각 자체는 20% 불투명(80% 투명)하게 - 뒤쪽 중앙 파란 글로우가 비쳐 보이도록 */
.glow-wedge { filter: drop-shadow(0 8px 16px rgba(20, 40, 90, .16)); fill-opacity: 0.2; }

.side-leader-line { stroke: #c7cedb; stroke-width: 1; }
.leader-dot { stroke: #fff; stroke-width: 1.5; }
.side-label-top { font-size: 11.5px; font-weight: 800; font-family: "SF Mono", Consolas, monospace; }
.side-label-name { font-size: 11.5px; font-weight: 800; fill: var(--text); }

.donut-center-year { font-size: 12px; font-weight: 700; fill: #fff; }
.donut-center-total { font-size: 20px; font-weight: 900; fill: #c0392b; font-family: "SF Mono", Consolas, monospace; }
.donut-empty-note { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* 품질팀 메인 대시보드 - "고객사 차종별 등록현황" 도넛 텍스트만 2단계 확대(다른 도넛과 공유 클래스라 아이디로 범위 한정) */
#donut-holder .side-label-top, #donut-holder .side-label-name { font-size: 13.5px; }
#donut-holder .donut-center-year { font-size: 14px; }
#donut-holder .donut-center-total { font-size: 22px; }

/* "차종별 불량률"(공정 품질현황 요약) 도넛 텍스트만 1단계 축소 */
#pqd-donut-holder .side-label-top, #pqd-donut-holder .side-label-name { font-size: 10.5px; }
#pqd-donut-holder .donut-center-year { font-size: 11px; }
#pqd-donut-holder .donut-center-total { font-size: 19px; }

@keyframes glowSegEnter { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }
.glow-seg-enter { animation: glowSegEnter .3s ease-out; transform-origin: 210px 136px; }
.dashboard-kicker { font-size: 17px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: var(--blueprint); margin: 0 0 8px; }
.dashboard-kicker-inline { font-size: 21px; font-weight: 800; color: var(--blueprint); }
.dashboard-factory-section { margin: 16px 0; flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; gap: 6px; }
.dashboard-factory-section:first-of-type { margin-top: 8px; }
.dashboard-factory-section.dashboard-factory-current {
    background: linear-gradient(180deg, #e8eefc 0%, rgba(232, 238, 252, 0) 130%);
    border: 1px solid var(--border); border-radius: 16px; padding: 14px 14px 12px; margin: 8px 0 20px;
    flex-wrap: wrap !important; overflow-x: visible;
}
.dashboard-factory-section .status-count-card { flex-shrink: 0; padding: 7.3px 9.7px; min-width: 0; gap: 7px; white-space: nowrap; }
.dashboard-factory-section .status-count-card strong { font-size: 14px; }
.dashboard-factory-section .stat-icon { width: 24px; height: 24px; border-radius: 7px; }
.dashboard-factory-section .stat-icon svg { width: 13px; height: 13px; }
.dashboard-factory-section .stat-label { font-size: 9px; }
.dashboard-factory-label-col { width: 179px; flex-shrink: 0; display: flex; align-items: center; gap: 7.3px; overflow: hidden; }
.dashboard-factory-label { font-size: 16.5px; font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-factory-current-badge { flex-shrink: 0; font-size: 12px; font-weight: 700; color: #fff; background: var(--navy); padding: 2.4px 8.5px; border-radius: 999px; white-space: nowrap; }
.dashboard-factory-section.dashboard-factory-current .status-count-card { border-color: var(--border); box-shadow: 0 1px 2px rgba(10, 30, 60, .05), 0 10px 20px -16px rgba(10, 30, 60, .35); }
.status-count-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 44, 94, 0.06);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 120px;
    color: inherit;
    text-decoration: none;
}
.status-count-card strong { font-size: 20px; font-weight: 800; font-family: "SF Mono", "Consolas", monospace; }
a.status-count-card:hover { border-color: var(--blueprint); box-shadow: 0 4px 12px rgba(0, 44, 94, 0.12); }
.status-count-card-disabled { cursor: default; opacity: 0.8; }
.status-count-card .stat-icon {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    background: #e8eefc; color: var(--blueprint);
    display: flex; align-items: center; justify-content: center;
}
.status-count-card .stat-icon.is-warn { background: #fdecea; color: #b3261e; }
.status-count-card .stat-card-text { display: flex; flex-direction: column; gap: 2px; }
.status-count-card .stat-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); white-space: nowrap; }
.status-count-card .stat-value { font-variant-numeric: tabular-nums; }
.status-count-card .stat-value i { font-size: 12px; color: var(--muted); font-style: normal; margin-left: 3px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.badge-run { background: #e6f4ea; color: #1e7a34; }
.badge-stop { background: #eef0f3; color: #555; }
.badge-repair { background: #fff4e0; color: #a15c00; }
.badge-disposed { background: #f1e7f7; color: #6a3a8a; }
.badge-low { background: #fdecea; color: #b3261e; }
.badge-default, .badge-type { background: #e8edf5; color: var(--navy); }
.badge-danger { background: #c0392b; color: #fff; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.equip-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 44, 94, 0.06);
    overflow: hidden;
    display: block;
}
.equip-card-photo { aspect-ratio: 4/3; background: #eee; display: flex; align-items: center; justify-content: center; }
.equip-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.equip-card-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.no-photo { color: var(--muted); font-size: 14px; }

.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-bar-title { font-size: 15px; font-weight: 700; color: var(--navy); margin-right: 6px; }
.filter-bar input, .filter-bar select { padding: 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 15px; background: #fff; }
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--blueprint); box-shadow: 0 0 0 2px rgba(11,94,215,0.15); }
.total-maintenance-cost { margin-left: auto; font-weight: 600; }
.mttr-current-row { cursor: pointer; }
.mttr-current-row th, .mttr-current-row td { background: #eef4ff; }
.mttr-current-row:hover th, .mttr-current-row:hover td { background: #dbe8ff; }
.paste-photo-target:hover { outline: 2px dashed var(--blueprint); outline-offset: 1px; }
.container-sticky-head { position: sticky; top: 0; z-index: 60; background: var(--bg); padding: 10px 0; box-shadow: 0 2px 6px rgba(0, 44, 94, 0.08); }
.table-scroll.container-table-scroll { overflow: visible; max-height: none; }
.container-table-scroll .container-table { overflow: visible; border-radius: 0; }
.table-scroll.container-table-scroll thead th { position: sticky; top: var(--container-head-height, 0px); z-index: 55; }
@media (max-width: 1500px) {
    .table-scroll.container-table-scroll { overflow-x: auto; }
    .table-scroll.container-table-scroll thead th { position: static; }
}
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 27, 61, 0.55); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-box { background: #fff; border-radius: 10px; border-top: 3px solid var(--blueprint); padding: 20px; max-width: 480px; width: 100%; max-height: 80vh; overflow-y: auto; box-shadow: 0 8px 24px rgba(0, 44, 94, 0.18); }
.modal-box-lg { max-width: 720px; }
.modal-box label { display: block; margin-bottom: 12px; font-size: 14px; }
.modal-box label input { width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; }
.insp-content-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.insp-content-toolbar input[type="color"] { width: 40px; height: 32px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.insp-content-editable {
    min-height: 120px; padding: 10px; border: 1px solid var(--border); border-radius: 8px;
    margin-bottom: 12px; white-space: pre-wrap; word-break: break-all; outline: none; font-size: 14px;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.spec-note-box { height: 7.5em; line-height: 1.5; overflow-y: auto; }
.history-title-row { display: flex; align-items: center; flex-wrap: wrap; }
.history-title-row h1 { font-size: 2.2em; }
.inspection-link-row-inline { display: flex; gap: 10px; margin-left: 2cm; margin-right: 2cm; }
.inspection-link-sm { padding: 12px 26px; font-size: 17px; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; min-width: 240px; text-align: center; box-sizing: border-box; }
.inspection-link-sm:hover { background: var(--navy-dark); }
@media (max-width: 700px) {
    .history-title-row { flex-direction: column; align-items: flex-start; width: 100%; }
    .inspection-link-row-inline { margin-left: 0; margin-right: 0; width: 100%; margin-top: 10px; }
    .inspection-link-row-inline .inspection-link-sm { flex: 1; min-width: 0; padding: 12px 10px; font-size: 15px; text-align: center; }
}

.ledger-columns { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.ledger-column { flex: 1; min-width: 380px; }
.ledger-column .table-scroll { max-height: 480px; }
.ledger-inline-form { max-width: 100%; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 16px; }
.ledger-inline-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; flex: 1; min-width: 110px; }

.table-scroll { overflow-x: auto; overflow-y: auto; max-height: 720px; }
.table-scroll table { border-collapse: separate; border-spacing: 0; }
.table-scroll thead th { position: sticky; top: 0; background: #f3f5f8; z-index: 1; box-shadow: inset 0 -1px 0 var(--border); }
.equip-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0, 44, 94, 0.05); }
.equip-table th { background: #f3f5f8; color: var(--navy); font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; }
.equip-table th, .equip-table td { padding: 12px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); text-align: left; white-space: nowrap; }
.equip-table th:last-child, .equip-table td:last-child { border-right: none; }
.equip-table tr[onclick] { cursor: pointer; }
.equip-table tr[onclick]:hover { background: #f3f5f8; }
.log-desc-cell { width: 30em; font-size: 0.8em; white-space: normal; word-break: break-all; }
.dc-status-row-link { cursor: pointer; }
.dc-status-row-link:hover { background: #f0f3f8; }
.dc-status-row-danger, .dc-status-row-danger td { color: #c0392b; }
.dc-status-print-check, .dc-pstatus-print-check, .pc-status-print-check, .ri-status-print-check, .jig-print-check {
    width: 20px; height: 20px; cursor: pointer;
}
#dc-status-check-all-btn { margin-left: 10mm; padding: 4px 8px; font-size: 12px; }
#dc-pstatus-check-all-btn { margin-left: 10mm; padding: 4px 8px; font-size: 12px; }
#pc-status-check-all-btn { margin-left: 10mm; padding: 4px 8px; font-size: 12px; }
.pc-remarks-cell { min-width: 120px; white-space: normal; }
#jig-check-all-btn { margin-left: 10mm; padding: 4px 8px; font-size: 12px; }
#ri-status-check-all-btn { margin-left: 10mm; padding: 4px 8px; font-size: 12px; }

.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pagination a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: inherit; }
.pagination a.page-current { background: var(--primary, #2563eb); color: #fff; border-color: transparent; }

@media (max-width: 900px) {
    .equip-table .hide-mobile { display: none; }
}

.equip-detail-grid { display: grid; grid-template-columns: 560px 1fr; gap: 20px; margin-bottom: 24px; }
.equip-detail-side { display: flex; flex-direction: column; gap: 14px; }
.equip-side-table { display: flex; flex-direction: column; flex: 1; width: 100%; border-radius: 0 !important; overflow: hidden; }
.equip-side-table tbody { display: contents; }
.equip-side-table tr { display: flex; }
.equip-side-table th { flex-shrink: 0; }
.equip-side-table td { flex: 1; min-width: 0; }
.equip-side-table tr.row-grow { flex: 1; }
.equip-side-table tr.spec-note-row { flex: 1; }
.equip-side-table tr.spec-note-row td { display: flex; align-items: center; }
.equip-side-table tr.spec-note-row .spec-note-box { height: auto; overflow-y: visible; margin: 0; }
.equip-side-table td.status-grade-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.grade-btn { padding: 6px 14px; font-size: 14px; font-weight: 700; }
.history-card-badge { background: transparent; padding: 0; font-size: inherit; font-weight: inherit; color: inherit; }
.grade-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.grade-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grade-btn-sm { display: inline-block; padding: 4px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
#move-target-row { gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.equip-photo { aspect-ratio: 4/3; background: #eee; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.equip-photo img { width: 100%; height: 100%; object-fit: cover; }
.equip-info-table { width: 100%; background: #fff; border-radius: 10px; border: 1px solid #c8cdd4; border-collapse: collapse; }
.equip-info-table th, .equip-info-table td { padding: 5px 10px; text-align: left; border-bottom: 1px solid #c8cdd4; font-size: 13px; line-height: 1.4; }
.equip-info-table th { width: 110px; color: var(--muted); font-weight: 600; background: #f4f6f8; border-right: 1px solid #c8cdd4; white-space: nowrap; }
.equip-info-main { table-layout: fixed; width: auto; }
/* 이력카드 섹션 헤더 */
.equip-spec-section-head th { background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; padding: 7px 14px; letter-spacing: 0.5px; }
/* 인라인 편집 셀 */
.equip-spec-edit { white-space: pre-wrap; min-height: 22px; cursor: text; outline: none; vertical-align: top; }
.equip-spec-edit:hover { background: #f5f7ff; }
.equip-spec-edit:focus { background: #fffbee; box-shadow: inset 0 0 0 2px #f0c040; }
.equip-spec-multiline { min-height: 44px; }
.equip-spec-uph { color: var(--muted); font-style: italic; }
/* 등록/수정 폼 섹션 헤더 */
.equip-spec-form-head { font-weight: 700; color: var(--navy); font-size: 12px; padding: 6px 0 3px; border-bottom: 2px solid var(--navy); margin-top: 4px; grid-column: 1 / -1; }
/* A/S 연락처 콤보박스 */
.as-contact-wrap { position: relative; }
.as-contact-wrap input { width: 100%; }
.as-contact-dropdown { position: absolute; z-index: 200; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.12); max-height: 220px; overflow-y: auto; display: none; margin-top: 2px; }
.as-contact-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; cursor: pointer; gap: 12px; outline: none; }
.as-contact-item:hover, .as-contact-item:focus { background: var(--navy-light, #eef2fb); }
.as-contact-name { font-weight: 600; font-size: 13px; }
.as-contact-meta { display: flex; gap: 8px; align-items: center; }
.as-contact-person { font-size: 12px; color: var(--muted); white-space: nowrap; }
.as-contact-phone { font-size: 12px; color: var(--muted); white-space: nowrap; }

.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.timeline-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.link-edit { font-size: 14px; }
.link-delete { font-size: 14px; color: #b3261e; background: none; border: none; cursor: pointer; padding: 0; }
.inline-form { display: inline; }
.log-photos { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.log-photos img { width: 90px; height: 90px; object-fit: cover; border-radius: 6px; }
.photo-thumb { cursor: pointer; border: 2px solid transparent; }
.photo-thumb:hover { border-color: var(--navy); }
.equip-form-photo-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.equip-form-photo-item img { border: 1px solid var(--border); }
.equip-form-photo-item span { font-size: 12px; color: #b3261e; display: flex; align-items: center; gap: 4px; cursor: pointer; }

.equip-form { display: flex; flex-direction: column; gap: 14px; max-width: 480px; background: #fff; padding: 20px; border-radius: 10px; border: 1px solid var(--border); }
.equip-form.form-3col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; max-width: 1300px; }
.equip-form.form-3col .full-width { grid-column: 1 / -1; }
.equip-form.form-3col label { min-width: 0; }
.equip-form.form-3col label .muted, .equip-form.form-3col label a { overflow-wrap: break-word; word-break: break-word; }
@media (max-width: 900px) {
    .equip-form.form-3col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .equip-form.form-3col { grid-template-columns: minmax(0, 1fr); }
}
.equip-form.form-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; max-width: 1000px; }
.equip-form.form-2col .full-width { grid-column: 1 / -1; }
.equip-form.form-2col label { min-width: 0; }
@media (max-width: 600px) {
    .equip-form.form-2col { grid-template-columns: minmax(0, 1fr); }
}
.equip-form.spares-form { max-width: 100%; }
#spares-rows { display: flex; flex-direction: column; gap: 10px; }
.spares-form-row { display: flex; gap: 8px; flex-wrap: nowrap; align-items: flex-end; overflow-x: auto; padding-bottom: 4px; }
.spares-form-row label { flex: 1; min-width: 90px; font-size: 12px; gap: 4px; }
.equip-form.spares-form .spares-form-row input { padding: 0 8px; font-size: 13px; height: 34px; box-sizing: border-box; }
.equip-form.spares-form .spares-form-row select { padding: 0 6px; font-size: 13px; height: 34px; box-sizing: border-box; width: 100%; }
.spares-form-row .sp-field-with-manage { display: flex; gap: 4px; align-items: center; }
.spares-form-row .sp-field-with-manage select { flex: 1; min-width: 0; }
.spares-form-row .sp-option-manage { flex: 0 0 auto; font-size: 12px; white-space: nowrap; }
.spares-form-row .sp-name-field { display: flex; flex-direction: column; gap: 4px; }
.spares-form-row .sp-name-field select { height: 26px; font-size: 12px; }
.spares-form-row .spares-form-note { flex: 2; min-width: 160px; }
.equip-form.spares-form .spares-form-row .spares-form-note textarea { padding: 7px 8px; font-size: 13px; line-height: 1.3; resize: vertical; height: 34px; box-sizing: border-box; }
.spares-form-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.spares-form-actions .btn { padding: 7px 14px; font-size: 13px; }
.equip-form.spares-form .spares-row-remove { flex: 0 0 auto; align-self: flex-end; width: 24px; height: 24px; padding: 0; margin-bottom: 1px; border: 1px solid var(--border); border-radius: 4px; background: #fff; color: #b3261e; cursor: pointer; font-size: 12px; line-height: 1; }
.equip-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.equip-form input, .equip-form select, .equip-form textarea {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-weight: normal;
}
.equip-form label.checkbox, .auth-box label.checkbox { flex-direction: row; align-items: center; }
.equip-form.log-form-split { display: flex; flex-direction: row; align-items: flex-start; gap: 24px; max-width: 1300px; }
.log-form-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; background: #fff; padding: 20px; border-radius: 10px; border: 1px solid var(--border); }
.log-form-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.field-row-2 { display: flex; gap: 24px; }
.field-row-2 label { flex: 1; min-width: 0; }
@media (max-width: 900px) {
    .equip-form.log-form-split { flex-direction: column; }
}
@media (max-width: 600px) {
    .field-row-2 { flex-direction: column; gap: 14px; }
}
.parts-box { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 12px; min-width: 0; }
#parts-rows { display: flex; flex-direction: column; gap: 8px; }
.parts-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.parts-row select { flex: 1; min-width: 0; width: 0; }
.parts-row input[type=number] { width: 90px; flex-shrink: 0; }
.parts-row input[type=text] { width: 120px; flex-shrink: 0; }
@media (max-width: 600px) {
    .parts-row { flex-wrap: wrap; }
    .parts-row select { flex: 1 1 100%; width: 100%; }
    .parts-row input[type=number] { flex: 1 1 auto; }
    .parts-row input[type=text] { flex: 1 1 auto; }
}
.text-center { text-align: center; }
.text-right { text-align: right; }
.select-info-row { display: flex; gap: 6px; align-items: center; }
.select-info-row select { flex: 1; min-width: 0; }
.info-icon { flex-shrink: 0; border: none; background: none; cursor: pointer; font-size: 16px; color: var(--primary, #2563eb); padding: 0 4px; }
.info-box { margin-top: 6px; padding: 8px 10px; background: #f5f7fa; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.info-box p { margin: 2px 0; }
.mttr-target-form { display: inline-flex; gap: 8px; align-items: center; }
.mttr-target-form input { width: 100px; padding: 6px 10px; }
.history-scroll { max-height: 260px; overflow-y: auto; }
.history-scroll table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: visible; }
.history-scroll thead th { position: sticky; top: 0; background: #fff; z-index: 1; box-shadow: inset 0 -1px 0 var(--border); }
.team-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.team-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; min-width: 0; }
.team-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.team-card-head h2 { margin: 0; font-size: 16px; }
.team-card-scroll { max-height: 370px; overflow-y: auto; overflow-x: auto; }
.team-card-scroll table { width: 100%; border-collapse: separate; border-spacing: 0; }
.team-card-scroll thead th { position: sticky; top: 0; background: #fff; z-index: 1; box-shadow: inset 0 -1px 0 var(--border); }
@media (max-width: 700px) {
    .team-card-grid { grid-template-columns: 1fr; }
}
.changepoint-scroll { max-height: 820px; overflow-y: auto; overflow-x: auto; margin-top: 8px; }
.changepoint-scroll table { width: 100%; border-collapse: separate; border-spacing: 0; }
.changepoint-scroll thead th { position: sticky; top: 0; background: #fff; z-index: 1; box-shadow: inset 0 -1px 0 var(--border); white-space: nowrap; }
.cp-filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 4px; }
.cp-search-wrap { display: flex; gap: 6px; align-items: center; }
.cp-search-input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; width: 200px; }
.cp-search-nav { padding: 6px 10px; font-size: 12px; }
.cp-search-count { font-size: 12px; color: var(--muted); min-width: 50px; }
.cp-meta-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0; }
.cp-meta-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.cp-meta-row input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; }
.cp-tag-row { display: flex; gap: 8px; align-items: center; }
.cp-tag-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cp-tag { display: inline-flex; align-items: center; gap: 6px; background: #eef4ff; border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.cp-tag button { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; }
.cp-option-manage { font-size: 12px; margin-left: 6px; }
.cp-option-manage-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
#other-rows { display: flex; flex-direction: column; gap: 8px; }
.other-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.other-row-header span { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.other-row-header span:nth-child(2) { flex: 0 0 110px; }
.other-row-header span:nth-child(3), .other-row-header span:nth-child(4) { flex: 0 0 90px; }
.other-row-header span:last-child { flex: 0 0 44px; }
.other-row input[type=text] { flex: 1; min-width: 0; }
.other-row select { flex: 0 0 110px; min-width: 0; }
.other-row input[type=number] { width: 90px; flex-shrink: 0; }
@media (max-width: 600px) {
    .other-row { flex-wrap: wrap; }
    .other-row input[type=text] { flex: 1 1 100%; }
    .other-row select { flex: 1 1 100%; }
    .other-row input[type=number] { flex: 1 1 auto; }
    .other-row-header { display: none; }
    #other-rows { grid-template-columns: minmax(0, 1fr); }
}
.photo-box-section-label { font-weight: 600; font-size: 14px; }
.photo-box-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.photo-box { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 8px; min-width: 0; }
.photo-box-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.photo-box .photo-box-label-input { font-size: 13px; padding: 6px 8px; }
.photo-box-slot {
    position: relative; aspect-ratio: 4/3; background: #f5f7fa;
    border: 1px dashed var(--border); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; overflow: hidden;
}
.photo-box-slot.has-photo { cursor: default; border-style: solid; }
.photo-box-preview { width: 100%; height: 100%; object-fit: cover; }
.insp-photo-main .photo-box-preview { object-fit: contain; background: #f5f7fa; }
.photo-box-plus { font-size: 28px; color: var(--muted); }
.photo-box-remove {
    position: absolute; top: 4px; right: 4px;
    width: 22px; height: 22px; border-radius: 50%;
    border: none; background: #e11d48; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; cursor: pointer; padding: 0;
}
.photo-box-file { display: none; }
.photo-box .photo-box-note { font-size: 13px; padding: 6px 8px; }
@media (max-width: 500px) {
    .photo-box-grid { grid-template-columns: minmax(0, 1fr); }
}
.insp-header { display: grid; grid-template-columns: 1fr 1fr 2fr 1.5fr; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.insp-factory { display: flex; flex-direction: column; gap: 2px; }
.insp-page-indicator { text-align: center; font-weight: 600; }
.insp-title { text-align: center; font-weight: 700; font-size: 20px; }
.insp-mgmt-no { font-size: 13px; color: var(--muted); margin-top: 2px; }
.insp-signoff { display: flex; gap: 6px; }
.insp-signoff-box { flex: 1 1 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.insp-signoff-label { font-size: 12px; font-weight: 600; text-align: center; }
.insp-signoff-box select { width: 100%; font-size: 12px; }
.insp-signoff-value { text-align: center; font-size: 13px; }
.insp-signoff-date { text-align: center; font-size: 11px; color: var(--muted); }
@media (max-width: 800px) {
    .insp-header { grid-template-columns: 1fr; }
}
.insp-page-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.insp-photo-grid { display: grid; grid-template-columns: 600px auto; gap: 12px; margin-bottom: 12px; align-items: start; }
.insp-photo-box { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 8px; min-width: 0; }
.insp-photo-main { grid-column: 1; }
.insp-photo-main .photo-box-slot { aspect-ratio: unset; width: 100%; height: 400px; }
.insp-photo-right-col { grid-column: 2; display: flex; flex-direction: column; gap: 12px; }
.insp-photo-sub-section { display: grid; grid-template-columns: repeat(3, 210px); gap: 12px; align-content: start; }
.insp-photo-sub-section .photo-box-slot { aspect-ratio: unset; width: 100%; height: 158px; }
.insp-photo-extras-section { display: grid; grid-template-columns: repeat(3, 210px); gap: 12px; align-content: start; }
.insp-photo-extras-section .photo-box-slot { aspect-ratio: unset; width: 100%; height: 158px; }
.insp-photo-label-input { font-size: 13px; padding: 6px 8px; text-align: center; }
.insp-photo-label { font-size: 13px; font-weight: 600; text-align: center; color: var(--muted); }
.insp-content-preview { font-size: 13px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; min-height: 36px; cursor: pointer; white-space: pre-wrap; word-break: break-all; }
.insp-photo-hidden { display: none !important; }
.insp-action-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.insp-action-row form.inline-form { margin: 0; }
.insp-marker-colors { display: flex; gap: 6px; align-items: center; }
.insp-marker-color-swatch {
    width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent;
    padding: 0; cursor: pointer;
}
.insp-marker-color-swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px var(--swatch-color, #1a1a2e); }
.insp-marker-layer { position: absolute; inset: 0; pointer-events: none; }
.insp-marker-layer.armed { pointer-events: auto; }
.insp-marker {
    position: absolute; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transform: translate(-50%, -50%); box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
    pointer-events: auto;
}
.insp-marker[data-color="gold"] .insp-marker-number { color: #1a1a2e; }
.insp-marker-number { color: #fff; font-size: 11px; font-weight: 700; line-height: 1; max-width: 100%; padding: 0 1px; cursor: pointer; white-space: nowrap; overflow: hidden; }
.insp-marker-remove {
    position: absolute; top: -6px; right: -6px;
    width: 14px; height: 14px; border-radius: 50%;
    border: none; background: #e11d48; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; line-height: 1; cursor: pointer; padding: 0;
}
.insp-box-colors { display: flex; gap: 6px; align-items: center; }
.insp-box-color-swatch {
    width: 26px; height: 26px; border-radius: 4px; background: transparent;
    border: 2px dashed #ccc; padding: 0; cursor: pointer;
}
.insp-box-color-swatch.selected { border-style: solid; border-color: var(--swatch-color, #1a1a2e); box-shadow: 0 0 0 2px #fff inset; }
.insp-box-marker {
    position: absolute; background: transparent; box-sizing: border-box;
    border-width: 4px; border-style: dashed; pointer-events: auto;
}
.insp-box-resize-handle {
    position: absolute; right: -5px; bottom: -5px;
    width: 12px; height: 12px; border-radius: 2px;
    background: #fff; border: 1px solid #888; cursor: nwse-resize;
}
.insp-box-remove {
    position: absolute; top: -6px; right: -6px;
    width: 14px; height: 14px; border-radius: 50%;
    border: none; background: #e11d48; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; line-height: 1; cursor: pointer; padding: 0;
}
.insp-rev-scroll { max-height: 150px; overflow-y: auto; overflow-x: auto; max-width: 100%; }
.insp-rev-scroll table { width: 100%; min-width: 600px; border-collapse: separate; border-spacing: 0; }
.insp-rev-scroll thead th { position: sticky; top: 0; background: #fff; z-index: 1; box-shadow: inset 0 -1px 0 var(--border); }
@media (max-width: 900px) {
    .insp-photo-grid { grid-template-columns: 1fr; }
    .insp-photo-main { grid-column: 1; }
    .insp-photo-main .photo-box-slot { width: 100%; height: 280px; }
    .insp-photo-right-col { grid-column: 1; }
    .insp-photo-sub-section { grid-template-columns: repeat(2, 1fr); }
    .insp-photo-sub-section .photo-box-slot { width: 100%; height: 120px; }
    .insp-photo-extras-section { grid-template-columns: repeat(2, 1fr); }
    .insp-photo-extras-section .photo-box-slot { width: 100%; height: 120px; }
}
.insp-check-date { text-align: center; font-weight: 600; }
.insp-check-table-scroll { overflow-x: auto; margin-bottom: 12px; }
.insp-check-table-scroll-wide { width: 100%; }
.insp-check-table { border-collapse: collapse; width: max-content; font-size: 12px; }
.insp-check-table-wide { width: 100%; }
.insp-check-table th, .insp-check-table td { border: 1px solid var(--border); padding: 4px 6px; text-align: center; white-space: nowrap; }
.insp-check-table thead th { background: #f5f7fa; position: sticky; top: 0; }
.insp-check-table tbody td:nth-child(-n+7) { position: sticky; z-index: 2; background: #fff; }
.insp-check-table thead th:nth-child(-n+7) { position: sticky; z-index: 3; background: #f5f7fa; }
.insp-check-table select {
    font-size: 11px; max-width: 110px;
    -webkit-appearance: none; appearance: none; background-image: none;
}
.insp-check-table th.dc-col-check-method, .insp-check-table td.dc-col-check-method {
    width: 220px; min-width: 220px; max-width: 220px; white-space: normal; word-break: break-word;
}
.insp-check-table td.dc-col-check-method select { max-width: 100%; width: 100%; white-space: normal; }
.dc-method-custom-wrap { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.dc-method-box { position: relative; width: 100%; }
.dc-method-preview { width: 100%; min-height: 24px; font-size: 11px; padding-right: 18px; box-sizing: border-box; }
.dc-method-revert-x {
    position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px; line-height: 14px;
    padding: 0; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: #999;
    font-size: 12px; cursor: pointer;
}
.dc-method-revert-x:hover { background: #f5f7fa; color: #c0392b; }
.insp-check-day-off { color: #c0392b !important; }
td.insp-check-day-off { background: #fde8e8; color: var(--text) !important; }
.insp-check-day-input { width: 42px; text-align: center; border: 1px solid var(--border); border-radius: 4px; font-size: 11px; padding: 2px; }
.insp-check-remarks { display: flex; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.insp-check-remarks-label { padding: 8px 12px; font-weight: 600; border-right: 1px solid var(--border); display: flex; align-items: center; flex: none; }
.insp-check-remarks-box { flex: 1; padding: 8px 12px; min-width: 0; }
.insp-check-remarks-notice { color: #c0392b; font-size: 12px; margin: 0 0 4px; font-weight: 600; }
.insp-check-remarks-text { min-height: 32px; cursor: pointer; white-space: pre-wrap; word-break: break-all; }
.insp-print-only { display: none; }
body.insp-print-photo-only .insp-check-print-page { display: none !important; }
body.insp-print-check-only .insp-print-page { display: none !important; }
.dc-option-delete-list { max-height: 300px; overflow-y: auto; margin: 10px 0; }
.dc-option-delete-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.dc-option-delete-row .btn { padding: 4px 10px; font-size: 12px; }
.mttr-chart-box { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.mttr-chart-scroll { overflow-x: auto; }
.mttr-chart-canvas { position: relative; height: 200px; }
.mttr-matrix { table-layout: fixed; }
.mttr-matrix th, .mttr-matrix td { text-align: center; white-space: nowrap; padding: 8px 10px; }
.mttr-matrix thead th:first-child, .mttr-matrix tbody th { text-align: left; background: #f5f7fa; position: sticky; left: 0; z-index: 1; }
.mttr-matrix th:last-child, .mttr-matrix td:last-child { background: #eef2f7; font-weight: 600; }
.auth-box label.checkbox input { padding: 0; width: auto; }
.equip-form button { padding: 14px; border-radius: 8px; border: none; background: var(--navy); color: #fff; font-size: 16px; cursor: pointer; }
.photo-preview-box { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photo-preview-item { position: relative; }
.photo-preview { display: block; max-width: 90px; max-height: 68px; border-radius: 8px; object-fit: cover; }
.photo-preview-remove {
    position: absolute; top: -5px; right: -5px;
    width: 11px; height: 11px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: none; background: #e11d48; color: #fff;
    font-size: 8px; line-height: 1;
    cursor: pointer; padding: 0;
}
.danger-form { margin-top: 12px; }
.danger-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; max-width: 280px; margin-bottom: 10px; }
.danger-form input { padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }

.auth-box { max-width: 360px; margin: 60px auto; background: #fff; padding: 28px; border-radius: 6px; border: 1px solid var(--border); border-top: 4px solid var(--blueprint); box-shadow: 0 4px 24px rgba(29,78,137,0.10); text-align: center; }
.auth-box-logo { display: block; margin: 0 auto 16px; height: 64px; width: auto; }
.auth-box form { text-align: left; }
.auth-box form { display: flex; flex-direction: column; gap: 14px; }
.auth-box label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.auth-box input { padding: 14px; border: 1px solid var(--border); border-radius: 4px; font-size: 16px; }
.auth-box input:focus { outline: none; border-color: var(--blueprint); box-shadow: 0 0 0 2px rgba(11,94,215,0.15); }
.auth-box button { padding: 14px; border-radius: 4px; border: none; background: var(--navy); color: #fff; font-size: 16px; font-weight: 600; letter-spacing: 0.3px; cursor: pointer; }
.auth-box button:hover { background: var(--navy-dark); }

#qr-reader { max-width: 480px; margin: 0 auto; }

.picker-title { text-align: center; margin: 30px 0; }
.factory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 16px;
    min-height: 60vh;
}
.factory-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 16px;
    border-radius: 14px;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.factory-tile-name { font-size: 28px; font-weight: 700; }
.factory-tile-code { font-size: 14px; font-weight: 500; opacity: 0.75; }
.factory-tile:hover { background: var(--navy-dark); }
.factory-tile-wrap { position: relative; }
.factory-tile-wrap .factory-tile { width: 100%; height: 100%; }
.factory-tile-edit {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    text-decoration: none;
}
.factory-tile-edit:hover { background: rgba(255, 255, 255, 0.4); }
.factory-tile-empty {
    background: #fff;
    color: var(--muted);
    border: 2px dashed var(--border);
    font-weight: 600;
    font-size: 16px;
}
.picker-footer { text-align: center; margin-top: 20px; }

@media (max-width: 700px) {
    .factory-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(6, 1fr); min-height: 80vh; }
}

.qr-label { display: flex; align-items: center; gap: 20px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 24px; max-width: 420px; }
.qr-image { width: 160px; height: 160px; }
.qr-label-text { display: flex; flex-direction: column; gap: 6px; font-size: 18px; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.qr-grid .qr-label { max-width: none; padding: 16px; }
.qr-grid .qr-image { width: 110px; height: 110px; }
.qr-grid .qr-label-text { font-size: 15px; }

@media print {
    .topbar, .section-head .btn, .flash, .dashboard-sidebar-panel, .dashboard-actions-fixed { display: none; }
    .container { padding: 0 !important; margin: 0 !important; max-width: none !important; }
    #page-content-shift { margin-left: 0 !important; }
    html, body { height: auto !important; }
    @page { size: 297mm 210mm; margin: 10mm; }
    @page jig-page { size: 210mm 297mm; margin: 10mm; }
    .dc-print-batch-page:not(:last-child) { page-break-after: always; }
    .insp-no-print,
    .photo-box-remove, .photo-box-file, .photo-box-plus,
    .insp-marker-remove, .insp-box-remove, .insp-box-resize-handle {
        display: none !important;
    }
    .insp-marker {
        -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    .insp-print-page { display: flex !important; flex-direction: column !important; height: 190mm !important; position: relative !important; }
    .insp-print-page form#insp-page-form { flex: 1 !important; display: flex !important; flex-direction: column !important; min-height: 0 !important; }
    .insp-header {
        grid-template-columns: 1fr 2fr 1.5fr !important; padding: 0 !important; margin-bottom: 6px !important;
        flex: none !important; border: none !important; align-items: stretch !important;
    }
    .insp-factory, .insp-title, .insp-signoff, .insp-check-date {
        border: 1px solid #000 !important; border-radius: 8px !important; padding: 4px 6px !important;
        display: flex !important; flex-direction: column !important; justify-content: center !important;
        background: #f0f0f0 !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
    }
    .insp-check-print-page .insp-header { grid-template-columns: 1fr 2fr 1fr 1.5fr !important; }
    .insp-signoff { flex-direction: row !important; padding: 0 !important; overflow: hidden !important; }
    .insp-signoff.insp-no-print { display: none !important; }
    .insp-signoff-box { padding: 4px 6px !important; }
    .insp-signoff-box + .insp-signoff-box { border-left: 1px solid #000 !important; }
    .insp-page-indicator {
        position: absolute !important; left: 0 !important; bottom: 0 !important;
        border: none !important; padding: 2px 4px !important; font-size: 8px !important; font-weight: 400 !important;
    }
    .insp-factory { align-items: center !important; text-align: center !important; }
    /* inspection_daily.php 인쇄 레이아웃 (새 구조) */
    .insp-photo-grid {
        grid-template-columns: 4fr 3fr !important;
        gap: 4px !important; margin-bottom: 6px !important;
        flex: 1 !important; min-height: 0 !important;
    }
    .insp-photo-main { grid-column: 1 !important; }
    .insp-photo-main .photo-box-slot { width: 100% !important; height: auto !important; min-height: 0 !important; flex: 1 !important; }
    .insp-photo-right-col { grid-column: 2 !important; height: 100% !important; gap: 4px !important; }
    .insp-photo-sub-section { flex: 2 !important; grid-template-columns: repeat(3, 1fr) !important; grid-template-rows: 1fr 1fr !important; gap: 4px !important; }
    .insp-photo-sub-section .photo-box-slot { width: auto !important; height: 100% !important; min-height: 0 !important; }
    .insp-photo-extras-section { flex: 1 !important; grid-template-columns: repeat(3, 1fr) !important; grid-template-rows: 1fr !important; gap: 4px !important; }
    .insp-photo-extras-section .photo-box-slot { width: auto !important; height: 100% !important; min-height: 0 !important; }
    .insp-photo-box { padding: 3px !important; gap: 2px !important; height: 100% !important; min-height: 0 !important; overflow: hidden !important; }
    .insp-photo-grid .photo-box-slot { aspect-ratio: auto !important; min-height: 0 !important; overflow: hidden !important; }
    /* inspection_print_batch.php 인쇄 레이아웃 (기존 구조 유지) */
    .dc-print-batch-page .insp-photo-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
        grid-template-rows: repeat(2, 1fr) !important;
    }
    .dc-print-batch-page .insp-photo-main { grid-row: span 2 !important; grid-column: span 4 !important; }
    .dc-print-batch-page .insp-photo-main .photo-box-slot { flex: 1 !important; }
    .dc-print-batch-page .insp-photo-grid .photo-box-slot { flex: 1 !important; }
    .insp-content-preview {
        cursor: default; border-color: #ccc; min-height: 16px !important; padding: 2px 5px !important;
        font-size: 10px !important; flex: none !important; overflow: hidden !important;
    }
    .insp-photo-label-input, .insp-signoff-box select, .insp-photo-label {
        border: none !important; background: transparent !important;
        -webkit-appearance: none; appearance: none; padding: 0 !important;
        font-size: 11px !important; text-align: center !important;
        width: 100% !important; text-align-last: center;
    }
    .insp-signoff-value, .insp-signoff-date, .insp-signoff-label { font-size: 10px !important; }
    .insp-mgmt-no { font-size: 10px !important; }
    .insp-title { font-size: 15px !important; }
    .insp-check-bottom-row { display: flex !important; align-items: stretch !important; flex: none !important; }
    .insp-check-signoff-grid { flex: none !important; display: flex !important; flex-direction: column !important; }
    .insp-check-signoff-grid table { border-collapse: collapse; height: 100% !important; flex: 1 !important; font-size: 10px !important; }
    .insp-check-signoff-grid td { border: 1px solid #000 !important; text-align: center !important; padding: 3px 6px !important; }
    .insp-check-signoff-grid tr:first-child { height: 0 !important; }
    .insp-check-signoff-grid tr:first-child td.hdr { padding: 2.3px 14px !important; line-height: 1.2 !important; }
    .insp-check-signoff-grid tr:first-child td.insp-check-label-td { padding-left: 11.2px !important; padding-right: 11.2px !important; }
    .insp-check-signoff-blank tr:last-child td { padding: 0 !important; }
    .insp-check-signoff-grid td.hdr {
        background: #f0f0f0 !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
    }
    .insp-rev-block { width: 33% !important; max-width: 33% !important; margin-left: auto !important; margin-right: 0 !important; }
    .insp-rev-block .section-head { justify-content: flex-end !important; }
    .insp-rev-scroll table { font-size: 11px !important; min-width: 0 !important; width: 100% !important; }
    .insp-rev-scroll {
        max-height: none !important; overflow: visible !important;
        width: 100% !important; max-width: 100% !important;
    }
    .insp-rev-scroll table th, .insp-rev-scroll table td { padding: 3px 6px !important; }
    .insp-rev-scroll tbody tr:nth-child(n+3) { display: none !important; }
    .section-head { margin: 4px 0 6px !important; }
    h2 { margin: 6px 0 !important; font-size: 14px !important; }
    .insp-check-table { font-size: 8px !important; width: 100% !important; }
    .insp-check-table th, .insp-check-table td { padding: 1px 2px !important; }
    .insp-check-table thead th { position: static !important; padding: 2px 2px !important; }
    .insp-check-table th:nth-child(-n+7), .insp-check-table td:nth-child(-n+7) { position: static !important; left: auto !important; }
    .insp-check-table .dc-method-preview {
        padding: 0.45px 8px !important; border: none !important; border-radius: 0 !important; min-height: 0 !important; line-height: 1.15 !important;
    }
    .insp-check-table select {
        font-size: 8px !important; max-width: 60px !important; border: none !important; background: transparent !important;
        text-align: center !important; text-align-last: center; -webkit-appearance: none !important; appearance: none !important;
    }
    .insp-check-table th.dc-col-check-method, .insp-check-table td.dc-col-check-method {
        width: 120px !important; min-width: 120px !important; max-width: 120px !important; white-space: normal !important; word-break: break-word !important;
    }
    .insp-check-table td.dc-col-check-method select { max-width: 100% !important; width: 100% !important; white-space: normal !important; }
    .insp-check-day-input { width: 18px !important; font-size: 8px !important; padding: 0 !important; border: none !important; }
    .insp-check-remarks-text { font-size: 10px !important; }
    .insp-check-print-page {
        display: flex !important; flex-direction: column !important; height: 190mm !important; position: relative !important;
    }
    .insp-check-print-page form#insp-check-form {
        flex: 1 !important; display: flex !important; flex-direction: column !important; min-height: 0 !important;
    }
    .insp-check-table-scroll {
        overflow: visible !important; flex: 1 !important; min-height: 0 !important;
        display: flex !important; flex-direction: column !important; margin-bottom: 4px !important;
    }
    .insp-check-table { height: 100% !important; flex: 1 !important; }
    .insp-check-remarks { flex: none !important; }
}

@media (max-width: 700px) {
    .equip-detail-grid { grid-template-columns: 1fr; }
}

.grade-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.grade-item { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.grade-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.grade-options { display: flex; flex-direction: column; gap: 6px; }
.grade-option { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; }
.grade-option-selected { background: #e8edf5; font-weight: 600; }
.grade-note { margin-top: 16px; color: #1a56db; }
.grade-note p { margin: 4px 0; }

.grade-rubric { border-collapse: collapse; }
.grade-rubric th, .grade-rubric td { border: 1px solid var(--border); padding: 8px 12px; }
.grade-rubric thead th { background: #f0f3f8; text-align: center; }
.grade-rubric .g-item, .grade-rubric .g-cat, .grade-rubric .g-score, .grade-rubric .g-measured {
    text-align: center;
    vertical-align: middle;
}
.grade-rubric .g-measured { font-weight: 700; font-size: 16px; }
.grade-rubric .g-criteria label { display: flex; flex-direction: row; align-items: center; gap: 6px; cursor: pointer; }
.g-yn-options { display: inline-flex; gap: 12px; margin-left: 12px; }

/* 이력카드 "정기점검" 양식 */
.ri-header-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; background: #fff; }
.ri-header-table + .ri-header-table { margin-top: -16px; }
.ri-header-table th, .ri-header-table td { border: 1px solid var(--border); padding: 2px 8px; text-align: left; line-height: 1.3; }
.ri-header-table th { background: #f3f5f8; color: var(--navy); white-space: nowrap; width: 130px; }
.ri-code-cell { width: 110px; white-space: nowrap; }
.ri-nowrap-cell { white-space: nowrap; }
.ri-nowrap-cell input[type="text"] { width: auto; }
.ri-header-table2 td, .ri-header-table2 th { white-space: nowrap; }
.ri-header-table2 td input[type="text"], .ri-header-table2 td select { width: auto; }
.ri-title-cell { font-size: 28px; font-weight: 700; text-align: center; width: 42%; line-height: 1; padding-top: 0; padding-bottom: 0; }
.ri-title-cell select { font-size: inherit; }
.ri-legend-cell { width: 18%; }
.ri-grade-legend { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ri-grade-box { padding: 1px 5px; border: 1px solid var(--border); border-radius: 6px; font-size: 11px; white-space: nowrap; line-height: 1.3; }
.ri-grade-active { background: #fff3a3; border-color: #e0c200; font-weight: 700; }
.ri-header-table-print .ri-title-cell { width: 34%; }
.ri-header-table-print .ri-legend-cell { width: 26%; }
.ri-header-table-print .ri-grade-legend { flex-wrap: nowrap; }
.ri-header-table-print .ri-grade-box { font-size: 9.5px; padding: 1px 3px; }

.ri-grid-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; background: #fff; }
.ri-grid-table th, .ri-grid-table td { border: 1px solid var(--navy); padding: 6px 8px; text-align: center; vertical-align: middle; font-size: 13px; }
.ri-grid-table thead th { background: #f3f5f8; color: var(--navy); }
.ri-grid-table td.ri-cell-cat { font-weight: 700; }
.ri-grid-table td.ri-cell-item, .ri-grid-table td.ri-cell-method { text-align: left; }
.ri-grid-table td.muted { text-align: left; }
.ri-level-label { font-size: 12px; color: var(--muted); background: #f3f5f8; padding: 2px 6px; border-radius: 4px; }
.ri-importance-star { color: #c0392b; font-weight: 700; }
.ri-grid-table td.ri-quarter-selected { background: #fff176; }
.ri-force-red, span.ri-force-red, .ri-force-red select { color: #c0392b !important; }
.ri-importance-select { width: 70px; }

.ri-photo-grid { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ri-photo-slot { position: relative; width: 2cm; height: 1.5cm; border: 1px dashed var(--border); border-radius: 4px; overflow: hidden; cursor: pointer; background: #fafafa; flex: 0 0 auto; }
.ri-photo-slot.has-photo { border-style: solid; cursor: zoom-in; }
.ri-photo-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.ri-photo-plus { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--border); }
.ri-photo-remove { position: absolute; top: 0; right: 0; width: 16px; height: 16px; line-height: 14px; padding: 0; border: none; background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; cursor: pointer; border-radius: 0 0 0 4px; }
#ri-photo-zoom-overlay { cursor: zoom-out; }

.ri-item-photo-grid { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ri-item-photo-slot { position: relative; width: 4cm; height: 3cm; border: 1px dashed var(--border); border-radius: 4px; overflow: hidden; cursor: pointer; background: #fafafa; flex: 0 0 auto; }
.ri-item-photo-slot.has-photo { border-style: solid; cursor: zoom-in; }

.container-factory-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.container-table th, .container-table td { border-right: 1px solid var(--border); text-align: center; }
.container-table th:last-child, .container-table td:last-child { border-right: none; }
.container-table .container-num-sm { width: 60px; text-align: center; }
.container-table .container-history { width: 140px; resize: vertical; }
.container-logistics-pair { display: flex; align-items: center; justify-content: center; gap: 4px; }
.container-logistics-input { width: 70px; }
.container-logistics-arrow { color: var(--navy); font-weight: 700; flex: 0 0 auto; }
.container-attachments-cell { width: 160px; text-align: left; }
.container-attachment-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; margin-bottom: 3px; }
.container-attachment-item a { word-break: break-all; }
.container-attachment-item label { white-space: nowrap; color: var(--muted); font-size: 11px; }
.container-attachment-file { width: 100%; font-size: 11px; }
.container-attachment-selected { font-size: 10.5px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.container-photo-slot { position: relative; width: 2cm; height: 2cm; margin: 0 auto; border: 1px dashed var(--border); border-radius: 4px; overflow: hidden; cursor: pointer; background: #fafafa; }
.container-photo-slot.has-photo { border-style: solid; cursor: zoom-in; }
.container-photo-slot .container-photo-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.container-photo-slot .container-photo-plus { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--border); }
.container-photo-slot .container-photo-remove { position: absolute; top: 0; right: 0; width: 16px; height: 16px; line-height: 14px; padding: 0; border: none; background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; cursor: pointer; border-radius: 0 0 0 4px; }
.container-photo-slot input[type=file] { display: none; }
.container-photo-thumb { width: 2cm; height: 2cm; object-fit: cover; border-radius: 4px; cursor: zoom-in; display: block; margin: 0 auto; }

.investment-summary-cards { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.investment-card { flex: 1 1 160px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0, 44, 94, 0.05); }
.investment-card-total { border-color: var(--navy); background: #eef4fb; }
.investment-card-label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.investment-card-amount { font-size: 19px; font-weight: 700; color: var(--navy); }
.investment-card-vat { font-size: 11px; color: var(--muted); margin-top: 4px; }
.investment-summary-note { font-size: 12px; margin: 0 0 12px; }
.investment-table th, .investment-table td { text-align: center; border-right: 1px solid var(--border); }
.investment-table th:last-child, .investment-table td:last-child { border-right: none; }
.investment-table .investment-name-select { width: 110px; }
.investment-table td > select[data-option-field] { min-width: 90px; }
.investment-table .investment-content,
.investment-table .investment-note { width: 150px; resize: vertical; }
.investment-table .investment-num-sm { width: 60px; text-align: center; }
.investment-table .investment-num-md { width: 90px; text-align: right; }
.investment-table .investment-author { width: 80px; }
.investment-table .investment-date { width: 130px; }
.investment-content-view { text-align: left; }

.ri-tool-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.ri-tool-label { font-weight: 600; white-space: nowrap; }
.ri-cell-method-view .ri-cell-method-inner { display: flex; flex-direction: column; height: 100%; }
.ri-cell-method-view .ri-cell-method-inner .ri-tool-row { margin-top: auto; border-top: 1px solid var(--border); padding-top: 6px; }
.ri-grid-table input[type="text"] { width: 100%; box-sizing: border-box; }
.ri-plain-input { border: none; background: transparent; padding: 2px 0; text-align: left; }
.ri-plain-input:focus { outline: none; border-bottom: 1px solid var(--navy); }
.ri-grid-table-print th, .ri-grid-table-print td { padding: 5px 7px; font-size: 11.7px; }
.ri-grid-table .btn { padding: 8px 13px; font-size: 11px; }

.ri-grid-table-fixed { table-layout: fixed; }
.ri-grid-table-fixed td.ri-cell-method, .ri-grid-table-fixed td.ri-cell-method-view { word-break: break-word; overflow-wrap: break-word; white-space: normal; overflow: hidden; }
/* 점검방법 셀 내부 — inline-flex 오버플로 방지 */
.ri-cell-method .ri-cell-method-inner { display: flex; flex-direction: column; width: 100%; gap: 4px; }
.ri-cell-method .ri-field,
.ri-cell-method-view .ri-field { display: flex; width: 100%; }
.ri-cell-method .ri-select-wrap,
.ri-cell-method-view .ri-select-wrap { width: 100%; }
.ri-cell-method select,
.ri-cell-method-view select { flex: 1 1 0; min-width: 0; max-width: 100%; }

.ri-field { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 100%; }
.ri-field-view { display: inline; white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; }
.ri-select-wrap, .ri-custom-wrap { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 100%; }
.ri-preview { display: inline-block; max-width: 100%; white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; }
.ri-category-actions { display: flex; gap: 8px; margin-bottom: 16px; }

.ri-footer-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin: 16px 0; }
.ri-footer-row-single { grid-template-columns: 1fr; }
.ri-footer-box { border: 1px solid var(--border); border-radius: 8px; padding: 10px; min-height: 80px; }
.ri-footer-label { font-weight: 700; margin-bottom: 6px; }
.ri-bottom-save { margin: 16px 0; text-align: right; }

@media print {
    .ri-grid-table th, .ri-grid-table td { border-color: #000; }
}
.g-yn-options label { display: inline-flex; align-items: center; gap: 4px; }

/* JIG 현황 */
.jig-row-selected { background: #eef4ff; }
.jig-header-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.jig-header-table td { border: 1px solid var(--border); padding: 8px 10px; }
.jig-header-label { background: #f5f7fa; font-weight: 600; width: 110px; white-space: nowrap; }
.jig-vehicle-prefix { font-weight: 600; margin-right: 6px; }
.jig-qty-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jig-qty-input { width: 80px; }
.jig-middle-section { display: flex; gap: 16px; margin-bottom: 16px; align-items: flex-start; flex-wrap: wrap; }
.jig-photo-column { display: flex; flex-direction: column; gap: 10px; flex: 8; min-width: 0; }
.jig-photo-box { display: flex; flex-direction: column; gap: 4px; }
.jig-photo-main .photo-box-slot { min-height: 200px; }
.jig-photo-sub .photo-box-slot { min-height: 72px; }
.jig-photo-label { font-size: 13px; font-weight: 600; text-align: center; color: var(--muted); }
.jig-photo-label-input { font-size: 13px; font-weight: 600; text-align: center; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 2px 4px; width: 100%; box-sizing: border-box; }
.jig-check-column { flex: 9; min-width: 0; }
.jig-print-page .jig-photo-column { flex: 8; }
.jig-print-page .jig-photo-main .photo-box-slot { min-height: 290px; }
.jig-print-page .jig-photo-sub .photo-box-slot { min-height: 110px; }
.jig-print-page .jig-middle-section { align-items: stretch; }
.jig-print-page .jig-check-column { flex: 9; height: 100%; overflow: hidden; }
.jig-print-page .jig-check-table { height: 100%; }
.jig-print-page .jig-check-table th, .jig-print-page .jig-check-table td { padding: 10px 8px; }
.jig-check-table { table-layout: fixed; }
.jig-check-table th, .jig-check-table td { text-align: center; white-space: normal; word-break: break-word; overflow-wrap: break-word; }
.jig-check-table .jig-check-col-no { width: 28px; }
.jig-check-table .jig-check-col-result { width: 56px; }
.jig-type-template-table .jig-type-col-del { width: 50px; }
.jig-check-table th:not(:last-child), .jig-check-table td:not(:last-child) { border-right: 1px solid var(--border); }
.jig-history-section { display: flex; flex-direction: column; gap: 16px; }
.jig-history-column { min-width: 0; }
.jig-history-column .equip-table { width: 100%; }
.jig-check-table select { width: 100%; }
.jig-bottom-save { text-align: right; margin: 12px 0 24px; }
.jig-print-page { page: jig-page; width: 190mm; height: 277mm; padding: 10mm 0; box-sizing: border-box; overflow: hidden; position: relative; }
.jig-print-scale { transform-origin: top left; }
.jig-print-header { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.jig-print-factory-block { flex-shrink: 0; text-align: center; }
.jig-print-factory-name { font-weight: 700; }
.jig-print-factory-code { color: var(--muted); }
.jig-print-title { flex: 1; text-align: center; font-size: 20px; font-weight: 700; }
@media (max-width: 700px) {
    .jig-middle-section { flex-direction: column; }
    .jig-photo-column { width: 100%; }
}

/* ============================================================
   품질팀 불량등록 모듈
   ============================================================ */
/* 목록: 순~수정/삭제 전 컬럼 가운데 정렬 + 칸 배분을 위해 폰트 14px로 축소 */
.defect-list-table th, .defect-list-table td { text-align: center; }
.defect-list-table td { font-size: 14px; }
/* 품명: 폰트 크기 고정 + 줄바꿈 없이 한 줄로, 칸 너비는 가장 긴 품명 기준으로 자동 확장 */
td.defect-list-productname {
    font-size: 12px;
    width: auto;
    max-width: none;
    white-space: nowrap;
    text-align: left;
}
/* 품번: 품명과 동일하게 폰트 크기만 축소 */
td.defect-list-productno { font-size: 12px; }
/* 불량내용/발생수량: 글자색 빨강 */
td.defect-list-red { color: #c0392b; }
/* 다른 칸(nowrap)이 폭을 먼저 차지해 품명/품번 칸이 눌리지 않도록 최소 너비 확보 (넘치면 가로 스크롤) */
.defect-list-table { min-width: 1500px; }
