* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface2: #f7f8fa;
  --surface3: #eef0f5;
  --border: #e5e7ed;
  --border-strong: #d4d7de;
  --text: #1e2130;
  --text-sub: #3f4254;
  --text-muted: #6b7085;
  --primary: #4f46e5;
  --primary-light: #eef2ff;
  --primary-hover: #4338ca;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --red: #dc2626;
  --red-light: #fef2f2;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --cyan: #0891b2;
  --cyan-light: #ecfeff;
  --pink: #db2777;
  --pink-light: #fdf2f8;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16,24,40,0.05);
  --shadow-lg: 0 4px 16px rgba(16,24,40,0.08);
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ══════════════════════════════════════
   앱 셸 레이아웃
══════════════════════════════════════ */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ── 사이드바 ── */
.app-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand-titles { display: flex; flex-direction: column; }
.brand-name   { font-size: 15px; font-weight: 700; color: var(--text); }
.brand-sub    { font-size: 10px; color: var(--text-muted); letter-spacing: -0.2px; }

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 10px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 7px;
  color: var(--text-sub); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.12s; margin-bottom: 2px;
  text-decoration: none;
}
.nav-item:hover         { background: var(--surface2); color: var(--text); }
.nav-item.active        { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-item.active svg    { stroke: var(--primary); color: var(--primary); }
.nav-item svg           { color: var(--text-muted); flex-shrink: 0; }
.nav-item span:first-of-type { flex: 1; }
.nav-badge {
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 8px; line-height: 1.4;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 14px;
  flex-shrink: 0;
}
.role-label       { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.role-selector-wrap, .facility-wrap { margin-bottom: 10px; }
.role-select, .facility-input {
  width: 100%; padding: 6px 8px; font-size: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text);
}
.role-select:focus, .facility-input:focus { outline: none; border-color: var(--primary); }

/* ── 메인 영역 ── */
.app-main { min-width: 0; display: flex; flex-direction: column; }

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.header-left   { display: flex; flex-direction: column; gap: 2px; }
.header-title  { font-size: 18px; font-weight: 700; color: var(--text); }
.header-sub    { font-size: 12px; color: var(--text-muted); }
.header-actions { display: flex; align-items: center; gap: 8px; }

.app-content {
  padding: 24px 28px;
  flex: 1;
  overflow-y: auto;
}

/* ══════════════════════════════════════
   공통 컴포넌트
══════════════════════════════════════ */

/* ── 패널 ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.panel-title { font-size: 14px; font-weight: 600; color: var(--text); }
.panel-sub   { font-size: 11px; color: var(--text-muted); }
.panel-link  { font-size: 12px; color: var(--primary); cursor: pointer; text-decoration: none; }
.panel-body  { padding: 16px 18px; }

/* ── 버튼 ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--primary); color: #fff;
  border: none; border-radius: 7px; font-size: 13px; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: background .15s;
}
.btn-primary:hover   { background: var(--primary-hover); }
.btn-primary.sm      { padding: 6px 12px; font-size: 12px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; background: transparent; color: var(--text-sub);
  border: 1px solid var(--border); border-radius: 7px;
  font-size: 13px; cursor: pointer; transition: all .15s;
}
.btn-ghost:hover   { background: var(--surface2); border-color: var(--primary); color: var(--primary); }
.btn-ghost.sm      { padding: 5px 10px; font-size: 12px; }
.btn-ghost.xs      { padding: 4px 8px; font-size: 11px; }

.btn-danger {
  display: inline-flex; align-items: center;
  padding: 4px 8px; background: transparent; color: var(--red);
  border: 1px solid #fca5a5; border-radius: 6px; font-size: 11px; cursor: pointer;
}
.btn-danger:hover  { background: var(--red-light); }

/* ── 배지 / 태그 ── */
.badge    { padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 500; }
.badge.sm { font-size: 10px; padding: 1px 6px; }
.tag      { padding: 2px 7px; background: var(--surface3); border-radius: 99px; font-size: 11px; color: var(--text-muted); }

/* ── 스피너 / 로딩 ── */
.loading-state {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 60px; color: var(--text-muted); font-size: 14px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 빈 상태 / 에러 ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 48px 20px; text-align: center;
  color: var(--text-muted); grid-column: 1 / -1;
}
.empty-state.small { padding: 24px; }
.empty-state p     { font-size: 13px; }
.error-state {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; background: var(--red-light); color: var(--red);
  border-radius: var(--radius); font-size: 13px;
}

/* ── 인포박스 ── */
.info-box       { padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.7; }
.info-box.amber { background: var(--amber-light); color: #92400e; border: 1px solid #fcd34d; }
.info-box.blue  { background: var(--blue-light);  color: #1e40af; border: 1px solid #93c5fd; }

/* ── 토스트 ── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 10px 18px; border-radius: 8px; font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(10px); transition: all .25s; max-width: 320px;
}
.toast.show    { opacity: 1; transform: translateY(0); }
.toast-success { background: #16a34a; color: #fff; }
.toast-error   { background: #dc2626; color: #fff; }
.toast-warn    { background: #d97706; color: #fff; }
.toast-info    { background: var(--primary); color: #fff; }

/* ── 모달 ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--surface); border-radius: 12px;
  width: 90%; max-width: 720px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-title  { font-size: 15px; font-weight: 600; color: var(--text); }
.modal-close  { background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; line-height: 1; }
.modal-body   { padding: 18px 22px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border); }

/* ── 모달 탭 ── */
.modal-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); padding: 0 22px; }
.detail-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.detail-tab:hover { color: var(--text); }
.detail-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.detail-tab .tab-count { display: inline-block; background: var(--primary); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 6px; margin-left: 4px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── 추출 텍스트 탭 ── */
.extracted-text-view { display: flex; flex-direction: column; gap: 8px; }
.et-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }
.et-body { background: var(--surface3); border-radius: 8px; padding: 12px; font-size: 12px; line-height: 1.7; color: var(--text); white-space: pre-wrap; word-break: break-word; max-height: 400px; overflow-y: auto; }
.empty-tab { text-align: center; padding: 40px 20px; }
.et-icon { font-size: 36px; margin-bottom: 10px; }
.et-msg  { font-size: 14px; color: var(--text); font-weight: 500; }
.et-sub  { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── 청킹 탭 ── */
.chunks-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chunks-stats   { display: flex; gap: 20px; }
.cs-item        { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cs-item b      { font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1; }
.cs-item span   { font-size: 11px; color: var(--text-muted); }
.chunks-note    { font-size: 11px; color: var(--text-muted); font-style: italic; }
.chunks-list    { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; }
.chunk-card     { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.chunk-head     { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; background: var(--surface3); }
.chunk-id       { font-size: 11px; font-weight: 700; color: var(--primary); font-family: monospace; }
.chunk-chars    { font-size: 11px; color: var(--text-muted); }
.chunk-body     { padding: 10px 12px; font-size: 12px; line-height: 1.65; color: var(--text); white-space: pre-wrap; word-break: break-word; }

/* ── 추출 상태 배지 ── */
.ex-status-badge { font-size: 11px; border-radius: 4px; padding: 2px 7px; font-weight: 600; }
.ex-status-badge.completed { background: #dcfce7; color: #15803d; }
.ex-status-badge.pending   { background: #fef9c3; color: #854d0e; }
.ex-status-badge.failed    { background: #fee2e2; color: #b91c1c; }
.ex-status-badge.skipped   { background: #f3f4f6; color: #6b7280; }
.ex-status-badge.empty     { background: #f3f4f6; color: #6b7280; }
.chunk-count-badge { font-size: 11px; background: #eff6ff; color: #1d4ed8; border-radius: 4px; padding: 2px 7px; margin-left: 6px; font-weight: 600; }
.conf-badge { font-size: 11px; background: var(--surface3); color: var(--text-muted); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }

/* ── 디테일 그리드 ── */
.detail-grid { display: flex; flex-direction: column; gap: 8px; }
.detail-row  { display: flex; gap: 12px; font-size: 13px; }
.dl { width: 110px; color: var(--text-muted); flex-shrink: 0; font-size: 12px; }
.dv { flex: 1; color: var(--text); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.link { color: var(--primary); text-decoration: none; word-break: break-all; }

/* ══════════════════════════════════════
   대시보드
══════════════════════════════════════ */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel-wide     { grid-column: 1 / -1; }

/* 요약 카드 */
.summary-cards {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.summary-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.summary-card.primary .sc-icon { color: var(--primary); }
.summary-card.green   .sc-icon { color: var(--green); }
.summary-card.blue    .sc-icon { color: var(--blue); }
.summary-card.amber   .sc-icon { color: var(--amber); }
.sc-value { font-size: 26px; font-weight: 700; color: var(--text); }
.sc-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* 바 차트 */
.bar-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-label { display: flex; align-items: center; gap: 6px; width: 140px; font-size: 12px; color: var(--text-sub); flex-shrink: 0; }
.cat-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bar-track { flex: 1; height: 8px; background: var(--surface3); border-radius: 4px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 4px; transition: width .6s ease; min-width: 2px; }
.bar-count { width: 28px; text-align: right; font-size: 12px; font-weight: 600; color: var(--text); }
.empty-bar { font-size: 12px; color: var(--text-muted); text-align: center; padding: 16px; }

/* 지역 카드 */
.region-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.region-card  { text-align: center; padding: 14px 10px; background: var(--surface2); border-radius: 8px; border: 1px solid var(--border); }
.region-name  { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.region-count { font-size: 24px; font-weight: 700; color: var(--primary); }
.region-label { font-size: 11px; color: var(--text-muted); }

/* 진행률 */
.progress-wrap      { margin-bottom: 16px; }
.progress-pct       { font-size: 28px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.progress-bar-track { height: 10px; background: var(--surface3); border-radius: 5px; overflow: hidden; }
.progress-bar-fill  { height: 100%; background: var(--primary); border-radius: 5px; transition: width .6s ease; }
.progress-label     { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.extract-status-list { display: flex; flex-direction: column; gap: 7px; }
.es-row  { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.es-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.es-label { flex: 1; color: var(--text-sub); }
.es-count { font-weight: 600; color: var(--text); }

/* 최근 업로드 미니 리스트 */
.doc-list-mini { display: flex; flex-direction: column; }
.dml-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 7px; cursor: pointer; transition: background .15s;
}
.dml-row:hover { background: var(--surface2); }
.dml-icon  { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.dml-info  { flex: 1; min-width: 0; }
.dml-name  { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dml-meta  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ══════════════════════════════════════
   업로드 페이지
══════════════════════════════════════ */
.upload-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.upload-left, .upload-right { display: flex; flex-direction: column; gap: 16px; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 40px 20px; border: 2px dashed var(--border-strong);
  border-radius: var(--radius); background: var(--surface); text-align: center; transition: all .2s;
}
.dropzone.drag-over { border-color: var(--primary); background: var(--primary-light); }
.dz-icon { opacity: .6; }
.dz-text { font-size: 14px; color: var(--text-sub); }
.dz-hint { font-size: 11px; color: var(--text-muted); }

/* 파일 큐 */
.file-queue { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.fq-header  { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.fq-title   { font-size: 13px; font-weight: 600; color: var(--text); }
.fq-list    { max-height: 260px; overflow-y: auto; }
.fq-item    { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--surface3); }
.fq-icon    { font-size: 18px; flex-shrink: 0; }
.fq-info    { flex: 1; min-width: 0; }
.fq-name    { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fq-size    { font-size: 11px; color: var(--text-muted); }
.fq-remove  { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; font-size: 14px; }
.fq-remove:hover { color: var(--red); }
.fq-footer  { padding: 12px 16px; border-top: 1px solid var(--border); }

/* 메타 폼 */
.meta-form          { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.meta-section-title { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--surface3); }
.form-row    { margin-bottom: 14px; }
.form-label  { display: block; font-size: 12px; font-weight: 500; color: var(--text-sub); margin-bottom: 5px; }
.form-label .req { color: var(--red); }
.form-select, .form-input {
  width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface2); color: var(--text); transition: border-color .15s;
}
.form-select:focus, .form-input:focus { outline: none; border-color: var(--primary); }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.radio-group { display: flex; gap: 16px; }
.radio-label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.radio-text  { font-size: 13px; font-weight: 500; }

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 10px; font-size: 12px;
  border: 1px solid var(--border); border-radius: 99px;
  background: var(--surface2); color: var(--text-sub); cursor: pointer; transition: all .15s;
}
.chip:hover  { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); font-weight: 500; }

/* 업로드 결과 */
.upload-results { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.result-header  { padding: 10px 14px; font-size: 12px; font-weight: 600; background: var(--surface2); border-bottom: 1px solid var(--border); }
.result-row     { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 12px; border-bottom: 1px solid var(--surface3); }
.result-row.success { background: #f0fdf4; }
.result-row.error   { background: #fef2f2; }
.result-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-cat  { color: var(--primary); font-size: 11px; }
.result-err  { color: var(--red); font-size: 11px; }

/* ══════════════════════════════════════
   문서 관리
══════════════════════════════════════ */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-group { position: relative; flex: 1; min-width: 200px; }
.search-input {
  width: 100%; padding: 8px 10px 8px 34px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface); color: var(--text); transition: border-color .15s;
}
.search-input:focus { outline: none; border-color: var(--primary); }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.filter-select {
  padding: 8px 10px; font-size: 12px; border: 1px solid var(--border);
  border-radius: 7px; background: var(--surface); color: var(--text); cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--primary); }
.doc-count { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.doc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow .15s, border-color .15s; cursor: default;
}
.doc-card:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(79,70,229,.08); }
.card-top    { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.card-icon   { font-size: 20px; flex-shrink: 0; }
.card-name   { font-size: 13px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta   { display: flex; gap: 8px; align-items: center; }
.card-region { font-size: 11px; color: var(--text-muted); }
.card-field  { font-size: 11px; color: var(--primary); }
.card-info   { display: flex; gap: 10px; font-size: 11px; color: var(--text-muted); }
.card-extraction { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.ex-dot    { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ex-label  { color: var(--text-muted); }
.ex-chunks { color: var(--primary); font-weight: 500; margin-left: 4px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card-actions {
  display: flex; gap: 6px; justify-content: flex-end;
  padding-top: 6px; border-top: 1px solid var(--surface3);
  margin-top: 2px;
}

/* 추출 텍스트 미리보기 */
.extracted-preview { margin-top: 16px; }
.ep-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.ep-text  {
  font-size: 12px; color: var(--text-sub); background: var(--surface2);
  padding: 10px; border-radius: 7px; line-height: 1.6;
  max-height: 160px; overflow-y: auto; white-space: pre-wrap;
}

/* ══════════════════════════════════════
   정형화 현황
══════════════════════════════════════ */
.quality-layout  { display: flex; flex-direction: column; gap: 16px; }
.quality-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.qs-card  { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.qs-value { font-size: 30px; font-weight: 700; }
.qs-value.green { color: var(--green); }
.qs-value.amber { color: var(--amber); }
.qs-value.red   { color: var(--red); }
.qs-value.muted { color: var(--text-muted); }
.qs-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.big-progress { margin-bottom: 16px; }
.bp-pct   { font-size: 40px; font-weight: 800; color: var(--primary); }
.bp-track { height: 14px; background: var(--surface3); border-radius: 7px; overflow: hidden; margin: 10px 0; }
.bp-fill  { height: 100%; background: var(--primary); border-radius: 7px; transition: width .8s; }
.bp-sub   { font-size: 13px; color: var(--text-muted); }

.roadmap-list { display: flex; flex-direction: column; gap: 12px; }
.rm-item { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.rm-item .rm-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 3px; flex-shrink: 0; }
.rm-item.done    .rm-dot { background: var(--green); }
.rm-item.pending .rm-dot { background: var(--border-strong); }
.rm-item.done    { color: var(--text); }
.rm-item.pending { color: var(--text-muted); }

/* ══════════════════════════════════════
   반응형
══════════════════════════════════════ */
@media (max-width: 1200px) {
  .summary-cards   { grid-template-columns: repeat(2, 1fr); }
  .quality-summary { grid-template-columns: repeat(2, 1fr); }
  .region-cards    { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .upload-layout  { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: static; height: auto; }
  .app-header { padding: 12px 16px; }
  .app-content { padding: 16px; }
}
