
:root{--bg:#f5f6f8;--panel:#fff;--ink:#15171c;--muted:#6d7280;--line:#e6e8ed;--accent:#6657f5;--accent2:#927aff;--soft:#efedff;--good:#177b57;--warn:#a96712;--danger:#bd3d4a;--shadow:0 18px 60px rgba(21,23,28,.08)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}[hidden]{display:none!important}
.auth-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 10%,rgba(102,87,245,.13),transparent 36%),#111318}.auth-card{width:min(440px,100%);background:#fff;border-radius:24px;padding:28px;box-shadow:0 30px 90px rgba(0,0,0,.32)}.auth-brand,.brand{display:flex;align-items:center;gap:12px}.auth-brand{margin-bottom:28px}.auth-brand strong,.brand strong{display:block}.auth-brand span,.brand span{display:block;font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:#858b97;margin-top:2px}.auth-card h1{font-size:28px;letter-spacing:-.04em;margin:0 0 8px}.auth-card>div>p,.auth-card>p{color:var(--muted);line-height:1.5;font-size:13px}.moon-mark{width:42px;height:42px;border-radius:50%;background:linear-gradient(145deg,#a58dff,#5d4cec);position:relative;box-shadow:0 10px 30px rgba(102,87,245,.25);flex:0 0 auto}.moon-mark:after{content:"";position:absolute;width:32px;height:32px;border-radius:50%;background:#fff;right:-5px;top:-1px}.moon-mark.small{width:37px;height:37px}.moon-mark.small:after{width:29px;height:29px;background:#111318}
.stack{display:grid;gap:12px}.stack.tight{gap:8px}.stack label,.inline-setup label{display:grid;gap:6px;font-size:11px;font-weight:800;color:#545a66}.stack input,.inline-setup input{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fff;color:var(--ink)}.auth-links{display:flex;justify-content:space-between;gap:10px;margin-top:14px}.link-btn{border:0;background:transparent;padding:4px 0;color:var(--accent);font-weight:800;font-size:11px}.inline-setup{display:grid;gap:10px;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.btn{border:0;border-radius:11px;padding:10px 14px;font-weight:900;color:var(--ink);background:#fff}.btn.primary{background:#111318;color:#fff}.btn.accent{background:var(--accent);color:#fff}.btn.line{border:1px solid var(--line);background:#fff}.btn.danger{background:#fff0f1;color:var(--danger)}.btn.wide{width:100%}.small-btn{padding:8px 10px;font-size:11px}.icon-btn{width:38px;height:38px;border:1px solid var(--line);border-radius:11px;background:#fff;font-size:22px;line-height:1}
.notice{margin-top:12px;border-radius:12px;padding:11px 12px;background:#f1f2f5;font-size:11px;line-height:1.5;color:#555c68}.notice.good{background:#eaf7f1;color:#176a4d}.notice.warn{background:#fff3e4;color:#845318}.notice.danger{background:#fff0f1;color:#9d2f3b}
.app-shell{min-height:100vh;display:grid;grid-template-columns:248px 1fr}.sidebar{height:100vh;position:sticky;top:0;background:#111318;color:#fff;padding:20px 14px;display:flex;flex-direction:column;z-index:20}.brand{padding:2px 8px 24px}.nav{display:grid;gap:4px}.nav button{border:0;background:transparent;color:#aab0bd;border-radius:11px;padding:11px 12px;text-align:left;font-weight:800;display:flex;justify-content:space-between;align-items:center}.nav button small{font-size:9px;color:#6d7482}.nav button.active,.nav button:hover{background:#1e2128;color:#fff}.side-foot{margin-top:auto;border-top:1px solid #292c34;padding:14px 8px 2px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:10px;color:#9da3af}.side-foot button{border:0;background:transparent;color:#fff;font-size:10px;font-weight:900}
.main{min-width:0}.topbar{height:74px;position:sticky;top:0;z-index:15;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 26px}.topbar>div:first-child strong{display:block;font-size:16px}.topbar>div:first-child span{font-size:10px;color:var(--muted)}.top-actions{display:flex;align-items:center;gap:8px}.role-pill,.tag,.queue-pill{display:inline-flex;align-items:center;border-radius:999px;background:#f0f1f4;padding:6px 9px;font-size:9px;font-weight:900}.role-pill{background:var(--soft);color:var(--accent)}.select,.input,textarea{border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);padding:10px 11px}.select.compact{padding:8px 10px;font-weight:800}.input.wide{width:100%}.grow{flex:1;min-width:0}
.content{max-width:1500px;margin:auto;padding:26px}.view{display:none}.view.active{display:block}.hero-row{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:19px}.hero-row h1{font-size:32px;letter-spacing:-.045em;margin:0}.hero-row p{margin:6px 0 0;color:var(--muted);font-size:12px}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.metric,.panel{background:var(--panel);border:1px solid var(--line);border-radius:18px;box-shadow:0 9px 34px rgba(21,23,28,.035)}.metric{padding:17px}.metric label{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:900}.metric strong{display:block;font-size:30px;letter-spacing:-.04em;margin:9px 0 2px}.metric span{font-size:10px;color:var(--muted)}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin:13px 0}.panel{overflow:hidden;margin-bottom:13px}.panel-head{padding:15px 17px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-head h2{font-size:14px;margin:0}.panel-head p{font-size:10px;color:var(--muted);margin:3px 0 0;line-height:1.4}.panel-body{padding:16px 17px}.progress{height:10px;border-radius:999px;background:#eceef2;overflow:hidden}.progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--accent),var(--accent2));border-radius:inherit}.progress-copy{display:flex;justify-content:space-between;gap:12px;margin-top:10px;font-size:10px;color:var(--muted)}.progress-copy b{color:var(--ink)}.quality-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.quality-row.three{grid-template-columns:repeat(3,1fr)}.quality-row>div{background:#f7f8fa;border-radius:12px;padding:11px}.quality-row strong{display:block;font-size:19px}.quality-row span{font-size:9px;color:var(--muted)}.system-list{display:grid;gap:1px}.system-row{display:grid;grid-template-columns:13px 1fr;align-items:center;gap:9px;padding:9px 0;border-bottom:1px solid var(--line)}.system-row:last-child{border:0}.system-row b{display:block;font-size:11px}.system-row small{font-size:9px;color:var(--muted)}.status-dot{width:9px;height:9px;border-radius:50%;background:#a0a5af}.status-dot.good{background:var(--good)}.status-dot.warn{background:#d58a28}.status-dot.danger{background:var(--danger)}
.activity-list{display:grid}.activity-item{display:grid;grid-template-columns:32px 1fr auto;gap:10px;padding:11px 0;border-bottom:1px solid var(--line)}.activity-item:last-child{border:0}.activity-icon{width:31px;height:31px;border-radius:9px;background:var(--soft);color:var(--accent);display:grid;place-items:center;font-weight:950}.activity-item b{font-size:11px}.activity-item p{font-size:10px;color:var(--muted);margin:3px 0 0;line-height:1.4}.activity-item time{font-size:9px;color:#959aa4}.empty{padding:44px 18px;text-align:center;color:var(--muted);font-size:11px}
.warning-banner{background:#fff3e4;color:#805019;border:1px solid #f1d5ad;border-radius:13px;padding:11px 13px;margin-bottom:11px;font-size:10px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px}.toolbar-group{display:flex;gap:7px;align-items:center}.table-count{font-size:10px;color:var(--muted);white-space:nowrap}.table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px}.table-wrap.no-border{border:0;border-radius:0}.compact-table{margin-top:12px}table{width:100%;border-collapse:collapse;min-width:900px}th,td{text-align:left;padding:11px 12px;border-bottom:1px solid var(--line);font-size:10px;vertical-align:middle}th{background:#fafbfc;color:var(--muted);text-transform:uppercase;letter-spacing:.055em;font-size:9px;white-space:nowrap}td b{font-size:11px}.thumb{width:43px;height:43px;border-radius:10px;background:#eceef2;display:grid;place-items:center;color:#9297a1;font-size:8px;overflow:hidden}.thumb img{width:100%;height:100%;object-fit:cover}.store-badges{display:flex;gap:4px;flex-wrap:wrap}.store-badge{border-radius:999px;padding:4px 7px;font-size:8px;font-weight:900;background:#f0f1f4;color:#777}.store-badge.on{background:#eaf7f1;color:var(--good)}.stock-known{font-weight:900}.pager{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:12px;font-size:10px;color:var(--muted)}
.scan-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.scanner{min-height:270px;border:1px dashed #c9cdd6;border-radius:15px;background:#f8f9fb;display:grid;place-items:center;text-align:center;padding:18px;margin-bottom:11px}.scanner video{display:none;width:100%;max-height:310px;border-radius:12px;background:#111}.scan-icon{font-size:44px;margin-bottom:7px}.scanner b{font-size:12px}.scanner p{font-size:10px;color:var(--muted)}.product-match{display:grid;grid-template-columns:78px 1fr;gap:12px;border:1px solid var(--line);border-radius:14px;padding:12px;background:#fafbfc}.product-match.muted{opacity:.55}.match-image{width:78px;height:78px;border-radius:12px;background:#e9ebef;display:grid;place-items:center;color:#9196a0;font-size:9px;overflow:hidden}.match-image img{width:100%;height:100%;object-fit:cover}.product-match h3{font-size:13px;margin:2px 0 5px}.product-match p{font-size:9px;color:var(--muted);line-height:1.4}.photo-box,.drop-zone{margin-top:12px;border:1px dashed #c9cdd6;border-radius:14px;padding:16px;text-align:center;background:#fafbfc}.photo-box b{display:block;font-size:11px;margin-bottom:8px}.photo-box img{max-width:100%;max-height:240px;border-radius:11px;margin:10px auto;display:block}.choice-list{display:grid;gap:6px;margin-top:9px}.choice{border:1px solid var(--line);background:#fff;border-radius:11px;padding:9px;text-align:left;font-size:10px}.choice b{display:block}.queue-pill{background:#f0f1f4;color:#626875}
.drop-zone p{font-size:10px;color:var(--muted);margin:8px 0 0}.summary-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}.summary-row>div{background:#f7f8fa;border-radius:12px;padding:11px}.summary-row strong{display:block;font-size:18px}.summary-row span{font-size:9px;color:var(--muted)}.action-bar{display:flex;align-items:center;gap:8px;margin-top:12px}.action-bar .spacer{flex:1}.action-bar>span{font-size:10px;color:var(--muted)}
.section-title{font-size:12px;margin:18px 0 9px}.mapping-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.mapping-field{display:grid;gap:5px}.mapping-field label{font-size:9px;font-weight:900;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.mapping-field.required label:after{content:" *";color:var(--danger)}
.import-cards{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin-top:13px}.import-cards>div{background:#f7f8fa;border-radius:11px;padding:10px}.import-cards strong{display:block;font-size:17px}.import-cards span{font-size:8px;color:var(--muted)}.change-list{margin-top:10px;max-height:220px;overflow:auto;border:1px solid var(--line);border-radius:11px}.change-row{display:grid;grid-template-columns:60px 1fr 1fr;gap:8px;padding:8px 9px;border-bottom:1px solid var(--line);font-size:9px}.change-row:last-child{border:0}
.agent-card{display:grid;grid-template-columns:45px 1fr;gap:11px;align-items:center}.agent-icon{width:45px;height:45px;border-radius:13px;background:var(--soft);display:grid;place-items:center;color:var(--accent);font-size:21px;font-weight:950}.agent-card b{font-size:12px}.agent-card p{margin:3px 0 0;font-size:10px;color:var(--muted)}.folder-tree{margin-top:13px;border-radius:13px;background:#111318;color:#dce0ea;padding:14px;white-space:pre;font:10px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace;overflow:auto}.security-note{border-top:1px solid var(--line);padding-top:12px}.security-note b{font-size:10px}.security-note p{font-size:9px;color:var(--muted);line-height:1.45}.key-list{display:grid}.key-list>div{display:flex;justify-content:space-between;gap:15px;padding:9px 0;border-bottom:1px solid var(--line);font-size:10px}.key-list>div:last-child{border:0}.key-list span{color:var(--muted)}
.modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:18px}.modal-backdrop{position:absolute;inset:0;background:rgba(10,12,16,.62);backdrop-filter:blur(4px)}.modal-card{position:relative;width:min(1120px,100%);max-height:92vh;background:#fff;border-radius:20px;box-shadow:0 35px 100px rgba(0,0,0,.3);display:flex;flex-direction:column;overflow:hidden}.modal-head,.modal-foot{padding:15px 17px;display:flex;align-items:center;justify-content:space-between;gap:12px}.modal-head{border-bottom:1px solid var(--line)}.modal-foot{border-top:1px solid var(--line);justify-content:flex-end}.modal-foot>span{margin-right:auto;font-size:10px;color:var(--muted)}.modal-head h2{margin:2px 0 3px;font-size:20px}.modal-head p{margin:0;font-size:9px;color:var(--muted)}.eyebrow{font-size:8px;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);font-weight:900}.modal-body{overflow:auto;padding:17px}.editor-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:18px}.editor-grid h3{font-size:12px;margin:0 0 9px}.segmented{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-bottom:12px}.segmented button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px;font-size:9px;font-weight:900}.segmented button.active{background:#111318;color:#fff;border-color:#111318}.channel-card{border:1px solid var(--line);border-radius:14px;padding:13px;margin-bottom:9px}.channel-card header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.channel-card h4{font-size:11px;margin:0}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.field-grid .full{grid-column:1/-1}.field-grid label{display:grid;gap:4px;font-size:8px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:900}.field-grid textarea{min-height:72px;resize:vertical}.checkline{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center!important;text-transform:none!important;letter-spacing:0!important;font-size:9px!important}.section-head-row{display:flex;align-items:center;justify-content:space-between}.upload-mini{border:1px solid var(--line);border-radius:10px;padding:8px 10px;font-size:9px;font-weight:900;cursor:pointer}.upload-mini input{display:none}.gallery{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.gallery-card{border:1px solid var(--line);border-radius:13px;overflow:hidden;background:#fafbfc}.gallery-card img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;background:#eceef2}.gallery-card .gallery-meta{padding:8px}.gallery-card b{font-size:9px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gallery-card small{display:block;font-size:8px;color:var(--muted);margin-top:2px}.gallery-actions{display:flex;gap:4px;margin-top:7px;flex-wrap:wrap}.gallery-actions button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:5px 6px;font-size:8px;font-weight:900}.gallery-empty{grid-column:1/-1;padding:30px 10px;border:1px dashed #c9cdd6;border-radius:13px;text-align:center;color:var(--muted);font-size:10px}
.toast{position:fixed;right:18px;bottom:18px;z-index:200;background:#111318;color:#fff;border-radius:12px;padding:11px 13px;box-shadow:var(--shadow);font-size:10px;max-width:340px}
@media(max-width:1050px){.metric-grid{grid-template-columns:1fr 1fr}.two-col,.scan-grid,.editor-grid{grid-template-columns:1fr}.mapping-grid{grid-template-columns:1fr 1fr}.import-cards{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.app-shell{display:block}.sidebar{position:fixed;top:auto;left:0;right:0;bottom:0;width:auto;height:auto;padding:7px;z-index:80}.brand,.side-foot{display:none}.nav{grid-template-columns:repeat(5,1fr);gap:2px}.nav button{padding:9px 3px;text-align:center;justify-content:center;font-size:8px}.nav button small{display:none}.nav button:nth-child(n+6){display:none}.topbar{height:65px;padding:0 12px}.topbar>div:first-child span{display:none}.role-pill{display:none}.select.compact{max-width:118px}.content{padding:18px 12px 88px}.hero-row{align-items:flex-start;flex-direction:column}.hero-row h1{font-size:27px}.metric-grid{gap:8px}.metric{padding:13px}.metric strong{font-size:25px}.two-col{gap:9px}.toolbar,.toolbar-group{align-items:stretch;flex-direction:column}.toolbar-group{width:100%}.input,.select{width:100%}.table-count{text-align:right}.scan-grid{gap:9px}.scanner{min-height:230px}.summary-row{grid-template-columns:1fr 1fr}.mapping-grid{grid-template-columns:1fr}.import-cards{grid-template-columns:1fr 1fr}.quality-row.three{grid-template-columns:1fr 1fr 1fr}.modal{padding:0}.modal-card{width:100%;height:100%;max-height:none;border-radius:0}.modal-body{padding:13px}.field-grid{grid-template-columns:1fr}.segmented{grid-template-columns:1fr 1fr}.gallery{grid-template-columns:1fr 1fr}.modal-foot{padding-bottom:calc(12px + env(safe-area-inset-bottom))}.auth-card{padding:22px}.auth-links{flex-direction:column;align-items:flex-start}}

.product-type{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;font-size:8px;font-weight:950;background:#f0f1f4;color:#666;white-space:nowrap}
.product-type.parent{background:#eeeaff;color:#6347dc}
.product-type.variant{background:#eaf7f1;color:#19724d}
.product-type.single{background:#f0f1f4;color:#777}
.type-sub{display:block;margin-top:5px;color:var(--muted);font-size:8px;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.matrix-info{margin-bottom:14px;padding:12px 14px;border:1px solid #ddd8ff;background:#f7f5ff;border-radius:14px}
.matrix-info b{display:block;font-size:11px;margin-bottom:4px}
.matrix-info p{margin:0;color:var(--muted);font-size:9px;line-height:1.55}
.matrix-chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}
.matrix-chip{display:inline-flex;border-radius:999px;padding:4px 7px;background:#fff;border:1px solid #e3dfff;font-size:8px;font-weight:850;color:#6652be}

.stock-override-card{border:1px solid #e2e2e6;border-radius:16px;padding:14px;margin-bottom:18px;background:#fafafa}
.stock-override-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.stock-override-head h3{margin:0 0 4px}.stock-override-head p{margin:0;color:var(--muted);font-size:9px;line-height:1.5}
.stock-override-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:10px}.stock-override-stat{background:#fff;border:1px solid #ececef;border-radius:12px;padding:9px}.stock-override-stat span{display:block;color:var(--muted);font-size:8px;text-transform:uppercase;letter-spacing:.06em;font-weight:850}.stock-override-stat b{display:block;margin-top:3px;font-size:13px}
.stock-mode-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.stock-mode-row label{font-size:9px;font-weight:800;color:var(--muted)}.stock-mode-row select,.stock-mode-row input{margin-top:5px}.stock-override-help{font-size:8px;color:var(--muted);line-height:1.55;margin-top:8px}
@media(max-width:700px){.stock-override-grid,.stock-mode-row{grid-template-columns:1fr}}

/* Checkout / order operations V0.6 */
.order-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.order-metrics .metric{padding:16px}
.order-metrics .metric span{display:block;font-size:8px;text-transform:uppercase;letter-spacing:.08em;font-weight:900;color:var(--muted)}
.order-metrics .metric strong{display:block;font-size:26px;margin:4px 0 1px}
.order-metrics .metric small{color:var(--muted)}
.order-toolbar{align-items:end;gap:14px}
.order-filter-grid{display:grid;grid-template-columns:minmax(260px,1fr) 150px 180px;gap:8px;flex:1}
.orders-table tr[data-order-id]{cursor:pointer}
.orders-table tr[data-order-id]:hover td{background:#fafafd}
.order-status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;font-size:8px;font-weight:950;text-transform:uppercase;letter-spacing:.045em;white-space:nowrap}
.order-status.new{background:#eeeaff;color:#6347dc}
.order-status.confirmed{background:#e9f3ff;color:#2866a6}
.order-status.preparing{background:#fff3df;color:#9a6100}
.order-status.ready{background:#edf8ef;color:#267a42}
.order-status.out_for_delivery{background:#e9f7f4;color:#147b68}
.order-status.delivered{background:#e9f7ef;color:#16875c}
.order-status.completed{background:#edf1f0;color:#54615c}
.order-status.cancelled{background:#fff0f1;color:#aa3340}
.payment-status{display:inline-flex;border-radius:999px;padding:5px 8px;font-size:8px;font-weight:900;background:#f1f1f4;color:#656870;text-transform:uppercase}
.payment-status.paid{background:#e9f7ef;color:#16875c}
.payment-status.failed,.payment-status.cancelled{background:#fff0f1;color:#aa3340}
.payment-status.refunded{background:#fff3df;color:#9a6100}
.order-modal-card{width:min(1040px,96vw)}
.order-modal-body{padding-top:18px}
.order-detail-grid{display:grid;grid-template-columns:1fr .82fr;gap:14px}
.order-detail-card{border:1px solid var(--line);border-radius:15px;padding:14px;margin-bottom:12px;background:#fff}
.order-detail-card h3{margin:0 0 11px;font-size:12px}
.order-key-list{display:grid;gap:8px}
.order-key-list>div{display:grid;grid-template-columns:110px 1fr;gap:10px;font-size:9px}
.order-key-list span{color:var(--muted);font-weight:850}
.order-key-list b{font-size:10px;white-space:pre-line}
.order-item-row{display:grid;grid-template-columns:1fr auto;gap:12px;padding:9px 0;border-bottom:1px solid var(--line)}
.order-item-row:last-child{border-bottom:0}
.order-item-row b{display:block;font-size:10px}.order-item-row span{display:block;color:var(--muted);font-size:8px;margin-top:2px}
.order-item-price{font-size:9px;font-weight:900;white-space:nowrap}
.order-total-box{margin-top:10px;padding-top:10px;border-top:1px solid var(--line);display:grid;gap:5px}
.order-total-box>div{display:flex;justify-content:space-between;font-size:9px}
.order-total-box .grand{font-size:12px;font-weight:950;padding-top:6px}
.order-status-actions{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:13px}
.order-status-actions .btn{font-size:9px;padding:8px 10px}
.order-label{display:block;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.order-label .select{margin-top:5px}
.order-note-input{margin-bottom:8px;min-height:84px}
.order-timeline{display:grid;gap:8px}
.order-timeline-row{display:grid;grid-template-columns:8px 1fr;gap:8px;align-items:start}
.order-timeline-dot{width:8px;height:8px;border-radius:50%;background:var(--accent);margin-top:4px}
.order-timeline-row b{display:block;font-size:9px}.order-timeline-row span{display:block;color:var(--muted);font-size:8px;margin-top:1px}
@media(max-width:900px){
  .order-metrics{grid-template-columns:1fr 1fr}
  .order-filter-grid{grid-template-columns:1fr 1fr}
  .order-filter-grid input{grid-column:1/-1}
  .order-detail-grid{grid-template-columns:1fr}
}
@media(max-width:600px){
  .order-metrics{grid-template-columns:1fr 1fr}
  .order-filter-grid{grid-template-columns:1fr}
  .order-filter-grid input{grid-column:auto}
}

.order-payment-method-box{margin:0 0 12px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.order-payment-method-box span{display:block;font-size:8px;color:var(--muted);font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.order-payment-method-box b{display:block;margin-top:3px;font-size:11px}

/* Team feedback: product browser usability V0.8 */
.product-pager{gap:8px;flex-wrap:wrap}
.pager-pages{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:center}
.pager-number{min-width:34px;height:34px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font:inherit;font-weight:900;cursor:pointer;padding:0 8px}
.pager-number:hover{border-color:#b9bbc4;background:#fafafd}
.pager-number.active{background:var(--ink);border-color:var(--ink);color:#fff}
.pager-gap{padding:0 3px;color:var(--muted);font-weight:900}
.pager-meta{padding:0 4px;white-space:nowrap}
#productCategoryFilter{min-width:170px}
@media(max-width:720px){
  .product-pager .pager-meta{width:100%;text-align:center;order:3}
  .pager-pages{order:2}
  #productPrev{order:1}
  #productNext{order:1}
}


/* Moonlight Commerce v0.8.1 — stronger store labels + order editing */
.store-badge.order-store{padding:5px 9px;color:#fff!important;border:1px solid rgba(0,0,0,.08);box-shadow:inset 0 -1px 0 rgba(0,0,0,.08)}
.store-badge.order-store.sextasy{background:#7f173d}
.store-badge.order-store.headz{background:#08734f}
.order-items-head{margin-bottom:6px}.order-items-head h3{margin:0}.activity-actor{font-weight:850;color:#555d6a}.activity-change{color:#262a31;font-weight:800}
.order-edit-modal-card,.create-order-modal-card{width:min(1120px,96vw)}
.order-edit-layout,.create-order-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.order-edit-layout h3,.create-order-grid h3{font-size:12px;margin:0 0 10px}
.order-edit-items{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff;min-height:58px}.order-edit-row{display:grid;grid-template-columns:minmax(0,1fr) 70px 95px 34px;gap:10px;align-items:center;padding:10px;border-bottom:1px solid var(--line)}.order-edit-row:last-child{border-bottom:0}.order-edit-main b{display:block;font-size:10px}.order-edit-main span{display:block;font-size:8px;color:var(--muted);margin-top:2px}.order-edit-row label{font-size:8px;color:var(--muted);font-weight:850}.order-edit-row input[type=number]{width:62px;border:1px solid var(--line);border-radius:8px;padding:7px}.order-edit-row>b{text-align:right;font-size:9px}.danger-icon{color:#a52b3d!important}.order-edit-subtotal{font-size:9px;font-weight:900;color:#444b57}.order-edit-reason-label{margin-top:12px}.compact-notice{font-size:9px;margin-top:10px;padding:9px 10px}
.order-product-searchbar{display:grid;grid-template-columns:1fr auto;gap:8px;margin-bottom:9px}.order-product-results{border:1px solid var(--line);border-radius:14px;max-height:390px;overflow:auto;background:#fff}.order-product-result{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding:10px;border-bottom:1px solid var(--line)}.order-product-result:last-child{border-bottom:0}.order-product-result b{display:block;font-size:10px}.order-product-result span{display:block;color:var(--muted);font-size:8px;margin-top:2px}.order-product-result button:disabled{opacity:.4;cursor:not-allowed}
.form-grid.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.form-grid.two label{font-size:9px;font-weight:850;color:#555d6a}.form-grid.two .span-two{grid-column:1/-1}.form-grid.two input,.form-grid.two textarea,.form-grid.two select{margin-top:5px;font-weight:500;color:#111}
@media(max-width:820px){.order-edit-layout,.create-order-grid{grid-template-columns:1fr}.order-product-results{max-height:300px}}
@media(max-width:600px){.order-edit-row{grid-template-columns:1fr 55px 30px}.order-edit-row>b{display:none}.form-grid.two{grid-template-columns:1fr}.form-grid.two .span-two{grid-column:auto}}


/* Moonlight Commerce v0.10 — promotions */
.promo-admin-grid{display:grid;grid-template-columns:minmax(320px,.85fr) minmax(420px,1.15fr);gap:16px}.promo-help{margin-bottom:16px}.promo-form{display:grid;gap:14px}.promo-store-box{border:1px solid var(--line);border-radius:12px;padding:12px;display:flex;gap:14px;align-items:center;flex-wrap:wrap;background:var(--soft)}.promo-store-box>b{width:100%;font-size:9px;text-transform:uppercase;letter-spacing:.06em}.promo-store-box label,.promo-option-list label{font-size:9px;font-weight:850}.promo-option-list{display:grid;gap:8px}.promo-form-actions{display:flex;justify-content:flex-end;gap:8px}.promo-list{display:grid;gap:9px}.promo-row{border:1px solid var(--line);border-radius:14px;padding:12px;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center}.promo-row.muted-promo{opacity:.58}.promo-row-main>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.promo-row-main strong{font-size:10px}.promo-row-main span,.promo-row-main small{display:block;color:var(--muted);font-size:8px;margin-top:4px}.promo-code-chip{display:inline-flex;border-radius:999px;background:#191b20;color:#fff;padding:5px 8px;font-size:9px;letter-spacing:.05em}.promo-row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.channel-sale-box{grid-column:1/-1;margin-top:12px;border:1px solid #e3d4ff;background:#faf7ff;border-radius:14px;padding:12px}.channel-sale-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}.channel-sale-head b{font-size:10px}.channel-sale-head span{font-size:8px;color:#7556a3;font-weight:800}.channel-sale-box .field-grid{margin:0}.channel-sale-box .checkline{background:#fff;border-radius:10px;padding:9px}
@media(max-width:900px){.promo-admin-grid{grid-template-columns:1fr}}@media(max-width:600px){.promo-row{grid-template-columns:1fr}.promo-row-actions{justify-content:flex-start}}


/* Online reporting V0.10 */
.report-filter-panel{overflow:visible}.report-filter-row{display:grid;grid-template-columns:150px 170px 190px minmax(220px,1fr) auto;gap:9px;align-items:end}.report-filter-row label{display:grid;gap:5px;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}.report-search-label{min-width:0}.report-search-label .input{width:100%}.report-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-bottom:13px}.report-kpis .metric{padding:14px}.report-kpis .metric strong{font-size:24px}.report-two-col{align-items:start}.report-mini-table table{min-width:560px}.report-performance-wrap{max-height:620px}.report-performance-table{min-width:1280px}.report-status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;font-size:8px;font-weight:950;white-space:nowrap}.report-status.selling{background:#e9f7ef;color:#16875c}.report-status.new{background:#eeeaff;color:#6347dc}.report-status.inactive{background:#fff3df;color:#9a6100}.report-status.never{background:#fff0f1;color:#aa3340}.report-muted{color:var(--muted);font-size:8px}.sync-health-good{color:var(--good)}.sync-health-warn{color:var(--warn)}.sync-health-bad{color:var(--danger)}
@media(max-width:1200px){.report-kpis{grid-template-columns:repeat(3,1fr)}.report-filter-row{grid-template-columns:1fr 1fr 1fr}.report-search-label{grid-column:1/3}}
@media(max-width:720px){.report-kpis{grid-template-columns:1fr 1fr}.report-filter-row{grid-template-columns:1fr}.report-search-label{grid-column:auto}.report-two-col{grid-template-columns:1fr}.report-performance-wrap{max-height:none}}
