/* MOABIZ ERP 공통 스타일 — 셸 · 컴포넌트 · 상태 패턴 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--canvas); color: var(--ink-900); font-family: var(--font); font-size: var(--fs-body); font-variant-numeric: tabular-nums; }
h1, h2, h3 { letter-spacing: -0.015em; margin: 0; }
a { color: var(--navy); }
a:hover { color: var(--navy-hover); }
button, a, input, select, textarea, label { transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, filter .15s ease, color .15s ease; }
button { font: inherit; cursor: pointer; }
button:not(:disabled):hover { filter: brightness(.95); }
button:not(:disabled):active { filter: brightness(.9); }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy) !important; box-shadow: 0 0 0 3px rgba(27,42,74,.14) !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #C9CFD9; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-500); }
.boot { display: flex; align-items: center; justify-content: center; height: 100vh; color: var(--ink-500); }

/* ── 버튼 ─────────────────────────────── */
.btn { height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-field); background: var(--surface); color: var(--ink-900); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; text-decoration: none; }
.btn.sm { height: 32px; padding: 0 12px; }
.btn.lg { height: 44px; font-weight: 600; }
.btn.primary { border: 0; background: var(--navy); color: #fff; font-weight: 600; padding: 0 18px; box-shadow: var(--shadow-btn); }
.btn.outline { border-color: var(--navy); color: var(--navy); font-weight: 600; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-800); }
.btn.danger { border-color: var(--danger-line); color: var(--danger); font-weight: 600; }
.btn:disabled { background: #E6E9ED; color: #6B7480; border-color: #E6E9ED; box-shadow: none; }
.btn.ready-disabled { border: 1px dashed #E3B9C1; background: #fff; color: var(--ink-400); }
.icon-btn { width: 36px; height: 36px; border: 0; border-radius: var(--r-field); background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.chip { height: 26px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 13px; background: #fff; color: var(--ink-900); font-size: 12px; }
.chip[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; font-weight: 600; }
.chip.warn { color: var(--warn); }

/* ── 배지 ─────────────────────────────── */
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.draft, .badge.auto { background: var(--canvas); color: var(--ink-800); }
.badge.request { background: var(--navy-soft); color: var(--navy); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.tag { padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--canvas); color: var(--ink-800); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
/* 준비 중 · 팝빌 */
.ready { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 10px; background: linear-gradient(90deg, #FFF0F2, #EEF1F8); border: 1px solid var(--ready-line); color: var(--ready-fg); font-size: 11px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.ready::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--red-on-dark); }
.ready-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--ready-line); border-radius: var(--r-card); background: linear-gradient(90deg, #FFF7F8, #F6F8FC); }
.ready-card strong { display: block; margin-bottom: 2px; }
.ready-overlay { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(245,246,248,.86); backdrop-filter: blur(2px); }
.ready-overlay .box { max-width: 460px; padding: 28px; background: #fff; border: 1px solid var(--ready-line); border-radius: var(--r-panel); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; gap: 12px; }

/* ── 입력 필드 ─────────────────────────── */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .field > .label, legend.label { font-size: var(--fs-label); color: var(--ink-700); font-weight: 500; padding: 0; }
.req { color: var(--danger); }
.input, .select, .textarea { height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-field); background: #fff; font: inherit; color: var(--ink-900); min-width: 0; width: 100%; }
.textarea { height: auto; padding: 8px 10px; }
.input.lg { height: 44px; padding: 0 12px; font-size: 14px; }
.input[aria-invalid="true"] { border: 2px solid var(--danger); padding: 0 9px; }
.input[readonly] { background: #F4F6F8; border-color: var(--line); }
.field .err { font-size: 12px; color: var(--danger); }
.field .hint { font-size: 12px; color: var(--ink-700); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.row { display: flex; gap: 8px; align-items: center; }
.check { display: inline-flex; align-items: center; gap: 6px; }
kbd { font-family: inherit; font-size: 11px; font-weight: 600; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface-2); color: var(--ink-700); }

/* ── 셸 ───────────────────────────────── */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 16px; background: var(--shell); color: #E6EAEE; position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; }
.brand:hover { color: #fff; }
.brand .erp { margin-left: -3px; color: var(--red-on-dark); font-weight: 800; }
.co-switch { height: 32px; padding: 0 10px; border: 1px solid var(--shell-line); border-radius: var(--r-field); background: var(--shell-btn); color: #E6EAEE; display: flex; align-items: center; gap: 6px; }
.gsearch { flex: 1 1 280px; max-width: 560px; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: var(--r-field); background: var(--shell-input); color: #AEB7C2; position: relative; }
.gsearch input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font: inherit; outline: none; box-shadow: none !important; }
.gsearch input::placeholder { color: #AEB7C2; }
.gsearch .k { font-size: 11px; padding: 1px 6px; border: 1px solid #46537A; border-radius: 4px; }
.gsearch-pop { position: absolute; top: 38px; left: 0; right: 0; background: #fff; color: var(--ink-900); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-pop); padding: 6px; max-height: 420px; overflow: auto; z-index: 40; }
.gsearch-pop button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; color: var(--ink-900); }
.gsearch-pop button[aria-selected="true"] { background: var(--navy-select); box-shadow: inset 3px 0 0 var(--navy); }
.gsearch-pop .grp { font-size: 11px; color: var(--ink-500); padding: 6px 10px 2px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top-actions .icon-btn { color: #E6EAEE; }
.dot-count { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #E5484D; color: #fff; font-size: 10px; line-height: 16px; font-weight: 700; }
.me-btn { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 8px; border: 0; border-radius: var(--r-field); background: transparent; color: #E6EAEE; }
.avatar { width: 26px; height: 26px; border-radius: 13px; background: #2E3B63; color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.menu-pop { position: absolute; right: 0; top: 42px; min-width: 220px; background: #fff; color: var(--ink-900); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-pop); padding: 6px; z-index: 40; }
.menu-pop button, .menu-pop a { display: flex; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; color: var(--ink-900); text-decoration: none; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--surface-2); }
.offline { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid #F1D3A8; }

.body { flex: 1; display: flex; align-items: stretch; min-height: 0; }
.sidenav { width: 232px; flex: none; background: var(--nav); color: var(--nav-fg); padding: 12px 0 24px; overflow-y: auto; position: sticky; top: 48px; height: calc(100vh - 48px); }
.sidenav .sec { padding: 0 16px 6px; font-size: 11px; font-weight: 600; color: var(--ink-400); }
.sidenav a, .sidenav button.grp { display: flex; align-items: center; gap: 8px; margin: 0 8px; padding: 6px 10px; border-radius: var(--r-field); color: var(--nav-fg); text-decoration: none; border: 0; background: transparent; width: calc(100% - 16px); text-align: left; }
.sidenav a:hover, .sidenav button.grp:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidenav button.grp { margin: 1px 10px; width: calc(100% - 20px); padding: 8px 10px; font-weight: 600; gap: 10px; }
.sidenav button.grp[aria-expanded="true"] { color: #fff; background: rgba(255,255,255,.06); }
.sidenav button.grp .chev { margin-left: auto; color: #7F8BA6; font-size: 12px; }
.sidenav .items a { display: block; }
.sidenav .items a[aria-current="page"] { background: var(--nav-active); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--red-on-dark); }
.sidenav .items a .no { color: #7F8BA6; font-size: 11px; margin-right: 6px; }
.sidenav .grpwrap { padding-top: 10px; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mdi { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px; padding: 6px 12px 0; background: var(--tabbar); border-bottom: 1px solid var(--line-strong); }
.mdi .tab { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px; border-radius: 6px 6px 0 0; background: var(--tab-off); }
.mdi .tab.on { height: 34px; background: #fff; border: 1px solid var(--line-strong); border-bottom-color: #fff; margin-bottom: -1px; }
.mdi .tab > button.lbl { border: 0; background: transparent; padding: 0; color: var(--ink-800); }
.mdi .tab.on > button.lbl { color: var(--ink-900); font-weight: 600; }
.mdi .tab .dirty { width: 7px; height: 7px; border-radius: 4px; background: var(--warn-line); display: inline-block; }
.mdi .tab .x { width: 20px; height: 20px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-700); padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.mdi .tab .x:hover { background: rgba(0,0,0,.06); }
.stage { flex: 1; padding: 12px; min-height: 0; display: flex; }
.card-page { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid #E3E7ED; border-radius: var(--r-panel); box-shadow: var(--shadow-2); overflow: hidden; position: relative; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 28px; border-bottom: 1px solid #EDF0F4; }
.crumb { font-size: 12px; color: var(--ink-500); }
.page-head h1 { margin-top: 4px; font-size: var(--fs-menu-title); font-weight: 700; }
.page-body { flex: 1; min-height: 0; display: flex; }
.page-body.pad { padding: 20px 24px; flex-direction: column; gap: 16px; }
.actionbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 24px; border-top: 1px solid var(--line); background: #fff; }
.actionbar .info { margin-right: auto; font-size: 12px; color: var(--ink-700); }
.ctx-panel { width: 280px; flex: none; background: var(--surface-2); border-left: 1px solid var(--line-soft); padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.ctx-panel h2 { font-size: 13px; font-weight: 700; }

/* ── 카드 · 표 ─────────────────────────── */
.home { flex: 1; padding: 20px 24px 32px; display: flex; flex-direction: column; gap: 16px; background: var(--page); border-radius: var(--r-panel); overflow: auto; }
.home h1 { font-size: var(--fs-screen-title); font-weight: 700; margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: #fff; border: 1px solid #E3E7ED; border-radius: var(--r-card); box-shadow: var(--shadow-1); color: var(--ink-900); text-decoration: none; text-align: left; }
.kpi .l { font-size: 12px; color: var(--ink-700); font-weight: 500; }
.kpi .v { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.kpi .v small { font-size: 13px; font-weight: 500; color: var(--ink-700); margin-left: 4px; }
.kpi .s { font-size: 12px; color: var(--ink-700); }
.panel { background: #fff; border: 1px solid #E3E7ED; border-radius: var(--r-card); box-shadow: var(--shadow-1); min-width: 0; }
.panel > .ph { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.panel > .ph h2 { font-size: var(--fs-section); font-weight: 700; }
.todo { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-faint); color: var(--ink-900); text-decoration: none; background: transparent; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.todo:hover { background: var(--surface-2); }
.todo .cnt { min-width: 36px; height: 24px; padding: 0 8px; border-radius: 12px; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { background: var(--surface-2); color: var(--ink-700); font-size: 12px; font-weight: 600; text-align: left; padding: 8px; }
.tbl td { padding: 9px 8px; border-top: 1px solid var(--line-faint); }
.tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 16px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12px; font-weight: 500; background: var(--canvas); color: var(--ink-800); }

/* ── 목록 + 상세 (거래처 · 품목) ─────────── */
.master { flex: 1; display: flex; min-height: 0; flex-wrap: wrap; }
.master-list { flex: 1 1 300px; max-width: 380px; min-width: 0; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; min-height: 0; }
.master-list .filters { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.master-list .scroll { flex: 1; overflow-y: auto; }
.mrow { display: flex; flex-direction: column; gap: 2px; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line-faint); background: #fff; color: var(--ink-900); text-align: left; width: 100%; }
.mrow:hover { background: var(--surface-2); }
.mrow[aria-selected="true"] { background: var(--navy-select); box-shadow: inset 3px 0 0 var(--navy); }
.mrow .t { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.mrow .m { font-size: 12px; color: var(--ink-700); }
.master-form { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; }
.ftabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line-soft); }
.ftabs button { height: 42px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-700); font-weight: 600; }
.ftabs button[aria-selected="true"] { border-bottom-color: var(--navy); color: var(--ink-900); }
.ftabs .wdot { display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 3px; background: var(--warn-line); vertical-align: middle; }
.fbody { flex: 1; padding: 18px 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.notice { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-field); font-size: 12px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid #F1D3A8; }
.notice.info { background: var(--navy-soft); color: var(--navy); }
.notice.danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #F3C1BB; }
.valsum { margin: 0 24px 0; padding: 12px 14px; border: 1px solid #F3C1BB; border-radius: var(--r-card); background: var(--danger-soft); color: var(--danger); display: flex; flex-direction: column; gap: 6px; }
.valsum button { border: 0; background: transparent; color: var(--danger); text-align: left; padding: 0; text-decoration: underline; }
.valsum .k { font-weight: 700; margin-right: 6px; text-decoration: none; }

/* ── 그리드 래퍼 ───────────────────────── */
.grid-wrap { flex: 1; min-height: 280px; display: flex; flex-direction: column; }
.grid-wrap .ag-theme-quartz { flex: 1; }
.ag-theme-quartz {
  --ag-font-family: var(--font);
  --ag-font-size: 13px;
  --ag-row-height: 32px;
  --ag-header-height: 34px;
  --ag-foreground-color: var(--ink-900);
  --ag-header-foreground-color: var(--ink-700);
  --ag-header-background-color: var(--surface-2);
  --ag-border-color: var(--line-strong);
  --ag-row-border-color: var(--line-soft);
  --ag-row-hover-color: var(--surface-2);
  --ag-selected-row-background-color: var(--navy-select);
  --ag-range-selection-border-color: var(--navy);
  --ag-input-focus-border-color: var(--navy);
  --ag-active-color: var(--navy);
  --ag-wrapper-border-radius: 8px;
  --ag-borders: solid 1px;
  --ag-cell-horizontal-padding: 10px;
}
.ag-theme-quartz .ag-header-cell-text { font-weight: 600; font-size: 12px; }
.ag-theme-quartz .ag-row-selected { box-shadow: inset 3px 0 0 var(--navy); }
.grid-foot { display: flex; justify-content: space-between; padding: 8px 2px 0; font-size: 12px; color: var(--ink-700); }

/* ── 상태 패턴 ─────────────────────────── */
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 40px 24px; color: var(--ink-700); flex: 1; }
.state strong { color: var(--ink-900); font-size: 15px; }
.state .acts { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.skel { display: flex; flex-direction: column; gap: 10px; padding: 16px; width: 100%; }
.skel span { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #EEF0F3, #F7F8FA, #EEF0F3); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel span { animation: none; } }
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 300px; max-width: 460px; padding: 12px 14px; border-radius: var(--r-card); background: var(--shell); color: #E6EAEE; box-shadow: var(--shadow-pop); }
.toast.err { background: #fff; color: var(--danger); border: 1px solid #F3C1BB; }
.toast a { color: #9DB4F0; }
.toast .x { margin-left: auto; color: inherit; }
.modal-back { position: fixed; inset: 0; background: rgba(18,27,51,.4); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 460px; background: #fff; border-radius: var(--r-panel); box-shadow: var(--shadow-pop); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.modal h2 { font-size: 17px; font-weight: 700; }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }

/* ── 로그인 ───────────────────────────── */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--page); font-size: 14px; }
.login-hero { flex: 1 1 420px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 48px 56px; background: radial-gradient(900px 520px at 105% -10%, rgba(240,68,95,0.20), transparent 60%), radial-gradient(800px 520px at -15% 115%, rgba(61,90,158,0.55), transparent 60%), var(--shell); color: #E6EAEE; }
.login-hero h1 { font-size: 38px; line-height: 1.3; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.login-hero p { color: #B5BDC7; line-height: 1.7; margin: 0; }
.login-hero ul { margin: 12px 0 0; padding: 20px 22px; list-style: none; display: flex; flex-direction: column; gap: 14px; border: 1px solid rgba(255,255,255,0.10); border-radius: 16px; background: rgba(255,255,255,0.04); }
.login-hero li { display: flex; gap: 12px; align-items: flex-start; }
.login-hero li .ck { flex: none; width: 22px; height: 22px; border-radius: 11px; background: rgba(240,68,95,0.16); color: #FF8A9C; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.login-hero li small { color: #AEB7CC; font-size: 13px; }
.login-side { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.login-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 24px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; gap: 8px; font-size: 12px; }
.steps li { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-500); }
.steps li .n { width: 20px; height: 20px; border-radius: 10px; background: var(--ink-500); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.steps li.on { color: var(--ink-900); } .steps li.on .n { background: var(--navy); }
.steps li.done { color: var(--ok); } .steps li.done .n { background: var(--ok); }
.login-card { display: flex; flex-direction: column; gap: 16px; padding: 32px; background: #fff; border: 1px solid #E6E9EF; border-radius: var(--r-panel); box-shadow: var(--shadow-2); }
.login-card h2 { font-size: 22px; font-weight: 700; }
.co-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-field); background: #fff; cursor: pointer; }
.co-opt.on { border-color: var(--navy); background: var(--navy-select); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--ink-500); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

/* ── 반응형 ───────────────────────────── */
@media (max-width: 900px) {
  .sidenav { position: fixed; left: 0; top: 48px; z-index: 35; transform: translateX(-100%); transition: transform .2s ease; }
  .sidenav.open { transform: none; box-shadow: var(--shadow-pop); }
  .nav-toggle { display: inline-flex !important; }
  .ctx-panel { display: none; }
  .page-head { padding: 14px 16px; }
  .fbody { padding: 16px; }
  .actionbar { padding: 10px 16px; }
  .master-list { max-width: none; border-right: 0; border-bottom: 1px solid var(--line-soft); max-height: 320px; }
  .login-hero { padding: 32px 24px; }
  .login-hero h1 { font-size: 28px; }
}
.nav-toggle { display: none !important; }

/* ── 입력 그리드 (판매 · 구매 · 전표) ─────── */
.tbl.entry th { position: sticky; top: 0; z-index: 1; border-bottom: 1px solid var(--line-strong); }
.tbl.entry td { padding: 0 4px; height: 33px; border-top: 1px solid var(--line-soft); }
.tbl.entry td:first-child { padding-left: 12px; }
.tbl.entry td.calc { background: var(--surface-2); padding: 0 10px; }
.cell { width: 100%; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--r-cell); background: transparent; font: inherit; color: var(--ink-900); }
.cell:hover { border-color: var(--line); }
.cell:focus { outline: none; background: #fff; border-color: var(--navy) !important; box-shadow: inset 0 0 0 1px var(--navy) !important; }
.cell[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.cell.num { text-align: right; }

/* ── 인쇄 (거래명세서 · 증명서): 출력물만 남긴다 ─── */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  body * { visibility: hidden; }
  .print-doc, .print-doc * { visibility: visible; }
  .print-doc { position: absolute; left: 0; top: 0; width: 100% !important; max-width: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
}
