.management{max-width:1440px;margin:0 auto;padding:34px 28px 60px;color:#18352f;font-size:16px;line-height:1.55}
.management *,.mg-dialog *{box-sizing:border-box}
.management h1,.management h2,.management h3,.mg-dialog h2{color:#14352d;letter-spacing:-.04em;margin:0}
.management h1{font-size:30px;line-height:1.25;font-weight:800;margin:5px 0 8px}
.management h2,.mg-dialog h2{font-size:20px;line-height:1.4;font-weight:750}
.management h3{font-size:17px;font-weight:750;margin-bottom:8px}
.management p{margin:0 0 10px}
.mg-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px}
.mg-eyebrow{font-size:14px!important;font-weight:700;color:#26846f;letter-spacing:.025em;margin:0!important}
.mg-muted{color:#657b74;font-size:15px}
.mg-note{font-size:14px;color:#657b74;line-height:1.65;margin:12px 0 0!important}
.mg-note:empty{display:none}
.mg-actions,.mg-row-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.mg-row-actions{justify-content:flex-end}
.mg-button{display:inline-flex;justify-content:center;align-items:center;gap:7px;min-height:42px;padding:10px 16px;border:1px solid #d6e2dd;border-radius:9px;background:white;color:#235246;font-size:14px;font-weight:700;font-family:inherit;line-height:1.3;text-decoration:none;cursor:pointer;white-space:nowrap;transition:background .15s,border-color .15s,box-shadow .15s}
.mg-button:hover{background:#f0f7f3;border-color:#94bdae}
.mg-button:focus-visible,.mg-icon-button:focus-visible{outline:3px solid #9ad6c5;outline-offset:2px}
.mg-button.primary{background:#18795f;color:white;border-color:#18795f}
.mg-button.primary:hover{background:#11664f;border-color:#11664f}
.mg-button.danger{color:#ac4439;background:#fff6f4;border-color:#edcec9}
.mg-button.danger:hover{background:#fbe9e5}
.mg-button.compact{min-height:36px;padding:8px 12px}
.mg-button:disabled,.mg-icon-button:disabled{opacity:.48;cursor:not-allowed}
.mg-icon-button{border:1px solid #dce5e1;background:white;border-radius:8px;width:36px;height:36px;min-width:36px;display:inline-flex;align-items:center;justify-content:center;font-size:23px;color:#70867e;cursor:pointer}
.mg-full-button{width:100%}
.mg-text-link{color:#18795f;text-decoration:none;font-size:14px;font-weight:700}
.mg-text-link:hover{text-decoration:underline}
.mg-panel{border:1px solid #dfe8e2;background:#fff;border-radius:14px;overflow:hidden;margin:0 0 24px;box-shadow:0 2px 8px #153e2510}
.mg-panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 22px;border-bottom:1px solid #edf2ee}
.mg-panel-head h2{font-size:18px}
.mg-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0 0 24px}
.mg-stat{background:white;border:1px solid #dfe8e2;border-radius:12px;padding:18px 22px;min-width:0}
.mg-stat>span{display:block;font-size:14px;color:#70857d;margin-bottom:9px}
.mg-stat>strong{font-size:29px;line-height:1.25;letter-spacing:-.05em;font-weight:800;overflow-wrap:anywhere}
.mg-stat.accent{background:#eaf6ef;border-color:#cde7d8}
.mg-stat.accent>strong{color:#18795f}
.mg-table-wrap{width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.mg-table{border-collapse:collapse;width:100%;text-align:left;white-space:normal;font-size:14px}
.mg-table th{font-size:14px;color:#61756d;background:#f7faf8;font-weight:600;padding:13px 18px;white-space:nowrap;border-bottom:1px solid #e6eee9}
.mg-table td{padding:18px;vertical-align:middle;border-bottom:1px solid #edf2ef;min-width:90px}
.mg-table td>strong{display:block;font-weight:700;font-size:15px}
.mg-table tr:last-child td{border-bottom:0}
.mg-table tbody tr:hover{background:#fcfdfc}
.mg-table small{display:block;font-size:13px;color:#7c8d86;line-height:1.55;margin-top:4px}
.mg-table .mg-order-id{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.mg-table .mg-right{text-align:right}
.mg-table td:first-child{min-width:160px}
.mg-table td .mg-lines{min-width:160px}
.mg-lines{display:grid;gap:2px;color:#576f65;line-height:1.55;font-size:14px;margin-top:5px}
.mg-lines b{color:#365749;font-weight:600;white-space:nowrap}
.mg-phone{color:#18795f;background:#edf7f1;border-radius:5px;padding:2px 7px;font-variant-numeric:tabular-nums;margin-left:3px}
.mg-badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:6px;background:#edf2ef;color:#527265;font-size:13px;font-weight:700;white-space:nowrap}
.mg-pending,.mg-new{color:#a87017;background:#fff4dd}
.mg-picked_up,.mg-completed{color:#177357;background:#e7f5ed}
.mg-confirmed{color:#2e6db0;background:#eaf3ff}
.mg-cancelled{color:#809087;background:#f0f3f1}
.mg-sample{display:inline-flex;color:#7c73a1;background:#f3f0fa;padding:1px 5px;border-radius:4px;font-size:12px;vertical-align:middle;margin-left:6px;white-space:nowrap}
.mg-empty{padding:64px 24px;text-align:center;color:#758980}
.mg-empty h3{font-size:17px;color:#62786e;margin:14px 0}
.mg-empty-mark{display:inline-flex;width:58px;height:58px;border-radius:18px;align-items:center;justify-content:center;background:#edf5ef;color:#81a690}
.mg-empty-mark svg{width:26px;height:26px}
.mg-empty .mg-button{margin-top:12px}
.mg-tip{border-left:3px solid #a5ccba;padding:12px 18px;color:#597469;background:#f1f7f3;border-radius:0 8px 8px 0;font-size:14px}
.mg-loading{min-height:280px;display:grid;place-items:center;color:#6f8a7c}
.mg-notice{padding:26px;border:1px solid #e3dfd5;background:#fffcf3;border-radius:12px;color:#725f37}
.mg-notice p{margin:8px 0 15px}
.mg-filters{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-end;background:white;border:1px solid #dfe8e2;border-radius:12px;padding:20px;margin-bottom:20px}
.management label,.mg-dialog label{display:flex;flex-direction:column;gap:7px;font-size:14px;color:#506a5d;font-weight:600}
.management input:not([type=checkbox]),.management select,.management textarea,.mg-dialog input:not([type=checkbox]),.mg-dialog select,.mg-dialog textarea{font:inherit;font-size:15px;line-height:1.4;color:#234d3e;background:#fff;border:1px solid #d7e2db;border-radius:8px;padding:10px 12px;min-height:42px;outline:none;min-width:0;width:100%;transition:border-color .15s,box-shadow .15s}
.management input::placeholder,.mg-dialog input::placeholder,.mg-dialog textarea::placeholder{color:#a0afa6;font-weight:400}
.management input:focus,.management select:focus,.management textarea:focus,.mg-dialog input:focus,.mg-dialog select:focus,.mg-dialog textarea:focus{border-color:#4ca98b;box-shadow:0 0 0 3px #87c5ab24}
.management input:disabled,.management select:disabled{background:#f2f6f3;color:#6b8274}
.management input[type=checkbox],.mg-dialog input[type=checkbox]{width:17px;height:17px;accent-color:#18795f;cursor:pointer;flex-shrink:0}
.management select,.mg-dialog select{appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%23748c80' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:12px 8px}
.mg-filters>label{flex:1 1 140px;max-width:240px}
.mg-filters>label.mg-search{flex:2 1 210px;max-width:none}
.mg-pagination{display:flex;gap:20px;align-items:center;justify-content:center;padding:20px;border-top:1px solid #edf2ef;color:#7a8e82;font-size:14px}
.mg-dialog{font-family:inherit;color:#234c3d;width:min(720px,calc(100vw - 40px));max-height:calc(100dvh - 56px);overflow-y:auto;padding:26px;border-radius:18px;background:white;line-height:1.6;font-size:16px}
.mg-dialog.wide{width:min(920px,calc(100vw - 40px))}
.mg-dialog-head{display:flex;gap:20px;justify-content:space-between;align-items:center;margin-bottom:22px}
.mg-dialog-head h2 .mg-badge{vertical-align:middle;font-size:13px;margin-left:8px}
.mg-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;padding-top:22px;margin-top:20px;border-top:1px solid #eaf0ec}
.mg-dialog .mg-table{font-size:14px}
.mg-dialog .mg-table td,.mg-dialog .mg-table th{padding:12px;min-width:65px}
.mg-dialog .mg-table td:first-child{min-width:160px}
.mg-customer{border:1px solid #d8e9de;border-radius:9px;background:#f0f8f3;padding:14px 16px;display:flex;flex-direction:column;gap:4px}
.mg-customer strong{font-size:19px}
.mg-customer span{color:#739080;font-size:14px}
.mg-total{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 0;border-top:1px solid #e6eee9;color:#577566}
.mg-total strong{font-size:25px;color:#195f47;letter-spacing:-.04em}
.mg-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.mg-full{grid-column:1/-1}
.mg-fieldset{border:1px solid #dee9e1;border-radius:9px;padding:15px;margin:0}
.mg-fieldset legend{font-size:14px;color:#506c5c;font-weight:700;padding:0 6px}
.mg-check-grid{display:flex;gap:12px 22px;flex-wrap:wrap}
.mg-dialog label.mg-check{display:inline-flex;flex-direction:row;align-items:center;gap:8px;font-weight:400}
.mg-option-row{display:grid;grid-template-columns:1.5fr 1fr 36px;align-items:end;gap:10px;margin-bottom:12px}
.mg-option-row .mg-icon-button{margin-bottom:3px}
.mg-upload{display:grid;grid-template-columns:1fr 90px;gap:10px}
.mg-upload img{width:90px;height:75px;object-fit:cover;border-radius:9px;grid-column:2;grid-row:1/3}
.mg-upload .mg-note{margin:0!important;font-weight:400}
.mg-dialog .mg-upload input[type=file]{padding:7px;font-size:14px;border:none;background:#f6faf7}
.mg-product-cell{display:flex;gap:13px;align-items:center;min-width:240px}
.mg-product-cell img{width:60px;height:60px;border-radius:9px;object-fit:cover;background:#f1f6f2}
.mg-product-cell strong{display:inline;font-size:15px}
.mg-branch-tags{display:flex;gap:4px;flex-wrap:wrap;min-width:120px;max-width:230px}
.mg-branch-tags span{border:1px solid #e3eae6;padding:3px 7px;border-radius:5px;color:#789182;font-size:12px;white-space:nowrap}
.mg-branch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.mg-branch-card{background:white;border:1px solid #dce8df;border-radius:14px;padding:22px;display:flex;flex-direction:column}
.mg-branch-card .mg-panel-head{padding:0 0 15px;margin-bottom:16px;align-items:flex-start}
.mg-branch-card .mg-panel-head h2{overflow-wrap:anywhere;font-size:19px}
.mg-branch-card>p{color:#73897c;font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere}
.mg-branch-card .mg-actions{margin-top:auto;padding-top:20px}
.mg-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;align-items:start}
.mg-settings-grid .mg-panel{margin-bottom:0}
.mg-padded{padding:22px}
.mg-settings-actions{display:grid;gap:24px}
.mg-settings-actions>div:not(:last-child){padding-bottom:22px;border-bottom:1px solid #e9efeb}
.mg-settings-actions p{font-size:14px;color:#778d7e;line-height:1.65}
.mg-danger-zone h3{color:#a64e3c}
.mg-shop-toolbar{display:flex;align-items:center;gap:24px;padding:20px;background:white;border:1px solid #dce8df;border-radius:12px;margin-bottom:24px;flex-wrap:wrap}
.mg-shop-toolbar>label{min-width:210px}
.mg-shop-toolbar .mg-search{margin-left:auto;min-width:240px}
.mg-balance{display:flex;flex-direction:column;gap:3px}
.mg-balance span{font-size:14px;color:#70907c}
.mg-balance strong{font-size:27px;color:#1f7958;letter-spacing:-.04em}
.mg-wholesale-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start}
.mg-wholesale-products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.mg-supply-card{background:white;border:1px solid #dce8df;border-radius:14px;padding:20px;min-width:0}
.mg-supply-card[hidden]{display:none}
.mg-supply-info{display:flex;gap:16px;align-items:flex-start;margin-bottom:15px}
.mg-supply-info img{width:100px;height:100px;object-fit:cover;border-radius:11px;flex-shrink:0;background:#f1f7f1}
.mg-supply-info h2{font-size:18px;margin:4px 0}
.mg-supply-info p{font-size:14px;color:#718a79;margin:0}
.mg-supply-info .mg-note{font-size:13px;margin-top:5px!important}
.mg-supply-info strong{color:#205f42;font-size:21px}
.mg-supply-info .mg-eyebrow{font-size:12px!important}
.mg-supply-description{font-size:14px;color:#78907e;white-space:pre-wrap}
.mg-supply-options{display:grid;gap:8px;margin:18px 0 16px}
.mg-supply-option{display:flex;justify-content:space-between;align-items:center;gap:12px;border-radius:8px;padding:12px;background:#f6f9f6}
.mg-supply-option>div:first-child{display:flex;flex-direction:column;gap:2px;min-width:0}
.mg-supply-option strong{font-size:14px;overflow-wrap:anywhere}
.mg-supply-option span{font-size:13px;color:#809783}
.mg-stepper{display:flex;align-items:center;flex-shrink:0;border:1px solid #dbe6dd;border-radius:8px;background:white;overflow:hidden}
.mg-stepper button{height:38px;width:30px;border:0;background:white;font-size:21px;color:#527e60;cursor:pointer}
.mg-stepper button:disabled{opacity:.4;cursor:not-allowed}
.management .mg-stepper input{width:47px;border:0;border-radius:0;padding:5px 1px;text-align:center;height:38px;min-height:38px;appearance:textfield;font-size:16px}
.mg-stepper input::-webkit-inner-spin-button,.mg-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.mg-cart-panel{background:white;border:1px solid #d7e7db;border-radius:14px;padding:22px;position:sticky;top:22px;box-shadow:0 4px 18px #15452708}
.mg-cart-panel h2{padding-bottom:18px;border-bottom:1px solid #e4eee6;font-size:19px}
.mg-cart-empty{padding:24px 0;color:#789680;font-size:15px;text-align:center}
.mg-cart-line{padding:18px 0;border-bottom:1px solid #edf2ee;display:flex;flex-direction:column;gap:6px}
.mg-cart-line>strong{font-size:15px}
.mg-cart-line>span{font-size:13px;color:#789680}
.mg-cart-line>div{display:flex;align-items:end;gap:10px;justify-content:space-between}
.mg-cart-line label{font-size:12px;gap:2px}
.mg-cart-line input{width:72px!important;min-height:35px!important;padding:5px 8px!important}
.mg-cart-line>div>strong{margin-bottom:8px;font-size:15px;white-space:nowrap}
.mg-cart-line .mg-icon-button{width:28px;height:30px;min-width:28px;margin-bottom:3px;border:0;font-size:20px}
.mg-cart-panel .mg-total{padding:20px 0 8px;border:0}
.mg-cart-panel .mg-total strong{font-size:25px}
.mg-cart-panel .mg-note{font-size:13px}
.mg-cart-panel .mg-full-button{margin-top:18px;font-size:16px;min-height:47px}
.mg-insufficient{font-size:14px;color:#b7613f;background:#fff4e9;padding:10px;border-radius:7px;margin-top:12px!important}
.mg-positive{color:#1c7b56}
.mg-negative{color:#a9614c}
.mg-edit-line{display:grid;grid-template-columns:minmax(120px,1fr) 75px 100px 145px 30px;align-items:end;gap:10px;padding:16px 0;border-bottom:1px solid #e5eee7}
.mg-edit-line>div{align-self:center}
.mg-edit-line>div strong{font-size:14px;display:block}
.mg-edit-line>div small{font-size:13px;color:#789381}
.mg-edit-line label{font-size:12px;gap:3px}
.mg-edit-line .mg-icon-button{border:0;min-width:30px;width:30px;margin-bottom:3px}
.mg-add-order-line{display:flex;align-items:end;gap:12px;margin:22px 0}
.mg-add-order-line label{flex:1}
.mg-line-cancelled{text-decoration:line-through;color:#9ba8a0}
.mg-item-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:8px}
.staff-content:has(.management){width:min(1440px,100%);margin:0 auto}
.modal-card:has(.mg-dialog){width:auto;max-width:calc(100vw - 24px);padding:0;overflow:visible}
.modal-card:has(.mg-dialog)>.modal-x{display:none}
@media(min-width:1600px){.management{padding-top:42px}.mg-heading{margin-bottom:32px}}
@media(max-width:1200px){.mg-wholesale-products{grid-template-columns:1fr}.mg-wholesale-layout{grid-template-columns:minmax(0,1fr) 330px}.mg-branch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-stat>strong{font-size:25px}.mg-table th,.mg-table td{padding:14px}.mg-stats{gap:12px}.mg-stat{padding:17px}}
@media(max-width:900px){.management{padding:24px 20px 48px}.mg-heading{align-items:flex-start}.mg-heading h1{font-size:26px}.mg-heading>.mg-actions{justify-content:flex-end}.mg-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-settings-grid{grid-template-columns:1fr}.mg-wholesale-layout{grid-template-columns:minmax(0,1fr) 290px;gap:16px}.mg-supply-info{gap:12px}.mg-supply-info img{width:80px;height:80px}.mg-supply-card{padding:17px}.mg-cart-panel{padding:18px}.mg-shop-toolbar{gap:18px}.mg-shop-toolbar>label{min-width:180px}.mg-shop-toolbar .mg-search{margin-left:0;flex:1}.mg-dialog{padding:22px}.mg-edit-line{grid-template-columns:minmax(110px,1fr) 65px 90px 135px 25px;gap:8px}.mg-edit-line .mg-icon-button{width:25px;min-width:25px}}
@media(max-width:700px){.management{padding:22px 14px 40px}.mg-heading{display:block;margin-bottom:22px}.mg-heading>.mg-actions{margin-top:16px;justify-content:flex-start}.mg-heading h1{font-size:25px}.mg-heading .mg-muted{font-size:14px}.mg-stats{gap:10px;margin-bottom:18px}.mg-stat{padding:15px 16px}.mg-stat>strong{font-size:25px}.mg-stat>span{margin-bottom:8px;font-size:13px}.mg-panel{border-radius:11px;margin-bottom:18px}.mg-panel-head{padding:16px}.mg-panel-head h2{font-size:17px}.mg-filters{padding:16px;gap:12px}.mg-filters>label{max-width:none;flex:1 1 calc(50% - 12px);min-width:0}.mg-filters>label.mg-search{flex-basis:100%}.mg-filters .mg-actions{width:100%}.mg-filters .mg-actions .mg-button{flex:1}.mg-table td{padding:13px}.mg-table .mg-row-actions{flex-wrap:nowrap}.mg-table{font-size:14px}.mg-table th{font-size:13px}.mg-table td>strong{font-size:14px}.mg-branch-grid{grid-template-columns:1fr}.mg-branch-card{padding:20px}.mg-branch-card .mg-actions{flex-wrap:nowrap}.mg-branch-card .mg-button{flex:1}.mg-form-grid{gap:15px}.mg-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 30px);padding:20px;border-radius:14px}.mg-dialog.wide{width:calc(100vw - 24px)}.mg-dialog h2{font-size:19px}.mg-dialog-head{margin-bottom:18px}.mg-dialog-actions{gap:8px;padding-top:18px}.mg-dialog-actions .mg-button{flex:1;font-size:14px;padding:10px}.mg-check-grid{display:grid;grid-template-columns:1fr;gap:11px}.mg-option-row{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 30px;gap:8px}.mg-option-row .mg-icon-button{min-width:30px;width:30px}.mg-dialog input:not([type=checkbox]),.mg-dialog select,.mg-dialog textarea,.management input:not([type=checkbox]),.management select{font-size:16px}.mg-wholesale-layout{grid-template-columns:1fr}.mg-wholesale-products{grid-template-columns:1fr}.mg-cart-panel{position:static}.mg-supply-info img{width:100px;height:100px}.mg-supply-info h2{font-size:19px}.mg-supply-card{padding:20px}.mg-supply-option{padding:12px 14px}.mg-supply-option strong{font-size:16px}.mg-stepper button{width:36px;height:40px}.management .mg-stepper input{height:40px;width:52px}.mg-shop-toolbar{padding:16px;gap:16px}.mg-shop-toolbar>label{min-width:0;flex:1 1 calc(50% - 16px)}.mg-shop-toolbar .mg-search{flex-basis:100%}.mg-shop-toolbar .mg-button{width:100%}.mg-balance{margin-left:auto;align-items:flex-end;min-width:130px}.mg-balance strong{font-size:24px}.mg-balance span{font-size:13px}.mg-edit-line{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1.5fr) 28px;gap:8px}.mg-edit-line>div{grid-column:1/-1}.mg-edit-line label{font-size:12px}.mg-dialog .mg-edit-line input{font-size:14px;padding:8px 6px}.mg-edit-line .mg-icon-button{grid-column:4;grid-row:2}.mg-add-order-line{gap:8px}.mg-add-order-line .mg-button{padding:10px}.mg-upload{grid-template-columns:1fr 65px}.mg-upload img{width:65px;height:65px}.mg-note{font-size:13px}.mg-pagination{padding:16px}}
@media(prefers-reduced-motion:reduce){.mg-button,.management input,.mg-dialog input{transition:none}}
