:root{--ink:#183b37;--muted:#526e68;--paper:#f6f8f4;--line:#dce5de;--teal:#086958;--mint:#d8f3d6}*{box-sizing:border-box}body{margin:0;font:16px/1.5 Inter,system-ui,Arial,sans-serif;background:var(--paper);color:var(--ink)}a{color:var(--teal);text-decoration:none}a:hover{text-decoration:underline}header{min-height:72px;background:white;border-bottom:1px solid var(--line);padding:12px clamp(16px,4vw,72px);display:flex;align-items:center;gap:30px;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:800;color:var(--ink)}.logomark{background:var(--teal);color:white;display:grid;place-items:center;width:36px;height:36px;border-radius:10px;font-size:28px;line-height:1}.account,nav,.filters,.headline,.pager{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.account{margin-left:auto}.account form{margin:0}nav a{padding:8px 10px;color:var(--muted);font-weight:600;font-size:14px}.selected{background:#e4f2e9;border-radius:8px;color:var(--teal)}main{max-width:1300px;margin:auto;padding:36px clamp(16px,4vw,62px);width:100%}.mast{background:#dcefe2;border:1px solid #cde1d3;border-radius:20px;padding:clamp(22px,3vw,44px);display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.16em;color:var(--teal);display:flex;gap:8px;align-items:center}.eyebrow b{width:8px;height:8px;border-radius:100%;background:var(--teal)}h1{font-size:clamp(32px,4vw,54px);font-weight:750;letter-spacing:-.05em;margin:12px 0 20px}.mast h1{margin:8px 0}.mast p{margin:0;color:var(--muted)}h2{font-size:21px;font-weight:720;letter-spacing:-.03em;margin:0 0 12px}h3{font-size:18px;font-weight:700}small{font-size:13px;color:var(--muted);display:block}.calendar{display:flex;align-items:center;gap:14px;background:#f1faf2;padding:14px 20px;border-radius:14px;white-space:nowrap}.calendar i{font-size:24px}.sheet-grid,.manage-grid{display:grid;grid-template-columns:minmax(0,2.3fr) minmax(260px,1fr);gap:20px;align-items:start}.panel{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden}.pad,.summary,.panel-head{padding:22px}.panel-head,.product,.metric{display:flex;align-items:center;gap:15px}.panel-head{justify-content:space-between;border-bottom:1px solid var(--line)}.panel-head h2{margin-bottom:3px}.panel-head input{width:min(42%,200px)}input:not([type=checkbox]),textarea,select{padding:9px 11px;border:1px solid #bfcfc4;border-radius:8px;background:white;color:var(--ink);font:inherit;max-width:100%}input[type=checkbox]{width:18px;height:18px;accent-color:var(--teal);flex:none}.product{padding:14px 20px;border-bottom:1px solid var(--line)}.product:last-child{border:0}.product-name{flex:1;cursor:pointer;overflow-wrap:anywhere}.thumb{border:0;padding:0;background:#e5f2e9;border-radius:10px;overflow:hidden;width:52px;height:52px;flex:none}.thumb img{width:100%;height:100%;object-fit:cover}.icon{display:grid;place-items:center;color:var(--teal)}.qty{width:70px}.summary{position:sticky;top:18px}.summary h2{margin:6px 0 20px}.metric{justify-content:space-between;margin:8px 0}.summary label,.fields label{display:block;margin:18px 0;font-weight:600}.summary textarea,.fields input:not([type=checkbox]),.fields select{width:100%;margin-top:5px}.primary,.secondary,.plain{border:0;border-radius:9px;padding:10px 15px;font:inherit;font-weight:650;cursor:pointer;display:inline-block;text-align:center}.primary{background:var(--teal);color:white}.primary:hover{background:#074d40;color:white}.secondary{background:#eef4ee;color:var(--teal)}.plain{background:transparent;color:var(--teal)}.summary .primary,.summary .secondary{display:block;width:100%;margin-top:8px}.empty{text-align:center;padding:40px 16px;color:var(--muted)}.empty i{font-size:34px;margin-bottom:14px}.notice{padding:14px 18px;margin-bottom:20px;background:var(--mint);border-radius:8px}.office .frame{display:grid;grid-template-columns:215px minmax(0,1fr);min-height:78vh}.office aside{background:white;padding:27px 14px;border-right:1px solid var(--line)}aside strong{padding:8px}aside nav{display:grid;margin-top:18px}table{width:100%;border-collapse:collapse;margin:14px 0}td,th{text-align:left;padding:11px 8px;border-bottom:1px solid var(--line)}th{font-size:12px;letter-spacing:.02em;color:var(--muted)}.scroll{overflow:auto}.badge-state{display:inline-block;padding:4px 10px;border-radius:20px;background:#e4f1ed;font-size:13px;white-space:nowrap}.s-pending{background:#ffedc2}.s-rejected{background:#ffe3df}.wrap{white-space:pre-wrap;overflow-wrap:anywhere}.headline{justify-content:space-between;margin-bottom:12px}.pager{justify-content:space-between}.fields>form{max-width:670px}.fields hr{border:0;border-top:1px solid var(--line)}dialog{width:min(650px,90vw);max-height:85vh;border:0;border-radius:14px;padding:24px}dialog img{width:100%;height:auto;margin:8px 0}footer{max-width:1300px;margin:auto;padding:22px clamp(16px,4vw,62px);font-size:13px;color:var(--muted)}[hidden]{display:none!important}:focus-visible{outline:3px solid #268ab2;outline-offset:2px}@media(max-width:920px){header{gap:8px}header nav{order:3;width:100%}.manage-grid{grid-template-columns:1fr}.office .frame{grid-template-columns:168px minmax(0,1fr)}}@media(max-width:700px){.sheet-grid,.office .frame{display:block}.summary{margin-top:16px;position:static}.mast{display:block}.calendar{display:inline-flex;margin-top:14px}.office aside{padding:8px}.office aside strong{display:none}aside nav{display:flex;margin:0}main{padding-top:18px}.product{padding:10px;gap:8px}.thumb{width:40px;height:40px}.qty{width:58px}.account small{display:none}.panel-head,.pad,.summary{padding:16px}.headline{align-items:baseline}}

.product-watermark{position:relative;display:block}
.product-watermark::after{
 content:"Hình Tham Khảo";
 position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
 white-space:nowrap;pointer-events:none;
 font:600 clamp(15px,4vw,30px)/1 system-ui,sans-serif;
 color:rgba(255,255,255,.62);text-shadow:0 1px 3px rgba(0,0,0,.55)
}
.thumb.product-watermark::after{
 content:"Hình Tham Khảo";
 top:50%;left:50%;bottom:auto;transform:translate(-50%,-50%);
 font:600 4.5px/1.1 system-ui,sans-serif;
 color:rgba(255,255,255,.85);
 background:none;border:0;padding:0;
 text-shadow:0 0 1px #26342b,0 1px 1px #26342b;
 white-space:nowrap;pointer-events:none;
}
.gallery-photo{margin:8px 0}
.gallery-photo img{display:block;margin:0}
@media(max-width:700px){.thumb.product-watermark::after{font-size:3.8px}}

/* Shared sizing for shop, lists and editors. */
:root{--page-pad:clamp(14px,2.6vw,38px)}
header{padding-inline:var(--page-pad)}
main{padding:clamp(18px,2.5vw,34px) var(--page-pad);min-width:0}
main h1{font-size:clamp(26px,3vw,40px);line-height:1.16;overflow-wrap:anywhere}
h2{font-size:clamp(18px,2vw,22px)}
.frame,.panel,.sheet-grid>*,.manage-grid>*,.panel-head>*{min-width:0}
.panel-head,.headline,.filters{flex-wrap:wrap}
.manage-grid.list-only{grid-template-columns:minmax(0,1fr)}
.scroll{max-width:100%;overflow-x:auto}
.scroll input[type=number]{min-width:6em}
.order-code{white-space:nowrap;font-variant-numeric:tabular-nums}
.panel td{overflow-wrap:anywhere}
.order-code,.badge-state{overflow-wrap:normal}
.menu-toggle{display:none}
@media(max-width:900px){
.office .frame{display:block}
.office aside{padding:8px var(--page-pad);border-bottom:1px solid var(--line)}
.office aside strong{display:none}
.menu-toggle{display:inline-flex;align-items:center;min-height:42px}
.menu-toggle:not([hidden])[aria-expanded=false]+nav{display:none}
.office aside nav{display:flex;flex-wrap:wrap;margin-top:6px}
}
@media(max-width:700px){
header{align-items:center;gap:6px 12px}
header nav{gap:2px 6px}
header nav a{padding:8px 6px}
.brand{font-size:18px;min-width:0;overflow-wrap:anywhere}
.primary,.secondary,.plain{min-height:42px}
.calendar,.calendar strong{white-space:normal}
.product{gap:8px}
.product-name small{line-height:1.45}
.panel.pad:has(>table),.panel.pad:has(form>table){overflow-x:auto}
.panel .filters label{max-width:100%}
}
@media(max-width:420px){.panel-head{gap:8px}.panel-head input{width:100%}.mast{padding:18px}.account .primary{font-size:14px;padding:8px 10px}}

a:any-link,a:any-link:hover,a:any-link:focus,a:any-link:active{text-decoration:none}
footer{text-align:center}
.account{min-width:0;max-width:100%}
.account-menu{position:relative;min-width:0;max-width:100%}
.account-menu summary{cursor:pointer;color:var(--teal);font-weight:600;font-size:.9rem;overflow-wrap:anywhere;padding:8px}
.account-dropdown{position:absolute;right:0;top:100%;z-index:15;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 5px 18px #16362b22;white-space:nowrap}
.notice-stack{position:fixed;z-index:1300;top:max(12px,env(safe-area-inset-top));right:12px;width:min(380px,calc(100% - 24px));display:grid;gap:8px;pointer-events:none}
.notice-stack .notice{position:relative;margin:0;padding:14px 42px 14px 16px;pointer-events:auto;border:1px solid #adcdb9;box-shadow:0 5px 18px #16362b22;overflow-wrap:anywhere}
.notice-stack button{position:absolute;top:2px;right:3px;border:none;background:transparent;color:inherit;font-size:20px;width:34px;height:34px}
.notice[role=alert]{background:#fff1df}
.stock-photo{position:relative;flex:none}
.stock-badge{position:absolute;right:-4px;bottom:-3px;padding:1px 4px;line-height:1.25;min-width:18px;text-align:center;border-radius:5px;background:#07564b;color:white;border:1px solid white;font-weight:700;font-size:11px;pointer-events:none}
.gallery-photo{width:min(480px,100%);aspect-ratio:1;margin:12px auto;overflow:hidden;background:#f2f4ef;border-radius:10px}
.gallery-photo img{width:100%;height:100%;object-fit:contain;margin:0;display:block}
.product-watermark::after{color:rgba(255,255,255,.83);font-weight:750;text-shadow:-1px 0 #40534b,1px 0 #40534b,0 -1px #40534b,0 1px #40534b,0 2px 4px #26342b}
.product-search{width:min(100%,260px);margin:6px 0}
.product-search input,.panel-head .product-search input{width:100%}
#product-suggestions{display:grid;border:1px solid var(--line);border-radius:8px;margin-top:4px;max-height:210px;overflow:auto}
#product-suggestions button{border:0;background:white;text-align:left;padding:8px 12px;color:var(--ink)}
#product-suggestions button:hover,#product-suggestions button:focus{background:#e4f2e9}
.reject-order{margin-top:10px}
.reject-order summary{cursor:pointer;color:#863c30}
.reject-order label,.reject-order textarea{display:block;width:100%;margin-bottom:10px}

.entry-page main{min-height:100vh;min-height:100svh;display:grid;place-items:center}
.entry-card{width:min(100%,460px);padding:clamp(22px,5vw,38px)}
.entry-card h1{font-size:clamp(25px,4vw,32px);margin-top:24px}
.entry-card p{margin-bottom:20px}
.photo-shell{background:white}
.photo-heading,.photo-controls{display:flex;align-items:center;gap:10px;padding:8px 14px}
.photo-heading{justify-content:space-between;border-bottom:1px solid var(--line)}
.photo-heading h3{margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.photo-close,.photo-controls button{border:none;border-radius:8px;background:#edf4ef;color:var(--ink);width:40px;height:40px;flex:none;font:24px/1 system-ui;cursor:pointer}
.photo-stage{height:min(460px,calc(100vh - 152px));height:min(460px,calc(100dvh - 152px));background:#f1f4ef}
.photo-stage figure{height:100%;width:100%;margin:0}
.photo-stage img{display:block;width:100%;height:100%;margin:0;object-fit:contain}
.photo-controls{justify-content:center;border-top:1px solid var(--line)}

.form-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.5rem}
.editor-fields label{display:block;margin:0}
.editor-fields textarea{width:100%}
.summary .form-actions{margin-top:12px}
.summary .form-actions button{width:auto;margin:0}
.filters>button,.headline>.primary{margin-inline-start:auto}
.photo-controls,.pager{justify-content:flex-end}
.reject-order summary{text-align:end}
.menu-toggle.secondary{margin-inline-start:auto}
.pos-modal .modal-dialog{--bs-modal-width:560px}
.order-modal .modal-dialog{--bs-modal-width:700px}
.pos-modal .modal-title{margin:0;overflow-wrap:anywhere}
.pos-modal .panel{border:0;box-shadow:none;padding:0}
.pos-modal .fields img{width:auto;max-width:80px;height:55px;object-fit:contain}
.gallery-modal .modal-body{padding:0}
.gallery-modal .photo-stage{height:min(460px,60dvh)}

/* Back-office palettes inherit into Bootstrap modals mounted on the body. */
.office-admin {
  --teal:#a52337; --ink:#40232a; --muted:#71575e; --line:#ead5d9;
  --paper:#fbf6f7; --mint:#f8dfe4; --role-soft:#fbebee; --role-hover:#831a2b;
}
.office-owner {
  --teal:#be185d; --ink:#472438; --muted:#795567; --line:#f0cddd;
  --paper:#fff7fb; --mint:#fce0ee; --role-soft:#fce7f3; --role-hover:#9d174d;
}
.office .role-label {display:block;color:var(--teal)}
@media(max-width:900px){
  .office aside {display:grid;grid-template-columns:1fr auto;align-items:center}
  .office aside nav {grid-column:1 / -1}
}
:is(.office-admin,.office-owner) header {border-top:3px solid var(--teal)}
:is(.office-admin,.office-owner) :is(.secondary,.thumb,nav .selected,.modal-header),
:is(.office-admin,.office-owner) #product-suggestions button:is(:hover,:focus) {background:var(--role-soft)}
:is(.office-admin,.office-owner) .primary:hover {background:var(--role-hover)}
:is(.office-admin,.office-owner) :is(input:not([type=checkbox]),textarea,select,.notice) {border-color:var(--line)}
:is(.office-admin,.office-owner) :focus-visible {outline-color:var(--teal)}
:is(.office-admin,.office-owner) .modal-content {color:var(--ink);border-color:var(--line)}
:is(.office-admin,.office-owner) .btn-success {
  --bs-btn-bg:var(--teal); --bs-btn-border-color:var(--teal);
  --bs-btn-hover-bg:var(--role-hover); --bs-btn-hover-border-color:var(--role-hover);
  --bs-btn-active-bg:var(--role-hover); --bs-btn-active-border-color:var(--role-hover);
}
.list-pager{display:flex;align-items:center;justify-content:flex-end;gap:8px 12px;flex-wrap:wrap;margin:12px 0;font-size:.9rem}
.sheet-grid .list-pager{padding-inline:14px}
.list-pager button:disabled{opacity:.5;cursor:default}

.order-actions {display:flex;justify-content:flex-end;gap:10px 20px;flex-wrap:wrap;padding-top:14px;border-top:1px solid var(--line)}
.order-action-group {display:flex;gap:8px;align-items:stretch}
.order-action-group form {margin:0}
.order-actions :is(button,a),.order-reject-toggle {display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 14px;border-radius:9px;font-weight:650}
.order-reject-toggle {color:#952e33;background:white;border:1px solid #c98e91}
#reject-reason form {padding:14px 0 0}
#reject-reason textarea {display:block;width:100%;margin:5px 0 10px}
@media(max-width:600px){
 .order-actions {display:grid;grid-template-columns:minmax(0,1fr)}
 .order-action-group {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .order-action-group form {grid-column:-2/-1}
 .order-action-group button {width:100%}
}

.account-dropdown {min-width:150px;padding:4px}
.account-dropdown a,.account-dropdown button {display:block;width:100%;text-align:left;padding:9px 12px;color:var(--teal);font-weight:600;border-radius:6px}
.account-dropdown a:hover,.account-dropdown button:hover {background:var(--role-soft,var(--paper))}
@media(max-width:767px){
 .sheet-tabs{display:flex;margin-bottom:12px;padding:4px;background:white;border:1px solid var(--line);border-radius:12px}
 .sheet-tabs button{flex:1;border:0;background:transparent;color:var(--muted);padding:10px 4px;font-weight:600;border-radius:8px}
 .sheet-tabs button[aria-selected=true]{background:var(--teal);color:white}
 #sheet .sheet-grid{display:block}
 #sheet .summary{margin:0;position:static}
 .office .record-table,.office .record-table tbody{display:block;width:100%;margin:0}
 .office .record-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .office .record-table.has-select-all thead{position:static;width:auto;height:auto;clip-path:none}
 .office .has-select-all th:not(:first-child){display:none}
 .office .record-table tbody tr{display:block;padding:9px 0;border-bottom:1px solid var(--line)}
 .office .record-table tbody td{display:grid;grid-template-columns:minmax(78px,32%) minmax(0,1fr);gap:8px;padding:4px 0;border:0;align-items:baseline}
 .office .record-table tbody td::before{content:attr(data-label);color:var(--muted);font-size:.82rem;font-weight:600}
 .office .record-value{min-width:0;overflow-wrap:anywhere}
 .office .record-value .order-code,.office .record-value .badge-state{white-space:normal}
 .office .record-value input[type=number]{width:100%;min-width:0;max-width:9em}
 .office .panel .filters>*{min-width:0;max-width:100%}
}

body {font-size:1em}
.order-items .item-meta {display:none}
@media(max-width:767px){
 html {font-size:87.5%}
 body {font-size:clamp(12.8px,3.5vw,14px)}
 .mast {padding:10px 14px;border-radius:12px;margin-bottom:10px;display:flex;flex-wrap:wrap;gap:3px 16px;align-items:center}
 .mast .eyebrow {font-size:.74rem;letter-spacing:.09em}
 .mast h1 {font-size:1.45rem;margin:2px 0;line-height:1.18}
 .mast .calendar {background:transparent;margin:0;padding:0;gap:6px;font-size:.86rem}
 .mast .calendar small {display:none}
 .mast .calendar i {font-size:1rem}
 .summary .summary-kicker {display:none}
 .summary .summary-heading {font-size:.82rem;letter-spacing:.1em;text-transform:uppercase;color:var(--teal);margin:0 0 12px;font-weight:800}
 .order-items,.order-items thead,.order-items tbody {display:block;width:100%}
 .order-items tr {display:grid;grid-template-columns:10% minmax(0,90%);align-items:start;border-bottom:1px solid var(--line)}
 .order-items td,.order-items th {padding:7px 0;border:none;overflow-wrap:anywhere}
 .order-items :is(td,th):first-child {text-align:center}
 .order-items :is(td,th):nth-child(n+3) {display:none}
 .order-items .item-meta {display:block;margin-top:3px;font-size:.88em;color:var(--muted)}
}

.pager-icon,.weekly-input>span {display:none}
@media(max-width:767px){
 .pager-text {display:none}
 .pager-icon {display:inline-block;vertical-align:middle}
 :is(.list-pager,.pager) :is(a,button):has(.pager-icon){display:inline-grid;place-items:center;width:42px;min-height:42px;padding:0}
 .weekly-table,.weekly-table :is(thead,tbody){display:block;width:100%}
 .weekly-table thead tr{display:block}
 .weekly-table thead th{display:none}
 .weekly-table thead th:first-child{display:block;padding:5px 0}
 .weekly-table thead label{display:flex;align-items:center;gap:8px;min-height:36px}
 .weekly-table tbody tr{display:grid;grid-template-columns:10% minmax(0,45%) minmax(0,45%);align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
 .weekly-table tbody td{padding:0;border:0;min-width:0}
 .weekly-table tbody td:first-child{grid-column:1;grid-row:1 / 3;align-self:start;display:flex;align-items:center;min-height:34px}
 .weekly-table tbody td:nth-child(2){grid-column:2 / 4;overflow-wrap:anywhere;font-weight:600}
 .weekly-table tbody td:nth-child(3){display:none}
 .weekly-table tbody td:nth-child(4){grid-column:2;padding-right:6px}
 .weekly-table tbody td:nth-child(5){grid-column:3}
 .weekly-table .thumb{width:32px;height:32px}
 .weekly-input{display:block}
 .weekly-input>span{display:block;font-size:.85em;color:var(--muted);margin:4px 0 2px}
 #weekly-pick .weekly-input input{width:100%;min-width:0;padding:5px 8px}
}

.customer-search{width:min(100%,320px);margin:6px 0}
.customer-search input{width:100%}
#customer-suggestions{display:grid;border:1px solid var(--line);border-radius:8px;margin-top:4px;max-height:210px;overflow:auto}
#customer-suggestions button{border:0;background:white;text-align:left;padding:8px 12px;color:var(--ink);overflow-wrap:anywhere}
#customer-suggestions button:is(:hover,:focus){background:var(--role-soft,#e4f2e9)}

/* Mobile: keep scrolling, prevent pinch/double-tap zoom and iOS input zoom. */
@media (hover: none) and (pointer: coarse) {
  html, body { touch-action: pan-x pan-y; }
  input, select, textarea { font-size: 16px !important; }
}

.order-search{width:min(100%,340px);margin:6px 0}
.order-search input{width:100%}
#order-suggestions{display:grid;border:1px solid var(--line);border-radius:8px;margin-top:4px;max-height:210px;overflow:auto}
#order-suggestions button{border:0;background:white;text-align:left;padding:8px 12px;color:var(--ink);overflow-wrap:anywhere}
#order-suggestions button:is(:hover,:focus),#product-suggestions button:is(:hover,:focus),#customer-suggestions button:is(:hover,:focus){background:var(--role-soft,#e4f2e9)}
.search-input-wrap{position:relative}
.search-input-wrap input[type=search]{padding-right:42px}
.search-input-wrap input::-webkit-search-cancel-button{display:none}
.search-clear{position:absolute;right:5px;top:3px;width:34px;height:34px;border:0;background:transparent;color:var(--teal);font-size:23px;line-height:1;border-radius:6px}
.search-clear:hover{background:var(--role-soft,#e4f2e9)}

.merge-tree-toggle{border:1px solid var(--line);background:var(--paper);color:var(--teal);border-radius:5px;min-width:28px;min-height:28px;margin-right:6px;cursor:pointer;font:inherit}
.merge-tree-child{background:var(--paper);color:var(--muted)}
.merge-tree-child td:nth-child(2){padding-left:20px}

/* Pending orders counter */
.nav-pending-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;padding:2px 6px;margin-inline-start:4px;border-radius:999px;background:#b91c1c;color:#fff;font-size:11px;font-weight:700;line-height:16px;vertical-align:middle;font-variant-numeric:tabular-nums}

/* Compact product management list, mobile only. */
.product-mobile-meta,.product-mobile-edit{display:none}
@media(max-width:767px){
 .product-management,.product-management>.panel{min-width:0}
 .product-management .product-search,.product-management .product-search input{width:100%;max-width:100%}
 .product-management-table,.product-management-table tbody{display:block;width:100%;min-width:0}
 .product-management-table thead{display:none}
 .product-management-table tbody tr{display:grid;grid-template-columns:minmax(0,80%) minmax(0,20%);align-items:center;padding:7px 0;border-bottom:1px solid var(--line)}
 .product-management-table tbody td{min-width:0;padding:0;border:0}
 .product-management-table tbody td:first-child{padding-right:6px}
 .product-management-table tbody td:nth-child(2),.product-management-table tbody td:nth-child(3){display:none}
 .product-management-table td:first-child>a{display:flex;align-items:center;min-width:0;gap:6px!important}
 .product-management-table .thumb{width:44px;height:44px;flex:none}
 .product-management-table .product-info{min-width:0;overflow-wrap:anywhere;line-height:1.3}
 .product-management-table .product-name{font-weight:650}
 .product-management-table .product-unit{display:inline;margin-left:3px;font-size:.85em}
 .product-management-table .product-unit::before{content:'('}
 .product-management-table .product-unit::after{content:')'}
 .product-management-table .product-mobile-meta{display:block;color:var(--muted);font-size:.82em;margin-top:3px}
 .product-management-table .product-functions{display:flex;flex-direction:column;gap:4px;align-items:stretch;text-align:center}
 .product-management-table .product-functions form{margin:0;min-width:0}
 .product-management-table .product-functions :is(button,a){display:block;width:100%;min-width:0;padding:5px 2px;font-size:.85em;line-height:1.3;white-space:normal;overflow-wrap:anywhere;text-align:center}
}

@media(max-width:767px){
 .office .product-management-table tbody tr{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,1fr);align-items:center}
 .office .product-management-table tbody td:first-child{grid-column:1;grid-row:1;display:block;padding:0 6px 0 0}
 .office .product-management-table tbody td:nth-child(2),.office .product-management-table tbody td:nth-child(3){display:none}
 .office .product-management-table tbody td.product-functions{grid-column:2;grid-row:1;display:flex;padding:0}
 .office .product-management-table tbody td::before{content:none}
 .office .product-management .product-search{width:100%;max-width:none;display:block}
 .office .product-management .product-search input{width:100%;max-width:none}
}

/* v1.0.68: neutral inventory counters */
.nav-product-count{background:#e5e7eb;color:#374151}

/* v1.0.78: compact order list, one set of checkboxes and merge controls. */
.order-mobile-only{display:none}
@media(max-width:767px){
 .office .order-management-table,.office .order-management-table tbody{display:block;width:100%;min-width:0;margin:0}
 .office .order-management-table thead{display:none}
 .office .order-management-table tbody tr{display:grid;grid-template-columns:minmax(0,10%) minmax(0,45%) minmax(0,45%);align-items:center;row-gap:3px;padding:10px 0;border-bottom:1px solid var(--line)}
 .office .order-management-table tbody td{display:block;min-width:0;padding:0;border:0;overflow-wrap:anywhere}
 .office .order-management-table tbody td::before{content:none}
 .office .order-management-table td:nth-child(1){grid-column:1;grid-row:1 / 4;align-self:center;text-align:center}
 .office .order-management-table td:nth-child(2){grid-column:2 / 4;grid-row:2;font-weight:650;line-height:1.35}
 .office .order-management-table td:nth-child(3){grid-column:2 / 4;grid-row:1;font-size:.8rem;color:var(--muted)}
 .office .order-management-table td:nth-child(4){display:none}
 .office .order-management-table td:nth-child(5){grid-column:2;grid-row:3;font-size:.85rem;font-weight:600}
 .office .order-management-table td:nth-child(6){grid-column:3;grid-row:3;text-align:right}
 .office .order-management-table .order-mobile-only{display:inline}
 .office .order-management-table .order-desktop-only{display:none}
 .office .order-management-table .order-group-caption{display:inline;font-size:.72rem;font-weight:400;margin-left:4px}
 .office .order-management-table .merge-tree-toggle{min-width:26px;min-height:26px;margin-right:4px;padding:0;vertical-align:middle}
 .office .order-management-table .merge-tree-child{margin-left:10%;width:90%;grid-template-columns:minmax(0,8%) minmax(0,46%) minmax(0,46%);padding:8px 6px;border-left:2px solid var(--line);font-size:.9rem}
 .office .order-management-table .merge-tree-child td:nth-child(2){padding-left:0;font-weight:500}
 .office .order-management-table .badge-state{font-size:.75rem;padding:3px 6px;white-space:normal}
}

/* v1.0.82: persistent maintenance status, not a dismissible notice */
.office-maintenance-banner{display:flex;align-items:center;gap:12px;padding:12px 16px;margin:0 0 16px;border:1px solid #f3c486;border-radius:10px;background:#fff0dc;color:#92400e;line-height:1.45;overflow-wrap:anywhere}
.office-maintenance-banner>i{font-size:1.25rem;flex-shrink:0}
.office-maintenance-banner strong,.office-maintenance-banner span{display:block}
.office-maintenance-banner span{font-size:.9rem}
@media(max-width:767px){.office-maintenance-banner{padding:10px 12px;margin-bottom:12px}}

/* v1.0.83 order rules */
.rules-link{background:none!important;border:0!important;color:inherit!important;text-decoration:underline;cursor:pointer;padding:0!important;min-height:0!important;font:inherit;}
.rules-popup .modal-dialog{max-width:650px;width:95%;margin-left:auto;margin-right:auto;}
.rules-popup .modal-content{text-align:left;color:var(--ink,#163d36);font-size:1rem;}
.rules-body{overflow-wrap:anywhere;line-height:1.65;white-space:pre-wrap;}
.rules-body ul,.rules-body ol{padding-left:1.5rem;margin:0 0 .5rem;}
.rules-toolbar{display:flex;flex-wrap:wrap;gap:.4rem;margin:.5rem 0;}
.rules-toolbar button{min-width:2.5rem;}
.entry-page footer{text-align:center;margin-top:1rem;}

/* v1.0.85 Leaf UI: geometry only; preserve existing colors and spacing. */
.mast{border-radius:26px 8px 26px 8px}
.panel{border-radius:22px 6px 22px 6px}
.calendar,.sheet-tabs,.account-dropdown{border-radius:16px 5px 16px 5px}
.primary,.secondary,.plain,.order-actions :is(button,a),.order-reject-toggle{border-radius:13px 4px 13px 4px}
input:not([type=checkbox]):not([type=radio]),textarea,select{border-radius:11px 4px 11px 4px}
nav a.selected,.account-dropdown a,.account-dropdown button,.sheet-tabs button{border-radius:11px 4px 11px 4px}
.notice,.office-maintenance-banner{border-radius:14px 5px 14px 5px}
dialog,.pos-modal .modal-content{border-radius:22px 6px 22px 6px}
.pos-modal .modal-header{border-top-left-radius:21px;border-top-right-radius:5px}
.pos-modal .modal-footer{border-bottom-left-radius:5px;border-bottom-right-radius:21px}
@media(max-width:700px){.mast{border-radius:16px 5px 16px 5px}.panel{border-radius:18px 5px 18px 5px}}

/* v1.0.86 Pink Lady UI: owner backoffice only; decorative, no layout changes. */
.office-owner .panel{border-color:#efc7da;box-shadow:0 3px 14px rgba(190,24,93,.045)}
.office-owner .mast{box-shadow:0 3px 14px rgba(190,24,93,.06)}
.office-owner aside{box-shadow:2px 0 12px rgba(190,24,93,.035)}
.office-owner .role-label{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%2080%22%20fill%3D%22none%22%20stroke%3D%22%23c66b95%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M98%202Q78%2035%2042%2057M78%2029Q54%2015%2048%2024Q56%2038%2078%2029M65%2043Q83%2048%2090%2037Q75%2032%2065%2043%22%2F%3E%3Cg%20transform%3D%22translate%2839%2058%29%22%3E%3Cellipse%20cy%3D%22-8%22%20rx%3D%224%22%20ry%3D%227%22%20fill%3D%22%23fce7f3%22%2F%3E%3Cellipse%20cy%3D%22-8%22%20rx%3D%224%22%20ry%3D%227%22%20transform%3D%22rotate%2872%29%22%20fill%3D%22%23fce7f3%22%2F%3E%3Cellipse%20cy%3D%22-8%22%20rx%3D%224%22%20ry%3D%227%22%20transform%3D%22rotate%28144%29%22%20fill%3D%22%23fce7f3%22%2F%3E%3Cellipse%20cy%3D%22-8%22%20rx%3D%224%22%20ry%3D%227%22%20transform%3D%22rotate%28216%29%22%20fill%3D%22%23fce7f3%22%2F%3E%3Cellipse%20cy%3D%22-8%22%20rx%3D%224%22%20ry%3D%227%22%20transform%3D%22rotate%28288%29%22%20fill%3D%22%23fce7f3%22%2F%3E%3Ccircle%20r%3D%223%22%20fill%3D%22%23d994b3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:right center;background-size:36px 29px}
.office-owner .panel-head{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%2080%22%20fill%3D%22none%22%20stroke%3D%22%23c66b95%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M98%202Q78%2035%2042%2057M78%2029Q54%2015%2048%2024Q56%2038%2078%2029M65%2043Q83%2048%2090%2037Q75%2032%2065%2043%22%2F%3E%3Cg%20transform%3D%22translate%2839%2058%29%22%3E%3Cellipse%20cy%3D%22-8%22%20rx%3D%224%22%20ry%3D%227%22%20fill%3D%22%23fce7f3%22%2F%3E%3Cellipse%20cy%3D%22-8%22%20rx%3D%224%22%20ry%3D%227%22%20transform%3D%22rotate%2872%29%22%20fill%3D%22%23fce7f3%22%2F%3E%3Cellipse%20cy%3D%22-8%22%20rx%3D%224%22%20ry%3D%227%22%20transform%3D%22rotate%28144%29%22%20fill%3D%22%23fce7f3%22%2F%3E%3Cellipse%20cy%3D%22-8%22%20rx%3D%224%22%20ry%3D%227%22%20transform%3D%22rotate%28216%29%22%20fill%3D%22%23fce7f3%22%2F%3E%3Cellipse%20cy%3D%22-8%22%20rx%3D%224%22%20ry%3D%227%22%20transform%3D%22rotate%28288%29%22%20fill%3D%22%23fce7f3%22%2F%3E%3Ccircle%20r%3D%223%22%20fill%3D%22%23d994b3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:right top;background-size:78px 62px}
.office-owner .pos-modal .modal-content{box-shadow:0 8px 32px rgba(190,24,93,.13)}
.office-owner aside nav a:hover,.office-owner .secondary:hover{background-color:var(--role-soft)}
.office-owner footer::after{content:"❀  ♡  ❀";display:block;text-align:center;color:#b86b91;font-size:13px;letter-spacing:.3em;pointer-events:none}
@media(max-width:767px){.office-owner .panel-head{background-size:48px 38px}}
@media print{.office-owner .panel,.office-owner .mast,.office-owner aside{box-shadow:none}.office-owner .role-label,.office-owner .panel-head{background-image:none}.office-owner footer::after{display:none}}

/* v1.0.87: full-width settings and order rules forms only. */
.wide-settings-form > .fields > form { width:100%; max-width:none; }
.wide-settings-form .editor-fields > [class*="col-"] { min-width:0; }
@media (max-width:767px) {
  .wide-settings-form .editor-fields > .col-sm-6 { width:100%; flex:0 0 auto; }
}

/* v1.0.88: friendly errors and management version */
.office-version{display:block;font-size:.7rem;font-weight:400;line-height:1.3;text-align:right;opacity:.75;margin-top:2px}
.friendly-error{max-width:620px;margin:24px auto 40px;padding:32px 24px;text-align:center;background:#fff;border:1px solid var(--line);border-radius:30px 6px 30px 6px;box-shadow:0 8px 28px #00000008}
.friendly-error .error-plant{display:block;width:210px;max-width:100%;height:auto;margin:0 auto 12px;color:var(--teal)}
.friendly-error h1{font-size:clamp(1.5rem,4vw,2rem);margin:0 0 12px}.friendly-error p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 auto 24px;max-width:460px}.friendly-error .error-home{display:inline-flex;align-items:center;gap:8px;text-decoration:none}
@media(max-width:767px){.friendly-error{margin:16px auto 28px;padding:24px 16px}.friendly-error .error-plant{width:180px}}

/* v1.0.89: compact mobile product search, shop only. */
@media (max-width:767px){
 #sheet-products .panel-head{padding:12px 16px;gap:0}
 #sheet-products .panel-head > div:first-child:not(.product-search){display:none}
 #sheet-products .panel-head > .product-search{width:100%;max-width:none;flex:1 1 100%;margin:0}
 #sheet-products .panel-head .product-search input{width:100%;max-width:none}
}

/* v1.0.90: mobile count beside category filter. */
.shop-mobile-count{display:none}
@media(max-width:767px){
 #sheet-products .shop-category-row{display:flex;align-items:center;justify-content:space-between;gap:6px}
 #sheet-products .shop-category-row label{display:flex;align-items:center;gap:4px;min-width:0;flex:0 1 auto;white-space:nowrap}
 #sheet-products .shop-category-row select{min-width:0;max-width:100%;flex:0 1 auto}
 #sheet-products .shop-mobile-count{display:block;flex:none;white-space:nowrap;font-size:.75em;text-align:right}
}

/* v1.0.94 – footer only; inherit existing role palette */
.site-footer{padding-top:12px;padding-bottom:24px;text-align:center}
.site-footer .footer-inner{display:flex;align-items:center;justify-content:center;gap:16px 24px;flex-wrap:wrap;border-top:1px solid var(--line);padding:20px 0 14px}
.site-footer .footer-brand{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--teal);font-size:15px}
.site-footer .footer-contact{display:flex;align-items:baseline;justify-content:center;gap:8px;flex:1 1 280px;min-width:0;max-width:560px;line-height:1.6}
.site-footer .footer-contact span{overflow-wrap:anywhere;white-space:pre-wrap}
.site-footer .footer-contact>i,.site-footer .footer-links>div>i{color:var(--teal);flex:none}
.site-footer .footer-links{display:flex;align-items:center;justify-content:center;gap:10px 18px;flex-wrap:wrap}
.site-footer .footer-phone,.site-footer .footer-rules{display:inline-flex;align-items:center;gap:7px;color:var(--teal)}
.site-footer .footer-phone{font-weight:600}
.site-footer .footer-copy{font-size:12px;color:var(--muted);padding:6px 0}
@media(max-width:767px){.site-footer .footer-inner{flex-direction:column;gap:12px;padding:18px 0 12px}.site-footer .footer-contact{flex:0 1 auto;max-width:100%}.site-footer .footer-links{width:100%;border-top:1px solid var(--line);padding-top:12px}.site-footer .footer-brand{font-size:16px}}

/* v1.0.95: balanced mobile footer; desktop and role palette unchanged. */
@media(max-width:767px){
 .site-footer .footer-inner{gap:14px;padding:18px 8px 12px;align-items:center}
 .site-footer .footer-contact{flex:0 0 auto;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;max-width:340px;text-align:center;font-size:13px;line-height:1.6}
 .site-footer .footer-contact>i{font-size:14px}
 .site-footer .footer-contact span{width:100%;text-align:center}
 .site-footer .footer-links{gap:8px 0;padding-top:12px;justify-content:center;font-size:13px}
 .site-footer .footer-phone,.site-footer .footer-rules{gap:5px;min-height:32px;justify-content:center}
 .site-footer .footer-phone+.footer-rules{margin-left:12px;padding-left:12px;border-left:1px solid var(--line)}
 .site-footer .footer-copy{font-size:12px;padding:4px 8px 8px}
}
@media(max-width:340px){
 .site-footer .footer-links{flex-direction:column;gap:2px}
 .site-footer .footer-phone+.footer-rules{margin-left:0;padding-left:0;border-left:0}
}

/* v1.0.96: compact order detail on mobile, including fetched modal. */
.detail-status p{margin:1em 0}
@media(max-width:767px){
 .order-modal .modal-body{padding:12px}
 #order-detail .detail-status{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;margin-bottom:8px}
 #order-detail .detail-status p{margin:0;font-size:.85em;color:var(--muted)}
 #order-detail .detail-contact:not(:empty){background:var(--paper);border-radius:12px 4px 12px 4px;padding:8px 10px;line-height:1.45;font-size:.92em}
 #order-detail .detail-sources{margin:6px 0;font-size:.85em;overflow-wrap:anywhere}
 #order-detail .detail-edit-hint{font-size:.85em;margin:8px 0;color:var(--muted)}
 #order-detail :is(.pending-edit,.order-items){display:table;width:100%;table-layout:fixed;margin:8px 0}
 #order-detail :is(.pending-edit,.order-items) thead{display:table-header-group}
 #order-detail :is(.pending-edit,.order-items) tbody{display:table-row-group}
 #order-detail :is(.pending-edit,.order-items) tr{display:table-row;border:0}
 #order-detail :is(.pending-edit,.order-items) :is(td,th){display:table-cell;padding:8px 3px;border-bottom:1px solid var(--line);vertical-align:middle;overflow-wrap:anywhere}
 #order-detail :is(.pending-edit,.order-items) :is(td,th):first-child{width:11%;text-align:center}
 #order-detail .pending-edit :is(td,th):nth-child(3){width:29%;text-align:center}
 #order-detail .pending-edit :is(td,th):nth-child(4){width:12%;text-align:center}
 #order-detail .pending-edit input[type=number]{min-width:0!important;width:100%!important;max-width:100%!important;padding:6px 4px;font-size:16px;text-align:center}
 #order-detail .pending-edit input[type=checkbox]{margin:0;vertical-align:middle}
 #order-detail .detail-max{font-size:.68em;line-height:1.2;margin-top:3px;overflow-wrap:anywhere}
 #order-detail .order-items :is(td,th):nth-child(3){display:none}
 #order-detail .order-items :is(td,th):nth-child(4){display:table-cell;width:22%;text-align:center}
 #order-detail .order-items .item-meta{display:block;font-size:.8em;margin:2px 0 0}
 #order-detail .list-pager{gap:5px;margin:8px 0;font-size:.8em}
 #order-detail .list-pager select{padding:5px}
 #order-detail .form-actions{margin-top:8px}
}

/* v1.0.104: compact customer accounts on desktop and mobile. */
 .office .customer-management-table,.office .customer-management-table tbody{display:block;width:100%;min-width:0;margin:0}
 .office .customer-management-table thead{display:none}
 .office .customer-management-table tbody tr{display:grid;grid-template-columns:minmax(0,10%) minmax(0,45%) minmax(0,45%);padding:10px 6px;margin:0 0 5px;border-bottom:1px solid var(--line);border-radius:10px 3px 10px 3px;align-items:center}
 .office .customer-management-table tbody tr.customer-role-owner{background:#fce7f3;color:#831843}
 .office .customer-management-table tbody tr.customer-role-staff{background:#dcfce7;color:#166534}
 .office .customer-management-table tbody td{display:block;min-width:0;padding:0;border:0;overflow-wrap:anywhere}
 .office .customer-management-table tbody td::before{content:none}
 .office .customer-management-table td:nth-child(1){grid-column:2 / 4;grid-row:1;padding-left:7px;line-height:1.4}
 .office .customer-management-table td:nth-child(1) a{font-weight:600}
 .office .customer-management-table td:nth-child(2){display:none}
 .office .customer-management-table td:nth-child(3){grid-column:1;grid-row:1 / 3;text-align:center;align-self:center}
 .office .customer-management-table td:nth-child(4),.office .customer-management-table td:nth-child(5){grid-column:2;grid-row:2;padding-left:7px;display:flex;align-items:center;pointer-events:none}
 .office .customer-management-table td:nth-child(4){justify-self:start}
 .office .customer-management-table td:nth-child(5){grid-column:3;justify-self:start;padding-left:2px}
 .office .customer-management-table .customer-desktop-only{display:none}
 .office .customer-management-table .customer-mobile-only{display:inline-flex}
 .office .customer-management-table .customer-names{display:block;font-size:.9em;margin:3px 0 5px}
 .office .customer-management-table .customer-role-mark{flex-direction:column;align-items:center;gap:3px;font-size:.78em;color:var(--muted)}
 .office .customer-management-table .customer-role-mark i{font-size:1.3rem}
 .office .customer-role-owner .customer-role-mark{color:#be185d}
 .office .customer-role-staff .customer-role-mark{color:#15803d}
 .office .customer-management-table .customer-status{font-size:.73em;line-height:1.35;padding:4px 5px;border-radius:6px;white-space:normal;font-weight:600}
 .office .customer-management-table .is-open{background:#d1fae5;color:#065f46}
 .office .customer-management-table .is-closed{background:#fee2e2;color:#991b1b}
 .office .customer-management-table .is-na{background:#f3f4f6;color:#4b5563}
@media(min-width:768px){
 .office .customer-management-table tbody tr{padding:10px 8px;grid-template-columns:minmax(0,10%) minmax(0,max-content) minmax(0,1fr)}
 .office .customer-management-table td:nth-child(5){padding-left:8px}
 .office .customer-management-table .customer-status{font-size:.8em}
}
@media(max-width:350px){.office .customer-management-table .customer-status{font-size:.65em;padding:3px}}

/* v1.0.105: minimal mobile footer */
.site-footer .footer-credit strong{font-weight:inherit}
@media(max-width:767px){
 .site-footer{padding-top:8px;padding-bottom:20px}
 .site-footer .footer-inner{gap:10px;padding:16px 4px 10px}
 .site-footer .footer-brand{font-size:15px;gap:6px;line-height:1.4}
 .site-footer .footer-contact{display:block;width:100%;max-width:360px;font-size:12px;line-height:1.6}
 .site-footer .footer-contact>i{font-size:12px;margin-right:4px}
 .site-footer .footer-contact span{display:inline;width:auto;white-space:normal}
 .site-footer .footer-links{border-top:0;padding-top:0;gap:4px 0;font-size:12px}
 .site-footer .footer-phone,.site-footer .footer-rules{min-height:32px;gap:5px}
 .site-footer .footer-rules a,.site-footer .footer-phone{text-decoration:none}
 .site-footer .footer-phone+.footer-rules{margin-left:10px;padding-left:10px}
 .site-footer .footer-copy{border-top:1px solid var(--line);padding:10px 4px 0;font-size:11px;line-height:1.6}
 .site-footer .footer-credit{display:block;margin-top:2px}
 .site-footer .footer-credit strong{font-weight:600}
}
@media(max-width:340px){
 .site-footer .footer-phone+.footer-rules{margin-left:0;padding-left:0;border-left:0}
}

/* v1.0.109: compact access badges and time since last completed order. */
.office .customer-management-table tbody tr{grid-template-columns:minmax(0,10%) minmax(0,1fr)}
.office .customer-management-table td:nth-child(1){grid-column:2;grid-row:1}
.office .customer-management-table td.customer-status-cell{grid-column:2;grid-row:2;display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding-left:7px;justify-self:stretch;pointer-events:auto}
.office .customer-management-table .customer-order-age{white-space:nowrap}


/* v1.0.109 logo hotfix: responsive transparent Thuy Moc branding. */
.brand .brand-logo,.site-footer .footer-logo{display:block;object-fit:contain;height:auto;flex:none}
header .brand{gap:8px;text-decoration:none;max-width:100%;min-width:0}
header .brand-logo{width:116px;max-width:100%}
header .brand-title{min-width:0;overflow-wrap:anywhere;line-height:1.25}
.entry-card .brand{flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}
.entry-card .brand-logo{width:260px;max-width:100%}
.entry-card .brand-title{font-size:1.1em;line-height:1.25}
.site-footer .footer-logo{width:105px;max-width:100%}
@media(max-width:767px){
 header .brand{gap:6px}
 header .brand-logo{width:92px}
 header .brand-title{font-size:14px}
 .site-footer .footer-logo{width:108px}
}
@media(max-width:350px){header .brand-logo{width:78px}header .brand-title{font-size:13px}}

/* v1.0.111: Leaf Watermark, enlarged product gallery only. */
.photo-stage figure.product-watermark::after{
 content:"";
 width:30%;
 aspect-ratio:800 / 203;
 background:url("leaf-watermark.webp?v=1.0.111") center / contain no-repeat;
 opacity:.75;
 text-shadow:none;
 pointer-events:none;
}

/* v1.0.115: customer filters */
.office .customer-filters{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:8px 0 12px;min-width:0}
.office .customer-filters .customer-search{width:100%;max-width:none;margin:0;min-width:0;position:relative}
.office .customer-filters .customer-search input{width:100%;max-width:none;min-height:42px}
.office .customer-filters #customer-suggestions{position:absolute;top:100%;left:0;right:0;z-index:20;background:white;box-shadow:0 4px 12px #0002}
.office .customer-pending-filter{display:flex;align-items:center;gap:8px;min-height:36px;margin:0;align-self:flex-start;cursor:pointer;font-weight:500}
.office .customer-pending-filter input{margin:0}

/* v1.0.115: shared floating search suggestions, without resizing panels. */
:is(.product-search,.customer-search,.order-search){position:relative;min-width:0;max-width:100%}
.panel:has(:is(#product-suggestions,#customer-suggestions,#order-suggestions)){overflow:visible}
:is(.product-search,.customer-search,.order-search):has(> :is(#product-suggestions,#customer-suggestions,#order-suggestions):not([hidden])){z-index:21}
:is(#product-suggestions,#customer-suggestions,#order-suggestions){position:absolute;top:100%;left:0;right:0;width:auto;min-width:0;max-width:100%;z-index:22;background:#fff;box-shadow:0 4px 12px #183b3720;max-height:min(210px,35vh);overflow:auto;overscroll-behavior:contain;grid-template-columns:minmax(0,1fr)}
:is(#product-suggestions,#customer-suggestions,#order-suggestions)[hidden]{display:none!important}
:is(#product-suggestions,#customer-suggestions,#order-suggestions) button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
/* Keep order search status in normal flow, but empty status takes no space. */
.order-search > small[role=status]:empty{display:none}

/* v1.0.115: customer history groups */
.order-history-table .merge-tree-child td:first-child{padding-left:20px}
.order-history-table .merge-tree-child td:nth-child(2){padding-left:8px}
.order-history-table .order-group-caption{font-weight:400}
@media(max-width:700px){
 .order-history-table,.order-history-table tbody{display:block;width:100%;margin:0}
 .order-history-table thead{display:none}
 .order-history-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:10px 0;border-bottom:1px solid var(--line)}
 .order-history-table tbody td{padding:0;border:0;min-width:0;overflow-wrap:anywhere}
 .order-history-table td:nth-child(1){grid-column:1/-1;grid-row:2}
 .order-history-table td:nth-child(2){grid-column:1/-1;grid-row:1;color:var(--muted);font-size:.85em}
 .order-history-table td:nth-child(3){grid-column:1;grid-row:3}
 .order-history-table td:nth-child(4){grid-column:2;grid-row:3;text-align:right}
 .order-history-table .order-code{white-space:normal}
 .order-history-table .order-mobile-only{display:inline}
 .order-history-table .merge-tree-child .order-mobile-only{display:none}
 .order-history-table .merge-tree-child{margin-left:8%;padding:8px;border-left:2px solid var(--line)}
 .order-history-table .merge-tree-child td:first-child,.order-history-table .merge-tree-child td:nth-child(2){padding-left:0}
}

/* Read-only staff order list: five columns, no merge controls. */
.order-modal .modal-title .badge-state,#order-detail h1 .badge-state{font-size:.72em;vertical-align:middle;white-space:nowrap}
@media(max-width:767px){
 .office .order-readonly-table tbody tr{grid-template-columns:minmax(0,55%) minmax(0,45%)}
 .office .order-readonly-table tbody td:nth-child(1){grid-column:1 / 3;grid-row:2;text-align:left;font-weight:650}
 .office .order-readonly-table tbody td:nth-child(2){grid-column:1 / 3;grid-row:1;font-size:.8rem;font-weight:400;color:var(--muted)}
 .office .order-readonly-table tbody td:nth-child(3){display:none}
 .office .order-readonly-table tbody td:nth-child(4){display:block;grid-column:1;grid-row:3;font-size:.85rem;font-weight:600}
 .office .order-readonly-table tbody td:nth-child(5){grid-column:2;grid-row:3;text-align:right}
 .office .order-readonly-table .merge-tree-child{grid-template-columns:minmax(0,55%) minmax(0,45%)}
}
