:root {
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, system-ui, sans-serif;
  color: #17212f;
  background: #f3f5f8;
  font-synthesis: none;
  --navy: #17263f;
  --blue: #316ce8;
  --blue-soft: #eaf1ff;
  --line: #e2e7ee;
  --muted: #748092;
  --green: #16976c;
  --amber: #d58a19;
  --red: #d24a43;
  --panel: #ffffff;
  --shadow: 0 8px 28px rgba(26, 41, 66, .06);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #f3f5f8; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f3f5f8; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(49,108,232,.22); outline-offset: 2px; }

#app { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 232px; display: flex; flex-direction: column; padding: 26px 18px 20px; color: #c8d1df; background: var(--navy); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 27px; color: white; font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; color: white; border: 1px solid rgba(255,255,255,.24); border-radius: 10px; background: linear-gradient(145deg,#3e79ee,#2857ba); }
.nav { display: grid; gap: 6px; }
.nav-item { width: 100%; border: 0; display: flex; align-items: center; gap: 12px; padding: 12px 13px; color: #9fadc1; background: transparent; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 650; text-align: left; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(67,118,219,.23); box-shadow: inset 3px 0 #5c8bf0; }
.settings { margin-top: auto; }
.sidebar-note { margin: auto 2px 18px; padding: 16px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.045); }
.sidebar-note .note-icon { display: grid; place-items: center; width: 29px; height: 29px; margin-bottom: 10px; color: #9fbcff; border-radius: 8px; background: rgba(75,126,229,.22); }
.sidebar-note strong { display: block; color: #eaf0f8; font-size: 12px; }
.sidebar-note p { margin: 6px 0 0; color: #91a0b6; font-size: 11px; line-height: 1.65; word-break: keep-all; }

.shell { width: calc(100% - 232px); min-height: 100vh; margin-left: 232px; display: flex; flex-direction: column; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; padding: 0 36px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.topbar h1 { margin: 3px 0 0; font-size: 21px; letter-spacing: -.04em; }
.eyebrow { margin: 0; color: #8591a3; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.engine-state { display: flex; align-items: center; gap: 7px; color: #677487; font-size: 12px; font-weight: 600; }
.engine-state i { width: 7px; height: 7px; border-radius: 50%; background: #25aa7b; box-shadow: 0 0 0 4px #e5f7f0; }
.primary-button, .secondary-button { border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; cursor: pointer; font-weight: 700; }
.primary-button { padding: 11px 16px; color: white; background: var(--blue); box-shadow: 0 5px 14px rgba(49,108,232,.22); font-size: 13px; }
.primary-button:hover { background: #265fcf; }
.secondary-button { padding: 9px 12px; color: #4c5b6f; border: 1px solid #dce2e9; background: white; font-size: 11px; }
.secondary-button:hover { border-color: #bdc8d7; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); display: grid; place-items: center; color: #657287; border-radius: 8px; background: white; cursor: pointer; }
.mobile-menu { display: none; }

.content { width: 100%; max-width: 1640px; margin: 0 auto; padding: 26px 32px 32px; flex: 1; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.metrics article { min-width: 0; min-height: 84px; display: flex; align-items: center; gap: 12px; padding: 16px 17px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 3px 12px rgba(23,38,63,.025); }
.metric-icon { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; }
.metric-icon.blue { color: #3570e4; background: #eaf1ff; }.metric-icon.green { color: #149169; background: #e6f6f0; }.metric-icon.violet { color: #7558cb; background: #f0ecfc; }.metric-icon.amber { color: #c77f16; background: #fff4df; }
.metrics p { margin: 0 0 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.metrics strong { font-size: 22px; letter-spacing: -.03em; }
.metrics strong small { margin-left: 3px; color: #677487; font-size: 11px; font-weight: 600; }
.metrics em { margin: auto 0 0 auto; color: #8793a4; font-size: 9px; font-style: normal; font-weight: 700; white-space: nowrap; }

.workspace { min-height: 680px; display: grid; grid-template-columns: 285px minmax(0,1fr); gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.document-panel { display: flex; flex-direction: column; }
.panel-heading { height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { display: inline; margin: 0; font-size: 14px; }
.panel-heading span { margin-left: 7px; color: #8c98a8; font-size: 10px; }
.search-box { height: 36px; display: flex; align-items: center; gap: 8px; margin: 14px 14px 10px; padding: 0 10px; color: #99a4b3; border: 1px solid #e1e6ed; border-radius: 7px; background: #f8f9fb; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: none; color: #334156; background: transparent; font-size: 11px; }
.filters { display: flex; gap: 4px; padding: 0 14px 12px; border-bottom: 1px solid #edf0f4; overflow-x: auto; }
.filters button { border: 0; padding: 5px 9px; color: #7a8798; border-radius: 6px; background: transparent; cursor: pointer; font-size: 10px; font-weight: 650; white-space: nowrap; }
.filters button.active { color: #2e64cf; background: var(--blue-soft); }
.document-list { padding: 7px; overflow-y: auto; }
.document-item { width: 100%; min-height: 78px; display: grid; grid-template-columns: 35px 1fr 20px; gap: 10px; align-items: center; padding: 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.document-item:hover { background: #f7f9fc; }.document-item.active { border-color: #dbe6fb; background: #f1f6ff; }
.file-symbol { width: 35px; height: 40px; display: grid; place-items: center; color: #3269d5; border: 1px solid #d7e3fa; border-radius: 7px; background: #eaf1ff; }
.file-symbol.building { color: #7c5abf; border-color: #e7ddf8; background: #f2edfb; }.file-symbol.unknown { color: #768294; border-color: #dfe3e9; background: #f2f4f7; }
.file-copy { min-width: 0; display: flex; flex-direction: column; }
.file-copy strong { overflow: hidden; color: #2a374a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.file-copy small { margin-top: 4px; overflow: hidden; color: #7f8b9b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.file-copy time { margin-top: 5px; color: #a0a9b6; font-size: 9px; }
.status-dot { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; font-size: 10px; font-weight: 800; }
.status-dot.passed { color: #12825d; background: #dcf4eb; }.status-dot.review { color: #ba6e13; background: #fff0d6; }
.empty-list { padding: 40px 12px; color: #8b96a5; text-align: center; font-size: 11px; }

.detail-panel { min-width: 0; display: flex; flex-direction: column; }
.detail-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; }
.detail-file { min-width: 0; display: flex; align-items: center; gap: 12px; }.detail-file > div { min-width: 0; }
.detail-file h2 { margin: 2px 0; overflow: hidden; font-size: 15px; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.detail-file p { margin: 0; overflow: hidden; color: #8792a2; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.type-label { color: #4270ca; font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.tabs { height: 44px; display: flex; gap: 22px; padding: 0 18px; border-top: 1px solid #f0f2f5; border-bottom: 1px solid var(--line); }
.tabs button { position: relative; border: 0; padding: 0 2px; color: #7a8798; background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.tabs button.active { color: #2f63cb; }.tabs button.active::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: #316ce8; }
.tiny-badge { margin-left: 4px; padding: 2px 4px; border-radius: 3px; font-size: 7px; }.tiny-badge.passed { color: #0e815b; background: #e1f5ed; }.tiny-badge.review { color: #ad6817; background: #fff0d8; }
.split-view { min-height: 557px; display: grid; grid-template-columns: minmax(310px, .92fr) minmax(350px, 1.08fr); flex: 1; }
.viewer-card { min-width: 0; padding: 14px 16px 18px; border-right: 1px solid var(--line); background: #edf0f4; }
.viewer-toolbar { height: 32px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.page-selector, .method { display: flex; align-items: center; gap: 5px; color: #748092; font-size: 9px; }
.page-selector button { width: 22px; height: 22px; border: 0; border-radius: 5px; color: #748092; background: #fff; cursor: pointer; font-size: 9px; }.page-selector button.active { color: white; background: #4e6f9f; }
.method-badge { padding: 4px 6px; border-radius: 4px; font-size: 7px; font-weight: 900; letter-spacing: .05em; }.method-badge.parser { color: #2762d0; background: #dfe9fb; }.method-badge.ocr { color: #7552b5; background: #e9e2f7; }
.paper { position: relative; min-height: 478px; padding: 27px 28px 36px; overflow: hidden; color: #333842; border: 1px solid #d9dde3; background: #fffefa; box-shadow: 0 6px 18px rgba(36,47,66,.1); }
.paper::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(65,73,85,.025) 1px,transparent 1px); background-size: 100% 24px; }
.paper-watermark { position: absolute; inset: 44% auto auto 50%; transform: translate(-50%,-50%) rotate(-24deg); color: rgba(63,74,89,.045); font-size: 66px; font-weight: 900; white-space: nowrap; }
.paper-head { position: relative; display: flex; justify-content: space-between; padding-bottom: 10px; color: #878d96; border-bottom: 1px solid #bbbfc5; font-size: 7px; font-weight: 700; letter-spacing: .04em; }
.paper pre { position: relative; margin: 32px 0 0; color: #323843; font-family: "Batang", "Noto Serif KR", serif; font-size: 11px; line-height: 2.12; white-space: pre-wrap; word-break: keep-all; }
.paper pre::first-line { font-weight: 800; }
.paper-foot { position: absolute; inset: auto 27px 16px; padding-top: 8px; color: #a0a4aa; border-top: 1px solid #ddd; font-size: 7px; text-align: center; }
.failure-state { position: relative; display: flex; flex-direction: column; align-items: center; padding: 110px 20px 0; text-align: center; }.failure-state > span { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 12px; color: #b77520; border-radius: 50%; background: #fff0d9; font-weight: 800; }.failure-state p { max-width: 310px; color: #7e8794; font-size: 10px; line-height: 1.6; }

.structured-view { min-width: 0; padding: 20px 21px; overflow-y: auto; }
.structured-head { display: flex; align-items: start; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid #edf0f3; }.structured-head span:first-child { color: #8794a6; font-size: 7px; font-weight: 900; letter-spacing: .1em; }.structured-head h2 { margin: 3px 0 0; font-size: 16px; }
.confidence { display: flex; align-items: center; gap: 4px; padding: 5px 7px; color: #14835f; border-radius: 5px; background: #e5f6ef; font-size: 8px; font-weight: 800; }
.result-title { display: flex; align-items: center; justify-content: space-between; margin: 17px 0 9px; }.result-title.spaced { margin-top: 20px; }
.result-title > div { display: flex; align-items: center; gap: 7px; }.result-title h3 { margin: 0; font-size: 11px; }.count { color: #8b96a5; font-size: 8px; }
.section-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; font-size: 9px; font-weight: 900; }.section-icon.owner { color: #2f69d6; background: #e9f1ff; }.section-icon.mortgage { color: #ac6c17; background: #fff1db; }.section-icon.violation { color: #bd4a44; background: #fde9e7; }
.field-card { padding: 11px 12px; border: 1px solid #e3e8ee; border-radius: 7px; background: #fafbfd; }.field-card + .field-card { margin-top: 7px; }
.field-top { display: flex; justify-content: space-between; }.field-top strong { font-size: 11px; }.field-top span { color: #4270ca; font-size: 7px; font-weight: 800; }
.field-card p, .evidence-box p { margin: 8px 0 0; color: #667489; font-size: 8px; line-height: 1.5; }.field-card p b { display: block; margin-bottom: 3px; color: #98a3b2; font-size: 7px; }
.mortgage-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }.mortgage-card dl div { min-width: 0; }.mortgage-card dt { color: #8c97a7; font-size: 7px; }.mortgage-card dd { margin: 4px 0 0; overflow: hidden; color: #27364a; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.not-found { padding: 22px 12px; color: #818c9c; border: 1px dashed #dce2e9; border-radius: 7px; background: #fafbfc; text-align: center; font-size: 9px; }.not-found.large { margin: 30px 0; padding: 50px 20px; font-size: 11px; }
.violation-card { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 15px; border: 1px solid #e3e8ee; border-radius: 8px; }.violation-card.confirmed { border-color: #f0cfcc; background: #fff9f8; }.violation-card.not_found { border-color: #cee8dd; background: #f6fcf9; }.violation-card.unknown { border-color: #ecdcbf; background: #fffbf5; }
.verdict-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--red); border-radius: 50%; background: #fde8e6; font-weight: 900; }.not_found .verdict-icon { color: var(--green); background: #dff4ec; }.unknown .verdict-icon { color: #b97a20; background: #fff0d8; }
.violation-card small { color: #929cac; font-size: 7px; font-weight: 800; letter-spacing: .08em; }.violation-card strong { display: block; margin-top: 2px; font-size: 13px; }.violation-card p { margin: 4px 0 0; color: #788596; font-size: 8px; }.violation-card code { padding: 5px 7px; color: #576679; border-radius: 4px; background: rgba(70,83,101,.07); font-size: 9px; }
.evidence-box { margin-top: 10px; padding: 12px; border-left: 3px solid #6689c7; background: #f4f7fb; }.evidence-box span { color: #7d899b; font-size: 7px; font-weight: 800; }.evidence-box p { color: #45546a; font-size: 9px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; color: #8793a2; font-size: 7px; }.legend span { display: flex; align-items: center; gap: 4px; }.legend i { width: 6px; height: 6px; border-radius: 50%; }.legend .true { background: var(--red); }.legend .false { background: var(--green); }.legend .unknown { background: var(--amber); }

.validation-view, .json-view { min-height: 557px; padding: 28px; background: #fbfcfd; }
.validation-score { display: flex; align-items: center; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: white; }.validation-score h3 { margin: 0 0 4px; font-size: 15px; }.validation-score p { margin: 0; color: #8390a1; font-size: 10px; }
.score-ring { width: 64px; height: 64px; display: flex; align-items: baseline; justify-content: center; padding-top: 16px; color: var(--green); border: 6px solid #dcefe8; border-radius: 50%; }.score-ring.review { color: var(--amber); border-color: #f4e7cf; }.score-ring strong { font-size: 21px; }.score-ring span { font-size: 9px; }
.check-list { display: grid; gap: 8px; margin-top: 14px; }.check-list > div { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }.check-symbol { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: 10px; }.check-symbol.passed { color: var(--green); background: #e2f5ed; }.check-symbol.failed { color: var(--amber); background: #fff0d7; }.check-list strong { font-size: 10px; }.check-list em { color: #7b8798; font-size: 9px; font-style: normal; }
.validation-meta { display: grid; grid-template-columns: 130px 1fr; gap: 8px; margin-top: 18px; padding: 16px; color: #8490a1; border-radius: 8px; background: #f1f4f8; font-size: 9px; }.validation-meta strong { color: #49586c; }
.json-view { padding: 18px; }.json-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; color: #9ba8ba; border-radius: 8px 8px 0 0; background: #172235; font-size: 9px; }.json-toolbar button { border: 0; display: flex; align-items: center; gap: 6px; padding: 5px 8px; color: #ced7e4; border-radius: 5px; background: rgba(255,255,255,.1); cursor: pointer; font-size: 8px; }.json-view pre { max-height: 500px; margin: 0; padding: 18px; overflow: auto; color: #d5deea; border-radius: 0 0 8px 8px; background: #111b2b; font: 9px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }.json-key { color: #80b7ff; }.json-bool { color: #edab71; }.json-number { color: #9ad1ad; }

footer { display: flex; justify-content: space-between; padding: 13px 33px; color: #8d98a8; border-top: 1px solid var(--line); background: white; font-size: 8px; }
.processing { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #27364a; background: rgba(244,247,251,.94); backdrop-filter: blur(5px); }.processing strong { margin-top: 18px; font-size: 15px; }.processing p { color: #7d899a; font-size: 10px; }.spinner { width: 42px; height: 42px; border: 4px solid #dce5f5; border-top-color: #316ce8; border-radius: 50%; animation: spin .8s linear infinite; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 8px; padding: 12px 16px; color: white; border-radius: 8px; background: #25364e; box-shadow: 0 10px 25px rgba(22,34,52,.22); font-size: 11px; animation: toast-in .25s ease-out; }
.mobile-overlay { display: none; }
@keyframes spin { to { transform: rotate(360deg); } } @keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .split-view { grid-template-columns: 1fr; }.viewer-card { border-right: 0; border-bottom: 1px solid var(--line); }.paper { min-height: 400px; }.validation-view, .json-view { min-height: 600px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }.shell { width: 100%; margin-left: 0; }.menu-open .sidebar { transform: translateX(0); }.mobile-overlay { position: fixed; inset: 0; z-index: 15; background: rgba(14,24,40,.45); }.menu-open .mobile-overlay { display: block; }.mobile-menu { display: grid; margin-right: 14px; }.topbar { justify-content: flex-start; }.top-actions { margin-left: auto; }
  .workspace { grid-template-columns: 240px minmax(0,1fr); }.document-item { grid-template-columns: 33px 1fr; }.status-dot { display: none; }
}
@media (max-width: 700px) {
  .topbar { height: 72px; padding: 0 15px; }.topbar h1 { font-size: 16px; }.eyebrow, .engine-state { display: none; }.primary-button { padding: 10px; }.primary-button svg { margin: 0; }.content { padding: 16px 12px 24px; }.metrics { grid-template-columns: 1fr 1fr; gap: 8px; }.metrics article { min-height: 74px; padding: 12px; }.metrics em { display: none; }.workspace { display: block; }.document-panel { max-height: 340px; margin-bottom: 12px; }.detail-header { align-items: flex-start; gap: 10px; }.detail-file h2 { max-width: 170px; }.split-view { display: block; }.viewer-card, .structured-view { padding: 12px; }.paper { min-height: 410px; padding: 24px 18px 34px; }.paper pre { font-size: 10px; }.tabs { gap: 16px; overflow-x: auto; }.validation-view { padding: 15px; }.validation-score { padding: 14px; }.validation-meta { grid-template-columns: 1fr; }.mortgage-card dl { grid-template-columns: 1fr; }.top-actions .primary-button { font-size: 0; }.top-actions .primary-button svg { width: 19px; height: 19px; }.toast { inset: auto 12px 16px; }.json-view { padding: 10px; } footer { padding: 12px; } footer span:last-child { display: none; }
}
