:root{
  /* Atelier / Maison palette — warm ivory paper, ink, restrained Hermès orange */
  --bg:#F4F1EA;--bg2:#FBFAF6;--card:#FFFFFF;--card-solid:#FFFFFF;
  --accent:#E64900;--accent-strong:#C23A00;--accent-light:#F6ECE2;
  --gold:#8A6A3B;--gold-soft:rgba(138,106,59,.34);
  /* Status colours muted to earthy tones — used sparingly */
  --green:#5E7A52;--green-bg:#EEF1E8;--green-dark:#3F5638;
  --orange:#B07A2E;--orange-bg:#F4ECDD;--orange-dark:#7E551B;
  --purple:#7C6A86;--purple-bg:#EFEBF1;--purple-dark:#574A60;
  --red:#A83A2B;--red-bg:#F6E9E5;
  --blue:#E64900;--blue-bg:#F6ECE2;
  --teal:#3F6E72;--teal-bg:#E7EFEF;
  --text:#1A1714;--text2:#403A33;--text3:#6B6258;--text4:#9C9385;
  --sep:rgba(60,50,40,.13);--sep2:rgba(60,50,40,.07);
  --glass-border:rgba(60,50,40,.10);
  --font-serif:"Cormorant Garamond","Noto Serif SC","Source Han Serif SC","Source Han Serif CN","Songti SC",STSong,"SimSun",Georgia,"Times New Roman",serif;
  /* Matte, near-flat shadows — luxury is not glossy */
  --shadow:0 1px 2px rgba(40,30,20,.04),0 1px 0 rgba(40,30,20,.03);
  --shadow-lg:0 18px 48px rgba(40,30,20,.10),0 4px 14px rgba(40,30,20,.05);
  --shadow-focus:0 0 0 1px var(--accent);
  --r:8px;--r-lg:12px;--r-pill:999px;
  --z-base:0;
  --z-page:1;
  --z-card-inline-focus:20;
  --z-card-inline-open:40;
  --z-preview-close:2;
  --z-sticky:200;
  --z-nav-menu:300;
  --z-dropdown:320;
  --z-card-focus:340;
  --z-modal-backdrop:400;
  --z-modal:500;
  --z-toast:600;
  --z-overlay:700;
}

*{box-sizing:border-box}
[hidden]{display:none!important}
html{font-size:16px;background:linear-gradient(180deg,#FBFAF6 0%,#F4F1EA 100%)}
body{
  margin:0;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC","Noto Sans SC",sans-serif;
  background:linear-gradient(180deg,#FBFAF6 0%,#F4F1EA 60%,#F1EDE4 100%);
  color:var(--text);min-height:100vh;-webkit-font-smoothing:antialiased;line-height:1.5;
}
/* Editorial serif for display headings, brand, amounts — the core of the maison feel */
.brand-title,.page-hero h1,.login-card h1,.shell-modal-card h2,
.section-head h2,.shell-sheet-head h2,
.metric-card strong,.sc .sn,.order-total-card strong,
.ri-price,.ch-total,.sr-v,.workspace-mini-stat strong{
  font-family:var(--font-serif);font-weight:600;letter-spacing:.01em;
}
/* Numbers read larger & lighter in serif to feel set, like a price on a gallery label */
.metric-card strong,.sc .sn{font-weight:600;letter-spacing:.005em}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible{
  outline:3px solid rgba(230,73,0,.34);
  outline-offset:3px;
}

.shell-body::before,.shell-body::after,.login-body::before,.login-body::after{display:none}

.shell-header{
  position:sticky;top:0;z-index:var(--z-sticky);padding:12px 16px 0;
}
.shell-header-inner{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  max-width:1320px;margin:0 auto;padding:12px 16px;border-radius:20px;
  background:var(--card);border:1px solid var(--sep);
  box-shadow:var(--shadow);
}
.brand-block{display:flex;flex-direction:column;gap:1px}
.brand-kicker,.page-kicker{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.7rem;font-weight:700;letter-spacing:.22em;text-transform:uppercase;color:var(--gold);
}
.brand-kicker::before{
  content:"";width:18px;height:1px;background:var(--gold);opacity:.7;
}
.brand-title{font-size:1.32rem;font-weight:600;letter-spacing:.01em}
.brand-meta{font-size:.75rem;color:var(--text3);line-height:1.35}
.main-nav{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.main-nav-group{position:relative;display:flex;align-items:center;gap:4px}
.main-nav-link,
.main-nav-toggle{
  position:relative;
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;min-width:44px;padding:8px 10px;border:none;border-radius:0;background:none;
  color:var(--text2);font-weight:650;font-size:.92rem;line-height:1;cursor:pointer;
  transition:color .25s ease;
}
.main-nav-toggle{
  width:44px;height:44px;padding:0;font-size:.78rem;
}
.main-nav-link:hover,
.main-nav-toggle:hover,
.main-nav-group.open .main-nav-toggle{background:none;color:var(--text)}
.main-nav-link.is-active,
.main-nav-group.is-active .main-nav-toggle{
  background:none;color:var(--text);font-weight:700;
}
/* Fine maison underline marks the active destination */
.main-nav-link.is-active::after{
  content:"";position:absolute;left:10px;right:10px;bottom:4px;height:1.5px;
  background:var(--accent);border-radius:2px;
}
.main-nav-menu{
  position:absolute;top:calc(100% + 10px);right:0;min-width:170px;padding:8px;
  border-radius:var(--r-lg);background:var(--card);border:1px solid var(--sep);
  box-shadow:var(--shadow-lg);z-index:var(--z-nav-menu);
}
.main-nav-menu[hidden]{display:none}
.main-nav-menu-btn{
  width:100%;display:flex;align-items:center;justify-content:flex-start;min-height:44px;
  padding:11px 12px;border:none;border-radius:14px;background:none;color:var(--text);
  font-size:.92rem;font-weight:700;cursor:pointer;transition:background-color .18s ease,color .18s ease;
}
.main-nav-menu-btn:hover{background:var(--accent-light);color:var(--accent)}
/* Thin divider between primary destinations and settings in the desktop nav */
.main-nav-sep{width:1px;height:22px;margin:0 4px;background:var(--sep);border-radius:1px}
.main-nav-link--muted{color:var(--text3)}
/* Consolidated "+ 新建" action menu in the header actions zone */
.header-create{order:-1}
.create-btn{
  display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:9px 15px 9px 13px;
  border:none;border-radius:999px;cursor:pointer;font-weight:760;font-size:.9rem;line-height:1;
  color:#fff;background:var(--accent);
  box-shadow:0 2px 6px rgba(40,30,20,.14);
  transition:transform .28s cubic-bezier(.22,.61,.36,1),box-shadow .3s ease,filter .3s ease;
}
.create-btn:hover{filter:brightness(1.04)}
.create-btn:active{transform:scale(.985)}
.create-btn-plus{font-size:1.16rem;font-weight:700;line-height:1;margin-top:-1px}
.header-actions{display:flex;align-items:center;gap:8px}
.compact-select,.input{
  width:100%;padding:14px 15px;font-size:1.02rem;font-weight:520;
  border:1px solid rgba(60,50,40,.13);border-radius:14px;background:rgba(245,242,235,.88);
  color:var(--text);outline:none;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease;
}
.compact-select{
  min-height:44px;padding:10px 12px;font-size:.88rem;font-weight:650;min-width:140px;
}
.input:focus,.compact-select:focus,.text-input:focus{
  background:rgba(255,255,255,.96);border-color:rgba(230,73,0,.32);box-shadow:var(--shadow-focus);transform:translateY(-1px);
}
.input::placeholder,.text-input::placeholder{color:#B0B5C1}
.user-chip{
  display:inline-flex;align-items:baseline;gap:6px;min-height:44px;padding:8px 4px;border-radius:0;
  background:transparent;box-shadow:none;color:var(--text);
}
.user-chip span{font-size:1rem;font-weight:780;line-height:1}
.user-chip small{font-size:.72rem;font-weight:650;color:var(--text3);line-height:1}
.header-actions .ghost-btn{
  min-height:44px;padding:9px 13px;border-radius:12px;font-size:.86rem;
}
.ghost-btn,.ghost-link,.primary-link{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;border-radius:14px;
  border:none;cursor:pointer;font-weight:700;transition:all .18s ease;
}
.ghost-btn,.ghost-link{background:rgba(245,242,235,.95);color:var(--text2);box-shadow:inset 0 0 0 1px rgba(60,50,40,.08)}
.primary-link{
  background:var(--accent);color:#fff;
  box-shadow:0 2px 6px rgba(40,30,20,.14);
}
.submit-btn{
  width:100%;min-height:44px;padding:16px 18px;font-size:1.04rem;font-weight:780;letter-spacing:.01em;
  border:none;border-radius:var(--r);background:var(--accent);color:#fff;cursor:pointer;
  transition:transform .28s cubic-bezier(.22,.61,.36,1),box-shadow .3s ease,opacity .2s ease;
  box-shadow:0 2px 6px rgba(40,30,20,.14);
}
.submit-btn[aria-busy="true"],.ghost-btn[aria-busy="true"]{opacity:.72;cursor:progress}
.submit-btn:disabled,
.submit-btn.is-disabled{
  opacity:.48;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
  filter:grayscale(.08);
}
.submit-btn:active{transform:scale(.985);opacity:.92}
.inline-form{margin:0}
body.modal-open{overflow:hidden}

.shell-modal{
  position:fixed;inset:0;z-index:var(--z-modal-backdrop);display:flex;align-items:center;justify-content:center;padding:24px;
  background:rgba(26,23,20,.34);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
}
.shell-modal[hidden]{display:none}
.shell-modal-card{
  position:relative;width:min(100%,520px);padding:30px;border-radius:var(--r-lg);background:var(--card);
  border:1px solid var(--sep);box-shadow:var(--shadow-lg);z-index:var(--z-modal);
}
.shell-modal-close{
  position:absolute;top:16px;right:16px;width:44px;height:44px;padding:0;border:none;border-radius:50%;
  background:rgba(245,242,235,.95);color:var(--text2);font-size:1.2rem;line-height:1;cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.shell-modal-kicker{
  font-size:.74rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);
}
.shell-modal-card h2{margin:8px 0 8px;font-size:1.72rem;line-height:1.1}
.shell-modal-copy{margin:0;color:var(--text3);font-size:.94rem;line-height:1.5}
.shell-modal-form{margin-top:18px}
.shell-modal-textarea{min-height:96px}
.shell-modal-error{margin:0}
.shell-modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.shell-modal-actions .submit-btn{width:auto;min-width:144px}
.shell-modal-submit{padding:14px 18px}

/* Bottom tab bar (mobile) — hidden on desktop, revealed in the max-width:767px query */
.bottom-nav{display:none}
.bottom-nav-item{
  flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  min-height:52px;padding:6px 4px;border:none;border-radius:14px;background:none;
  color:var(--text3);font:inherit;font-size:.68rem;font-weight:650;letter-spacing:.01em;
  cursor:pointer;text-decoration:none;transition:color .2s ease,background-color .2s ease,transform .12s ease;
}
.bottom-nav-icon{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px}
.bottom-nav-icon svg{width:25px;height:25px;stroke-linecap:round;stroke-linejoin:round}
.bottom-nav-label{line-height:1;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.bottom-nav-item:active{transform:scale(.92)}
.bottom-nav-item.is-active{color:var(--accent)}

/* "更多" bottom sheet — reuses the .shell-modal backdrop + shell.js modal wiring */
.shell-modal--sheet{align-items:flex-end;justify-content:center;padding:0}
.shell-sheet-card{
  position:relative;width:100%;max-width:560px;margin:0 auto;z-index:var(--z-modal);
  padding:6px 18px calc(env(safe-area-inset-bottom,0px) + 18px);
  border-radius:var(--r-lg) var(--r-lg) 0 0;background:var(--card);
  border:1px solid var(--sep);border-bottom:none;box-shadow:var(--shadow-lg);
  animation:sheetUp .26s cubic-bezier(.22,.61,.36,1);
}
.shell-sheet-handle{width:40px;height:5px;border-radius:999px;background:var(--sep);margin:8px auto 2px}
.shell-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 4px 6px}
.shell-sheet-head h2{margin:0;font-size:1.22rem;line-height:1.1}
.shell-sheet-head .shell-modal-close{position:static;width:38px;height:38px;font-size:1.1rem}
.shell-sheet-section{padding:4px 0}
.shell-sheet-section + .shell-sheet-section{margin-top:6px;padding-top:10px;border-top:1px solid var(--sep2)}
.shell-sheet-section-title{
  padding:4px 8px;font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text4);
}
.shell-sheet-link{
  width:100%;display:flex;align-items:center;gap:12px;min-height:52px;padding:11px 12px;
  border:none;border-radius:16px;background:none;color:var(--text);font:inherit;font-size:1rem;font-weight:650;
  text-align:left;text-decoration:none;cursor:pointer;transition:background-color .18s ease,color .18s ease;
}
.shell-sheet-link-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;color:var(--text3)}
.shell-sheet-link-icon svg{width:24px;height:24px}
.shell-sheet-link:hover,.shell-sheet-link:active{background:var(--accent-light);color:var(--accent)}
.shell-sheet-link:hover .shell-sheet-link-icon,.shell-sheet-link:active .shell-sheet-link-icon{color:var(--accent)}
.shell-sheet-link.is-active{background:rgba(230,73,0,.11);color:var(--accent);box-shadow:inset 0 0 0 1px rgba(230,73,0,.14)}
.shell-sheet-link.is-active .shell-sheet-link-icon{color:var(--accent)}
@keyframes sheetUp{from{transform:translateY(100%)}to{transform:translateY(0)}}

.shell-main{
  position:relative;z-index:var(--z-page);max-width:1320px;margin:0 auto;padding:16px 16px 28px;
}
.order-shell-main{
  max-width:620px;
  padding-top:10px;
}
.page-stack{display:flex;flex-direction:column;gap:18px}
.page-hero,.panel,.login-card,.fc,.cg,.metric-card,.sc{
  background:var(--card);border:1px solid var(--sep);box-shadow:var(--shadow);
}
.page-hero,.panel,.login-card{border-radius:var(--r-lg);padding:28px}
.compact-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.page-hero h1,.login-card h1{margin:8px 0 8px;font-size:2rem;line-height:1.1}
.page-hero p,.muted-copy{margin:0;color:var(--text3);max-width:720px}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap}

.metrics-grid,.sg{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;
}
.metric-card,.sc{
  position:relative;border-radius:var(--r-lg);padding:22px 20px;overflow:hidden;
}
.metric-card::before{
  content:"";position:absolute;top:0;left:0;right:0;height:2px;
  background:linear-gradient(90deg,var(--gold),transparent 75%);opacity:.55;
}
.metric-card small{color:var(--text3)}
.metric-card span,.sc .sl{display:block;color:var(--text3);font-weight:700;font-size:.72rem;text-transform:uppercase;letter-spacing:.08em}
.metric-card strong,.sc .sn{display:block;margin-top:10px;font-size:clamp(1.4rem,5vw,1.9rem);font-weight:600;line-height:1.05;color:var(--text);overflow-wrap:anywhere}
.metric-card small{display:block;margin-top:6px;color:var(--text3);font-size:.74rem;line-height:1.35}
.metric-card strong,.workspace-mini-stat strong,.order-total-card strong,.ri-price,.ch-total,.sr-v,.payment-meta-chip strong{
  font-variant-numeric:tabular-nums;
}
.metric-inline{font-weight:760;color:var(--text2)}
.metric-card-link{
  display:block;
  color:inherit;
  transition:transform .35s cubic-bezier(.22,.61,.36,1),box-shadow .35s ease,border-color .35s ease;
}
.metric-card-link:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-lg);
  border-color:var(--gold-soft);
}

.panel{display:flex;flex-direction:column;gap:16px}
.section-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
}
.section-head h2{margin:0 0 6px;font-size:1.14rem}
.section-head p{margin:0;color:var(--text3);font-size:.92rem}
.slim-head h2{font-size:1rem}
.bl,.st-title{font-size:.82rem;font-weight:750;color:var(--text2)}

.table-wrap{overflow:auto}
.table-wrap-scroll{position:relative;padding-bottom:2px}
.table-wrap-scroll::after{
  content:"";position:absolute;top:0;right:0;width:32px;height:100%;pointer-events:none;
  background:linear-gradient(90deg,rgba(247,248,252,0) 0%,rgba(247,248,252,.96) 82%);
}
.table-scroll-hint{
  display:flex;align-items:center;gap:6px;font-size:.78rem;color:var(--text3);margin-top:8px;
}
.table-scroll-hint::before{
  content:"↔";
  font-size:.92rem;
  color:var(--accent);
}
.data-table{width:100%;border-collapse:collapse;font-size:.92rem}
.data-table th,.data-table td{padding:15px 12px;border-bottom:1px solid var(--sep2);text-align:left;vertical-align:top}
.data-table td{font-variant-numeric:tabular-nums}
.data-table th{color:var(--text3);font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid var(--sep)}
.data-table tbody tr{transition:background-color .25s ease}
.data-table tbody tr:hover{background:var(--bg2)}
.empty-cell,.empty-panel{text-align:center;color:var(--text3);padding:32px 12px}

.split-layout{
  display:grid;grid-template-columns:1.1fr 1.2fr;gap:18px;
}
.split-panel{min-height:320px}
.ledger-list{display:flex;flex-direction:column;gap:10px}
.ledger-item{
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-radius:18px;
  background:rgba(245,242,235,.92);box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);transition:all .18s ease;
}
.ledger-item.active,.ledger-item:hover{background:rgba(232,242,255,.95);box-shadow:0 12px 20px rgba(230,73,0,.08)}
.ledger-item strong{display:block}
.ledger-item small{display:block;color:var(--text3);margin-top:4px}
.ledger-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.customer-list-main{min-width:0}
.customer-summary-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.inset-panel{
  padding:18px;
  border-radius:22px;
  background:rgba(245,242,235,.82);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}

.stack-form{display:flex;flex-direction:column;gap:14px}
.compact-form{margin-bottom:4px}
.field-label{display:flex;flex-direction:column;gap:6px;font-weight:650;color:var(--text2)}
.text-input{min-height:110px;resize:vertical}
.mt-12{margin-top:12px}
.mt-20{margin-top:20px}

.login-body{
  display:flex;align-items:center;justify-content:center;padding:24px;min-height:100vh;
}
.login-shell{position:relative;z-index:var(--z-page);width:100%;max-width:460px}
.login-card{padding:32px}
.login-card--maison{text-align:center;padding:40px 34px}
.login-card--maison .brand-kicker{justify-content:center}
.login-card--maison .stack-form{text-align:left;margin-top:22px}
.login-mark{
  width:56px;height:56px;margin:0 auto 18px;color:var(--gold);
}
.login-mark svg{width:100%;height:100%}
.login-rule{
  width:44px;height:1px;margin:14px auto 14px;
  background:linear-gradient(90deg,transparent,var(--gold),transparent);
}
.login-card--maison h1{font-family:var(--font-serif);font-weight:600;letter-spacing:.015em}
.login-card--maison .muted-copy{margin:0 auto;max-width:300px}
.login-help{margin-top:16px;color:var(--text3);font-size:.9rem}
.error-text{color:var(--red);font-weight:700;margin-top:12px}
.field-error,.item-error-message{margin:6px 0 0;color:var(--red);font-size:.82rem;font-weight:700;line-height:1.4}
.form-error-summary{
  padding:12px 14px;border-radius:16px;background:rgba(168,58,43,.09);color:#9B1C1C;
  box-shadow:inset 0 0 0 1px rgba(168,58,43,.14);
}
.form-error-summary strong{display:block;margin-bottom:6px}
.form-error-summary ul{margin:0;padding-left:18px}
.has-error{box-shadow:0 0 0 2px rgba(168,58,43,.18)!important;border-color:rgba(168,58,43,.34)!important}
.sr-only{
  position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.input[readonly],.input:disabled,textarea[readonly],select:disabled{
  background:rgba(238,241,246,.88);color:var(--text3);cursor:not-allowed;
}
.inline-note{margin:0;color:var(--text3);font-size:.82rem;line-height:1.5}

.workspace-page{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.workspace-page .page-hero,
.workspace-page .panel{
  padding:18px;
  border-radius:22px;
}
.workspace-page .page-hero{
  background:linear-gradient(135deg,rgba(255,255,255,.96) 0%,rgba(246,249,253,.94) 56%,rgba(237,243,250,.96) 100%);
}
.workspace-page .page-hero h1{
  margin:6px 0;
  font-size:1.74rem;
}
.workspace-page .page-hero p,
.workspace-page .muted-copy{
  max-width:760px;
  font-size:.9rem;
}
.workspace-page .hero-actions{
  gap:8px;
}
.workspace-page .ghost-btn,
.workspace-page .ghost-link,
.workspace-page .primary-link{
  min-height:44px;
  padding:9px 14px;
  border-radius:12px;
  font-size:.88rem;
  white-space:nowrap;
}
.workspace-page .submit-btn{
  padding:14px 16px;
  border-radius:16px;
  font-size:.96rem;
}
.workspace-page .input,
.workspace-page .compact-select{
  padding:12px 14px;
  font-size:.95rem;
  border-radius:12px;
}
.workspace-page .text-input{
  min-height:96px;
}
.workspace-page .field-label{
  gap:5px;
  font-size:.9rem;
}
.workspace-page .metrics-grid{
  gap:10px;
}
.workspace-page .metric-card{
  padding:15px 14px;
  border-radius:18px;
}
.workspace-page .metric-card span{
  font-size:.7rem;
}
.workspace-page .metric-card strong{
  margin-top:10px;
  font-size:clamp(1.3rem,4.6vw,1.85rem);
}
.workspace-page .metric-card small{
  margin-top:4px;
  font-size:.72rem;
}
.workspace-page .panel{
  gap:14px;
}
.workspace-page .section-head{
  gap:10px;
}
.workspace-page .section-head h2{
  margin:0 0 4px;
  font-size:1.02rem;
}
.workspace-page .section-head p{
  font-size:.84rem;
}
.section-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.workspace-page .search-box{
  margin-bottom:0;
}
.workspace-page .search-box input{
  padding:12px 14px 12px 38px;
  border-radius:14px;
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08),0 10px 20px rgba(40,30,20,.05);
}
.workspace-page .search-box .si{
  left:12px;
}
.workspace-page .table-wrap{
  overflow:auto;
  border:1px solid rgba(60,50,40,.08);
  border-radius:16px;
  background:rgba(255,255,255,.86);
}
.workspace-page .data-table{
  font-size:.86rem;
}
.workspace-page .data-table th,
.workspace-page .data-table td{
  padding:11px 10px;
}
.workspace-page .data-table th{
  font-size:.68rem;
  letter-spacing:.1em;
  background:none;
}
.workspace-page .empty-cell,
.workspace-page .empty-panel{
  padding:28px 12px;
}
.workspace-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.workspace-hero{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.workspace-hero-main{
  display:grid;
  grid-template-columns:minmax(0,1.12fr) minmax(320px,.88fr);
  gap:16px;
  align-items:start;
}
.workspace-hero-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.workspace-mini-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.workspace-mini-stat{
  padding:16px 16px 15px;
  border-radius:var(--r);
  background:var(--bg2);
  border:1px solid var(--sep);
  box-shadow:none;
}
.workspace-mini-stat span{
  display:block;
  font-size:.68rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--text3);
}
.workspace-mini-stat strong{
  display:block;
  margin-top:8px;
  font-size:clamp(1.15rem,4vw,1.4rem);
  font-weight:600;
  color:var(--text);
  overflow-wrap:anywhere;
}
.page-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.page-tag,
.section-meta,
.meta-chip,
.role-badge,
.status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 11px;
  border-radius:var(--r-pill);
  font-size:.74rem;
  font-weight:700;
  letter-spacing:.02em;
  white-space:nowrap;
}
.page-tag{
  background:rgba(230,73,0,.08);
  color:var(--accent-strong);
}
.page-tag-focus,
.meta-chip-focus{
  background:rgba(26,23,20,.08);
  color:var(--text);
}
.section-meta{
  background:none;
  border:1px solid var(--gold-soft);
  color:var(--gold);
}
.hero-actions-compact{
  align-items:center;
}
.panel-tight{
  padding:16px;
}
.metrics-grid-compact .metric-card{
  min-height:128px;
}
.data-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:16px;
  border-radius:18px;
  background:rgba(245,242,235,.8);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.section-head-compact{
  margin-bottom:0;
}
.customer-ledger-layout{
  align-items:start;
}
.customer-ledger-layout > .split-panel:first-child{
  position:sticky;
  top:84px;
}
.customer-ledger-layout .ledger-list{
  max-height:min(68vh,720px);
  overflow:auto;
  padding-right:4px;
}
.customer-list-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.customer-overview-grid{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);
  gap:12px;
  align-items:start;
}
.ledger-data-grid{
  align-items:start;
}
.action-callout{
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
}
.action-callout h2{
  margin:6px 0 4px;
  font-size:1.18rem;
}
.action-callout .ghost-btn{
  flex-shrink:0;
}
.customer-command-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px;
  border-radius:20px;
  background:rgba(255,255,255,.88);
  border:1px solid var(--glass-border);
  box-shadow:var(--shadow);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.customer-command-title{
  min-width:0;
}
.customer-command-title h1{
  margin:4px 0 0;
  font-size:1.5rem;
  line-height:1.1;
}
.customer-command-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.customer-workbench{
  display:grid;
  grid-template-columns:minmax(300px,360px) minmax(0,1fr);
  gap:14px;
  align-items:start;
}
.customer-search-panel{
  position:sticky;
  top:84px;
}
.customer-search-form{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.customer-search-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:8px;
  align-items:center;
}
.customer-search-submit{
  width:auto;
  min-width:88px;
  min-height:44px;
  padding:10px 16px;
}
.customer-reset-link{
  min-width:auto;
}
.filter-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.filter-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(26,23,20,.05);
  color:var(--text2);
  font-size:.8rem;
  font-weight:760;
  transition:background-color .18s ease,color .18s ease,box-shadow .18s ease;
}
.filter-chip.active,
.filter-chip:hover{
  background:rgba(230,73,0,.1);
  color:var(--accent-strong);
  box-shadow:inset 0 0 0 1px rgba(230,73,0,.12);
}
.lookup-hint{
  padding:10px 12px;
  border-radius:14px;
  background:rgba(230,73,0,.07);
  color:var(--accent-strong);
  font-size:.82rem;
  font-weight:760;
}
.customer-results-list{
  max-height:min(68vh,720px);
  overflow:auto;
  padding-right:4px;
}
.customer-list-meta{
  margin-top:4px;
  color:var(--text3);
  font-size:.8rem;
  line-height:1.35;
}
.customer-center-panel{
  min-width:0;
}
.customer-center-panel .data-card,
.ledger-data-grid > .data-card{
  min-width:0;
}
.customer-center-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(180px,auto);
  gap:14px;
  align-items:start;
}
.customer-title-block{
  min-width:0;
}
.customer-title-block h2{
  margin:4px 0 8px;
  font-size:1.44rem;
  line-height:1.12;
}
.customer-profile-line{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  color:var(--text3);
  font-size:.84rem;
}
.customer-profile-line span{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 9px;
  border-radius:999px;
  background:rgba(26,23,20,.05);
}
.customer-current-balance{
  padding:14px 16px;
  border-radius:18px;
  background:rgba(94,122,82,.1);
  color:var(--green-dark);
  text-align:right;
  min-width:180px;
}
.customer-current-balance.is-due{
  background:rgba(176,122,46,.14);
  color:#9A5B00;
}
.customer-current-balance span{
  display:block;
  font-size:.75rem;
  font-weight:780;
}
.customer-current-balance strong{
  display:block;
  margin-top:6px;
  font-size:1.45rem;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.customer-summary-grid-wide{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.customer-center-grid{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(320px,1.1fr);
  gap:14px;
  align-items:start;
}
.customer-detail-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:0;
}
.customer-detail-list div{
  min-width:0;
  padding:12px;
  border-radius:14px;
  background:rgba(255,255,255,.62);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.customer-detail-list dt{
  margin:0 0 6px;
  color:var(--text3);
  font-size:.74rem;
  font-weight:760;
}
.customer-detail-list dd{
  margin:0;
  color:var(--text);
  font-size:.92rem;
  font-weight:760;
  overflow-wrap:anywhere;
}
.customer-list-empty,
.customer-center-empty{
  min-height:220px;
}
.table-link{
  color:var(--accent-strong);
  font-weight:760;
}
.customer-admin-page{
  gap:12px;
}
.admin-page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:6px 2px 2px;
}
.admin-page-header h1{
  margin:0;
  font-family:var(--font-serif);
  font-weight:600;
  letter-spacing:.01em;
  font-size:1.7rem;
  line-height:1.15;
}
.admin-page-header p{
  margin:6px 0 0;
  color:var(--text3);
  font-size:.9rem;
}
.admin-page-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.admin-panel{
  min-width:0;
  border-radius:14px;
  padding:16px;
  gap:12px;
  background:rgba(255,255,255,.92);
}
.admin-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.admin-panel-head h2{
  margin:0;
  font-size:1rem;
}
.admin-panel-head p,
.admin-panel-head span{
  margin:0;
  color:var(--text3);
  font-size:.82rem;
}
.admin-filter-form{
  display:grid;
  grid-template-columns:minmax(220px,1.4fr) minmax(150px,.7fr) minmax(150px,.7fr) auto;
  gap:12px;
  align-items:end;
}
.admin-filter-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.admin-filter-actions .submit-btn,
.admin-filter-actions .ghost-link{
  min-height:44px;
  width:auto;
}
.admin-data-table{
  min-width:860px;
}
.admin-panel .table-wrap{
  min-width:0;
  max-width:100%;
}
.admin-data-table tbody tr.is-selected{
  background:rgba(230,73,0,.07);
}
.admin-data-table td strong,
.admin-data-table td small{
  display:block;
}
.admin-data-table td small{
  margin-top:4px;
  color:var(--text3);
  font-size:.76rem;
}
.admin-amount-due{
  color:#9A5B00;
  font-weight:800;
}
.admin-amount-clear{
  color:var(--green-dark);
  font-weight:760;
}
.admin-detail-head{
  align-items:flex-start;
}
.admin-stat-row{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  border:1px solid var(--sep2);
  border-radius:12px;
  overflow:hidden;
  background:rgba(245,242,235,.9);
}
.admin-stat-cell{
  min-width:0;
  padding:14px;
  border-right:1px solid var(--sep2);
}
.admin-stat-cell:last-child{
  border-right:none;
}
.admin-stat-cell span{
  display:block;
  color:var(--text3);
  font-size:.78rem;
  font-weight:760;
}
.admin-stat-cell strong{
  display:block;
  margin-top:6px;
  font-size:1.18rem;
  font-variant-numeric:tabular-nums;
}
.admin-ledger-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,.9fr);
  gap:12px;
}
.admin-subpanel{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px;
  border:1px solid var(--sep2);
  border-radius:12px;
  background:rgba(245,242,235,.78);
}
.admin-info-table{
  width:100%;
  border-collapse:collapse;
  font-size:.88rem;
}
.admin-info-table th,
.admin-info-table td{
  padding:11px 10px;
  border-bottom:1px solid var(--sep2);
  text-align:left;
  vertical-align:top;
}
.admin-info-table th{
  width:110px;
  color:var(--text3);
  font-weight:760;
}
.admin-info-table td{
  color:var(--text);
  overflow-wrap:anywhere;
}
.admin-info-table tr:last-child th,
.admin-info-table tr:last-child td{
  border-bottom:none;
}
.admin-topup-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr)) auto;
  gap:12px;
  align-items:end;
}
.admin-topup-form .submit-btn{
  min-height:44px;
  width:auto;
  white-space:nowrap;
}
.ledger-topup-redirect{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px;
  border-radius:14px;
  background:rgba(245,242,235,.72);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.ledger-topup-redirect p{
  margin:0;
  color:var(--text3);
  font-size:.88rem;
  line-height:1.5;
}
.ledger-topup-redirect .ghost-link{
  width:max-content;
}
.admin-empty-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  color:var(--text3);
}
.admin-empty-line strong{
  color:var(--text);
}
.empty-state-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:12px;
  min-height:180px;
  padding:24px;
  border-radius:18px;
  background:linear-gradient(180deg,rgba(245,242,235,.96) 0%,rgba(241,237,228,.92) 100%);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.empty-state-card h2{
  margin:0;
  font-size:1.26rem;
}
.empty-state-card p{
  margin:0;
  color:var(--text3);
}
.settings-store-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:16px;
  border-radius:18px;
  background:linear-gradient(135deg,rgba(255,255,255,.94) 0%,rgba(243,247,252,.92) 100%);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.settings-store-card h2{
  margin:0;
  font-size:1.24rem;
}
.settings-store-card p{
  margin:0;
  color:var(--text3);
  font-size:.88rem;
  line-height:1.5;
}
.meta-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.meta-chip{
  background:rgba(230,73,0,.08);
  color:var(--accent-strong);
}
.form-grid-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.field-span-2{
  grid-column:1 / -1;
}
.role-badge{
  background:rgba(230,73,0,.08);
  color:var(--accent-strong);
}
.status-badge.is-current{
  background:rgba(94,122,82,.12);
  color:var(--green-dark);
}
.status-badge.is-switchable{
  background:rgba(26,23,20,.06);
  color:var(--text2);
}
.status-badge.is-disabled{
  background:rgba(26,23,20,.08);
  color:var(--text4);
}
.role-badge-compact{
  min-height:24px;
  padding:0 8px;
  font-size:.7rem;
}
.staff-account-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.staff-account-card{
  padding:12px;
  border-radius:14px;
  background:rgba(248,250,253,.78);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.staff-account-card > form{
  display:none;
}
.staff-account-card.is-inactive{
  opacity:.72;
}
.staff-account-main{
  display:grid;
  grid-template-columns:minmax(112px,.9fr) minmax(132px,1fr) auto;
  gap:10px;
  align-items:end;
}
.staff-account-secondary{
  display:grid;
  grid-template-columns:minmax(180px,1fr) auto;
  gap:10px;
  align-items:end;
  margin-top:10px;
}
.staff-account-field{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}
.staff-account-field span{
  font-size:.72rem;
  font-weight:760;
  color:var(--text3);
}
.staff-account-badges{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:wrap;
  padding-bottom:5px;
}
.staff-account-input,
.staff-position-input{
  width:100%;
  min-height:38px;
  padding:8px 10px;
  border-radius:10px;
  font-size:.86rem;
  background:rgba(245,242,235,.72);
}
.staff-account-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:nowrap;
  padding-bottom:1px;
}
.staff-account-actions .ghost-btn{
  min-height:36px;
  min-width:46px;
  padding:7px 9px;
  border-radius:10px;
  font-size:.76rem;
}
.staff-action-delete{
  color:var(--accent-strong);
  background:rgba(230,73,0,.08);
}
.ghost-btn:disabled,
.ghost-link:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
}
@media (max-width:720px){
  .staff-account-main,
  .staff-account-secondary{
    grid-template-columns:1fr;
  }
  .staff-account-badges,
  .staff-account-actions{
    justify-content:flex-start;
  }
  .staff-account-actions{
    flex-wrap:wrap;
  }
}

.app-tabs,.tabs{
  display:flex;gap:0;padding:4px;border-radius:var(--r);background:var(--bg2);border:1px solid var(--sep);
}
.tab{
  flex:1;text-align:center;min-height:44px;padding:11px 0;font-size:.9rem;font-weight:650;letter-spacing:.01em;
  background:none;color:var(--text3);cursor:pointer;border:none;outline:none;border-radius:10px;
  transition:transform .18s ease,color .2s ease,background-color .22s ease,box-shadow .22s ease;
}
.tab.active{
  background:var(--card);color:var(--text);font-weight:700;
  box-shadow:0 1px 3px rgba(40,30,20,.08);
}
.tab:focus-visible{
  outline:3px solid rgba(230,73,0,.34);
  outline-offset:3px;
}
.tab-content{display:none}
.tab-content.active{display:block;animation:fadeUp .26s ease}

.form-area,.list-area,.stats-area{padding:18px 0 4px}
.order-app-shell{max-width:560px;margin:0 auto}
.order-app-shell .tabs{
  position:sticky;top:12px;z-index:var(--z-card-inline-open);margin:0 0 2px;
}
.fc,.cg{
  position:relative;border-radius:var(--r-lg);padding:18px;margin-bottom:12px;
}
.fc::after,.cg::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}
.fc{z-index:var(--z-base)}
.fc:focus-within{z-index:var(--z-card-inline-focus)}
.row{display:flex;gap:12px}
.col-n{flex:1.2;position:relative}
.col-p{flex:1}
.col-n.open{z-index:var(--z-card-inline-open)}
.col-n .input{padding-right:30px}
.col-n .arrow{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:.7rem;color:var(--text3);pointer-events:none;transition:transform .2s}
.col-n.open .arrow{transform:translateY(-50%) rotate(180deg)}
.dropdown{
  position:absolute;top:calc(100% + 8px);left:0;right:0;background:var(--card);
  border:1px solid var(--sep);border-radius:var(--r-lg);max-height:240px;overflow-y:auto;
  z-index:var(--z-dropdown);display:none;box-shadow:var(--shadow-lg);backdrop-filter:none;-webkit-backdrop-filter:none;
}
.col-n.open .dropdown{display:block}
.dd-i{padding:13px 15px;font-size:.95rem;cursor:pointer;border-bottom:.5px solid var(--sep);font-family:inherit}
.dd-i:last-child{border-bottom:none}
.dd-i:active,.dd-i:hover,.dd-i.is-active{background:var(--accent-light);color:var(--accent)}
.dd-e{padding:14px;text-align:center;color:var(--text3);font-size:.88rem}

.order-prototype-body .shell-header{display:none}
.order-prototype-main{
  max-width:none;
  padding:0;
}
.app{
  position:relative;z-index:var(--z-page);max-width:580px;margin:0 auto;
  padding:calc(env(safe-area-inset-top,0px) + 14px) 0 calc(env(safe-area-inset-bottom,20px) + 24px);
}
.order-page-app{
  max-width:580px;
}
.order-utility-bar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:0 16px 12px;padding:12px 14px;border-radius:var(--r-lg);
  background:var(--card);border:1px solid var(--sep);
  box-shadow:var(--shadow);
}
.order-utility-store{
  display:flex;flex-direction:column;gap:3px;min-width:0;
}
.order-utility-store strong{
  font-size:1rem;font-weight:780;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.order-utility-store small{
  color:var(--text3);font-size:.76rem;
}
.order-utility-actions{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;
}
.order-utility-actions .ghost-btn,
.order-utility-actions .ghost-link{
  min-height:44px;padding:8px 12px;border-radius:12px;font-size:.82rem;white-space:nowrap;
}
.order-page-app .tabs{
  position:sticky;top:calc(env(safe-area-inset-top,0px) + 10px);z-index:var(--z-card-inline-open);
  margin:0 16px 2px;box-shadow:0 10px 24px rgba(40,30,20,.06);
}
.order-page-app .tab:active{transform:scale(.985)}
.order-page-app .tab-content{padding-bottom:10px}
.order-page-app .form-area,
.order-page-app .list-area{
  padding:18px 16px 12px;
}
.order-page-app .fc:has(.col-n.open){z-index:var(--z-card-focus)}
.order-form-grid{
  display:flex;flex-direction:column;
}
.order-card{
  margin-bottom:12px;
}
.order-submit-btn{
  margin-top:2px;
}
.order-side-panel{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.order-side-panel > .order-card{
  margin-bottom:0;
}
.order-submit-wrap{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.order-submit-wrap .form-error-summary{
  margin:0;
}

.type-row{
  display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;
}
.type-chip{
  min-height:44px;padding:8px 12px;font-size:.78rem;font-weight:700;border:none;border-radius:999px;
  background:rgba(245,242,235,.95);color:var(--text3);cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
  transition:transform .15s ease,background-color .18s ease,color .18s ease,box-shadow .18s ease;
}
.type-chip.active{
  background:var(--accent);
  color:#fff;box-shadow:0 12px 22px rgba(230,73,0,.18);
  text-shadow:none;
}

.prototype-item-rows{
  display:flex;flex-direction:column;gap:12px;
}
.prototype-item-card{
  padding:12px;
  border-radius:22px;
  background:linear-gradient(180deg,rgba(252,253,255,.9) 0%,rgba(246,248,252,.86) 100%);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08),0 10px 22px rgba(40,30,20,.04);
}
.prototype-item-card + .prototype-item-card{
  padding-top:12px;border-top:none;
}
.item-card-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  padding:10px 12px;
  border:none;
  border-radius:16px;
  background:rgba(255,255,255,.96);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08),0 8px 18px rgba(40,30,20,.04);
  color:var(--text);
  cursor:pointer;
  text-align:left;
}
.item-card-toggle-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.item-card-summary-title{
  display:block;
  font-size:.92rem;
  font-weight:780;
  color:var(--text);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.item-card-summary-meta{
  display:block;
  font-size:.74rem;
  font-weight:650;
  color:var(--text3);
  line-height:1.3;
}
.item-card-toggle-side{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.item-card-toggle-amount{
  font-size:.86rem;
  font-weight:800;
  color:var(--accent-strong);
}
.item-card-toggle-hint{
  font-size:.72rem;
  font-weight:700;
  color:var(--text3);
}
.item-card-toggle-chevron{
  width:26px;
  height:26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(232,242,255,.9);
  color:var(--accent-strong);
  transition:transform .2s ease,background-color .2s ease;
}
.item-card-toggle-chevron svg{
  width:14px;
  height:14px;
}
.prototype-item-card.is-collapsed .item-card-toggle{
  margin-bottom:0;
}
.prototype-item-card.is-collapsed .item-card-toggle-chevron{
  transform:rotate(-90deg);
}
.prototype-item-card.is-collapsed .item-select-block,
.prototype-item-card.is-collapsed .item-row-controls,
.prototype-item-card.is-collapsed .item-archive-row{
  display:none;
}
.entry-mode-copy{
  margin-bottom:4px;
}
.item-select-block{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.item-category-block{
  margin-bottom:10px;
}
.item-color-block{
  margin-top:10px;
}
.prototype-item-card.is-color-pending .item-color-block{
  display:none;
}
.proj-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.proj-btn{
  min-height:44px;padding:10px 8px;font-size:.84rem;font-weight:650;border:none;border-radius:14px;
  background:rgba(245,242,235,.95);color:var(--text2);cursor:pointer;white-space:nowrap;
  transition:transform .15s ease,background-color .18s ease,color .18s ease,box-shadow .18s ease;
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.09);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.proj-btn.selected{
  background:var(--accent);color:#fff;
  box-shadow:0 10px 20px rgba(230,73,0,.22);
}
.proj-btn:active{transform:scale(.97)}
.other-in{
  width:100%;min-height:44px;padding:10px 10px;font-size:.84rem;border:1px solid rgba(60,50,40,.13);
  border-radius:14px;background:rgba(245,242,235,.95);color:var(--text);outline:none;text-align:center;
  transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.other-in:focus{
  background:#fff;border-color:rgba(230,73,0,.28);box-shadow:0 0 0 3px rgba(230,73,0,.1);
}
.other-in::placeholder{color:#B0B5C1;font-size:.82rem}
.item-row-controls{
  display:grid;
  grid-template-columns:minmax(0,1.28fr) minmax(120px,.92fr) minmax(90px,.72fr) 84px;
  grid-template-areas:"qty price total delete";
  gap:10px;
  align-items:stretch;
  margin-top:12px;
  padding:12px;
  border-top:none;
  border-radius:16px;
  background:linear-gradient(180deg,rgba(247,248,252,.94) 0%,rgba(242,245,249,.9) 100%);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.qty-row{
  grid-area:qty;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:6px;min-width:0;
}
.qty-label{font-size:.88rem;font-weight:650;color:var(--text2)}
.control-label{
  display:block;
  font-size:.78rem;
  font-weight:730;
  color:var(--text3);
  letter-spacing:.01em;
}
.control-label-faint{
  opacity:.68;
}
.qty-control-line{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:46px;
}
.qty-inline{
  display:inline-flex;align-items:center;background:rgba(245,242,235,.95);border-radius:14px;overflow:hidden;
  min-height:46px;
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08),0 8px 18px rgba(40,30,20,.04);
}
.qty-b{
  width:44px;height:46px;border:none;background:none;font-size:1.05rem;font-weight:700;color:var(--accent);
  cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .18s ease,color .18s ease;
}
.qty-b:active{background:rgba(230,73,0,.12)}
.qty-v{
  width:36px;text-align:center;font-size:.98rem;font-weight:760;color:var(--text);border:none;background:none;outline:none;
}
.qty-d{width:.5px;height:22px;background:rgba(60,50,40,.16)}
.qty-unit{
  font-size:.84rem;
  font-weight:700;
  color:var(--text3);
  padding:0 2px;
}
.item-price-wrap{
  grid-area:price;
  display:flex;flex-direction:column;gap:5px;
}
.item-price-wrap .control-label{
  color:var(--accent-strong);
}
.item-price-wrap .input{
  min-width:112px;
  min-height:46px;
  padding:11px 13px;
  border-color:rgba(230,73,0,.2);
  background:rgba(239,245,255,.96);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.74),0 8px 18px rgba(230,73,0,.08);
  caret-color:var(--accent);
  font-weight:700;
}
.item-price-wrap .input::placeholder{
  color:#7F93B8;
  font-weight:760;
}
.item-price-wrap .input:placeholder-shown{
  border-color:rgba(230,73,0,.24);
  background:rgba(236,244,255,.98);
  box-shadow:inset 0 0 0 1px rgba(230,73,0,.08),0 10px 20px rgba(230,73,0,.08);
}
.item-price-wrap .input:not(:placeholder-shown){
  background:rgba(255,255,255,.98);
  border-color:rgba(60,50,40,.16);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7),0 8px 18px rgba(40,30,20,.04);
}
.item-subtotal{
  grid-area:total;
  display:flex;flex-direction:column;gap:6px;align-items:flex-start;justify-content:flex-start;
}
.item-subtotal strong{
  display:flex;
  align-items:center;
  min-width:82px;
  min-height:46px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.98);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08),0 8px 18px rgba(40,30,20,.04);
  font-size:.96rem;
  font-weight:800;
  color:var(--text);
}
.item-action-cell{
  grid-area:delete;
  display:flex;
  flex-direction:column;
  gap:0;
  align-items:stretch;
  justify-content:flex-end;
}
.item-action-cell .control-label{
  display:none;
}
.prototype-item-card .mini-btn{
  width:100%;
  min-height:44px;
  padding:10px 12px;
  border:none;
  border-radius:14px;
  align-self:stretch;
  margin-left:0;
  background:#FFE5E1;
  color:var(--red);
  box-shadow:inset 0 0 0 1px rgba(168,58,43,.07);
  font-size:.88rem;
  font-weight:780;
}
.item-archive-row{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(150px,.78fr);
  gap:10px;
  margin-top:10px;
  padding-top:10px;
  border-top:.5px solid var(--sep2);
  align-items:start;
}
.item-note-wrap{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}
.item-note-input{
  min-height:64px;
  resize:vertical;
  padding:10px 12px;
  line-height:1.4;
}
.item-photo-wrap{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(246,248,252,.88);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.item-photo-group{
  display:flex;
  gap:6px;
}
.item-pbox{
  width:58px;
  min-width:58px;
  min-height:54px;
}
.item-pbox.is-drag-over{
  background:var(--accent-light);
  box-shadow:inset 0 0 0 2px rgba(230,73,0,.24),0 12px 24px rgba(230,73,0,.12);
}
.item-add-link{
  margin-top:8px;
  min-height:44px;
  width:auto;
  align-self:flex-end;
  padding:0 14px;
  border-radius:999px;
  background:rgba(243,245,249,.96);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08),0 8px 18px rgba(40,30,20,.04);
  font-size:.88rem;
  font-weight:760;
}

.order-payment-card{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.assigned-worker-card{
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:visible;
}
.assigned-worker-card:focus-within,
.assigned-worker-card.is-open{
  z-index:var(--z-card-focus);
}
.assigned-worker-field{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:10px;
  align-items:center;
}
.assigned-worker-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(245,242,235,.95);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
  color:var(--text2);
  font-size:.78rem;
  font-weight:780;
  white-space:nowrap;
}
.assigned-worker-picker{
  position:relative;
  min-width:0;
}
.assigned-worker-toggle{
  width:100%;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border:1px solid rgba(230,73,0,.18);
  border-radius:16px;
  background:rgba(255,255,255,.96);
  color:var(--text);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.74),0 10px 22px rgba(40,30,20,.05);
  cursor:pointer;
  font-weight:820;
  text-align:left;
  transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease;
}
.assigned-worker-toggle:hover,
.assigned-worker-picker.is-open .assigned-worker-toggle{
  border-color:rgba(230,73,0,.34);
  box-shadow:var(--shadow-focus);
}
.assigned-worker-toggle:active{
  transform:scale(.99);
}
.assigned-worker-toggle span:first-child{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.assigned-worker-chevron{
  flex-shrink:0;
  color:var(--accent-strong);
  font-size:.72rem;
  transition:transform .2s ease;
}
.assigned-worker-picker.is-open .assigned-worker-chevron{
  transform:rotate(180deg);
}
.assigned-worker-menu{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:var(--z-dropdown);
  display:none;
  padding:7px;
  border:1px solid rgba(255,255,255,.78);
  border-radius:18px;
  max-height:min(280px,60vh);
  overflow-y:auto;
  background:rgba(255,255,255,.98);
  box-shadow:var(--shadow-lg);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.assigned-worker-picker.is-open .assigned-worker-menu{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.assigned-worker-option{
  width:100%;
  min-height:48px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto auto;
  column-gap:10px;
  row-gap:1px;
  align-items:center;
  padding:9px 11px;
  border:none;
  border-radius:13px;
  background:transparent;
  color:var(--text);
  cursor:pointer;
  text-align:left;
  transition:background-color .18s ease,color .18s ease;
}
.assigned-worker-option::after{
  content:"";
  grid-column:2;
  grid-row:1 / span 2;
  width:18px;
  height:18px;
  border-radius:999px;
  background:transparent;
}
.assigned-worker-option span,
.assigned-worker-option small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.assigned-worker-option span{
  font-size:.92rem;
  font-weight:820;
}
.assigned-worker-option small{
  color:var(--text3);
  font-size:.72rem;
  font-weight:680;
}
.assigned-worker-option:hover,
.assigned-worker-option:focus-visible{
  background:rgba(230,73,0,.08);
  color:var(--accent-strong);
}
.assigned-worker-option.is-selected{
  background:var(--accent-light);
  color:var(--accent-strong);
}
.assigned-worker-option.is-selected::after{
  content:"✓";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--accent);
  color:#fff;
  font-size:.66rem;
  font-weight:900;
}
.assigned-worker-option.is-selected small{
  color:var(--accent-strong);
}
.assigned-worker-help{
  margin:0;
  color:var(--text3);
  font-size:.78rem;
  font-weight:650;
  line-height:1.45;
}
.order-items-card,
.order-summary-card{
  display:flex;
  flex-direction:column;
}
.order-items-card{
  gap:8px;
}
.order-summary-card{
  gap:10px;
}
.pay-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.pay-icon{
  width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  border-radius:10px;
  background:rgba(243,246,250,.96);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08),0 6px 14px rgba(40,30,20,.05);
  color:#728099;
}
.pay-icon svg{
  width:16px;
  height:16px;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.pay-label{
  display:inline-block;
  min-width:0;
  font-weight:760;
  letter-spacing:.01em;
  text-align:center;
  white-space:nowrap;
}
.pay-btn{
  min-width:0;min-height:58px;padding:12px 10px;font-size:.92rem;font-weight:650;
  border:1px solid var(--sep);border-radius:var(--r);background:var(--bg2);color:var(--text2);
  cursor:pointer;text-align:center;display:flex;align-items:center;justify-content:center;gap:6px;position:relative;
  transition:transform .25s ease,background-color .25s ease,border-color .25s ease,box-shadow .25s ease,color .25s ease;
  box-shadow:none;
}
.pay-btn:active{transform:scale(.97)}
.pay-btn.s-c{
  border-color:rgba(230,73,0,.3);background:var(--accent-light);color:var(--accent-strong);font-weight:800;
  box-shadow:0 0 0 4px rgba(230,73,0,.12),0 12px 22px rgba(230,73,0,.1);
}
.pay-btn.s-m{
  border-color:rgba(230,73,0,.3);background:var(--accent-light);color:var(--accent-strong);font-weight:800;
  box-shadow:0 0 0 4px rgba(230,73,0,.12),0 12px 22px rgba(230,73,0,.1);
}
.pay-btn.s-b{
  border-color:rgba(230,73,0,.3);background:var(--accent-light);color:var(--accent-strong);font-weight:800;
  box-shadow:0 0 0 4px rgba(230,73,0,.12),0 12px 22px rgba(230,73,0,.1);
}
.pay-btn.s-p{
  border-color:rgba(230,73,0,.26);background:var(--blue-bg);color:var(--accent-strong);font-weight:800;
  box-shadow:0 0 0 4px rgba(230,73,0,.12),0 12px 22px rgba(230,73,0,.1);
}
.pay-btn .check{
  display:none;position:absolute;top:-7px;right:-7px;width:22px;height:22px;border-radius:50%;
  font-size:.64rem;font-weight:900;color:#fff;align-items:center;justify-content:center;
  box-shadow:0 8px 16px rgba(40,30,20,.16),0 0 0 3px rgba(255,255,255,.9);
}
.pay-btn.s-c .check,.pay-btn.s-m .check,.pay-btn.s-b .check,.pay-btn.s-p .check{display:flex}
.pay-btn.s-c .check{background:var(--accent)}
.pay-btn.s-m .check{background:var(--accent)}
.pay-btn.s-b .check{background:var(--accent)}
.pay-btn.s-p .check{background:var(--accent)}
.pay-btn.s-c .pay-icon{
  background:#FBE7DF;
  color:#C23A00;
}
.pay-btn.s-m .pay-icon{
  background:#FBE7DF;
  color:#C23A00;
}
.pay-btn.s-b .pay-icon{
  background:#FBE7DF;
  color:#C23A00;
}
.pay-btn.s-p .pay-icon{
  background:#FBE7DF;
  color:#C23A00;
}
.pay-btn:disabled,
.pay-btn.is-disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
.pay-btn:disabled .check,
.pay-btn.is-disabled .check{
  display:none;
}
.payment-help{
  margin-top:2px;
  padding:10px 12px;
  border-radius:14px;
  background:linear-gradient(180deg,rgba(246,249,255,.92) 0%,rgba(238,244,252,.9) 100%);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.1);
  color:var(--text2);
  font-size:.86rem;
  font-weight:650;
  line-height:1.45;
}
.payment-balance-panel{
  margin-top:2px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:stretch;
  padding:10px;
  border-radius:16px;
  background:linear-gradient(180deg,rgba(250,251,254,.98) 0%,rgba(243,246,250,.96) 100%);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08),0 8px 18px rgba(40,30,20,.04);
  gap:8px;
}
.payment-meta-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.payment-balance-overview{
  display:contents;
  margin-bottom:0;
}
.payment-meta-chip{
  min-height:56px;
  padding:8px 10px;
  border-radius:14px;
  background:rgba(255,255,255,.88);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.1);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.payment-meta-chip span{
  font-size:.72rem;
  font-weight:700;
  color:var(--text3);
  letter-spacing:.02em;
}
.payment-meta-chip strong{
  margin-top:3px;
  font-size:1rem;
  font-weight:820;
  color:var(--text);
}
.payment-meta-chip-accent{
  background:linear-gradient(180deg,rgba(246,249,255,.96) 0%,rgba(236,243,255,.92) 100%);
}
.payment-meta-chip-accent strong{
  color:var(--accent);
}
.payment-field{
  gap:5px;
}
.payment-field span{
  font-size:.82rem;
  font-weight:720;
  color:var(--text2);
}
.payment-field-inline{
  margin-top:0;
  min-height:56px;
  padding:8px 10px;
  border-radius:14px;
  background:rgba(255,255,255,.9);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.1);
  justify-content:space-between;
  gap:4px;
}
.payment-field-inline span{
  font-size:.72rem;
  font-weight:700;
  color:var(--text3);
  white-space:nowrap;
}
.payment-field .input{
  min-height:0;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  font-size:1rem;
  font-weight:820;
}
.payment-field .input:focus{
  transform:none;
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}

.price-row{display:flex;gap:12px;align-items:stretch}
.price-row .input{flex:1}
.order-summary-row{
  display:flex;
  align-items:stretch;
}
.order-summary-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}
.order-total-card{
  flex:1;min-height:50px;padding:12px 14px;border-radius:var(--r);background:var(--bg2);
  box-shadow:inset 0 0 0 1px var(--sep);display:flex;flex-direction:column;justify-content:center;
}
.order-total-label{
  font-size:.72rem;font-weight:700;color:var(--text3);letter-spacing:.04em;text-transform:uppercase;
}
.order-total-card strong{
  margin-top:4px;font-size:1.3rem;font-weight:600;color:var(--text);
}
.photo-grp{display:flex;gap:8px;flex-shrink:0}
.pbox{
  width:62px;min-height:56px;border-radius:16px;background:rgba(245,242,235,.95);
  display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;position:relative;
  overflow:hidden;transition:transform .15s ease,box-shadow .2s ease,background-color .2s ease;flex-shrink:0;
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.1);
}
.pbox:active{transform:scale(.96)}
.box-icon{
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:rgba(241,244,249,.98);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08),0 6px 12px rgba(40,30,20,.05);
  color:#7d8ba3;
}
.box-icon svg{
  width:17px;
  height:17px;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.box-icon-tag{color:#d58b22}
.box-icon-garment{color:#5871d6}
.pbox .cl{
  font-size:.72rem;
  font-weight:720;
  color:var(--text3);
  margin-top:4px;
  line-height:1;
}
.pbox.has{background:#fff}
.pbox .thumb{position:absolute;inset:0;object-fit:cover;width:100%;height:100%;border-radius:16px}
.item-pbox-thumbs{
  position:absolute;
  inset:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-rows:1fr;
  gap:1px;
  padding:2px;
}
.pbox.has .item-pbox-thumbs .thumb{
  position:static;
  width:100%;
  height:100%;
  min-height:0;
  border-radius:5px;
}
.pbox.has.is-single .item-pbox-thumbs{
  display:block;
  padding:0;
}
.pbox.has.is-single .item-pbox-thumbs .thumb{
  height:100%;
  border-radius:16px;
}
.item-pbox-count{
  position:absolute;
  left:4px;
  bottom:4px;
  z-index:var(--z-preview-close);
  min-height:18px;
  display:inline-flex;
  align-items:center;
  padding:0 6px;
  border-radius:999px;
  background:rgba(26,23,20,.72);
  color:#fff;
  font-size:.66rem;
  font-weight:820;
  line-height:1;
}
.pbox .rm{
  position:absolute;top:4px;right:4px;width:19px;height:19px;background:rgba(168,58,43,.92);color:#fff;border:none;border-radius:50%;
  font-size:.55rem;font-weight:900;cursor:pointer;z-index:var(--z-preview-close);display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 12px rgba(0,0,0,.16);
}
.compact-note-input{
  margin-top:0;
  min-height:68px;
  padding:10px 12px;
}
.order-note-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(245,242,235,.95);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
  font-size:.74rem;
  font-weight:760;
  color:var(--text2);
  letter-spacing:.02em;
  white-space:nowrap;
}

.item-rows{display:flex;flex-direction:column;gap:10px}
.item-row{
  display:grid;grid-template-columns:1.5fr .6fr .8fr auto auto;gap:10px;align-items:end;
  padding:12px;border-radius:18px;background:rgba(245,242,235,.88);box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.mini-field{display:flex;flex-direction:column;gap:6px}
.mini-field span{font-size:.8rem;font-weight:700;color:var(--text3)}
.line-total{
  padding:12px 14px;border-radius:14px;background:#fff;box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);font-weight:760;
}
.mini-btn{
  min-height:44px;padding:12px 14px;border:none;border-radius:14px;background:rgba(168,58,43,.12);color:var(--red);font-weight:760;cursor:pointer;
}

.photo-panel{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.photo-tile{
  flex:1;min-width:160px;padding:18px;border-radius:18px;background:rgba(245,242,235,.92);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);cursor:pointer;
}
.tile-title{display:block;font-weight:760}
.tile-hint{display:block;margin-top:6px;color:var(--text3)}

.list-tools{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.list-footer-actions{
  display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:14px;
}

.search-box{position:relative;margin-bottom:10px}
.search-box input{
  width:100%;padding:13px 14px 13px 38px;border:1px solid var(--sep);border-radius:var(--r);background:var(--bg2);outline:none;
  box-shadow:var(--shadow);backdrop-filter:none;-webkit-backdrop-filter:none;
}
.search-box .si{position:absolute;left:13px;top:50%;transform:translateY(-50%);font-size:.95rem;color:var(--text3)}
.workbench-meta{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding-top:16px;padding-bottom:16px;
}
.workbench-copy h1{
  margin:6px 0 6px;
  font-size:1.18rem;
  line-height:1.2;
}
.workbench-copy p{
  margin:0;
  color:var(--text3);
  font-size:.88rem;
}
.fbar{display:flex;gap:7px;margin-bottom:10px;flex-wrap:wrap}
.business-fbar{margin-bottom:8px}
.fch{
  min-height:44px;padding:8px 12px;font-size:.78rem;font-weight:650;border:none;border-radius:var(--r-pill);
  background:var(--card);color:var(--text2);cursor:pointer;box-shadow:none;border:1px solid var(--sep);
  display:inline-flex;align-items:center;justify-content:center;
}
.fch.active{background:var(--text);color:#fff;border-color:var(--text);box-shadow:none}
.fch.batch{background:var(--orange-bg);color:var(--orange-dark)}
.bbar{
  margin-bottom:10px;display:none;background:var(--card);border:1px solid var(--sep);
  border-radius:var(--r-lg);padding:12px 14px;align-items:center;justify-content:space-between;gap:8px;box-shadow:var(--shadow);
}
.bbar.show{display:flex}
.batch-field{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:260px;
  flex:1 1 320px;
}
.batch-customer-select{
  min-height:44px;
  padding:8px 12px;
  font-size:.85rem;
}
.bbar input[type="date"]{
  min-height:44px;padding:8px 10px;font-size:.85rem;border:1px solid rgba(60,50,40,.14);border-radius:11px;background:rgba(245,242,235,.88);outline:none;color:var(--text);
}
.bbtn{
  min-height:44px;padding:9px 13px;font-size:.8rem;font-weight:760;border:none;border-radius:12px;
  background:var(--orange);color:#fff;cursor:pointer;box-shadow:0 10px 18px rgba(176,122,46,.18);
}

.cg{
  overflow:visible;
  padding:0;
  border-radius:var(--r);
}
.cg:has(.ri-action-menu[open]){
  z-index:var(--z-card-inline-open);
}
.ch{
  padding:14px 16px;
  border-bottom:.5px solid var(--sep);
  background:linear-gradient(180deg,rgba(255,255,255,.22) 0%,rgba(255,255,255,.04) 100%);
}
.ch-main{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.ch-left,
.ch-money{
  min-width:0;
}
.ch-person{
  display:flex;
  align-items:baseline;
  gap:7px;
  min-width:0;
}
.ch-name{
  min-width:0;
  color:var(--text);
  font-size:1.08rem;
  font-weight:500;
  line-height:1.25;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ch-name .ph,.ph{
  flex:0 0 auto;
  color:var(--text3);
  font-size:.76rem;
  font-weight:400;
  line-height:1.2;
}
.ch-count{
  margin-top:3px;
  color:var(--text3);
  font-size:.76rem;
}
.ch-money{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:3px;
  text-align:right;
}
.ch-money span:not(.cs){
  color:var(--text3);
  font-size:.7rem;
}
.ch-money strong{
  color:var(--text);
  font-size:1.18rem;
  font-weight:500;
  line-height:1.08;
  font-variant-numeric:tabular-nums;
}
.cs,
.order-chip{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:3px 8px;
  border-radius:999px;
  font-size:.72rem;
  font-weight:500;
  line-height:1.15;
  white-space:nowrap;
}
.cs-u,
.order-chip-warning{
  background:var(--orange-bg);
  color:var(--orange-dark);
}
.order-chip-success{
  background:var(--green-bg);
  color:var(--green-dark);
}
.order-chip-neutral{
  background:var(--sep2);
  color:var(--text2);
}
.order-chip-muted{
  background:var(--sep2);
  color:var(--text3);
}
.order-chip-outsourced{
  background:var(--teal-bg);
  color:#167386;
}
.ri{
  position:relative;
  display:block;
  border-bottom:.5px solid var(--sep2);
}
.ri:last-child{border-bottom:none}
.ri::before{
  content:"";
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:0 999px 999px 0;
}
.ri.is-laundry::before{background:#378ADD}
.ri.is-alteration::before{background:#7F77DD}
.ri-l{
  min-width:0;
  padding:12px 14px 12px 16px;
}
.ri-summary{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.ri-summary-main{
  flex:1;
  min-width:0;
}
.ri-title-row{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.order-type-mark{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:var(--text3);
  font-size:.74rem;
  line-height:1.2;
  white-space:nowrap;
}
.order-type-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:currentColor;
}
.order-type-mark.is-laundry .order-type-dot{background:#378ADD}
.order-type-mark.is-alteration .order-type-dot{background:#7F77DD}
.ri-title{
  min-width:0;
  color:var(--text);
  font-size:.9rem;
  font-weight:400;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.ri-mobile-status{
  display:none;
}
.ri-summary-side{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
}
.ri-price{
  color:var(--text2);
  font-size:.84rem;
  font-weight:400;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.ri-toggle{
  width:30px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--sep2);
  border-radius:50%;
  background:var(--card-solid);
  color:var(--text3);
  cursor:pointer;
  line-height:1;
}
.ri-toggle:hover{
  background:var(--accent-light);
  color:var(--accent-strong);
}
.ri-status-row{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin-top:8px;
}
.stage-steps{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}
.stage-step{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:3px 7px;
  border-radius:999px;
  color:var(--text4);
  font-size:.7rem;
  font-weight:400;
  line-height:1.15;
}
.stage-step.is-past{
  color:var(--text3);
}
.stage-step.is-current{
  background:var(--sep2);
  color:var(--text);
  font-weight:500;
}
.ri-chip-row{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
}
.ri-details{
  margin-top:10px;
  padding-top:10px;
  border-top:.5px solid var(--sep2);
}
.ri-detail-meta{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.ri-time{
  color:var(--text3);
  font-size:.72rem;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.ri-item-list{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-top:9px;
}
.ri-item{
  padding:0;
  background:none;
  border-radius:0;
  box-shadow:none;
}
.ri-item-head{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.ri-item-name{
  color:var(--text);
  font-size:.88rem;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.ri-item-note{
  margin-top:3px;
  color:var(--text3);
  font-size:.76rem;
  line-height:1.42;
}
.ri-unit-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:8px;
}
.ri-unit-row{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  min-width:0;
}
.ri-unit-code,
.ri-light-tag{
  min-height:24px;
  display:inline-flex;
  align-items:center;
  border-radius:8px;
  padding:3px 7px;
  font-size:.72rem;
  line-height:1.15;
}
.ri-unit-code{
  background:#F2F4F7;
  color:var(--text2);
  font-weight:650;
}
.ri-light-tag{
  border:1px solid var(--sep2);
  color:var(--text3);
}
.ri-light-tag.is-bound{
  border-color:#8AD4B4;
  background:#EAF8F1;
  color:#087443;
}
.ri-unit-actions{
  display:inline-flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
}
.ab-unit{
  min-height:28px;
  padding:5px 8px;
  border-radius:8px;
  font-size:.7rem;
}
.ab-unit-primary{
  border-color:#0E9384;
  background:#0E9384;
  color:#fff;
}
.ri-photos{display:flex;gap:5px;margin-top:8px;flex-wrap:wrap}
.mt{width:44px;height:44px;border-radius:8px;object-fit:cover;cursor:pointer;box-shadow:0 6px 12px rgba(40,30,20,.08)}
.ri-acts{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  margin-top:11px;
  flex-wrap:wrap;
}
.ri-action-group{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.ab{
  min-height:34px;
  padding:7px 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  border:1px solid var(--sep2);
  border-radius:8px;
  background:var(--card-solid);
  color:var(--text2);
  box-shadow:none;
  cursor:pointer;
  font-size:.75rem;
  font-weight:500;
  line-height:1.1;
  white-space:nowrap;
}
.ab-primary{
  border-color:#185FA5;
  background:#185FA5;
  color:#fff;
}
.ab-secondary{
  background:var(--card-solid);
  color:var(--text2);
}
.ab-x{
  border-color:transparent;
  background:transparent;
  color:var(--red);
}
.ri-action-menu{
  position:relative;
  display:inline-flex;
}
.ri-action-mobile-more{
  display:none;
}
.ri-action-menu summary{list-style:none}
.ri-action-menu summary::-webkit-details-marker{display:none}
.ab-menu::after{
  content:"▾";
  color:currentColor;
  font-size:.66rem;
}
.ab-more{
  width:34px;
  padding:0;
  font-size:1rem;
}
.ri-action-menu[open]{
  z-index:var(--z-dropdown);
}
.ri-action-menu[open] .ab-menu,
.ri-action-menu[open] .ab-more{
  background:var(--accent-light);
  color:var(--accent-strong);
}
.ri-action-menu-list{
  position:absolute;
  left:0;
  top:calc(100% + 6px);
  z-index:var(--z-dropdown);
  min-width:138px;
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:6px;
  border:1px solid var(--glass-border);
  border-radius:10px;
  background:var(--card-solid);
  box-shadow:var(--shadow-lg);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.ri-action-more .ri-action-menu-list{
  left:auto;
  right:0;
}
.ri-action-menu-list .ab{
  width:100%;
  min-height:34px;
  justify-content:flex-start;
  border:none;
  background:transparent;
}
.ri-action-menu-list .ab:hover{
  background:var(--accent-light);
  color:var(--accent-strong);
}
.ri-action-menu-list .ab-x:hover{
  background:var(--red-bg);
  color:var(--red);
}

.toast{
  position:fixed;left:50%;bottom:28px;transform:translateX(-50%) translateY(16px);background:rgba(26,23,20,.92);
  color:#fff;padding:14px 18px;border-radius:var(--r);font-size:1rem;font-weight:700;z-index:var(--z-toast);opacity:0;
  pointer-events:none;transition:transform .28s ease,opacity .28s ease,background-color .28s ease;
  box-shadow:0 24px 48px rgba(0,0,0,.18);display:flex;align-items:center;gap:12px;max-width:min(92vw,520px);
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0);pointer-events:auto}
.toast-success{background:rgba(24,91,49,.94)}
.toast-error{background:rgba(129,33,27,.95)}
.toast-global{width:max-content}
.toast-action{
  min-height:44px;padding:0 12px;border:none;border-radius:999px;background:rgba(255,255,255,.14);
  color:#fff;font-size:.82rem;font-weight:760;cursor:pointer;white-space:nowrap;
}
.pvov,.sign-ov{
  position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:var(--z-overlay);background:rgba(26,23,20,.22);backdrop-filter:blur(12px);
}
.pvov.show,.sign-ov.show{display:flex}
.pvov img{max-width:92%;max-height:85vh;border-radius:18px;object-fit:contain;box-shadow:0 28px 60px rgba(0,0,0,.28)}
.pv-x{position:absolute;top:14px;right:14px;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;border:none;font-size:1.1rem;cursor:pointer;z-index:var(--z-preview-close)}
.sign-box{
  background:rgba(255,255,255,.94);border:1px solid rgba(255,255,255,.78);border-radius:26px;width:94%;max-width:408px;
  overflow:hidden;box-shadow:var(--shadow-lg);max-height:90vh;overflow-y:auto;
}
.sign-h{padding:16px 18px;border-bottom:.5px solid var(--sep);text-align:center;font-size:1.02rem;font-weight:760}
.sign-info{padding:12px 18px;background:rgba(245,242,235,.9);font-size:.82rem;color:var(--text2)}
.sr{display:flex;justify-content:space-between;padding:3px 0}
.sr-v{font-weight:700;color:var(--text)}
.sign-imgs{padding:14px 18px;border-top:.5px solid var(--sep)}
.sign-imgs-row{display:flex;gap:10px}
.sign-img-item{flex:1;border-radius:16px;overflow:hidden;background:rgba(245,242,235,.9);display:flex;align-items:center;justify-content:center;min-height:84px;position:relative}
.sign-img-item img{width:100%;height:84px;object-fit:cover;border-radius:16px}
.sign-img-item .img-label{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);font-size:.65rem;font-weight:600;color:#fff;background:rgba(0,0,0,.5);padding:2px 8px;border-radius:4px}
.sign-cw{padding:14px 18px;text-align:center;border-top:.5px solid var(--sep)}
.sign-c{
  border:1.5px dashed rgba(60,50,40,.22);border-radius:16px;background:#FEFEFE;touch-action:none;width:100%;height:130px;cursor:crosshair;
}
.sign-f{padding:12px 14px;display:flex;gap:8px;border-top:.5px solid var(--sep)}
.sign-f button{flex:1;min-height:44px;padding:12px;font-size:.92rem;font-weight:650;border:none;border-radius:14px;cursor:pointer}
.s-cl{background:var(--bg);color:var(--text)}
.d-c{background:var(--bg2);color:var(--text2)}
.s-ok{background:var(--teal);color:#fff}
.payment-box{
  max-width:420px;
}
.topup-box{
  max-width:520px;
}
.topup-intro{
  text-align:left;
}
.topup-form{
  margin:0;
}
.topup-fields{
  gap:12px;
}
.topup-customer-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:220px;
  overflow:auto;
}
.topup-customer-option{
  width:100%;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:11px 12px;
  border:none;
  border-radius:14px;
  background:rgba(245,242,235,.9);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
  color:var(--text);
  cursor:pointer;
  text-align:left;
}
.topup-customer-option strong{
  font-size:.92rem;
  font-weight:780;
}
.topup-customer-option span{
  min-width:0;
  color:var(--text3);
  font-size:.78rem;
  font-weight:650;
  text-align:right;
}
.topup-customer-option:hover{
  background:var(--accent-light);
  color:var(--accent-strong);
}
.topup-selected{
  padding:10px 12px;
  border-radius:14px;
  background:rgba(94,122,82,.1);
  color:var(--green-dark);
  box-shadow:inset 0 0 0 1px rgba(94,122,82,.14);
}
.topup-empty{
  padding:12px;
  border-radius:14px;
  background:rgba(245,242,235,.72);
  color:var(--text3);
  text-align:center;
  font-size:.84rem;
  font-weight:650;
}
.payment-fields{
  text-align:left;
  border-top:.5px solid var(--sep);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.payment-fields .field-label{
  gap:6px;
}
.payment-fields .input{
  min-height:46px;
}
.light-tag-box{
  width:min(94vw,640px);
  max-width:640px;
  border-radius:22px;
  background:#fff;
}
.light-tag-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px 14px;
  border-bottom:1px solid #EAECF0;
}
.light-tag-kicker{
  color:#667085;
  font-size:.74rem;
  font-weight:700;
  line-height:1.2;
}
.light-tag-title{
  margin-top:3px;
  color:#101828;
  font-size:1.08rem;
  font-weight:800;
  line-height:1.25;
}
.light-tag-progress{
  min-width:56px;
  min-height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#EEF8FB;
  color:#0E6F7E;
  font-size:.86rem;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
.light-tag-progress.is-complete{
  background:#ECFDF3;
  color:#087443;
}
.light-tag-order-summary{
  display:grid;
  grid-template-columns:1fr 1.25fr .7fr;
  gap:10px;
  padding:12px 20px;
  background:#F8FAFC;
  border-bottom:1px solid #EAECF0;
}
.light-tag-summary-item{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.light-tag-summary-item span{
  color:#667085;
  font-size:.7rem;
  font-weight:700;
}
.light-tag-summary-item strong{
  min-width:0;
  color:#101828;
  font-size:.84rem;
  font-weight:800;
  line-height:1.25;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.light-tag-unit-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:min(56vh,500px);
  overflow:auto;
  padding:14px 20px 16px;
}
.light-tag-bind-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(220px,.78fr);
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid #EAECF0;
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 18px rgba(40,30,20,.05);
}
.light-tag-bind-row.is-bound{
  border-color:#A6F4C5;
  background:#F6FEF9;
}
.light-tag-bind-main{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}
.light-tag-row-top{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.light-tag-code,
.light-tag-status{
  min-height:24px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:3px 8px;
  font-size:.72rem;
  font-weight:800;
  line-height:1.1;
}
.light-tag-code{
  max-width:100%;
  background:#F2F4F7;
  color:#344054;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.light-tag-status{
  flex:0 0 auto;
  background:#FFF6ED;
  color:#B93815;
}
.light-tag-bind-row.is-bound .light-tag-status{
  background:#ECFDF3;
  color:#087443;
}
.light-tag-bind-main strong{
  color:#101828;
  font-size:.86rem;
  line-height:1.25;
}
.light-tag-bind-main span{
  color:#667085;
  font-size:.78rem;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.light-tag-scanner{
  padding:14px 20px 0;
  border-bottom:1px solid #EAECF0;
  background:#fff;
}
.light-tag-scanner[hidden]{
  display:none;
}
.light-tag-scanner-frame{
  position:relative;
  overflow:hidden;
  border-radius:16px;
  background:#101828;
  aspect-ratio:16/9;
}
.light-tag-scanner-frame video{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.light-tag-scanner-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 0 12px;
}
.light-tag-scanner-meta span{
  min-width:0;
  color:#475467;
  font-size:.8rem;
  font-weight:700;
  line-height:1.35;
}
.light-tag-bind-field{
  display:grid;
  grid-template-columns:minmax(0,1fr) 64px 64px 72px;
  gap:8px;
  min-width:0;
}
.light-tag-input{
  min-height:42px;
  padding:9px 12px;
  border-radius:12px;
  border:1px solid #D0D5DD;
  background:#fff;
  color:#101828;
  font-size:.86rem;
  box-shadow:none;
}
.light-tag-input:focus{
  border-color:#17A2B8;
  box-shadow:0 0 0 4px rgba(23,162,184,.12);
}
.light-tag-bind-field .ab{
  min-height:42px;
  border-radius:12px;
}
.light-tag-scan-btn{
  border-color:#B9E6FE;
  background:#F0F9FF;
  color:#026AA2;
}
.light-tag-footer{
  padding:12px 20px 16px;
  background:#fff;
}
.light-tag-footer .d-c,
.light-tag-footer .s-ok{
  border-radius:14px;
}
@media (max-width:640px){
  .light-tag-box{
    width:min(94vw,430px);
  }
  .light-tag-modal-head{
    padding:16px 16px 12px;
  }
  .light-tag-order-summary{
    grid-template-columns:1fr 1fr;
    padding:12px 16px;
  }
  .light-tag-unit-list{
    padding:12px 16px 14px;
  }
  .light-tag-scanner{
    padding:12px 16px 0;
  }
  .light-tag-scanner-meta{
    align-items:stretch;
    flex-direction:column;
  }
  .light-tag-bind-row{
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .light-tag-bind-field{
    grid-template-columns:1fr;
  }
  .light-tag-bind-field .ab{
    width:100%;
  }
}
.pagination-bar{
  display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:14px;
  padding:12px 14px;border-radius:18px;background:rgba(255,255,255,.74);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08),0 10px 20px rgba(40,30,20,.05);
}
.pagination-copy{
  min-width:110px;
  text-align:center;
  color:var(--text2);
  font-size:.88rem;
  font-weight:760;
  font-variant-numeric:tabular-nums;
}
.batch-confirm-box{
  max-width:460px;
}
.batch-confirm-info{
  padding:14px 18px;
}
.batch-confirm-copy{
  margin:0;
  padding:14px 18px 0;
  color:var(--text3);
  font-size:.88rem;
  line-height:1.5;
}
.ui-progress-open{overflow:hidden}
.ui-progress-overlay{
  position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:var(--z-overlay);
  background:rgba(26,23,20,.2);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
}
.ui-progress-card{
  min-width:min(88vw,280px);padding:26px 24px;border-radius:var(--r-lg);background:var(--card);
  box-shadow:var(--shadow-lg);border:1px solid var(--sep);display:flex;flex-direction:column;align-items:center;gap:14px;
}
.ui-progress-card p{
  margin:0;
  font-size:.94rem;
  font-weight:700;
  color:var(--text2);
  text-align:center;
}
.ui-progress-spinner{
  width:34px;height:34px;border-radius:50%;border:3px solid rgba(230,73,0,.16);border-top-color:var(--accent);
  animation:uiSpin .8s linear infinite;
}

.print-body{background:#f5f7fb;padding:24px;color:#11131A}
.print-shell{max-width:860px;margin:0 auto}
.print-actions{display:flex;justify-content:flex-end;gap:10px;margin-bottom:16px}
.print-actions .submit-btn{width:auto;min-width:128px;padding:12px 18px;border-radius:14px}
.print-card{background:#fff;border-radius:16px;padding:20px;border:1px solid #e6e9f0;box-shadow:0 14px 30px rgba(40,30,20,.08)}
.receipt-shell{max-width:360px}
.receipt-card{width:80mm;max-width:100%;margin:0 auto;padding:14px 12px;border-radius:8px;font-size:12px;line-height:1.36}
.receipt-header{text-align:center;padding-bottom:10px;border-bottom:1px dashed #98A2B3}
.receipt-store{font-size:18px;font-weight:820}
.receipt-title{margin-top:4px;color:#475467;font-weight:700}
.receipt-order-no{margin-top:6px;font-size:14px;font-weight:800;letter-spacing:0}
.receipt-section{padding:10px 0;border-bottom:1px dashed #D0D5DD}
.receipt-meta,.receipt-lines,.receipt-totals{display:flex;flex-direction:column;gap:5px}
.receipt-meta div,.receipt-lines div,.receipt-totals div,.receipt-proof-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
}
.receipt-meta span,.receipt-lines span,.receipt-totals span,.receipt-note span,.receipt-proof-head span{
  color:#667085;font-weight:700;white-space:nowrap;
}
.receipt-meta strong,.receipt-lines strong,.receipt-totals strong,.receipt-proof-head strong{
  text-align:right;font-weight:780;font-variant-numeric:tabular-nums;
}
.receipt-table{width:100%;border-collapse:collapse;font-size:12px}
.receipt-table th,.receipt-table td{padding:7px 0;border-bottom:1px solid #EAECF0;text-align:left;vertical-align:top}
.receipt-table th{font-size:11px;color:#667085}
.receipt-table th:nth-child(2),.receipt-table td:nth-child(2){width:24px;text-align:center}
.receipt-table th:nth-child(3),.receipt-table td:nth-child(3){width:58px;text-align:right;font-variant-numeric:tabular-nums}
.receipt-table td strong,.receipt-table td span{display:block}
.receipt-table td span{margin-top:3px;color:#667085;font-size:11px;line-height:1.3}
.receipt-note p{margin:4px 0 0;color:#344054;white-space:pre-wrap}
.receipt-proof{border-bottom:1px dashed #98A2B3}
.receipt-signature{display:block;width:100%;max-height:86px;object-fit:contain;margin-top:8px;border:1px solid #EAECF0;border-radius:6px;background:#fff}
.receipt-proof-copy{margin-top:6px;color:#667085;font-size:11px;text-align:center}
.receipt-footer{padding-top:10px;text-align:center;color:#667085;font-size:11px;line-height:1.5}
.wash-label-body{background:#F4F1EA}
.wash-label-shell{max-width:720px}
.wash-labels{display:grid;grid-template-columns:repeat(auto-fill,minmax(58mm,1fr));gap:12px;justify-items:center}
.wash-label{
  width:58mm;min-height:35mm;padding:3mm;border:1px solid #11131A;border-radius:4px;background:#fff;
  display:flex;flex-direction:column;gap:2mm;font-size:9px;line-height:1.22;color:#11131A;
}
.wash-label-top,.wash-label-foot{display:flex;align-items:center;justify-content:space-between;gap:3mm}
.wash-label-top strong{font-size:10px}
.wash-label-code{padding:1mm 1.5mm;border:1px solid #11131A;text-align:center;font-size:13px;font-weight:900;letter-spacing:0}
.wash-label-content{display:grid;grid-template-columns:18mm minmax(0,1fr);gap:2mm;align-items:start}
.wash-label-qr{width:18mm;height:18mm;display:block}
.wash-label-main{display:flex;flex-direction:column;gap:1mm;min-width:0}
.wash-label-item{font-size:12px;font-weight:900;line-height:1.1}
.wash-label-color,.wash-label-customer,.wash-label-note,.wash-label-foot{font-weight:700}
.wash-label-note{border-top:1px dashed #98A2B3;padding-top:1mm;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wash-label-nfc{font-size:6px;line-height:1.15;word-break:break-all;color:#475467}
.staff-position-form{display:flex;align-items:center;gap:8px}
.staff-position-input{min-width:140px}
.staff-position-save{padding:8px 12px}
.piecework-filters{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr)) auto auto;align-items:end;gap:12px}
.piecework-layout{align-items:start}
.nfc-topbar{
  position:sticky;
  top:0;
  z-index:var(--z-sticky);
  padding:10px 12px 0;
}
.nfc-topbar-inner{
  max-width:820px;
  min-height:54px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 12px;
  border:1px solid var(--glass-border);
  border-radius:16px;
  background:rgba(255,255,255,.9);
  box-shadow:var(--shadow);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.nfc-topbar-brand,
.nfc-topbar-user{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
}
.nfc-topbar-brand strong,
.nfc-topbar-user span{
  min-width:0;
  color:var(--text);
  font-weight:820;
  line-height:1.2;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.nfc-topbar-brand span{
  flex:0 0 auto;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  padding:0 9px;
  border-radius:999px;
  background:rgba(230,73,0,.09);
  color:var(--accent-strong);
  font-size:.76rem;
  font-weight:820;
  white-space:nowrap;
}
.nfc-topbar-user{
  flex:0 1 auto;
  justify-content:flex-end;
}
.nfc-topbar-user form{
  margin:0;
  flex:0 0 auto;
}
.nfc-logout-btn{
  min-height:36px;
  padding:0 11px;
  border:none;
  border-radius:10px;
  background:rgba(245,242,235,.95);
  color:var(--text2);
  font-size:.82rem;
  font-weight:800;
  cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.1);
}
.nfc-main{max-width:920px}
.nfc-page{max-width:820px;margin:0 auto}
.nfc-scan-panel{display:flex;flex-direction:column;gap:14px}
.nfc-page .section-head{align-items:flex-start}
.nfc-page .section-head h1{margin:4px 0;font-size:1.56rem;line-height:1.12}
.nfc-unit-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.nfc-unit-card>div{
  min-width:0;
  border:1px solid rgba(60,50,40,.12);
  border-radius:8px;
  padding:12px;
  background:rgba(255,255,255,.78);
}
.nfc-unit-card span,
.nfc-note-box span{
  display:block;color:var(--text3);font-size:.78rem;font-weight:780;
}
.nfc-unit-card strong{
  display:block;margin-top:4px;color:var(--text);font-size:1rem;line-height:1.28;overflow-wrap:anywhere;
}
.nfc-context-card{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px;
  border:1px solid rgba(60,50,40,.12);
  border-radius:8px;
  background:rgba(245,242,235,.74);
}
.nfc-context-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.nfc-context-head h2{
  margin:3px 0 0;
  font-size:1.05rem;
  line-height:1.18;
}
.nfc-note-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.nfc-note-box{
  min-width:0;
  padding:12px;
  border:1px solid rgba(60,50,40,.12);
  border-radius:8px;
  background:#fff;
}
.nfc-note-box p{
  margin:5px 0 0;
  color:var(--text);
  font-size:.96rem;
  line-height:1.48;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.nfc-note-box.is-empty p{color:var(--text4)}
.nfc-photo-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.nfc-photo-tile{
  min-width:0;
  padding:8px;
  border:1px solid rgba(60,50,40,.12);
  border-radius:8px;
  background:#fff;
  color:var(--text2);
  cursor:pointer;
}
.nfc-photo-tile img{
  display:block;
  width:100%;
  aspect-ratio:1;
  border-radius:6px;
  object-fit:contain;
  background:#eef2f7;
}
.nfc-photo-tile span{
  display:block;
  margin-top:7px;
  color:var(--text3);
  font-size:.76rem;
  font-weight:820;
  line-height:1.15;
  text-align:center;
}
.nfc-photo-empty{
  padding:14px;
  border:1px dashed rgba(60,50,40,.24);
  border-radius:8px;
  color:var(--text3);
  text-align:center;
  background:rgba(255,255,255,.62);
}
.nfc-result{
  display:flex;
  align-items:flex-start;
  gap:12px;
  border:1px solid rgba(60,50,40,.14);
  border-radius:8px;
  padding:14px;
  background:#f8fafc;
}
.nfc-result strong{display:block;color:var(--text)}
.nfc-result p{margin:2px 0 0;color:var(--text3);line-height:1.45}
.nfc-result[data-state="success"]{border-color:rgba(18,183,106,.34);background:#ecfdf3}
.nfc-result[data-state="error"]{border-color:rgba(240,68,56,.34);background:#fef3f2}
.nfc-actions{justify-content:flex-start}
.nfc-actions .submit-btn{width:auto;min-width:150px}
.nfc-preview-overlay{
  position:fixed;
  inset:0;
  z-index:var(--z-overlay);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(26,23,20,.84);
}
.nfc-preview-overlay[hidden]{display:none}
.nfc-preview-overlay img{
  max-width:100%;
  max-height:86dvh;
  border-radius:8px;
  object-fit:contain;
  background:#fff;
  box-shadow:0 24px 54px rgba(0,0,0,.28);
}
.nfc-preview-close{
  position:fixed;
  top:calc(env(safe-area-inset-top,0px) + 12px);
  right:12px;
  width:44px;
  height:44px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.94);
  color:#11131A;
  font-size:1.45rem;
  font-weight:740;
  line-height:1;
  cursor:pointer;
}
.worker-mobile-body{
  background:#f4f6f9;
}
.worker-mobile-main{
  max-width:none;
  padding:0;
}
.worker-mobile-shell{
  width:100%;
  max-width:480px;
  min-height:100dvh;
  margin:0 auto;
  padding:calc(env(safe-area-inset-top,0px) + 12px) 12px calc(env(safe-area-inset-bottom,0px) + 20px);
  display:flex;
  flex-direction:column;
  gap:12px;
}
.worker-mobile-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 2px 4px;
}
.worker-mobile-id{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.worker-mobile-id span,
.worker-mobile-id small{
  color:var(--text3);
  font-size:.82rem;
  font-weight:650;
}
.worker-mobile-id strong{
  color:var(--text);
  font-size:1.38rem;
  line-height:1.1;
  font-weight:840;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.worker-logout-btn{
  min-height:40px;
  padding:8px 12px;
  border:none;
  border-radius:8px;
  background:#fff;
  color:var(--text2);
  font-weight:750;
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.14);
}
.worker-mobile-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.worker-mobile-summary article,
.worker-scan-card,
.worker-mobile-section{
  background:#fff;
  border:1px solid rgba(60,50,40,.12);
  border-radius:8px;
  box-shadow:0 8px 22px rgba(40,30,20,.05);
}
.worker-mobile-summary article{
  padding:12px 10px;
}
.worker-mobile-summary span{
  display:block;
  color:var(--text3);
  font-size:.74rem;
  font-weight:700;
}
.worker-mobile-summary strong{
  display:block;
  margin-top:4px;
  color:var(--text);
  font-size:1.18rem;
  font-weight:850;
  font-variant-numeric:tabular-nums;
}
.worker-scan-card{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.worker-scan-card-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}
.worker-scan-card-head span{
  color:var(--accent);
  font-size:.78rem;
  font-weight:800;
}
.worker-scan-card-head strong{
  color:var(--text);
  font-size:1.1rem;
  line-height:1.1;
}
.worker-scan-form{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:10px;
}
.worker-scan-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:var(--text2);
  font-size:.86rem;
  font-weight:750;
}
.worker-scan-input{
  width:100%;
  min-height:58px;
  padding:0 14px;
  border:1px solid rgba(60,50,40,.18);
  border-radius:8px;
  background:#f8fafc;
  color:var(--text);
  font-size:1.08rem;
  font-weight:720;
  letter-spacing:0;
  outline:none;
}
.worker-scan-input:focus{
  border-color:rgba(230,73,0,.46);
  background:#fff;
  box-shadow:0 0 0 4px rgba(230,73,0,.12);
}
.worker-scan-submit,
.worker-complete-btn,
.worker-cancel-btn{
  min-height:52px;
  border:none;
  border-radius:8px;
  font-weight:820;
  cursor:pointer;
}
.worker-scan-submit{
  width:100%;
  background:var(--accent);
  color:#fff;
  font-size:1.08rem;
  box-shadow:0 12px 22px rgba(230,73,0,.18);
}
.worker-scan-submit:disabled,
.worker-tool-btn:disabled,
.worker-complete-btn:disabled,
.worker-cancel-btn:disabled{
  opacity:.62;
  cursor:progress;
}
.worker-scan-tools{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.worker-tool-btn{
  min-height:46px;
  border:1px solid rgba(60,50,40,.16);
  border-radius:8px;
  background:#f8fafc;
  color:var(--text2);
  font-weight:820;
  cursor:pointer;
}
.worker-camera-panel{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.worker-camera-panel[hidden]{display:none}
.worker-camera-panel video{
  width:100%;
  aspect-ratio:4/3;
  border-radius:8px;
  background:#11131A;
  object-fit:cover;
}
.worker-scan-result{
  border:1px solid rgba(60,50,40,.14);
  border-radius:8px;
  padding:12px;
  background:#f8fafc;
}
.worker-scan-result strong{display:block;color:var(--text)}
.worker-scan-result p{margin:4px 0 0;color:var(--text3);font-size:.92rem}
.worker-scan-result[data-state="success"]{border-color:#12b76a;background:#ecfdf3}
.worker-scan-result[data-state="error"]{border-color:#f04438;background:#fef3f2}
.worker-mobile-section{
  padding:12px;
}
.worker-section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.worker-section-title h2{
  margin:0;
  font-size:1rem;
  line-height:1.1;
}
.worker-section-title span{
  min-width:28px;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:#f1f5f9;
  color:var(--text2);
  font-size:.84rem;
  font-weight:820;
}
.worker-record-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.worker-record{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:12px;
  border:1px solid rgba(60,50,40,.11);
  border-radius:8px;
  background:#fbfcfe;
}
.worker-record-active{
  background:#FFF6F3;
  border-color:rgba(230,73,0,.18);
}
.worker-record-main{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.worker-record-main strong{
  color:var(--text);
  font-size:1rem;
  line-height:1.2;
  overflow-wrap:anywhere;
}
.worker-record-main span{
  color:var(--text3);
  font-size:.86rem;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.worker-record-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:82px;
}
.worker-complete-btn{
  background:var(--green);
  color:#fff;
  padding:0 14px;
}
.worker-cancel-btn{
  min-height:42px;
  background:#fff;
  color:var(--text3);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.16);
}
.worker-record-amount{
  color:var(--green-dark);
  font-size:1rem;
  font-weight:850;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.worker-record-extra{
  grid-column:1/-1;
  padding-top:10px;
  border-top:1px dashed rgba(60,50,40,.22);
}
.worker-record-extra-body{
  display:flex;
  flex-direction:column;
  gap:9px;
}
.worker-record-extra-collapsed{
  padding-top:0;
  border-top:none;
}
.worker-record-extra-collapsed summary{
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 10px;
  border:1px solid rgba(60,50,40,.13);
  border-radius:8px;
  background:#fff;
  color:var(--text2);
  font-size:.86rem;
  font-weight:800;
  cursor:pointer;
  list-style:none;
}
.worker-record-extra-collapsed summary::-webkit-details-marker{display:none}
.worker-record-extra-collapsed summary::after{
  content:"v";
  display:inline-block;
  color:var(--text3);
  font-size:1rem;
}
.worker-record-extra-collapsed[open] summary{
  margin-bottom:9px;
}
.worker-record-extra-collapsed[open] summary::after{
  transform:rotate(180deg);
}
.worker-record-notes{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.worker-note-block{
  padding:10px;
  border:1px solid rgba(60,50,40,.12);
  border-radius:8px;
  background:#fff;
}
.worker-note-block span{
  display:block;
  color:var(--text3);
  font-size:.74rem;
  font-weight:820;
}
.worker-note-block p{
  margin:4px 0 0;
  color:var(--text);
  font-size:.94rem;
  line-height:1.45;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.worker-record-photos{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:1px 1px 4px;
  -webkit-overflow-scrolling:touch;
}
.worker-photo-link{
  flex:0 0 78px;
  padding:0;
  border:none;
  background:transparent;
  color:var(--text2);
  font:inherit;
  cursor:pointer;
}
.worker-photo-link img{
  display:block;
  width:78px;
  height:78px;
  border-radius:8px;
  object-fit:cover;
  background:#eef2f7;
  border:1px solid rgba(60,50,40,.16);
}
.worker-photo-link span{
  display:block;
  margin-top:4px;
  color:var(--text3);
  font-size:.72rem;
  font-weight:780;
  line-height:1.15;
  text-align:center;
}
.worker-preview-overlay{
  position:fixed;
  inset:0;
  z-index:90;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(26,23,20,.82);
}
.worker-preview-overlay[hidden]{display:none}
.worker-preview-overlay img{
  max-width:100%;
  max-height:86dvh;
  border-radius:8px;
  object-fit:contain;
  background:#fff;
  box-shadow:0 24px 54px rgba(0,0,0,.28);
}
.worker-preview-close{
  position:fixed;
  top:calc(env(safe-area-inset-top,0px) + 12px);
  right:12px;
  width:44px;
  height:44px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.94);
  color:#11131A;
  font-size:1.45rem;
  font-weight:740;
  line-height:1;
  cursor:pointer;
}
.worker-empty{
  padding:18px 10px;
  color:var(--text3);
  text-align:center;
  background:#f8fafc;
  border-radius:8px;
}
@media (max-width: 860px){
  .piecework-filters{grid-template-columns:1fr}
  .nfc-topbar{
    padding:8px 10px 0;
  }
  .nfc-topbar-inner{
    min-height:48px;
    gap:8px;
    padding:7px 9px;
    border-radius:14px;
  }
  .nfc-topbar-brand{
    flex:1 1 auto;
    gap:6px;
  }
  .nfc-topbar-brand strong{
    max-width:34vw;
    font-size:.96rem;
  }
  .nfc-topbar-brand span{
    min-height:26px;
    padding:0 8px;
    font-size:.72rem;
  }
  .nfc-topbar-user{
    flex:0 1 auto;
    gap:6px;
  }
  .nfc-topbar-user span{
    max-width:24vw;
    font-size:.86rem;
  }
  .nfc-logout-btn{
    min-height:34px;
    padding:0 9px;
    border-radius:9px;
    font-size:.78rem;
  }
  .nfc-main{
    max-width:none;
    padding:10px 10px calc(env(safe-area-inset-bottom,0px) + 18px);
  }
  .nfc-page{max-width:none}
  .nfc-page .panel{
    padding:14px;
    border-radius:16px;
  }
  .nfc-page .section-head{
    flex-direction:column;
  }
  .nfc-page .section-head h1{
    font-size:1.34rem;
  }
  .nfc-page .section-meta{
    max-width:100%;
    overflow-wrap:anywhere;
    white-space:normal;
  }
  .nfc-unit-card{grid-template-columns:repeat(2,minmax(0,1fr))}
  .nfc-unit-card>div{
    padding:10px;
  }
  .nfc-unit-card span{
    font-size:.72rem;
  }
  .nfc-unit-card strong{
    font-size:.92rem;
  }
  .nfc-note-grid{grid-template-columns:1fr}
  .nfc-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .nfc-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  .nfc-actions .submit-btn,
  .nfc-actions .ghost-link{
    width:100%;
    min-width:0;
  }
  .staff-position-form{align-items:stretch;flex-direction:column}
  .worker-record{
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .worker-record-actions{
    flex-direction:row;
  }
  .worker-complete-btn,
  .worker-cancel-btn{
    flex:1;
  }
}

@page{
  size:A4;
  margin:12mm;
}
@keyframes fadeUp{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:translateY(0)}}
@keyframes uiSpin{to{transform:rotate(360deg)}}

@media print{
  html,body{background:#fff!important}
  .print-body{padding:0}
  .print-shell{max-width:none}
  .print-actions,.toast,.ui-progress-overlay,.shell-header,.shell-modal,.bottom-nav,.pvov,.sign-ov{display:none!important}
  .print-card{
    border:none;
    border-radius:0;
    padding:0;
    box-shadow:none;
  }
  .print-head,.print-grid,.print-note,.print-table,.print-table tr,.print-table td,.print-table th{
    break-inside:avoid;
    page-break-inside:avoid;
  }
  .print-table th,.print-table td{
    border-color:#d0d5dd;
    background:#fff;
  }
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}

@media (prefers-color-scheme: dark){
  :root{
    /* Warm leather / espresso night palette */
    --bg:#1C1813;--bg2:#241F18;--card:#262019;--card-solid:#262019;
    --accent:#F2682E;--accent-strong:#F58A57;--accent-light:rgba(242,104,46,.16);
    --gold:#C2A06A;--gold-soft:rgba(194,160,106,.30);
    --green-bg:rgba(94,122,82,.20);--orange-bg:rgba(176,122,46,.22);--purple-bg:rgba(124,106,134,.22);--blue-bg:rgba(242,104,46,.16);
    --teal-bg:rgba(63,110,114,.22);--red-bg:rgba(168,58,43,.22);
    --text:#F4EFE7;--text2:#D9D0C2;--text3:#A89C8A;--text4:#82776A;
    --sep:rgba(244,239,231,.12);--sep2:rgba(244,239,231,.07);--glass-border:rgba(244,239,231,.10);
    --shadow:0 1px 2px rgba(0,0,0,.40),0 1px 0 rgba(0,0,0,.30);
    --shadow-lg:0 22px 56px rgba(0,0,0,.50),0 6px 18px rgba(0,0,0,.34);
  }
  html{background:linear-gradient(180deg,#211C15 0%,#1A1610 100%)}
  body{
    background:linear-gradient(180deg,#221C15 0%,#1B160F 60%,#191510 100%);
  }
  .shell-header-inner,.main-nav-menu,.shell-modal-card,.shell-sheet-card,.sign-box,.ui-progress-card,.print-card{
    background:var(--card);
    border-color:var(--sep);
  }
  .bottom-nav{
    background:#221C15;
    border-top-color:var(--sep);
    box-shadow:0 -8px 24px rgba(0,0,0,.5);
  }
  .ghost-btn,.ghost-link,.user-chip,.compact-select,.input,.other-in,.pay-btn,.item-row-controls,.item-photo-wrap,.ledger-item,.table-wrap,.workspace-mini-stat,.settings-store-card,.data-card,.payment-meta-chip,.payment-field-inline,.order-total-card,.item-subtotal strong,.pbox,.dropdown,.customer-command-bar,.filter-chip,.customer-detail-list div,.customer-profile-line span,.admin-panel,.admin-subpanel,.admin-stat-row{
    background:#2C2519;
    color:var(--text);
    border-color:var(--sep);
  }
  .print-body{background:#1A1610}
}

@media (min-width:768px) and (max-width:1180px){
  .shell-header{
    padding:12px 18px 0;
  }
  .shell-main:not(.order-prototype-main){
    max-width:1240px;
    padding:14px 18px 24px;
  }
  .shell-header-inner{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    gap:12px;
    align-items:center;
    padding:13px 14px;
  }
  .brand-title{
    font-size:1.16rem;
  }
  .main-nav{
    justify-content:center;
    gap:8px;
  }
  .main-nav-link,
  .main-nav-toggle{
    padding:8px 10px;
    font-size:.86rem;
  }
  .header-actions{
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:8px;
  }
  .compact-select{
    min-width:124px;
  }
  .page-hero,
  .panel{
    padding:20px;
  }
  .page-hero h1,
  .login-card h1{
    font-size:1.72rem;
  }
  .metrics-grid,
  .sg{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
  }
  .split-layout{
    grid-template-columns:minmax(0,.96fr) minmax(0,1.04fr);
    gap:14px;
  }
  .split-panel{
    min-height:280px;
  }
  .login-shell{
    max-width:520px;
  }
  .workspace-hero-main{
    grid-template-columns:minmax(0,1fr) minmax(300px,.9fr);
  }
  .customer-overview-grid{
    grid-template-columns:1fr;
  }
  .customer-workbench{
    grid-template-columns:minmax(280px,340px) minmax(0,1fr);
  }
  .customer-center-grid,
  .customer-summary-grid-wide{
    grid-template-columns:1fr 1fr;
  }
  .customer-ledger-layout > .split-panel:first-child{
    position:static;
  }
}

@media (min-width:768px) and (max-width:920px){
  .shell-header-inner{
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .main-nav{
    width:100%;
    justify-content:flex-start;
  }
  .header-actions{
    justify-content:flex-start;
  }
  .compact-hero{
    flex-direction:column;
  }
  .metrics-grid,
  .sg{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .split-layout{
    grid-template-columns:1fr;
  }
  .workspace-hero-main,
  .workspace-grid,
  .form-grid-2,
  .customer-workbench{
    grid-template-columns:1fr;
  }
  .admin-filter-form,
  .admin-ledger-grid{
    grid-template-columns:1fr;
  }
  .admin-topup-form{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .admin-topup-form .submit-btn{
    grid-column:1 / -1;
  }
  .customer-search-panel{
    position:static;
  }
  .customer-results-list{
    max-height:none;
    overflow:visible;
    padding-right:0;
  }
}

@media (max-width:767px){
  .shell-header-inner,.compact-hero,.split-layout{grid-template-columns:1fr;display:flex;flex-direction:column}
  .header-actions{flex-wrap:wrap;justify-content:flex-start}
  /* Primary nav moves to the bottom tab bar on phones */
  .main-nav{display:none}
  .shell-header-inner{flex-direction:row;align-items:center;flex-wrap:wrap;gap:10px;padding:12px 14px}
  .brand-block{flex:1 1 auto;min-width:0}
  .brand-title{font-size:1.08rem}
  .header-actions{flex:0 0 auto;justify-content:flex-end}
  .bottom-nav{
    display:flex;justify-content:space-around;align-items:stretch;gap:2px;
    position:fixed;left:0;right:0;bottom:0;z-index:var(--z-sticky);
    padding:6px 8px calc(env(safe-area-inset-bottom,0px) + 6px);
    background:rgba(255,255,255,.86);border-top:1px solid var(--glass-border);
    box-shadow:0 -8px 24px rgba(40,30,20,.08);
    backdrop-filter:none;-webkit-backdrop-filter:none;
    transition:transform .2s ease;
  }
  .shell-main{padding-bottom:calc(env(safe-area-inset-bottom,0px) + 78px)}
  .metrics-grid,.sg{grid-template-columns:repeat(2,minmax(0,1fr))}
  .workspace-hero-main,
  .workspace-grid,
  .workspace-mini-stats,
  .customer-overview-grid,
  .customer-workbench,
  .customer-center-grid,
  .form-grid-2,
  .admin-filter-form,
  .admin-ledger-grid{
    grid-template-columns:1fr;
  }
  .customer-command-bar,
  .customer-center-head,
  .admin-page-header{
    grid-template-columns:1fr;
    display:flex;
    flex-direction:column;
    align-items:stretch;
  }
  .admin-page-actions,
  .customer-command-actions{
    justify-content:flex-start;
  }
  .admin-stat-row{
    grid-template-columns:1fr;
  }
  .admin-stat-cell{
    border-right:none;
    border-bottom:1px solid var(--sep2);
  }
  .admin-stat-cell:last-child{
    border-bottom:none;
  }
  .customer-search-panel{
    position:static;
  }
  .customer-results-list{
    max-height:none;
    overflow:visible;
    padding-right:0;
  }
  .customer-current-balance{
    text-align:left;
  }
  .customer-ledger-layout > .split-panel:first-child{
    position:static;
  }
  .customer-ledger-layout .ledger-list{
    max-height:none;
    overflow:visible;
    padding-right:0;
  }
  .action-callout{
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width:720px){
  .shell-header{padding:10px 12px 0}
  .shell-main{padding:14px 12px 24px}
  .order-shell-main{padding-top:8px}
  .shell-header-inner{padding:16px}
  .page-hero h1,.login-card h1{font-size:1.6rem}
  .metrics-grid,.sg,.print-grid,.split-layout{grid-template-columns:1fr}
  .customer-summary-grid,
  .customer-summary-grid-wide,
  .customer-detail-list{grid-template-columns:1fr}
  .admin-filter-actions,
  .admin-topup-form{
    grid-template-columns:1fr;
    display:grid;
  }
  .admin-filter-actions .submit-btn,
  .admin-filter-actions .ghost-link,
  .admin-topup-form .submit-btn{
    width:100%;
  }
  .customer-search-row{
    grid-template-columns:1fr;
  }
  .customer-search-submit,
  .customer-reset-link{
    width:100%;
  }
  .item-row{grid-template-columns:1fr 1fr;gap:10px}
  .item-row .line-total,.item-row .mini-btn{grid-column:span 1}
  .row{flex-direction:column}
  .main-nav{gap:6px}
  .main-nav-link,.main-nav-toggle{padding:8px 10px}
  .main-nav-toggle{width:44px;height:44px;padding:0}
  .shell-modal{padding:16px}
  .shell-modal-card{padding:22px}
  .shell-modal-actions{flex-direction:column-reverse;align-items:stretch}
  .shell-modal-actions .submit-btn,.shell-modal-actions .ghost-btn{width:100%}
  .page-tags{
    gap:6px;
  }
  .page-tag,
  .section-meta,
  .meta-chip,
  .role-badge,
  .status-badge{
    font-size:.7rem;
  }
  .app{padding-top:14px}
  .order-utility-bar{flex-direction:column;align-items:stretch}
  .order-utility-actions{justify-content:flex-start}
  .order-page-app .tabs{top:10px}
  .item-row-controls{
    grid-template-columns:minmax(0,1.2fr) minmax(112px,.95fr) auto;
    grid-template-areas:
      "qty price delete"
      "qty total delete";
    gap:10px 12px;
    align-items:stretch;
    padding:12px;
  }
  .item-archive-row{
    grid-template-columns:1fr;
  }
  .item-add-link{
    align-self:flex-start;
  }
  .order-summary-head{
    grid-template-columns:1fr;
    gap:8px;
  }
  .order-summary-row{flex-direction:column}
  .order-note-label{
    justify-self:flex-start;
  }
  .photo-grp{width:100%}
  .pbox{flex:1}
  .list-footer-actions .ghost-link{width:100%}
  .ri-summary{
    align-items:flex-start;
  }
  .ri-summary-side{
    align-items:flex-end;
    flex-direction:column;
    gap:5px;
  }
  .ri-acts{
    flex-direction:column;
    align-items:stretch;
  }
  .ri-action-group{
    width:100%;
  }
  .ri-action-group .ab,
  .ri-action-menu,
  .ri-action-menu summary{
    width:100%;
  }
  .ri-action-menu-list{
    position:static;
    width:100%;
    margin-top:6px;
  }
  .workbench-meta{flex-direction:column}
  .bbar{flex-wrap:wrap}
  .batch-field,.bbar input[type="date"],.bbtn{width:100%}
  .batch-field{min-width:0}
  .order-list-toolbar .filter-group{
    align-items:center;
    flex-direction:row;
  }
  .order-list-toolbar .fbar{
    width:auto;
    overflow:visible;
    padding-bottom:0;
  }
  .order-list-toolbar .filter-label{
    padding-left:0;
  }
}

@media (max-width:540px){
  .proj-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .payment-meta-grid{
    grid-template-columns:1fr;
  }
  .payment-balance-panel{
    padding:8px;
    gap:6px;
  }
  .payment-meta-chip span,
  .payment-field-inline span{
    font-size:.7rem;
  }
  .payment-meta-chip strong{
    font-size:.92rem;
  }
  .payment-field .input{
    font-size:16px;
  }
  .item-row-controls{
    grid-template-columns:1fr 1fr auto;
    grid-template-areas:
      "qty qty delete"
      "price total delete";
    padding:12px;
  }
  .item-action-cell{
    justify-content:center;
  }
  .prototype-item-card .mini-btn{
    width:auto;
  }
}

@media (max-width:767px){
  .order-payment-card .pay-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .pay-btn{
    min-height:52px;
    padding:10px 11px;
    flex-direction:row;
    gap:7px;
    justify-content:center;
  }
  .pay-label{
    white-space:nowrap;
    line-height:1.1;
    font-size:.84rem;
  }
  .pay-icon{
    width:24px;
    height:24px;
    border-radius:9px;
  }
  .pay-icon svg{
    width:14px;
    height:14px;
  }
}

@media (min-width:768px){
  .order-prototype-body{
    overflow:auto;
  }
  .order-prototype-main{
    min-height:auto;
    padding:0 24px 28px;
  }
  .app.order-page-app{
    width:min(100%, 1200px);
    max-width:min(calc(100vw - 48px), 1200px);
    min-height:calc(100dvh - 28px);
    padding:16px 0 24px;
    display:flex;
    flex-direction:column;
    gap:12px;
  }
  .order-page-app{
    max-width:min(calc(100vw - 48px), 1200px);
  }
  .order-utility-bar{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    margin:0;
    gap:16px;
    padding:14px 16px;
    border-radius:22px;
  }
  .order-utility-actions{
    flex-wrap:nowrap;
  }
  .order-page-app .tabs{
    position:relative;
    top:auto;
    margin:0;
  }
  .order-page-app .tab-content{
    padding-bottom:0;
    min-height:0;
  }
  .order-page-app .tab-content.active{
    display:block;
    min-height:0;
    overflow:visible;
  }
  .order-page-app .form-area,
  .order-page-app .list-area{
    min-height:0;
    padding:4px 0 0;
  }
  .order-page-app .form-area{
    display:block;
  }
  .order-page-app .list-area{
    overflow:visible;
    padding-right:0;
    padding-bottom:0;
  }
  .order-form-grid{
    min-height:0;
    display:grid;
    grid-template-columns:minmax(0, 1.42fr) minmax(320px, .86fr);
    grid-template-areas:
      "customer customer"
      "items sidebar";
    grid-template-rows:auto auto;
    gap:16px;
    align-items:start;
  }
  .order-card{
    margin-bottom:0;
    min-width:0;
    padding:18px;
    border-radius:24px;
  }
  .order-customer-card{
    grid-area:customer;
    padding:16px 18px;
  }
  .order-items-card{
    grid-area:items;
    min-height:0;
    overflow:visible;
    gap:10px;
    padding:18px;
  }
  .order-side-panel{
    grid-area:sidebar;
    position:sticky;
    top:16px;
    gap:14px;
    align-self:start;
  }
  .order-submit-btn{
    margin-top:0;
    min-height:60px;
    align-self:stretch;
  }
  .order-payment-card,
  .assigned-worker-card,
  .order-summary-card{
    gap:10px;
    padding:16px 18px;
  }
  .order-customer-card .row{
    gap:12px;
  }
  .order-customer-card .input{
    padding:12px 14px;
    min-height:50px;
  }
  .type-row{
    margin-top:12px;
  }
  .type-chip{
    padding:9px 13px;
    font-size:.78rem;
  }
  .prototype-item-rows{
    flex:none;
    min-height:0;
    gap:12px;
    overflow:visible;
    padding-right:0;
    scrollbar-gutter:auto;
  }
  .proj-row{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
  }
  .proj-btn,
  .other-in{
    min-height:48px;
    width:100%;
    padding:10px 8px;
    font-size:.82rem;
  }
  .other-in{
    padding:10px 10px;
  }
  .item-row-controls{
    grid-template-columns:minmax(0,1.15fr) minmax(116px,.84fr) minmax(88px,.68fr) 84px;
    gap:10px;
    margin-top:12px;
    padding:12px;
  }
  .qty-label{
    font-size:.8rem;
  }
  .control-label{
    font-size:.74rem;
  }
  .qty-control-line{
    gap:8px;
    min-height:48px;
  }
  .qty-inline{
    min-height:48px;
  }
  .qty-b{
    width:46px;
    height:48px;
    font-size:1rem;
  }
  .qty-v{
    width:40px;
    font-size:.95rem;
  }
  .item-price-wrap .input{
    min-width:0;
    padding:12px 13px;
    min-height:48px;
    font-size:1rem;
  }
  .item-subtotal strong{
    min-width:82px;
    min-height:48px;
    padding:10px 12px;
    font-size:.94rem;
  }
  .prototype-item-card .mini-btn{
    min-height:48px;
    padding:10px 12px;
    border-radius:14px;
    font-size:.84rem;
  }
  .item-archive-row{
    grid-template-columns:minmax(0,1.45fr) minmax(140px,.72fr);
    gap:10px;
    margin-top:10px;
    padding-top:10px;
  }
  .item-note-input{
    min-height:76px;
  }
  .item-photo-wrap{
    padding:10px 12px;
  }
  .item-pbox{
    width:56px;
    min-height:52px;
  }
  .item-add-link{
    margin-top:12px;
    width:auto;
    align-self:flex-end;
    min-height:46px;
    font-size:.86rem;
  }
  .pay-row{
    gap:10px;
  }
  .order-payment-card .pay-row{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
  }
  .pay-btn{
    min-height:72px;
    padding:12px 8px;
    font-size:.84rem;
    flex-direction:column;
    gap:6px;
    justify-content:center;
  }
  .pay-label{
    white-space:normal;
    line-height:1.08;
    font-size:.78rem;
  }
  .pay-icon{
    width:26px;
    height:26px;
    border-radius:9px;
  }
  .pay-icon svg{
    width:14px;
    height:14px;
  }
  .payment-help{
    font-size:.82rem;
    padding:10px 12px;
  }
  .payment-balance-panel{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:stretch;
    padding:10px;
    border-radius:16px;
    gap:8px;
  }
  .payment-balance-overview{
    display:contents;
  }
  .payment-meta-chip{
    min-height:56px;
    padding:10px 11px;
  }
  .payment-meta-chip strong{
    font-size:.94rem;
  }
  .payment-field-inline{
    grid-column:auto;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    min-height:56px;
    margin-top:0;
    padding:10px 11px;
    border-radius:14px;
    background:rgba(255,255,255,.88);
    box-shadow:inset 0 0 0 1px rgba(60,50,40,.1);
    gap:4px;
  }
  .payment-field-inline span{
    font-size:.72rem;
    white-space:nowrap;
  }
  .payment-field .input{
    min-height:30px;
    padding:2px 0 0;
    border:none;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    font-size:16px;
    font-weight:800;
  }
  .payment-field .input:focus{
    transform:none;
    background:transparent;
    border-color:transparent;
    box-shadow:none;
  }
  .order-summary-head{
    gap:10px;
  }
  .order-summary-row{
    display:flex;
    align-items:stretch;
  }
  .order-total-card{
    min-height:70px;
    padding:12px 14px;
    border-radius:16px;
  }
  .order-total-label{
    font-size:.74rem;
  }
  .order-total-card strong{
    margin-top:4px;
    font-size:1.18rem;
  }
  .order-note-label{
    min-height:44px;
    padding:0 12px;
    font-size:.74rem;
  }
  .photo-grp{
    gap:6px;
  }
  .pbox{
    width:48px;
    min-height:44px;
  }
  .box-icon{
    width:20px;
    height:20px;
    border-radius:8px;
  }
  .box-icon svg{
    width:13px;
    height:13px;
  }
  .pbox .cl{
    margin-top:2px;
    font-size:.7rem;
  }
  .compact-note-input{
    min-height:96px;
    margin-top:0;
    padding:12px 14px;
    line-height:1.45;
  }
  .list-footer-actions{
    justify-content:flex-end;
  }
  .order-form-grid[data-order-type="alteration"] .prototype-item-card{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px 12px;
    padding:12px;
    align-items:start;
  }
  .order-form-grid[data-order-type="alteration"] .item-card-toggle{
    grid-column:1 / -1;
    margin-bottom:2px;
    padding:10px 12px;
  }
  .order-form-grid[data-order-type="alteration"] .item-category-block{
    grid-column:1;
    margin-bottom:0;
  }
  .order-form-grid[data-order-type="alteration"] .item-project-block{
    grid-column:2;
  }
  .order-form-grid[data-order-type="alteration"] .item-category-block,
  .order-form-grid[data-order-type="alteration"] .item-project-block{
    gap:5px;
  }
  .order-form-grid[data-order-type="alteration"] .item-category-row,
  .order-form-grid[data-order-type="alteration"] .item-project-block .proj-row{
    gap:8px;
  }
  .order-form-grid[data-order-type="alteration"] .item-category-row .proj-btn,
  .order-form-grid[data-order-type="alteration"] .item-category-row .other-in,
  .order-form-grid[data-order-type="alteration"] .item-project-block .proj-btn,
  .order-form-grid[data-order-type="alteration"] .item-project-block .other-in{
    min-height:48px;
    padding:9px 8px;
    border-radius:12px;
    font-size:.8rem;
  }
  .order-form-grid[data-order-type="alteration"] .item-row-controls,
  .order-form-grid[data-order-type="alteration"] .item-archive-row{
    grid-column:1 / -1;
  }
  .order-form-grid[data-order-type="alteration"] .item-row-controls{
    margin-top:0;
    padding:12px;
    gap:10px;
  }
  .order-form-grid[data-order-type="alteration"] .item-archive-row{
    margin-top:0;
    padding-top:10px;
    grid-template-columns:minmax(0,1.6fr) minmax(116px,.72fr);
    gap:10px;
  }
  .order-form-grid[data-order-type="laundry"]{
    grid-template-columns:minmax(0, 1.38fr) minmax(320px, .82fr);
  }
  .order-form-grid[data-order-type="laundry"] .order-items-card{
    gap:8px;
    padding:18px;
  }
  .order-form-grid[data-order-type="laundry"] .prototype-item-rows{
    gap:10px;
  }
  .order-form-grid[data-order-type="laundry"] .prototype-item-card{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px 12px;
    padding:12px;
    align-items:start;
  }
  .order-form-grid[data-order-type="laundry"] .item-card-toggle{
    grid-column:1 / -1;
    margin-bottom:2px;
    padding:10px 12px;
  }
  .order-form-grid[data-order-type="laundry"] .item-project-block{
    grid-column:1;
  }
  .order-form-grid[data-order-type="laundry"] .prototype-item-card.is-color-pending .item-project-block{
    grid-column:1 / -1;
  }
  .order-form-grid[data-order-type="laundry"] .prototype-item-card.is-color-pending .item-project-block .proj-row{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .order-form-grid[data-order-type="laundry"] .item-color-block{
    grid-column:2;
    margin-top:0;
  }
  .order-form-grid[data-order-type="laundry"] .item-project-block,
  .order-form-grid[data-order-type="laundry"] .item-color-block{
    gap:6px;
  }
  .order-form-grid[data-order-type="laundry"] .item-project-block .proj-row,
  .order-form-grid[data-order-type="laundry"] .item-color-row{
    gap:8px;
  }
  .order-form-grid[data-order-type="laundry"] .item-project-block .proj-btn,
  .order-form-grid[data-order-type="laundry"] .item-project-block .other-in,
  .order-form-grid[data-order-type="laundry"] .item-color-row .proj-btn,
  .order-form-grid[data-order-type="laundry"] .item-color-row .other-in{
    min-height:48px;
    padding:9px 8px;
    border-radius:12px;
    font-size:.8rem;
  }
  .order-form-grid[data-order-type="laundry"] .item-row-controls,
  .order-form-grid[data-order-type="laundry"] .item-archive-row{
    grid-column:1 / -1;
  }
  .order-form-grid[data-order-type="laundry"] .item-row-controls{
    margin-top:0;
    padding:12px;
    gap:10px;
  }
  .order-form-grid[data-order-type="laundry"] .qty-control-line,
  .order-form-grid[data-order-type="laundry"] .qty-inline{
    min-height:48px;
  }
  .order-form-grid[data-order-type="laundry"] .qty-b{
    width:46px;
    height:48px;
  }
  .order-form-grid[data-order-type="laundry"] .qty-v{
    width:40px;
  }
  .order-form-grid[data-order-type="laundry"] .item-price-wrap .input,
  .order-form-grid[data-order-type="laundry"] .item-subtotal strong,
  .order-form-grid[data-order-type="laundry"] .prototype-item-card .mini-btn{
    min-height:48px;
  }
  .order-form-grid[data-order-type="laundry"] .item-price-wrap .input{
    padding:12px 13px;
  }
  .order-form-grid[data-order-type="laundry"] .item-subtotal strong{
    min-width:82px;
    padding:10px 12px;
  }
  .order-form-grid[data-order-type="laundry"] .item-archive-row{
    margin-top:0;
    padding-top:10px;
    grid-template-columns:minmax(0,1.6fr) minmax(116px,.72fr);
    gap:10px;
  }
  .order-form-grid[data-order-type="laundry"] .item-note-wrap,
  .order-form-grid[data-order-type="laundry"] .item-photo-wrap{
    gap:6px;
  }
  .order-form-grid[data-order-type="laundry"] .item-note-input{
    min-height:76px;
    padding:10px 12px;
  }
  .order-form-grid[data-order-type="laundry"] .item-photo-wrap{
    padding:10px 12px;
  }
  .order-form-grid[data-order-type="laundry"] .item-pbox{
    width:56px;
    min-height:52px;
  }
  .order-form-grid[data-order-type="laundry"] .item-add-link{
    margin-top:10px;
  }
}

.order-submit-bar{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.order-submit-meta{
  display:none;
}
.order-list-controls{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:10px;
}
.order-list-toolbar{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
  margin-bottom:12px;
  overflow:visible;
  padding:0;
}
.order-list-toolbar .search-box{
  width:100%;
  flex:0 0 auto;
  min-width:0;
  margin-bottom:0;
}
.order-filter-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.order-filter-panel{
  position:relative;
  flex:1 1 auto;
  min-width:180px;
}
.order-filter-panel summary{
  width:max-content;
  max-width:100%;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.86);
  color:var(--text2);
  font-size:.82rem;
  font-weight:800;
  box-shadow:var(--shadow);
  cursor:pointer;
  list-style:none;
}
.order-filter-panel summary::-webkit-details-marker{
  display:none;
}
.order-filter-panel summary::after{
  content:"▾";
  color:var(--text3);
  font-size:.7rem;
  transition:transform .18s ease;
}
.order-filter-panel[open] summary{
  background:var(--accent-light);
  color:var(--accent-strong);
}
.order-filter-panel[open] summary::after{
  transform:rotate(180deg);
}
.order-filter-panel summary strong{
  max-width:min(52vw,360px);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text);
  font-weight:860;
}
.order-filter-panel[open] summary strong{
  color:var(--accent-strong);
}
.order-filter-panel .order-list-controls{
  width:100%;
  display:flex;
  flex-direction:row;
  align-items:center;
  flex-wrap:wrap;
  gap:10px 12px;
  margin:10px 0 0;
  padding:12px;
  border-radius:18px;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(255,255,255,.78);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.06);
}
.order-filter-panel .filter-group{
  flex:0 0 auto;
  gap:6px;
}
.order-filter-panel .fbar{
  flex-wrap:nowrap;
  margin-bottom:0;
}
.order-filter-panel .fch{
  min-height:42px;
  white-space:nowrap;
}
.order-filter-panel .payment-fbar{
  margin-top:0;
}
.order-list-toolbar .order-advanced-filters{
  flex:0 0 auto;
  position:relative;
}
.order-list-toolbar .order-advanced-filters .payment-fbar{
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  z-index:var(--z-dropdown);
  min-width:320px;
  padding:10px;
  border-radius:18px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(255,255,255,.82);
  box-shadow:var(--shadow-lg);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.order-list-toolbar .order-advanced-filters:not([open]) .payment-fbar{
  display:none;
}
.order-list-toolbar .batch-actions{
  flex:0 0 auto;
  margin-left:auto;
}
.filter-group{
  display:flex;
  align-items:center;
  gap:8px;
}
.filter-label{
  flex:0 0 auto;
  color:var(--text3);
  font-size:.76rem;
  font-weight:760;
}
.order-advanced-filters{
  min-width:0;
}
.order-advanced-filters summary{
  width:max-content;
  min-height:44px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:var(--text2);
  font-size:.78rem;
  font-weight:760;
  box-shadow:var(--shadow);
  cursor:pointer;
  list-style:none;
}
.order-advanced-filters summary::-webkit-details-marker{
  display:none;
}
.order-advanced-filters summary::after{
  content:"▾";
  font-size:.68rem;
  color:var(--text3);
}
.order-advanced-filters[open] summary{
  background:var(--accent-light);
  color:var(--accent-strong);
}
.payment-fbar{
  margin-top:8px;
}
.batch-actions{
  display:flex;
}
.qty-v{
  min-height:44px;
}
.piecework-layout > .split-panel{
  min-width:0;
}
.outsourcing-unit-grid{
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
}
.outsourcing-unit-card small{
  line-height:1.45;
}
.outsourcing-detail-table .data-table{
  min-width:980px;
}
.piecework-record-cards{
  display:none;
}
.piecework-record-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
  border-radius:16px;
  background:rgba(245,242,235,.86);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.piecework-record-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.piecework-record-head div{
  min-width:0;
}
.piecework-record-head strong{
  display:block;
  font-size:1rem;
  font-weight:820;
}
.piecework-record-head span,
.piecework-record-meta{
  color:var(--text3);
  font-size:.78rem;
  font-weight:650;
}
.piecework-record-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.piecework-record-meta span{
  padding:4px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.76);
}
.piecework-record-card p{
  margin:0;
  color:var(--text2);
  line-height:1.45;
}

@media (max-width:767px){
  .shell-header{
    padding:8px 10px 0;
  }
  .shell-header-inner{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px 10px;
    align-items:center;
    padding:10px 12px;
    border-radius:18px;
  }
  .brand-block .brand-kicker{
    display:none;
  }
  .brand-title{
    font-size:1.02rem;
  }
  .brand-meta{
    font-size:.72rem;
  }
  .header-actions{
    grid-column:1 / -1;
    display:flex;
    align-items:center;
    gap:8px;
  }
  .header-actions .user-chip{
    display:none;
  }
  .header-actions .inline-form{
    min-width:0;
    flex:1 1 auto;
  }
  .compact-select{
    min-width:0;
    width:100%;
    min-height:38px;
    padding:7px 10px;
    font-size:.82rem;
  }
  .header-actions .ghost-btn{
    flex:0 0 auto;
    min-height:38px;
    padding:7px 12px;
  }
  /* Top nav links are redundant on phones — the bottom tab bar + 更多 sheet cover every destination. */
  .main-nav,
  .header-create{
    display:none;
  }
  /* Craftsman has no bottom tab bar, so keep its in-header nav. */
  .role-craftsman .main-nav{
    grid-column:1 / -1;
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    width:100%;
  }
  .role-craftsman .main-nav-link{
    display:inline-flex;
    align-items:center;
    min-height:40px;
    padding:0 14px;
    border-radius:12px;
    font-size:.8rem;
    white-space:nowrap;
  }
  .main-nav-toggle,
  .main-nav-menu{
    display:none!important;
  }
  .order-page-app{
    max-width:none;
    --mobile-bottom-nav-height:calc(env(safe-area-inset-bottom,0px) + 68px);
    --mobile-submit-bar-height:92px;
  }
  .app.order-page-app{
    padding-top:8px;
    padding-bottom:calc(var(--mobile-bottom-nav-height) + var(--mobile-submit-bar-height) + 24px);
  }
  .order-utility-bar{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    margin:0 12px 8px;
    padding:9px 12px;
    border-radius:16px;
  }
  .order-utility-store{
    min-width:0;
    flex-direction:row;
    align-items:center;
    gap:5px;
  }
  .order-utility-store .page-kicker{
    display:none;
  }
  .order-utility-store strong{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.96rem;
  }
  .order-utility-store small{
    display:inline-flex;
    align-items:center;
    flex:0 0 auto;
    font-size:.72rem;
  }
  .order-utility-store small::before{
    content:"·";
    margin-right:5px;
    color:var(--text4);
  }
  .order-utility-actions{
    justify-content:flex-end;
    flex-wrap:nowrap;
  }
  .order-utility-actions .ghost-link,
  .order-utility-actions .inline-form{
    display:none;
  }
  .order-utility-actions .ghost-btn,
  .order-utility-actions .ghost-link{
    min-height:40px;
    padding:8px 10px;
    border-radius:11px;
    font-size:.78rem;
  }
  .order-page-app .tabs{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
    margin:0 12px 2px;
    top:6px;
    padding:4px;
    border-radius:16px;
    background:rgba(235,239,246,.92);
  }
  .order-page-app .tab{
    position:relative;
    min-height:44px;
    padding:0 6px;
    border-radius:12px;
    font-size:.84rem;
    white-space:nowrap;
  }
  .order-page-app .tab.active{
    background:var(--accent);
    color:#fff;
    box-shadow:0 2px 6px rgba(40,30,20,.14);
  }
  .order-page-app .form-area,
  .order-page-app .list-area{
    padding:10px 12px;
  }
  .order-card{
    margin-bottom:8px;
    padding:13px;
  }
  .order-side-panel{
    gap:8px;
  }
  .order-items-card{
    gap:8px;
  }
  .prototype-item-rows{
    gap:10px;
  }
  .prototype-item-card{
    padding:9px;
    border-radius:18px;
  }
  .item-card-toggle{
    margin-bottom:8px;
    padding:9px 10px;
    border-radius:14px;
  }
  .item-card-summary-title{
    font-size:.9rem;
  }
  .item-card-summary-meta{
    font-size:.7rem;
  }
  .item-card-toggle-amount{
    font-size:.96rem;
  }
  .item-card-toggle-hint{
    display:none;
  }
  .item-select-block{
    gap:5px;
  }
  .item-category-block{
    margin-bottom:8px;
  }
  .order-entry-form .proj-row{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }
  .order-entry-form .proj-btn{
    min-height:36px;
    padding:7px 5px;
    border-radius:11px;
    font-size:.75rem;
    line-height:1.15;
  }
  .order-entry-form .other-in{
    grid-column:1 / -1;
    min-height:38px;
    padding:8px 10px;
    border-radius:12px;
    font-size:.78rem;
  }
  .prototype-item-card.is-project-pending .item-project-block{
    margin-top:2px;
    padding:9px 10px;
    border-radius:14px;
    background:rgba(246,248,252,.92);
    box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
  }
  .prototype-item-card.is-project-pending .item-project-block .proj-row{
    display:none;
  }
  .prototype-item-card.is-project-pending .item-project-block::after{
    content:"先选择衣物品类，再展开改衣服务";
    display:block;
    margin-top:5px;
    color:var(--text3);
    font-size:.76rem;
    font-weight:700;
  }
  .item-row-controls{
    margin-top:9px;
    padding:10px;
    gap:8px;
    border-radius:14px;
  }
  .qty-control-line{
    min-height:44px;
    gap:6px;
  }
  .qty-inline{
    min-height:44px;
    border-radius:12px;
  }
  .qty-b{
    width:44px;
    height:44px;
  }
  .qty-v{
    width:46px;
    font-size:1.04rem;
  }
  .item-price-wrap .input,
  .item-subtotal strong{
    min-height:44px;
  }
  .item-action-cell{
    align-items:flex-end;
  }
  .prototype-item-card .mini-btn{
    width:auto;
    min-height:36px;
    padding:6px 4px;
    border-radius:10px;
    background:transparent;
    color:#B94B45;
    box-shadow:none;
    font-size:.76rem;
    font-weight:760;
  }
  .prototype-item-card .mini-btn:active{
    background:var(--red-bg);
  }
  .item-add-link{
    width:100%;
    align-self:stretch;
    min-height:44px;
    margin-top:6px;
    border:1px dashed rgba(230,73,0,.36);
    border-radius:14px;
    background:rgba(255,255,255,.76);
    color:var(--accent-strong);
    box-shadow:none;
  }
  .order-entry-form{
    padding-bottom:calc(var(--mobile-submit-bar-height) + 18px);
  }
  .order-summary-row{
    display:none;
  }
  .order-summary-head{
    display:block;
  }
  .order-submit-wrap{
    position:fixed;
    left:0;
    right:0;
    bottom:var(--mobile-bottom-nav-height);
    z-index:var(--z-nav-menu);
    width:min(100%,580px);
    margin:0 auto;
    padding:10px 12px;
    border-radius:18px 18px 0 0;
    background:rgba(245,242,235,.94);
    border-top:1px solid rgba(60,50,40,.12);
    box-shadow:0 -18px 34px rgba(40,30,20,.12);
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    transition:transform .2s ease, opacity .2s ease;
  }
  .order-submit-bar{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(142px,.9fr);
    gap:10px;
    align-items:center;
  }
  .order-submit-meta{
    display:flex;
    min-width:0;
    flex-direction:column;
    justify-content:center;
    gap:2px;
  }
  .order-submit-meta span,
  .order-submit-meta small{
    color:var(--text3);
    font-size:.72rem;
    font-weight:700;
  }
  .order-submit-meta strong{
    color:var(--text);
    font-size:1.38rem;
    line-height:1.1;
    font-weight:900;
    font-variant-numeric:tabular-nums;
  }
  .order-submit-meta small{
    display:inline-flex;
    align-items:center;
    gap:5px;
  }
  .order-submit-meta small::before{
    content:"";
    width:7px;
    height:7px;
    border-radius:999px;
    background:var(--accent);
    box-shadow:0 0 0 3px rgba(230,73,0,.12);
  }
  .order-submit-btn{
    min-height:54px;
    padding:12px 14px;
    border-radius:16px;
  }
  .col-n.open .arrow{
    top:22px;
  }
  .col-n.open .dropdown{
    position:relative;
    top:auto;
    left:auto;
    right:auto;
    margin-top:8px;
    max-height:220px;
    border-radius:16px;
  }
  .assigned-worker-field{
    grid-template-columns:1fr;
    gap:8px;
  }
  .assigned-worker-label{
    justify-content:flex-start;
    min-height:auto;
    padding:0;
    background:none;
    box-shadow:none;
  }
  .assigned-worker-menu{
    position:relative;
    top:auto;
    left:auto;
    right:auto;
    margin-top:8px;
    max-height:230px;
  }
  .order-list-toolbar{
    gap:8px;
    margin-bottom:10px;
  }
  .order-list-search{
    position:sticky;
    top:calc(env(safe-area-inset-top,0px) + 58px);
    z-index:var(--z-card-inline-open);
  }
  .order-filter-row{
    align-items:center;
    flex-wrap:nowrap;
    gap:8px;
  }
  .order-filter-panel{
    min-width:0;
  }
  .order-filter-panel summary{
    min-height:42px;
    padding:8px 12px;
  }
  .order-filter-panel summary strong{
    max-width:34vw;
  }
  .order-filter-panel .order-list-controls{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    max-height:56vh;
    overflow:auto;
  }
  .order-list-controls{
    gap:8px;
  }
  .filter-group{
    align-items:flex-start;
    flex-direction:column;
    gap:6px;
  }
  .filter-label{
    padding-left:2px;
  }
  .fbar{
    width:100%;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:none;
  }
  .fbar::-webkit-scrollbar{
    display:none;
  }
  .fch{
    flex:0 0 auto;
  }
  .order-list-toolbar .filter-group{
    width:100%;
    align-items:stretch;
    flex-direction:column;
  }
  .order-list-toolbar .fbar{
    width:100%;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:none;
  }
  .order-list-toolbar .fbar::-webkit-scrollbar{
    display:none;
  }
  .batch-actions .batch{
    width:auto;
  }
  .bbar{
    position:fixed;
    left:12px;
    right:12px;
    bottom:var(--mobile-bottom-nav-height);
    z-index:var(--z-nav-menu);
    max-height:calc(100dvh - var(--mobile-bottom-nav-height) - 86px);
    overflow-y:auto;
    flex-direction:column;
    align-items:stretch;
    margin:0 auto;
    padding:14px;
    border-radius:20px 20px 0 0;
    box-shadow:0 -18px 38px rgba(40,30,20,.16);
  }
  .bbar.show{
    display:flex;
  }
  .batch-field,
  .bbar input[type="date"],
  .bbtn{
    width:100%;
  }
  .batch-field{
    min-width:0;
    flex:0 0 auto;
    align-items:stretch;
    flex-direction:column;
  }
  .cg{
    border-radius:16px;
  }
  .ch{
    padding:10px 12px;
  }
  .ch-main{
    gap:8px;
  }
  .ch-person{
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
  }
  .ch-name{
    font-size:1rem;
    font-weight:680;
  }
  .ch-count{
    font-size:.72rem;
  }
  .ch-money strong{
    font-size:1.02rem;
  }
  .ri-l{
    padding:10px 12px 10px 15px;
  }
  .ri-summary{
    align-items:center;
    gap:8px;
  }
  .ri-title-row{
    flex-wrap:wrap;
    gap:5px 7px;
  }
  .ri-title{
    flex:1 1 min(160px,100%);
    font-size:.86rem;
  }
  .ri-mobile-status{
    display:inline-flex;
    align-items:center;
    min-height:22px;
    padding:3px 8px;
    border-radius:999px;
    background:var(--sep2);
    color:var(--text2);
    font-size:.7rem;
    font-weight:700;
    white-space:nowrap;
  }
  .ri-status-row{
    margin-top:6px;
  }
  .ri.is-collapsed .stage-steps{
    display:none;
  }
  .ri.is-collapsed .ri-chip-row .order-chip-neutral,
  .ri.is-collapsed .ri-chip-row .order-chip-outsourced{
    display:none;
  }
  .ri-summary-side{
    align-items:flex-end;
    gap:5px;
  }
  .ri-toggle{
    width:34px;
    height:34px;
  }
  .ri-details{
    margin-top:9px;
    padding-top:9px;
  }
  .ri-acts{
    gap:8px;
  }
  .ri-action-primary,
  .ri-action-primary .ab{
    width:100%;
  }
  .ri-action-primary .ab{
    min-height:46px;
    font-size:.86rem;
    border-radius:12px;
  }
  .ri-action-secondary,
  .ri-action-utility{
    display:none;
  }
  .ri-action-mobile-more{
    display:inline-flex;
    width:100%;
  }
  .ri-action-mobile-more summary{
    width:100%;
    min-height:44px;
    border-radius:12px;
  }
  .piecework-detail-table{
    display:none;
  }
  .piecework-record-cards{
    display:flex;
    flex-direction:column;
    gap:10px;
  }
}

@media (max-width:767px){
  /* When the soft keyboard is up, collapse the fixed bottom chrome so the
     focused field is not covered and the shrunken viewport feels less cramped. */
  body.order-keyboard-open .bottom-nav{
    transform:translateY(110%);
    pointer-events:none;
  }
  body.order-keyboard-open .order-submit-wrap{
    transform:translateY(120%);
    opacity:0;
    pointer-events:none;
  }
  body.order-keyboard-open .order-page-app{
    --mobile-bottom-nav-height:0px;
    --mobile-submit-bar-height:0px;
  }
  body.order-keyboard-open .app.order-page-app{
    padding-bottom:24px;
  }
  body.order-keyboard-open .order-entry-form{
    padding-bottom:18px;
  }
  body.order-keyboard-open .order-list-search{
    top:calc(env(safe-area-inset-top,0px) + 10px);
  }

  /* Compact order entry so shop staff see more of the form without scrolling. */
  .order-page-app .order-utility-bar{
    margin:0 8px 6px;
  }
  .order-page-app .tabs{
    margin:0 8px 2px;
  }
  .order-page-app .form-area,
  .order-page-app .list-area{
    padding:10px 8px;
  }
  .order-page-app .order-customer-card .row{
    flex-direction:row;
    gap:8px;
  }
  .order-page-app .order-customer-card .col-n{
    flex:1 1 0;
    min-width:0;
  }
  .order-page-app .order-customer-card .col-p{
    flex:1.32 1 0;
    min-width:0;
  }
  .order-page-app .order-customer-card .type-row{
    margin-top:8px;
    gap:6px;
  }
  .order-page-app .payment-help{
    margin-top:0;
    padding:7px 11px;
  }
  .order-page-app .compact-note-input{
    min-height:52px;
    padding:9px 12px;
    line-height:1.4;
  }
  .order-page-app .order-note-label{
    min-height:auto;
    padding:4px 0 0;
  }
  .order-page-app .assigned-worker-help,
  .order-page-app .assigned-worker-card .section-copy{
    margin-top:2px;
  }

  /* Quantity / unit price / subtotal / delete on a single compact row.
     Price takes the flexible column so it reads like a normal money field. */
  .order-page-app .item-row-controls{
    grid-template-columns:auto minmax(86px,1fr) auto 38px;
    grid-template-areas:"qty price total delete";
    align-items:end;
    gap:6px;
    padding:10px;
  }
  .order-page-app .qty-control-line{
    gap:4px;
    min-height:42px;
  }
  .order-page-app .qty-inline{
    min-height:42px;
    border-radius:11px;
  }
  .order-page-app .qty-b{
    width:28px;
    height:42px;
    font-size:1rem;
  }
  .order-page-app .qty-v{
    width:22px;
    font-size:.96rem;
  }
  .order-page-app .qty-unit{
    padding:0 1px;
    font-size:.78rem;
  }
  .order-page-app .item-price-wrap{
    min-width:0;
  }
  .order-page-app .item-price-wrap .input{
    min-width:0;
    width:100%;
    min-height:42px;
    padding:9px 6px;
    text-align:center;
    font-size:16px;
  }
  .order-page-app .item-subtotal{
    min-width:0;
  }
  .order-page-app .item-subtotal strong{
    min-width:0;
    min-height:42px;
    padding:9px 8px;
    font-size:.92rem;
    white-space:nowrap;
  }
  .order-page-app .item-action-cell{
    align-items:stretch;
    justify-content:flex-end;
  }
  .order-page-app .item-action-cell .mini-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    width:38px;
    min-width:38px;
    min-height:42px;
    padding:0;
    font-size:0;
    line-height:0;
  }
  .order-page-app .item-action-cell .mini-btn::before{
    content:"\00d7";
    font-size:20px;
    font-weight:800;
    line-height:1;
  }
}

@media (max-width:767px){
  /* Unify every popup into a single bottom-sheet pattern on phones:
     consistent shape, full-width, and keyboard-friendly (content scrolls,
     primary actions stay docked). */
  .shell-modal,
  .sign-ov{
    align-items:flex-end;
    padding:0;
  }
  .shell-modal-card,
  .sign-box{
    width:100%;
    max-width:none;
    margin:0;
    max-height:92vh;
    overflow-y:auto;
    border-radius:22px 22px 0 0;
    border-bottom:none;
    animation:sheetUp .26s cubic-bezier(.22,.61,.36,1);
  }
  .shell-modal-card{
    padding:24px 18px calc(env(safe-area-inset-bottom,0px) + 18px);
  }
  .sign-box{
    padding-bottom:env(safe-area-inset-bottom,0px);
  }
  /* Keep the footer actions reachable above the keyboard. */
  .sign-f{
    position:sticky;
    bottom:0;
    background:rgba(255,255,255,.97);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
  }
  .shell-modal-actions{
    position:sticky;
    bottom:0;
    margin-top:4px;
    padding-top:12px;
    background:linear-gradient(180deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.96) 28%);
  }
}

.customer-risk-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.customer-risk-card{
  position:relative;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:20px 18px;
  border:1px solid var(--sep);
  border-radius:var(--r-lg);
  background:var(--card);
  color:var(--text);
  text-decoration:none;
  box-shadow:var(--shadow);
  overflow:hidden;
  transition:transform .35s cubic-bezier(.22,.61,.36,1),box-shadow .35s ease,border-color .35s ease;
}
.customer-risk-card::before{
  content:"";position:absolute;top:0;left:0;right:0;height:2px;
  background:linear-gradient(90deg,var(--gold),transparent 75%);opacity:.55;
}
a.customer-risk-card:hover{transform:translateY(-1px);box-shadow:var(--shadow-lg);border-color:var(--gold-soft)}
.customer-risk-card span{
  color:var(--text3);
  font-size:.72rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.customer-risk-card strong{
  font-family:var(--font-serif);
  font-size:clamp(1.25rem,4.4vw,1.85rem);
  line-height:1.05;
  font-weight:600;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}
.customer-risk-card small{
  color:var(--text3);
  font-size:.76rem;
}
.customer-risk-card.is-alert{
  border-color:rgba(168,58,43,.30);
}
.customer-risk-card.is-alert::before{
  background:linear-gradient(90deg,var(--red),transparent 75%);opacity:.7;
}
.customer-risk-card.is-alert strong,
.customer-card-badge.is-due{
  color:var(--red);
}
.customer-quick-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.customer-filter-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 14px;
  border:1px solid var(--sep);
  border-radius:var(--r-pill);
  background:var(--card);
  color:var(--text2);
  font-size:.82rem;
  font-weight:650;
  text-decoration:none;
  transition:color .25s ease,background-color .25s ease,border-color .25s ease;
}
.customer-filter-chip:hover{border-color:var(--text3);color:var(--text)}
.customer-filter-chip.is-active{
  border-color:var(--text);
  background:var(--text);
  color:#fff;
}
.customer-ledger-workbench{
  display:block;
}
.customer-list-panel,
.customer-ledger-panel{
  min-width:0;
}
.customer-list-helper{
  margin-top:12px;
  padding:12px 2px 0;
  border-top:1px solid var(--sep2);
}
.customer-mobile-cards,
.ledger-entry-cards{
  display:none;
}
.customer-mobile-card{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:13px;
  border:1px solid var(--sep2);
  border-radius:12px;
  background:rgba(255,255,255,.92);
  color:var(--text);
  text-decoration:none;
}
.customer-mobile-card.is-selected{
  border-color:rgba(230,73,0,.36);
  background:rgba(230,73,0,.08);
}
.customer-card-head,
.customer-card-meta,
.customer-card-money{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.customer-card-head strong{
  display:block;
  font-size:.98rem;
  line-height:1.25;
}
.customer-card-head small,
.customer-card-meta{
  color:var(--text3);
  font-size:.78rem;
}
.customer-card-meta,
.customer-card-money{
  flex-wrap:wrap;
}
.customer-card-money{
  align-items:center;
  color:var(--text3);
  font-size:.82rem;
}
.customer-card-money strong{
  color:var(--text);
  font-variant-numeric:tabular-nums;
}
.customer-card-badge{
  flex:0 0 auto;
  padding:5px 8px;
  border-radius:999px;
  background:var(--green-bg);
  color:var(--green-dark);
  font-size:.75rem;
  font-style:normal;
  font-weight:820;
  white-space:nowrap;
}
.customer-card-badge.is-due{
  background:var(--orange-bg);
}
.customer-mobile-empty,
.ledger-entry-empty{
  padding:18px;
  border:1px dashed var(--sep);
  border-radius:12px;
  color:var(--text3);
  text-align:center;
}
.customer-ledger-empty{
  min-height:220px;
  align-items:center;
}
.ledger-entry-card{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:13px;
  border:1px solid var(--sep2);
  border-radius:12px;
  background:rgba(255,255,255,.88);
}
.ledger-entry-card-head,
.ledger-entry-card-meta{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.ledger-entry-card-head span,
.ledger-entry-card-meta{
  color:var(--text3);
  font-size:.78rem;
}
.ledger-entry-card-head strong{
  font-size:1rem;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.ledger-entry-card p{
  margin:0;
  color:var(--text2);
  font-size:.86rem;
  overflow-wrap:anywhere;
}
body.has-ledger-modal{
  overflow:hidden;
}
body.has-ledger-modal .shell-main,
.shell-main:has(.customer-ledger-overlay){
  z-index:var(--z-overlay);
}
.customer-ledger-overlay{
  position:fixed;
  inset:0;
  z-index:var(--z-overlay);
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:28px 18px;
  background:rgba(40,30,20,.46);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  overflow:auto;
}
.customer-ledger-dialog{
  width:min(1080px,100%);
  max-height:calc(100vh - 56px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.78);
  border-radius:18px;
  background:rgba(255,255,255,.98);
  box-shadow:0 34px 90px rgba(40,30,20,.28),0 10px 28px rgba(40,30,20,.16);
}
.customer-ledger-dialog-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px 12px;
  background:rgba(255,255,255,.98);
}
.customer-ledger-dialog-head h2{
  margin:0;
  font-size:1.18rem;
}
.customer-ledger-dialog-head p{
  margin:5px 0 0;
  color:var(--text3);
  font-size:.86rem;
}
.customer-ledger-close{
  flex:0 0 auto;
  width:40px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--sep2);
  border-radius:999px;
  background:rgba(245,242,235,.96);
  color:var(--text2);
  font-size:1.45rem;
  line-height:1;
  text-decoration:none;
}
.customer-ledger-tabs{
  display:flex;
  gap:8px;
  padding:0 20px 12px;
  border-bottom:1px solid var(--sep2);
  background:rgba(255,255,255,.98);
  overflow-x:auto;
  scrollbar-width:none;
}
.customer-ledger-tabs::-webkit-scrollbar{
  display:none;
}
.customer-ledger-tab{
  flex:0 0 auto;
  min-height:38px;
  padding:8px 14px;
  border:1px solid var(--sep2);
  border-radius:999px;
  background:rgba(245,242,235,.9);
  color:var(--text2);
  font-weight:780;
  cursor:pointer;
}
.customer-ledger-tab.is-active{
  border-color:rgba(230,73,0,.26);
  background:rgba(230,73,0,.1);
  color:var(--accent-strong);
}
.customer-ledger-dialog-body{
  min-height:0;
  flex:1 1 auto;
  overflow:auto;
  padding:16px 20px 20px;
}
.customer-ledger-tab-panel{
  display:flex;
  flex-direction:column;
  gap:12px;
}

@media (min-width:1080px){
  .customer-ledger-workbench{
    display:block;
  }
  .customer-list-panel{
    position:static;
    max-height:none;
    overflow:visible;
  }
  .customer-list-panel .table-wrap,
  .customer-list-panel > .table-scroll-hint{
    display:block;
  }
  .customer-list-panel .customer-mobile-cards{
    display:none;
  }
  .customer-ledger-dialog .admin-data-table{
    min-width:720px;
  }
}

@media (max-width:920px){
  .customer-risk-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:767px){
  .customer-risk-grid{
    gap:10px;
  }
  .customer-risk-card{
    padding:13px;
    border-radius:10px;
  }
  .customer-risk-card strong{
    font-size:1.12rem;
  }
  .customer-risk-card small{
    min-height:2.3em;
  }
  .customer-quick-filters{
    flex-wrap:nowrap;
    margin:0 -2px 2px;
    padding-bottom:4px;
    overflow-x:auto;
    scrollbar-width:none;
  }
  .customer-quick-filters::-webkit-scrollbar{
    display:none;
  }
  .customer-filter-chip{
    flex:0 0 auto;
  }
  .customer-list-panel .table-wrap,
  .customer-list-panel > .table-scroll-hint,
  .customer-ledger-detail .admin-subpanel > .table-wrap,
  .customer-ledger-detail .admin-subpanel > .table-scroll-hint{
    display:none;
  }
  .customer-mobile-cards,
  .ledger-entry-cards{
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .customer-ledger-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .customer-ledger-stats .admin-stat-cell{
    border-right:1px solid var(--sep2);
    border-bottom:1px solid var(--sep2);
  }
  .customer-ledger-stats .admin-stat-cell:nth-child(2n){
    border-right:none;
  }
  .customer-ledger-stats .admin-stat-cell:nth-last-child(-n+2){
    border-bottom:none;
  }
  .ledger-entry-card-meta{
    flex-wrap:wrap;
  }
  .customer-ledger-overlay{
    align-items:flex-end;
    padding:0;
  }
  .customer-ledger-dialog{
    width:100%;
    max-height:92vh;
    min-height:0;
    border-right:none;
    border-bottom:none;
    border-left:none;
    border-radius:18px 18px 0 0;
  }
  .customer-ledger-dialog-head{
    padding:16px 14px 10px;
  }
  .customer-ledger-tabs{
    padding:0 14px 10px;
  }
  .customer-ledger-dialog-body{
    padding:12px 12px calc(env(safe-area-inset-bottom,0px) + 14px);
  }
}

@media (max-width:520px){
  .customer-risk-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .customer-card-head,
  .ledger-entry-card-head{
    align-items:stretch;
    flex-direction:column;
  }
  .customer-card-badge,
  .ledger-entry-card-head strong{
    align-self:flex-start;
  }
}

.schedule-page{
  max-width:1540px;
}
.schedule-hero .workspace-mini-stat small{
  display:block;
  margin-top:4px;
  color:var(--text3);
  font-size:.74rem;
  font-weight:680;
}
.schedule-focus-strip{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.schedule-focus-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:16px;
  background:var(--card);
  border:1px solid var(--glass-border);
  box-shadow:var(--shadow);
}
.schedule-focus-item span{
  color:var(--text3);
  font-size:.8rem;
  font-weight:760;
}
.schedule-focus-item strong{
  color:var(--text);
  font-size:1.08rem;
  font-weight:860;
  font-variant-numeric:tabular-nums;
}
.schedule-board{
  display:grid;
  grid-template-columns:repeat(5,minmax(240px,1fr));
  gap:12px;
  align-items:start;
  overflow-x:auto;
  padding-bottom:4px;
}
.schedule-lane{
  min-width:240px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.schedule-lane-head{
  min-height:92px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:14px;
  border-radius:18px;
  background:var(--card);
  border:1px solid var(--glass-border);
  box-shadow:var(--shadow);
}
.schedule-lane-head h2{
  margin:0 0 5px;
  font-size:1rem;
  line-height:1.2;
}
.schedule-lane-head p{
  margin:0;
  color:var(--text3);
  font-size:.78rem;
  line-height:1.35;
}
.schedule-lane-count{
  flex:0 0 auto;
  min-width:54px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
  font-variant-numeric:tabular-nums;
}
.schedule-lane-count strong{
  font-size:1.28rem;
  line-height:1;
  font-weight:880;
}
.schedule-lane-count span{
  color:var(--text3);
  font-size:.72rem;
  font-weight:760;
}
.schedule-order-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.schedule-order-card,
.schedule-empty{
  border-radius:16px;
  background:var(--card);
  border:1px solid var(--glass-border);
  box-shadow:0 10px 24px rgba(40,30,20,.06);
}
.schedule-order-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:13px;
}
.schedule-order-card.is-backlog{
  border-color:rgba(176,122,46,.32);
  background:linear-gradient(180deg,var(--orange-bg) 0%,var(--card) 100%);
}
.schedule-order-card.is-completed{
  border-color:rgba(94,122,82,.2);
}
.schedule-order-top,
.schedule-order-main{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.schedule-tags{
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}
.schedule-tag{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(26,23,20,.06);
  color:var(--text2);
  font-size:.68rem;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}
.schedule-tag-status{
  background:rgba(230,73,0,.1);
  color:var(--accent-strong);
}
.schedule-tag-today{
  background:var(--green-bg);
  color:var(--green-dark);
}
.schedule-tag-backlog,
.schedule-tag-money{
  background:var(--orange-bg);
  color:var(--orange-dark);
}
.schedule-amount{
  flex:0 0 auto;
  color:var(--text);
  font-size:1rem;
  font-weight:860;
  font-variant-numeric:tabular-nums;
}
.schedule-order-main h3{
  margin:0;
  font-size:1rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.schedule-order-main p{
  margin:4px 0 0;
  color:var(--text3);
  font-size:.74rem;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.schedule-qty{
  flex:0 0 auto;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  background:var(--bg2);
  color:var(--text2);
  font-size:.74rem;
  font-weight:820;
  white-space:nowrap;
}
.schedule-shelf,
.schedule-note{
  margin:0;
  padding:8px 10px;
  border-radius:12px;
  background:var(--bg2);
  color:var(--text2);
  font-size:.76rem;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.schedule-items{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.schedule-item{
  padding:8px 9px;
  border-radius:12px;
  background:var(--bg2);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.schedule-item span{
  display:block;
  color:var(--text);
  font-size:.82rem;
  font-weight:760;
  line-height:1.35;
}
.schedule-item small{
  display:block;
  margin-top:4px;
  color:var(--text3);
  font-size:.72rem;
  line-height:1.35;
}
.schedule-card-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding-top:2px;
}
.schedule-action{
  flex:0 0 auto;
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 10px;
  border:none;
  border-radius:999px;
  background:var(--bg2);
  color:var(--text2);
  font-size:.74rem;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.schedule-action.is-primary{
  background:var(--blue);
  color:#fff;
  box-shadow:0 10px 18px rgba(230,73,0,.18);
}
.schedule-empty{
  padding:22px 12px;
  color:var(--text3);
  font-size:.86rem;
  font-weight:700;
  text-align:center;
}
.schedule-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(420px,.85fr);
  gap:14px;
  align-items:start;
}
.schedule-business-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
.schedule-business-card{
  min-width:0;
}
.schedule-business-metrics{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
}
.schedule-business-metrics div{
  min-width:0;
  padding:12px;
  border-radius:14px;
  background:var(--bg2);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.08);
}
.schedule-business-metrics span,
.schedule-business-metrics small{
  display:block;
  color:var(--text3);
  font-size:.72rem;
  font-weight:760;
  line-height:1.3;
}
.schedule-business-metrics strong{
  display:block;
  margin:4px 0 2px;
  color:var(--text);
  font-size:1.16rem;
  line-height:1.1;
  font-weight:880;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}
.schedule-business-quick{
  border-color:rgba(230,73,0,.18);
}
.schedule-business-laundry{
  border-color:rgba(63,110,114,.2);
}
.schedule-section{
  min-width:0;
}
.schedule-table-wrap{
  max-height:none;
}
.schedule-table{
  min-width:760px;
}
.schedule-table th,
.schedule-table td{
  white-space:nowrap;
}
.schedule-table td:nth-child(4),
.schedule-table td:nth-child(5),
.schedule-table td:nth-child(6){
  white-space:normal;
  min-width:120px;
}
.schedule-untouched-table{
  min-width:900px;
}
.table-link{
  color:var(--accent-strong);
  font-weight:800;
}
.schedule-row-alert td{
  background:rgba(176,122,46,.08);
}
.schedule-wait-normal td{
  background:rgba(94,122,82,.06);
}
.schedule-wait-warning td{
  background:rgba(176,122,46,.1);
}
.schedule-wait-urgent td{
  background:rgba(168,58,43,.1);
}
.schedule-wait-urgent .schedule-wait{
  background:var(--red-bg);
  color:var(--red);
}
.schedule-wait{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 9px;
  border-radius:999px;
  background:var(--orange-bg);
  color:var(--orange-dark);
  font-size:.82rem;
}
.schedule-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:4px 9px;
  border-radius:999px;
  background:rgba(230,73,0,.1);
  color:var(--accent-strong);
  font-size:.74rem;
  font-weight:820;
}
.schedule-inline-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:6px 10px;
  border-radius:999px;
  background:var(--accent-light);
  color:var(--accent-strong);
  font-size:.78rem;
  font-weight:820;
}
.schedule-footnote{
  margin:0;
  padding:0 4px 4px;
  color:var(--text3);
  font-size:.82rem;
  line-height:1.5;
}
.schedule-worker-table{
  min-width:980px;
}
.today-board-hero{
  padding:20px;
}
.today-board-stats{
  grid-template-columns:repeat(10,minmax(108px,1fr));
  gap:10px;
  overflow-x:auto;
  padding-bottom:2px;
}
.today-board-stats .workspace-mini-stat{
  min-height:106px;
}
.today-stat-card{
  position:relative;
  overflow:hidden;
  border-radius:12px;
  background:rgba(255,255,255,.86);
  border:1px solid rgba(60,50,40,.16);
  box-shadow:0 8px 18px rgba(40,30,20,.05), inset 0 1px 0 rgba(255,255,255,.9);
}
.today-stat-card::after{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:3px;
  background:var(--blue);
}
.today-stat-card span{
  display:flex;
  align-items:center;
  gap:6px;
}
.today-stat-card span::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:var(--blue);
  box-shadow:0 0 0 3px rgba(230,73,0,.12);
}
.today-stat-card strong{
  font-size:1.32rem;
  line-height:1;
}
.today-stat-laundry::after,
.today-stat-laundry span::before{
  background:#30b0c7;
}
.today-stat-laundry span::before{
  box-shadow:0 0 0 3px rgba(63,110,114,.14);
}
.today-board-section .section-head h2{
  font-size:1.08rem;
}
.today-board-section .section-head p{
  max-width:none;
}
.today-board-list-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
}
.today-board-list-title{
  min-width:0;
  display:flex;
  align-items:baseline;
  gap:14px;
}
.today-board-list-title h2{
  flex:0 0 auto;
}
.today-board-list-title p{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.today-board-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:8px;
}
.today-board-tools label{
  color:var(--text3);
  font-size:.78rem;
  font-weight:820;
  white-space:nowrap;
}
.today-status-select{
  min-width:138px;
  height:36px;
}
.today-board-table{
  min-width:1080px;
}
.today-worker-table{
  min-width:980px;
}
.today-board-table th,
.today-board-table td,
.today-worker-table th,
.today-worker-table td{
  white-space:normal;
}
.today-board-table th:nth-child(1),
.today-board-table td:nth-child(1),
.today-board-table th:nth-child(2),
.today-board-table td:nth-child(2),
.today-board-table th:nth-child(3),
.today-board-table td:nth-child(3),
.today-board-table th:nth-child(7),
.today-board-table td:nth-child(7),
.today-worker-table th:nth-child(3),
.today-worker-table td:nth-child(3),
.today-worker-table th:nth-child(5),
.today-worker-table td:nth-child(5),
.today-worker-table th:nth-child(6),
.today-worker-table td:nth-child(6),
.today-worker-table th:nth-child(7),
.today-worker-table td:nth-child(7){
  white-space:nowrap;
}
.today-board-row-waiting td{
  background:rgba(176,122,46,.05);
}
.today-board-row-working td,
.today-board-row-washing td{
  background:rgba(230,73,0,.05);
}
.today-board-row-done td,
.today-board-row-ready td{
  background:rgba(94,122,82,.05);
}
.schedule-ticket{
  display:block;
  color:var(--text);
  font-size:1rem;
  line-height:1.2;
  font-weight:900;
  letter-spacing:0;
  font-variant-numeric:tabular-nums;
}
.schedule-ticket + small{
  display:block;
  margin-top:4px;
  color:var(--text3);
  font-size:.72rem;
  font-weight:760;
}
.schedule-state,
.schedule-worker-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:860;
  line-height:1;
  white-space:nowrap;
}
.schedule-state-waiting{
  background:var(--orange-bg);
  color:var(--orange-dark);
}
.schedule-state-working,
.schedule-state-washing,
.schedule-worker-working{
  background:rgba(230,73,0,.12);
  color:var(--accent-strong);
}
.schedule-state-done,
.schedule-state-ready{
  background:var(--green-bg);
  color:var(--green-dark);
}
.schedule-state-delivered{
  background:rgba(60,50,40,.12);
  color:var(--text2);
}
.schedule-worker-idle{
  background:rgba(60,50,40,.12);
  color:var(--text2);
}
.schedule-duration{
  min-width:154px;
  display:inline-flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(176,122,46,.12);
  color:var(--orange-dark);
  box-shadow:inset 0 0 0 1px rgba(176,122,46,.18);
}
.schedule-duration strong{
  font-size:.9rem;
  line-height:1.15;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.schedule-duration small{
  color:inherit;
  opacity:.82;
  font-size:.72rem;
  font-weight:760;
}
.schedule-duration span{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:3px 7px;
  border-radius:999px;
  background:var(--red-bg);
  color:var(--red);
  font-size:.68rem;
  font-weight:900;
  white-space:nowrap;
}
.schedule-duration-working,
.schedule-duration-washing{
  background:rgba(230,73,0,.12);
  color:var(--accent-strong);
  box-shadow:inset 0 0 0 1px rgba(230,73,0,.18);
}
.schedule-duration-done,
.schedule-duration-ready{
  background:var(--green-bg);
  color:var(--green-dark);
  box-shadow:inset 0 0 0 1px rgba(94,122,82,.16);
}
.schedule-duration-delivered{
  background:rgba(60,50,40,.12);
  color:var(--text2);
  box-shadow:inset 0 0 0 1px rgba(60,50,40,.14);
}
.today-board-flow .section-head{
  margin-bottom:12px;
}
.today-flow-grid{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.today-flow-line{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.today-flow-line strong{
  min-width:44px;
  color:var(--text);
  font-size:.86rem;
  font-weight:900;
}
.today-flow-line span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:6px 10px;
  border-radius:999px;
  background:var(--bg2);
  color:var(--text2);
  font-size:.76rem;
  font-weight:820;
}
.today-flow-note{
  margin:2px 0 0;
  color:var(--text3);
  font-size:.82rem;
  line-height:1.5;
}
.today-board-table small,
.today-worker-table small{
  color:var(--text3);
}
.today-board-table .schedule-duration small{
  color:inherit;
}
.today-worker-table td:nth-child(4){
  min-width:260px;
}

@media (max-width:1180px){
  .today-board-stats{
    grid-template-columns:repeat(10,minmax(116px,1fr));
  }
  .schedule-board{
    grid-template-columns:repeat(5,minmax(260px,1fr));
  }
  .schedule-grid{
    grid-template-columns:1fr;
  }
  .schedule-business-grid{
    grid-template-columns:1fr;
  }
  .schedule-business-metrics{
    grid-template-columns:repeat(5,minmax(120px,1fr));
    overflow-x:auto;
    padding-bottom:2px;
  }
}

@media (max-width:767px){
  .main-nav{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .schedule-focus-strip{
    grid-template-columns:1fr;
  }
  .schedule-board{
    display:flex;
    flex-direction:column;
    overflow:visible;
  }
  .schedule-lane{
    min-width:0;
  }
  .schedule-lane-head{
    min-height:auto;
  }
  .schedule-card-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .schedule-action{
    width:100%;
  }
  .schedule-table{
    min-width:720px;
  }
  .today-board-list-head{
    grid-template-columns:1fr;
    gap:10px;
  }
  .today-board-list-title{
    flex-direction:column;
    align-items:flex-start;
    gap:4px;
  }
  .today-board-list-title p{
    white-space:normal;
  }
  .today-board-tools{
    justify-content:space-between;
  }
  .today-board-stats{
    grid-template-columns:repeat(10,minmax(116px,1fr));
  }
  .today-board-stats .workspace-mini-stat{
    min-height:102px;
  }
  .today-board-table{
    min-width:980px;
  }
  .schedule-untouched-table{
    min-width:840px;
  }
}

@media (prefers-color-scheme: dark){
  .customer-risk-card,
  .customer-mobile-card,
  .ledger-entry-card,
  .customer-filter-chip,
  .customer-ledger-dialog,
  .customer-ledger-dialog-head,
  .customer-ledger-tabs,
  .customer-ledger-close,
  .customer-ledger-tab{
    background:rgba(24,33,47,.92);
    color:var(--text);
    border-color:rgba(255,255,255,.08);
  }
  .customer-risk-card.is-alert{
    background:rgba(56,42,23,.78);
    border-color:rgba(176,122,46,.24);
  }
  .customer-risk-card.is-alert strong,
  .customer-card-badge.is-due{
    color:#FFD28A;
  }
}

/* Today board design optimization */
.today-board-body{
  --surface-page:#F4F1EA;
  --surface-card:#FFFFFF;
  --surface-subtle:#F1EDE4;
  --border-subtle:#ECE7DD;
  --border-default:#E1DACE;
  --ink-900:#1A1714;
  --ink-700:#403A33;
  --ink-500:#6B6258;
  --ink-300:#9C9385;
  --accent:#E64900;
  --accent-soft:#F6ECE2;
  --accent-hover:#C23A00;
  --accent-strong:#C23A00;
  --accent-light:#F6ECE2;
  --blue:#E64900;
  --blue-bg:#F6ECE2;
  --green:#5E7A52;
  --green-bg:#EEF1E8;
  --green-dark:#3F5638;
  --orange:#B07A2E;
  --orange-bg:#F4ECDD;
  --orange-dark:#7E551B;
  --red:#A83A2B;
  --red-bg:#F6E9E5;
  --bg:#F4F1EA;
  --bg2:#F1EDE4;
  --card:#FFFFFF;
  --card-solid:#FFFFFF;
  --text:#1A1714;
  --text2:#403A33;
  --text3:#6B6258;
  --text4:#9C9385;
  --sep:rgba(60,50,40,.13);
  --sep2:#ECE7DD;
  --sev-ok-fg:#3F5638;
  --sev-ok-bg:#EEF1E8;
  --sev-soon-fg:#7E551B;
  --sev-soon-bg:#F4ECDD;
  --sev-over-fg:#B07A2E;
  --sev-over-bg:#F4ECDD;
  --sev-crit-fg:#A83A2B;
  --sev-crit-bg:#F6E9E5;
  --radius-sm:6px;
  --radius-md:10px;
  --radius-lg:14px;
  --shadow-card:0 1px 2px rgba(40,30,20,.04),0 1px 1px rgba(40,30,20,.03);
  --shadow-pop:0 8px 24px rgba(40,30,20,.10);
  --sp-1:4px;
  --sp-2:8px;
  --sp-3:12px;
  --sp-4:16px;
  --sp-5:24px;
  --sp-6:32px;
  --sp-7:48px;
  min-height:100vh;
  background:var(--surface-page);
  color:var(--ink-900);
  font-family:-apple-system,"PingFang SC","Microsoft YaHei","Inter",sans-serif;
}
.today-board-body *,
.today-board-body *::before,
.today-board-body *::after{
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum";
}
.today-board-body button:focus-visible,
.today-board-body a:focus-visible,
.today-board-body select:focus-visible{
  outline:3px solid rgba(230,73,0,.28);
  outline-offset:3px;
}
.today-board-body .shell-header{
  padding:12px var(--sp-6) 0;
}
.today-board-body .shell-header-inner{
  max-width:1320px;
  padding:12px 16px;
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  background:rgba(255,255,255,.94);
  box-shadow:var(--shadow-card);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.today-board-body .brand-kicker{
  color:var(--ink-500);
  font-size:.72rem;
  letter-spacing:.12em;
}
.today-board-body .brand-title{
  color:var(--ink-900);
  font-size:1.12rem;
  font-weight:760;
}
.today-board-body .brand-meta,
.today-board-body .user-chip small{
  color:var(--ink-500);
}
.today-board-body .main-nav-link,
.today-board-body .main-nav-toggle{
  color:var(--ink-700);
  min-height:40px;
  border-radius:999px;
  box-shadow:none;
}
.today-board-body .main-nav-link:hover,
.today-board-body .main-nav-toggle:hover,
.today-board-body .main-nav-group.open .main-nav-toggle{
  background:var(--surface-subtle);
  color:var(--ink-900);
}
.today-board-body .main-nav-link.is-active,
.today-board-body .main-nav-group.is-active .main-nav-toggle{
  background:var(--accent-soft);
  color:var(--accent);
  box-shadow:none;
}
.today-board-body .compact-select,
.today-board-body .user-chip,
.today-board-body .header-actions .ghost-btn{
  min-height:40px;
  border:1px solid var(--border-default);
  border-radius:var(--radius-md);
  background:var(--surface-card);
  color:var(--ink-700);
  box-shadow:none;
}
.today-board-body .user-chip span{
  color:var(--ink-900);
}
.today-board-body .shell-main.today-board-main{
  max-width:1320px;
  padding:var(--sp-6);
}
.today-board-body .today-board-page{
  gap:var(--sp-6);
}
.today-board-body .workspace-page .today-board-hero{
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.today-kpi-board{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);
  gap:var(--sp-5);
  align-items:start;
}
.today-kpi-group{
  min-width:0;
}
.today-kpi-group-laundry{
  padding-left:var(--sp-5);
  border-left:1px solid var(--border-subtle);
}
.today-kpi-eyebrow{
  margin:0 0 var(--sp-3);
  color:var(--ink-500);
  font-size:12px;
  font-weight:700;
  letter-spacing:.12em;
}
.today-board-body .today-board-stats,
.today-board-body .today-kpi-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:var(--sp-3);
  overflow:visible;
  padding:0;
}
.today-board-body .today-stat-card{
  min-height:118px;
  padding:16px;
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  background:var(--surface-card);
  box-shadow:var(--shadow-card);
}
.today-board-body .today-stat-card::after,
.today-board-body .today-stat-card span::before{
  display:none;
}
.today-board-body .today-stat-card span{
  display:block;
  color:var(--ink-500);
  font-size:12px;
  font-weight:600;
}
.today-board-body .today-stat-card strong{
  display:block;
  margin-top:10px;
  color:var(--ink-900);
  font-size:30px;
  font-weight:700;
  line-height:1.1;
}
.today-board-body .today-stat-card small{
  display:block;
  margin-top:8px;
  color:var(--ink-500);
  font-size:12px;
  font-weight:400;
  line-height:1.35;
}
.today-board-body .today-stat-card.is-zero strong{
  color:var(--ink-300);
}
.today-board-body .today-stat-overdue:not(.is-zero) strong{
  color:var(--sev-over-fg);
}
.today-board-body .today-board-section{
  gap:var(--sp-4);
  padding:var(--sp-5);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  background:var(--surface-card);
  box-shadow:var(--shadow-card);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.today-board-body .today-board-section .section-head h2{
  margin:0 0 var(--sp-2);
  color:var(--ink-900);
  font-size:20px;
  font-weight:600;
  line-height:1.2;
}
.today-board-body .today-board-section .section-head p{
  color:var(--ink-500);
  font-size:13px;
  line-height:1.5;
}
.today-board-body .today-board-list-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:var(--sp-4);
}
.today-board-body .today-board-list-title{
  display:block;
}
.today-board-body .today-board-list-title p{
  overflow:visible;
  white-space:normal;
  text-overflow:clip;
}
.today-board-body .today-board-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:var(--sp-2);
}
.today-board-body .section-meta{
  min-height:34px;
  border-radius:999px;
  background:var(--surface-subtle);
  color:var(--ink-700);
  font-size:12px;
  font-weight:600;
}
.today-board-body .today-status-select{
  height:40px;
  min-width:142px;
  padding:8px 12px;
}
.today-board-body .today-board-table-wrap{
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  background:var(--surface-card);
  overflow:auto;
}
.today-board-body .today-board-table{
  min-width:1120px;
  border-collapse:separate;
  border-spacing:0;
  color:var(--ink-900);
  font-size:14px;
}
.today-board-body .today-board-table th,
.today-board-body .today-board-table td{
  padding:12px 14px;
  border-bottom:1px solid var(--border-subtle);
  background:var(--surface-card);
  color:var(--ink-900);
  vertical-align:middle;
}
.today-board-body .today-board-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:var(--surface-subtle);
  color:var(--ink-500);
  font-size:12px;
  font-weight:600;
  letter-spacing:.04em;
}
.today-board-body .today-board-table tbody tr:last-child td{
  border-bottom:0;
}
.today-board-body .today-day-group-row td{
  padding:8px 10px;
  background:var(--surface-subtle);
}
.today-day-toggle{
  width:100%;
  min-height:44px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  padding:8px 10px;
  border:0;
  border-radius:var(--radius-md);
  background:transparent;
  color:var(--ink-900);
  text-align:left;
  cursor:pointer;
}
.today-day-toggle:hover{
  background:var(--surface-card);
}
.today-day-toggle-icon{
  position:relative;
  flex:0 0 auto;
  width:24px;
  height:24px;
  border-radius:999px;
  background:var(--surface-card);
  color:var(--accent);
}
.today-day-toggle-icon::before{
  content:"";
  position:absolute;
  top:8px;
  left:7px;
  width:7px;
  height:7px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(-45deg);
  transition:transform .16s ease;
}
.today-day-group-row.is-expanded .today-day-toggle-icon::before{
  top:6px;
  transform:rotate(45deg);
}
.today-day-title{
  flex:0 0 auto;
  color:var(--ink-900);
  font-size:14px;
  font-weight:700;
}
.today-day-statuses{
  min-width:0;
  display:flex;
  align-items:center;
  flex:1 1 auto;
  flex-wrap:wrap;
  gap:6px;
}
.today-day-status-chip{
  min-height:26px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 8px;
  border:1px solid rgba(31,111,235,.18);
  border-radius:999px;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:12px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
}
.today-day-status-label{
  color:var(--ink-700);
}
.today-day-status-count{
  min-width:20px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 6px;
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  font-size:12px;
  font-weight:800;
  line-height:1;
}
.today-day-count{
  flex:0 0 auto;
  margin-left:auto;
  padding:4px 10px;
  border-radius:999px;
  background:var(--surface-card);
  color:var(--ink-700);
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}
.today-board-body .today-board-row-waiting td,
.today-board-body .today-board-row-working td,
.today-board-body .today-board-row-washing td,
.today-board-body .today-board-row-done td,
.today-board-body .today-board-row-ready td,
.today-board-body .today-board-row-delivered td{
  background:var(--surface-card);
}
.today-board-body .today-board-row:hover td{
  background:var(--surface-subtle);
}
.today-board-body .today-board-row td:first-child{
  border-left:3px solid transparent;
}
.today-board-body .today-board-row-sev-over td:first-child{
  border-left-color:var(--sev-over-fg);
}
.today-board-body .today-board-row-sev-crit td:first-child{
  border-left-color:var(--sev-crit-fg);
}
.today-duration-head > span{
  display:block;
  margin-bottom:6px;
}
.today-sort-controls{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  letter-spacing:0;
}
.today-sort-btn{
  min-height:28px;
  padding:4px 8px;
  border:1px solid var(--border-default);
  border-radius:999px;
  background:var(--surface-card);
  color:var(--ink-700);
  font-size:12px;
  font-weight:600;
  cursor:pointer;
}
.today-sort-btn:hover{
  background:var(--surface-subtle);
}
.today-sort-btn.is-active{
  border-color:transparent;
  background:var(--accent-soft);
  color:var(--accent);
}
.today-sort-btn.is-active::after{
  content:"↓";
  margin-left:4px;
}
.today-sort-btn.is-active[data-direction="asc"]::after{
  content:"↑";
}
.today-board-body .schedule-ticket{
  color:var(--ink-900);
  font-size:15px;
  font-weight:700;
}
.today-board-body .schedule-ticket + small,
.today-board-body .today-board-table small,
.today-board-body .today-worker-table small{
  color:var(--ink-500);
  font-size:12px;
  font-weight:400;
}
.today-board-body .schedule-state,
.today-board-body .schedule-worker-pill{
  min-height:24px;
  padding:2px 10px;
  border:0;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  line-height:1.4;
}
.today-board-body .schedule-state-waiting,
.today-board-body .schedule-worker-idle{
  background:var(--surface-subtle);
  color:var(--ink-700);
}
.today-board-body .schedule-state-working,
.today-board-body .schedule-state-washing,
.today-board-body .schedule-worker-working{
  background:var(--accent-soft);
  color:var(--accent);
}
.today-board-body .schedule-state-ready,
.today-board-body .schedule-state-done{
  background:var(--sev-soon-bg);
  color:var(--sev-soon-fg);
}
.today-board-body .schedule-state-delivered{
  background:var(--sev-ok-bg);
  color:var(--sev-ok-fg);
}
.today-customer{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.today-customer strong{
  color:var(--ink-900);
  font-size:14px;
  font-weight:500;
}
.today-customer strong.is-placeholder{
  color:var(--ink-300);
  font-style:italic;
  font-weight:400;
}
.today-customer small,
.today-item-price{
  color:var(--ink-500);
  font-size:12px;
}
.today-item-label{
  display:block;
  min-width:150px;
  color:var(--ink-900);
  line-height:1.45;
  overflow-wrap:anywhere;
}
.today-item-price{
  display:block;
  margin-top:4px;
}
.today-assignee-name{
  color:var(--ink-900);
}
.today-assignee-chip{
  min-height:40px;
  padding:6px 12px;
  border:1px dashed rgba(154,123,18,.62);
  border-radius:999px;
  background:transparent;
  color:var(--sev-soon-fg);
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}
.today-assignee-chip:hover{
  background:var(--sev-soon-bg);
}
.today-board-body .today-order-link{
  min-height:auto;
  padding:0;
  border-radius:0;
  background:transparent;
  color:var(--accent);
  font-size:13px;
  font-weight:700;
}
.today-board-body .today-order-link:hover{
  text-decoration:underline;
}
.today-board-body .today-duration{
  --duration-sev-fg:var(--sev-ok-fg);
  --duration-sev-bg:var(--sev-ok-bg);
  width:min(340px,100%);
  min-width:280px;
  gap:8px;
  padding:10px 12px;
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-md);
  background:var(--surface-card);
  color:var(--ink-900);
  box-shadow:none;
}
.today-board-body .today-duration.sev-ok{
  --duration-sev-fg:var(--sev-ok-fg);
  --duration-sev-bg:var(--sev-ok-bg);
}
.today-board-body .today-duration.sev-soon{
  --duration-sev-fg:var(--sev-soon-fg);
  --duration-sev-bg:var(--sev-soon-bg);
}
.today-board-body .today-duration.sev-over{
  --duration-sev-fg:var(--sev-over-fg);
  --duration-sev-bg:var(--sev-over-bg);
}
.today-board-body .today-duration.sev-crit{
  --duration-sev-fg:var(--sev-crit-fg);
  --duration-sev-bg:var(--sev-crit-bg);
}
.today-duration-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.today-board-body .today-duration strong{
  color:var(--duration-sev-fg);
  font-size:14px;
  font-weight:700;
  line-height:1.2;
}
.today-board-body .today-duration .today-duration-ratio{
  min-height:auto;
  padding:0;
  border-radius:0;
  background:transparent;
  color:var(--duration-sev-fg);
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}
.today-duration-meter{
  position:relative;
  width:100%;
  height:8px;
  overflow:hidden;
  border-radius:999px;
  background:var(--surface-subtle);
}
.today-duration-fill,
.today-duration-overflow{
  position:absolute;
  top:0;
  bottom:0;
  border-radius:999px;
}
.today-duration-fill{
  left:0;
  width:var(--duration-fill,0%);
  background:var(--duration-sev-fg);
  transition:width .2s ease;
}
.today-duration-overflow{
  right:0;
  width:var(--duration-overflow,0%);
  background:var(--duration-sev-fg);
  opacity:.42;
}
.today-duration:not(.is-overdue) .today-duration-overflow{
  display:none;
}
.today-board-body .today-duration small{
  color:var(--ink-500);
  font-size:12px;
  font-weight:400;
  line-height:1.35;
}
.today-board-body .today-duration .today-activity-label{
  align-self:flex-start;
  min-height:22px;
  padding:3px 8px;
  border-radius:999px;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:12px;
  font-weight:600;
}
.today-board-body .empty-cell{
  padding:32px 12px;
  color:var(--ink-500);
  text-align:center;
}
.today-worker-section{
  margin-top:calc(var(--sp-6) * -0.25);
}
.today-board-body .today-worker-table{
  color:var(--ink-900);
}
.today-board-body .schedule-footnote{
  margin-top:calc(var(--sp-6) * -0.35);
  color:var(--ink-500);
  font-size:12px;
}

@media (max-width:1100px){
  .today-kpi-board{
    grid-template-columns:1fr;
  }
  .today-kpi-group-laundry{
    padding-top:var(--sp-5);
    padding-left:0;
    border-top:1px solid var(--border-subtle);
    border-left:0;
  }
}

@media (max-width:767px){
  .today-board-body .shell-header{
    padding:8px 10px 0;
  }
  .today-board-body .shell-header-inner{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px 10px;
    padding:10px 12px;
    border-radius:18px;
  }
  .today-board-body .brand-block{
    min-width:0;
  }
  .today-board-body .brand-kicker{
    display:none;
  }
  .today-board-body .brand-title{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:1.02rem;
  }
  .today-board-body .brand-meta{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.72rem;
  }
  .today-board-body .main-nav{
    display:none;
  }
  .today-board-body .header-actions{
    grid-column:1 / -1;
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
    min-width:0;
  }
  .today-board-body .header-create,
  .today-board-body .user-chip{
    display:none;
  }
  .today-board-body .header-actions .inline-form{
    min-width:0;
    flex:1 1 auto;
  }
  .today-board-body .compact-select{
    min-width:0;
    width:100%;
    min-height:38px;
    padding:7px 10px;
    font-size:.82rem;
  }
  .today-board-body .header-actions .ghost-btn{
    flex:0 0 auto;
    min-height:38px;
    padding:7px 12px;
    font-size:.82rem;
  }
  .today-board-body .shell-main.today-board-main{
    padding:var(--sp-5) var(--sp-4);
  }
  .today-board-body .today-board-page{
    gap:var(--sp-5);
  }
  .today-board-body .today-board-stats,
  .today-board-body .today-kpi-grid{
    grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  }
  .today-board-body .today-stat-card{
    min-height:112px;
  }
  .today-board-body .today-board-section{
    padding:var(--sp-4);
  }
  .today-board-body .today-board-list-head{
    grid-template-columns:1fr;
  }
  .today-board-body .today-board-tools{
    justify-content:space-between;
  }
  .today-board-body .today-board-table-wrap{
    border:0;
    border-radius:0;
    background:transparent;
    overflow:visible;
  }
  .today-board-body .today-board-table{
    display:block;
    min-width:0;
  }
  .today-board-body .today-board-table thead{
    display:none;
  }
  .today-board-body .today-board-table tbody{
    display:flex;
    flex-direction:column;
    gap:12px;
  }
  .today-board-body .today-board-table tr[data-today-status-row]{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    padding:14px;
    border:1px solid var(--border-subtle);
    border-radius:var(--radius-lg);
    background:var(--surface-card);
    box-shadow:var(--shadow-card);
  }
  .today-board-body .today-board-table .today-day-group-row{
    display:block;
  }
  .today-board-body .today-board-table .today-day-group-row td{
    display:block;
    padding:0;
    border:0;
    background:transparent;
  }
  .today-day-toggle{
    min-height:52px;
    padding:12px 14px;
    border:1px solid var(--border-subtle);
    border-radius:var(--radius-lg);
    background:var(--surface-card);
    box-shadow:var(--shadow-card);
  }
  .today-day-toggle:hover{
    background:var(--surface-card);
  }
  .today-day-statuses{
    flex-basis:100%;
    padding-left:34px;
  }
  .today-board-body .today-board-table tr[data-today-status-row] td{
    display:grid;
    grid-template-columns:86px minmax(0,1fr);
    gap:10px;
    align-items:start;
    padding:0;
    border:0;
    background:transparent!important;
    white-space:normal;
  }
  .today-board-body .today-board-table tr[data-today-status-row] td::before{
    content:attr(data-label);
    color:var(--ink-500);
    font-size:12px;
    font-weight:600;
  }
  .today-board-body .today-board-row td:first-child{
    border-left:0;
  }
  .today-board-body .today-board-row-sev-over,
  .today-board-body .today-board-row-sev-crit{
    border-left-width:3px!important;
  }
  .today-board-body .today-board-row-sev-over{
    border-left-color:var(--sev-over-fg)!important;
  }
  .today-board-body .today-board-row-sev-crit{
    border-left-color:var(--sev-crit-fg)!important;
  }
  .today-board-body .today-board-table .today-duration-cell{
    order:-1;
    display:block!important;
  }
  .today-board-body .today-board-table .today-duration-cell::before{
    display:none;
  }
  .today-board-body .today-duration{
    width:100%;
    min-width:0;
  }
  .today-board-body .today-board-table td[data-label="序号"],
  .today-board-body .today-board-table td[data-label="状态"]{
    align-items:center;
  }
  .today-board-body .today-order-link,
  .today-board-body .today-assignee-chip{
    min-height:40px;
  }
  .today-board-body .today-worker-table{
    min-width:820px;
  }
}

@media (max-width:520px){
  .today-board-body .today-board-stats,
  .today-board-body .today-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .today-board-body .today-stat-card strong{
    font-size:26px;
  }
  .today-duration-line{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
  }
}

@media (prefers-reduced-motion:reduce){
  .today-duration-fill{
    transition:none;
  }
}

/* ============================================================
   Member Center (顾客会员中心) — Maison Atelier
   ============================================================ */
.member-body{
  margin:0;
  min-height:100vh;
  background:linear-gradient(180deg,#FBFAF6 0%,#F4F1EA 55%,#EFEAE0 100%);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Noto Sans SC",sans-serif;
  -webkit-font-smoothing:antialiased;
}
.member-kicker{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.68rem;font-weight:700;letter-spacing:.22em;text-transform:uppercase;color:var(--gold);
}
.member-kicker::before{content:"";width:18px;height:1px;background:var(--gold);opacity:.7}
.member-rule{
  width:44px;height:1px;margin:16px 0;
  background:linear-gradient(90deg,transparent,var(--gold),transparent);
}
.member-rule--center{margin-left:auto;margin-right:auto}
.member-crest{width:54px;height:54px;color:var(--gold)}
.member-crest svg{width:100%;height:100%}

/* ---------- Auth (phone login) ---------- */
.member-auth-shell{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  padding:24px;padding:max(24px,env(safe-area-inset-top)) 24px max(24px,env(safe-area-inset-bottom));
}
.member-auth-card{
  width:100%;max-width:420px;padding:44px 34px 38px;text-align:center;
  background:var(--card);border:1px solid var(--sep);border-radius:var(--r-lg);
  box-shadow:var(--shadow-lg);
}
.member-auth-card .member-crest{margin:0 auto 18px}
.member-auth-card .member-kicker{justify-content:center}
.member-auth-card .member-rule{margin:14px auto}
.member-auth-title{
  margin:8px 0 0;font-family:var(--font-serif);font-weight:600;letter-spacing:.02em;font-size:2.1rem;line-height:1.1;
}
.member-auth-copy{margin:0 auto 24px;max-width:300px;color:var(--text3);font-size:.92rem;line-height:1.55}
.member-auth-form{display:flex;flex-direction:column;gap:14px;text-align:left}
.member-field{display:flex;flex-direction:column;gap:7px}
.member-field span{font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text3)}
.member-input{
  width:100%;min-height:52px;padding:14px 16px;font-size:1.05rem;
  border:1px solid var(--sep);border-radius:var(--r);background:var(--bg2);color:var(--text);
  outline:none;transition:border-color .25s ease,box-shadow .25s ease,background-color .25s ease;
}
.member-input:focus{background:var(--card);border-color:var(--accent);box-shadow:0 0 0 3px rgba(230,73,0,.12)}
.member-input::placeholder{color:var(--text4)}
.member-error{
  margin:0;padding:11px 14px;border-radius:var(--r);
  background:var(--red-bg);color:var(--red);border:1px solid rgba(168,58,43,.24);
  font-size:.86rem;font-weight:600;line-height:1.5;
}
.member-submit{
  width:100%;min-height:52px;margin-top:4px;padding:15px 18px;
  border:none;border-radius:var(--r);background:var(--accent);color:#fff;
  font-size:1.02rem;font-weight:700;letter-spacing:.02em;cursor:pointer;
  box-shadow:0 2px 6px rgba(40,30,20,.14);
  transition:transform .28s cubic-bezier(.22,.61,.36,1),filter .3s ease;
}
.member-submit:hover{filter:brightness(1.04)}
.member-submit:active{transform:scale(.985)}
.member-auth-note{margin:22px auto 0;max-width:300px;color:var(--text4);font-size:.74rem;line-height:1.55}

/* ---------- Home shell ---------- */
.member-shell{
  max-width:560px;margin:0 auto;
  padding:max(16px,env(safe-area-inset-top)) 16px calc(36px + env(safe-area-inset-bottom));
}
.member-topbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 2px 18px;
}
.member-actions{display:flex;align-items:center;gap:8px}
.member-logout{
  min-height:40px;padding:8px 16px;border:1px solid var(--sep);border-radius:var(--r-pill);
  background:var(--card);color:var(--text2);font-size:.82rem;font-weight:650;cursor:pointer;
  transition:border-color .25s ease,color .25s ease;
}
.member-logout:hover{border-color:var(--text3);color:var(--text)}
.member-wechat-link,
.member-wechat-bound{
  min-height:40px;padding:8px 14px;border:1px solid rgba(62,142,95,.24);border-radius:var(--r-pill);
  background:rgba(62,142,95,.08);color:var(--green-dark);font-size:.82rem;font-weight:650;
  display:inline-flex;align-items:center;text-decoration:none;white-space:nowrap;
}
.member-wechat-bound{color:var(--text3);border-color:var(--sep);background:rgba(255,255,255,.5)}

/* ---------- Membership card ---------- */
.member-card{
  position:relative;overflow:hidden;
  padding:24px 24px 22px;border-radius:var(--r-lg);
  background:linear-gradient(150deg,#2A231B 0%,#1C1813 60%,#231C13 100%);
  color:#F4EFE7;
  box-shadow:0 18px 48px rgba(40,30,20,.28);
  border:1px solid rgba(194,160,106,.32);
}
.member-card-sheen{
  position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(120% 80% at 85% -10%,rgba(194,160,106,.20),transparent 55%);
}
.member-card > *{position:relative}
.member-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.member-card-brand{display:flex;align-items:center;gap:10px}
.member-crest--sm{width:30px;height:30px;color:#C2A06A}
.member-card-label{font-size:.7rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:#C2A06A}
.member-card-phone{font-size:.84rem;letter-spacing:.08em;color:rgba(244,239,231,.7);font-variant-numeric:tabular-nums}
.member-card-name{
  margin-top:20px;font-family:var(--font-serif);font-weight:600;font-size:1.5rem;letter-spacing:.02em;
}
.member-card-balance{margin-top:14px;display:flex;flex-direction:column;gap:4px}
.member-card-balance-label{font-size:.68rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:rgba(244,239,231,.55)}
.member-card-balance-value{
  font-family:var(--font-serif);font-weight:600;font-size:2.3rem;line-height:1.05;color:#F4EFE7;
  font-variant-numeric:tabular-nums;overflow-wrap:anywhere;
}
.member-card-stores{margin-top:14px;font-size:.78rem;color:rgba(244,239,231,.6);letter-spacing:.02em}

/* ---------- Stats row ---------- */
.member-stats{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px;
}
.member-stat{
  position:relative;overflow:hidden;
  padding:16px 14px;border-radius:var(--r);background:var(--card);border:1px solid var(--sep);
}
.member-stat::before{
  content:"";position:absolute;top:0;left:0;right:0;height:2px;
  background:linear-gradient(90deg,var(--gold),transparent 75%);opacity:.5;
}
.member-stat span{display:block;font-size:.66rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text3)}
.member-stat strong{
  display:block;margin-top:8px;font-family:var(--font-serif);font-weight:600;
  font-size:clamp(1.2rem,5vw,1.5rem);line-height:1.05;color:var(--text);
  font-variant-numeric:tabular-nums;overflow-wrap:anywhere;
}
.member-stat small{display:block;margin-top:5px;font-size:.68rem;color:var(--text4);line-height:1.3}
.member-stat--alert::before{background:linear-gradient(90deg,var(--red),transparent 75%);opacity:.7}
.member-stat--alert strong{color:var(--red)}

/* ---------- Orders ---------- */
.member-orders{margin-top:24px}
.member-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}
.member-section-head h2{margin:0;font-family:var(--font-serif);font-weight:600;font-size:1.32rem;letter-spacing:.01em}
.member-section-meta{font-size:.72rem;font-weight:700;letter-spacing:.06em;color:var(--gold)}
.member-order{
  padding:18px;border-radius:var(--r-lg);background:var(--card);border:1px solid var(--sep);
  box-shadow:var(--shadow);margin-bottom:12px;
}
.member-order.is-cancelled{opacity:.66}
.member-order-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.member-order-id{display:flex;flex-direction:column;gap:3px;min-width:0}
.member-order-type{font-size:.95rem;font-weight:700;color:var(--text)}
.member-order-no{font-size:.72rem;color:var(--text3);letter-spacing:.04em;font-variant-numeric:tabular-nums}
.member-order-status{
  flex-shrink:0;display:inline-flex;align-items:center;min-height:26px;padding:0 11px;border-radius:var(--r-pill);
  font-size:.72rem;font-weight:700;white-space:nowrap;
  background:var(--bg2);color:var(--text2);border:1px solid var(--sep);
}
.member-order-status--in_progress,
.member-order-status--shelved,
.member-order-status--sent_for_cleaning{background:var(--orange-bg);color:var(--orange-dark);border-color:transparent}
.member-order-status--ready_for_pickup_or_delivery{background:var(--accent-light);color:var(--accent-strong);border-color:transparent}
.member-order-status--completed{background:var(--green-bg);color:var(--green-dark);border-color:transparent}
.member-order-status--cancelled{background:var(--red-bg);color:var(--red);border-color:transparent}
.member-order-items{
  display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;
}
.member-order-item{
  font-size:.78rem;color:var(--text2);padding:4px 10px;border-radius:var(--r-pill);
  background:var(--bg2);border:1px solid var(--sep2);
}

/* progress bar */
.member-progress{margin-top:18px}
.member-progress-track{
  position:relative;height:3px;border-radius:2px;background:var(--sep);overflow:hidden;
}
.member-progress-fill{
  position:absolute;inset:0 auto 0 0;height:100%;border-radius:2px;
  background:linear-gradient(90deg,var(--gold),var(--accent));
  transition:width .5s cubic-bezier(.22,.61,.36,1);
}
.member-progress-steps{display:flex;justify-content:space-between;margin-top:10px}
.member-progress-step{display:flex;flex-direction:column;align-items:center;gap:5px;flex:1;min-width:0}
.member-progress-dot{
  width:9px;height:9px;border-radius:50%;background:var(--card);border:1.5px solid var(--sep);
  transition:background-color .3s ease,border-color .3s ease,transform .3s ease;
}
.member-progress-step.is-done .member-progress-dot{background:var(--accent);border-color:var(--accent)}
.member-progress-step.is-current .member-progress-dot{
  background:var(--accent);border-color:var(--accent);transform:scale(1.25);
  box-shadow:0 0 0 4px rgba(230,73,0,.12);
}
.member-progress-label{font-size:.66rem;color:var(--text4);letter-spacing:.02em;white-space:nowrap}
.member-progress-step.is-done .member-progress-label,
.member-progress-step.is-current .member-progress-label{color:var(--text2);font-weight:650}

.member-order-foot{
  display:flex;align-items:flex-end;justify-content:space-between;gap:12px;
  margin-top:18px;padding-top:14px;border-top:1px solid var(--sep2);
}
.member-order-amount{display:flex;flex-direction:column;gap:3px}
.member-order-amount span{font-size:.66rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text4)}
.member-order-amount strong{font-family:var(--font-serif);font-weight:600;font-size:1.22rem;color:var(--text);font-variant-numeric:tabular-nums}
.member-order-amount--due{text-align:right}
.member-order-amount--due strong{color:var(--red)}
.member-order-amount--ok{text-align:right}
.member-order-amount--ok strong{color:var(--green-dark)}

.member-empty{
  padding:40px 20px;text-align:center;border-radius:var(--r-lg);
  background:var(--card);border:1px dashed var(--sep);
}
.member-empty p{margin:0 0 6px;font-weight:600;color:var(--text2)}
.member-empty small{color:var(--text4)}

.member-footer{margin-top:30px;text-align:center}
.member-footer p{margin:0;font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--text4)}

@media (max-width:380px){
  .member-stats{grid-template-columns:1fr;}
}

@media (prefers-color-scheme: dark){
  .member-body{
    background:linear-gradient(180deg,#221C15 0%,#1B160F 60%,#191510 100%);
    color:#F4EFE7;
  }
}
