*{box-sizing:border-box}
:root{--bg:#FFF7FB;--card:#ffffff;--line:#EBB9DF;--text:#111111;--muted:#6b6b6b;--danger:#b42318;--radius:16px}
html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;color:var(--text);background:var(--bg)}
button,input,textarea,select{font:inherit}button{touch-action:manipulation}.hidden{display:none!important}.muted{color:var(--muted)}.small{font-size:12px}.error{color:var(--danger);margin-top:14px}.brand,.side-brand{letter-spacing:.28em;font-weight:800}.money{white-space:nowrap}
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:#ffffff}.login-card{width:min(520px,100%);border:1px solid var(--line);border-radius:20px;padding:42px}.login-card h1{font-size:44px;margin:22px 0 8px}
label{display:flex;flex-direction:column;gap:8px;margin:14px 0;font-weight:700}input,textarea,select{width:100%;border:1px solid #EBB9DF;background:#ffffff;border-radius:10px;padding:12px 14px;min-height:48px;color:#111111}textarea{resize:vertical}.btn{border:1px solid rgba(229,94,153,.85);background:#ffffff;color:#111111;border-radius:10px;padding:11px 16px;min-height:44px;cursor:pointer;font-weight:800}.btn.primary,.btn.dark,.owner-btn{background:#E55E99;color:#fff;border-color:rgba(229,94,153,.85)}.btn.ghost{background:#ffffff}.btn:hover{filter:brightness(.97)}.wide{width:100%;margin-top:16px}.danger-btn{background:#ffffff;color:var(--danger);border-color:hsla(5,75%,68%,.35)}.input-button{height:48px}
.app{display:flex;min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:220px;background:#E55E99;color:#fff;padding:28px 14px;z-index:30}.side-brand{font-size:22px;margin:0 12px 28px}.nav-btn{display:block;width:100%;text-align:left;border:0;background:transparent;color:#6b6b6b;padding:14px 12px;border-radius:10px;cursor:pointer;font-weight:700}.nav-btn.active,.nav-btn:hover{background:#E55E99;color:#fff}.main{margin-left:220px;width:calc(100% - 220px);padding:18px 24px 56px}.topbar{position:sticky;top:0;z-index:10;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);display:flex;align-items:center;justify-content:space-between;gap:14px;padding:8px 0 16px;margin-bottom:8px}.icon-btn{border:0;background:transparent;font-size:24px;cursor:pointer;padding:8px}.topbar #menuBtn{display:none}.page{display:none}.active-page{display:block}.form-panel,.page>.panel,.page>.cards{max-width:1180px;margin-left:auto;margin-right:auto}
.cards{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:12px;margin-bottom:16px}.reward-cards{grid-template-columns:repeat(3,minmax(160px,1fr))}.card,.panel{background:var(--card);border:1px solid var(--line);border-radius:var(--radius)}.card{padding:18px}.card-label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.09em}.card-value{font-size:24px;font-weight:800;margin-top:8px;overflow-wrap:anywhere}.panel{padding:20px;margin-bottom:16px}.panel-head,.section-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.panel-head h2,.section-title h3,.subpanel h3{margin:0}.panel-actions,.search-row,.row-actions,.upload-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.search-row{min-width:min(500px,55vw)}.search-row input{flex:1 1 240px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;min-width:720px}th,td{text-align:left;border-bottom:1px solid #EBB9DF;padding:12px 10px;vertical-align:top}th{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.badge{display:inline-block;border:1px solid #EBB9DF;padding:4px 8px;border-radius:999px;font-size:11px;background:#ffffff}.clickable{cursor:pointer}.clickable:hover{background:#ffffff}.grid{display:grid;gap:14px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.item-row{display:grid;grid-template-columns:minmax(220px,2fr) 90px minmax(130px,1fr) auto;gap:10px;align-items:end;border-top:1px solid #EBB9DF;padding:12px 0}.item-row label{margin:0}.form-msg{margin:10px 0;min-height:18px}.form-msg.ok{color:#157c4b}.form-msg.bad{color:var(--danger)}
.detail-dialog{width:min(1040px,96vw);max-height:94vh;border:0;border-radius:18px;padding:0;box-shadow:0 24px 90px #0004;background:#ffffff}.detail-dialog::backdrop{background:#0008}.dialog-head{position:sticky;top:0;background:#ffffff;border-bottom:1px solid var(--line);padding:16px 20px;display:flex;justify-content:space-between;align-items:center;z-index:5}.dialog-head h2{margin:5px 0 0}.small-brand{font-size:11px}.detail-dialog #detailBody{padding:18px 20px 28px}.detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.subpanel{border-top:1px solid var(--line);margin-top:20px;padding-top:18px}.stack{display:grid;gap:10px}.list-card{border:1px solid var(--line);border-radius:12px;padding:12px;background:#ffffff}.followup-list{display:grid;gap:10px}.followup{border:1px solid var(--line);border-radius:14px;padding:14px;background:#ffffff;display:flex;justify-content:space-between;gap:16px}.due{font-size:12px;color:var(--muted)}.follow-note{margin-top:6px}.followup-order-list{margin-top:14px}
.owner-finance{border:2px solid rgba(229,94,153,.85);border-radius:14px;padding:16px;background:#ffffff}.owner-finance-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}.owner-badge{background:#E55E99;color:#fff}.finance-items{display:grid;gap:10px;margin-bottom:14px}.finance-item-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,260px);gap:16px;align-items:end;padding:12px;border:1px solid var(--line);border-radius:12px;background:#ffffff}.finance-summary{display:grid;gap:8px;margin:16px 0;padding:14px;background:#ffffff;border:1px solid var(--line);border-radius:12px}.finance-summary>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.finance-total{border-top:1px solid var(--line);padding-top:10px;margin-top:4px}.finance-profit{font-size:18px;font-weight:800}
.tracking-stage{border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:14px;background:#ffffff}.tracking-stage-title{display:flex;align-items:center;gap:10px;margin-bottom:12px}.tracking-number-badge{width:30px;height:30px;border-radius:50%;background:#E55E99;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;flex:0 0 auto}.courier-cost-field{max-width:320px;margin-top:10px}.danger-zone{border-color:hsla(5,75%,68%,.35);background:#ffffff;padding:16px;border-radius:14px}.trash-card{display:flex;align-items:center;justify-content:space-between;gap:12px}
.attachment-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 14px}.attachment-card{border:1px solid var(--line);border-radius:14px;padding:10px;display:grid;gap:10px;background:#ffffff}.attachment-preview{display:block;aspect-ratio:4/3;border-radius:10px;overflow:hidden;background:#ffffff}.attachment-preview img{display:block;width:100%;height:100%;object-fit:cover}.attachment-pdf{display:grid;place-items:center;aspect-ratio:4/3;border-radius:10px;background:#ffffff;text-decoration:none}.pdf-icon{font-weight:900;font-size:28px;color:#111111}.attachment-meta strong{display:block;overflow-wrap:anywhere}.upload-row input{flex:1 1 320px}.upload-controls{margin-top:10px}.mobile-sticky-actions{display:none}

@media(max-width:980px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.reward-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:1fr}.sidebar{transform:translateX(-100%);transition:.2s;width:min(82vw,300px)}.sidebar.open{transform:none}.main{margin-left:0;width:100%;padding:14px}.topbar #menuBtn{display:block}.search-row{min-width:0;width:100%}.panel-head{align-items:flex-start;flex-direction:column}.panel-actions{width:100%}.panel-actions .search-row{flex:1}.login-card{padding:28px}}

@media(max-width:720px){
  body{background:#ffffff}.main{padding:8px 8px 88px}.topbar{padding:8px 2px 10px}.topbar .btn{min-height:40px;padding:8px 11px}.panel,.card{border-radius:14px}.panel{padding:14px}.cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.reward-cards{grid-template-columns:1fr}.card{padding:14px}.card-value{font-size:19px}.grid.two,.detail-grid{grid-template-columns:1fr}.item-row{grid-template-columns:1fr 1fr}.item-row label:first-child{grid-column:1/-1}.item-row .remove-item,.item-row .e-remove{grid-column:1/-1}.section-title{align-items:flex-start}.section-title .btn{flex:0 0 auto}.followup{flex-direction:column}.followup .row-actions .btn{flex:1}.block-mobile{width:100%;margin-top:10px}.owner-finance-head,.finance-item-row{grid-template-columns:1fr;flex-direction:column}.finance-item-row{display:grid}.attachment-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.upload-row{display:grid;grid-template-columns:1fr}.upload-row .btn{width:100%}.trash-card{align-items:flex-start;flex-direction:column}.trash-card .btn{width:100%}
  .detail-dialog{width:100vw;height:100dvh;max-height:none;margin:0;border-radius:0}.detail-dialog #detailBody{padding:12px 12px 92px}.dialog-head{padding:12px 14px}.mobile-sticky-actions{position:sticky;bottom:0;z-index:6;display:grid;grid-template-columns:1fr 1fr;gap:8px;background:#ffffff;border-top:1px solid var(--line);padding:10px 0 calc(10px + env(safe-area-inset-bottom));margin-top:20px}.courier-cost-field{max-width:none}
  .table-wrap{overflow:visible}table{display:block;min-width:0;width:100%}thead{display:none}tbody{display:grid;gap:10px}tr{display:block;border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:#ffffff}td{position:relative;display:block;border:0;padding:5px 0 5px 42%;min-height:28px;overflow-wrap:anywhere}td::before{position:absolute;left:0;top:5px;width:38%;font-size:10px;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.05em}
  #recentOrders td:nth-child(1)::before{content:'Order'}#recentOrders td:nth-child(2)::before{content:'Customer'}#recentOrders td:nth-child(3)::before{content:'Total'}#recentOrders td:nth-child(4)::before{content:'Paid'}#recentOrders td:nth-child(5)::before{content:'Balance'}#recentOrders td:nth-child(6)::before{content:'Status'}
  #orderRows td:nth-child(1)::before{content:'Order'}#orderRows td:nth-child(2)::before{content:'Customer'}#orderRows td:nth-child(3)::before{content:'Total'}#orderRows td:nth-child(4)::before{content:'Paid'}#orderRows td:nth-child(5)::before{content:'Balance'}#orderRows td:nth-child(6)::before{content:'Payment'}#orderRows td:nth-child(7)::before{content:'Shipping'}
  #customerRows td:nth-child(1)::before{content:'Name'}#customerRows td:nth-child(2)::before{content:'Phone'}#customerRows td:nth-child(3)::before{content:'Orders'}#customerRows td:nth-child(4)::before{content:'Sales'}#customerRows td:nth-child(5)::before{content:'Reward'}
  #rewardCustomerRows td:nth-child(1)::before{content:'Customer'}#rewardCustomerRows td:nth-child(2)::before{content:'Purchases'}#rewardCustomerRows td:nth-child(3)::before{content:'Earned'}#rewardCustomerRows td:nth-child(4)::before{content:'Balance'}#rewardCustomerRows td:nth-child(5)::before{content:'Transactions'}
  #cashoutRows td:nth-child(1)::before{content:'Customer'}#cashoutRows td:nth-child(2)::before{content:'Phone'}#cashoutRows td:nth-child(3)::before{content:'Amount'}#cashoutRows td:nth-child(4)::before{content:'Status'}#cashoutRows td:nth-child(5)::before{content:'Date'}
  .payment-table td:nth-child(1)::before{content:'Date'}.payment-table td:nth-child(2)::before{content:'Kind'}.payment-table td:nth-child(3)::before{content:'Amount'}.payment-table td:nth-child(4)::before{content:'Status'}
  .reward-tx-table td:nth-child(1)::before{content:'Date'}.reward-tx-table td:nth-child(2)::before{content:'Type'}.reward-tx-table td:nth-child(3)::before{content:'Amount'}.reward-tx-table td:nth-child(4)::before{content:'Purchase'}.reward-tx-table td:nth-child(5)::before{content:'Reference'}
  input,textarea,select{font-size:16px}.login-wrap{padding:14px}.login-card{border:0;padding:12px}.login-card h1{font-size:36px}.search-row{display:grid;grid-template-columns:1fr auto}.panel-actions{display:grid;grid-template-columns:1fr}.panel-actions #trashOrdersBtn{width:100%}
}

@media(max-width:430px){.cards{grid-template-columns:1fr 1fr}.attachment-gallery{grid-template-columns:1fr}.card-value{font-size:18px}.panel{padding:12px}.main{padding:6px 6px 88px}.row-actions{display:grid;grid-template-columns:1fr}.row-actions .btn,.row-actions input{width:100%}}

/* LOFFA V1.1.4 CLEAN PORTAL */
:root{
  --portal-bg:#FFF7FB;
  --portal-card:#ffffff;
  --portal-ink:#111111;
  --portal-muted:#6b6b6b;
  --portal-line:#EBB9DF;
  --portal-black:#202020;
  --portal-blue:#2388f5;
  --portal-blue-soft:hsla(206,75%,62%,.16);
  --portal-mint:#eaf8ef;
  --portal-peach:#fff3e7;
  --portal-pink:#fff0f1;
  --portal-lav:#f2efff;
  --portal-yellow:#fff5d9;
  --portal-red:#d44c55;
  --portal-green:#157c4b;
}

html{background:var(--portal-bg)}

body{
  margin:0;
  background:
    radial-gradient(circle at 18% 0%,rgba(255,255,255,.95) 0,rgba(255,255,255,0) 34%),
    linear-gradient(180deg,#f7f8f9 0%,#f3f4f5 100%);
  color:var(--portal-ink);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Segoe UI",Roboto,Arial,sans-serif;
  font-size:14px;
  line-height:1.35;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

button,input,textarea,select{font-family:inherit}
h1,h2,h3,strong,.card-value{letter-spacing:-.02em}
.muted{color:var(--portal-muted)}
.small{font-size:11px}

/* DESKTOP TOP PORTAL NAV */
.app{display:block;min-height:100vh}

.sidebar{
  position:sticky;
  inset:auto;
  top:0;
  width:100%;
  min-height:64px;
  height:auto;
  padding:10px 170px 10px 28px;
  display:flex;
  align-items:center;
  gap:4px;
  background:#E55E99;
  color:#fff;
  z-index:50;
  box-shadow:0 1px 0 rgba(229,94,153,.07);
}

.side-brand{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 20px 0 0;
  min-width:max-content;
  color:#fff;
  font-size:13px;
  letter-spacing:.03em;
  font-weight:800;
}

.portal-mark{
  width:36px;
  height:36px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:#ffffff;
  color:#111111;
  font-size:20px;
  font-weight:800;
  letter-spacing:0;
}

.nav-btn{
  width:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 11px;
  margin:0;
  border-radius:999px;
  color:#6b6b6b;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  white-space:nowrap;
}

.nav-btn.active,.nav-btn:hover{
  background:#E55E99;
  color:#fff;
}

.sidebar-backdrop{display:none}

.main{
  width:100%;
  max-width:1600px;
  margin:0 auto;
  padding:26px 24px 52px;
}

.topbar{
  position:fixed;
  top:10px;
  right:24px;
  z-index:60;
  width:auto;
  margin:0;
  padding:0;
  background:transparent;
}

.topbar > div,.topbar #menuBtn{display:none}

.topbar #logoutBtn{
  min-height:42px;
  padding:9px 16px;
  border-radius:999px;
  border:1px solid #444;
  background:#E55E99;
  color:#fff;
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

/* SURFACES */
.panel,.card,.login-card{
  background:rgba(255,255,255,.96);
  border:1px solid var(--portal-line);
  box-shadow:0 8px 30px rgba(31,35,40,.035);
}

.panel{
  padding:18px;
  margin-bottom:14px;
  border-radius:22px;
}

.form-panel{max-width:960px}

.panel-head,.section-title{
  gap:12px;
  margin-bottom:12px;
}

.panel-head h2{
  margin:0;
  font-size:25px;
  line-height:1.05;
}

.panel-head p{
  margin:5px 0 0;
  font-size:12px;
}

.section-title h3,.subpanel h3{
  margin:0;
  font-size:15px;
}

/* SUMMARY */
.cards{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.card{
  position:relative;
  overflow:hidden;
  min-height:112px;
  padding:18px 20px;
  border-radius:22px;
}

.card::after{
  content:"";
  position:absolute;
  right:-24px;
  bottom:-38px;
  width:118px;
  height:118px;
  border-radius:50%;
  background:rgba(255,255,255,.48);
}

.card:nth-child(1){background:var(--portal-peach)}
.card:nth-child(2){background:var(--portal-blue-soft)}
.card:nth-child(3){background:var(--portal-mint)}
.card:nth-child(4){background:var(--portal-pink)}
.card:nth-child(5){background:var(--portal-lav)}

.card-label{
  position:relative;
  z-index:1;
  color:#6b6b6b;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.card-value{
  position:relative;
  z-index:1;
  margin-top:10px;
  font-size:28px;
  line-height:1;
  font-weight:800;
}

/* FORM */
label,.form-panel label{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:10px 0;
  color:#111111;
  font-size:10px;
  font-weight:850;
  letter-spacing:.11em;
  text-transform:uppercase;
}

input,textarea,select{
  width:100%;
  min-height:46px;
  border:1px solid #EBB9DF;
  border-radius:14px;
  background:#ffffff;
  color:#111111;
  padding:10px 13px;
  font-size:14px;
  font-weight:500;
  letter-spacing:0;
  text-transform:none;
  box-shadow:0 1px 0 rgba(0,0,0,.015);
}

textarea{min-height:88px}

input:focus,textarea:focus,select:focus{
  outline:none;
  border-color:hsla(209,75%,68%,.35);
  box-shadow:0 0 0 4px rgba(35,136,245,.10);
}

.grid,.grid.two,.grid.three{gap:12px}
.grid.two{grid-template-columns:1fr 1fr}
.grid.three{grid-template-columns:repeat(3,1fr)}

.item-row{
  grid-template-columns:minmax(220px,2fr) 80px minmax(120px,1fr) auto;
  gap:10px;
  padding:9px 0;
  border-top:1px solid #EBB9DF;
}

.btn{
  min-height:42px;
  padding:9px 15px;
  border-radius:13px;
  border:1px solid #EBB9DF;
  background:#ffffff;
  color:#111111;
  font-size:11px;
  font-weight:850;
  letter-spacing:.035em;
}

.btn.primary,.btn.dark,.owner-btn{
  background:#E55E99;
  border-color:rgba(229,94,153,.85);
  color:#fff;
}

.btn.ghost{background:#ffffff}
.wide{margin-top:12px}
.search-row{gap:8px}
.search-row input{min-height:42px}

.badge{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:4px 9px;
  border-radius:999px;
  border:1px solid #EBB9DF;
  background:#ffffff;
  color:#6b6b6b;
  font-size:10px;
  font-weight:800;
}

.badge-success{
  background:hsla(143,75%,62%,.16);
  color:var(--portal-green);
  border-color:hsla(143,75%,68%,.35);
}

.badge-info{
  background:hsla(206,75%,62%,.16);
  color:#6cbaee;
  border-color:hsla(205,75%,68%,.35);
}

.badge-warn{
  background:hsla(44,75%,62%,.16);
  color:#8a6a20;
  border-color:hsla(44,75%,68%,.35);
}

.badge-danger{
  background:hsla(355,75%,62%,.16);
  color:#de7d83;
  border-color:hsla(356,75%,68%,.35);
}

/* TABLE */
.table-wrap{overflow:auto}

table{
  width:100%;
  min-width:720px;
  border-collapse:separate;
  border-spacing:0;
}

th{
  padding:10px;
  color:#6b6b6b;
  font-size:9px;
  font-weight:850;
  letter-spacing:.10em;
  text-transform:uppercase;
  border-bottom:1px solid #EBB9DF;
}

td{
  padding:12px 10px;
  border-bottom:1px solid #EBB9DF;
  font-size:13px;
  vertical-align:middle;
}

/* DETAIL */
.detail-dialog{
  width:min(1240px,96vw);
  max-height:92vh;
  padding:0;
  border:0;
  border-radius:28px;
  background:#ffffff;
  box-shadow:0 30px 110px rgba(0,0,0,.35);
}

.detail-dialog::backdrop{
  background:rgba(24,27,30,.72);
  backdrop-filter:blur(5px);
}

.dialog-head{
  position:sticky;
  top:0;
  z-index:10;
  min-height:74px;
  padding:16px 22px;
  border-bottom:1px solid #EBB9DF;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(16px);
}

.dialog-head h2{
  margin:5px 0 0;
  font-size:25px;
}

.small-brand{
  color:#6b6b6b;
  font-size:9px;
  letter-spacing:.18em;
}

.dialog-head .icon-btn{
  width:44px;
  height:44px;
  border-radius:50%;
  border:1px solid #EBB9DF;
  background:#ffffff;
  color:#111111;
  font-size:19px;
  box-shadow:0 6px 20px rgba(0,0,0,.06);
}

.detail-dialog #detailBody{
  padding:16px 18px 92px;
}

.detail-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.detail-grid .card{
  min-height:92px;
  padding:14px 16px;
  border-radius:18px;
}

.detail-grid .card-value{font-size:21px}

.subpanel{
  margin-top:10px;
  padding:13px;
  border:1px solid #EBB9DF;
  border-radius:18px;
  background:#ffffff;
}

.subpanel:has(#productUpload),.subpanel:has(#uploadProductBtn){
  background:#ffffff;
  border-color:hsla(208,75%,68%,.35);
}

.subpanel:has(#receiptUpload),.subpanel:has(#uploadReceiptBtn){
  background:#ffffff;
  border-color:hsla(252,75%,68%,.35);
}

.subpanel:has(#fuReason),.subpanel:has(#addFollowup){
  background:#ffffff;
  border-color:hsla(145,75%,68%,.35);
}

.owner-finance{
  background:hsla(40,75%,62%,.16);
  border:1px solid hsla(40,75%,68%,.35);
}

.tracking-stage{
  padding:12px;
  margin-bottom:9px;
  border:1px solid #EBB9DF;
  border-radius:15px;
  background:#ffffff;
}

.tracking-number-badge{background:#137db9}

.finance-item-row,.finance-summary,.list-card,.followup,.attachment-card{
  border:1px solid #EBB9DF;
  border-radius:14px;
  background:#ffffff;
}

.finance-item-row,.finance-summary{padding:10px}
.list-card,.followup{padding:10px 12px}

.attachment-gallery{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:10px 0;
}

.attachment-card{
  overflow:hidden;
  padding:8px;
}

.attachment-preview img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:11px;
}

.attachment-pdf{
  min-height:120px;
  border-radius:11px;
  background:#ffffff;
}

.danger-zone{
  background:#ffffff;
  border-color:hsla(355,75%,68%,.35);
}

.danger-btn{
  background:#ffffff;
  color:#e17a82;
  border-color:hsla(356,75%,68%,.35);
}

.mobile-sticky-actions{
  position:sticky;
  bottom:-1px;
  z-index:15;
  display:flex;
  gap:8px;
  margin:14px -18px -92px;
  padding:12px 18px 14px;
  border-top:1px solid #EBB9DF;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(16px);
}

.mobile-sticky-actions .btn{flex:1}

/* LOGIN */
.login-wrap{
  background:
    radial-gradient(circle at 20% 10%,#ffffff 0,rgba(255,255,255,0) 30%),
    linear-gradient(145deg,#f8f9fa,#eef0f2);
}

.login-card{
  width:min(480px,100%);
  padding:38px;
  border-radius:24px;
}

.login-card h1{
  margin:20px 0 6px;
  font-size:38px;
}

/* MOBILE */
@media(max-width:760px){
  body{background:#ffffff}

  .app{display:block}

  .sidebar{
    position:fixed;
    inset:0 auto 0 0;
    width:278px;
    min-height:100vh;
    padding:22px 14px;
    display:flex;
    flex-direction:column;
    transform:translateX(-102%);
    transition:transform .28s cubic-bezier(.22,1,.36,1);
    overflow:auto;
    z-index:80;
    will-change:transform;
  }

  .sidebar.open{transform:none}

  .sidebar-backdrop{
    position:fixed;
    inset:0;
    z-index:70;
    display:block;
    padding:0;
    border:0;
    background:rgba(18,18,18,.38);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .24s ease,visibility 0s linear .24s;
  }

  .sidebar-backdrop.open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transition-delay:0s;
  }

  .side-brand{
    margin:0 8px 22px;
    font-size:13px;
  }

  .portal-mark{
    width:34px;
    height:34px;
  }

  .nav-btn{
    display:block;
    width:100%;
    padding:12px 13px;
    margin:3px 0;
    border-radius:11px;
    text-align:left;
    font-size:12px;
  }

  .main{
    width:100%;
    margin:0;
    padding:7px 7px calc(78px + env(safe-area-inset-bottom));
  }

  .topbar{
    position:sticky;
    top:0;
    right:auto;
    z-index:45;
    width:100%;
    min-height:56px;
    margin:0 0 7px;
    padding:7px 8px;
    display:grid;
    grid-template-columns:40px 1fr auto;
    align-items:center;
    gap:7px;
    border:1px solid #EBB9DF;
    border-radius:16px;
    background:rgba(255,255,255,.96);
    box-shadow:0 7px 24px rgba(31,35,40,.055);
    backdrop-filter:blur(14px);
  }

  .topbar > div{display:block;min-width:0}

  .topbar #menuBtn{
    display:block;
    width:38px;
    height:38px;
    padding:0;
    border:0;
    background:transparent;
    color:#111111;
    font-size:22px;
  }

  .topbar #pageTitle{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:17px;
    line-height:1.05;
  }

  .topbar #logoutBtn{
    min-height:37px;
    padding:7px 10px;
    border-radius:11px;
    border-color:#EBB9DF;
    background:#ffffff;
    color:#111111;
    font-size:10px;
    letter-spacing:.02em;
  }

  .panel{
    padding:12px;
    margin-bottom:8px;
    border-radius:18px;
  }

  .panel-head{
    align-items:center;
    margin-bottom:9px;
  }

  .panel-head h2{font-size:21px}
  .panel-head p{font-size:11px}

  .cards{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    margin-bottom:9px;
  }

  .card{
    min-height:76px;
    padding:11px 12px;
    border-radius:16px;
  }

  .card::after{
    width:78px;
    height:78px;
    right:-24px;
    bottom:-28px;
  }

  .card-label{font-size:8px}

  .card-value{
    margin-top:7px;
    font-size:18px;
  }

  .reward-cards{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .reward-cards .card{
    min-height:70px;
    padding:9px 9px 9px 11px;
  }

  .reward-cards .card-label{font-size:7px}
  .reward-cards .card-value{font-size:14px}

  label,.form-panel label{
    gap:4px;
    margin:7px 0;
    font-size:9px;
    letter-spacing:.10em;
  }

  input,textarea,select{
    min-height:43px;
    padding:9px 11px;
    border-radius:12px;
    font-size:16px;
  }

  textarea{min-height:74px}

  .grid.two{
    grid-template-columns:1fr 1fr;
    gap:7px;
  }

  .grid.three{
    grid-template-columns:1fr 1fr;
    gap:7px;
  }

  .grid.three > :last-child{grid-column:1/-1}

  .btn{
    min-height:39px;
    padding:8px 11px;
    border-radius:11px;
    font-size:10px;
  }

  .wide{margin-top:8px}

  .section-title{
    margin:8px 0 5px;
  }

  .section-title h3,.subpanel h3{font-size:14px}

  .item-row{
    grid-template-columns:1fr 76px 1fr;
    gap:6px;
    padding:6px 0;
  }

  .item-row label:first-child{grid-column:1/-1}

  .item-row .remove-item,.item-row .e-remove{
    grid-column:1/-1;
    min-height:34px;
  }

  .search-row{
    display:grid;
    grid-template-columns:1fr auto;
    gap:6px;
    width:100%;
    min-width:0;
  }

  .search-row .btn{min-width:70px}

  .panel-head{
    flex-direction:column;
    align-items:stretch;
  }

  .table-wrap{overflow:visible}

  table{min-width:0}

  thead{display:none}

  tbody{
    display:grid;
    gap:7px;
  }

  tr{
    display:block;
    padding:8px 10px;
    border:1px solid #EBB9DF;
    border-radius:14px;
    background:#ffffff;
    box-shadow:0 4px 14px rgba(31,35,40,.025);
  }

  td{
    position:relative;
    display:block;
    min-height:22px;
    padding:3px 0 3px 35%;
    border:0;
    font-size:12.5px;
    line-height:1.25;
  }

  td::before{
    content:attr(data-label);
    position:absolute;
    left:0;
    top:3px;
    width:31%;
    color:#6b6b6b;
    font-size:8px;
    font-weight:850;
    letter-spacing:.07em;
    text-transform:uppercase;
  }

  td strong{font-size:13px}

  .detail-dialog{
    width:100vw;
    height:100dvh;
    max-width:none;
    max-height:none;
    margin:0;
    border-radius:0;
    background:#ffffff;
  }

  .dialog-head{
    min-height:62px;
    padding:9px 11px;
  }

  .dialog-head h2{font-size:20px}

  .dialog-head .icon-btn{
    width:38px;
    height:38px;
    font-size:17px;
  }

  .detail-dialog #detailBody{
    padding:8px 7px 84px;
  }

  .detail-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
  }

  .detail-grid .card{
    min-height:68px;
    padding:10px 11px;
  }

  .detail-grid .card-value{font-size:16px}

  .subpanel{
    margin-top:7px;
    padding:10px;
    border-radius:15px;
  }

  .tracking-stage{
    padding:9px;
    border-radius:13px;
  }

  .finance-item-row,.finance-summary,.list-card,.followup{
    padding:8px 9px;
    border-radius:12px;
  }

  .attachment-gallery{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
  }

  .attachment-card{padding:7px}

  .mobile-sticky-actions{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    margin:0;
    padding:8px 8px calc(8px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.96);
  }

  .row-actions{gap:6px}
  .followup{gap:8px}

  .login-wrap{padding:16px}

  .login-card{
    padding:24px;
    border-radius:20px;
  }

  .login-card h1{font-size:31px}
}

/* LOFFA V1.3.3 — smoother portal navigation and mobile menu. */
@keyframes loffaViewIn{
  from{opacity:0;transform:translateY(7px)}
  to{opacity:1;transform:none}
}

@keyframes loffaAppIn{
  from{opacity:0}
  to{opacity:1}
}

.active-page{animation:loffaViewIn .22s ease-out both}
.login-wrap:not(.hidden) .login-card{animation:loffaViewIn .25s ease-out both}
.app:not(.hidden){animation:loffaAppIn .25s ease-out both}

@media(prefers-reduced-motion:reduce){
  .active-page,.login-wrap:not(.hidden) .login-card,.app:not(.hidden){animation:none}
  .sidebar,.sidebar-backdrop{transition:none}
}

@media(max-width:420px){
  .main{
    padding-left:6px;
    padding-right:6px;
  }

  .panel{padding:10px}

  .grid.two,.grid.three{gap:6px}

  .reward-cards .card-value{font-size:13px}

  .topbar{grid-template-columns:38px 1fr auto}
}

/* LOFFA V1.1.5 WORDPRESS PARITY */
body{font-size:14px;color:#111111}

.eyebrow,.wp-mini-label{
  color:#6b6b6b;
  font-size:9px;
  font-weight:850;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.panel-head h2{
  font-size:28px;
  font-weight:850;
  letter-spacing:-.035em;
}

.card-label{font-size:9px}
.card-value{font-size:25px}

.order-board-panel{
  padding:22px;
  border-radius:24px;
  background:#ffffff;
}

.board-head{
  align-items:center;
  margin-bottom:14px;
}

.board-tools{
  display:grid;
  grid-template-columns:minmax(300px,520px) auto;
  gap:8px;
  align-items:center;
}

.board-tools input{
  min-height:48px;
  border-radius:15px;
  font-size:14px;
}

.order-board-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  padding:6px;
  margin-bottom:16px;
  border:1px solid #EBB9DF;
  border-radius:18px;
  background:#ffffff;
}

.order-board-tab{
  min-height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 16px;
  border:0;
  border-radius:14px;
  background:transparent;
  color:#6b6b6b;
  font-size:10px;
  font-weight:900;
  letter-spacing:.13em;
  text-transform:uppercase;
  cursor:pointer;
}

.order-board-tab.active{
  background:#E55E99;
  color:#fff;
}

.tab-count{
  min-width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(229,94,153,.07);
  color:#6b6b6b;
  font-size:11px;
  letter-spacing:0;
}

.order-board-tab.active .tab-count{
  background:#E55E99;
  color:#fff;
}

.wp-order-list{
  display:grid;
  gap:12px;
}

.wp-order-card{
  padding:14px;
  border:1px solid #EBB9DF;
  border-radius:22px;
  background:#ffffff;
  box-shadow:0 5px 18px rgba(32,35,38,.025);
}

.wp-order-card.is-completed{
  border-color:hsla(142,75%,68%,.35);
  background:linear-gradient(180deg,#edf9f2 0%,#e9f8ef 100%);
}

.wp-order-card-main{
  display:grid;
  grid-template-columns:minmax(210px,1.25fr) minmax(150px,.9fr) 104px minmax(155px,.8fr) auto;
  gap:18px;
  align-items:center;
}

.wp-customer-block{
  display:grid;
  grid-template-columns:50px 1fr;
  gap:12px;
  align-items:start;
}

.wp-avatar{
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:#E55E99;
  color:#fff;
  font-size:20px;
  font-weight:900;
}

.wp-customer-text,.wp-item-block,.wp-money-block{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}

.wp-customer-text strong,.wp-item-block strong,.wp-money-block strong{
  font-size:15px;
  line-height:1.15;
}

.wp-customer-text span,.wp-item-block span,.wp-money-block span{
  color:#6b6b6b;
  font-size:12px;
}

.wp-customer-text b{
  margin-top:2px;
  color:#69f1b4;
  font-size:11px;
}

.wp-money-block b{
  color:#fbc560;
  font-size:12px;
}

.wp-order-thumb{
  width:92px;
  height:92px;
  overflow:hidden;
  border-radius:16px;
  background:#ffffff;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}

.wp-order-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.wp-order-thumb.no-image{
  display:grid;
  place-items:center;
  background:#ffffff;
  color:#6b6b6b;
}

.wp-order-thumb.no-image span{
  font-size:22px;
  font-weight:850;
}

.wp-badge-block{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  justify-content:flex-end;
}

.wp-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:5px 11px;
  border-radius:999px;
  font-size:10px;
  font-weight:850;
  white-space:nowrap;
}

.status-green{background:hsla(143,75%,62%,.16);color:#157c4b}
.status-yellow{background:hsla(45,75%,62%,.16);color:#fbcf60}
.status-red{background:hsla(355,75%,62%,.16);color:#d98189}
.status-neutral{background:rgba(229,94,153,.07);color:#6b6b6b}
.status-soft{background:#ffffff;color:#6b6b6b}

.wp-detail-btn{
  width:100%;
  min-height:48px;
  margin-top:12px;
  padding:0 14px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:16px;
  align-items:center;
  border:1px solid rgba(21,126,76,.18);
  border-radius:15px;
  background:rgba(18,20,32,.75);
  color:#6fecb2;
  text-align:left;
  cursor:pointer;
}

.wp-detail-btn span{
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
}

.wp-detail-btn small{
  color:#6b6b6b;
  font-size:9px;
  font-weight:750;
  letter-spacing:.08em;
}

.wp-detail-btn b{font-size:22px}

.board-empty{
  padding:34px 18px;
  color:#6b6b6b;
  text-align:center;
  border:1px dashed #EBB9DF;
  border-radius:18px;
  background:#ffffff;
}

/* WordPress-style product uploader */
.wp-upload-panel{
  background:#ffffff !important;
  border:1px solid hsla(208,75%,68%,.35) !important;
}

.wp-upload-picker{
  padding:14px;
  border:1px solid hsla(208,75%,68%,.35);
  border-radius:20px;
  background:linear-gradient(180deg,#fff 0%,#f6faff 100%);
}

.wp-upload-select{
  margin:0 !important;
  display:grid !important;
  grid-template-columns:58px 1fr auto;
  gap:14px !important;
  align-items:center;
  cursor:pointer;
  text-transform:none !important;
  letter-spacing:0 !important;
}

.wp-upload-icon{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:linear-gradient(180deg,#43a7ff,#1687ef);
  color:#fff;
  font-size:28px;
  font-weight:500;
}

.wp-upload-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.wp-upload-copy strong{
  color:#111111;
  font-size:14px;
  font-weight:850;
}

.wp-upload-copy small{
  color:#6b6b6b;
  font-size:10px;
  font-weight:650;
}

.wp-upload-button{
  min-width:82px;
  min-height:42px;
  display:grid;
  place-items:center;
  padding:0 16px;
  border-radius:999px;
  background:#187fe9;
  color:#fff;
  font-size:11px;
  font-weight:850;
}

.wp-hidden-file{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  pointer-events:none !important;
}

.wp-upload-count{
  margin-top:10px;
  color:#6b6b6b;
  font-size:10px;
  font-weight:750;
}

.attachment-gallery{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px;
}

.attachment-card{
  position:relative;
  padding:7px;
  border-radius:15px;
  background:#ffffff;
}

.attachment-preview img{
  aspect-ratio:1/1;
  border-radius:12px;
}

.attachment-meta{margin-top:6px}

.attachment-meta strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
}

.delete-attachment{
  width:100%;
  min-height:32px;
  margin-top:6px;
  padding:5px 8px;
  font-size:9px;
}

@media(max-width:760px){
  body{font-size:13px}

  .panel-head h2{font-size:25px}
  .card-label{font-size:8px}
  .card-value{font-size:19px}

  .order-board-panel{
    padding:10px;
    border-radius:18px;
  }

  .board-head{align-items:stretch}

  .board-tools{
    grid-template-columns:1fr auto;
    gap:6px;
  }

  .board-tools input{
    min-height:43px;
    font-size:16px;
  }

  .order-board-tabs{
    padding:4px;
    margin-bottom:10px;
    border-radius:15px;
  }

  .order-board-tab{
    min-height:48px;
    padding:0 9px;
    font-size:8px;
    letter-spacing:.08em;
  }

  .tab-count{
    min-width:27px;
    height:27px;
    font-size:9px;
  }

  .wp-order-list{gap:9px}

  .wp-order-card{
    padding:10px;
    border-radius:17px;
  }

  .wp-order-card-main{
    grid-template-columns:1fr 84px;
    grid-template-areas:
      "customer thumb"
      "item thumb"
      "money badges";
    gap:9px 10px;
    align-items:start;
  }

  .wp-customer-block{
    grid-area:customer;
    grid-template-columns:44px 1fr;
    gap:9px;
  }

  .wp-avatar{
    width:44px;
    height:44px;
    border-radius:14px;
    font-size:17px;
  }

  .wp-customer-text strong,.wp-item-block strong,.wp-money-block strong{
    font-size:14px;
  }

  .wp-customer-text span,.wp-item-block span,.wp-money-block span{
    font-size:11px;
  }

  .wp-customer-text b,.wp-money-block b{
    font-size:10px;
  }

  .wp-item-block{grid-area:item}
  .wp-money-block{grid-area:money}

  .wp-order-thumb{
    grid-area:thumb;
    width:84px;
    height:84px;
    border-radius:14px;
    justify-self:end;
  }

  .wp-badge-block{
    grid-area:badges;
    justify-content:flex-end;
    align-self:end;
  }

  .wp-status{
    min-height:27px;
    padding:4px 8px;
    font-size:9px;
  }

  .wp-detail-btn{
    min-height:44px;
    margin-top:9px;
    padding:0 10px;
    gap:8px;
    border-radius:13px;
  }

  .wp-detail-btn span{font-size:9px}

  .wp-detail-btn small{
    font-size:7px;
    line-height:1.25;
  }

  .wp-detail-btn b{font-size:20px}

  .wp-upload-picker{
    padding:10px;
    border-radius:16px;
  }

  .wp-upload-select{
    grid-template-columns:48px 1fr auto;
    gap:9px !important;
  }

  .wp-upload-icon{
    width:46px;
    height:46px;
    border-radius:14px;
    font-size:24px;
  }

  .wp-upload-copy strong{font-size:12px}
  .wp-upload-copy small{font-size:8px}

  .wp-upload-button{
    min-width:64px;
    min-height:37px;
    padding:0 11px;
    font-size:10px;
  }

  .attachment-gallery{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:430px){
  .wp-order-card-main{
    grid-template-columns:1fr 76px;
  }

  .wp-order-thumb{
    width:76px;
    height:76px;
  }

  .wp-upload-select{
    grid-template-columns:44px 1fr auto;
  }

  .wp-upload-icon{
    width:42px;
    height:42px;
  }

  .attachment-gallery{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* LOFFA V1.1.6 ORDER DETAIL FLOW */

.detail-dialog:not(.edit-mode){
  width:min(820px,94vw);
  background:#ffffff;
}

.detail-dialog.edit-mode{
  width:min(1240px,96vw);
}

.detail-dialog:not(.edit-mode) .dialog-head{
  min-height:68px;
  padding:13px 18px;
}

.detail-dialog:not(.edit-mode) #detailBody{
  padding:14px 14px 18px;
}

.order-view-shell{
  display:grid;
  gap:10px;
}

.order-view-top{
  display:grid;
  grid-template-columns:150px 1fr auto;
  gap:18px;
  align-items:start;
  padding:16px;
  border:1px solid #EBB9DF;
  border-radius:20px;
  background:#ffffff;
}

.order-view-image{
  width:150px;
  height:150px;
  overflow:hidden;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:#ffffff;
  box-shadow:0 8px 28px rgba(28,32,36,.07);
}

.order-view-image img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  cursor:zoom-in;
}

.order-view-image.no-image span{
  color:#6b6b6b;
  font-size:38px;
  font-weight:850;
}

.order-view-main{min-width:0}

.order-view-eyebrow,
.order-view-item > span,
.order-view-reward > span,
.order-view-money span,
.order-view-note > span,
.order-view-section-head span{
  color:#6b6b6b;
  font-size:8px;
  font-weight:900;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.order-view-main h2{
  margin:4px 0 2px;
  font-size:24px;
  line-height:1.05;
}

.order-view-phone{
  color:#6b6b6b;
  font-size:12px;
}

.order-view-item{
  display:flex;
  flex-direction:column;
  gap:3px;
  margin-top:16px;
}

.order-view-item strong{font-size:14px}
.order-view-item small{color:#6b6b6b;font-size:10px}

.order-view-tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:12px;
}

.order-view-status{
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:4px 10px;
  border-radius:999px;
  font-size:9px;
  font-weight:850;
}

.detail-status-green{background:hsla(143,75%,62%,.16);color:#70eab3}
.detail-status-yellow{background:hsla(44,75%,62%,.16);color:#fbce60}
.detail-status-red{background:hsla(355,75%,62%,.16);color:#d98289}
.detail-status-grey{background:#ffffff;color:#6b6b6b}

.order-view-reward{
  min-width:96px;
  padding:12px;
  border-radius:15px;
  background:#ffffff;
  text-align:right;
}

.order-view-reward strong{
  display:block;
  margin-top:5px;
  color:#71eab4;
  font-size:18px;
}

.order-view-money{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}

.order-view-money > div{
  padding:12px 14px;
  border:1px solid #EBB9DF;
  border-radius:16px;
  background:#ffffff;
}

.order-view-money > div:nth-child(1){background:hsla(31,75%,62%,.16)}
.order-view-money > div:nth-child(2){background:#ffffff}
.order-view-money > div:nth-child(3){background:#ffffff}
.order-view-money > div.has-balance{background:#ffffff}

.order-view-money strong{
  display:block;
  margin-top:5px;
  font-size:18px;
}

.order-view-money .has-balance strong{color:#db8087}

.order-view-note{
  padding:11px 13px;
  border:1px solid hsla(206,75%,68%,.35);
  border-radius:15px;
  background:#ffffff;
}

.order-view-note p{
  margin:5px 0 0;
  font-size:12px;
}

.order-view-section{
  padding:13px;
  border:1px solid #EBB9DF;
  border-radius:18px;
  background:#ffffff;
}

.order-view-section-head{margin-bottom:9px}

.order-view-section-head strong{
  display:block;
  margin-top:2px;
  font-size:14px;
}

.order-view-tracking-list{
  display:grid;
  gap:7px;
}

.order-view-track{
  display:grid;
  grid-template-columns:32px 1fr auto;
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid #EBB9DF;
  border-radius:13px;
  background:#ffffff;
}

.order-view-track-no{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#E55E99;
  color:#fff;
  font-size:11px;
  font-weight:850;
}

.order-view-track-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.order-view-track-copy strong{font-size:11px}
.order-view-track-copy span{color:#6b6b6b;font-size:9px}

.order-view-track-copy b{
  overflow:hidden;
  color:#111111;
  font-size:11px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.order-view-track-status{
  min-height:25px;
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  background:#ffffff;
  color:#6b6b6b;
  font-size:8px;
  font-weight:850;
}

.order-view-actions{
  display:grid;
  grid-template-columns:1.1fr 1.1fr .85fr .85fr;
  gap:7px;
  position:sticky;
  bottom:0;
  z-index:8;
  padding:8px;
  border:1px solid #EBB9DF;
  border-radius:17px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(14px);
}

.order-view-btn{
  min-height:43px;
  border:0;
  border-radius:12px;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
}

.order-view-btn.edit{background:#1688ef;color:#fff}
.order-view-btn.receipt{background:#E55E99;color:#fff}

.order-view-btn.delete{
  border:1px solid hsla(356,75%,68%,.35);
  background:#ffffff;
  color:#dc7f86;
}

.order-view-btn.close{
  border:1px solid #EBB9DF;
  background:#ffffff;
  color:#111111;
}

@media(max-width:760px){
  .detail-dialog:not(.edit-mode),
  .detail-dialog.edit-mode{
    width:100vw;
    height:100dvh;
    max-width:none;
    max-height:none;
  }

  .detail-dialog:not(.edit-mode) #detailBody{
    padding:8px 7px 80px;
  }

  .order-view-shell{gap:7px}

  .order-view-top{
    grid-template-columns:104px 1fr;
    gap:10px;
    padding:10px;
    border-radius:16px;
  }

  .order-view-image{
    width:104px;
    height:104px;
    border-radius:14px;
  }

  .order-view-main h2{font-size:19px}
  .order-view-phone{font-size:10px}
  .order-view-item{margin-top:9px}
  .order-view-item strong{font-size:12px}

  .order-view-reward{
    grid-column:1/-1;
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:8px 10px;
    text-align:left;
  }

  .order-view-reward strong{
    margin:0;
    font-size:14px;
  }

  .order-view-money{gap:6px}

  .order-view-money > div{
    padding:9px 10px;
    border-radius:13px;
  }

  .order-view-money strong{font-size:14px}

  .order-view-note{
    padding:9px 10px;
    border-radius:13px;
  }

  .order-view-section{
    padding:9px;
    border-radius:14px;
  }

  .order-view-track{
    grid-template-columns:29px 1fr;
    gap:8px;
    padding:8px;
  }

  .order-view-track-no{
    width:28px;
    height:28px;
  }

  .order-view-track-status{
    grid-column:2;
    justify-self:start;
  }

  .order-view-actions{
    position:fixed;
    left:7px;
    right:7px;
    bottom:calc(7px + env(safe-area-inset-bottom));
    grid-template-columns:1.1fr 1.1fr .8fr .8fr;
    padding:6px;
    border-radius:14px;
  }

  .order-view-btn{
    min-height:40px;
    font-size:8px;
  }
}

@media(max-width:420px){
  .order-view-top{grid-template-columns:92px 1fr}

  .order-view-image{
    width:92px;
    height:92px;
  }

  .order-view-main h2{font-size:18px}

  .order-view-actions{
    grid-template-columns:1fr 1fr 1fr 1fr;
  }
}

/* LOFFA V1.1.7 SIMPLE WORDPRESS EDIT */

.detail-dialog.edit-mode:not(.advanced-edit-mode){
  width:min(900px,95vw);
  max-height:94vh;
  background:#ffffff;
}

.detail-dialog.edit-mode:not(.advanced-edit-mode) .dialog-head{
  display:none;
}

.detail-dialog.edit-mode:not(.advanced-edit-mode) #detailBody{
  padding:18px;
}

.simple-edit-shell{
  display:grid;
  gap:13px;
  padding:18px;
  border:1px solid #EBB9DF;
  border-radius:22px;
  background:#ffffff;
}

.simple-edit-head span{
  color:#6b6b6b;
  font-size:9px;
  font-weight:900;
  letter-spacing:.2em;
}

.simple-edit-head h2{
  margin:5px 0 0;
  font-size:28px;
  line-height:1;
  letter-spacing:-.04em;
}

.simple-edit-grid{
  display:grid;
  gap:10px;
}

.simple-edit-grid.two{
  grid-template-columns:1fr 1fr;
}

.simple-edit-shell label{
  gap:5px;
  margin:0;
  color:#111111;
  font-size:9px;
  font-weight:900;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.simple-edit-shell input,
.simple-edit-shell select,
.simple-edit-shell textarea{
  min-height:46px;
  padding:10px 13px;
  border:1px solid #EBB9DF;
  border-radius:13px;
  background:#ffffff;
  color:#111111;
  font-size:16px;
  font-weight:500;
  letter-spacing:0;
  text-transform:none;
}

.simple-edit-shell textarea{
  min-height:86px;
}

.simple-readonly{
  min-height:46px;
  display:flex;
  align-items:center;
  padding:10px 13px;
  border-radius:13px;
  background:#ffffff;
  color:#111111;
  font-size:16px;
  font-weight:850;
  letter-spacing:0;
  text-transform:none;
}

.simple-edit-section{
  padding-top:3px;
}

.simple-section-title{
  margin-bottom:7px;
  color:#111111;
  font-size:9px;
  font-weight:900;
  letter-spacing:.14em;
}

.simple-edit-item{
  display:grid;
  grid-template-columns:minmax(230px,1fr) 85px 145px auto;
  gap:8px;
  align-items:end;
  padding:9px 0;
  border-top:1px solid #EBB9DF;
}

.simple-edit-item:first-child{
  border-top:0;
  padding-top:0;
}

.simple-remove-item,
.simple-secondary-btn{
  min-height:44px;
  padding:9px 13px;
  border:1px solid #EBB9DF;
  border-radius:12px;
  background:#ffffff;
  color:#111111;
  font-size:10px;
  font-weight:850;
}

.simple-secondary-btn{
  margin-top:6px;
}

.simple-image-box{
  padding:14px;
  border:1px solid hsla(209,75%,68%,.35);
  border-radius:20px;
  background:#ffffff;
}

.simple-upload-picker{
  display:grid !important;
  grid-template-columns:54px 1fr auto;
  gap:13px !important;
  align-items:center;
  margin:0 !important;
  padding:12px 14px;
  border:1px solid #EBB9DF;
  border-radius:17px;
  background:#ffffff;
  cursor:pointer;
  letter-spacing:0 !important;
  text-transform:none !important;
}

.simple-upload-icon{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:linear-gradient(180deg,#43a9ff,#1788ef);
  color:#fff;
  font-size:28px;
}

.simple-upload-picker > span:nth-child(2){
  display:flex;
  flex-direction:column;
  gap:4px;
}

.simple-upload-picker strong{
  font-size:14px;
}

.simple-upload-picker small{
  color:#6b6b6b;
  font-size:9px;
}

.simple-upload-picker b{
  min-width:76px;
  min-height:39px;
  display:grid;
  place-items:center;
  padding:0 13px;
  border-radius:999px;
  background:#167fea;
  color:#fff;
  font-size:10px;
}

.simple-hidden-file{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  pointer-events:none !important;
}

.simple-image-meta{
  margin:10px 2px 7px;
  color:#6b6b6b;
  font-size:10px;
  font-weight:800;
}

.simple-image-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
}

.simple-product-image{
  position:relative;
  aspect-ratio:1/1;
  overflow:hidden;
  border-radius:14px;
  background:rgba(229,94,153,.07);
}

.simple-product-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.simple-image-delete{
  position:absolute;
  top:6px;
  right:6px;
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  padding:0;
  border:2px solid #EBB9DF;
  border-radius:50%;
  background:#E55E99;
  color:#fff;
  font-size:18px;
  line-height:1;
}

.simple-empty-image{
  grid-column:1/-1;
  padding:16px;
  color:#6b6b6b;
  font-size:11px;
}

.simple-edit-actions{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:8px;
  margin-top:2px;
}

.simple-primary-action,
.simple-save-action,
.simple-cancel-action{
  min-height:48px;
  padding:10px 16px;
  border-radius:13px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
}

.simple-primary-action,
.simple-save-action{
  border:1px solid rgba(229,94,153,.85);
  background:#E55E99;
  color:#fff;
}

.simple-cancel-action{
  border:1px solid #EBB9DF;
  background:#ffffff;
  color:#111111;
}

.simple-advanced-link{
  justify-self:center;
  padding:5px 10px;
  border:0;
  background:transparent;
  color:#6b6b6b;
  font-size:8px;
  font-weight:800;
  letter-spacing:.12em;
}

@media(max-width:760px){
  .detail-dialog.edit-mode:not(.advanced-edit-mode){
    width:100vw;
    height:100dvh;
    max-width:none;
    max-height:none;
    margin:0;
    border-radius:0;
  }

  .detail-dialog.edit-mode:not(.advanced-edit-mode) #detailBody{
    padding:7px 7px calc(82px + env(safe-area-inset-bottom));
  }

  .simple-edit-shell{
    gap:10px;
    padding:11px;
    border-radius:17px;
  }

  .simple-edit-head h2{
    font-size:24px;
  }

  .simple-edit-grid.two{
    grid-template-columns:1fr 1fr;
    gap:7px;
  }

  .simple-edit-shell label{
    font-size:8px;
  }

  .simple-edit-shell input,
  .simple-edit-shell select,
  .simple-edit-shell textarea,
  .simple-readonly{
    min-height:42px;
    padding:8px 10px;
    border-radius:11px;
    font-size:16px;
  }

  .simple-edit-shell textarea{
    min-height:72px;
  }

  .simple-edit-item{
    grid-template-columns:1fr 70px 108px;
    gap:6px;
  }

  .simple-edit-item .simple-item-name{
    grid-column:1/-1;
  }

  .simple-remove-item{
    grid-column:1/-1;
    min-height:35px;
  }

  .simple-image-box{
    padding:9px;
    border-radius:16px;
  }

  .simple-upload-picker{
    grid-template-columns:44px 1fr auto;
    gap:8px !important;
    padding:9px;
    border-radius:14px;
  }

  .simple-upload-icon{
    width:42px;
    height:42px;
    border-radius:12px;
    font-size:23px;
  }

  .simple-upload-picker strong{
    font-size:12px;
  }

  .simple-upload-picker small{
    font-size:8px;
  }

  .simple-upload-picker b{
    min-width:60px;
    min-height:35px;
    padding:0 10px;
  }

  .simple-image-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }

  .simple-edit-actions{
    position:fixed;
    left:7px;
    right:7px;
    bottom:calc(7px + env(safe-area-inset-bottom));
    z-index:30;
    grid-template-columns:1.5fr .8fr .7fr;
    padding:6px;
    border:1px solid #EBB9DF;
    border-radius:14px;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(14px);
  }

  .simple-primary-action,
  .simple-save-action,
  .simple-cancel-action{
    min-height:40px;
    padding:7px 8px;
    font-size:8px;
  }
}

@media(max-width:430px){
  .simple-edit-shell{
    padding:9px;
  }

  .simple-image-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* LOFFA V1.1.8 WORKFLOW */
.v118-loffa-stage{
  display:grid;
  grid-template-columns:34px 1fr auto;
  gap:11px;
  align-items:center;
  margin:8px 0;
  padding:12px;
  border:1px solid hsla(144,75%,68%,.35);
  border-radius:15px;
  background:#ffffff;
}

.v118-step-dot{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#138754;
  color:#fff;
  font-size:11px;
  font-weight:900;
}

.v118-stage-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.v118-stage-copy strong{
  font-size:10px;
  letter-spacing:.08em;
}

.v118-stage-copy span{
  color:#6b6b6b;
  font-size:10px;
}

.v118-stage-copy small{
  color:#6b6b6b;
  font-size:8px;
}

.v118-loffa-btn{
  min-height:42px;
  padding:8px 13px;
  border:1px solid #4ce69c;
  border-radius:11px;
  background:#117746;
  color:#fff;
  font-size:9px;
  font-weight:900;
  letter-spacing:.02em;
}

.v118-loffa-btn.done,
[data-v118].done{
  border-color:hsla(145,75%,68%,.35) !important;
  background:#ffffff !important;
  color:#71eab3 !important;
}

[data-v118]:disabled{
  opacity:.55;
  cursor:wait;
}

@media(max-width:760px){
  .v118-loffa-stage{
    grid-template-columns:30px 1fr;
    gap:8px;
    padding:9px;
    border-radius:13px;
  }

  .v118-step-dot{
    width:28px;
    height:28px;
  }

  .v118-loffa-btn{
    grid-column:1/-1;
    width:100%;
    min-height:40px;
  }
}

/* LOFFA V1.1.9 EDITABLE TRACKING */

.order-view-section.v119-workflow{
  padding:0;
  overflow:hidden;
  border:1px solid #EBB9DF;
  border-radius:18px;
  background:#ffffff;
}

.v119-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-bottom:1px solid #EBB9DF;
  background:#ffffff;
}

.v119-head > div{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.v119-head span{
  color:#6b6b6b;
  font-size:8px;
  font-weight:900;
  letter-spacing:.16em;
}

.v119-head strong{
  font-size:15px;
}

.v119-head small{
  color:#6b6b6b;
  font-size:9px;
}

.v119-step{
  display:grid;
  grid-template-columns:36px 1fr;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid #EBB9DF;
  background:#ffffff;
}

.v119-step:last-child{
  border-bottom:0;
}

.v119-step-number{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#E55E99;
  color:#fff;
  font-size:12px;
  font-weight:900;
}

.v119-step-body{
  min-width:0;
}

.v119-step-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:9px;
}

.v119-step-title > div{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.v119-step-title strong{
  font-size:11px;
  letter-spacing:.03em;
}

.v119-step-title span{
  color:#6b6b6b;
  font-size:9px;
}

.v119-detect-badge{
  flex:0 0 auto;
  min-height:27px;
  display:inline-flex;
  align-items:center;
  padding:4px 9px;
  border-radius:999px;
  font-size:8px !important;
  font-weight:850;
  white-space:nowrap;
}

.v119-detect-badge.empty{
  background:#ffffff;
  color:#6b6b6b;
}

.v119-detect-badge.ok{
  background:hsla(143,75%,62%,.16);
  color:#157c4b;
}

.v119-detect-badge.warn{
  background:hsla(44,75%,62%,.16);
  color:#8a6a20;
}

.v119-input-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:7px;
}

.v119-input-row input{
  min-height:44px;
  padding:9px 12px;
  border:1px solid #EBB9DF;
  border-radius:12px;
  background:#ffffff;
  font-family:inherit;
  font-size:14px;
}

.v119-input-row input:focus{
  outline:none;
  border-color:#1987ee;
  box-shadow:0 0 0 3px rgba(25,135,238,.09);
}

.v119-send-btn,
.v119-arrived-btn{
  min-height:44px;
  padding:9px 15px;
  border:1px solid rgba(229,94,153,.85);
  border-radius:12px;
  background:#E55E99;
  color:#fff;
  font-size:9px;
  font-weight:900;
  letter-spacing:.03em;
  cursor:pointer;
}

.v119-send-btn.done{
  border-color:#54dea0;
  background:#17794d;
}

.v119-arrived-step{
  background:#ffffff;
}

.v119-arrived-step.done{
  background:#ffffff;
}

.v119-arrived-btn{
  width:100%;
  border-color:#4ee4a0;
  background:#137b4c;
}

.v119-arrived-btn.done{
  border-color:hsla(143,75%,68%,.35);
  background:rgba(229,94,153,.07);
  color:#157c4b;
}

.v119-track-link{
  min-height:15px;
  margin-top:5px;
}

.v119-track-link a{
  color:#6abcf1;
  font-size:9px;
  font-weight:750;
  text-decoration:none;
}

@media(max-width:760px){
  .order-view-section.v119-workflow{
    border-radius:14px;
  }

  .v119-head{
    padding:9px 10px;
  }

  .v119-head strong{
    font-size:14px;
  }

  .v119-head small{
    font-size:7px;
  }

  .v119-step{
    grid-template-columns:30px 1fr;
    gap:7px;
    padding:9px;
  }

  .v119-step-number{
    width:29px;
    height:29px;
    font-size:10px;
  }

  .v119-step-title{
    gap:6px;
    margin-bottom:7px;
  }

  .v119-step-title strong{
    font-size:10px;
  }

  .v119-step-title span{
    font-size:8px;
  }

  .v119-detect-badge{
    min-height:24px;
    padding:3px 7px;
    font-size:7px !important;
  }

  .v119-input-row{
    grid-template-columns:1fr;
    gap:6px;
  }

  .v119-input-row input{
    min-height:42px;
    font-size:16px;
  }

  .v119-send-btn,
  .v119-arrived-btn{
    min-height:40px;
    width:100%;
    font-size:8px;
  }

  .v119-track-link a{
    font-size:8px;
  }
}

/* LOFFA V1.2.0 BALANCE + SHIP OUT */

/* Baki button inside Order Detail */
.order-view-actions{
  grid-template-columns:repeat(5,minmax(0,1fr));
}

.order-view-btn.balance-received{
  border:1px solid #efad42;
  background:hsla(38,75%,62%,.16);
  color:#fbc360;
}

.order-view-btn.balance-received:hover{
  background:hsla(40,75%,62%,.16);
}

.order-view-btn.balance-received.done{
  border-color:hsla(142,75%,68%,.35);
  background:#ffffff;
  color:#157c4b;
}

/* ONLY border changes orange after item arrived + balance fully paid */
.wp-order-card.ready-shipout{
  border:2px solid #a9701a !important;
  background:#ffffff !important;
  box-shadow:0 0 0 1px rgba(240,164,58,.06) !important;
}

.wp-order-card.ready-shipout .wp-detail-btn{
  margin-bottom:0;
}

.wp-shipout-btn{
  width:100%;
  min-height:48px;
  margin-top:8px;
  padding:0 14px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:14px;
  align-items:center;
  border:1px solid #a9701a;
  border-radius:15px;
  background:hsla(38,75%,62%,.16);
  color:#fbc160;
  text-align:left;
  cursor:pointer;
}

.wp-shipout-btn:hover{
  background:hsla(40,75%,62%,.16);
}

.wp-shipout-btn span{
  font-size:10px;
  font-weight:900;
  letter-spacing:.06em;
}

.wp-shipout-btn small{
  color:#d9b782;
  font-size:8px;
  font-weight:750;
  letter-spacing:.07em;
}

.wp-shipout-btn b{
  justify-self:end;
  font-size:21px;
}

.wp-shipout-btn:disabled{
  opacity:.55;
  cursor:wait;
}

@media(max-width:760px){
  .order-view-actions{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }

  .order-view-btn.balance-received{
    padding:5px 4px;
    font-size:7px;
    line-height:1.15;
  }

  .wp-order-card.ready-shipout{
    border-width:2px !important;
  }

  .wp-shipout-btn{
    min-height:43px;
    margin-top:7px;
    padding:0 10px;
    gap:7px;
    border-radius:13px;
  }

  .wp-shipout-btn span{
    font-size:9px;
  }

  .wp-shipout-btn small{
    font-size:7px;
  }

  .wp-shipout-btn b{
    font-size:19px;
  }
}

/* LOFFA V1.2.2 COMPLETED + MINIMAL UI */

/*
  Desktop layout:
  EDIT | PDF | BAKI
  COMPLETED ORDER full width
  DELETE | TUTUP
*/
.order-view-actions.v121-actions{
  display:grid !important;
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  grid-template-areas:
    "edit edit pdf pdf balance balance"
    "complete complete complete complete complete complete"
    "delete delete delete close close close" !important;
  gap:10px !important;
  align-items:stretch;
}

.order-view-actions.v121-actions > [data-v121-role="edit"]{
  grid-area:edit;
}

.order-view-actions.v121-actions > [data-v121-role="pdf"]{
  grid-area:pdf;
}

.order-view-actions.v121-actions > [data-v121-role="balance"]{
  grid-area:balance;
}

.order-view-actions.v121-actions > [data-v121-role="complete"]{
  grid-area:complete;
}

.order-view-actions.v121-actions > [data-v121-role="delete"]{
  grid-area:delete;
}

.order-view-actions.v121-actions > [data-v121-role="close"]{
  grid-area:close;
}

.order-view-actions.v121-actions > button{
  min-width:0;
  min-height:52px;
  border-radius:14px !important;
  font-weight:850;
  letter-spacing:.035em;
}

.order-view-actions.v121-actions .v121-complete-btn{
  min-height:62px;
  padding:10px 18px !important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  border:1px solid #EBB9DF !important;
  background:#ffffff !important;
  color:#6b6b6b !important;
  cursor:not-allowed;
}

.order-view-actions.v121-actions .v121-complete-btn.ready{
  border-color:#50e29c !important;
  background:#13824d !important;
  color:#fff !important;
  cursor:pointer;
  box-shadow:0 7px 18px rgba(0,0,0,.07);
}

.order-view-actions.v121-actions .v121-complete-btn.ready:hover{
  filter:brightness(.96);
}

.order-view-actions.v121-actions .v121-complete-btn.done{
  border-color:hsla(145,75%,68%,.35) !important;
  background:#ffffff !important;
  color:#157c4b !important;
}

.v121-complete-main{
  display:block;
  font-size:12px;
  line-height:1.15;
  font-weight:900;
  letter-spacing:.075em;
}

.v121-complete-sub{
  display:block;
  font-size:9px;
  line-height:1.2;
  font-weight:750;
  letter-spacing:.035em;
  opacity:.86;
}

/* Keep destructive and secondary actions visually quiet */
.order-view-actions.v121-actions > [data-v121-role="delete"]{
  background:#ffffff !important;
  border-color:hsla(356,75%,68%,.35) !important;
  color:#dc7f87 !important;
}

.order-view-actions.v121-actions > [data-v121-role="close"]{
  background:#ffffff !important;
  color:#6b6b6b !important;
}

/* Phone / narrow screen */
@media(max-width:760px){
  .order-view-actions.v121-actions{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    grid-template-areas:
      "edit pdf"
      "balance balance"
      "complete complete"
      "delete close" !important;
    gap:8px !important;
  }

  .order-view-actions.v121-actions > button{
    min-height:48px;
    padding:8px 10px !important;
    border-radius:13px !important;
    font-size:9px !important;
    line-height:1.15;
  }

  .order-view-actions.v121-actions > [data-v121-role="balance"]{
    min-height:46px;
    font-size:10px !important;
  }

  .order-view-actions.v121-actions .v121-complete-btn{
    min-height:58px;
  }

  .v121-complete-main{
    font-size:11px;
  }

  .v121-complete-sub{
    font-size:8px;
  }
}

@media(max-width:390px){
  .order-view-actions.v121-actions{
    gap:7px !important;
  }

  .order-view-actions.v121-actions > button{
    min-height:46px;
    padding:7px 8px !important;
    font-size:8px !important;
  }

  .order-view-actions.v121-actions .v121-complete-btn{
    min-height:56px;
  }
}


/* V1.2.2 — compact / minimalist tracking controls */
.order-view-section.v119-workflow .v119-input-row{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:8px !important;
  align-items:center !important;
}

.order-view-section.v119-workflow .v119-input-row input{
  min-height:46px !important;
  padding:9px 13px !important;
  border-radius:12px !important;
}

.order-view-section.v119-workflow .v119-send-btn{
  width:auto !important;
  min-width:92px !important;
  min-height:42px !important;
  padding:0 14px !important;
  border-radius:11px !important;
  white-space:nowrap !important;
  font-size:8px !important;
  letter-spacing:.055em !important;
  box-shadow:none !important;
}

.order-view-section.v119-workflow .v119-arrived-btn{
  width:auto !important;
  min-width:154px !important;
  min-height:42px !important;
  margin:8px 0 0 auto !important;
  padding:0 15px !important;
  display:block !important;
  border-radius:11px !important;
  white-space:nowrap !important;
  font-size:8px !important;
  letter-spacing:.045em !important;
  box-shadow:none !important;
}

/* quieter, cleaner button states */
.order-view-section.v119-workflow .v119-send-btn{
  border-color:rgba(229,94,153,.85) !important;
  background:#E55E99 !important;
}

.order-view-section.v119-workflow .v119-send-btn.done,
.order-view-section.v119-workflow .v119-arrived-btn{
  border-color:#53df9f !important;
  background:#177d4e !important;
}

.order-view-section.v119-workflow .v119-arrived-btn.done{
  border-color:hsla(143,75%,68%,.35) !important;
  background:#ffffff !important;
  color:#157c4b !important;
}

/* Phone: keep buttons compact instead of turning into full-width bars */
@media(max-width:760px){
  .order-view-section.v119-workflow .v119-input-row{
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:7px !important;
  }

  .order-view-section.v119-workflow .v119-input-row input{
    min-width:0 !important;
    min-height:44px !important;
    padding:8px 11px !important;
  }

  .order-view-section.v119-workflow .v119-send-btn{
    width:auto !important;
    min-width:82px !important;
    min-height:40px !important;
    padding:0 11px !important;
    font-size:7.5px !important;
  }

  .order-view-section.v119-workflow .v119-arrived-btn{
    width:auto !important;
    min-width:142px !important;
    min-height:40px !important;
    margin-left:auto !important;
    padding:0 12px !important;
    font-size:7.5px !important;
  }
}

@media(max-width:390px){
  .order-view-section.v119-workflow .v119-input-row{
    gap:6px !important;
  }

  .order-view-section.v119-workflow .v119-send-btn{
    min-width:74px !important;
    padding:0 9px !important;
  }

  .order-view-section.v119-workflow .v119-arrived-btn{
    min-width:132px !important;
  }
}

/* LOFFA V1.2.3 MOBILE FOOTER FIX */

/* Desktop: one clean compact action row */
.order-view-actions.v121-actions{
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  grid-template-areas:"edit pdf balance complete delete close" !important;
  gap:7px !important;
  padding:7px !important;
  border-radius:14px !important;
}

.order-view-actions.v121-actions > button{
  min-height:42px !important;
  height:42px !important;
  padding:6px 9px !important;
  border-radius:11px !important;
  font-size:8.5px !important;
  line-height:1.1 !important;
  letter-spacing:.035em !important;
}

.order-view-actions.v121-actions > [data-v121-role="balance"]{
  min-height:42px !important;
  height:42px !important;
  font-size:8.5px !important;
}

.order-view-actions.v121-actions .v121-complete-btn{
  min-height:42px !important;
  height:42px !important;
  padding:5px 8px !important;
  gap:1px !important;
  box-shadow:none !important;
}

.order-view-actions.v121-actions .v121-complete-btn.ready{
  box-shadow:none !important;
}

.v121-complete-main{
  font-size:8.5px !important;
  line-height:1.05 !important;
  letter-spacing:.045em !important;
}

.v121-complete-sub{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:6.5px !important;
  line-height:1.05 !important;
  letter-spacing:.01em !important;
}

/*
  Phone:
  IMPORTANT — old V1.1.6 made this footer position:fixed.
  That covered tracking controls. Make it normal page content.
*/
@media(max-width:760px){
  .detail-dialog:not(.edit-mode) #detailBody{
    padding-bottom:12px !important;
    scroll-padding-bottom:12px !important;
  }

  .order-view-actions.v121-actions{
    position:static !important;
    left:auto !important;
    right:auto !important;
    top:auto !important;
    bottom:auto !important;
    inset:auto !important;
    z-index:auto !important;

    width:100% !important;
    margin:8px 0 0 !important;
    padding:6px !important;

    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    grid-template-areas:
      "edit pdf"
      "balance complete"
      "delete close" !important;
    gap:6px !important;

    border-radius:13px !important;
    background:#ffffff !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
    box-shadow:none !important;
  }

  .order-view-actions.v121-actions > button,
  .order-view-actions.v121-actions > [data-v121-role="balance"],
  .order-view-actions.v121-actions .v121-complete-btn{
    min-height:38px !important;
    height:38px !important;
    padding:5px 7px !important;
    border-radius:10px !important;
    font-size:8px !important;
    line-height:1.05 !important;
  }

  .v121-complete-main{
    font-size:8px !important;
  }

  /* Keep mobile footer visually light */
  .v121-complete-sub{
    display:none !important;
  }

  /* Tracking remains fully reachable/editable above footer */
  .order-view-section.v119-workflow{
    position:relative;
    z-index:1;
  }

  .order-view-section.v119-workflow input,
  .order-view-section.v119-workflow button{
    position:relative;
    z-index:2;
  }
}

@media(max-width:390px){
  .order-view-actions.v121-actions{
    gap:5px !important;
    padding:5px !important;
  }

  .order-view-actions.v121-actions > button,
  .order-view-actions.v121-actions > [data-v121-role="balance"],
  .order-view-actions.v121-actions .v121-complete-btn{
    min-height:36px !important;
    height:36px !important;
    padding:4px 6px !important;
    font-size:7.5px !important;
  }

  .v121-complete-main{
    font-size:7.5px !important;
  }
}

/* LOFFA V1.2.4 UI SYSTEM + RESPONSIVE */

/* =========================================================
   1. GLOBAL UI SYSTEM
   ========================================================= */
:root{
  --loffa-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Segoe UI",Roboto,Arial,sans-serif;
  --loffa-bg:#FFF7FB;
  --loffa-card:#ffffff;
  --loffa-line:#EBB9DF;
  --loffa-text:#111111;
  --loffa-muted:#6b6b6b;
  --loffa-radius:15px;
  --loffa-radius-sm:11px;
  --loffa-control-h:44px;
}

html,
body{
  width:100%;
  max-width:100%;
  margin:0;
  overflow-x:clip !important;
  overscroll-behavior-x:none;
  background:var(--loffa-bg);
  color:var(--loffa-text);
  font-family:var(--loffa-font) !important;
  font-size:14px;
  line-height:1.4;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

body{
  position:relative;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

button,
input,
textarea,
select{
  font-family:var(--loffa-font) !important;
}

img,
svg,
video,
canvas{
  max-width:100%;
}

.app,
.main,
.page,
.panel,
.form-panel,
.detail-dialog,
#detailBody,
.order-view-shell,
.simple-edit-shell,
.order-view-section,
.subpanel{
  min-width:0;
  max-width:100%;
}

.page,
#detailBody,
.detail-dialog{
  overflow-x:hidden !important;
}

.main{overflow-x:clip !important}

/* stop form controls / grid children from forcing horizontal page width */
.grid > *,
.grid.two > *,
.grid.three > *,
.simple-edit-grid > *,
.simple-edit-item > *,
.v119-input-row > *,
.order-view-money > *,
.detail-grid > *{
  min-width:0 !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea,
select{
  width:100%;
  max-width:100%;
  min-width:0;
}

button{
  -webkit-tap-highlight-color:transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{
  outline:2px solid rgba(26,136,239,.22);
  outline-offset:1px;
}

/* =========================================================
   2. GENERAL PORTAL CONSISTENCY
   ========================================================= */
.panel,
.card,
.subpanel,
.order-view-section,
.simple-edit-shell{
  border-color:var(--loffa-line);
}

.panel{
  border-radius:var(--loffa-radius) !important;
}

.panel-head h2{
  letter-spacing:-.025em;
}

label,
.form-panel label{
  font-weight:800;
}

input,
textarea,
select{
  border-color:#EBB9DF;
  background:#ffffff;
  color:#111111;
}

.btn{
  font-weight:850;
  letter-spacing:.025em;
}

/* preserve horizontal scrolling only inside real scroll containers */
.table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto !important;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}

/* =========================================================
   3. ORDER DETAIL — CONSISTENT SCALE
   ========================================================= */
.dialog-head{
  box-sizing:border-box;
}

.dialog-head h2{
  line-height:1.08;
  letter-spacing:-.03em;
}

.order-view-top,
.order-view-money > div,
.order-view-note,
.order-view-section.v119-workflow,
.order-view-actions.v121-actions{
  border-radius:var(--loffa-radius) !important;
}

.order-view-money > div{
  min-width:0;
}

.order-view-money strong{
  line-height:1.1;
}

.order-view-actions.v121-actions{
  gap:6px !important;
  padding:6px !important;
}

.order-view-actions.v121-actions > button,
.order-view-actions.v121-actions > [data-v121-role="balance"],
.order-view-actions.v121-actions .v121-complete-btn{
  min-height:40px !important;
  height:40px !important;
  padding:5px 8px !important;
  border-radius:10px !important;
  font-size:8.5px !important;
  line-height:1.05 !important;
}

.v121-complete-main{
  font-size:8.5px !important;
  line-height:1.05 !important;
}

.v121-complete-sub{
  font-size:7px !important;
  line-height:1.05 !important;
}

/* =========================================================
   4. TRACKING FLOW — ONE VISUAL SCALE
   ========================================================= */
.order-view-section.v119-workflow{
  overflow:hidden;
}

.v119-head{
  gap:10px !important;
  padding:11px 12px !important;
}

.v119-head span{
  font-size:9px !important;
  letter-spacing:.12em !important;
}

.v119-head strong{
  font-size:15px !important;
  line-height:1.15;
}

.v119-head small{
  font-size:9px !important;
  line-height:1.25;
}

.v119-step{
  grid-template-columns:34px minmax(0,1fr) !important;
  gap:9px !important;
  padding:11px 12px !important;
}

.v119-step-number{
  width:32px !important;
  height:32px !important;
  font-size:11px !important;
}

.v119-step-body{
  min-width:0 !important;
  max-width:100%;
}

.v119-step-title{
  gap:8px !important;
  margin-bottom:8px !important;
}

.v119-step-title > div{
  min-width:0;
}

.v119-step-title strong{
  font-size:11px !important;
  line-height:1.2;
}

.v119-step-title span{
  font-size:9px !important;
  line-height:1.25;
}

.v119-detect-badge{
  min-height:25px !important;
  padding:4px 8px !important;
  font-size:8px !important;
}

.v119-input-row{
  width:100%;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:7px !important;
  align-items:center;
}

.v119-input-row input{
  width:100% !important;
  min-width:0 !important;
  min-height:44px !important;
  height:44px;
  padding:9px 11px !important;
  border-radius:11px !important;
  font-size:15px !important;
}

.v119-send-btn,
.v119-arrived-btn{
  min-height:40px !important;
  height:40px;
  padding:0 13px !important;
  border-radius:10px !important;
  font-size:8px !important;
  letter-spacing:.05em !important;
  white-space:nowrap;
}

.v119-send-btn{
  width:auto !important;
  min-width:88px !important;
}

.v119-arrived-btn{
  width:auto !important;
  min-width:140px !important;
  margin:8px 0 0 auto !important;
}

.v119-track-link{
  overflow-wrap:anywhere;
}

/* =========================================================
   5. SIMPLE EDIT — CLEAN FORM RHYTHM
   ========================================================= */
.detail-dialog.edit-mode:not(.advanced-edit-mode) #detailBody{
  overflow-x:hidden !important;
}

.simple-edit-shell{
  width:100%;
  gap:12px !important;
  padding:14px !important;
  border-radius:17px !important;
}

.simple-edit-head span,
.simple-section-title{
  font-size:9px !important;
  font-weight:850;
  letter-spacing:.14em !important;
}

.simple-edit-head h2{
  margin-top:3px;
  font-size:25px !important;
  line-height:1.08;
  letter-spacing:-.035em;
}

.simple-edit-shell label{
  gap:5px !important;
  margin:0 !important;
  font-size:9px !important;
  font-weight:850 !important;
  letter-spacing:.09em !important;
}

.simple-edit-shell input,
.simple-edit-shell select,
.simple-edit-shell textarea,
.simple-readonly{
  width:100% !important;
  min-width:0 !important;
  min-height:44px !important;
  padding:9px 11px !important;
  border-radius:11px !important;
  font-size:15px !important;
  line-height:1.3;
}

.simple-edit-shell textarea{
  min-height:78px !important;
  resize:vertical;
}

.simple-edit-grid.two{
  gap:8px !important;
}

.simple-edit-item{
  width:100%;
  min-width:0;
  gap:7px !important;
}

.simple-remove-item,
.simple-secondary-btn{
  min-height:38px !important;
  border-radius:10px !important;
  font-size:9px !important;
  font-weight:800;
}

.simple-image-box{
  border-radius:15px !important;
}

.simple-upload-picker{
  min-width:0;
}

.simple-edit-actions{
  gap:6px !important;
}

.simple-primary-action,
.simple-save-action,
.simple-cancel-action{
  min-height:41px !important;
  padding:7px 9px !important;
  border-radius:10px !important;
  font-size:8.5px !important;
  line-height:1.15;
}

.simple-advanced-link{
  font-size:8px !important;
}

/* =========================================================
   6. ADVANCED EDIT — SAME FORM LANGUAGE
   ========================================================= */
.detail-dialog.edit-mode.advanced-edit-mode .subpanel,
.detail-dialog.edit-mode.advanced-edit-mode .tracking-stage{
  padding:11px !important;
  border-radius:14px !important;
}

.detail-dialog.edit-mode.advanced-edit-mode h3{
  font-size:16px !important;
  line-height:1.15;
}

.detail-dialog.edit-mode.advanced-edit-mode label{
  font-size:9px !important;
  letter-spacing:.09em !important;
}

.detail-dialog.edit-mode.advanced-edit-mode input,
.detail-dialog.edit-mode.advanced-edit-mode textarea,
.detail-dialog.edit-mode.advanced-edit-mode select{
  min-width:0 !important;
  min-height:44px !important;
  padding:9px 11px !important;
  border-radius:11px !important;
  font-size:15px !important;
}

.mobile-sticky-actions{
  gap:6px !important;
}

.mobile-sticky-actions .btn{
  min-height:40px !important;
  border-radius:10px !important;
  font-size:8.5px !important;
}

/* =========================================================
   7. MOBILE
   ========================================================= */
@media(max-width:760px){
  html,
  body{
    width:100% !important;
    max-width:100% !important;
    overflow-x:clip !important;
  }

  body{
    touch-action:pan-y pinch-zoom;
  }

  .page{
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
  }

  .app,
  .main{
    width:100% !important;
    max-width:100% !important;
    overflow-x:clip !important;
  }

  .main{
    padding:7px 7px 22px !important;
  }

  .panel{
    padding:11px !important;
    margin-bottom:7px !important;
    border-radius:15px !important;
  }

  .panel-head{
    gap:6px;
    margin-bottom:8px !important;
  }

  .panel-head h2{
    font-size:19px !important;
    line-height:1.1;
  }

  .panel-head p,
  .muted{
    line-height:1.3;
  }

  label,
  .form-panel label{
    gap:4px !important;
    margin:6px 0 !important;
    font-size:9px !important;
    letter-spacing:.08em !important;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  textarea,
  select{
    min-height:44px !important;
    padding:9px 10px !important;
    border-radius:11px !important;
    font-size:16px !important; /* prevents iOS focus zoom */
  }

  .btn{
    min-height:40px !important;
    padding:8px 10px !important;
    border-radius:10px !important;
    font-size:9px !important;
  }

  /* Full-screen detail without sideways drift */
  .detail-dialog,
  .detail-dialog:not(.edit-mode),
  .detail-dialog.edit-mode{
    width:100vw !important;
    max-width:100vw !important;
    height:100dvh !important;
    max-height:100dvh !important;
    margin:0 !important;
    overflow-x:hidden !important;
  }

  .detail-dialog #detailBody{
    width:100% !important;
    max-width:100% !important;
    padding:8px 7px 12px !important;
    overflow-x:hidden !important;
  }

  .dialog-head{
    min-height:61px !important;
    padding:9px 11px !important;
  }

  .dialog-head h2{
    font-size:20px !important;
  }

  .dialog-head .icon-btn{
    width:38px !important;
    height:38px !important;
    font-size:17px !important;
  }

  /* Order summary */
  .order-view-shell{
    gap:7px !important;
  }

  .order-view-top{
    grid-template-columns:96px minmax(0,1fr) !important;
    gap:10px !important;
    padding:10px !important;
    border-radius:15px !important;
  }

  .order-view-image{
    width:96px !important;
    height:96px !important;
    border-radius:13px !important;
  }

  .order-view-main{
    min-width:0;
  }

  .order-view-main h2{
    font-size:19px !important;
    line-height:1.05;
  }

  .order-view-phone{
    font-size:11px !important;
  }

  .order-view-item strong{
    font-size:12px !important;
  }

  .order-view-reward{
    padding:8px 10px !important;
    border-radius:13px !important;
  }

  .order-view-reward strong{
    font-size:14px !important;
  }

  .order-view-money{
    gap:6px !important;
  }

  .order-view-money > div{
    min-height:68px !important;
    padding:9px 10px !important;
    border-radius:13px !important;
  }

  .order-view-money strong{
    margin-top:5px !important;
    font-size:15px !important;
  }

  /* Tracking */
  .v119-head{
    padding:9px 10px !important;
  }

  .v119-head strong{
    font-size:14px !important;
  }

  .v119-head small{
    font-size:8px !important;
  }

  .v119-step{
    grid-template-columns:30px minmax(0,1fr) !important;
    gap:7px !important;
    padding:9px !important;
  }

  .v119-step-number{
    width:29px !important;
    height:29px !important;
    font-size:10px !important;
  }

  .v119-step-title strong{
    font-size:10px !important;
  }

  .v119-step-title span{
    font-size:8.5px !important;
  }

  .v119-detect-badge{
    min-height:24px !important;
    padding:3px 7px !important;
    font-size:7.5px !important;
  }

  .v119-input-row{
    grid-template-columns:minmax(0,1fr) 86px !important;
    gap:6px !important;
  }

  .v119-input-row input{
    min-height:42px !important;
    height:42px !important;
    padding:8px 10px !important;
    font-size:16px !important;
  }

  .v119-send-btn{
    width:86px !important;
    min-width:86px !important;
    height:40px !important;
    min-height:40px !important;
    padding:0 7px !important;
    font-size:7.5px !important;
  }

  .v119-arrived-btn{
    min-width:132px !important;
    height:40px !important;
    min-height:40px !important;
    padding:0 11px !important;
    font-size:7.5px !important;
  }

  /* Bottom order actions — compact, normal document flow */
  .order-view-actions.v121-actions{
    position:static !important;
    width:100% !important;
    margin:7px 0 0 !important;
    padding:5px !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    grid-template-areas:
      "edit pdf"
      "balance complete"
      "delete close" !important;
    gap:5px !important;
    border-radius:12px !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
  }

  .order-view-actions.v121-actions > button,
  .order-view-actions.v121-actions > [data-v121-role="balance"],
  .order-view-actions.v121-actions .v121-complete-btn{
    min-height:37px !important;
    height:37px !important;
    padding:4px 6px !important;
    border-radius:9px !important;
    font-size:7.7px !important;
  }

  .v121-complete-main{
    font-size:7.7px !important;
  }

  .v121-complete-sub{
    display:none !important;
  }

  /* Simple edit */
  .detail-dialog.edit-mode:not(.advanced-edit-mode) #detailBody{
    padding:7px 7px 12px !important;
  }

  .simple-edit-shell{
    gap:9px !important;
    padding:10px !important;
    border-radius:15px !important;
  }

  .simple-edit-head h2{
    font-size:22px !important;
  }

  .simple-edit-shell label{
    font-size:9px !important;
  }

  .simple-edit-shell input,
  .simple-edit-shell select,
  .simple-edit-shell textarea,
  .simple-readonly{
    min-height:43px !important;
    padding:8px 10px !important;
    border-radius:10px !important;
    font-size:16px !important;
  }

  .simple-edit-grid.two{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:7px !important;
  }

  /* Fix item price/qty clipping: two equal columns on phone */
  .simple-edit-item{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:6px !important;
  }

  .simple-edit-item .simple-item-name{
    grid-column:1/-1 !important;
  }

  .simple-remove-item{
    grid-column:1/-1 !important;
    min-height:34px !important;
  }

  .simple-image-box{
    padding:9px !important;
    border-radius:14px !important;
  }

  .simple-upload-picker{
    grid-template-columns:40px minmax(0,1fr) auto !important;
    gap:7px !important;
    padding:8px !important;
    border-radius:12px !important;
  }

  .simple-upload-icon{
    width:40px !important;
    height:40px !important;
    border-radius:11px !important;
    font-size:21px !important;
  }

  .simple-upload-picker strong{
    font-size:11px !important;
  }

  .simple-upload-picker small{
    font-size:8px !important;
  }

  /* Sticky but NOT fixed: occupies its own space, no overlap */
  .simple-edit-actions{
    position:sticky !important;
    left:auto !important;
    right:auto !important;
    bottom:calc(5px + env(safe-area-inset-bottom)) !important;
    z-index:20 !important;
    grid-template-columns:1.35fr .8fr .65fr !important;
    gap:5px !important;
    margin-top:6px !important;
    padding:5px !important;
    border:1px solid #EBB9DF !important;
    border-radius:12px !important;
    background:rgba(255,255,255,.96) !important;
    box-shadow:0 5px 18px rgba(0,0,0,.055);
    backdrop-filter:blur(12px);
  }

  .simple-primary-action,
  .simple-save-action,
  .simple-cancel-action{
    min-height:38px !important;
    padding:5px 6px !important;
    font-size:7.5px !important;
  }

  /* Advanced edit footer: sticky in flow instead of fixed overlay */
  .mobile-sticky-actions{
    position:sticky !important;
    left:auto !important;
    right:auto !important;
    bottom:calc(5px + env(safe-area-inset-bottom)) !important;
    z-index:20 !important;
    width:100% !important;
    margin:9px 0 0 !important;
    padding:5px !important;
    border:1px solid #EBB9DF !important;
    border-radius:12px !important;
    background:rgba(255,255,255,.96) !important;
    box-shadow:0 5px 18px rgba(0,0,0,.055);
    backdrop-filter:blur(12px);
  }
}

@media(max-width:430px){
  .main{
    padding-left:6px !important;
    padding-right:6px !important;
  }

  .panel{
    padding:10px !important;
  }

  .simple-edit-shell{
    padding:9px !important;
  }

  .simple-edit-grid.two{
    gap:6px !important;
  }

  .order-view-top{
    grid-template-columns:90px minmax(0,1fr) !important;
  }

  .order-view-image{
    width:90px !important;
    height:90px !important;
  }
}

@media(max-width:370px){
  /* very narrow phones: protect against any remaining squeeze */
  .simple-edit-grid.two{
    grid-template-columns:1fr !important;
  }

  .v119-input-row{
    grid-template-columns:minmax(0,1fr) 78px !important;
  }

  .v119-send-btn{
    width:78px !important;
    min-width:78px !important;
  }
}

/* LOFFA V1.2.5 QUICK ACTIONS + GALLERY + NOTES */

/* Give the money area enough room for two compact actions. */
@media(min-width:761px){
  .wp-order-card-main{
    grid-template-columns:
      minmax(210px,1.2fr)
      minmax(160px,.9fr)
      104px
      minmax(245px,1.1fr)
      auto !important;
    gap:16px !important;
  }
}

/* Front image is now a same-page gallery trigger. */
.wp-order-thumb.wp-gallery-trigger{
  padding:0;
  border:0;
  appearance:none;
  cursor:zoom-in;
}

.wp-order-thumb.wp-gallery-trigger:focus-visible{
  outline:3px solid rgba(24,136,239,.22);
  outline-offset:2px;
}

/* Compact note inside the existing item area. */
.wp-card-note{
  width:100%;
  max-width:260px;
  margin:7px 0 0;
  padding:6px 8px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:7px;
  align-items:start;
  border:1px solid #EBB9DF;
  border-radius:9px;
  background:#ffffff;
  color:#111111;
  text-align:left;
  cursor:pointer;
}

.wp-card-note-label{
  padding-top:1px;
  color:#e5b976;
  font-size:7px;
  font-weight:900;
  letter-spacing:.11em;
}

.wp-card-note-text{
  min-width:0;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  color:#111111;
  font-size:9px;
  font-weight:650;
  line-height:1.28;
}

.wp-card-note.expanded .wp-card-note-text{
  display:block;
  overflow:visible;
  -webkit-line-clamp:unset;
}

/* Quick actions directly below Baki. */
.wp-card-quick-actions{
  width:100%;
  margin-top:8px;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,.78fr);
  gap:6px;
}

.wp-card-quick-btn{
  min-width:0;
  min-height:33px;
  padding:5px 7px;
  border-radius:9px;
  font-size:7.5px;
  font-weight:900;
  line-height:1.1;
  letter-spacing:.025em;
  cursor:pointer;
}

.wp-card-quick-btn.balance{
  border:1px solid #e8b04c;
  background:hsla(39,75%,62%,.16);
  color:#fbc260;
}

.wp-card-quick-btn.balance:hover{
  background:hsla(40,75%,62%,.16);
}

.wp-card-quick-btn.balance.done{
  border-color:hsla(142,75%,68%,.35);
  background:#ffffff;
  color:#157c4b;
  cursor:default;
}

.wp-card-quick-btn.complete{
  border:1px solid #EBB9DF;
  background:#ffffff;
  color:#6b6b6b;
  cursor:not-allowed;
}

.wp-card-quick-btn.complete.ready{
  border-color:#52e09e;
  background:#167f4e;
  color:#fff;
  cursor:pointer;
}

.wp-card-quick-btn:disabled{
  opacity:1;
}

/* Old detail quick actions are retired. */
#detailBody #v120BalanceBtn,
#detailBody #v121CompleteBtn,
.wp-shipout-btn{
  display:none !important;
}

.order-view-actions.v121-actions{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  grid-template-areas:"edit pdf delete close" !important;
}

.order-view-actions.v121-actions > [data-v121-role="balance"],
.order-view-actions.v121-actions > [data-v121-role="complete"]{
  display:none !important;
}

/* =========================================================
   IMAGE LIGHTBOX
   ========================================================= */
.v125-lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  place-items:center;
  padding:
    calc(18px + env(safe-area-inset-top))
    18px
    calc(18px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.v125-lightbox.open{
  display:grid;
}

.v125-lightbox-stage{
  position:relative;
  width:min(1180px,94vw);
  height:min(86dvh,900px);
  display:grid;
  place-items:center;
  touch-action:none;
}

.v125-lightbox-image{
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:14px;
  background:#E55E99;
  box-shadow:0 24px 70px rgba(0,0,0,.35);
  user-select:none;
  -webkit-user-drag:none;
}

.v125-lightbox-close,
.v125-lightbox-arrow{
  position:absolute;
  z-index:2;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(20,20,20,.72);
  color:#fff;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  cursor:pointer;
}

.v125-lightbox-close{
  top:0;
  right:0;
  width:42px;
  height:42px;
  border-radius:50%;
  font-size:27px;
  line-height:1;
}

.v125-lightbox-arrow{
  top:50%;
  width:44px;
  height:52px;
  border-radius:14px;
  transform:translateY(-50%);
  font-size:34px;
  line-height:1;
}

.v125-lightbox-arrow.prev{
  left:0;
}

.v125-lightbox-arrow.next{
  right:0;
}

.v125-lightbox-counter{
  position:absolute;
  left:50%;
  bottom:8px;
  transform:translateX(-50%);
  min-width:50px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(15,15,15,.72);
  color:#fff;
  font-size:10px;
  font-weight:800;
  text-align:center;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

#detailBody .attachment-preview img,
#detailBody .simple-product-image img{
  cursor:zoom-in;
}

/* =========================================================
   MOBILE
   ========================================================= */
@media(max-width:760px){
  .wp-card-note{
    max-width:100%;
    margin-top:6px;
    padding:5px 7px;
    gap:6px;
    border-radius:8px;
  }

  .wp-card-note-label{
    font-size:6.5px;
  }

  .wp-card-note-text{
    font-size:8px;
  }

  .wp-card-quick-actions{
    margin-top:7px;
    gap:5px;
  }

  .wp-card-quick-btn{
    min-height:32px;
    padding:4px 5px;
    border-radius:8px;
    font-size:7px;
  }

  .order-view-actions.v121-actions{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    grid-template-areas:
      "edit pdf"
      "delete close" !important;
  }

  .v125-lightbox{
    padding:
      calc(10px + env(safe-area-inset-top))
      8px
      calc(10px + env(safe-area-inset-bottom));
  }

  .v125-lightbox-stage{
    width:100%;
    height:88dvh;
  }

  .v125-lightbox-image{
    max-width:96vw;
    max-height:82dvh;
    border-radius:11px;
  }

  .v125-lightbox-close{
    top:4px;
    right:6px;
    width:38px;
    height:38px;
    font-size:24px;
  }

  .v125-lightbox-arrow{
    width:38px;
    height:46px;
    border-radius:12px;
    font-size:30px;
  }

  .v125-lightbox-arrow.prev{
    left:5px;
  }

  .v125-lightbox-arrow.next{
    right:5px;
  }

  .v125-lightbox-counter{
    bottom:6px;
    font-size:9px;
  }
}

@media(max-width:430px){
  .wp-card-quick-actions{
    grid-template-columns:minmax(0,1fr) minmax(0,.72fr);
  }

  .wp-card-quick-btn{
    font-size:6.7px;
  }
}

/* LOFFA V1.2.8 BADGES + MODAL SCROLL */

/* =========================================================
   A. REMOVE FRONT CARD STATUS BADGES
   ========================================================= */

/* Remove Partially Paid / Shipped / Not Ready pills from front order cards */
.wp-order-card .wp-badge-block{
  display:none !important;
}

/* Desktop: reclaim the old badge column */
@media(min-width:761px){
  .wp-order-card-main{
    grid-template-columns:
      minmax(210px,1.2fr)
      minmax(160px,.9fr)
      104px
      minmax(245px,1.1fr) !important;
    gap:16px !important;
  }
}

/* Mobile: TOTAL / BAKI + quick actions take full width */
@media(max-width:760px){
  .wp-order-card-main{
    grid-template-columns:minmax(0,1fr) 84px !important;
    grid-template-areas:
      "customer thumb"
      "item thumb"
      "money money" !important;
    gap:9px 10px !important;
  }

  .wp-money-block{
    grid-area:money !important;
    width:100%;
  }

  .wp-card-quick-actions{
    width:100%;
    max-width:100%;
  }
}

@media(max-width:430px){
  .wp-order-card-main{
    grid-template-columns:minmax(0,1fr) 76px !important;
  }
}

/* =========================================================
   B. MODAL / SCROLL OWNERSHIP
   ========================================================= */

/* Background page must not scroll while Order Detail/Edit is open */
html.v128-dialog-open,
body.v128-dialog-open{
  overflow:hidden !important;
  overscroll-behavior:none !important;
}

/* Dialog itself becomes the foreground viewport */
.detail-dialog[open]{
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

.detail-dialog[open] .dialog-head{
  flex:0 0 auto !important;
}

/* Only foreground content scrolls */
.detail-dialog[open] #detailBody{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior-y:contain !important;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  scrollbar-gutter:stable;
}

/* Remove floating/fixed/sticky footer behavior */
.detail-dialog .order-view-actions.v121-actions,
.detail-dialog .simple-edit-actions,
.detail-dialog .mobile-sticky-actions{
  position:static !important;
  inset:auto !important;
  top:auto !important;
  right:auto !important;
  bottom:auto !important;
  left:auto !important;
  transform:none !important;
  z-index:auto !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  box-shadow:none !important;
}

/* Order detail footer */
.detail-dialog .order-view-actions.v121-actions{
  width:100% !important;
  margin:8px 0 0 !important;
  padding:5px !important;
  border:1px solid #EBB9DF !important;
  border-radius:12px !important;
  background:#ffffff !important;
}

/* Edit/Advanced action bars live in normal content flow */
.detail-dialog .simple-edit-actions,
.detail-dialog .mobile-sticky-actions{
  width:100% !important;
  margin:8px 0 0 !important;
  padding:5px !important;
  border:1px solid #EBB9DF !important;
  border-radius:12px !important;
  background:#ffffff !important;
}

/* No giant fake bottom space needed */
.detail-dialog:not(.edit-mode) #detailBody,
.detail-dialog.edit-mode:not(.advanced-edit-mode) #detailBody,
.detail-dialog.edit-mode.advanced-edit-mode #detailBody{
  padding-bottom:12px !important;
}

@media(max-width:760px){
  .detail-dialog[open]{
    width:100vw !important;
    max-width:100vw !important;
    height:100dvh !important;
    max-height:100dvh !important;
    margin:0 !important;
    border-radius:0 !important;
  }

  .detail-dialog[open] #detailBody{
    width:100% !important;
    max-width:100% !important;
    padding:8px 7px calc(12px + env(safe-area-inset-bottom)) !important;
  }

  .detail-dialog .order-view-actions.v121-actions{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    grid-template-areas:
      "edit pdf"
      "delete close" !important;
    gap:5px !important;
  }

  .detail-dialog .order-view-actions.v121-actions > button{
    min-height:37px !important;
    height:37px !important;
    padding:4px 6px !important;
    border-radius:9px !important;
    font-size:7.7px !important;
  }

  .detail-dialog .simple-edit-actions{
    grid-template-columns:1.35fr .8fr .65fr !important;
    gap:5px !important;
  }

  .detail-dialog .simple-primary-action,
  .detail-dialog .simple-save-action,
  .detail-dialog .simple-cancel-action,
  .detail-dialog .mobile-sticky-actions .btn{
    min-height:38px !important;
    height:auto !important;
    padding:6px 7px !important;
    border-radius:9px !important;
    font-size:7.5px !important;
  }
}

/* LOFFA V1.2.9 ORDER ACTIONS IN FLOW */

/*
  IMPORTANT:
  The original mobile CSS uses .order-view-actions { position:fixed }.
  Target the BASE class directly, not only .v121-actions.
  This keeps EDIT / PDF / DELETE / TUTUP physically inside Order Detail.
*/
.detail-dialog .order-view-actions{
  position:static !important;
  inset:auto !important;
  top:auto !important;
  right:auto !important;
  bottom:auto !important;
  left:auto !important;
  z-index:auto !important;

  width:100% !important;
  margin:8px 0 0 !important;
  padding:5px !important;

  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:5px !important;

  border:1px solid #EBB9DF !important;
  border-radius:12px !important;
  background:#ffffff !important;

  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  transform:none !important;
}

/* Old card-only actions stay removed from Order Detail */
.detail-dialog .order-view-actions #v120BalanceBtn,
.detail-dialog .order-view-actions #v121CompleteBtn,
.detail-dialog .order-view-actions [data-v121-role="balance"],
.detail-dialog .order-view-actions [data-v121-role="complete"]{
  display:none !important;
}

/* Remaining four buttons: simple compact row */
.detail-dialog .order-view-actions > button{
  min-width:0 !important;
  min-height:39px !important;
  height:39px !important;
  padding:5px 7px !important;
  border-radius:9px !important;
  font-size:8px !important;
  line-height:1.05 !important;
}

/* No floating footer = no large fake space below tracking */
.detail-dialog:not(.edit-mode) #detailBody{
  padding-bottom:12px !important;
}

/* Ensure the foreground Order Detail owns vertical scrolling */
.detail-dialog[open]{
  overflow:hidden !important;
}

.detail-dialog[open] #detailBody{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior-y:contain !important;
  -webkit-overflow-scrolling:touch;
}

@media(max-width:760px){
  .detail-dialog .order-view-actions{
    position:static !important;
    left:auto !important;
    right:auto !important;
    bottom:auto !important;

    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:5px !important;

    margin:8px 0 2px !important;
    padding:5px !important;
  }

  .detail-dialog .order-view-actions > button{
    min-height:38px !important;
    height:38px !important;
    padding:4px 5px !important;
    font-size:7.5px !important;
  }

  .detail-dialog[open] #detailBody{
    padding-bottom:calc(12px + env(safe-area-inset-bottom)) !important;
  }
}

@media(max-width:390px){
  .detail-dialog .order-view-actions{
    gap:4px !important;
    padding:4px !important;
  }

  .detail-dialog .order-view-actions > button{
    min-height:36px !important;
    height:36px !important;
    padding:4px !important;
    font-size:7px !important;
  }
}

/* =========================================================
   LOFFA V1.3.2 — AMBIL ORDER COMPACT + iOS DIALOG FIX
   Presentation only. Existing order/payment/attachment logic is reused.
   ========================================================= */

#page-neworder{overflow-x:clip}
.new-order-form,.new-order-form *{min-width:0}
.new-order-form{
  width:min(100%,880px);margin:0 auto 24px;padding:17px 12px 20px !important;
  overflow:hidden;border:1px solid #EBB9DF;border-radius:24px !important;
  background:#ffffff;color:#111111;box-shadow:0 22px 60px rgba(24,28,32,.07);
}
.new-order-head,.new-order-quick-head,.new-order-label-row{display:flex;align-items:center;justify-content:space-between}
.new-order-head{gap:16px;margin-bottom:13px}
.new-order-eyebrow{margin-bottom:7px;color:#6b6b6b;font-size:9px;line-height:1;font-weight:900;letter-spacing:.25em}
.new-order-head h2{margin:0;color:#111111;font-size:26px;line-height:1;font-weight:900;letter-spacing:-.04em}
.new-order-admin-badge{
  flex:0 0 auto;padding:10px 12px;border-radius:999px;background:#ffffff;color:#6b6b6b;
  font-size:8px;line-height:1;font-weight:900;letter-spacing:.16em;
}

.new-order-quick{
  margin-bottom:15px;padding:11px;border:1px solid hsla(206,75%,68%,.35);border-radius:21px;
  background:linear-gradient(145deg,#f8fcff,#edf7ff);box-shadow:0 14px 35px rgba(32,116,184,.08);
}
.new-order-quick-head{align-items:flex-start;gap:12px;margin:0 3px 8px}
.new-order-quick-head strong{color:#7ebddd;font-size:9px;font-weight:900;letter-spacing:.18em}
.new-order-quick-head span{max-width:60%;color:#6b6b6b;font-size:8px;font-weight:700;text-align:right;overflow-wrap:anywhere}
.new-order-quick-row{display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:7px;align-items:stretch}
.new-order-quick-row textarea{
  min-height:46px !important;height:46px;margin:0 !important;padding:10px 11px !important;
  border-radius:14px !important;font-size:15px !important;resize:none;
}
.new-order-auto-btn{
  min-height:46px;border:0;border-radius:14px;background:linear-gradient(180deg,#3498f5,#147be6);
  color:#fff;font-size:10px;font-weight:900;cursor:pointer;box-shadow:0 8px 16px rgba(20,123,230,.16);
}
.new-order-quick .form-msg{min-height:0;margin:7px 3px 0;font-size:11px}
.new-order-quick .form-msg:empty{display:none}
.new-order-grid{display:grid;gap:3px 8px}
.new-order-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.new-order-form label,
.new-order-section-label{
  gap:6px !important;margin:6px 0 !important;color:#111111 !important;font-size:9px !important;
  line-height:1.15;font-weight:900 !important;letter-spacing:.13em !important;text-transform:uppercase;
}
.new-order-form label small{
  margin-top:-2px;color:#6b6b6b;font-size:8px;line-height:1.3;
  font-weight:500;letter-spacing:0;text-transform:none;
}
.new-order-form input:not([type="hidden"]):not([type="file"]),
.new-order-form textarea,
.new-order-form select{
  min-height:46px;padding:10px 11px;border:1px solid #EBB9DF;border-radius:14px;
  background:#ffffff;color:#111111;font-size:15px;line-height:1.25;font-weight:500;box-shadow:none;
}
.new-order-form textarea{resize:vertical}
.new-order-form input::placeholder,
.new-order-form textarea::placeholder{font-size:12px;color:#6b6b6b;opacity:1}
.new-order-label-row{gap:6px}
.new-order-label-row button{
  max-width:48%;margin:0;padding:0;border:0;background:transparent;color:#67adf3;
  font-size:7px;line-height:1.2;font-weight:850;text-align:right;cursor:pointer;overflow-wrap:anywhere;
}
.new-order-main-item label{margin-top:7px !important}
.price-payment-grid{align-items:end}
.new-order-price-card{
  padding:9px !important;border:1px solid hsla(201,75%,68%,.35);border-radius:17px;
  background:hsla(203,75%,62%,.16);color:#80c0db !important;
}
.new-order-price-card input{min-height:46px !important;font-size:15px !important;font-weight:700 !important}
.new-order-custom-payment{width:calc(50% - 4px);margin-left:auto !important}
.new-order-notes{min-height:68px !important}
.new-order-upload-section{margin-top:13px}
.new-order-section-label{margin-bottom:9px !important}

.new-order-uploader{
  padding:11px;border:1px solid hsla(205,75%,68%,.35);border-radius:21px;
  background:linear-gradient(145deg,#f9fcff,#eef7fe);box-shadow:0 14px 34px rgba(41,104,150,.07);
}
.new-order-form .new-order-upload-picker{
  display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:9px !important;
  margin:0 !important;padding:10px !important;border:1px solid #EBB9DF;border-radius:16px;
  background:#ffffff;cursor:pointer;box-shadow:0 10px 24px rgba(30,48,62,.06);
  text-transform:none !important;letter-spacing:0 !important;
}
.new-order-upload-icon{
  position:relative;display:grid;place-items:center;width:42px;height:40px;border-radius:12px;
  background:linear-gradient(180deg,#35a2ff,#147be6);color:#fff;font-size:18px;font-weight:700;
}
.new-order-upload-icon::before{
  content:"";position:absolute;top:-7px;left:6px;width:26px;height:10px;
  border-radius:8px 8px 3px 3px;background:#35a2ff;
}
.new-order-upload-copy{display:flex;flex-direction:column;gap:5px}
.new-order-upload-copy strong{color:#111111;font-size:12px;font-weight:850;overflow-wrap:anywhere}
.new-order-upload-copy small{color:#6b6b6b !important;font-size:8px !important;font-weight:700 !important}
.new-order-upload-picker b{
  padding:9px 12px;border-radius:999px;background:#147be6;color:#fff;font-size:9px;font-weight:900;
}
.new-order-file-input{display:none}
.new-order-image-previews{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}
.new-order-image-preview{
  position:relative;aspect-ratio:1;overflow:hidden;border:1px solid #EBB9DF;border-radius:14px;background:#ffffff;
}
.new-order-image-preview img{display:block;width:100%;height:100%;object-fit:cover}
.new-order-image-preview span{
  position:absolute;left:5px;bottom:5px;padding:4px 6px;border-radius:999px;
  background:rgba(17,17,17,.78);color:#fff;font-size:7px;font-weight:900;
}
.new-order-image-preview button{
  position:absolute;top:5px;right:5px;display:grid;place-items:center;width:25px;height:25px;
  padding:0;border:0;border-radius:50%;background:rgba(17,17,17,.82);
  color:#fff;font-size:18px;line-height:1;cursor:pointer;
}
.new-order-image-count{margin:14px 3px 0;color:#111111;font-size:10px;font-weight:900;letter-spacing:.04em}
.new-order-upload-help{
  display:block;margin:9px 3px 0;color:#6b6b6b;font-size:9px;line-height:1.45;
}
.new-order-summary{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:18px;padding:12px 10px;
  border:1px solid #EBB9DF;border-radius:18px;background:linear-gradient(180deg,#f3f3f3,#ededed);
}
.new-order-summary div{display:flex;flex-direction:column;gap:8px}
.new-order-summary span{
  color:#6b6b6b;font-size:7px;line-height:1.15;font-weight:900;letter-spacing:.07em;overflow-wrap:anywhere;
}
.new-order-summary strong{
  color:#111111;font-size:11px;line-height:1.1;font-weight:900;overflow-wrap:anywhere;
}
.new-order-message{min-height:0;margin:8px 2px 0}
.new-order-message:empty{display:none}
.new-order-actions{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%;margin-top:10px;
}
.new-order-submit{
  min-height:46px;padding:8px 5px;border:1px solid rgba(229,94,153,.85);border-radius:14px;
  background:#E55E99;color:#fff;font-size:9px;font-weight:900;letter-spacing:.055em;cursor:pointer;
}
.new-order-submit:disabled{opacity:.55;cursor:wait}

@media(min-width:721px){
  .new-order-form{padding:24px !important;border-radius:28px !important}
  .new-order-head{margin-bottom:16px}
  .new-order-head h2{font-size:31px}
  .new-order-eyebrow{font-size:11px}
  .new-order-admin-badge{padding:12px 16px;font-size:10px}
  .new-order-quick{padding:15px;border-radius:24px}
  .new-order-quick-head{align-items:center;margin-bottom:12px}
  .new-order-quick-head strong{font-size:11px}
  .new-order-quick-head span{max-width:none;font-size:10px;text-align:left}
  .new-order-quick-row{grid-template-columns:minmax(0,1fr) 142px;gap:12px}
  .new-order-quick-row textarea{min-height:52px !important;height:52px;padding:12px 14px !important;border-radius:16px !important;font-size:15px !important}
  .new-order-auto-btn{min-height:52px;border-radius:16px;font-size:11px}
  .new-order-grid{gap:10px 18px}
  .new-order-form label,.new-order-section-label{gap:8px !important;margin:8px 0 !important;font-size:11px !important}
  .new-order-form label small{font-size:10px}
  .new-order-form input:not([type="hidden"]):not([type="file"]),.new-order-form textarea,.new-order-form select{min-height:50px;padding:11px 14px;border-radius:16px;font-size:15px}
  .new-order-form input::placeholder,.new-order-form textarea::placeholder{font-size:13px}
  .new-order-label-row button{font-size:9px}
  .new-order-price-card{padding:13px !important;border-radius:21px}
  .new-order-price-card input{min-height:50px !important;font-size:15px !important}
  .new-order-custom-payment{width:calc(50% - 9px)}
  .new-order-notes{min-height:90px !important}
  .new-order-upload-section{margin-top:18px}
  .new-order-uploader{padding:15px;border-radius:24px}
  .new-order-form .new-order-upload-picker{grid-template-columns:56px minmax(0,1fr) auto;gap:13px !important;padding:14px !important;border-radius:19px}
  .new-order-upload-icon{width:54px;height:50px;border-radius:14px;font-size:22px}
  .new-order-upload-icon::before{top:-8px;left:7px;width:30px;height:12px}
  .new-order-upload-copy strong{font-size:14px}
  .new-order-upload-copy small{font-size:10px !important}
  .new-order-upload-picker b{padding:11px 18px;font-size:10px}
  .new-order-summary{gap:8px;padding:16px;border-radius:22px}
  .new-order-summary span{font-size:9px;letter-spacing:.12em}
  .new-order-summary strong{font-size:14px}
  .new-order-actions{gap:10px;margin-top:14px}
  .new-order-submit{min-height:50px;padding:10px;border-radius:16px;font-size:10px}
}

@media(max-width:420px){
  .new-order-form{padding-left:9px !important;padding-right:9px !important}
  .new-order-head h2{font-size:24px}
  .new-order-grid.two{column-gap:6px}
  .new-order-form .new-order-upload-picker{grid-template-columns:40px minmax(0,1fr) auto;gap:7px !important;padding:9px !important}
  .new-order-upload-icon{width:38px;height:38px}
  .new-order-upload-copy strong{font-size:11px}
  .new-order-upload-picker b{padding:9px 11px;font-size:8px}
  .new-order-summary{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}
  .new-order-summary strong{font-size:11px}
  .new-order-submit{font-size:8px}
}

/* LOFFA V1.3.4 — monochrome Dashboard summary. */
#summaryCards.dashboard-summary{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  width:100%;
  margin-bottom:18px;
}

.dashboard-metric{
  min-width:0;
  min-height:104px;
  padding:16px 17px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border:1px solid #EBB9DF;
  border-radius:16px;
  background:#ffffff;
  box-shadow:0 3px 14px rgba(28,28,26,.025);
}

.dashboard-metric-label{
  color:#6b6b6b;
  font-size:9px;
  line-height:1.2;
  font-weight:850;
  letter-spacing:.13em;
}

.dashboard-metric-value{
  margin-top:9px;
  color:#111111;
  font-size:clamp(18px,2vw,27px);
  line-height:1.05;
  font-weight:850;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.035em;
  overflow-wrap:anywhere;
}

.dashboard-metric-period{
  margin-top:8px;
  color:#6b6b6b;
  font-size:8px;
  line-height:1.2;
  font-weight:700;
  letter-spacing:.08em;
}

@media(max-width:980px){
  #summaryCards.dashboard-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:760px){
  #summaryCards.dashboard-summary{gap:7px;margin-bottom:9px}
  .dashboard-metric{min-height:88px;padding:12px;border-radius:14px}
  .dashboard-metric-label{font-size:8px;letter-spacing:.1em}
  .dashboard-metric-value{margin-top:7px;font-size:clamp(16px,5vw,20px)}
  .dashboard-metric-period{margin-top:6px;font-size:7px}
}

@media(max-width:340px){
  #summaryCards.dashboard-summary{grid-template-columns:1fr}
}

/* LOFFA V1.3.5 — reliable sticky header and page footer. */
.portal-footer{
  width:100%;
  max-width:1180px;
  margin:28px auto 0;
  padding:16px 10px 2px;
  border-top:1px solid #EBB9DF;
  color:#6b6b6b;
  font-size:8px;
  line-height:1.4;
  font-weight:800;
  letter-spacing:.12em;
  text-align:center;
}

@media(max-width:760px){
  .topbar{
    position:sticky !important;
    top:0 !important;
    z-index:65 !important;
  }

  .portal-footer{
    margin-top:20px;
    padding-top:13px;
    padding-bottom:calc(2px + env(safe-area-inset-bottom));
    font-size:7px;
  }
}

.catalog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px}
.catalog-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:12px;display:flex;flex-direction:column;gap:6px}
.imp-paint-active{user-select:none;-webkit-user-select:none}
.imp-paint-active .catalog-card{touch-action:none}
.catalog-thumb{aspect-ratio:1;border-radius:10px;overflow:hidden;background:#ffffff;display:flex;align-items:center;justify-content:center}
.catalog-thumb img{width:100%;height:100%;object-fit:cover}
.catalog-noimg{color:var(--muted);font-size:11px}
.catalog-card-name{font-weight:700;overflow-wrap:anywhere}
.catalog-card-sub{margin-top:-4px}
.catalog-card label.small{margin:0;font-size:11px;color:var(--muted)}
.catalog-card label.small input{width:100%;margin-top:2px}
.catalog-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;max-height:50vh;overflow:auto;margin:10px 0}
.catalog-pick-row{display:flex;flex-direction:column;gap:4px;border:1px solid var(--line);border-radius:10px;padding:8px;font-size:12px;cursor:pointer}
.catalog-pick-row img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:6px}
.catalog-select{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}
.catalog-select input[type=checkbox]{width:16px;height:16px;min-height:auto;padding:0;border-radius:4px;accent-color:#E55E99;flex:none}
.imp-card-toprow{display:flex;align-items:center;justify-content:space-between;gap:6px}
.imp-prod-exclude{flex:none;width:26px;height:26px;font-size:13px;line-height:1;border:1px solid var(--line);border-radius:8px;background:none;cursor:pointer}
.imp-prod-exclude:hover{background:#ffffff;border-color:hsla(0,75%,68%,.35)}
.imp-prod-restore-one{flex:none;padding:4px 10px;font-size:11px}
#catalogAddBtn:disabled{opacity:.5;cursor:not-allowed}
.cat-prod-price.flash-saved,.cat-prod-supplier-price.flash-saved,.cat-prod-size.flash-saved{border-color:#40f279;transition:border-color .3s ease}
.catalog-card:has(.imp-prod-pick:disabled){opacity:.55}
.cat-save-status{font-size:11px;color:#157c4b;height:14px;opacity:0;transition:opacity .4s ease}
.cat-save-status.show{opacity:1}
.catalog-floating-bar{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:40;display:flex;align-items:center;gap:10px;background:#ffffff;border:1px solid var(--line);border-radius:14px;box-shadow:0 12px 40px #0003;padding:10px 14px}
.catalog-delete-overlay{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;background:#0005}
.catalog-delete-overlay-box{background:#ffffff;border-radius:14px;padding:22px 30px;display:flex;align-items:center;gap:14px;box-shadow:0 24px 60px #0004;font-weight:700}
.catalog-delete-overlay-box .imp-spinner{width:22px;height:22px;border-width:3px}
.ai-tag-thumbs{display:flex;gap:4px;flex-wrap:wrap}
.ai-tag-thumbs img{width:56px;height:56px;object-fit:cover;border-radius:8px;background:#ffffff}
.ai-tag-merge-badge{font-size:11px;font-weight:700}
.ai-tag-merge-badge.merge{color:#75e695}
.ai-tag-merge-badge.new{color:var(--muted)}
.ai-tag-collision-warning{font-size:11px;font-weight:700;color:var(--danger);margin-top:4px}
.ai-tag-combo{position:relative;display:block}
.ai-tag-combo-list{display:block;position:absolute;top:100%;left:0;right:0;z-index:30;margin-top:4px;background:var(--card);border:1px solid var(--line);border-radius:10px;max-height:220px;overflow:auto;box-shadow:0 8px 24px rgba(0,0,0,.12);font-weight:400;text-align:left}
.ai-tag-combo-opt{display:block;padding:10px 12px;font-size:13px;cursor:pointer;border-bottom:1px solid #EBB9DF}
.ai-tag-combo-opt:last-child{border-bottom:0}
.ai-tag-combo-opt:hover{background:var(--bg)}
.ai-tag-combo-opt.selected{background:#ffffff}
.ai-tag-combo-opt.create{font-weight:700}
.ai-tag-combo-opt.none{cursor:default;color:var(--muted)}
.cover-preview{width:160px;aspect-ratio:1;border-radius:10px;overflow:hidden;background:#ffffff;margin:10px 0}
.cover-preview img{width:100%;height:100%;object-fit:cover}
.imp-progress-wrap{margin-bottom:16px}
.imp-progress-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.imp-progress-head #impEtaText{margin-left:auto}
.imp-spinner{width:16px;height:16px;border:2px solid #EBB9DF;border-top-color:rgba(229,94,153,.85);border-radius:50%;animation:imp-spin .7s linear infinite;flex:none}
@keyframes imp-spin{to{transform:rotate(360deg)}}
.imp-progress-bar{height:8px;border-radius:999px;background:rgba(229,94,153,.07);overflow:hidden}
.imp-progress-fill{height:100%;background:#E55E99;transition:width .3s ease}
.imp-results-list{display:flex;flex-direction:column;gap:6px;max-height:50vh;overflow:auto}
.imp-result-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;font-size:13px}
.imp-result-row.warn{border-color:#e8b64a;background:#ffffff}
.imp-result-id{font-weight:700;overflow-wrap:anywhere}
.imp-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);margin-bottom:4px}
.imp-tab-btn{background:none;border:none;border-bottom:2px solid transparent;padding:10px 4px;font-weight:700;font-size:13px;color:var(--muted);cursor:pointer}
.imp-tab-btn.active{color:#111111;border-bottom-color:rgba(229,94,153,.85)}
.imp-search-row{margin:12px 0;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.imp-search-row input{max-width:360px;flex:1 1 240px}
.imp-quicksel-row{margin:0 0 10px;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.imp-quicksel-label{font-size:11px;color:var(--muted);margin-right:2px}
.imp-quicksel-presets{display:flex;gap:4px}
.imp-quicksel-btn{border:1px solid var(--line);background:none;border-radius:8px;padding:4px 10px;font-size:12px;color:var(--text);cursor:pointer}
.imp-quicksel-btn:hover{background:var(--bg)}
.imp-quicksel-btn:disabled,.imp-quicksel-clear:disabled{opacity:.5;cursor:default}
.imp-quicksel-custom-input{width:72px;border:1px solid var(--line);border-radius:8px;padding:4px 8px;font-size:12px}
.imp-quicksel-go{border:1px solid var(--line);background:none;border-radius:8px;padding:4px 10px;font-size:12px;color:var(--text);cursor:pointer}
.imp-quicksel-go:hover{background:var(--bg)}
.imp-quicksel-go:disabled,.imp-quicksel-custom-input:disabled{opacity:.5;cursor:default}
.imp-quicksel-clear{border:none;background:none;color:var(--muted);font-size:12px;text-decoration:underline;cursor:pointer;padding:4px 2px;margin-left:2px}
.imp-quicksel-clear:hover{color:var(--text)}
.imp-quicksel-status{margin:0 0 8px}
.imp-filter-panel{border:1px solid var(--line);border-radius:12px;padding:14px;margin:0 0 12px;display:flex;flex-direction:column;gap:12px}
.imp-filter-presets{display:flex;flex-wrap:wrap;gap:8px}
.imp-filter-range{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.imp-filter-range label{margin:0}
.imp-filter-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:999px;padding:6px 12px;font-size:12px;margin:0 0 12px;background:#ffffff}
.imp-filter-chip button{border:none;background:none;cursor:pointer;font-size:12px;color:var(--muted);padding:0}
.imp-load-sentinel{height:1px}
.imp-all-loaded{text-align:center;margin-top:12px}
.imp-new-products-notice{margin:0 0 12px}
.imp-new-products-notice .btn{border-color:#56dc7c;color:#75e695;font-weight:700}
#impLoadSpinner{margin:0}
.imp-saved-list{display:flex;flex-direction:column;gap:6px;margin-bottom:16px;max-height:220px;overflow:auto}
.imp-saved-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.imp-saved-row:hover{background:#ffffff}
.imp-saved-label{font-weight:700;flex:none}
.imp-saved-url{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.imp-saved-del{flex:none;width:24px;height:24px;font-size:12px;line-height:1}

/* ===== GLASS THEME v2 (loffa reference) 2026-08-19 — colors/surfaces only ===== */
html,body{background-color:#FFF7FB;background-image:radial-gradient(circle at 30% 50%,rgba(229,94,153,.10) 0%,transparent 60%),radial-gradient(circle at 80% 80%,rgba(205,180,219,.16) 0%,transparent 50%);background-attachment:fixed;color:#111111}
.login-wrap{background:transparent}
.sidebar{background:#ffffff;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border-right:1px solid rgba(255,255,255,.06)}
.topbar{background:rgba(255,255,255,.94)!important;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}
.card,.panel,.list-card,.followup,.tracking-stage,.attachment-card,.subpanel,.finance-summary,.finance-item-row{background:#ffffff!important;border:1px solid #EBB9DF}
.detail-dialog,.dialog-head{background:rgba(255,255,255,.98)}
.detail-dialog{-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);border:1px solid #EBB9DF}
.mobile-sticky-actions{background:rgba(255,255,255,.98);border-top-color:#EBB9DF}
.btn.primary,.btn.dark,.owner-btn{box-shadow:0 0 20px rgba(229,94,153,.35)}
.brand,.side-brand,.login-card h1{background:linear-gradient(to right,#E55E99,#A64D79);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}

/* ============ Display Product tab ============ */
.dp-upload{ padding:14px 16px; border:1px solid var(--border,#FFF0F6); border-radius:12px; margin-bottom:16px; background:var(--surface,rgba(229,94,153,.05)); }
.dp-upload h3{ margin:0 0 10px; font-size:15px; }
.dp-upload-row{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.dp-input{ padding:8px 10px; border-radius:8px; border:1px solid var(--border,#FFF0F6); background:var(--surface,rgba(229,94,153,.06)); color:inherit; font-size:13px; max-width:100%; }
#dpStatus{ margin-top:8px; min-height:16px; }
.dp-brands{ display:flex; flex-direction:column; gap:10px; }
.dp-brand{ border:1px solid var(--border,#FFF0F6); border-radius:12px; overflow:hidden; background:var(--surface,rgba(229,94,153,.05)); }
.dp-brand-head{ display:flex; align-items:center; gap:10px; padding:12px 14px; font-weight:700; letter-spacing:0.04em; background:rgba(229,94,153,.06); }
.dp-brand-name{ font-size:15px; }
.dp-tags{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; padding:8px 12px 14px 34px; }
@media (max-width:640px){ .dp-tags{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
.dp-tag{ min-width:0; }
.dp-tag .dp-tag-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dp-tag{ display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:8px; border:1px solid var(--border,#FFF0F6); background:var(--surface,rgba(229,94,153,.05)); font-size:13px; }
.dp-tag-name{ font-weight:500; }
.dp-handle{ cursor:grab; touch-action:none; user-select:none; color:var(--muted,#8a8a8a); font-size:16px; line-height:1; padding:2px 6px; }
.dp-handle:active{ cursor:grabbing; }
/* Brand accordion (collapse/expand) */
.dp-brand-head{ cursor:pointer; }
.dp-brand-head .dp-handle{ cursor:grab; }
.dp-brand-chev{ margin-left:auto; font-size:12px; color:var(--muted,#8a8a8a); transition:transform .25s ease; }
.dp-brand.collapsed .dp-brand-chev{ transform:rotate(-90deg); }
.dp-tags{ overflow:hidden; transition:max-height .28s ease, padding .28s ease; }
.dp-brand.collapsed .dp-tags{ max-height:0; padding-top:0; padding-bottom:0; }
/* Brand accordion (collapse/expand) */
.dp-brand-head{ cursor:pointer; }
.dp-brand-head .dp-handle{ cursor:grab; }
.dp-brand-chev{ margin-left:auto; font-size:12px; color:var(--muted,#8a8a8a); transition:transform .25s ease; }
.dp-brand.collapsed .dp-brand-chev{ transform:rotate(-90deg); }
.dp-tags{ overflow:hidden; transition:max-height .28s ease, padding .28s ease; }
.dp-brand.collapsed .dp-tags{ max-height:0; padding-top:0; padding-bottom:0; }
.dp-handle-hint{ font-weight:700; }
.sortable-ghost{ opacity:0.4; }
.sortable-chosen{ outline:1px solid var(--accent,#E55E99); }

/* Display Product — curated ALL-view list */
.dp-section-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:6px 0 10px; }
.dp-section-head h3{ margin:0; font-size:15px; }
.dp-av-list{ display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.dp-av-row{ display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px; border:1px solid var(--border,#FFF0F6); background:var(--surface,rgba(229,94,153,.05)); }
.dp-av-label{ flex:1; min-width:0; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dp-av-remove{ background:none; border:none; color:var(--muted,#8a8a8a); cursor:pointer; font-size:14px; padding:2px 8px; border-radius:6px; }
.dp-av-remove:hover{ color:#c62828; background:rgba(255,80,80,0.1); }
.dp-av-picker{ padding:12px; border:1px solid var(--border,#FFF0F6); border-radius:10px; background:var(--surface,rgba(229,94,153,.05)); margin-bottom:12px; }
.dp-av-results{ max-height:300px; overflow-y:auto; display:flex; flex-direction:column; gap:4px; }
.dp-av-opt{ padding:8px 10px; border-radius:7px; font-size:13px; cursor:pointer; border:1px solid transparent; }
.dp-av-opt:hover{ background:rgba(229,94,153,0.12); border-color:var(--border,#FFF0F6); }


/* ---- Import Jobs drawer (background queue monitor) ---- */
.jobs-drawer{position:fixed;top:0;right:0;height:100vh;width:min(380px,92vw);z-index:60;
  background:var(--card);border-left:1px solid var(--line);box-shadow:-10px 0 34px rgba(0,0,0,.38);
  display:flex;flex-direction:column;transform:translateX(0);transition:transform .25s ease}
.jobs-drawer.hidden{transform:translateX(106%);pointer-events:none}
.jobs-drawer.minimized{top:auto;bottom:16px;right:16px;height:auto;width:auto;max-width:260px;
  border-radius:16px;border:1px solid var(--line);box-shadow:0 10px 30px rgba(0,0,0,.4)}
.jobs-drawer.minimized .jobs-drawer-list{display:none}
.jobs-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:12px 14px;border-bottom:1px solid var(--line)}
.jobs-drawer-actions{display:flex;gap:6px}
.jobs-drawer-summary{padding:10px 14px;font-size:12px;border-bottom:1px solid var(--line);color:var(--muted)}
.jobs-drawer-list{flex:1;overflow:auto;padding:10px 12px;display:flex;flex-direction:column;gap:10px}
.job-card{border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:rgba(255,255,255,.02)}
.job-card-top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.job-title{font-weight:700;font-size:13px;overflow-wrap:anywhere}
.job-sub{color:var(--muted);font-size:11px;margin-top:2px;overflow-wrap:anywhere}
.job-badge{font-size:10px;font-weight:800;padding:2px 8px;border-radius:999px;white-space:nowrap;
  text-transform:uppercase;letter-spacing:.03em;flex:none}
.job-badge.queued,.job-badge.cancelled{background:rgba(148,163,184,.15);color:#94a3b8;border:1px solid rgba(148,163,184,.35)}
.job-badge.preparing,.job-badge.running{background:rgba(229,94,153,.15);color:#E55E99;border:1px solid rgba(229,94,153,.4)}
.job-badge.completed{background:rgba(34,197,94,.15);color:#157c4b;border:1px solid rgba(34,197,94,.4)}
.job-badge.completed_with_errors{background:rgba(245,158,11,.15);color:#fbbf24;border:1px solid rgba(245,158,11,.4)}
.job-badge.failed{background:rgba(239,68,68,.15);color:#c62828;border:1px solid rgba(239,68,68,.4)}
.job-progress{height:7px;border-radius:6px;background:rgba(255,255,255,.08);overflow:hidden;margin:8px 0 4px}
.job-progress>i{display:block;height:100%;width:0;transition:width .4s ease}
.job-progress>i.running{background:linear-gradient(90deg,#fb923c,#f59e0b)}
.job-progress>i.done{background:linear-gradient(90deg,#E55E99,#8b5cf6)}
.job-sub-done{margin-top:6px}
.job-fail-count{color:#c62828}
.job-counts{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}
.job-actions{margin-top:8px;display:flex;gap:8px}
.job-failed{margin-top:8px;border-top:1px dashed var(--line);padding-top:8px;display:flex;flex-direction:column;gap:4px}
.jsum-run{color:#E55E99}.jsum-done{color:#157c4b}
.app-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);z-index:80;
  background:var(--card);border:1px solid var(--line);color:var(--text,#e8e8ef);padding:10px 16px;
  border-radius:12px;font-size:13px;font-weight:600;box-shadow:0 12px 30px rgba(0,0,0,.4);
  opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease;max-width:90vw}
.app-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ===== Struktur Katalog (Phase 2) ===== */
.st-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.st-gender,.st-views{display:flex;gap:6px}
.st-warn{background:#3a2a00;border:1px solid #7a5a00;color:#8a6a20;padding:10px 12px;border-radius:8px;margin-bottom:12px}
.st-ok{color:#157c4b;margin-bottom:12px}
.st-unassigned{margin-top:8px;display:flex;flex-wrap:wrap;gap:6px}
.st-chip{background:#4a3600;border:1px solid #7a5a00;border-radius:12px;padding:2px 8px;font-size:12px}
.st-cats{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.st-cat{border:1px solid #333;border-radius:8px;overflow:hidden}
.st-cat-head{display:flex;align-items:center;gap:10px;padding:10px 12px;cursor:pointer;background:#1c1c1c}
.st-cat-name{font-weight:600}
.st-cat-actions{margin-left:auto;display:flex;gap:6px;align-items:center}
.st-cat-body{display:none;padding:8px 14px;background:#151515}
.st-cat.open .st-cat-body{display:block}
.st-cat-chev{display:inline-block;transition:transform .15s}
.st-cat.open .st-cat-chev{transform:rotate(180deg)}
.st-brand{padding:6px 0;border-bottom:1px solid #262626}
.st-brand-name{font-weight:600;margin-bottom:2px}
.st-tag{display:flex;gap:8px;padding:2px 0 2px 12px}
.st-off{color:#c62828}
.st-bulk-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.st-table-wrap{overflow-x:auto}
.st-table{width:100%;border-collapse:collapse}
.st-table th,.st-table td{border-bottom:1px solid #2a2a2a;padding:6px 8px;text-align:left;font-size:13px;white-space:nowrap}
.st-thumb{width:44px;height:44px;object-fit:cover;border-radius:6px;background:#222;display:inline-block;vertical-align:middle}
.st-thumb-none{background:#2a2a2a}
.st-suggested{background:#12251a}
.btn.danger{color:#c62828;border-color:#663}

/* ===== Struktur Katalog — review markers (Phase 2b) ===== */
.st-bulk-filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:6px 0 12px}
.st-progress{padding:2px 10px;border:1px solid #3a5a3a;border-radius:12px;color:#157c4b}
.st-rev{color:#157c4b;font-weight:700}
.st-unrev{color:#888}
.st-table td:has(.st-unrev){opacity:.92}

/* ============================================================================
   glass2 light-surface text-contrast fix (v1.14.0)
   Root cause: several components got explicit LIGHT backgrounds in the glass2
   restyle but kept inheriting the dark theme's near-white body text
   (--portal-ink #111111) and hardcoded #6b6b6b muted text -> the
   text was white-on-light and unreadable. Fixed at the surface: remap base +
   muted text to dark ink for each light surface. Semantic colours
   (reward-green, baki-amber, blue pills/badges) are intentionally untouched.
   ============================================================================ */

/* 1. Completed order card (Dashboard -> Completed Ship Out) */
.wp-order-card.is-completed{color:#ffffff}
.wp-order-card.is-completed .wp-mini-label,
.wp-order-card.is-completed .wp-customer-text span,
.wp-order-card.is-completed .wp-item-block span,
.wp-order-card.is-completed .wp-money-block span{color:#9a9a9a}

/* 2. Ambil Order -> GAMBAR ITEM uploader (light) */
.new-order-uploader .new-order-upload-copy strong{color:#ffffff}
.new-order-uploader .new-order-image-count,
.new-order-uploader .new-order-upload-help{color:#9a9a9a}
.new-order-uploader .new-order-upload-copy small{color:#9a9a9a !important}

/* 3. Ambil Order -> payment summary bar (light) */
.new-order-summary strong{color:#ffffff}
.new-order-summary span{color:#9a9a9a}

/* 4. Ambil Order -> QUICK PASTE (light) */
.new-order-quick-head strong{color:#2b7aa8}
.new-order-quick-head span{color:#9a9a9a}
.new-order-quick-row textarea{background:#fff;color:#ffffff}
.new-order-quick-row textarea::placeholder{color:rgba(0,0,0,.42);opacity:1}

/* 5. Order detail -> Gambar Item uploader (same pattern, hidden case) */
.wp-upload-picker{color:#ffffff}
.wp-upload-picker .wp-upload-copy strong{color:#ffffff}
.wp-upload-picker .wp-upload-copy small{color:#9a9a9a}

/* 6. Stat cards (.card base bg is white .48 everywhere; used in order detail) */
.card{color:#ffffff}
.card-label{color:#9a9a9a}

/* v1.14.1 — darker semantic variants on the mint completed card (on-light only;
   dark-theme originals unchanged). */
.wp-order-card.is-completed .wp-customer-text b{color:#0f7a45}
.wp-order-card.is-completed .wp-card-note{background:#fff;border-color:rgba(20,40,30,.12);color:#ffffff}
.wp-order-card.is-completed .wp-card-note-text{color:#ffffff}
.wp-order-card.is-completed .wp-card-note-label{color:#b57e26}

/* v1.23 — SIMPAN | HANTAR equal & side-by-side under a full-width input.
   SIMPAN neutral (left), HANTAR prominent (right), same size so the
   customer-messaging button is never the biggest/easiest target. */
.v119-input-row{grid-template-columns:1fr 1fr;gap:7px}
.v119-input-row input{grid-column:1 / -1;min-width:0}
.v119-input-row .v119-save-btn,.v119-input-row .v119-send-btn{width:100%}
.v119-save-btn{min-height:44px;padding:9px 13px;border:1px solid rgba(200,180,255,.35);border-radius:12px;background:transparent;color:#c9b8ff;font-size:9px;font-weight:900;letter-spacing:.03em;cursor:pointer}
.v119-save-btn:hover{background:rgba(229,94,153,.08)}
.v119-sent-note{margin:6px 2px 0;font-size:10px;font-weight:700;color:#8fe3b0}
.v119-arrived-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.v119-arrived-actions .v119-save-btn,.v119-arrived-actions .v119-send-btn{width:100%}

.cat-search{width:100%;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:#ffffff;color:var(--text);font-size:14px;margin:0}
.cat-tags-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 14px}
.cat-tags-toolbar .cat-search{flex:1 1 240px;width:auto}
.cat-tags-toolbar select.cat-search{flex:0 0 auto;width:auto;cursor:pointer}
.cat-progress{margin-left:auto;white-space:nowrap}
.cat-catlabel{color:#c9a3ff}
.catalog-card.cat-unreviewed{border-left:3px solid #e0a100}
.catalog-card.cat-reviewed{border-left:3px solid #2e9e5b}
.cat-picker-sm{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.cat-pick-sm{flex-direction:row;align-items:center;gap:10px;padding:7px 9px}
.cat-pick-sm .catalog-thumb{width:46px;height:46px;flex:none;border-radius:8px}
.cat-pick-sm span{min-width:0;overflow-wrap:anywhere}
.cat-prod-toolbar{margin:0 0 10px}

.cat-cat-picker{display:grid;gap:16px;margin:6px 0}
.cat-cat-gender{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-weight:800;margin-bottom:8px}
.cat-cat-opts{display:flex;flex-wrap:wrap;gap:8px}
.cat-cat-opt{width:auto}
.cat-cat-current{border-color:#2e9e5b!important;color:#157c4b!important}
.cat-merge-list{display:grid;gap:8px;margin:10px 0}
.cat-merge-row{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:10px;padding:10px;cursor:pointer}
.cat-merge-row input{margin-top:3px;flex:none}
.cat-merge-name{display:block;font-size:12px;color:var(--muted);margin:12px 0}
.cat-merge-name input{margin-top:4px}
.cat-merge-total{margin:12px 0;font-size:15px}
.cat-merge-warn{border:1px solid #e0a100;background:rgba(224,161,0,.12);border-radius:10px;padding:10px 12px;margin:8px 0;font-size:13px}
.cat-merge-actions{margin-top:16px}

.cat-move-head{display:flex;gap:8px;align-items:center;margin-bottom:10px}
.cat-move-head .cat-search{flex:1}
.cat-move-head .btn{flex:0 0 auto;white-space:nowrap}
.cat-newtag-form{border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:12px;display:grid;gap:8px;background:#FFF0F6}
.cat-empty{padding:18px;text-align:center}

body.cat-drag-selecting{user-select:none;-webkit-user-select:none}
.catalog-card img{-webkit-user-drag:none}
.catalog-card.cat-drag-hover{outline:2px solid #E55E99;outline-offset:-2px;background:rgba(229,94,153,.12)}

.dup-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 12px}
.dup-section{margin:22px 0 10px;font-size:13px;letter-spacing:.04em;color:var(--muted);text-transform:uppercase;font-weight:800}
.dup-list{display:grid;gap:12px}
.dup-group{border:1px solid var(--line);border-radius:14px;padding:12px;background:#FFF0F6}
.dup-group-head{font-size:12px;color:var(--muted);margin-bottom:10px;font-weight:700}
.dup-cross{display:inline-block;margin-left:6px;padding:2px 8px;border-radius:999px;background:rgba(224,161,0,.18);color:#e0a100;font-weight:800}
.dup-group-items{display:flex;flex-wrap:wrap;gap:10px}
.dup-item{display:flex;flex-direction:column;gap:6px;width:160px;border:1px solid var(--line);border-radius:10px;padding:8px;cursor:pointer;position:relative}
.dup-item.dup-keep{border-color:#2e9e5b;background:rgba(46,158,91,.08)}
.dup-item .dup-pick{position:absolute;top:8px;left:8px;width:18px;height:18px;z-index:2;accent-color:#E55E99;cursor:pointer}
.dup-thumb{aspect-ratio:1;border-radius:8px;overflow:hidden;background:#ffffff;display:flex;align-items:center;justify-content:center}
.dup-thumb img{width:100%;height:100%;object-fit:cover}
.dup-meta{font-size:12px;line-height:1.5}
.dup-badge-keep{background:#2e9e5b;color:#fff;font-size:10px;padding:1px 6px;border-radius:999px;font-weight:800;margin-left:4px}
.dup-cost{font-weight:700;margin-top:2px}
.dup-cost.dup-cheapest{color:#157c4b}

.tr-list{display:flex;flex-direction:column;gap:8px;max-width:760px}
.tr-row{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:12px;padding:8px 12px;background:#FFF0F6}
.tr-handle{cursor:grab;font-size:18px;color:var(--muted);flex:none}
.tr-thumb{width:56px;height:56px;border-radius:8px;overflow:hidden;background:#ffffff;flex:none;display:flex;align-items:center;justify-content:center}
.tr-thumb img{width:100%;height:100%;object-fit:cover}
.tr-meta{flex:1;min-width:0;font-size:13px}
.tr-custom{color:#157c4b}
.tr-upload,.tr-reset,.tr-unpin{font-size:11px;padding:4px 10px;flex:none}

.tr-search-box{max-width:760px;margin-bottom:18px}
.tr-search-input{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#FFF0F6;color:inherit;font:inherit}
.tr-results{display:flex;flex-direction:column;gap:6px;margin-top:8px;max-height:420px;overflow:auto}
.tr-result{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:10px;padding:6px 10px;background:rgba(25,30,45,.25)}
.tr-result .tr-thumb{width:44px;height:44px}
.tr-result .tr-meta{flex:1;min-width:0;font-size:12px}
.tr-list-head{margin:18px 0 10px;font-size:13px;letter-spacing:.04em;color:var(--muted);text-transform:uppercase;font-weight:800}


/* ===== #FYP admin panel ===== */
#fypBody .fyp-up{display:flex;flex-direction:column;gap:10px;max-width:520px;margin:0 0 20px;padding:14px;border:1px solid #e5e5e5;border-radius:12px;background:#fafafa}
#fypBody .fyp-up textarea{min-height:64px;padding:8px 10px;border:1px solid #ddd;border-radius:8px;font:inherit;resize:vertical}
#fypBody .fyp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
#fypBody .fyp-card{display:flex;gap:12px;border:1px solid #e5e5e5;border-radius:12px;padding:10px;background:#fff}
#fypBody .fyp-thumb{width:96px;flex:none;aspect-ratio:9/16;border-radius:8px;overflow:hidden;background:#111;display:flex;align-items:center;justify-content:center}
#fypBody .fyp-thumb video{width:100%;height:100%;object-fit:cover}
#fypBody .fyp-ph{color:#aaa;font-size:11px;text-align:center;padding:6px}
#fypBody .fyp-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}
#fypBody .fyp-badge{align-self:flex-start;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;background:#eee;color:#555}
#fypBody .fyp-badge.s-completed{background:#e6f6ea;color:#1a7f37}
#fypBody .fyp-badge.s-processing{background:#fff4e0;color:#b45309}
#fypBody .fyp-badge.s-queued{background:#eef;color:#3538cd}
#fypBody .fyp-badge.s-failed{background:#fde8e8;color:#b4443a}
#fypBody .fyp-err{font-size:11px;color:#b4443a;word-break:break-word}
#fypBody .fyp-cap{font-size:13px;color:#222;white-space:pre-wrap;word-break:break-word;max-height:56px;overflow:auto}
#fypBody .fyp-modbox{margin-top:6px}
#fypBody .fyp-modc{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;padding:5px 0;border-bottom:1px solid #f0f0f0;font-size:13px}
#fypBody .fyp-modc.del{opacity:.5}
#fypBody .fyp-modc .fyp-delc{padding:2px 8px}
/* Analytics (Umami) dashboard iframe. Sized here (not inline) because the admin
   CSP is style-src 'self' with no 'unsafe-inline', so inline style="" is blocked.
   dvh keeps it correct under mobile Safari's dynamic toolbar. */
#analyticsBody{width:100%}
#analyticsBody iframe.analytics-frame{display:block;width:100%;height:calc(100dvh - 120px);min-height:600px;border:0;border-radius:10px;background:#fff}
@media(max-width:980px){#analyticsBody iframe.analytics-frame{height:calc(100dvh - 140px);min-height:70dvh}}

/* ==== NIENA LUXE putih+merah jambu ==== */
.sidebar{background:#ffffff !important;border-right:0;border-bottom:1px solid #EBB9DF;box-shadow:0 1px 0 #EBB9DF}
.topbar{background:rgba(255,255,255,.94) !important;border-bottom:1px solid #EBB9DF;color:#111111}
.portal-mark{background:#E55E99 !important;color:#ffffff !important;border-color:#E55E99 !important}
.btn{border-color:#EBB9DF}
.btn.ghost{border-color:#EBB9DF !important}
#logoutBtn{border-color:#E55E99 !important}
.nav-btn{color:#6b6b6b}
.nav-btn.active,.nav-btn:hover{background:#E55E99;color:#ffffff}
.icon-btn{color:#111111}

.portal-mark{-webkit-text-fill-color:#ffffff !important}
.st-cat{background:#ffffff !important;border:1px solid #EBB9DF !important;border-radius:14px;overflow:hidden}
.st-cat-head{background:#FFF0F6 !important;color:#111111 !important}
.st-cat-head strong,.st-cat-head b,.st-cat-head span{color:#111111}
.st-cat-head .muted,.st-cat-head .small{color:#6b6b6b !important}
.st-cat-body{background:#ffffff !important}
.st-thumb-none{background:#FFF0F6 !important;color:#8a8a8a !important;border:1px dashed #EBB9DF}
.st-chip{background:#FFF6E0 !important;border:1px solid #E8C88A !important;color:#8a6a20 !important}
.st-warn{background:#FFF6E0 !important;border:1px solid #E8C88A !important;color:#8a6a20 !important}
.st-suggested{background:#E8F7EE !important;color:#157c4b !important}
.st-tag,.st-tag-row{background:#ffffff}

.btn.danger{color:#c62828 !important;border-color:#f0b3b3 !important;background:#ffffff !important}
.st-ok{color:#157c4b !important}
