:root { --bg:#eef1f6; --panel:#fff; --line:#c8d0dc; --head:#dfe6f0; --tag:#1d3f9a; --tag-text:#fff; --sel:#2f6fd6; --text:#1b2230; --muted:#5b6678; --ok:#1d7a3e; --err:#b42318; }
* { box-sizing: border-box; }
body { margin:0; font: 13px/1.4 "Malgun Gothic","맑은 고딕",system-ui,sans-serif; background:var(--bg); color:var(--text); }
.topbar { display:flex; gap:16px; align-items:center; padding:6px 12px; background:#24324a; color:#fff; }
.topbar .who { color:#cfd6e3; } .topbar form { margin:0; } .topbar .company-switch { margin-left:auto; }
button.link { background:none; border:0; color:#cfd6e3; cursor:pointer; }
.net-banner { background:#fff4ce; color:#6b4e00; padding:6px 12px; border-bottom:1px solid #e8d48a; }
.toast { position:fixed; right:16px; bottom:16px; padding:8px 14px; border-radius:6px; background:#24324a; color:#fff; z-index:10; }
.toast.ok { background:var(--ok); } .toast.err { background:var(--err); }
.toolbar { display:flex; gap:4px; padding:6px 12px; background:var(--head); border-bottom:1px solid var(--line); flex-wrap:wrap; }
.toolbar button { padding:4px 10px; border:1px solid var(--line); background:#fff; border-radius:3px; cursor:pointer; }
.screen { padding:8px 12px; } .screen h2 { font-size:14px; margin:4px 0 8px; } .screen h2 small { color:var(--muted); font-weight:normal; }
.search { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:8px; }
.search #q { width:240px; } .count { color:var(--muted); }
.tag { display:inline-block; min-width:76px; padding:3px 6px; background:var(--tag); color:var(--tag-text); text-align:center; border-radius:2px; }
input, select, textarea { font:inherit; padding:3px 5px; border:1px solid var(--line); border-radius:2px; background:#fff; color:var(--text); }
input.n { text-align:right; } input[readonly] { background:#f3f5f8; }
.split { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:10px; }
.grid-wrap { background:var(--panel); border:1px solid var(--line); overflow:auto; max-height:calc(100vh - 170px); }
.grid { border-collapse:collapse; width:100%; white-space:nowrap; }
.grid th { position:sticky; top:0; background:var(--head); border:1px solid var(--line); padding:3px 6px; font-weight:normal; }
.grid td { border:1px solid #e3e7ee; padding:2px 6px; } .grid .n { text-align:right; }
.grid tr:hover td { background:#f4f7fc; } .grid tr.sel td { background:var(--sel); color:#fff; }
.detail { background:var(--panel); border:1px solid var(--line); padding:8px; display:flex; flex-direction:column; gap:4px; align-self:start; }
.detail .row { display:flex; gap:4px; align-items:center; } .detail .row input, .detail .row textarea { flex:1; min-width:0; }
.detail .row.two input { width:80px; } .detail output { min-width:44px; text-align:right; color:var(--muted); }
.detail .chk { white-space:nowrap; } .detail .checks { gap:16px; }
.login { display:grid; place-items:center; min-height:100vh; }
.login-box { background:#fff; padding:24px; border:1px solid var(--line); display:grid; gap:10px; width:min(320px, calc(100vw - 32px)); }
.login-box h1 { font-size:16px; margin:0 0 6px; } .login-box label { display:grid; gap:4px; } .login-box .err { color:var(--err); margin:0; }
@media (max-width: 900px) { .split { grid-template-columns:1fr; } }
.split.cp { grid-template-columns: 300px minmax(0,1fr); }
.grid-wrap.small { max-height: 260px; margin-bottom: 8px; }
.upload { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-bottom:8px; }
.upload .hint { color:var(--muted); }
.grid tr.bad td { background:#fdecea; }
.toolbar-link { margin-left:auto; align-self:center; color:var(--tag); }
.split.cust { grid-template-columns: minmax(0,1fr) minmax(0,620px); }
.detail.wide .row input:not([type=radio]):not([type=checkbox]), .detail.wide .row select { flex:1; min-width:0; }
.detail.wide .row input.short { flex:0 0 70px; } .detail.wide .row input.code { flex:0 0 90px; }
.detail .radios { display:flex; gap:8px; flex-wrap:wrap; flex:1; } .detail .radios label { white-space:nowrap; }
.detail hr { border:0; border-top:1px solid var(--line); margin:4px 0; width:100%; }
.tag.red { background:var(--err); } .sep { width:12px; }
.toolbar-link2 { align-self:center; color:var(--tag); margin-left:12px; }
.hint { color:var(--muted); margin:4px 0 0; }
.grid tr.stopped td { color:#98a2b3; }
.slip-head { background:var(--panel); border:1px solid var(--line); padding:6px 8px; display:flex; flex-direction:column; gap:4px; margin-bottom:6px; }
.slip-head .row, .row.pay { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.slip-head input:not(.short) { flex:1; min-width:120px; } .slip-head input.short { width:90px; }
.slip-head output { min-width:90px; padding:2px 6px; border:1px solid var(--line); background:#f3f5f8; }
.cust-q { max-width:260px; } .cust-name { font-weight:bold; min-width:160px; background:#fff59d; padding:2px 6px; }
.slip-no { margin-left:auto; color:var(--muted); }
.grid-wrap.lines { max-height:calc(100vh - 470px); min-height:180px; }
.grid input.cell { width:100%; min-width:0; border:0; background:transparent; padding:1px 3px; }
.grid input.cell.n { text-align:right; } .grid input.cell:focus { background:#fffbe6; outline:1px solid var(--sel); }
.grid td.short-cell { min-width:220px; } .grid tfoot td { background:var(--head); font-weight:bold; }
.row.pay { margin-top:6px; } .row.pay input { width:110px; }
.picker { width:min(900px, calc(100vw - 32px)); padding:10px; border:1px solid var(--line); }
.picker .row { display:flex; gap:8px; align-items:center; margin-bottom:6px; } .picker #picker-q { flex:1; }
.picker .grid-wrap { max-height:60vh; }
.warn { color:var(--err); font-weight:bold; }
#lines input.qty { width:70px; } #lines input.price { width:90px; } #lines input.memo { width:140px; }
#lines td.name { max-width:260px; overflow:hidden; text-overflow:ellipsis; } #lines td.spec { max-width:220px; overflow:hidden; text-overflow:ellipsis; }
.tb-chk { align-self:center; margin-left:6px; }
.split.pay-split { grid-template-columns: 360px minmax(0,1fr); }

/* 재고 화면 */
.grid-wrap.tall { max-height: calc(100vh - 230px); }
.grid td.strong { font-weight: 600; }
.grid tr.carried td { background: var(--head-bg, #f3f4f6); font-weight: 600; }
.grid td a { color: inherit; }
.grid tr.muted td { color: #9ca3af; text-decoration: line-through; }
.grid tr.warn td { background: #fff7ed; }
tr.done td { color:#7a8494; }

/* 전체 메뉴 */
.menu-grid { columns: 4 260px; column-gap: 16px; }
.menu-group { break-inside: avoid; background:#fff; border:1px solid #d5dbe6; border-radius:6px; padding:10px 14px; margin:0 0 16px; }
.menu-group h3 { margin:0 0 6px; font-size:14px; color:var(--tag); }
.menu-group ul { list-style:none; margin:0; padding:0; }
.menu-group li { padding:2px 0; font-size:13px; }
.menu-group a { color:#0b3d91; font-weight:600; text-decoration:none; }
.menu-group a:hover { text-decoration:underline; }
.menu-group .soon { color:#9aa3b2; }
.topbar a.brand { color:#fff; text-decoration:none; margin-right:14px; }
table.grid tr.err td { color:var(--err); }
.tabs { display:flex; gap:2px; margin:0 0 6px; border-bottom:2px solid var(--tag); }
.tabs button { border:1px solid var(--line); border-bottom:0; background:var(--head); padding:5px 12px; border-radius:4px 4px 0 0; cursor:pointer; }
.tabs button.on { background:var(--tag); color:var(--tag-text); font-weight:bold; }
.tb-chk.warn { color:var(--err); font-weight:bold; }
.as .grid td label { white-space:nowrap; margin-right:4px; }
.as .grid input.cell.short { width:56px; } .as .grid input.cell.n { width:70px; } .as .grid td { white-space:nowrap; }
.as [hidden] { display:none !important; }
.as .slip-head #date { flex:0 0 150px; } .as .slip-head #message { flex:0 1 420px; } .as .slip-head #scan { flex:1 1 320px; }
.as .grid input.cell.serial { width:104px; } .as .grid input.cell.ns-batch { width:130px; } .as .grid input.cell.memo, .as .grid input.cell.cmemo, .as .grid input.cell.account { width:170px; }
.as .grid select.requester { max-width:170px; }
.as .grid-wrap.tall { max-height: calc(100vh - 330px); }
.count .grid td.plus { color:#0a6b2b; font-weight:600; } .count .grid td.minus { color:#b3261e; font-weight:600; }
.count .grid input.cell.counted { width:90px; } .count .grid-wrap.lines { max-height:calc(100vh - 520px); min-height:220px; }
.count [hidden] { display:none !important; }
.report .grid tr.sum td { background:#eef2f9; font-weight:600; }
.ledger .grid tr.sum td { background:#eef2f9; font-weight:600; } .ledger .grid tr.sub td { color:#556; font-size:12px; }
.ledger #list tbody tr { cursor:pointer; }
.grid td.hl { background:#fff9c4; } .grid tfoot tr.sum td { background:#eef2f9; font-weight:600; position:sticky; bottom:0; }
[hidden] { display:none !important; }
