:root{
  --cream:#FBF8F3; --white:#FFFFFF; --sage:#EEF3E6; --sageD:#5E7F3A; --blush:#FAEEF3; --pinkPastel:#FAD6E6;
  --cocoa:#2B1B12; --text:#4B3B31; --soft:#8F7D70; --line:rgba(43,27,18,.1);
  --pink:#E5007D; --green:#8CC63F;
  --amber:#B8860B; --amberBg:#FBF2DC; --red:#C0392B; --redBg:#FBEAE7; --blue:#2C6E9B; --blueBg:#E8F1F7;
  --serif:'Young Serif',Georgia,serif; --sans:'Plus Jakarta Sans',system-ui,sans-serif;
  --e:cubic-bezier(.33,1,.68,1);
  --nav:252px; --top:68px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--sans);background:var(--cream);color:var(--text);font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font-family:inherit;font-size:inherit}

/* ============ SIDEBAR ============ */
.nav{position:fixed;top:0;left:0;bottom:0;width:var(--nav);background:var(--cocoa);color:#EADFD6;display:flex;flex-direction:column;z-index:40}
.nav .top{padding:24px 18px 18px;display:flex;flex-direction:column;align-items:flex-start;gap:9px}
.nav .top img{height:62px;width:auto}
.nav .top b{font-size:10.5px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:rgba(234,223,214,.55)}
.nav .who{margin:0 14px 14px;padding:12px 13px;background:rgba(255,255,255,.055);border-radius:14px}
.nav .who b{display:block;font-size:13.5px;font-weight:600;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav .who span{font-size:11.5px;color:rgba(234,223,214,.6)}
.nav ul{list-style:none;padding:0 12px;flex:1;overflow-y:auto}
.nav li>a{display:flex;align-items:center;gap:12px;padding:10px 13px;border-radius:12px;font-size:14px;font-weight:500;color:rgba(234,223,214,.78);margin-bottom:2px;transition:background .25s,color .25s}
.nav li>a:hover{background:rgba(255,255,255,.07);color:#fff}
.nav li>a.on{background:var(--pink);color:#fff}
.nav li>a svg{width:17px;height:17px;flex-shrink:0}
.nav li>a .badge{margin-left:auto;background:rgba(255,255,255,.16);border-radius:999px;font-size:11px;font-weight:600;padding:1px 8px}
.nav li>a.on .badge{background:rgba(0,0,0,.22)}
/* a nav item that opens outside the portal */
.nav li>a .ext{margin-left:auto;width:14px;height:14px;opacity:.45;transition:opacity .25s,transform .25s var(--e)}
.nav li>a:hover .ext{opacity:.9;transform:translate(1px,-1px)}
.nav hr{border:0;border-top:1px solid rgba(234,223,214,.14);margin:10px 13px}
.nav ul.navmain{min-height:0;scrollbar-width:thin;scrollbar-color:transparent transparent;transition:scrollbar-color .3s}
/* The scrollbar of the menu is there only when the pointer is on it: a thin cream line
   that fades in, and nothing at all the rest of the time. */
.nav:hover ul.navmain{scrollbar-color:rgba(234,223,214,.3) transparent}
.nav ul.navmain::-webkit-scrollbar{width:5px}
.nav ul.navmain::-webkit-scrollbar-track{background:transparent}
.nav ul.navmain::-webkit-scrollbar-thumb{background:transparent;border-radius:99px;transition:background .3s}
.nav:hover ul.navmain::-webkit-scrollbar-thumb{background:rgba(234,223,214,.3)}
.nav ul.navmain::-webkit-scrollbar-thumb:hover{background:rgba(234,223,214,.55)}
/* tickets, support, users, settings and logout: pinned to the bottom, under their own rule */
.nav ul.navend{flex:none;overflow:visible;margin:6px 12px 0;padding:8px 0 0;border-top:1px solid rgba(234,223,214,.14)}
.nav .foot{padding:10px 24px 18px;font-size:11px;color:rgba(234,223,214,.42);line-height:1.5}
.nav .foot b{display:block;font-size:12px;font-weight:600;color:rgba(234,223,214,.7);letter-spacing:.01em}

/* ============ TOPBAR ============ */
.top-bar{position:fixed;top:0;left:var(--nav);right:0;height:var(--top);background:rgba(251,248,243,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:18px;padding:0 30px;z-index:30}
.top-bar h1{font-family:var(--serif);font-weight:400;font-size:22px;color:var(--cocoa);line-height:1.1;white-space:nowrap}
.top-bar .sub{font-size:12.5px;color:var(--soft);margin-top:1px}
.demo svg{width:13px;height:13px}
.top-bar .right{margin-left:auto;display:flex;align-items:center;gap:10px}

/* ============ LAYOUT ============ */
main{margin-left:var(--nav);padding:calc(var(--top) + 30px) 30px 60px;max-width:1500px}
.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.spread{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.grid{display:grid;gap:18px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.gprod{display:grid;gap:18px;grid-template-columns:repeat(auto-fill,minmax(188px,1fr))}
.sideby{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px;align-items:start}
.mb{margin-bottom:18px}
.mt{margin-top:18px}

/* ============ CARD ============ */
.card{background:var(--white);border:1px solid var(--line);border-radius:18px;padding:22px}
.card.pad0{padding:0;overflow:hidden}
.card h2{font-family:var(--serif);font-weight:400;font-size:19px;color:var(--cocoa);line-height:1.15}
.card h3{font-family:var(--sans);font-size:11.5px;font-weight:600;letter-spacing:.13em;text-transform:uppercase;color:var(--soft)}
.card .hd{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 22px;border-bottom:1px solid var(--line)}
.card .hd a{font-size:13px;font-weight:600;color:var(--pink)}
.card .bd{padding:22px}

/* KPI */
.kpi{background:var(--white);border:1px solid var(--line);border-radius:18px;padding:20px 22px}
.kpi .lb{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--soft);margin-bottom:9px}
.kpi .lb svg{width:15px;height:15px;color:var(--pink)}
.kpi b{display:block;font-size:30px;font-weight:600;color:var(--cocoa);line-height:1;font-variant-numeric:tabular-nums}
.kpi small{display:block;font-size:12px;color:var(--soft);margin-top:7px}
.kpi small.up{color:var(--sageD)}
.kpi small.down{color:var(--red)}

/* ============ TABLE ============ */
table{width:100%;border-collapse:collapse}
th{text-align:left;font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--soft);padding:12px 22px;border-bottom:1px solid var(--line);white-space:nowrap}
td{padding:14px 22px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr{transition:background .2s}
tbody tr.click{cursor:pointer}
tbody tr.click:hover{background:var(--cream)}
td b{font-weight:600;color:var(--cocoa)}
td .mono{font-family:ui-monospace,Menlo,monospace;font-size:12.5px;color:var(--cocoa);white-space:nowrap}
td.num{text-align:right;font-variant-numeric:tabular-nums}
th.num{text-align:right}

/* ============ PILLS ============ */
.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 11px;font-size:11.5px;font-weight:600;white-space:nowrap}
.pill i{width:6px;height:6px;border-radius:50%;background:currentColor;display:block;flex-shrink:0}
.p-grey{background:rgba(143,125,112,.14);color:var(--soft)}
.p-green{background:var(--sage);color:var(--sageD)}
.p-amber{background:var(--amberBg);color:var(--amber)}
.p-red{background:var(--redBg);color:var(--red)}
.p-blue{background:var(--blueBg);color:var(--blue)}
.p-pink{background:var(--blush);color:var(--pink)}

/* ============ BUTTONS ============ */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:42px;padding:0 18px;border-radius:12px;font-size:14px;font-weight:600;border:1px solid transparent;cursor:pointer;background:transparent;color:var(--cocoa);transition:transform .35s var(--e),background .25s,color .25s,border-color .25s;white-space:nowrap}
.btn:hover{transform:translateY(-1px)}
.btn svg{width:16px;height:16px}
.btn.pink{background:var(--pink);color:#fff}
.btn.dark{background:var(--cocoa);color:#fff}
.btn.ghost{border-color:var(--line)}
.btn.ghost:hover{border-color:var(--cocoa)}
.btn.sm{height:36px;padding:0 14px;font-size:13px;border-radius:10px}
.btn.sm svg{width:14px;height:14px}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.btn[disabled]:hover{transform:none}

/* ============ FORMS ============ */
.fl{display:flex;flex-direction:column;gap:6px;margin-bottom:15px}
.fl label{font-size:12.5px;font-weight:600;color:var(--cocoa)}
.fl input,.fl select,.fl textarea{background:var(--cream);border:1px solid var(--line);border-radius:11px;padding:10px 13px;color:var(--cocoa);outline:0;transition:border-color .25s}
.fl input:focus,.fl select:focus,.fl textarea:focus{border-color:var(--pink)}
.fl textarea{resize:vertical;min-height:90px}
.fl .hint{font-size:11.5px;color:var(--soft)}
.ff2{display:grid;grid-template-columns:1fr 1fr;gap:0 15px}
.ff2 .full{grid-column:1/-1}

.seg{display:inline-flex;background:var(--white);border:1px solid var(--line);border-radius:12px;padding:3px;gap:2px;overflow-x:auto;max-width:100%}
.seg button{border:0;background:transparent;padding:7px 14px;border-radius:9px;font-size:13px;font-weight:500;color:var(--soft);cursor:pointer;white-space:nowrap;transition:background .25s,color .25s}
.seg button:hover{color:var(--cocoa)}
.seg button.on{background:var(--cocoa);color:#fff}

.search{display:flex;align-items:center;gap:9px;background:var(--white);border:1px solid var(--line);border-radius:12px;padding:0 13px;height:42px;min-width:230px}
.search svg{width:15px;height:15px;color:var(--soft);flex-shrink:0}
.search input{border:0;background:transparent;outline:0;width:100%;color:var(--cocoa)}

/* ============ EMPTY / MISC ============ */
.empty{padding:50px 22px;text-align:center;color:var(--soft)}
.empty svg{width:28px;height:28px;color:var(--pinkPastel);margin:0 auto 12px}
.empty b{display:block;font-size:15px;font-weight:600;color:var(--cocoa);margin-bottom:5px}
.empty p{font-size:13.5px;max-width:42ch;margin:0 auto}

.note{display:flex;gap:11px;align-items:flex-start;background:var(--sage);color:var(--sageD);border-radius:14px;padding:14px 16px;font-size:13px;line-height:1.5}
.note svg{width:16px;height:16px;flex-shrink:0;margin-top:2px}
.note b{display:block;font-weight:600;margin-bottom:2px}
.note.warn{background:var(--amberBg);color:var(--amber)}
.note.pink{background:var(--blush);color:var(--pink)}

.ln{display:flex;align-items:center;gap:13px;padding:12px 0;border-top:1px solid var(--line)}
.ln:first-child{border-top:0}
.ln img{width:52px;height:40px;border-radius:9px;object-fit:cover;flex-shrink:0;background:var(--blush)}
.ln .nm{flex:1;min-width:0}
.ln .nm b{display:block;font-size:14px;font-weight:600;color:var(--cocoa)}
.ln .nm span{font-size:12px;color:var(--soft)}
.sku{display:inline-block;font-family:ui-monospace,Menlo,monospace;font-size:10.5px;font-weight:600;color:var(--sageD);background:var(--sage);border-radius:5px;padding:2px 6px;margin-left:6px}

.step{display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;overflow:hidden;flex-shrink:0;background:var(--white)}
.step button{width:28px;height:32px;border:0;background:transparent;color:var(--cocoa);font-size:14px;cursor:pointer;line-height:1}
.step button:hover{background:var(--blush);color:var(--pink)}
.step input{width:44px;height:32px;border:0;border-left:1px solid var(--line);border-right:1px solid var(--line);text-align:center;font-size:13.5px;font-weight:600;color:var(--cocoa);background:transparent;-moz-appearance:textfield}
.step input::-webkit-outer-spin-button,.step input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

.prod{background:var(--white);border:1px solid var(--line);border-radius:16px;overflow:hidden;display:flex;flex-direction:column;transition:border-color .3s,box-shadow .4s var(--e)}
.prod:hover{border-color:rgba(229,0,125,.28);box-shadow:0 18px 36px -26px rgba(43,27,18,.3)}
.prod img{aspect-ratio:3/2;object-fit:cover;background:var(--blush)}
.prod .b{padding:13px 15px 15px;display:flex;flex-direction:column;gap:3px;flex:1}
.prod .b b{font-size:14px;font-weight:600;color:var(--cocoa);line-height:1.25}
.prod .b span{font-size:12px;color:var(--soft)}
.prod .b .act{margin-top:auto;padding-top:11px;display:flex;align-items:center;justify-content:space-between;gap:8px}

/* chart */
.bars{display:flex;align-items:flex-end;gap:10px;height:170px;padding-top:10px}
.bars div{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:8px;height:100%}
.bars i{display:block;width:100%;background:rgba(229,0,125,.5);border-radius:7px 7px 0 0}
.bars span{font-size:11.5px;color:var(--soft)}
.hbar{display:flex;align-items:center;gap:12px;padding:9px 0}
.hbar .n{width:116px;font-size:13px;color:var(--cocoa);flex-shrink:0}
.hbar .t{flex:1;height:9px;background:var(--cream);border-radius:999px;overflow:hidden}
.hbar .t i{display:block;height:100%;background:var(--pink);border-radius:999px}
.hbar .v{width:52px;text-align:right;font-size:12.5px;color:var(--soft);font-variant-numeric:tabular-nums}

.daybtn{border:1px solid var(--line);background:var(--white);color:var(--soft);border-radius:999px;padding:7px 15px;font-size:13px;font-weight:600;cursor:pointer;transition:background .25s,color .25s,border-color .25s}
.daybtn:hover{border-color:var(--pink);color:var(--pink)}
.daybtn.on{background:var(--sage);border-color:var(--sage);color:var(--sageD)}
.daybtn.on::before{content:'';display:inline-block;width:6px;height:11px;margin:-3px 8px 0 -2px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg);vertical-align:middle}

.loc{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 0;border-top:1px solid var(--line)}
.loc:first-child{border-top:0;padding-top:0}
.locmain b{display:block;font-size:14.5px;font-weight:600;color:var(--cocoa);margin-bottom:3px}
.locmain span{display:block;font-size:13px;color:var(--soft);line-height:1.45}

/* ============ FULL-SCREEN DETAIL ============ */
.dt{max-width:1060px}
.dtback{display:inline-flex;align-items:center;gap:8px;background:transparent;border:0;color:var(--soft);font-size:13.5px;font-weight:500;cursor:pointer;padding:6px 0;margin-bottom:14px;transition:color .25s}
.dtback:hover{color:var(--pink)}
.dtback svg{width:15px;height:15px}
.dthead{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;flex-wrap:wrap;padding-bottom:20px;margin-bottom:22px;border-bottom:1px solid var(--line)}
.dthead h2{font-family:var(--serif);font-weight:400;font-size:30px;color:var(--cocoa);line-height:1.1}
.dthead p{font-size:13.5px;color:var(--soft);margin-top:5px}
.facts{display:grid;grid-template-columns:repeat(4,1fr);gap:0;background:var(--white);border:1px solid var(--line);border-radius:18px;overflow:hidden;margin-bottom:18px}
.facts > div{padding:18px 20px;border-right:1px solid var(--line)}
.facts > div:last-child{border-right:0}
.facts dt{font-size:11.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--soft);margin-bottom:7px}
.facts dd{font-size:14.5px;color:var(--cocoa)}
.facts dd span{display:block;font-size:12.5px;color:var(--soft);margin-top:2px}
.flow{display:flex;gap:0;margin-bottom:22px}
.flow > div{flex:1;text-align:center}
.flow .b{height:4px;border-radius:999px;margin-bottom:9px;background:var(--line)}
.flow .b.on{background:var(--pink)}
.flow .b.warn{background:var(--red)}
.flow span.warn{color:var(--red);font-weight:600}
.flow span{font-size:12.5px;color:var(--soft)}
.flow span.on{color:var(--cocoa);font-weight:600}
@media(max-width:1000px){.facts{grid-template-columns:repeat(2,1fr)}.facts > div:nth-child(2){border-right:0}.facts > div:nth-child(-n+2){border-bottom:1px solid var(--line)}}
@media(max-width:620px){.facts{grid-template-columns:1fr}.facts > div{border-right:0;border-bottom:1px solid var(--line)}.facts > div:last-child{border-bottom:0}}

/* toast */
#toast{position:fixed;right:24px;bottom:24px;z-index:90;display:flex;flex-direction:column;gap:9px;pointer-events:none}
#toast div{background:var(--cocoa);color:#fff;border-radius:13px;padding:12px 17px;font-size:13.5px;box-shadow:0 18px 34px -18px rgba(43,27,18,.55);display:flex;align-items:center;gap:10px;animation:tin .4s var(--e)}
#toast svg{width:16px;height:16px;color:var(--green)}
@keyframes tin{from{opacity:0;transform:translateY(10px)}}

/* modal */
.mo{position:fixed;inset:0;z-index:80;background:rgba(43,27,18,.42);backdrop-filter:blur(3px);display:none;align-items:center;justify-content:center;padding:26px}
.mo.on{display:flex}
.mo .box{background:var(--cream);border-radius:22px;max-width:680px;width:100%;max-height:86vh;overflow:auto;box-shadow:0 40px 80px -30px rgba(43,27,18,.5)}
.mo .mh{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--cream)}
.mo .mh h2{font-family:var(--serif);font-weight:400;font-size:21px;color:var(--cocoa)}
.mo .mh button{width:34px;height:34px;border:0;background:transparent;border-radius:10px;cursor:pointer;color:var(--soft);display:flex;align-items:center;justify-content:center}
.mo .mh button:hover{background:var(--blush);color:var(--pink)}
.mo .mb{padding:24px}

@media(max-width:1200px){.g4{grid-template-columns:repeat(2,minmax(0,1fr))}.sideby{grid-template-columns:minmax(0,1fr)}}
@media(max-width:1000px){
  :root{--nav:0px}
  .nav{transform:translateX(-100%);transition:transform .35s var(--e);width:252px}
  .nav.open{transform:none}
  .top-bar{left:0;padding:0 18px}
  main{padding:calc(var(--top) + 22px) 18px 50px}
  .burger{display:flex!important}
  .g3,.g2{grid-template-columns:minmax(0,1fr)}
  .g4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .scrollx{overflow-x:auto}
  .scrollx table{min-width:720px}
}
.burger{display:none;width:40px;height:40px;border:1px solid var(--line);background:var(--white);border-radius:11px;align-items:center;justify-content:center;cursor:pointer;color:var(--cocoa)}
.burger svg{width:18px;height:18px}

/* ------------------------------------------------------------ tabs ----- */
.tabcard .tabbar,.ptabs .tabbar{display:flex;gap:2px;padding:6px 8px 0;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.tabcard .tabbar::-webkit-scrollbar,.ptabs .tabbar::-webkit-scrollbar{display:none}
.tabcard .tabbar button,.ptabs .tabbar button{display:inline-flex;align-items:center;gap:8px;border:0;background:none;cursor:pointer;
  font-family:var(--sans);font-size:14px;font-weight:600;color:var(--soft);padding:13px 16px;border-bottom:2px solid transparent;
  margin-bottom:-1px;white-space:nowrap;transition:color .25s,border-color .25s}
.tabcard .tabbar button svg,.ptabs .tabbar button svg{width:16px;height:16px}
.tabcard .tabbar button:hover,.ptabs .tabbar button:hover{color:var(--cocoa)}
.tabcard .tabbar button.on,.ptabs .tabbar button.on{color:var(--pink);border-bottom-color:var(--pink)}
.tabcard .tabbar .n,.ptabs .tabbar .n{font-size:11.5px;font-weight:600;background:var(--line);color:var(--soft);border-radius:999px;padding:1px 7px}
.tabcard .tabbar button.on .n,.ptabs .tabbar button.on .n{background:var(--blush);color:var(--pink)}
.tabpane{display:none}
.tabpane.on{display:block}

/* page-level tabs: the bar sits above the content and swaps everything below */
.ptabs .tabbar.page{padding:0;gap:6px;margin-bottom:22px}
.ptabs .tabbar.page button{font-size:15px;padding:12px 4px;margin-right:22px;gap:9px}
.ptabs .tabbar.page button svg{width:17px;height:17px}
@media(max-width:700px){.ptabs .tabbar.page button{font-size:14px;margin-right:14px}}

/* ------------------------------------------------ switch (on/off row) -- */
.swrow{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:14px 16px;border:1px solid var(--line);
  border-radius:14px;background:var(--white);margin-bottom:16px;transition:border-color .3s,background .3s}
.swrow.on{border-color:rgba(229,0,125,.28);background:var(--blush)}
.swrow .lbl b{display:block;font-size:14px;color:var(--cocoa)}
.swrow .lbl span{display:block;font-size:12.5px;color:var(--soft);line-height:1.5;margin-top:2px}
.sw{position:relative;flex:none;width:46px;height:27px;border-radius:999px;border:0;cursor:pointer;background:rgba(43,27,18,.16);
  transition:background .3s var(--e);margin-top:2px}
.sw::after{content:"";position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;background:#fff;
  box-shadow:0 2px 5px rgba(43,27,18,.25);transition:transform .3s var(--e)}
.sw[aria-checked="true"]{background:var(--pink)}
.sw[aria-checked="true"]::after{transform:translateX(19px)}

/* --------------------------------------------------- payment records --- */
.pmt{display:flex;align-items:center;gap:13px;padding:13px 0;border-top:1px solid var(--line)}
.pmt:first-child{border-top:0}
.pmt .ic{width:36px;height:36px;border-radius:11px;background:var(--sage);color:var(--sageD);display:grid;place-items:center;flex:none}
.pmt .ic svg{width:17px;height:17px}
.pmt .mn{flex:1;min-width:0}
.pmt .mn b{display:block;font-size:14px;color:var(--cocoa)}
.pmt .mn span{display:block;font-size:12.5px;color:var(--soft);margin-top:1px}
.pmt .amt{font-size:15px;font-weight:600;color:var(--cocoa);white-space:nowrap}
.bal{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-radius:14px;
  background:var(--cream);border:1px solid var(--line);margin-top:14px}
.bal span{font-size:13.5px;color:var(--soft)}
.bal b{font-size:19px;font-weight:600;color:var(--cocoa)}
.bal.due b{color:var(--red)}
.bal.clear b{color:var(--sageD)}

/* ----------------------------------------------- record-a-payment form -- */
.paysum{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);
  border-radius:16px;overflow:hidden;margin-bottom:20px}
.paysum>div{background:var(--white);padding:14px 16px}
.paysum dt{font-size:10.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--soft);margin-bottom:4px}
.paysum dd{font-size:17px;font-weight:600;color:var(--cocoa)}
.paysum dd.hi{color:var(--pink)}
.flab{display:block;font-size:12.5px;font-weight:600;color:var(--cocoa);margin-bottom:9px}
.methods{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:20px}
.methods button{display:flex;flex-direction:column;align-items:center;gap:7px;padding:14px 6px;border-radius:14px;cursor:pointer;
  background:var(--white);border:1px solid var(--line);font-family:var(--sans);font-size:13px;font-weight:600;color:var(--soft);
  transition:border-color .25s,color .25s,background .25s,transform .3s var(--e)}
.methods button svg{width:19px;height:19px}
.methods button:hover{transform:translateY(-1px);color:var(--cocoa)}
.methods button.on{border-color:var(--pink);background:var(--blush);color:var(--pink)}
.payleft{font-size:13.5px;line-height:1.55;color:var(--soft);margin:4px 0 16px;min-height:20px}
.payleft b{color:var(--cocoa)}
.payleft.good{color:var(--sageD)}
.payleft.bad{color:var(--red)}
@media(max-width:560px){.paysum{grid-template-columns:minmax(0,1fr)}.methods{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ------------------------------------------- a folding nav section ----- */
.nav .grp{margin:2px 0}
.nav .ghead{display:flex;align-items:center;gap:12px;width:100%;border:0;cursor:pointer;background:transparent;
  font-family:var(--sans);font-size:13px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  color:rgba(245,237,230,.5);padding:11px 14px;border-radius:12px;transition:color .25s,background .25s}
.nav .ghead:hover{color:rgba(245,237,230,.85);background:rgba(255,255,255,.05)}
.nav .ghead>span:not(.badge){flex:1;text-align:left}
.nav .ghead svg{width:17px;height:17px;flex:none}
.nav .ghead .chev{width:14px;height:14px;opacity:.6;transition:transform .3s var(--e)}
.nav .grp.open .ghead .chev{transform:rotate(180deg)}
/* the count on a folded group goes away when it is opened: the numbers are on the links then */
.nav .grp.open>.ghead .badge{display:none}
/* The count on a folded group: a small round number, not a bar. It used to stretch
   across the row because it is a span inside the header and every span there grows. */
.nav .ghead .badge{flex:none;margin:0;background:var(--pink);color:#fff;min-width:22px;height:22px;padding:0 7px;
  display:inline-grid;place-items:center;border-radius:999px;font-size:11.5px;font-weight:700;letter-spacing:0;line-height:1;
  text-transform:none;font-variant-numeric:tabular-nums}
.nav .grp>ul{display:none;padding:0;margin:2px 0 4px;list-style:none}
.nav .grp.open>ul{display:block}
/* Indented, but not so far that "Access requests" has to break in two. The
   icon and its gap already read as a second level; thirty pixels on top of
   them left about nine characters of room. */
.nav .grp>ul>li>a{padding-left:20px;gap:10px}

/* ------------------------------------------------- the retail group ------
   The counter is the newer half of the business and the one the bakery works
   in all day, so it gets a panel of its own rather than sitting in the same
   list as everything else.

   It is drawn in the brand's own pink at a very low strength: on the cocoa
   sidebar seven per cent reads as a warm plum, enough that the eye lands
   there first and not so much that it shouts. The heading and its icon take
   the pink; the links inside are left alone, because the thing being marked
   is the group, not five more coloured rows. */
.nav .grp.accent{
  background:rgba(229,0,125,.07);
  border:1px solid rgba(229,0,125,.18);
  border-radius:16px;
  padding:2px 4px 4px;
  margin:4px 0;
}
.nav .grp.accent .ghead{color:#F7B9D6;border-radius:13px}
.nav .grp.accent .ghead svg{color:var(--pink)}
.nav .grp.accent .ghead:hover{color:#fff;background:rgba(229,0,125,.14)}
.nav .grp.accent .ghead .chev{opacity:.75}
/* the links sit a shade closer in, so the panel reads as one block */
.nav .grp.accent>ul>li>a{padding-left:18px;gap:10px;margin-bottom:1px}
.nav .grp.accent>ul>li>a:hover{background:rgba(255,255,255,.09)}
/* a count on the folded panel belongs to the panel, not to the pink */
.nav .grp.accent .ghead .badge{background:var(--pink);color:#fff}

/* ---------------------------------- a timeline of notes on a record ----- */
.tl{display:grid;gap:0}
.tl .ev{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:14px;padding:0 0 18px}
.tl .ev:last-child{padding-bottom:0}
.tl .dot{position:relative;display:flex;justify-content:center}
.tl .dot::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--pink);margin-top:5px;z-index:1}
.tl .ev:not(:last-child) .dot::after{content:"";position:absolute;top:14px;bottom:-18px;width:1px;background:var(--line)}
.tl .ev>div>b{display:block;font-size:14px;color:var(--cocoa);line-height:1.5}
.tl .ev>div>span{display:block;font-size:12.5px;color:var(--soft);margin-top:2px}
.tl .ev>.btn{align-self:start;opacity:0;transition:opacity .2s}
.tl .ev:hover>.btn,.tl .ev>.btn:focus-visible{opacity:1}
@media(max-width:640px){.tl .ev>.btn{opacity:1}}

/* ------------------------------- the photo of the design that was ordered --
   No crop: the designs are photographed in whatever shape suits the cake, and
   a baker reading the order needs to see all of it. ----------------------- */
/* (the editor's .shot thumbnail below shares this name: without these resets it squeezed the cake into 92px) */
.card.shot{padding:0;overflow:hidden;display:block;width:auto;height:auto;border-radius:18px;background:var(--white);border:1px solid var(--line)}
.card.shot img{display:block;width:100%;height:auto;object-fit:contain}
.card.shot .cap{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:13px 18px;border-top:1px solid var(--line)}
.card.shot .cap b{font-size:13.5px;font-weight:600;color:var(--cocoa)}
.card.shot .cap span{font-size:12px;color:var(--soft)}

/* ------------------------------------------ the catalog, seen by the shop --
   The same product cards the client orders from, plus a row view for reading
   forty-one of them at once. A hidden product is greyed, never removed. --- */
.prod.off{opacity:.55}
.prod.off img,.prod.off .noimg{filter:grayscale(1)}
.noimg{aspect-ratio:3/2;background:var(--blush);display:flex;align-items:center;justify-content:center}
.noimg svg{width:24px;height:24px;color:var(--pink);opacity:.45}

.seg.vtog button{padding:8px 11px;display:inline-flex;align-items:center}
.seg.vtog svg{width:16px;height:16px}

.ptbl td{vertical-align:middle}
/* the cell is sized here, not inline: a table column resolves an image's
   max-width against the cell it is in, and squeezes it to nothing */
.ptbl td:first-child{width:62px}
.ptbl .tn{width:46px;max-width:none;height:46px;border-radius:10px;object-fit:cover;background:var(--blush);display:block}
.ptbl div.tn{aspect-ratio:auto;display:flex}
.ptbl div.tn svg{width:17px;height:17px}
.ptbl tr.off td:not(:last-child){opacity:.55}
.ptbl tr.off .tn{filter:grayscale(1)}

/* ---------------------------------------------------------- kebab menu ---
   The three dots beside a record's actions, and what drops out of it. More
   entries will hang here, so it is a list rather than one button. */
.kebab{position:relative}
.kebab > button{width:42px;padding:0;justify-content:center}
.kebab > button svg{width:17px;height:17px}
.kmenu{position:absolute;right:0;top:calc(100% + 6px);min-width:208px;z-index:40;
  background:var(--white);border:1px solid var(--line);border-radius:14px;padding:6px;
  box-shadow:0 18px 40px -20px rgba(43,27,18,.3);display:none}
.kebab.on .kmenu{display:block}
.kmenu button{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:0;
  background:none;border-radius:10px;font-size:14px;color:var(--cocoa);text-align:left;cursor:pointer}
.kmenu button:hover{background:var(--cream)}
.kmenu button svg{width:16px;height:16px;flex:none;color:var(--soft)}
.kmenu button.danger{color:var(--red)}
.kmenu button.danger svg{color:var(--red)}
.kmenu button.danger:hover{background:var(--blush)}
.kmenu .sep{height:1px;background:var(--line);margin:5px 7px}

/* ------------------------------------------------- the database is down -- */
/* Shown when the database could not be read and the screen fell back to
   back. It has to be impossible to mistake for part of the screen. */
#stalebar{position:sticky;top:0;z-index:60;display:flex;align-items:flex-start;gap:13px;
  padding:13px 22px;background:var(--redBg);border-bottom:1px solid rgba(192,57,43,.3);
  font-size:14px;line-height:1.55;color:var(--cocoa)}
#stalebar svg{width:19px;height:19px;color:var(--red);flex:none;margin-top:2px}
#stalebar b{color:var(--red)}
#stalebar span{color:var(--soft);font-size:12.5px}
#stalebar button{margin-left:auto;flex:none;align-self:center;border:1px solid rgba(192,57,43,.35);
  background:var(--white);color:var(--red);font-family:inherit;font-size:13px;font-weight:600;
  padding:8px 14px;border-radius:10px;cursor:pointer;transition:background .25s}
#stalebar button:hover{background:#fff}
@media(max-width:1000px){#stalebar{padding-left:16px;padding-right:16px}}

/* The state of a product, read-only, in a row of the list. The switch itself
   is .swrow + .sw, which Catalog and Clients already use. */
.state{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:600}
.state i{width:7px;height:7px;border-radius:50%;background:currentColor;display:block}
.state.online{color:var(--sageD)}
.state.online i{background:var(--green)}
.state.offline{color:var(--soft)}

/* the photograph on a product, in the editor */
.shot{width:92px;height:92px;border-radius:14px;flex:none;overflow:hidden;
  background:var(--cream);border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center}
.shot img{width:100%;height:100%;object-fit:cover;display:block}
.shot svg{width:24px;height:24px;color:var(--soft)}

/* ---------------------------------------------- picking a product fast ---
   A list of two hundred and sixty-two in a <select> is a list nobody reads.
   Type two letters instead and the matches come to you. */
.combo{position:relative}
.combo input{width:100%}
.picklist{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:30;max-height:244px;
  overflow-y:auto;background:var(--white);border:1px solid var(--line);border-radius:13px;
  box-shadow:0 18px 40px -22px rgba(43,27,18,.34);display:none;padding:5px}
.combo.on .picklist{display:block}
.picklist button{display:flex;align-items:baseline;gap:9px;width:100%;padding:9px 11px;border:0;
  background:none;border-radius:9px;text-align:left;cursor:pointer;color:var(--cocoa)}
.picklist button:hover,.picklist button.cur{background:var(--cream)}
.picklist b{font-size:14px;font-weight:600}
.picklist .sku{font-size:11.5px;color:var(--soft);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.picklist .pr{margin-left:auto;font-size:12.5px;color:var(--soft);white-space:nowrap}
.picklist .none{padding:12px;font-size:13.5px;color:var(--soft)}

/* The lines of an order scroll on their own, so a hundred products never
   push the total and the save button off the bottom of the screen. */
.linebox{max-height:40vh;overflow-y:auto;margin-right:-4px;padding-right:4px}
.mfoot{position:sticky;bottom:0;background:var(--cream);border-top:1px solid var(--line);
  /* the modal body's own padding is swallowed here so the bar reaches the
     edges and nothing of it is left outside the scrolling box */
  margin:0 -24px -24px;padding:14px 24px 20px}
@media(max-height:760px){.linebox{max-height:30vh}}


/* ---- what a role may do: the Users screen and the read-only screens ------- */
.rolerow{display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:none;border:0;border-top:1px solid var(--line);
  padding:14px 4px;cursor:pointer;font:inherit;color:inherit;transition:background .25s var(--e)}
.rolerow:first-of-type{border-top:0}
.rolerow:hover{background:var(--cream)}
.rolerow .nm{flex:1;min-width:0}
.rolerow .nm b{display:block;font-size:14.5px;color:var(--cocoa)}
.rolerow .nm span{display:block;font-size:12.5px;color:var(--soft);line-height:1.5;margin-top:2px}
.rolerow .chev{width:17px;height:17px;color:var(--soft);flex:none}

.perm{display:flex;align-items:center;gap:18px;padding:11px 2px;border-top:1px solid var(--line)}
.perm .nm{flex:1;min-width:0}
.perm .nm b{display:block;font-size:14px;color:var(--cocoa)}
.perm .nm span{display:block;font-size:12.5px;color:var(--soft);line-height:1.45;margin-top:1px}
.perm .pw{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:56px;cursor:pointer}
.perm .pw span{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--soft);font-weight:600}
.perm .sw:disabled{opacity:.5;cursor:not-allowed}

.robar{display:flex;align-items:center;gap:10px;background:var(--blush);color:var(--text);padding:10px 28px;font-size:13.5px;
  border-bottom:1px solid rgba(229,0,125,.14)}
.robar svg{width:16px;height:16px;color:var(--pink);flex:none}
.robar b{color:var(--cocoa)}
@media(max-width:700px){.perm{flex-wrap:wrap}.perm .nm{flex-basis:100%}}

/* ------------------------------------------- prices on the order screen --- */
.prod .b .pr,.ln .nm .pr{display:flex;align-items:baseline;gap:7px;margin-top:2px}
.pr s{font-size:12.5px;color:var(--soft)}
.prod .b .pr b,.ln .nm .pr b{font-size:15px;font-weight:600;color:var(--cocoa)}
.tot{border-top:1px solid var(--line);padding-top:12px;margin-top:4px}
.tot .spread>span{font-size:13.5px;color:var(--soft)}
.tot .spread b{font-size:22px;font-weight:600;color:var(--cocoa);display:flex;align-items:baseline;gap:8px}
.tot .spread b s{font-size:14px;font-weight:400;color:var(--soft)}
.tot .sav{display:flex;align-items:center;gap:7px;margin-top:6px;font-size:13.5px;font-weight:600;color:var(--sageD)}
.tot .sav svg{width:16px;height:16px}
.tot .hint{font-size:12px;color:var(--soft);margin-top:8px;line-height:1.5}

/* a product's photograph, small, before its name in the retail list */
.pcell{display:flex;align-items:center;gap:13px}
.pth{width:46px;height:46px;border-radius:11px;flex:none;overflow:hidden;background:var(--blush);
  border:1px solid var(--line);display:grid;place-items:center}
.pth img{width:100%;height:100%;object-fit:cover;display:block}
.pth svg{width:18px;height:18px;color:var(--soft)}

/* the Offline filter in the retail list: a button that narrows the list to what is not on the site */
.offbtn{display:inline-flex;align-items:center;gap:8px;background:var(--white);border:1px solid var(--line);border-radius:12px;
  padding:9px 14px;font-family:var(--sans);font-size:13px;font-weight:600;color:var(--soft);cursor:pointer;
  transition:background .25s,color .25s,border-color .25s}
.offbtn i{width:7px;height:7px;border-radius:50%;background:currentColor;display:block}
.offbtn .n{font-size:11.5px;font-weight:700;background:var(--line);border-radius:999px;padding:1px 8px;font-variant-numeric:tabular-nums}
.offbtn:hover{color:var(--cocoa);border-color:rgba(43,27,18,.25)}
.offbtn.on{background:var(--cocoa);border-color:var(--cocoa);color:#fff}
.offbtn.on .n{background:rgba(255,255,255,.22)}

/* a colour the customer made themselves, shown next to its name on a cake order */
.cchip{display:inline-block;width:13px;height:13px;border-radius:50%;margin-right:7px;vertical-align:-2px;border:1px solid rgba(43,27,18,.25)}

/* what is being created, in the Add a member of staff window */
.types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:16px}
.tcard{display:flex;gap:11px;align-items:flex-start;text-align:left;background:var(--white);border:1px solid var(--line);border-radius:13px;
  padding:11px 12px;cursor:pointer;color:var(--cocoa);transition:border-color .25s,box-shadow .25s}
.tcard:hover{border-color:rgba(229,0,125,.5)}
.tcard.on{border-color:var(--pink);box-shadow:0 0 0 2px rgba(229,0,125,.14)}
.tcard>i,.tcard>svg{flex:none;width:30px;height:30px;padding:7px;border-radius:9px;background:var(--blush);color:var(--pink)}
.tcard.on>i,.tcard.on>svg{background:var(--pink);color:#fff}
.tcard b{display:block;font-size:13.5px;font-weight:600}
.tcard span{display:block;font-size:11.5px;color:var(--soft);line-height:1.4;margin-top:2px}
@media(max-width:520px){.types{grid-template-columns:1fr}}

/* the file chosen for a resell certificate, and the credit bar on a client */
.filebox{display:flex;align-items:center;gap:12px;border:1px dashed var(--line);border-radius:14px;padding:12px 14px;background:var(--white)}
.filebox .nm{flex:1;min-width:0;font-size:13.5px;color:var(--soft);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.filebox .nm b{color:var(--ink,#2B1B12);font-weight:600}
.creditbar{height:8px;border-radius:99px;background:var(--line);overflow:hidden;margin:10px 0 6px}
.creditbar i{display:block;height:100%;background:var(--pink);border-radius:99px}
.creditbar.full i{background:var(--red)}
.tlist{border:1px solid var(--line);border-radius:12px;padding:6px 12px;margin:8px 0 0;background:var(--white)}
.tlist .trow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid var(--line);font-size:14px}
.tlist .trow:last-of-type{border-bottom:0}
.tlist .trow button{border:0;background:none;color:var(--soft);cursor:pointer;font-size:12.5px;font-weight:600;padding:4px 8px;border-radius:8px}
.tlist .trow button:hover{color:var(--red)}
.tlist .tadd{display:flex;gap:8px;padding:10px 0 6px}
.tlist .tadd input{flex:1}

/* Select mode on a list: ticked rows, and the bar that changes them together */
.pick{width:17px;height:17px;accent-color:var(--pink);cursor:pointer}
tr.picked td{background:var(--blush,#FAEEF3)}
.bulkbar{position:sticky;bottom:16px;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
  margin-top:16px;padding:12px 16px;background:var(--white);border:1px solid var(--line);border-radius:16px;box-shadow:0 10px 30px rgba(43,27,18,.14)}
