:root{font-family: -apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;color:#293c34;background:#f7f8f4;--green:#31594c;--line:#dfe5dc;--muted:#7b867e;--amber:#a77128}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #83b3a0;outline-offset:3px}button{transition:background .15s,box-shadow .15s}button:hover{filter:brightness(.96)}.topbar{height:77px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(28px,calc((100vw - 1280px)/2));gap:20px}.brand{text-decoration:none;color:#294538;font-size:16px;font-weight:750;display:flex;align-items:center;gap:10px;white-space:nowrap}.brandmark{display:grid;place-items:center;width:32px;height:32px;background:var(--green);color:#fff;border-radius:10px;font-size:19px}.brand-sub{font-weight:400;color:#89918b;font-size:13px;border-left:1px solid var(--line);padding-left:10px}.tools{display:flex;align-items:center;gap:6px}.tools>span{font-size:12px;color:var(--muted);margin-right:12px}.quiet{border:0;background:transparent;padding:9px;color:#5b6c60;font-size:13px}main{max-width:1280px;margin:auto;padding:47px 28px 20px}.intro{display:flex;justify-content:space-between;align-items:center;gap:20px}.eyebrow{letter-spacing:2px;font-size:10px;font-weight:750;color:#79937f;margin:0 0 12px}h1{font-size:36px;letter-spacing:-1.5px;line-height:1.2;margin:0;font-weight:750}.title-dot{color:#91ab84}.subtitle{font-size:14px;color:#778179;margin:14px 0 0;line-height:1.65}.outline{background:#fff;border:1px solid var(--line);border-radius:8px;color:#526359;font-size:13px;padding:12px 16px;white-space:nowrap}.summary{display:grid;grid-template-columns:repeat(4,1fr);margin:29px 0 35px;border:1px solid var(--line);border-radius:13px;background:#fff;padding:23px 0}.summary>div{padding:0 27px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:10px}.summary>div:last-child{border:0}.summary span{font-size:12px;color:#818a82}.summary strong{font-size:29px;font-weight:650;line-height:1.1;font-variant-numeric:tabular-nums}.summary small{font-size:12px;color:#9aa098;font-weight:400;margin-left:7px}.summary-warn strong{color:#b28b50}.workspace-head{border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:20px}nav{display:flex;gap:25px}.tab{border:0;border-bottom:3px solid transparent;background:transparent;font-size:14px;color:#91998f;padding:10px 0 17px;white-space:nowrap}.tab.active{border-bottom-color:var(--green);color:var(--green);font-weight:750}#order-badge{background:#e9eee6;padding:2px 6px;border-radius:5px;font-size:10px;margin-left:4px}.search{display:flex;align-items:center;gap:7px;background:#fff;border:1px solid var(--line);padding:8px 12px;border-radius:7px;margin-bottom:10px;color:#8d998c}.search input{border:0;outline:0;min-width:0;width:175px;background:transparent;font-size:12px;color:#3b5145}.view-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:26px 0 20px}h2{font-size:17px;letter-spacing:-.4px;margin:0}.view-heading p{font-size:12px;color:#92988e;margin:8px 0 0;line-height:1.6}.legend{font-size:11px;color:#92998e;white-space:nowrap}.legend i{display:inline-block;background:#c5ccb9;width:6px;height:6px;border-radius:50%;margin-right:6px}.shelf{background:#edf0e7;border:1px solid #dfe5d8;border-radius:12px;padding:17px 18px 8px;margin:0 0 19px;overflow:hidden}.shelf-top{display:flex;align-items:center;justify-content:space-between;color:#8c9785;margin:0 2px 13px;font-size:10px}.shelf-top b{color:#607159;font-size:11px}.shelf-scroll{overflow-x:auto;padding-bottom:14px;scrollbar-width:thin;scrollbar-color:#b9c4b1 transparent}.cards{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:13px}.card{background:white;border:1px solid #e0e4d9;border-radius:8px;padding:10px;min-width:0;box-shadow:0 2px 3px #334b2d03}.card.dim{opacity:.28}.card-meta{display:flex;align-items:center;justify-content:space-between;margin:0 0 7px;gap:4px;min-height:23px}.maker-chip{font-size:10px;color:#78906d;background:#f0f4ec;padding:4px 7px;border-radius:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.maker-chip.unknown{background:#fbf3e4;color:#aa8549}.edit{border:0;background:transparent;color:#a0a99b;padding:4px 6px;font-size:15px}.product-photo{background:#f4f5ef;border-radius:5px;display:flex;align-items:center;justify-content:center;height:149px;overflow:hidden;margin-bottom:11px}.product-photo img{width:100%;height:100%;object-fit:contain}.fields{margin:0;display:grid;gap:6px}.field{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:7px}.field>span{font-size:10px;color:#87907f}.product-name{font-size:12px;line-height:1.5;font-weight:650;min-height:36px;display:flex;align-items:center;word-break:keep-all}.stock-input{width:100%;min-width:0;border:1px solid #e0e5da;border-radius:4px;padding:6px 7px;background:#fff;font-size:13px;height:31px;color:#3b5342;font-variant-numeric:tabular-nums}.stock-input::placeholder{color:#bdc3b7;font-size:10px}.stock-input:focus{background:#f8faf5;border-color:#87a17b}.order-toggle{margin-top:10px;border:1px dashed #d8dfcf;color:#85917c;background:transparent;border-radius:5px;padding:7px 5px;width:100%;font-size:10px}.order-toggle.selected{border:1px solid #d1deca;background:#eaf1e4;color:#52713c}.shelf-foot{height:7px;border-top:1px solid #d4ddca;margin:0 -18px;background:#e3e9da}.group{margin:0 0 24px}.group-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:13px 0;margin-bottom:13px}.group-head h3{font-size:15px;margin:0}.group-head span{font-size:12px;color:#7f8d78}.group-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.order-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;background:#e9efe4;padding:15px 18px;border-radius:8px;margin-bottom:20px}.order-toolbar p{font-size:12px;color:#6b7f5e;margin:0;line-height:1.6}.primary{background:var(--green);border:0;color:#fff;padding:12px 18px;border-radius:7px;font-weight:600;font-size:13px}.order-group{background:#fff;border:1px solid var(--line);border-radius:10px;padding:0 18px 10px;margin-bottom:18px;overflow-x:auto}.order-group .group-head{min-width:520px}.order-table{width:100%;border-collapse:collapse;min-width:520px;text-align:left;font-size:12px}.order-table th{font-size:10px;color:#8b9484;font-weight:400;padding:9px 8px}.order-table td{padding:12px 8px;border-top:1px solid #edf0e8}.order-table td:first-child{font-weight:600}.order-table input{width:68px}.order-table .remove{border:0;background:transparent;color:#ab8e7e;font-size:11px;padding:8px}.muted{color:#9aA38f;font-size:11px}.empty{text-align:center;padding:65px 20px;background:#fff;border:1px dashed #d9e2d0;border-radius:10px;color:#87977d}.empty b{display:block;color:#53684b;font-size:17px;margin-bottom:12px}.empty p{font-size:13px;line-height:1.8}.notice{font-size:12px;color:#95733b;border:1px solid #eadcc0;border-radius:7px;padding:13px 16px;background:#fffaf0;line-height:1.7;margin-bottom:16px}footer{display:flex;justify-content:space-between;gap:15px;color:#a4ad9b;font-size:10px;margin-top:27px;line-height:1.8}dialog{border:1px solid var(--line);border-radius:14px;max-width:430px;width:calc(100% - 32px);padding:25px;color:#334c3c;box-shadow:0 20px 80px #14271935}dialog::backdrop{background:#14221c77;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:24px}.close{border:0;background:transparent;font-size:25px;line-height:1;color:#8c9986;padding:0 5px}form>label{display:flex;flex-direction:column;font-size:12px;gap:8px;margin:17px 0}form>label>input:not([type=checkbox]){padding:11px;border:1px solid var(--line);border-radius:5px;min-width:0;color:#344f3f}.help{font-size:11px;color:#8b9982;line-height:1.7}form>.check{flex-direction:row;align-items:center;margin:22px 0}form .primary{width:100%}#photo-dialog{max-width:800px}#photo-dialog img{width:100%;border-radius:6px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:12px 20px;background:#294c3e;color:#fff;border-radius:8px;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:10;max-width:90vw}#toast.visible{opacity:1}
@media(min-width:1100px){.cards[style*="4"] .product-photo{height:160px}.cards[style*="4"] .card{padding:12px}.cards[style*="4"] .product-name{font-size:13px}}@media(max-width:850px){main{padding:30px 20px}.topbar{padding:0 20px}.tools>span{display:none}.group-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.cards{grid-template-columns:repeat(var(--cols),minmax(165px,1fr))}.legend{display:none}.summary>div{padding:0 17px}.search input{width:140px}nav{gap:18px}.product-photo{height:135px}}@media(max-width:600px){.topbar{height:64px;padding:0 16px}.brand-sub{display:none}.brand{font-size:14px}.tools{gap:0}.quiet{font-size:11px;padding:8px}main{padding:27px 15px 20px}.intro{align-items:flex-start}.eyebrow{font-size:9px;margin-bottom:9px}h1{font-size:27px}.subtitle{font-size:12px;max-width:235px;margin-top:10px}.outline{font-size:10px;padding:9px 10px;margin-top:25px}.summary{padding:17px 0;margin:23px 0}.summary>div{padding:0 10px;gap:9px}.summary span{font-size:9px}.summary strong{font-size:23px}.summary small{font-size:9px;margin-left:3px}.workspace-head{display:block}.search{margin:14px 0 13px;width:100%}.search input{width:100%;font-size:12px}.tab{font-size:12px;padding-bottom:13px}nav{gap:25px}.view-heading{margin:21px 0 17px}h2{font-size:15px}.view-heading p{font-size:11px}.shelf{padding:12px 11px 6px;margin-bottom:15px}.cards{gap:9px;grid-template-columns:repeat(var(--cols),minmax(150px,1fr))}.shelf-foot{margin:0 -11px}.card{padding:9px}.product-photo{height:130px}.group-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.order-toolbar{padding:13px;align-items:flex-start}.order-toolbar p{font-size:10px}.primary{font-size:11px;padding:11px 13px;white-space:nowrap}footer{flex-direction:column;gap:2px}.order-group{padding:0 10px 10px}.notice{font-size:11px}}

/* Pharmacy controls */
.intro-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}.intro-actions .primary{padding:13px 16px}.intro-actions button:disabled{opacity:.65;cursor:wait}form>label>select{padding:11px;border:1px solid var(--line);border-radius:5px;min-width:0;color:#344f3f;background:#fff;font:inherit}
#print-report{display:none}
@media(max-width:600px){.intro-actions{padding-top:22px;flex-direction:column;align-items:stretch;gap:7px;min-width:127px}.intro-actions .primary{font-size:10px;padding:10px}.intro-actions .outline{margin:0;font-size:10px;padding:9px}.intro>div:first-child{min-width:0}.intro{gap:10px}.subtitle{word-break:keep-all}}
@page{size:A4 portrait;margin:10mm}
@media print{
 html,body{background:#fff!important;margin:0!important;padding:0!important;color:#17251d!important;font-size:9pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}
 body>*:not(#print-report){display:none!important}
 #print-report{display:block!important;width:100%;font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic","Noto Sans CJK KR",sans-serif}
 .print-header{display:table;width:100%;table-layout:fixed;border-bottom:1.5pt solid #31594c;padding:0 0 4mm;margin:0 0 4mm}
 .print-header>div{display:table-cell;vertical-align:bottom}.print-header>div:first-child{width:55%}
 .print-header p{font-size:11pt;color:#31594c;font-weight:700;margin:0 0 2mm}
 .print-header h1{font-size:18pt;letter-spacing:-.7pt;margin:0;line-height:1.25;white-space:nowrap}
 .print-meta{font-size:8pt;line-height:1.9;text-align:right;color:#596654}
 .print-shelf{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:2mm 0;margin:0 0 4mm;break-inside:avoid;page-break-inside:avoid}
 .print-shelf caption{text-align:left;font-size:9pt;font-weight:700;padding:0 2mm 2mm;color:#31594c}
 .print-shelf caption span{float:right;font-weight:400;color:#84907c;font-size:7pt}
 .print-shelf td{vertical-align:top;border:1px solid #c9d2c3;border-radius:1.5mm;padding:2mm;overflow-wrap:anywhere}
 .print-product{min-width:0;break-inside:avoid;page-break-inside:avoid}
 .print-maker{font-size:7pt;font-weight:600;color:#66765c;min-height:4mm;line-height:1.4}
 .print-product img{display:block;width:100%;height:28mm;object-fit:contain;margin:1mm 0 2mm}
 .print-name{display:flex;gap:2mm;min-height:11mm;align-items:flex-start;font-size:8pt;line-height:1.45;padding:1mm 0}
 .print-name>span{font-size:7pt;color:#7b8671;flex:none;width:6mm;padding-top:.2mm}
 .print-name>strong{font-weight:650;word-break:keep-all;overflow-wrap:anywhere}
 .print-quantity{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e1e6dc;padding:1.6mm 0;min-height:6mm;font-size:9pt;line-height:1.25}
 .print-quantity>span{font-size:7pt;color:#75836a}.print-quantity>b{font-weight:600;font-variant-numeric:tabular-nums}
 .print-note{font-size:7pt;color:#7a8671;margin:1mm 2mm 0;line-height:1.7}
}
