* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color: var(--text-primary); background: var(--body-background); font-family: var(--font-family); font-size: var(--font-size-body); line-height: var(--line-height); }
body { margin: 0; }
/* Shared shell owns only viewport-sized Header / Body slots, never menu scrolling. */
.app-document { height: 100%; overflow: clip; }
.page-app { height: 100vh; height: 100dvh; overflow: clip; }
.app-layout { position: fixed; inset: 0; height: 100%; display: grid; grid-template-rows: var(--header-height) minmax(0, 1fr); overflow: clip; }
.app-layout > .app-header { min-height: 0; position: relative; z-index: 2; }
.app-body { min-width: 0; min-height: 0; overflow: clip; }
/* Receipt menu chooses one Body scroll surface; other menus can choose their own. */
.receipts-body { height: 100%; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input, a { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--focus-ring); }
a { color: inherit; text-decoration: none; }
button { transition: background var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast), transform .1s; }
button:hover:not(:disabled) { filter: brightness(.96); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .48; cursor: not-allowed; filter: grayscale(.3); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong, b { font-weight: var(--font-weight-bold); }
h1 { font-size: var(--font-size-page-title); line-height: 1.4; letter-spacing: -.9px; }
h2 { font-size: var(--font-size-section-title); letter-spacing: -.7px; }
h3 { font-size: var(--font-size-subtitle); letter-spacing: -.5px; }
.muted { color: var(--text-muted); font-size: var(--font-size-help); }
.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--button-height); padding: var(--button-padding); border: 1px solid var(--button-border-color); border-radius: var(--button-radius); font-size: var(--button-font-size); font-weight: var(--font-weight-medium); white-space: nowrap; background: var(--button-secondary-background); color: var(--text-primary); line-height: 1.25; }
/* Variants stay single-class specificity but only apply to .button elements. */
.primary:where(.button) { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: var(--button-shadow); }
.outline:where(.button) { color: var(--primary); border-color: var(--primary); }
.danger:where(.button) { background: var(--danger-background); border-color: var(--danger); color: var(--danger); }
.primary.danger:where(.button) { background: var(--danger); border-color: var(--danger); color: var(--on-primary); }
.button:hover:not(:disabled):not([aria-disabled=true]):not(.primary):not(.danger) { background: var(--button-hover-background); border-color: var(--primary); }
.button.danger:hover:not(:disabled) { box-shadow: 0 0 0 1px var(--danger); }
.button:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.button:active:not(:disabled):not([aria-disabled=true]) { filter: brightness(.92); }
.button:disabled, .button[aria-disabled=true] { background: var(--button-disabled-background); border-color: var(--button-disabled-border); color: var(--button-disabled-color); box-shadow: none; opacity: 1; filter: none; cursor: not-allowed; transform: none; }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } .button:active:not(:disabled) { transform: none; } }
.text-button { border: 0; color: var(--text-secondary); background: transparent; font-size: var(--font-size-caption); padding: 4px; text-decoration: underline; text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -70px; left: 20px; padding: 12px; z-index: 20; background: var(--surface-background); color: var(--primary); }
.skip-link:focus { top: 5px; }
.app-header { height: var(--header-height); display: flex; align-items: center; gap: var(--header-gap); padding: 0 var(--header-padding-x); min-width: 1280px; background: var(--header-background); color: var(--on-primary); }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand img { width: 35px; height: 35px; }
.brand > span { font-size: var(--font-size-subtitle); font-weight: var(--font-weight-bold); line-height: 1.3; letter-spacing: -.8px; }
.brand small { display: block; font-size: var(--font-size-caption); font-weight: var(--font-weight-normal); opacity: .65; letter-spacing: 2px; margin-top: 4px; }
.main-nav { display: flex; height: 100%; gap: var(--header-nav-gap); align-items: stretch; }
.main-nav > a, .main-nav > button { position: relative; display: inline-flex; align-items: center; gap: 7px; color: inherit; border: 0; background: transparent; padding: 0 2px; font-size: var(--font-size-menu); font-weight: var(--font-weight-medium); white-space: nowrap; }
.main-nav [aria-current]::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: var(--on-primary); }
.user-area { display: flex; align-items: center; gap: 9px; margin-left: auto; white-space: nowrap; font-size: var(--header-user-font-size); }
.user-area small { display: block; font-size: var(--header-meta-font-size); opacity: .65; }
.avatar { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; background: color-mix(in srgb, var(--on-primary) 16%, transparent); }
.logout { font-size: var(--font-size-caption); opacity: .8; margin-left: 8px; padding-left: 12px; border-left: 1px solid color-mix(in srgb, var(--on-primary) 25%, transparent); }
.app-header button.logout { color: inherit; background: transparent; border: 0; border-left: 1px solid color-mix(in srgb, var(--on-primary) 25%, transparent); font-family: inherit; cursor: pointer; padding: 8px 12px; }
.receipt-workspace { padding: 20px var(--page-padding) 12px; max-width: var(--content-max-width); min-width: 1280px; margin: auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.breadcrumb { color: var(--text-muted); font-size: var(--font-size-breadcrumb); display: block; margin-bottom: 3px; }
.receipt-layout { display: grid; grid-template-columns: minmax(420px, 37fr) minmax(740px, 63fr); gap: var(--section-gap); align-items: start; }
.panel { background: var(--surface-background); border: 1px solid var(--border); border-radius: var(--panel-radius); overflow: hidden; }
.list-panel { padding: var(--panel-padding); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--component-gap); margin-bottom: 12px; }
.section-heading h2 { line-height: 1.5; }
.total-label { color: var(--text-secondary); font-weight: var(--font-weight-normal); font-size: var(--font-size-label); margin-left: 8px; white-space: nowrap; letter-spacing: normal; }
.total-label b { font-weight: var(--font-weight-medium); }
.search-form { display: flex; margin-bottom: 14px; }
.search-input { position: relative; flex: 1; min-width: 0; }
.search-input .icon { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); color: var(--text-muted); }
input, select { width: 100%; min-width: 0; height: var(--input-height); border: var(--input-border); border-radius: var(--input-radius); padding: 0 var(--input-padding-x); font-size: var(--input-font-size); color: var(--text-primary); background: var(--surface-background); }
select { height: var(--select-height); border: var(--select-border); border-radius: var(--select-radius); font-family: inherit; font-size: var(--select-font-size); }
input[type=checkbox], input[type=radio] { width: var(--checkbox-size); height: var(--checkbox-size); padding: 0; accent-color: var(--checkbox-accent); cursor: pointer; }
input[readonly], select:disabled { background: var(--input-readonly-background); }
input::placeholder { color: var(--text-muted); }
input:focus, select:focus { border-color: var(--primary); }
.search-input input { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-left: 41px; }
.search-button { border-top-left-radius: 0; border-bottom-left-radius: 0; min-width: 80px; background: var(--secondary); color: var(--on-primary); }
.status-filters { display: flex; gap: 7px; margin-bottom: 14px; }
.filter { background: var(--surface-background); color: var(--text-primary); padding: 6px 13px; min-height: 35px; border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: var(--font-size-label); white-space: nowrap; }
/* 색상은 업무 목록 필터(.workspace-filter)와 같다(2026-11-09): 선택 남색, 미선택 흰 바탕, 마우스 오버 파란 테두리 */
.filter:hover { border-color: var(--primary); }
.filter.active { background: var(--secondary); color: var(--on-primary); border-color: var(--secondary); font-weight: var(--font-weight-medium); }
.data-table { width: 100%; border-spacing: 0; border: var(--table-border); border-radius: var(--table-radius); overflow: hidden; table-layout: fixed; font-size: var(--table-font-size); }
.data-table th { text-align: left; font-weight: var(--font-weight-medium); }
.data-table thead th { height: var(--table-header-height); background: var(--table-header-background); color: var(--text-primary); }
.data-table th, .data-table td { padding: var(--table-cell-padding); border-bottom: var(--table-border); border-right: var(--table-border); overflow-wrap: anywhere; line-height: 1.45; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tr > :last-child { border-right: 0; }
.data-table tbody td, .data-table tbody th { height: var(--table-row-height); }
.applicant-table-scroll { min-height: 350px; }
.applicant-table thead { position: sticky; top: 0; z-index: 1; }
.applicant-table th:nth-child(1) { width: 36%; }
.applicant-table th:nth-child(2) { width: 34%; }
.applicant-table th:nth-child(3) { width: 30%; }
.applicant-table td:first-child { padding: 0; }
.applicant-table tr.selected { background: var(--table-selected-background); }
.applicant-table tr.selected td:first-child { box-shadow: inset 3px 0 var(--primary); }
.applicant-table tbody tr:hover { background: var(--panel-background); }
.applicant-table tbody tr.selected:hover { background: var(--table-selected-background); }
.row-select { display: block; color: var(--text-primary); text-align: left; border: 0; background: transparent; font-size: var(--table-font-size); width: 100%; min-height: var(--table-row-height); padding: 7px 13px; line-height: 1.45; overflow-wrap: anywhere; }
.selected .row-select { font-weight: var(--font-weight-bold); }
.badge { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-size: var(--badge-font-size); line-height: 1.4; border-radius: var(--badge-radius); padding: var(--badge-padding); font-weight: var(--font-weight-medium); }
.badge.info { color: var(--info); background: var(--info-background); }
.badge.success { color: var(--success); background: var(--success-background); }
.badge.category { background: var(--info-background); color: var(--primary); border-radius: 5px; }
.badge.neutral { background: var(--panel-background); color: var(--text-secondary); border-radius: 5px; }
.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 13px; color: var(--text-secondary); font-size: var(--font-size-caption); }
.list-hint { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--text-muted); margin-top: 9px; font-size: var(--font-size-help); }
.detail-overview { padding: var(--panel-padding); }
.detail-title { align-items: start; }
.title-group { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.title-group h2 { overflow-wrap: anywhere; }
.detail-title > button { flex-shrink: 0; }
.contact-strip { display: grid; grid-template-columns: 1fr 1fr; background: var(--table-header-background); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 20px; }
.contact-strip > div { display: flex; align-items: center; gap: 20px; }
.contact-strip > div + div { border-left: 1px solid var(--border); padding-left: 25px; }
.contact-strip .icon { width: 25px; height: 25px; color: var(--primary); }
.contact-strip span { color: var(--text-secondary); font-size: var(--font-size-label); }
.contact-strip strong { display: block; color: var(--text-primary); font-size: var(--font-size-subtitle); line-height: 1.4; }
.detail-section { border-top: 1px solid var(--divider); padding: var(--panel-padding); }
.detail-section .section-heading { margin-bottom: 8px; }
.button-group { display: flex; gap: 9px; }
.inline-info { color: var(--info); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: var(--font-size-help); margin: 4px 0 10px; }
.inline-info .icon, .info-banner .icon { width: 17px; height: 17px; }
.sample-tag { font-size: var(--font-size-help); color: var(--text-muted); }
.creditor-table th:nth-child(1) { width: 28%; }
.creditor-table th:nth-child(2) { width: 37%; }
.creditor-table th:nth-child(3) { width: 35%; }
.info-banner { display: flex; align-items: start; gap: 7px; padding: 7px 11px; margin-top: 8px; border-radius: var(--radius-sm); color: var(--info); background: var(--info-background); font-size: var(--font-size-help); }
.info-banner .icon { margin-top: 2px; }
.documents-table th:first-child { width: 26%; }
.documents-table tbody th { font-weight: var(--font-weight-medium); background: var(--panel-background); }
.documents-table tbody tr > * { height: calc(var(--table-row-height) - 5px); padding-top: 5px; padding-bottom: 5px; }
.detail-actions { display: flex; gap: 8px; justify-content: end; align-items: center; margin-top: 13px; }
.detail-actions .muted { margin-right: auto; }
.workspace-footnote { color: var(--text-muted); font-size: var(--font-size-help); padding-top: 12px; }
.empty-state { padding: 55px 18px; text-align: center; color: var(--text-muted); }
.empty-state > .icon { width: 32px; height: 32px; display: block; margin: 0 auto 12px; }
.empty-state strong { color: var(--text-secondary); display: block; }
.empty-state p { margin: 8px 0 17px; }
.detail-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 650px; }
.empty-avatar { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; color: var(--primary); background: var(--info-background); margin-bottom: 15px; }
.empty-avatar .icon { width: 33px; height: 33px; }
.mock-dialog { width: min(460px, calc(100vw - 40px)); border: 1px solid var(--border); border-radius: var(--modal-radius); padding: var(--modal-padding); box-shadow: var(--modal-shadow); color: var(--text-primary); background: var(--surface-background); }
.mock-dialog::backdrop { background: var(--modal-backdrop); }
.dialog-icon { width: 44px; height: 44px; display: grid; place-items: center; background: var(--info-background); color: var(--primary); border-radius: var(--radius-xl); margin-bottom: 16px; }
.mock-dialog h2 { margin-bottom: 12px; }
.mock-dialog p { margin-bottom: 12px; }
.mock-dialog form { text-align: right; margin-top: 22px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: var(--font-size-label); font-weight: var(--font-weight-medium); margin-bottom: 8px; }
.field input { height: calc(var(--input-height) + 8px); }
.field input[aria-invalid] { border-color: var(--danger); }
.login-error { min-height: 28px; color: var(--danger); font-size: var(--font-size-label); }
.login-submit { width: 100%; height: calc(var(--button-height) + 12px); justify-content: space-between; padding-left: 20px; padding-right: 20px; margin-top: 6px; }
.login-notice { display: flex; gap: 12px; padding: 18px 16px; margin-top: 30px; border: 1px solid var(--border); background: var(--panel-background); border-radius: var(--panel-radius); font-size: var(--font-size-caption); color: var(--text-secondary); line-height: 1.8; }
.login-notice .icon { margin-top: 2px; color: var(--primary); }
@media (min-width: 1600px) { .app-header { gap: 48px; padding: 0 36px; } .main-nav { gap: 40px; } .receipt-workspace { padding-top: 24px; } .data-table th, .data-table td { padding-left: 18px; padding-right: 18px; } .row-select { padding-left: 18px; } }
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
/* Header user area links to 마이페이지. */
.user-link { display: flex; align-items: center; gap: 9px; color: inherit; border-radius: var(--radius-md); padding: 4px 6px; }
.user-link:hover, .user-link:focus-visible { background: color-mix(in srgb, var(--on-primary) 12%, transparent); }

.notice-entry-popup { width:min(760px, calc(100vw - 40px)); }
.notice-entry-popup h2 { overflow-wrap:anywhere; }
.notice-entry-popup pre { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.7; max-height:50vh; overflow:auto; margin:var(--space-4) 0; }
.notice-entry-popup footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:var(--space-3); margin-top:var(--space-4); }
.notice-entry-popup footer label { display:inline-flex; align-items:center; gap:var(--space-2); cursor:pointer; }
.text-emphasis-blue { color:var(--emphasis-blue); }
.text-emphasis-red { color:var(--emphasis-red); }
