/* Surface and touch polish; business data and control flow stay in their modules. */
:root{--bg:#f3f6f8;--card:#fff;--ink:#192b35;--muted:#607482;--line:#dce5e9;--brand:#087e76;--brand-d:#086760;--brand-l:#e0f2ee;--shadow:0 1px 3px rgba(21,54,67,.04),0 10px 28px rgba(21,54,67,.055);--shadow-lg:0 22px 60px rgba(15,44,54,.19)}
body{letter-spacing:.01em}
.topbar{border-bottom:1px solid var(--line);box-shadow:0 4px 22px rgba(18,47,58,.07)}
.brand{letter-spacing:0;font-weight:850}
.tab{border-radius:10px;line-height:1.35}
.tab.active{box-shadow:0 4px 14px rgba(8,126,118,.17)}
.view>.panel,.panel,.metric,.stat-card{border:1px solid var(--line);box-shadow:var(--shadow)}
.panel{border-radius:18px}
h1,h2,h3,h4{line-height:1.35;letter-spacing:0}
.view h2{font-weight:800}
.quick-actions{gap:10px;align-items:center}
.quick-actions>.action,.quick-actions>button{min-height:44px}
button,.action{transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .12s ease}
button:focus-visible,.action:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(8,126,118,.32);outline-offset:2px}
input,select,textarea{border-color:#cbd8dd;background:#fff}
.table-scroll{border:1px solid var(--line);border-radius:13px;overflow:auto;background:#fff}
.table-scroll table{border-collapse:separate;border-spacing:0;width:100%}
.table-scroll th{position:sticky;top:0;z-index:1;background:#edf4f3;color:#38545d;font-weight:800;white-space:nowrap}
.table-scroll td{border-bottom:1px solid #edf0f1;vertical-align:middle}
.table-scroll tr:last-child td{border-bottom:0}
.table-scroll tbody tr:nth-child(even){background:#fbfcfc}
.table-scroll tbody tr.new-order{background:#e9f7ef}
.table-scroll tbody tr.new-order td:first-child{font-weight:850;color:#086760}
.modal-card,.modal-card.wide{border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow-lg);max-height:min(92dvh,980px);overflow:auto}
.modal-card>.close-panel{position:sticky;top:0;z-index:5;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
.modal-actions,.catalog-actions{position:sticky;bottom:0;background:linear-gradient(to bottom,rgba(255,255,255,.94),#fff 25%);padding:12px 0;display:flex;flex-wrap:wrap;gap:10px;z-index:3}
.flash{box-shadow:var(--shadow-lg)}
.royal-order-alert{position:fixed;inset-inline-start:16px;bottom:18px;z-index:100;max-width:min(380px,calc(100vw - 32px));width:max-content;display:grid;gap:6px;background:#113c39;color:#fff;border:1px solid #2b7770;border-radius:16px;padding:14px 16px;box-shadow:var(--shadow-lg)}
.royal-order-alert strong{font-size:16px}.royal-order-alert span{font-size:14px}.royal-order-alert>div{display:flex;gap:8px}.royal-order-alert button{min-height:42px;padding:8px 13px;background:#fff;color:#115f56}.royal-order-alert [data-dismiss]{background:transparent;color:#fff;border:1px solid #84bbb2}
.catalog-controls,.catalog-mapping{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px 14px}
.catalog-summary{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:12px 0}.catalog-summary>*{background:#edf4f3;border-radius:10px;padding:9px 12px}.catalog-summary .error{background:#fce8e8}
.catalog-mapping label{margin:5px 0}.catalog-mapping select{min-width:0}
.catalog-actions{position:static}
@media(min-width:1200px){.view{max-width:none}}
@media(max-width:899px){.royal-order-alert{bottom:14px}.modal-card,.modal-card.wide{max-height:94dvh}.quick-actions{flex-wrap:wrap}.quick-actions>.action{min-height:46px}}
@media(max-width:600px){.catalog-controls,.catalog-mapping{grid-template-columns:1fr}.modal-actions button{min-height:48px}.table-scroll td,.table-scroll th{padding:10px 8px}}
@media(prefers-reduced-motion:reduce){button,.action{transition:none}}
.alias-indicator{display:inline-block;margin-inline-start:.4rem;padding:.15rem .42rem;border-radius:999px;background:#fff1cd;color:#704b2d;font-size:.72rem;font-weight:700;vertical-align:middle}
.alias-indicator.promo-indicator{background:#e3f6e9;color:#1d6b3f}
.promo-qty-locked{display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:43px;padding:0 5px;font-size:18px;font-weight:850}
.pos-connection{display:inline-flex;align-items:center;white-space:nowrap;font-size:.78rem;font-weight:700;color:#216a4d}
.pos-connection[data-ready="0"]{color:#a73531}
.receiving-context{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:8px 10px;background:#fff9eb;border:1px solid #e7d8b9;border-radius:12px}
.receiving-context label{display:flex;align-items:center;gap:8px;margin:0;font-size:.84rem;font-weight:700}
.receiving-context input{min-height:40px;max-width:210px}
#receiveView #buyContext{position:sticky;top:0;z-index:6;background:#fff;padding:4px 0}
@media(max-width:620px){.receiving-context label{width:100%}.receiving-context input{flex:1;max-width:none}}
.report-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:10px}
.report-actions button{min-height:44px;min-width:95px}
.product-advanced{border:1px solid #e7dfd2;border-radius:12px;padding:10px;margin:10px 0;background:#fbf9f5}
.product-advanced summary{cursor:pointer;font-weight:700;min-height:36px}

