/* ===========================================================
   DTF.uk · Ops — backoffice CRM design system
   Light workspace · black chrome · mint accent · dense/pro
   =========================================================== */

:root {
  /* paper / ink */
  --ink:        #0B0C0E;
  --ink-2:      #16181C;
  --ink-3:      #22262C;
  --paper:      #F6F5F1;
  --paper-2:    #FFFFFF;
  --panel:      #FFFFFF;
  --rule:       #E6E3DB;
  --rule-2:     #D6D2C7;
  --rule-dark:  #20242B;

  /* text */
  --txt:        #14161A;
  --txt-2:      #565A60;
  --txt-3:      #8A8E94;
  --txt-inv:    #F6F5F1;

  /* mint accent */
  --mint:       #18f4af;
  --mint-ink:   #057a54;   /* readable mint text on light */
  --mint-deep:  #0fb880;
  --mint-wash:  #e6fbf3;

  /* status hues (all share roughly equal chroma) */
  --c-blue:   #2f6df0;   --c-blue-w:  #e9f0ff;
  --c-amber:  #d98a00;   --c-amber-w: #fdf3df;
  --c-violet: #7b54e0;   --c-violet-w:#f0ebff;
  --c-teal:   #0a9e8e;   --c-teal-w:  #e4f7f4;
  --c-green:  #1f9d54;   --c-green-w: #e6f6ec;
  --c-grey:   #6b7077;   --c-grey-w:  #eeeeec;
  --c-red:    #e0392b;   --c-red-w:   #fdeceb;
  --c-pink:   #d23f86;   --c-pink-w:  #fcebf3;

  --shadow-sm: 0 1px 2px rgba(11,12,14,.06);
  --shadow-md: 0 8px 24px -12px rgba(11,12,14,.18), 0 1px 3px rgba(11,12,14,.07);
  --shadow-lg: 0 30px 70px -28px rgba(11,12,14,.34), 0 4px 12px rgba(11,12,14,.10);

  --font-display: "Archivo", sans-serif;
  --font-body:    "Inter Tight", sans-serif;
  --font-mono:    "JetBrains Mono", monospace;

  --sidebar-w: 232px;
  --topbar-h:  56px;
  --radius:    9px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; width: 100%; max-width: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  color: var(--txt);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;             /* stop iOS auto-zooming text */
  font-feature-settings: "ss01","cv11";
  overflow: hidden;
}
#root { height: 100vh; height: 100dvh; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
/* Baseline icon size — Icon renders <svg> without width/height and relies on CSS.
   Specific component rules (.btn svg, .empty svg, etc.) override this default. */
svg { width: 16px; height: 16px; flex: none; }
::selection { background: var(--mint); color: #00301f; }

.mono { font-family: var(--font-mono); }
.kick {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--txt-3); font-weight: 600;
}

/* keyboard shortcut hint pill shown next to its CTA */
.kbd-hint {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--txt-2); background: var(--rule-2-wash, #f1efe9);
  border: 1px solid var(--rule-2); border-radius: 5px;
  padding: 1px 6px; line-height: 1.5; white-space: nowrap;
}

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #cfccc2; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #b6b2a6; background-clip: content-box; }

/* ============================ APP SHELL ============================ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; height: 100dvh; }

.sidebar {
  background: var(--ink); color: var(--txt-inv);
  display: flex; flex-direction: column;
  border-right: 1px solid #000;
}
.sb__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px; height: var(--topbar-h);
  border-bottom: 1px solid var(--rule-dark);
}
.sb__mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--mint); color: #00271a;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900; font-size: 11px; letter-spacing: .02em;
}
.sb__name { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.sb__name small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 9px; letter-spacing: .18em; color: var(--txt-3); margin-top: 1px; }

.sb__nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.sb__sec { font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: #5a5f66; padding: 14px 10px 6px; }
.sb__item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 7px;
  font-size: 13.5px; font-weight: 500; color: #c5c8cc;
  position: relative; transition: background .12s, color .12s;
}
.sb__item:hover { background: #1b1e23; color: #fff; }
.sb__item.is-active { background: #1b1e23; color: #fff; }
.sb__item.is-active::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  background: var(--mint); border-radius: 0 3px 3px 0;
}
.sb__item svg { width: 17px; height: 17px; flex: none; }
.sb__item .cnt {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  background: #2a2e34; color: #c5c8cc; padding: 2px 7px; border-radius: 20px;
}
.sb__item.is-active .cnt { background: var(--mint); color: #00271a; }

.sb__foot { padding: 10px; border-top: 1px solid var(--rule-dark); }
.sb__user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; }
.sb__user:hover { background: #1b1e23; }
.sb__user .av { width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color:#00271a; display:grid; place-items:center; font-family: var(--font-mono); font-weight: 700; font-size: 11px; flex:none; }
.sb__user .nm { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.sb__user .rl { font-family: var(--font-mono); font-size: 9px; letter-spacing:.1em; color: var(--txt-3); text-transform: uppercase; }

/* main column */
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; height: 100dvh; }
.topbar {
  height: var(--topbar-h); flex: none;
  background: var(--paper-2); border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
}
.topbar__title { display: flex; align-items: baseline; gap: 10px; }
.topbar__title h1 { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.01em; margin: 0; }
.topbar__title .sub { font-family: var(--font-mono); font-size: 11px; color: var(--txt-3); }
.topbar__search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 8px;
  padding: 7px 12px; width: 280px; color: var(--txt-2);
}
.topbar__search:focus-within { border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(11,12,14,.05); }
.topbar__search input { border: 0; background: none; outline: none; font-size: 13px; width: 100%; }
.topbar__search svg { width: 15px; height: 15px; flex: none; }
.topbar__search kbd { font-family: var(--font-mono); font-size: 10px; background:#fff; border:1px solid var(--rule); border-radius:4px; padding:1px 5px; color: var(--txt-3); }
.gsearch__pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--paper,#fff); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(11,12,14,.14); padding: 4px; max-height: 60vh; overflow: auto; }
.gsearch__row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--txt-1); }
.gsearch__row:hover, .gsearch__row.is-hi { background: var(--surface-2,#f4f5f7); }
.gsearch__main { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch__main svg { width: 14px; height: 14px; flex: none; color: var(--txt-3); }
.topbar__btn { display:flex; align-items:center; gap:7px; padding: 8px 12px; border:1px solid var(--rule); border-radius: 8px; font-size: 12.5px; font-weight:600; background:#fff; }
.topbar__btn:hover { border-color: var(--rule-2); }
.topbar__btn svg { width: 15px; height: 15px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border:1px solid var(--rule); border-radius: 8px; background:#fff; position: relative; }
.icon-btn:hover { border-color: var(--rule-2); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .ping { position:absolute; top:-3px; right:-3px; width:16px;height:16px; background: var(--c-red); color:#fff; border-radius:50%; font-family:var(--font-mono); font-size:9px; font-weight:700; display:grid; place-items:center; border:2px solid #fff; }

.content { flex: 1; overflow: auto; }

/* ============================ BADGES ============================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap; line-height: 1.3;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.badge--blue   { background: var(--c-blue-w);   color: #1d4dad; }
.badge--amber  { background: var(--c-amber-w);  color: #9a6300; }
.badge--violet { background: var(--c-violet-w); color: #5a37b3; }
.badge--teal   { background: var(--c-teal-w);   color: #07736a; }
.badge--green  { background: var(--c-green-w);  color: #137a40; }
.badge--grey   { background: var(--c-grey-w);   color: #5a5f66; }
.badge--red    { background: var(--c-red-w);    color: #b32a1f; }
.badge--pink   { background: var(--c-pink-w);   color: #a52d68; }
.badge--mint   { background: var(--mint-wash);  color: var(--mint-ink); }
.badge--solid-mint { background: var(--mint); color: #00271a; }
.badge--ghost  { background: transparent; border: 1px solid var(--rule-2); color: var(--txt-2); }

.flag { display:inline-grid; place-items:center; width:20px; height:20px; border-radius: 5px; font-size: 11px; }
.flag--risk  { background: var(--c-red-w);   color: var(--c-red); }
.flag--vip   { background: var(--mint-wash); color: var(--mint-ink); }
.flag--note  { background: var(--c-amber-w); color: var(--c-amber); }
.flag--repeat{ background: var(--c-blue-w);  color: var(--c-blue); }

/* ============================ TABLE / BOARD ============================ */
.board { padding: 18px 20px 60px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.seg button { padding: 7px 12px; font-size: 12px; font-weight: 600; color: var(--txt-2); border-right: 1px solid var(--rule); white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button.is-active { background: var(--ink); color: #fff; }
.seg--xs button { padding: 2px 8px; font-size: 11px; }
.chip-filter { display:flex; align-items:center; gap:6px; padding: 7px 11px; border:1px solid var(--rule); border-radius: 8px; background:#fff; font-size: 12px; font-weight:600; color: var(--txt-2); }
.chip-filter:hover { border-color: var(--rule-2); }
.chip-filter svg { width: 13px; height: 13px; }
.chip-filter.is-on { background: var(--ink); color:#fff; border-color: var(--ink); }

.grp { margin-bottom: 22px; }
.grp__head {
  display: flex; align-items: center; gap: 12px; padding: 8px 4px 8px;
  position: sticky; top: 0; background: var(--paper); z-index: 4;
}
.grp__date { font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: -.01em; }
.grp__rel  { font-family: var(--font-mono); font-size: 10px; letter-spacing:.08em; text-transform: uppercase; color: var(--txt-3); }
.grp__count{ font-family: var(--font-mono); font-size: 11px; color: var(--txt-2); margin-left: auto; }
.grp__bar { flex: 1; height: 1px; background: var(--rule); }

.tbl { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.tbl thead th {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--txt-3); text-align: left; font-weight: 600;
  padding: 9px 12px; background: #fbfaf7; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.tbl tbody td { padding: 10px 12px; border-bottom: 1px solid var(--rule); font-size: 13px; vertical-align: top; }
.ord-status { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.ord-status .btn { padding: 2px 8px; font-size: 10px; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background .1s; }
.tbl tbody tr:hover { background: #fbfaf7; }
.tbl tbody tr.is-sel { background: var(--mint-wash); }
.tbl .num { font-family: var(--font-mono); text-align: right; }
.tbl .ordno { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; }
.tbl .cust { font-weight: 600; }
.tbl .muted { color: var(--txt-3); }
.cellflags { display: flex; gap: 4px; }
.tags-cell { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; border-radius: 5px; background: var(--paper-2); border: 1px solid var(--rule); color: var(--txt-2); }

.urg-rail { width: 4px; border-radius: 3px; height: 24px; display:inline-block; }
.urg--sd { background: var(--c-red); }
.urg--rm24 { background: var(--c-amber); }
.urg--rm48 { background: var(--c-grey); }
.urg--dpd { background: var(--c-blue); }
.urg--collect { background: var(--c-violet); }
.urg--free { background: var(--c-green); }

.checkbox { width: 16px; height: 16px; border: 1.5px solid var(--rule-2); border-radius: 4px; background:#fff; display:inline-grid; place-items:center; }
.checkbox.is-on { background: var(--ink); border-color: var(--ink); }
.checkbox.is-on::after { content:"✓"; color: var(--mint); font-size: 11px; font-weight:700; }

.prog { display:flex; align-items:center; gap:6px; }
.prog__dots { display:flex; gap:3px; }
.prog__dot { width:7px; height:7px; border-radius:50%; background: var(--rule-2); }
.prog__dot.on { background: var(--mint-deep); }
/* The stage the order is currently at gets a ring so the pipeline position reads at a glance. */
.prog__dot.is-current { box-shadow: 0 0 0 2px var(--mint-deep); }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 13px 15px; }
.stat__k { font-family: var(--font-mono); font-size: 10px; letter-spacing:.1em; text-transform: uppercase; color: var(--txt-3); }
.stat__v { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin-top: 3px; letter-spacing: -.02em; }
.stat__d { font-family: var(--font-mono); font-size: 11px; margin-top: 2px; color: var(--txt-2); }
.stat__d .up { color: var(--c-green); } .stat__d .dn { color: var(--c-red); }
.stat--prod .stat__v { margin-bottom: 4px; }
.prod-break { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.prod-break__i { font-family: var(--font-mono); font-size: 10.5px; color: var(--txt-2); background: var(--bg, #f5f5f4); border: 1px solid var(--rule); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.prod-break__i b { color: var(--txt); font-weight: 800; }
.prod-break__i.is-zero { opacity: .45; }

/* ============================ BUTTONS ============================ */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; padding: 9px 15px; border-radius: 8px; font-size: 13px; font-weight: 700; letter-spacing:.01em; transition: transform .1s, box-shadow .1s, background .12s; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; }
.btn--primary { background: var(--mint); color: #00271a; box-shadow: 0 3px 0 var(--mint-deep); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--mint-deep); }
.btn--primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--mint-deep); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--ghost { background: #fff; border: 1px solid var(--rule); color: var(--txt); }
.btn--ghost:hover { border-color: var(--rule-2); background: #fbfaf7; }
.btn--sm { padding: 6px 11px; font-size: 12px; }
.btn--block { width: 100%; }

/* ============================ DRAWER / DETAIL ============================ */
.overlay { position: fixed; inset: 0; background: rgba(11,12,14,.32); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.overlay.is-open { opacity: 1; pointer-events: auto; }

/* ============================ DETAIL PAGE LAYOUT ============================ */
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 18px; padding: 18px 20px 60px; align-items: start; }
.detail__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail__side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 18px; }

.card { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); }
.card__head { display:flex; align-items:center; gap:10px; padding: 13px 16px; border-bottom: 1px solid var(--rule); }
.card__head h3 { font-family: var(--font-display); font-weight: 800; font-size: 13.5px; letter-spacing: -.01em; margin: 0; text-transform: uppercase; }
.card__head svg { width: 16px; height: 16px; flex: none; color: var(--txt-2); }
.card__head .right { margin-left: auto; display:flex; gap:8px; align-items:center; }
.card__body { padding: 16px; }
.card__body--flush { padding: 0; }

.crumbs { display:flex; align-items:center; gap:8px; font-family: var(--font-mono); font-size: 11px; color: var(--txt-3); }
.crumbs a:hover { color: var(--txt); }
.crumbs .sep { color: var(--rule-2); }

.pagehead { display:flex; align-items:center; gap:14px; margin-bottom: 16px; flex-wrap: wrap; }
.pagehead h2 { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: -.02em; margin: 0; }
.pagehead .meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--txt-2); }
.pagehead .actions { margin-left: auto; display:flex; gap:8px; flex-wrap: wrap; justify-content: flex-end; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 9px 14px; font-size: 13px; }
.kv dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing:.05em; text-transform: uppercase; color: var(--txt-3); align-self: center; }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* line items */
.lineitem { display: grid; grid-template-columns: 46px 1fr auto; gap: 13px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--rule); }
.lineitem:last-child { border-bottom: 0; }
/* Refunded / edited-out line — dimmed + struck so it reads as "not being made". */
.lineitem--removed { opacity: .6; }
.lineitem--removed .li__name, .lineitem--removed .li__meta { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.35); }
.lineitem--removed .li__thumb { filter: grayscale(1); }
.li__removed-tag { display: inline-block; margin-left: 7px; padding: 1px 7px; border-radius: 999px; background: #fdecec; color: #c0392b; border: 1px solid #f3c2c2; font-family: var(--font-mono); font-weight: 700; font-size: 10px; letter-spacing: .02em; text-transform: uppercase; vertical-align: middle; text-decoration: none; }
.li__thumb { width: 46px; height: 46px; border-radius: 7px; overflow: hidden; border: 1px solid var(--rule); display:grid; place-items:center; flex:none; background: repeating-linear-gradient(45deg,#f0eee7,#f0eee7 6px,#f6f5f1 6px,#f6f5f1 12px); }
.li__thumb .gm { font-family: var(--font-mono); font-size: 8px; color: var(--txt-3); }
.li__thumb img { width: 100%; height: 100%; object-fit: cover; }
.li__links { display: flex; gap: 12px; margin: 3px 0; }
.li__links a { font-size: 11px; color: var(--mint-ink); font-weight: 600; text-decoration: underline; }

/* attachment tiles (emails, customer profile, attachments view) */
.att-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.att-tile { display: flex; gap: 10px; align-items: center; border: 1px solid var(--rule); border-radius: 8px; padding: 8px; background: #fff; width: 248px; max-width: 100%; }
.att-tile__thumb { width: 44px; height: 44px; border-radius: 6px; overflow: hidden; flex: none; display: grid; place-items: center; border: 1px solid var(--rule); background: repeating-linear-gradient(45deg,#f0eee7,#f0eee7 5px,#f8f7f3 5px,#f8f7f3 10px); }
.att-tile__thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-tile__thumb--file svg { width: 18px; height: 18px; color: var(--txt-3); }
.att-tile__body { min-width: 0; flex: 1; }
.att-tile__name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-tile__meta { font-family: var(--font-mono); font-size: 10px; color: var(--txt-3); margin-top: 1px; }
.att-tile__links { display: flex; gap: 10px; margin-top: 3px; }
.att-tile__links a, .att-tile__links button { font-size: 11px; color: var(--mint-ink); font-weight: 600; text-decoration: underline; padding: 0; }
/* Orders grid — instant search */
.ord-search { display: flex; align-items: center; gap: 6px; background: var(--surface-2, #f4f4f1); border: 1px solid var(--rule); border-radius: 8px; padding: 0 8px; height: 30px; min-width: 320px; }
.ord-search svg { width: 14px; height: 14px; color: var(--txt-3); flex: none; }
.ord-search input { border: 0; background: transparent; outline: none; font: inherit; font-size: 12px; width: 100%; color: var(--txt-1); }
.ord-search input::-webkit-search-cancel-button { display: none; }
.ord-search__clear { border: 0; background: transparent; cursor: pointer; color: var(--txt-3); font-size: 16px; line-height: 1; padding: 0 2px; flex: none; }
.ord-search__clear:hover { color: var(--txt-1); }
.status-select { display: flex; align-items: center; gap: 6px; background: var(--surface-2, #f4f4f1); border: 1px solid var(--rule); border-radius: 8px; padding: 0 8px 0 10px; height: 30px; }
.status-select svg { width: 14px; height: 14px; color: var(--txt-3); flex: none; }
.status-select select { border: 0; background: transparent; outline: none; font: inherit; font-size: 12px; color: var(--txt-1); cursor: pointer; }
.status-select.is-on { border-color: var(--mint-ink); }
.modal-overlay { position: fixed; inset: 0; background: rgba(20,22,26,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal--wide { max-width: 920px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.modal__head h3 { margin: 0; font-size: 15px; }
.modal__body { padding: 16px 18px; overflow: auto; }
.modal__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--rule); }
.ship-applyall { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ship-tbl td { vertical-align: top; }
.warn-banner { display: flex; align-items: center; gap: 8px; background: #fde8e8; border: 1px solid #f3c0c0; color: #8a2b2b; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; font-size: 12.5px; }
.warn-banner svg { width: 15px; height: 15px; flex: none; }
/* Update-available announce bar — sits above the topbar, full width. */
.update-bar { display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--txt-inv, #fff); padding: 8px 18px; font-size: 12.5px; font-weight: 500; }
.update-bar svg { width: 15px; height: 15px; flex: none; color: var(--mint); }
.update-bar__btn { margin-left: auto; background: var(--mint); color: #00301f; border: none; font-weight: 700; }
.update-bar__btn:hover { background: var(--mint-deep); }
.browse-feed { display: flex; flex-direction: column; }
.browse-row { display: flex; gap: 12px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--rule); font-size: 12.5px; }
.browse-row:last-child { border-bottom: 0; }
.browse-row__t { color: var(--txt-3); font-size: 11px; white-space: nowrap; flex: none; width: 96px; }
.browse-row__e { color: var(--txt-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
/* production queue rows */
.prod-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.prod-row:last-child { border-bottom: 0; }
.prod-row .ordno { flex: none; }
.prod-row__who { flex: 1; min-width: 140px; font-size: 12.5px; }
.prod-row__act { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.prod-art { flex-basis: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--txt-2); padding-left: 2px; }
.prod-art svg { width: 14px; height: 14px; flex: none; color: var(--txt-3); }
.prod-art__link { color: var(--mint-ink, #1b9e77); font-weight: 600; text-decoration: none; background: #f0fbf6; border: 1px solid #cdeede; border-radius: 6px; padding: 2px 7px; }
.prod-art__link:hover { text-decoration: underline; }
.browse-sentinel { display: flex; justify-content: center; padding: 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-green, #16a34a); flex: none; box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: live-pulse 1.8s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 70% { box-shadow: 0 0 0 6px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.load-more { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 18px 8px 6px; }
/* Royal Mail services settings table */
/* Shipments list — tabs */
.ship-tabs { display: flex; gap: 4px; background: var(--paper-2, #f7f5f0); border-radius: 8px; padding: 3px; }
.ship-tab {
  padding: 5px 14px; border-radius: 6px; border: none; background: transparent;
  font-size: 12px; font-weight: 500; color: var(--txt-2); cursor: pointer;
  display: flex; align-items: center; gap: 6px; transition: background .1s, color .1s;
}
.ship-tab:hover { color: var(--txt-1); background: #fff; }
.ship-tab.is-on { background: #fff; color: var(--txt-1); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
/* Shipments list table */
.ship-list { font-size: 12.5px; }
.ship-list th { white-space: nowrap; }
.ship-list td { white-space: nowrap; }

.rm-svc { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rm-svc th { text-align: left; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--txt-3); padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.rm-svc td { padding: 6px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.rm-svc tr.is-off td { opacity: .5; }
.rm-svc tr.is-off td:first-child { opacity: 1; }
.rm-svc input[type="checkbox"], .rm-svc input[type="radio"] { width: 15px; height: 15px; cursor: pointer; }
.rm-in { width: 84px; border: 1px solid var(--rule); border-radius: 6px; padding: 4px 7px; font-size: 12px; }
.rm-in--name { width: 100%; min-width: 170px; }
.rm-svc select { border: 1px solid var(--rule); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12px; background: #fff; }
/* Create-label modal: give each field room so the service name isn't clipped. */
.ship-tbl td { vertical-align: top; }
.ship-tbl td:nth-child(3) { width: 84px; }
.ship-tbl td:nth-child(4) { min-width: 220px; }
.ship-tbl td .rm-in, .ship-tbl td select { width: 100%; box-sizing: border-box; }
.ship-tbl td:nth-child(4) .rm-in--sm { width: 100%; }
.ship-applyall .rm-in, .ship-applyall select { width: auto; box-sizing: border-box; }
.ship-applyall select { min-width: 120px; }

/* Parcel type picker — box vs envelope icons + service chips */
.ptype-picker { display: flex; flex-direction: column; gap: 0; }
.ptype-picker__icons { display: flex; gap: 8px; flex-wrap: wrap; }
.ptype-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 10px; border: 2px solid var(--rule); border-radius: 10px;
  background: var(--paper-2, #f7f5f0); cursor: pointer; color: var(--txt-2);
  font-size: 12px; font-weight: 600; flex: 1; min-width: 5cm; min-height: 5cm;
  transition: border-color .12s, background .12s, color .12s;
}
.ptype-btn svg { width: 2.6cm; height: 2.6cm; stroke-width: 1.4; }
.ptype-btn:hover { border-color: var(--c-green, #18f4af); color: var(--txt-1); background: #fff; }
.ptype-btn.is-on { border-color: var(--c-green, #18f4af); background: #edfff8; color: var(--mint-ink, #0d8a61); }
/* Compact variant (Apply-to-all bar) stays small — override the big tile sizing. */
.ptype-btn--sm { flex-direction: row; padding: 5px 10px; flex: none; font-size: 11px; min-width: 0; min-height: 0; gap: 5px; }
.ptype-btn--sm svg { width: 14px; height: 14px; stroke-width: 1.7; }
.ptype-picker__svcs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
/* Touch-friendly service chips — sized for a finger tap on touch monitors. */
.svc-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 12px 18px; border: 2px solid var(--rule); border-radius: 10px;
  background: #fff; cursor: pointer; min-width: 88px; min-height: 64px;
  transition: border-color .1s, background .1s;
}
.svc-chip { position: relative; }
.svc-chip:hover { border-color: var(--c-green, #18f4af); }
.svc-chip.is-on { border-color: var(--c-green, #18f4af); background: #edfff8; box-shadow: 0 0 0 1px var(--c-green, #18f4af) inset; }
.svc-chip__tier { font-size: 22px; font-weight: 700; color: var(--txt-1); line-height: 1; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-chip.is-on .svc-chip__tier { color: var(--mint-ink, #0d8a61); }
.svc-chip__code { font-size: 12px; font-family: var(--font-mono); color: var(--txt-3); letter-spacing: .04em; }
/* The service the customer requested — dashed blue ring so it stands out even unselected. */
.svc-chip.is-requested { border-color: #2f6bd6; border-style: dashed; }
.svc-chip__req { position: absolute; top: -9px; background: #2f6bd6; color: #fff; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; }
/* Operator picked a service different from the requested one — hard amber highlight. */
.svc-chip.is-deviated { border-color: var(--c-amber, #e6952a); background: #fff7ea; box-shadow: 0 0 0 2px var(--c-amber, #e6952a) inset; }
.svc-chip.is-deviated .svc-chip__tier { color: #b4700f; }
/* Requested-service line above the picker */
.req-svc { font-size: 11px; color: var(--txt-2); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.req-svc__k { text-transform: uppercase; font-size: 9.5px; letter-spacing: .05em; color: var(--txt-3); font-weight: 700; }
.req-svc__map { color: var(--mint-ink, #0d8a61); font-weight: 600; font-size: 10px; }
.req-svc__diff { background: var(--c-amber, #e6952a); color: #fff; font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; }
.req-svc--deviated { color: #b4700f; font-weight: 600; }
/* Combined-dispatch note attached to the parent order row */
.combined-note { margin-top: 5px; font-size: 10.5px; font-weight: 600; color: var(--mint-ink, #0d8a61); display: inline-flex; align-items: center; gap: 4px; background: #edfff8; border: 1px solid var(--c-green, #18f4af); border-radius: 6px; padding: 2px 7px; }
.combined-note svg { width: 12px; height: 12px; }
/* Overdue-dispatch service upgrade recommendation */
.late-rec { border: 2px solid var(--c-amber, #e6952a); background: #fff7ea; border-radius: 8px; padding: 7px 9px; margin-bottom: 8px; }
.late-rec__hd { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #b4700f; }
.late-rec__hd svg { width: 13px; height: 13px; }
.late-rec__body { font-size: 11px; color: var(--txt-2); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.late-rec__btn { border: 0; background: var(--c-amber, #e6952a); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.late-rec__btn:hover { filter: brightness(1.05); }
/* Order-line summary under "Ship to" in the create-label modal */
.ship-lines { font-size: 10.5px; color: var(--txt-2); margin-top: 4px; line-height: 1.35;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.rm-del { border: 0; background: transparent; color: var(--txt-3); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.rm-del:hover { color: #c0392b; }

/* Draft order — editable items grid */
.dft-items { width: 100%; border-collapse: collapse; font-size: 13px; }
.dft-items thead th { text-align: left; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--txt-3); font-weight: 700; padding: 0 10px 8px; border-bottom: 1px solid var(--rule); }
.dft-items thead th.num { text-align: right; }
.dft-items tbody td { padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.dft-items tbody tr:last-child td { border-bottom: 0; }
.dft-items td.num { text-align: right; white-space: nowrap; }
.dft-items .dft-amt { font-family: var(--font-mono); font-weight: 600; padding-top: 5px; }
.dft-items .rm-in { width: 100%; }
.dft-items .rm-in.num { width: 100%; text-align: right; font-family: var(--font-mono); }
.dft-items .rm-in:disabled { background: var(--paper-2, #f7f5f0); color: var(--txt-2); border-color: transparent; padding-left: 0; }
.dft-items .rm-in--name:disabled { font-weight: 600; }
.dft-items .dft-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 10px; letter-spacing: .02em; text-transform: uppercase; font-weight: 600; }
.dft-items .dft-tag--sku { color: var(--mint-ink, #0b6b4f); }
.dft-items .dft-tag--custom { color: var(--txt-3); }
.dft-items .rm-del { font-size: 18px; }
.dft-addrow { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dft-totals { margin: 16px 0 2px auto; width: 280px; }
.dft-disc-in { width: 96px !important; text-align: right; font-family: var(--font-mono); }

/* Catalogue / customer picker rows */
.pick-row:hover { background: var(--paper-2, #f4f2ec); }
.pick-panel { border: 1px solid var(--rule); border-radius: 10px; padding: 12px; margin-top: 12px; background: var(--paper-2, #faf9f5); }

/* Link email-only contact to a Shopify customer */
.link-box { background: #fff8e6; border: 1px solid #f0e0a8; border-radius: var(--radius); padding: 12px; margin-bottom: 16px; }
.link-box__hd { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; color: #9a7d1a; }
.link-box__hd svg { width: 14px; height: 14px; }
.link-box__sub { font-size: 11.5px; color: var(--txt-2); margin: 4px 0 8px; line-height: 1.4; }
.link-box__in { width: 100%; border: 1px solid var(--rule); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 12px; background: #fff; }
.link-box__results { margin-top: 6px; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.link-box__row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 0; background: transparent; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.link-box__row:hover { background: #fff; }
.link-box__name { font-weight: 600; font-size: 12.5px; }
.link-box__email { font-size: 10.5px; color: var(--txt-3); }
.assign-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; width: 300px; max-width: 86vw; background: #fff; border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 12px; }
.assign-pop .link-box__hd { color: var(--txt-1); margin-bottom: 8px; }
.assign-pop .link-box__in { margin-bottom: 4px; }
/* Artwork */
.art-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.art-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px; border: 1px solid var(--rule); border-radius: 10px; }
.art-thumb { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid var(--rule); border-radius: 8px; background: #fafafa; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--txt-3); text-decoration: none; }
.art-thumb img { width: 100%; height: 100%; object-fit: cover; }
.art-thumb svg { width: 18px; height: 18px; }
.art-check { display: inline-flex; align-items: center; flex: 0 0 auto; cursor: pointer; }
.art-check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--mint-ink); }
.art-row.is-sel { background: var(--mint-wash); border-color: var(--mint-ink); }
/* The one file the shop should print — made unmistakable vs the per-item design links */
.art-row--print { background: #ecfdf3; border-color: #18a565; box-shadow: inset 3px 0 0 #18a565; }
.badge--print { background: #18a565; color: #fff; border-color: transparent; margin-left: 6px; font-weight: 700; letter-spacing: .03em; }
.badge--print svg { width: 12px; height: 12px; }
.art-printbanner { display: flex; align-items: center; gap: 8px; padding: 9px 12px; margin-bottom: 10px;
  background: #ecfdf3; border: 1px solid #9be3bf; border-radius: 10px; font-size: 13px; color: #0f7a52; }
.art-printbanner svg { width: 16px; height: 16px; flex: none; }
.gs-seg button { padding: 4px 9px; font-size: 11px; }
.gs-card .gs-preview svg { max-width: 100%; }
/* .gs-grid layout (flex-wrap: controls | preview, stacks when narrow) is set
   inline in views-gangsheet.jsx so it never depends on this file being fresh. */
.art-meta { flex: 1 1 120px; min-width: 0; }
.art-name { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; cursor: pointer; }
.art-name:hover { color: var(--mint-ink); text-decoration: underline; }
.art-sub { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-actions { display: flex; gap: 6px; margin-left: auto; flex: 0 0 auto; }
/* In a narrow column the buttons wrap to their own full-width line and split evenly. */
@media (max-width: 1100px) {
  .art-actions { flex: 1 1 100%; margin-left: 0; flex-wrap: wrap; }
  .art-actions .btn { flex: 1 1 auto; justify-content: center; }
}
/* Phones: buttons wrap 2-per-row instead of squashing off-screen, and the
   services dropdown becomes a full-width panel under the row (its absolute
   right:0/min-width:176px overflowed the viewport). */
@media (max-width: 640px) {
  .art-row { position: relative; }
  .art-actions { flex-wrap: wrap; }
  .art-actions .btn { flex: 1 1 calc(50% - 3px); min-width: 0; }
  .art-menu-wrap { position: static; }
  .art-menu { left: 8px; right: 8px; min-width: 0; width: auto; max-width: none; box-sizing: border-box; }
  .art-menu__item { white-space: normal; }
  /* Let the adjustment rows shrink/wrap inside the now screen-width menu: the
     slider takes a full row, the value + Apply sit on the next line. */
  .art-menu__adj-row { flex-wrap: wrap; }
  .art-menu__adj-row input[type=range] { flex: 1 1 100%; min-width: 0; }
  .art-menu__adj-row .btn { flex: 1 1 auto; }
  .art-menu__seg { flex: 1 1 100%; }
  .art-menu__adj-val { text-align: left; }
}
/* Per-file artwork-services dropdown (make print-ready / remove bg / upscale ×N). */
.art-menu-wrap { position: relative; }
.art-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 176px; background: #fff; border: 1px solid var(--rule-2); border-radius: 9px; box-shadow: 0 10px 28px rgba(0,0,0,.14); padding: 4px; max-height: calc(100vh - 84px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.art-menu__item { display: block; width: 100%; text-align: left; padding: 8px 10px; font-size: 12.5px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--txt-1); white-space: nowrap; }
.art-menu__item:hover { background: var(--paper-2, #f2f1ec); }
.art-menu__adj { padding: 8px 10px; border-top: 1px solid var(--rule-2); margin-top: 4px; }
.art-menu__adj-label { font-size: 12.5px; color: var(--txt-1); margin-bottom: 6px; }
.art-menu__adj-row { display: flex; align-items: center; gap: 8px; }
.art-menu__adj-row input[type=range] { flex: 1; min-width: 96px; accent-color: var(--mint, #18f4af); }
.art-menu__adj-row .art-menu__adj-val { font-size: 11.5px; color: var(--txt-2); min-width: 26px; text-align: right; }
.art-menu__adj-hint { font-size: 10.5px; color: var(--txt-3, #9a978d); margin-top: 5px; }
/* compact factor selector (Upscale ×2/×5/×10) inside the services menu */
.art-menu__seg { flex: 1; }
.art-menu__seg button { flex: 1; padding: 5px 8px; font-size: 11.5px; font-family: var(--font-mono); }
.art-proc { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; color: var(--mint-ink); }
.art-proc--err { color: var(--c-red); }
.art-drop { border: 1.5px dashed var(--rule); border-radius: 10px; padding: 14px; text-align: center; font-size: 12.5px; color: var(--txt-2); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: border-color .15s, background .15s; }
.art-drop:hover { border-color: var(--mint-ink, #1b9e77); background: #f6fffb; }
.art-drop.is-drag { border-color: var(--mint-ink, #1b9e77); background: #ecfdf5; color: var(--mint-ink, #1b9e77); }
.art-drop svg { width: 15px; height: 15px; }
/* Order note */
.order-note { display: flex; gap: 10px; align-items: flex-start; background: #fff8e6; border: 1px solid #f0e0a8; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; }
.order-note svg { width: 16px; height: 16px; color: #b8860b; flex: none; margin-top: 1px; }
.order-note__lbl { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: #9a7d1a; font-weight: 700; margin-bottom: 2px; }
.order-note__body { font-size: 13px; color: var(--txt-1); white-space: pre-line; }
/* Internal-notes chat card (shared studio ⇄ shop) */
.notes-card { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); margin-bottom: 16px; overflow: hidden; }
.notes-card__head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.notes-card__head svg { width: 15px; height: 15px; color: var(--sub); flex: none; }
.notes-card__lbl { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--txt-2); font-weight: 700; }
.notes-chat { display: flex; flex-direction: column; gap: 8px; padding: 12px; max-height: 320px; overflow-y: auto; background: var(--paper-2, #f7f8fa); }
.note-msg { display: flex; }
.note-msg--mine { justify-content: flex-end; }
.note-msg--sys { justify-content: center; }
.note-msg__bubble { max-width: 78%; padding: 7px 11px; border-radius: 12px; background: #fff; border: 1px solid var(--rule); box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.note-msg--mine .note-msg__bubble { background: var(--mint-wash); border-color: var(--mint); }
.note-msg--sys .note-msg__bubble { background: #fff8e6; border-color: #f0e0a8; max-width: 92%; }
.note-msg__meta { font-size: 10px; color: var(--sub); margin-bottom: 2px; font-weight: 600; }
.note-msg__text { font-size: 13px; color: var(--txt-1); white-space: pre-wrap; word-break: break-word; }
.notes-card__compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--rule); }
.notes-card__compose textarea { flex: 1; resize: vertical; min-height: 36px; font: inherit; font-size: 13px; }
.notes-card__compose .btn { flex: none; }
.ord-note { display: flex; align-items: center; gap: 4px; max-width: 240px; margin-top: 3px; font-size: 10.5px; font-style: italic; color: var(--txt-3); }
.ord-note svg { width: 11px; height: 11px; flex: none; }
.ord-note__t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-state { padding: 40px 8px; color: var(--txt-3); font-size: 13px; }
.linklike { border: 0; background: transparent; color: var(--mint-ink); cursor: pointer; text-decoration: underline; font: inherit; padding: 0; }

/* Orders grid — item lines with SKU */
.ord-items { display: flex; flex-direction: column; gap: 2px; max-width: 240px; }
.ord-items__row { display: flex; gap: 6px; align-items: baseline; font-size: 12px; line-height: 1.3; }
.ord-items__qty { color: var(--txt-3); font-variant-numeric: tabular-nums; flex: none; }
.ord-items__sku { font-size: 11px; color: var(--txt-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-items__name { color: var(--txt-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-items__sum { font-size: 10.5px; margin-top: 4px; }

/* UV orders — easy to miss, so flag the row and tag the line item. */
.tbl tbody tr.has-uv td:first-child { box-shadow: inset 3px 0 0 var(--c-violet); }
.tbl tbody tr.has-uv:not(.is-sel) { background: var(--c-violet-w); }
.tbl tbody tr.has-uv:not(.is-sel):hover { background: #e9e1ff; }
.ord-items__row.is-uv .ord-items__name,
.ord-items__row.is-uv .ord-items__sku { color: #5a37b3; font-weight: 600; }
.uv-tag { display: inline-block; flex: none; font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .04em; line-height: 1.4; padding: 0 4px; border-radius: 4px; background: var(--c-violet); color: #fff; }

/* DTF metres ordered — material-planning badge on order/production lists. */
.m-badge { display: inline-block; margin-left: 6px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .02em; line-height: 1.5; padding: 0 5px; border-radius: 5px; background: var(--c-teal-w); color: #07736a; vertical-align: middle; }
.m-badge--lg { font-size: 11px; padding: 1px 7px; }
.m-badge--solid { background: var(--c-teal); color: #fff; }
.m-badge--uv { background: var(--c-violet); color: #fff; }
/* Hold-until-date control (order actions) */
.hold-ctl { display: inline-flex; align-items: center; gap: 6px; }
.hold-ctl input[type=date] { width: 148px; }
.hold-ctl--on { color: #8a6d1a; font-size: 12px; font-weight: 600; background: #fff8e6; border: 1px solid #f0e0a8; border-radius: 8px; padding: 3px 6px 3px 9px; }
.hold-ctl--on svg { width: 13px; height: 13px; }
/* Lapsed-regular note on the customer profile */
.reactivate-note { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 7px 10px; font-size: 12px; font-weight: 600; color: #b45309; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; }
.reactivate-note svg { width: 13px; height: 13px; flex: none; }
.stat--clickable:hover { background: var(--mint-wash); }
/* Pinned internal-notes card (customer profile) + order-view banner */
.cust-notes--has { border-color: #f0e0a8; background: #fffdf5; }
.cust-note-banner { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; padding: 9px 12px; background: #fff8e6; border: 1px solid #f0e0a8; border-radius: 10px; font-size: 13px; color: #5a4a12; }
.cust-note-banner svg { width: 15px; height: 15px; flex: none; color: #b8860b; margin-top: 1px; }
.cust-note-banner__lbl { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: #9a7d1a; font-weight: 700; margin-right: 2px; }
.cust-note-banner b { font-weight: 700; }
td.num .m-badge { margin-left: 0; }
/* Per-line-item metres on the order detail — highlighted for RIP comparison. */
.li__metres { margin-top: 5px; text-align: right; }
.li__metres .m-badge { margin-left: 0; font-size: 12px; padding: 1px 8px; }
.totals .row--metres { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px dashed var(--rule); font-weight: 600; }
.totals .row--metres .m-badge { margin-left: 0; font-size: 12px; padding: 1px 8px; }

/* Live "printing now" — pulsing badge, row accent, and the print-progress panel. */
.print-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .02em; padding: 1px 7px; border-radius: 999px; background: var(--c-blue-w); color: #1d4dad; white-space: nowrap; }
.print-badge--sm { font-size: 9px; padding: 0 5px; margin-left: 6px; vertical-align: middle; }
.print-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-blue); flex: none; animation: pp-pulse 1.2s ease-in-out infinite; }
@keyframes pp-pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(47,109,240,.5); } 50% { opacity: .5; box-shadow: 0 0 0 4px rgba(47,109,240,0); } }
.tbl tbody tr.is-printing td:first-child { box-shadow: inset 3px 0 0 var(--c-blue); }
.tbl tbody tr.is-printing:not(.is-sel) { background: var(--c-blue-w); }
.tbl tbody tr.is-printing:not(.is-sel):hover { background: #dfe9ff; }

.pp-card { border: 1px solid var(--c-blue); box-shadow: 0 0 0 3px rgba(47,109,240,.08); }
.pp-card .card__head h3 { color: #1d4dad; }
.pp-printer { color: var(--txt-2); }
.pp-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.pp-order { font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.pp-metres { color: var(--txt-2); font-size: 13px; }
.pp-pct { margin-left: auto; font-weight: 800; font-size: 16px; color: #1d4dad; }
.pp-bar { height: 8px; border-radius: 999px; background: var(--paper-2, #eee); overflow: hidden; }
.pp-bar__fill { height: 100%; background: linear-gradient(90deg, var(--c-blue), #5b8cff); border-radius: 999px; transition: width .6s ease; }
.pp-line { margin-top: 10px; font-size: 12.5px; color: var(--txt-1); }
.pp-sub { margin-top: 3px; font-size: 11.5px; color: var(--txt-3); }
/* Live print-progress row on the production board (one card per printing job). */
.prod-live { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 14px; }
.prod-live .pp-card { margin: 0; }

/* Inline print-progress on a production-board row — read progress without opening the order. */
.prow-prog { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.prow-prog .print-badge__dot { width: 6px; height: 6px; }
.prow-prog__pct { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: #1d4dad; white-space: nowrap; }
.prow-prog__bar { flex: 1; min-width: 56px; max-width: 140px; height: 5px; border-radius: 999px; background: var(--c-blue-w); overflow: hidden; }
.prow-prog__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--c-blue), #5b8cff); border-radius: 999px; transition: width .6s ease; }
.prow-prog__eta { font-family: var(--font-mono); font-size: 9.5px; color: var(--txt-3); white-space: nowrap; }

/* Completed-print details (mode · metres · duration · rates · printer). */
.print-result { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; color: var(--txt-1); }
.print-result--sm { margin-top: 4px; font-size: 10px; color: var(--txt-2); }
.print-result__tick { flex: none; }
.print-result__bits { color: var(--c-green, #1f9d54); font-weight: 600; }
.print-result--sm .print-result__bits { color: #137a40; }
.print-result__printer { color: var(--txt-3); }
.print-result--sm .print-result__printer { display: none; }

/* Design-preview image + its print pipeline CTAs (print-ready / upscale / remove-bg). */
.dpp { display: flex; gap: 12px; align-items: flex-start; }
.dpp__thumb { flex: none; line-height: 0; }
.dpp__thumb img { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; border: 1px solid var(--rule); background: #fff; display: block; }
.dpp__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dpp__namerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
/* inline <a> ignores max-width/ellipsis — make it inline-block + cap at the
   container so long filenames truncate instead of overflowing the screen. */
.dpp__name { font-size: 11px; color: var(--mint-ink); text-decoration: underline; display: inline-block; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.dpp__dl { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--mint-ink); text-decoration: none; white-space: nowrap; flex: none; }
.dpp__dl:hover { text-decoration: underline; }
.dpp__dl svg { width: 13px; height: 13px; }
.dpp__meta { font-size: 10.5px; color: var(--txt-3); letter-spacing: .01em; }
.dpp__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dpp__status { display: flex; gap: 8px; align-items: center; }
.dpp__status:empty { display: none; }
.fileprop { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.fileprop__name { font-size: 12px; display: inline-block; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.li__name { font-weight: 600; font-size: 13px; }
.li__meta { font-family: var(--font-mono); font-size: 11px; color: var(--txt-3); margin-top: 2px; }
.li__props { margin-top: 9px; display: flex; flex-direction: column; gap: 5px; border-top: 1px dashed var(--rule); padding-top: 9px; }
.li__prop { display: grid; grid-template-columns: 140px 1fr; gap: 10px; font-size: 12px; align-items: baseline; }
.li__propk { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--txt-3); }
.li__propv { color: var(--txt-2); word-break: break-word; min-width: 0; }
.li__price { font-family: var(--font-mono); font-size: 13px; text-align: right; }
.li__qty { font-family: var(--font-mono); font-size: 11px; color: var(--txt-2); text-align: right; }
/* quantity > 1 — make it impossible to miss (e.g. on RIP) */
.li__qtytag { display: inline-block; margin-right: 7px; padding: 1px 7px; border-radius: 999px; background: var(--c-amber, #f59e0b); color: #1a1206; font-family: var(--font-mono); font-weight: 800; font-size: 11px; vertical-align: middle; }
.li__qty--multi { color: #9a6a00; font-weight: 800; font-size: 13px; background: rgba(245,158,11,.16); border-radius: 6px; padding: 1px 6px; }

.totals { padding: 14px 16px; }
.totals .row { display:flex; justify-content: space-between; font-size: 13px; padding: 5px 0; }
.totals .row.grand { border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 12px; font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.totals .row span:last-child { font-family: var(--font-mono); }

/* timeline */
.timeline { position: relative; padding-left: 6px; }
.tl { position: relative; padding: 0 0 18px 24px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content:""; position:absolute; left: 5px; top: 4px; bottom: -4px; width: 2px; background: var(--rule); }
.tl:last-child::before { display: none; }
.tl__dot { position:absolute; left: 0; top: 2px; width: 12px; height: 12px; border-radius: 50%; background:#fff; border: 2px solid var(--rule-2); }
.tl__dot.on { background: var(--mint); border-color: var(--mint-deep); }
.tl__t { font-size: 13px; font-weight: 600; }
.tl__m { font-family: var(--font-mono); font-size: 10.5px; color: var(--txt-3); margin-top: 1px; }

/* fulfillment progress steps */
.steps { display:flex; gap: 0; margin: 4px 0 0; }
.step { flex:1; text-align:center; position: relative; }
.step__bar { height: 4px; background: var(--rule); }
.step.done .step__bar { background: var(--mint-deep); }
.step.cur .step__bar { background: var(--mint); }
.step__lbl { font-family: var(--font-mono); font-size: 9px; letter-spacing:.06em; text-transform: uppercase; color: var(--txt-3); margin-top: 6px; }
.step.done .step__lbl, .step.cur .step__lbl { color: var(--txt); }
.step:first-child .step__bar { border-radius: 3px 0 0 3px; }
.step:last-child .step__bar { border-radius: 0 3px 3px 0; }

/* ============================ CUSTOMER PROFILE ============================ */
.prof { display: grid; grid-template-columns: 320px 1fr; gap: 18px; padding: 18px 20px 60px; align-items: start; }
.prof__side { position: sticky; top: 18px; display:flex; flex-direction: column; gap: 16px; }
.prof__main { display:flex; flex-direction: column; gap: 16px; min-width: 0; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--mint); display:grid; place-items:center; font-family: var(--font-display); font-weight: 800; font-size: 18px; flex: none; }
.av { flex: none; }
.statline { display:grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.statline > div { background: #fff; padding: 11px 13px; }
.statline .k { font-family: var(--font-mono); font-size: 9.5px; letter-spacing:.08em; text-transform:uppercase; color: var(--txt-3); }
.statline .v { font-family: var(--font-display); font-weight: 800; font-size: 18px; margin-top: 2px; }

.viewed { display:flex; flex-direction: column; }
.viewed__row { display:flex; align-items:center; gap: 11px; padding: 10px 16px; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.viewed__row:last-child { border-bottom: 0; }
.viewed__row:hover { background: #fbfaf7; }
.viewed__ic { width: 34px; height: 34px; border-radius: 7px; border:1px solid var(--rule); display:grid; place-items:center; flex:none; background: repeating-linear-gradient(45deg,#f0eee7,#f0eee7 5px,#f8f7f3 5px,#f8f7f3 10px); }
.viewed__ic svg { width:15px; height:15px; color: var(--txt-3); }
.viewed__t { font-weight: 600; font-size: 13px; }
.viewed__m { font-family: var(--font-mono); font-size: 10.5px; color: var(--txt-3); margin-top: 1px; }
.viewed__time { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--txt-3); white-space: nowrap; }

/* ============================ INBOX ============================ */
.inbox { display: grid; grid-template-columns: 300px 1fr 300px; height: 100%; min-height: 0; }
.inbox__list { border-right: 1px solid var(--rule); overflow-y: auto; background: var(--paper-2); }
.inbox__listhead { padding: 12px 16px; border-bottom: 1px solid var(--rule); position: sticky; top:0; background: var(--paper-2); z-index: 2; display:flex; align-items:center; gap:8px; }
.inbox__seg { display:flex; gap: 4px; }
.inbox__seg button { font-family: var(--font-mono); font-size: 11px; padding: 5px 9px; border-radius: 6px; color: var(--txt-2); }
.inbox__seg button.is-active { background: var(--ink); color: #fff; }
.thread-item { padding: 12px 16px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.thread-item:hover { background: #fbfaf7; }
.thread-item.is-active { background: var(--mint-wash); box-shadow: inset 3px 0 0 var(--mint); }
.thread-item.unread .ti__subj { font-weight: 700; }
.thread-item.unread .ti__from::after { content:""; display:inline-block; width:6px; height:6px; border-radius:50%; background: var(--mint-deep); margin-left:6px; vertical-align: middle; }
.ti__top { display:flex; align-items:center; gap:8px; margin-bottom: 3px; }
.ti__from { font-weight: 600; font-size: 13px; flex: 1; min-width:0; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti__time { font-family: var(--font-mono); font-size: 10px; color: var(--txt-3); flex:none; }
.ti__subj { font-size: 12.5px; color: var(--txt); margin-bottom: 2px; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti__prev { font-size: 11.5px; color: var(--txt-3); overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti__labels { display:flex; gap:4px; margin-top: 6px; }

.conv { display:flex; flex-direction: column; min-width: 0; overflow: hidden; }
.conv__head { padding: 13px 18px; border-bottom: 1px solid var(--rule); background: var(--paper-2); flex: none; }
.conv__subj { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.conv__meta { display:flex; align-items:center; gap:10px; margin-top: 5px; font-family: var(--font-mono); font-size: 11px; color: var(--txt-3); }
.conv__scroll { flex: 1; overflow-y: auto; padding: 18px; background: var(--paper); }
.msg { background: #fff; border: 1px solid var(--rule); border-radius: 10px; margin-bottom: 14px; }
.msg.out { background: var(--mint-wash); border-color: #c6efe0; }
.msg__head { display:flex; align-items:center; gap:10px; padding: 11px 15px; border-bottom: 1px solid var(--rule); }
.msg.out .msg__head { border-bottom-color: #c6efe0; }
.msg__av { width: 30px; height: 30px; border-radius: 50%; display:grid; place-items:center; font-family: var(--font-mono); font-weight:700; font-size: 11px; flex:none; }
.msg__av.cust { background: var(--ink); color: var(--mint); }
.msg__av.us { background: var(--mint); color: #00271a; }
.msg__who { font-weight: 600; font-size: 13px; }
.msg__addr { font-family: var(--font-mono); font-size: 10px; color: var(--txt-3); }
.msg__time { margin-left:auto; font-family: var(--font-mono); font-size: 10px; color: var(--txt-3); }
.msg__body { padding: 14px 15px; font-size: 13.5px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.msg__atts { padding: 0 15px 14px; display:flex; flex-wrap:wrap; gap:8px; }
.email-html { white-space: normal; font-size: 13.5px; line-height: 1.6; color: var(--txt); overflow-x: auto; }
.email-html img { max-width: 100%; height: auto; border-radius: 6px; }
.email-html * { max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.email-html a { color: var(--mint-ink); text-decoration: underline; }
.email-html table { max-width: 100%; border-collapse: collapse; }
.email-html blockquote { border-left: 3px solid var(--rule-2); margin: 8px 0; padding-left: 12px; color: var(--txt-2); }
.email-html svg { width: auto; height: auto; }
.img-att { display:inline-block; border:1px solid var(--rule); border-radius:8px; overflow:hidden; max-width:240px; }
.img-att img { display:block; max-width:240px; height:auto; }
.ti__count { color: var(--txt-3); font-weight: 400; }
.att-chip { display:flex; align-items:center; gap:8px; border:1px solid var(--rule); border-radius: 8px; padding: 7px 10px; background:#fff; font-size: 12px; }
.att-chip svg { width: 14px; height: 14px; color: var(--txt-3); flex:none; }
.att-chip .at__t { font-weight: 600; } .att-chip .at__m { font-family: var(--font-mono); font-size:10px; color: var(--txt-3); }

/* composer */
.composer { border-top: 1px solid var(--rule); background: var(--paper-2); padding: 12px 16px 14px; flex: none; }
.composer__bar { display:flex; align-items:center; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }
.composer textarea { width: 100%; border: 1px solid var(--rule); border-radius: 9px; padding: 11px 13px; font-size: 13.5px; line-height: 1.55; resize: vertical; min-height: 92px; outline: none; background:#fff; }
.composer textarea:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(11,12,14,.05); }
.composer__foot { display:flex; align-items:center; gap: 8px; margin-top: 9px; }
.composer__atts { display:flex; gap:6px; flex-wrap: wrap; margin-top: 9px; }
.ai-btn { display:flex; align-items:center; gap:7px; padding: 8px 13px; border-radius: 8px; font-size: 12.5px; font-weight: 700; background: var(--ink); color:#fff; }
.ai-btn:hover { background: var(--ink-2); }
.ai-btn .spark { color: var(--mint); }
.ai-btn:disabled { opacity:.6; cursor: default; }
.ai-tone { display:flex; gap:0; border:1px solid var(--rule); border-radius:8px; overflow:hidden; }
.ai-tone button { font-family:var(--font-mono); font-size:10.5px; padding:6px 10px; color:var(--txt-2); border-right:1px solid var(--rule); }
.ai-tone button:last-child{ border-right:0; }
.ai-tone button.on { background: var(--ink); color:#fff; }

.ai-ask { display:flex; align-items:center; gap:8px; margin-bottom: 9px; }
.ai-ask input { flex:1; border:1px solid var(--rule); border-radius:8px; padding:9px 11px; font-size:13px; outline:none; background:#fff; }
.ai-ask input:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(11,12,14,.05); }

.ai-banner { display:flex; align-items:center; gap:10px; padding: 9px 13px; background: var(--mint-wash); border:1px solid #c6efe0; border-radius: 8px; font-size: 12.5px; margin-bottom: 9px; color: var(--mint-ink); }
.ai-banner .x { margin-left:auto; }
.ai-banner.thinking { color: var(--txt-2); background: #f2f1ec; border-color: var(--rule); }

/* context side panel in conversation */
.ctx { border-left: 1px solid var(--rule); overflow-y: auto; background: var(--paper-2); }
.ctx__sec { padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.ctx__sec h4 { font-family: var(--font-mono); font-size: 10px; letter-spacing:.12em; text-transform:uppercase; color: var(--txt-3); margin: 0 0 10px; font-weight:600; }

/* attach popover */
.pop { position: absolute; bottom: calc(100% + 8px); left: 0; width: 360px; background:#fff; border:1px solid var(--rule); border-radius: 11px; box-shadow: var(--shadow-lg); z-index: 30; overflow: hidden; }
.pop__tabs { display:flex; border-bottom:1px solid var(--rule); }
.pop__tabs button { flex:1; padding: 10px; font-size:12px; font-weight:600; color: var(--txt-2); border-right:1px solid var(--rule); }
.pop__tabs button:last-child{ border-right:0; }
.pop__tabs button.on { color: var(--txt); box-shadow: inset 0 -2px 0 var(--mint); }
.pop__search { padding: 10px 12px; border-bottom:1px solid var(--rule); }
.pop__search input { width:100%; border:1px solid var(--rule); border-radius:7px; padding:8px 10px; font-size:12.5px; outline:none; }
.pop__list { max-height: 280px; overflow-y:auto; }
.pop__item { display:flex; align-items:center; gap:11px; padding: 10px 12px; border-bottom:1px solid var(--rule); cursor:pointer; }
.pop__item:hover { background:#fbfaf7; }
.pop__item:last-child{ border-bottom:0; }
.pop__thumb { width:38px; height:38px; border-radius:6px; border:1px solid var(--rule); background: repeating-linear-gradient(45deg,#f0eee7,#f0eee7 5px,#f8f7f3 5px,#f8f7f3 10px); flex:none; display:grid; place-items:center; }
.pop__thumb svg { width:15px; height:15px; color:var(--txt-3); }
.pop__t { font-weight:600; font-size:12.5px; } .pop__m { font-family:var(--font-mono); font-size:10px; color:var(--txt-3); }
.pop__price { margin-left:auto; font-family:var(--font-mono); font-size:12px; font-weight:600; }

/* ============================ LOGIN ============================ */
.login { height: 100vh; height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; background: var(--ink); }
@media (max-width: 880px){ .login { grid-template-columns: 1fr; } .login__art { display:none; } }
.login__art { position: relative; overflow: hidden; background: var(--ink); color:#fff; padding: 48px; display:flex; flex-direction:column; justify-content: space-between; }
.login__art::before { content:""; position:absolute; inset:0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 44px 44px; }
.login__brand { position: relative; display:flex; align-items:center; gap:12px; }
.login__brand .m { width:40px; height:40px; border-radius:9px; background:var(--mint); color:#00271a; display:grid; place-items:center; font-family:var(--font-display); font-weight:900; font-size:13px; }
.login__brand .t { font-family:var(--font-display); font-weight:800; font-size:18px; }
.login__big { position: relative; }
.login__big h2 { font-family:var(--font-display); font-weight:900; font-size: clamp(30px,4vw,48px); line-height:.98; letter-spacing:-.02em; text-transform:uppercase; margin:0; }
.login__big h2 .hl { color: var(--mint); }
.login__big p { font-family: var(--font-mono); font-size: 12px; letter-spacing:.04em; color:#9aa1a9; margin-top: 16px; max-width: 380px; line-height:1.7; }
.login__stats { position:relative; display:flex; gap: 34px; }
.login__stats .s .v { font-family:var(--font-display); font-weight:800; font-size: 26px; color: var(--mint); }
.login__stats .s .k { font-family:var(--font-mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:#7e848b; margin-top:2px; }

.login__form { background: var(--paper); display:flex; align-items:center; justify-content:center; padding: 40px; }
.login__card { width: 100%; max-width: 380px; }
.login__card h1 { font-family: var(--font-display); font-weight: 900; font-size: 26px; letter-spacing:-.02em; margin: 0 0 6px; }
.login__card .lede { font-size: 13.5px; color: var(--txt-2); margin: 0 0 26px; }
.field { margin-bottom: 15px; }
.field label { font-family: var(--font-mono); font-size: 10px; letter-spacing:.1em; text-transform:uppercase; color: var(--txt-3); display:block; margin-bottom: 6px; }
.field input { width: 100%; border:1px solid var(--rule-2); border-radius: 9px; padding: 12px 13px; font-size: 14px; background:#fff; outline:none; }
.field input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11,12,14,.06); }
.field__row { display:flex; justify-content: space-between; align-items:center; }
.field__row a { font-size: 12px; color: var(--mint-ink); font-weight:600; }
.login__row { display:flex; align-items:center; justify-content:space-between; margin: 4px 0 20px; font-size: 12.5px; color: var(--txt-2); }
.login__sso { display:flex; align-items:center; gap:10px; justify-content:center; margin-top:16px; padding:11px; border:1px solid var(--rule-2); border-radius:9px; background:#fff; font-size:13px; font-weight:600; }
.login__sso:hover { background:#fbfaf7; }
.login__divider { display:flex; align-items:center; gap:12px; margin:20px 0; color: var(--txt-3); font-family:var(--font-mono); font-size:10px; letter-spacing:.1em; }
.login__divider::before,.login__divider::after { content:""; flex:1; height:1px; background:var(--rule-2); }
.login__err { margin-top: 12px; padding: 9px 12px; border:1px solid #f3c0c0; background:#fde8e8; color:#8a2b2b; border-radius:8px; font-size:12.5px; }
.login__hint { margin-top: 20px; padding: 11px 13px; border:1px dashed var(--rule-2); border-radius:8px; font-family:var(--font-mono); font-size:11px; color: var(--txt-2); background:#fff; }
.login__hint b { color: var(--txt); }

/* empty state */
.empty { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; color: var(--txt-3); gap: 12px; padding: 40px; text-align:center; }
.empty svg { width: 40px; height: 40px; opacity:.4; }
.empty .t { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--txt-2); }
.empty .m { font-size: 13px; max-width: 280px; }

/* misc */
.copybtn { display:inline-grid; place-items:center; width:18px; height:18px; border-radius:4px; color:var(--txt-3); vertical-align:middle; flex:none; }
.copybtn:hover { background: var(--paper); color: var(--txt); }
.copybtn svg { width:12px; height:12px; }

.dim { color: var(--txt-3); }
.right { margin-left: auto; }
.spin { width:14px; height:14px; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation: spin .7s linear infinite; }
.spin--dark { border-color: rgba(11,12,14,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fade .28s ease; }
@keyframes fade { from { transform: translateY(5px);} to { transform: none; } }

/* ============================================================
   Mobile / responsive
   ============================================================ */
.topbar__menu { display: grid; }     /* burger on all sizes: collapse on desktop, drawer on mobile */
.sidebar__backdrop { display: none; }

/* Desktop: burger collapses the sidebar (reflow, main goes full width). */
@media (min-width: 861px) {
  .app.is-collapsed { grid-template-columns: 1fr; }
  .app.is-collapsed .sidebar { display: none; }
}

@media (max-width: 860px) {
  /* iOS: inputs <16px make Safari zoom on focus → looks broken. Force 16px. */
  input, select, textarea { font-size: 16px; }
  .content { -webkit-overflow-scrolling: touch; }

  /* off-canvas sidebar */
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 84vw; max-width: 300px; z-index: 60;
    transform: translateX(-100%); transition: transform .22s ease;
    padding-left: env(safe-area-inset-left);
  }
  .sidebar.is-open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.45); }
  .sidebar__backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }

  /* topbar (respect the notch / safe areas) */
  .topbar { padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); gap: 8px; }
  .topbar__menu { display: grid; }
  .topbar__search { display: none; }
  .topbar__title h1 { font-size: 15px; }
  .topbar__title .sub { display: none; }

  /* content padding */
  .board { padding: 12px 12px 60px; }

  /* stack two-column layouts */
  .detail, .prof { grid-template-columns: 1fr; padding: 14px 12px 60px; gap: 14px; }
  .detail__side, .prof__side { position: static; top: auto; }

  /* stats wrap to 2-up */
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* any inline 1fr/1fr card grid (recently viewed, etc.) -> single column */
  div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* wide tables scroll horizontally inside their wrapper (keeps column alignment) */
  .tbl-wrap > .tbl { min-width: 720px; }

  /* inbox: list on top, conversation below, hide the context rail */
  .inbox { display: flex; flex-direction: column; height: 100%; }
  .inbox__list { max-height: 42vh; border-right: 0; border-bottom: 1px solid var(--rule); }
  .conv { flex: 1; min-height: 0; }
  .ctx { display: none; }

  /* modals full width */
  .modal-overlay { padding: 10px; }
  .modal, .modal--wide { max-width: 100%; }

  /* misc */
  .ord-search { min-width: 0; flex: 1 1 180px; }
  .kv { grid-template-columns: 92px 1fr; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .statline { grid-template-columns: 1fr; }
  .topbar__title .sub { display: none; }
}

/* ============================ PRODUCTION BOARD (imported design) ============================ */
.prod { padding: 18px 20px 80px; }
.prod .stats { grid-template-columns: repeat(5, 1fr); }
.stat--accent { background: var(--ink); border-color: var(--ink); }
.stat--accent .stat__k { color: #8b9096; }
.stat--accent .stat__v { color: var(--mint); }
.stat--accent .stat__d { color: #9aa1a9; }

.prodnote { display: flex; align-items: center; gap: 10px; background: var(--c-amber-w); border: 1px solid #f0dcae; color: #8a5e00; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 18px; font-size: 12.5px; }
.prodnote svg { width: 16px; height: 16px; flex: none; }
.prodnote b { font-weight: 700; }

.prodbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.prodbar h2 { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: -.01em; margin: 0; display:flex; align-items:center; gap: 9px; }
.prodbar h2 svg { width: 17px; height: 17px; color: var(--txt-2); }
.prodbar .right { margin-left: auto; display:flex; gap: 8px; }

.lane { margin-bottom: 18px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.lane__head { display:flex; align-items:center; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--rule); background: #fbfaf7; }
.lane__ic { width: 26px; height: 26px; border-radius: 7px; display:grid; place-items:center; flex:none; }
.lane__ic svg { width: 15px; height: 15px; }
.lane__ic--design { background: var(--c-violet-w); color: var(--c-violet); }
.lane__ic--press  { background: var(--c-amber-w);  color: var(--c-amber); }
.lane__ic--ready  { background: var(--mint-wash);  color: var(--mint-ink); }
.lane__t { font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: -.005em; text-transform: uppercase; }
.lane__sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--txt-3); }
.lane__count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--txt-2); background: var(--paper); border:1px solid var(--rule); padding: 2px 9px; border-radius: 20px; }
.lane__track { display: flex; gap: 10px; padding: 13px 15px; overflow-x: auto; min-height: 92px; transition: background .12s; }
.lane__track.is-drop { background: var(--mint-wash); box-shadow: inset 0 0 0 2px var(--mint-deep); }
.lane__track .jobcard { width: 268px; flex: none; }
.lane__empty { font-family: var(--font-mono); font-size: 11.5px; color: var(--txt-3); align-self: center; padding: 8px 4px; }

.printers { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.prodcol { width: 278px; flex: none; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); display: flex; flex-direction: column; }
.prodcol--unassigned { background: #faf9f5; border-style: dashed; border-color: var(--rule-2); }
.prodcol__head { display:flex; align-items:center; gap: 9px; padding: 11px 13px; border-bottom: 1px solid var(--rule); }
.prodcol__status { width: 9px; height: 9px; border-radius: 50%; flex:none; }
.prodcol__status.on { background: var(--c-green); box-shadow: 0 0 0 3px var(--c-green-w); }
.prodcol__status.off { background: var(--txt-3); box-shadow: 0 0 0 3px var(--c-grey-w); }
.prodcol__name { font-family: var(--font-display); font-weight: 700; font-size: 12.5px; line-height: 1.15; min-width: 0; flex: 1; }
.prodcol__name small { display:block; font-family: var(--font-mono); font-weight: 500; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-3); margin-top: 2px; }
.prodcol__cnt { font-family: var(--font-mono); font-size: 10.5px; color: var(--txt-2); background: var(--paper); border:1px solid var(--rule); padding: 1px 7px; border-radius: 20px; flex:none; }
.prodcol__menu { display:flex; gap: 4px; flex:none; }
.iconmini { width: 24px; height: 24px; border-radius: 6px; display:grid; place-items:center; color: var(--txt-3); border:1px solid transparent; }
.iconmini:hover { background: var(--paper); border-color: var(--rule); color: var(--txt); }
.iconmini svg { width: 13px; height: 13px; }
.iconmini.danger:hover { background: var(--c-red-w); color: var(--c-red); border-color: #f3c9c5; }
.prodcol__rename { flex: 1; display:flex; gap: 6px; align-items:center; }
.prodcol__rename input { flex:1; min-width: 0; border:1px solid var(--ink); border-radius: 6px; padding: 5px 8px; font-size: 12.5px; font-weight: 600; outline:none; }
.prodcol__confirm { display:flex; align-items:center; gap: 7px; flex:1; font-size: 11.5px; color: var(--c-red); font-weight: 600; }
.prodcol__confirm .sp { margin-left:auto; display:flex; gap:4px; }
.prodcol__body { padding: 11px; display: flex; flex-direction: column; gap: 9px; flex: 1; min-height: 84px; transition: background .12s; }
.prodcol__body.is-drop { background: var(--mint-wash); box-shadow: inset 0 0 0 2px var(--mint-deep); border-radius: 0 0 var(--radius) var(--radius); }
.prodcol__body.is-blocked.is-drop { background: var(--c-red-w); box-shadow: inset 0 0 0 2px var(--c-red); }
.prodcol__empty { font-family: var(--font-mono); font-size: 11px; color: var(--txt-3); text-align:center; padding: 16px 8px; border: 1px dashed var(--rule); border-radius: 7px; }
.prodcol__paused { font-family: var(--font-mono); font-size: 10px; letter-spacing:.06em; text-transform:uppercase; color: var(--txt-3); text-align:center; padding: 8px; }

.addprinter { width: 150px; flex: none; align-self: stretch; min-height: 120px; border: 1.5px dashed var(--rule-2); border-radius: var(--radius); display:flex; flex-direction: column; align-items:center; justify-content:center; gap: 8px; color: var(--txt-2); font-size: 12.5px; font-weight: 600; background: transparent; }
.addprinter:hover { border-color: var(--mint-deep); color: var(--mint-ink); background: var(--mint-wash); }
.addprinter svg { width: 20px; height: 20px; }

.jobcard { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 11px 12px; display: flex; flex-direction: column; gap: 9px; cursor: grab; box-shadow: var(--shadow-sm); position: relative; user-select: none; -webkit-user-select: none; }
.jobcard:active { cursor: grabbing; }
.jobcard.is-drag { opacity: .4; }
.jobcard.vip { border-left: 3px solid var(--mint); }
.jobcard__top { display:flex; align-items:center; gap: 8px; }
.jobcard__rail { width: 4px; height: 26px; border-radius: 3px; flex:none; }
.jobcard__no { font-family: var(--font-mono); font-weight: 600; font-size: 12px; }
.jobcard__vip { color: var(--mint-ink); font-size: 12px; }
.jobcard__units { margin-left:auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--txt-2); background: var(--paper); border:1px solid var(--rule); padding: 2px 7px; border-radius: 20px; white-space:nowrap; }
.jobcard__cust { font-weight: 600; font-size: 13px; line-height: 1.2; }
.jobcard__svc { display:flex; flex-wrap:wrap; gap: 5px; }
.svcchip { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.svcchip--print { background: var(--c-blue-w); color: #1d4dad; }
.svcchip--design { background: var(--c-violet-w); color: #5a37b3; }
.svcchip--press { background: var(--c-amber-w); color: #9a6300; }
.svcchip--gang { background: var(--c-teal-w); color: #07736a; }
.jobcard__due { font-family: var(--font-mono); font-size: 10px; color: var(--txt-3); display:flex; align-items:center; gap:6px; }
.jobcard__due .due-today { color: var(--c-red); font-weight: 600; }
.jobcard__foot { display:flex; align-items:center; gap: 7px; border-top: 1px solid var(--rule); padding-top: 9px; }
.hold, .cleared { display:inline-flex; align-items:center; gap: 5px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; }
.hold { background: var(--c-grey-w); color: var(--txt-2); }
.hold svg { width: 11px; height: 11px; }
.cleared { background: var(--mint-wash); color: var(--mint-ink); }
.cleared svg { width: 11px; height: 11px; }
.jobbtn { margin-left:auto; display:inline-flex; align-items:center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 6px 10px; border-radius: 7px; background: var(--ink); color:#fff; white-space:nowrap; }
.jobbtn:hover { background: var(--ink-2); }
.jobbtn svg { width: 12px; height: 12px; }
.jobbtn + .jobbtn { margin-left: 0; }
.jobbtn--ghost { background:#fff; border:1px solid var(--rule); color: var(--txt); }
.jobbtn--ghost:hover { background: var(--paper); border-color: var(--rule-2); }
.jobback { width: 26px; height: 26px; border-radius:6px; display:grid; place-items:center; color: var(--txt-3); border:1px solid var(--rule); background:#fff; flex:none; }
.jobback:hover { color: var(--txt); border-color: var(--rule-2); }
.jobback svg { width: 13px; height: 13px; }
.jobcard__art { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:10.5px; color:var(--txt-3); border-top:1px dashed var(--rule); padding-top:8px; }
.jobcard__art svg { width:13px; height:13px; flex:none; color:var(--txt-3); }
.jobcard__artlink { color: var(--mint-ink); font-weight:600; background:#f0fbf6; border:1px solid #cdeede; border-radius:6px; padding:1px 6px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.jobcard__artlink:hover { text-decoration:underline; }
.jobcard__art--empty { color: var(--txt-3); font-size: 11px; }
/* production — table view (grouped by stage) */
.prodtbl td { vertical-align: middle; }
.prodtbl .svccell { display:flex; gap: 5px; flex-wrap:wrap; }
.prodtbl .tvip { color: var(--mint-ink); margin-left: 6px; font-size: 11px; vertical-align: 1px; }
.prodtbl .tdue { font-family: var(--font-mono); font-size: 11.5px; color: var(--txt-2); white-space: nowrap; }
.prodtbl .tdue.is-today { color: var(--c-red); font-weight: 600; }
.prodtbl .jobbtn { margin-left: 0; }
.psel { font-family: var(--font-mono); font-size: 11.5px; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 7px; background:#fff; color: var(--txt); max-width: 158px; cursor: pointer; }
.psel:hover { border-color: var(--rule-2); }
.psel:focus { outline: none; border-color: var(--ink); }
.prodrow { cursor: pointer; transition: background .12s, box-shadow .12s; }
.prodrow.is-drag { opacity: .4; }
.prodrow.is-vip { box-shadow: inset 3px 0 0 var(--mint); }
.prodrow .tdrag { cursor: grab; text-align: center; }
.prodrow .grip { display:inline-block; width: 8px; height: 13px; vertical-align: middle; background-image: radial-gradient(currentColor 1px, transparent 1px); background-size: 4px 4px; color: var(--txt-3); opacity: .55; }
.prodrow:hover .grip { opacity: .9; }
.prodgrp { transition: background .12s, box-shadow .12s; }
.prodgrp.is-drop { background: var(--c-blue-w); box-shadow: inset 0 0 0 2px var(--c-blue); }
.prodgrp .grphead td { background: var(--paper-2); padding: 9px 14px; border-top: 1px solid var(--rule); }
.grphead__dot { display:inline-block; width: 9px; height: 9px; border-radius: 3px; vertical-align: middle; margin-right: 9px; }
.grphead__dot.badge--violet { background: var(--c-violet); }
.grphead__dot.badge--teal { background: var(--c-teal); }
.grphead__dot.badge--grey { background: var(--txt-3); }
.grphead__dot.badge--blue { background: var(--c-blue); }
.grphead__dot.badge--amber { background: var(--c-amber); }
.grphead__dot.badge--mint { background: var(--mint-ink); }
.grphead__t { font-weight: 650; font-size: 12.5px; letter-spacing: .01em; }
.grphead__c { display:inline-flex; align-items:center; justify-content:center; min-width: 19px; height: 19px; padding: 0 6px; margin-left: 9px; border-radius: 9px; background: #fff; border: 1px solid var(--rule); font-family: var(--font-mono); font-size: 11px; color: var(--txt-2); }
.grphead__note { float: right; font-family: var(--font-mono); font-size: 10.5px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .05em; }

/* Production focused single-stage lists (sidebar sub-items) */
.prodfocus__head { display:flex; align-items:center; gap: 10px; margin: 2px 0 14px; }
.prodfocus__head .grphead__dot { width: 12px; height: 12px; margin: 0; }
.prodfocus__ttl { display:flex; flex-direction: column; }
.prodfocus__head .lane__count { margin-left: 2px; }
.prodfocus__head .kick.right { margin-left: auto; }
.seg__n { display:inline-flex; align-items:center; justify-content:center; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 8px; background: rgba(0,0,0,.06); font-family: var(--font-mono); font-size: 10.5px; }
.prodtbl td.chk, .prodtbl th.chk { text-align: center; }
.prodtbl td.chk input, .prodtbl th.chk input { width: 16px; height: 16px; cursor: pointer; }
.grpempty td { padding: 14px; text-align: center; color: var(--txt-3); font-size: 12px; font-style: italic; }
/* printer sub-group inside the Printing stage */
.prodsub td { background: #fcfbf8; padding: 6px 14px 6px 30px; border-top: 1px solid var(--rule); }
.prodsub__t { font-family: var(--font-display); font-weight: 700; font-size: 11.5px; }
/* file thumbnails + hover preview */
.thumbs { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; max-width: 168px; }
.thumb { width: 30px; height: 30px; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; display: block; background: #fafafa; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb--ph { display: grid; place-items: center; color: var(--txt-3); cursor: zoom-in; }
.thumb--ph:hover { border-color: var(--mint-deep); color: var(--mint-ink); background: var(--mint-wash); }
.thumb--ph svg { width: 15px; height: 15px; }
.thumb-link { font-family: var(--font-mono); font-size: 10px; color: var(--mint-ink); background: #f0fbf6; border: 1px solid #cdeede; border-radius: 5px; padding: 2px 6px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-link:hover { text-decoration: underline; }
.art-preview { position: fixed; z-index: 200; background: #fff; border: 1px solid var(--rule-2); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; pointer-events: none; display: grid; place-items: center; }
.art-preview img { display: block; max-width: 320px; max-height: 320px; object-fit: contain; border-radius: 6px; }
.art-preview__spin { display: none; }
.art-preview.is-loading { width: 120px; height: 96px; }
.art-preview.is-loading img { display: none; }
.art-preview.is-loading .art-preview__spin { display: block; }
.riprow__alt { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.riprow__alt .jobbtn { margin-left: 0; }

.assignrow { display:flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--rule); padding-top: 9px; }
.assignrow__lbl { font-family: var(--font-mono); font-size: 9.5px; letter-spacing:.06em; text-transform:uppercase; color: var(--txt-3); }
.assignchips { display:flex; flex-wrap:wrap; gap: 5px; }
.assignchip { display:inline-flex; align-items:center; gap:5px; font-size: 11px; font-weight: 600; padding: 5px 9px; border-radius: 7px; border:1px solid var(--rule); background:#fff; }
.assignchip:hover { border-color: var(--ink); background: var(--paper); }
.assignchip .pdot { width:7px; height:7px; border-radius:50%; background: var(--c-green); flex:none; }
.assignchip:disabled { opacity: .45; cursor: not-allowed; }
.assignchip:disabled .pdot { background: var(--txt-3); }
@media (max-width: 860px) { .prod .stats { grid-template-columns: 1fr 1fr; } }

/* ===== Per-item fulfilment ===== */
.ff-list { display: flex; flex-direction: column; gap: 2px; }
.ff-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.ff-row:last-child { border-bottom: 0; }
.ff-row.is-done { opacity: .72; }
.ff-row .checkbox { cursor: pointer; flex: none; }
.ff-tick { width: 16px; height: 16px; flex: none; display: grid; place-items: center; color: var(--c-green); }
.ff-tick svg { width: 15px; height: 15px; }
.ff-thumb { width: 34px; height: 34px; flex: none; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: #fafafa; color: var(--txt-3); }
.ff-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ff-thumb svg { width: 15px; height: 15px; }
.ff-name { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ff-qty { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ff-qtyin { width: 56px; border: 1px solid var(--rule); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12px; }
.ff-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.ff-notify { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--txt-2); }
.ff-foot .btn { margin-left: auto; }

/* ===== Order prev/next nav ===== */
.ord-nav { display: flex; align-items: center; gap: 4px; }
.ord-nav .icon-btn { width: 30px; height: 30px; }
.ord-nav .icon-btn svg { width: 14px; height: 14px; }
.ord-nav__pos { font-family: var(--font-mono); font-size: 11px; color: var(--txt-3); min-width: 48px; text-align: center; white-space: nowrap; }
/* Prev/next order stepper in the topbar, around the order number. */
.topbar__ordnav { display: flex; align-items: center; gap: 4px; }
.topbar__ordnav h1 { margin: 0; }
.topbar__ordnav .icon-btn { width: 28px; height: 28px; }
.topbar__ordnav .icon-btn svg { width: 15px; height: 15px; }
.topbar__ordpos { font-family: var(--font-mono); font-size: 11px; color: var(--txt-3); white-space: nowrap; margin-left: 2px; }
.icon-btn:disabled { opacity: .4; cursor: default; }

/* ============================ PRINT-SHOP OUTREACH ============================ */
.outreach { display: grid; grid-template-columns: 300px 1fr; height: 100%; min-height: 0; }
.out-list { border-right: 1px solid var(--rule); background: var(--paper-2); display: flex; flex-direction: column; min-height: 0; }
.out-list__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.out-list__head .btn { margin-left: auto; }
.out-list__scroll { overflow-y: auto; flex: 1; }
.out-row { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.out-row:hover { background: #fbfaf7; }
.out-row.is-active { background: var(--mint-wash); box-shadow: inset 3px 0 0 var(--mint); }
.out-row__co { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.out-editor { overflow-y: auto; padding: 18px 20px 60px; }
.out-cols { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.out-detail { display: flex; flex-direction: column; gap: 16px; }
.out-email { min-width: 0; }
.out-field { display: block; margin-bottom: 10px; }
.out-field span { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-3); margin-bottom: 4px; }
.out-field .rm-in { width: 100%; }
.out-mockup { width: 100%; border: 1px solid var(--rule); border-radius: 8px; display: block; background: #151515; }
.out-drop { border: 1.5px dashed var(--rule-2); border-radius: 10px; padding: 22px 14px; text-align: center; font-size: 12.5px; color: var(--txt-2); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.out-drop:hover { border-color: var(--mint-deep); color: var(--mint-ink); background: var(--mint-wash); }
.out-frame { width: 100%; height: 620px; border: 1px solid var(--rule); border-radius: 8px; background: #050505; }
.out-html { width: 100%; height: 620px; border: 1px solid var(--rule); border-radius: 8px; padding: 12px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.5; resize: vertical; outline: none; }
.out-html:focus { border-color: var(--ink); }
@media (max-width: 1100px) { .out-cols { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .outreach { grid-template-columns: 1fr; } .out-list { max-height: 240px; } }
.out-import { padding: 10px 14px; border-bottom: 1px solid var(--rule); background: #fbfaf7; }
.out-import__ta { width: 100%; height: 120px; border: 1px solid var(--rule); border-radius: 8px; padding: 9px; font-family: var(--font-mono); font-size: 11px; line-height: 1.45; resize: vertical; outline: none; }
.out-import__ta:focus { border-color: var(--ink); }
/* checkerboard so transparent / white-on-transparent logos are visible */
.out-logo { margin-top: 8px; border: 1px solid var(--rule); border-radius: 8px; padding: 10px; display: grid; place-items: center;
  background-color: #fff;
  background-image: linear-gradient(45deg,#e6e3db 25%,transparent 25%),linear-gradient(-45deg,#e6e3db 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e6e3db 75%),linear-gradient(-45deg,transparent 75%,#e6e3db 75%);
  background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; }
.out-logo img { max-width: 100%; max-height: 90px; object-fit: contain; display: block; }
.out-logo-drop { margin-top: 8px; border: 1.5px dashed var(--rule-2); border-radius: 8px; padding: 12px 14px; text-align: center; font-size: 12px; color: var(--txt-2); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.out-logo-drop:hover { border-color: var(--mint-deep); color: var(--mint-ink); background: var(--mint-wash); }
.out-search { position: relative; display: flex; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--rule); }
.out-search svg { position: absolute; left: 24px; width: 14px; height: 14px; color: var(--txt-3); pointer-events: none; }
.out-search .rm-in { width: 100%; padding-left: 30px; }
.out-search__clear { position: absolute; right: 22px; border: 0; background: transparent; color: var(--txt-2); font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.out-search__clear:hover { color: var(--ink); }
.out-niches { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--rule); }
.out-niche { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--rule); background: #fff; color: var(--txt-2); border-radius: 999px; padding: 3px 9px; font-size: 11.5px; line-height: 1.4; cursor: pointer; text-transform: capitalize; }
.out-niche:hover { border-color: var(--ink); color: var(--ink); }
.out-niche.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.out-niche__n { font-size: 10px; opacity: .7; font-variant-numeric: tabular-nums; }
.out-niche.is-on .out-niche__n { opacity: .85; }
.out-input-row { display: flex; gap: 6px; align-items: center; }
.out-input-row .rm-in { flex: 1; min-width: 0; }
.out-open { flex: 0 0 auto; padding: 0 9px; }
.out-recolor { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 8px; }
.out-swatch { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--rule-2); cursor: pointer; padding: 0; }
.out-swatch:hover { outline: 2px solid var(--mint-deep); outline-offset: 1px; }
.out-colorpick { width: 26px; height: 22px; padding: 0; border: 1px solid var(--rule-2); border-radius: 4px; background: none; cursor: pointer; }
.out-products { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.out-fu { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); }
.out-fu:first-of-type { border-top: 0; }
.out-fu__dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--rule-2); box-shadow: 0 0 0 3px var(--mint-wash); }
.out-fu__dot.is-due { background: var(--c-amber); }
.out-fu__dot.is-done { background: var(--mint-deep); }
.out-track-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; flex: 0 0 auto; }
/* --- loading skeletons --- */
.skel { position: relative; overflow: hidden; background: var(--rule, #e7e4dc); border-radius: 6px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: skel-shimmer 1.3s ease-in-out infinite; }
@keyframes skel-shimmer { 100% { transform: translateX(100%); } }
.skel-list { padding: 8px 0; }
.skel-row { height: 46px; margin: 8px 0; border-radius: 8px; }
.skel-bar { height: 12px; border-radius: 4px; }
.skel-screen { padding: 24px 32px; }
.skel-screen .skel-head { width: 220px; height: 20px; margin-bottom: 22px; }
.out-tmpl { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 10px; }
.out-tmpl > summary { cursor: pointer; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--txt-2); list-style: none; user-select: none; }
.out-tmpl > summary::-webkit-details-marker { display: none; }
.out-tmpl > summary::before { content: "▸ "; color: var(--txt-3); }
.out-tmpl[open] > summary::before { content: "▾ "; }

/* ---- Order grouping (combine orders → tree) ---------------------------- */
.grp-toggle { display:inline-block; width:14px; cursor:pointer; color:var(--txt-3); font-size:11px; margin-right:2px; user-select:none; }
.grp-toggle:hover { color:var(--txt-2); }
.grp-childmark { display:inline-block; width:14px; color:var(--txt-3); font-size:12px; }
.grp-badge { display:inline-flex; align-items:center; gap:3px; margin-left:6px; padding:1px 6px; border-radius:20px;
  background:var(--mint-wash); color:var(--mint-ink); font-size:10px; font-weight:700; white-space:nowrap; vertical-align:middle; }
.grp-badge svg { width:11px; height:11px; }
.grp-childof { margin-left:6px; font-size:10px; color:var(--txt-3); }
/* Partner-shop (location) an order is handed to — tag on the orders list */
.loc-tag { display:inline-flex; align-items:center; gap:4px; margin-left:6px; padding:1px 8px; border-radius:20px;
  background:var(--c-violet, #7c5cff); color:#fff; font-size:10px; font-weight:700; white-space:nowrap; vertical-align:middle; cursor:pointer; }
.loc-tag svg { width:11px; height:11px; }
.loc-tag:hover { filter:brightness(1.08); }
.grp-ungroup { margin-left:6px; border:none; background:none; color:var(--txt-3); font-size:9.5px; letter-spacing:.05em;
  text-transform:uppercase; cursor:pointer; padding:0; text-decoration:underline; }
.grp-ungroup:hover { color:var(--c-red); }
.grp-ungroup:disabled { opacity:.5; cursor:default; }
.grp-addr { margin-top:2px; font-size:10.5px; color:var(--txt-2); }
.grp-addr-more { margin-top:1px; font-size:10px; color:var(--mint-ink); font-weight:600; }
tr.ord-row--parent > td { border-top:2px solid var(--rule-2); }
tr.ord-row--parent { background:var(--mint-wash); }
tr.ord-row--parent:hover { background:#daf7ec; }
tr.ord-row--child > td { background:var(--rule-2-wash, #f6f4ef); }
tr.ord-row--child > td:nth-child(3) { padding-left:18px; }

.grp-suggests { display:flex; flex-direction:column; gap:6px; margin:8px 0 2px; }
.grp-suggest { display:flex; align-items:center; gap:10px; padding:8px 12px; border:1px dashed var(--rule-2);
  border-radius:var(--radius); background:var(--mint-wash); font-size:12.5px; color:var(--txt-2); }
.grp-suggest svg { width:14px; height:14px; color:var(--mint-ink); flex:0 0 auto; }
.grp-suggest > span { flex:1; }
.grp-suggest b { color:var(--txt-1, #222); }

.combine-list { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.combine-row { display:flex; align-items:center; gap:10px; padding:9px 11px; border:1px solid var(--rule-2);
  border-radius:var(--radius); cursor:pointer; }
.combine-row.is-parent { border-color:var(--mint-ink); background:var(--mint-wash); }
.combine-row input { flex:0 0 auto; }
.combine-row__main { flex:1; min-width:0; }
.combine-row__meta { font-size:11px; color:var(--txt-3); white-space:nowrap; }
.form-err { color:#b32a1f; background:var(--c-red-w); border:1px solid #f3c5bf; border-radius:6px; padding:6px 9px; font-size:12px; }
.grp-childlink { display:inline-block; width:16px; text-align:center; color:var(--txt-3); font-size:13px; cursor:default; }
.combine-row__method { font-size:10px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--txt-2);
  background:var(--rule-2-wash, #f1efe9); border:1px solid var(--rule-2); border-radius:4px; padding:1px 6px; white-space:nowrap; }

/* ---- Multi-select status filter (popover) ------------------------------ */
.status-multi { position: relative; }
.status-multi__btn { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; font: inherit; font-size: 12px;
  color: var(--txt-1); background: var(--surface-2, #f4f4f1); border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; white-space: nowrap; }
.status-multi__btn svg { width: 14px; height: 14px; color: var(--txt-3); flex: none; }
.status-multi__chev { color: var(--txt-3); font-size: 10px; }
.status-multi.is-on .status-multi__btn { border-color: var(--mint-ink); color: var(--mint-ink); background: var(--mint-wash); }
.status-multi__pop { position: absolute; z-index: 40; top: calc(100% + 5px); left: 0; min-width: 210px; max-height: 340px; overflow-y: auto;
  background: var(--panel, #fff); border: 1px solid var(--rule-2); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.14); padding: 6px; }
.status-multi__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 6px; font-size: 10.5px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--txt-3); border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.status-multi__opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 12.5px; color: var(--txt-1); cursor: pointer; }
.status-multi__opt:hover { background: var(--rule-2-wash, #f4f2ec); }
.status-multi__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status-multi__code { flex: none; min-width: 40px; text-align: center; font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: var(--rule-2-wash, #f4f2ec); color: var(--txt-2); }
.combine-credit { display:flex; align-items:flex-start; gap:8px; margin-top:10px; padding:9px 11px; border:1px solid var(--mint-ink);
  background:var(--mint-wash); border-radius:var(--radius); font-size:12.5px; color:var(--txt-1); cursor:pointer; line-height:1.4; }
.combine-credit input { margin-top:2px; flex:0 0 auto; }

/* ---------------- Conversions & attribution ---------------- */
.cvr { padding: 16px 18px; gap: 0; overflow: auto; }
.cvr__bar { flex-wrap: wrap; gap: 10px; align-items: center; }
.cvr__bar .seg button.is-active { background: var(--ink); color: #fff; }
.cvr__note { font-size: 12px; margin: 10px 2px 4px; }
.cvr__kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.kpi { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; }
.kpi__k { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--txt-3); }
.kpi__v { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; margin-top: 4px; }
@media (max-width: 720px) { .cvr__kpis { grid-template-columns: repeat(2, 1fr); } }

.cvr__tbl td { vertical-align: middle; }
.cvr__row:hover { background: var(--paper-2); }
.cvr__row--muted td { color: var(--txt-2); }
.cvr__srccell { display: flex; align-items: center; }
.cvr__revbar { height: 5px; border-radius: 3px; background: var(--rule); margin-top: 6px; max-width: 320px; overflow: hidden; }
.cvr__revbar span { display: block; height: 100%; border-radius: 3px; min-width: 2px; }
.cvr__modal { max-width: 720px; }

.src-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.src-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }

/* order-detail attribution panel */
.attr-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; }
.attr-k { font-size: 11px; letter-spacing: .03em; text-transform: uppercase; color: var(--txt-3); margin-bottom: 6px; }
.attr-camp { font-size: 11px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.attr-credit { margin-top: 14px; }
.attr-creditbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--rule); }
.attr-creditbar span { display: block; height: 100%; }
.attr-creditkeys { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.attr-creditkey { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--txt-2); }
.attr-timeline { margin-top: 12px; border-left: 2px solid var(--rule); padding-left: 12px; display: flex; flex-direction: column; gap: 12px; }
.attr-tl { position: relative; display: flex; gap: 8px; }
.attr-tl__dot { position: absolute; left: -18px; top: 3px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--paper); }
.attr-tl__src { font-size: 12px; }
.attr-tl__meta { font-size: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }

/* conversions — grouped/expandable channel tree */
.cvr__twist { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-right: 6px; color: var(--txt-3); flex: none; }
.cvr__twist:hover { color: var(--txt); }
.cvr__twist svg { width: 14px; height: 14px; }
.cvr__row--sub { background: var(--paper-2); }
.cvr__row--sub:hover { background: var(--rule-2-wash, var(--paper-2)); }
.cvr__row--sub2 td { background: var(--paper); }
.cvr__srcname { font-size: 13px; font-weight: 600; }
.cvr__campname { font-size: 12px; font-family: var(--font-mono); color: var(--txt-2); word-break: break-word; }

/* conversions — business-health strip + LTV */
.cvr__health { margin: 12px 0 4px; }
.cvr__alert { display: flex; align-items: center; gap: 8px; background: #fff4e5; color: #8a4b00; border: 1px solid #f0c48a; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.cvr__alert svg { width: 15px; height: 15px; flex: none; }
.cvr__healthrow { display: flex; align-items: center; gap: 22px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 14px; }
.cvr__hstat .cvr__hk { font-size: 11px; letter-spacing: .03em; text-transform: uppercase; color: var(--txt-3); }
.cvr__hstat .cvr__hv { font-family: var(--font-display); font-weight: 800; font-size: 18px; display: flex; align-items: baseline; gap: 7px; }
.cvr__delta { font-size: 11px; font-weight: 700; font-family: var(--font-body); }
.cvr__delta.neg { color: #c0392b; }
.cvr__delta.pos { color: var(--mint-ink); }
.cvr__spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-left: auto; }
.cvr__bar2 { width: 8px; background: var(--mint, #8fd6bd); border-radius: 2px 2px 0 0; }
.cvr__neg { color: #c0392b; }

/* email funnel */
.efunnel { display: flex; flex-direction: column; gap: 10px; }
.efunnel__stage { display: flex; align-items: center; gap: 12px; }
.efunnel__bar { min-width: 34px; height: 30px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; padding: 0 10px; transition: width .3s; }
.efunnel__lbl { font-size: 12.5px; color: var(--txt-2); white-space: nowrap; }

/* ===========================================================
   Location (shop) shell — external shop user (e.g. DTF Studio)
   =========================================================== */
.loc-app { min-height: 100vh; background: var(--bg, #f6f5f1); }
.loc-header { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; background: var(--ink, #0B0C0E); color: #fff; }
.loc-header .right { display: flex; align-items: center; }
.loc-header__brand { display: flex; align-items: center; gap: 12px; }
.loc-header__brand .m { width: 40px; height: 40px; border-radius: 9px; background: var(--mint, #18f4af);
  color: #05130d; font-weight: 800; letter-spacing: .04em; display: grid; place-items: center; font-size: 15px; }
.loc-header__shop { font-weight: 700; font-size: 15px; }
.loc-header .dim { color: rgba(255,255,255,.6); }
.loc-header .btn { color: #fff; border-color: rgba(255,255,255,.25); }

.loc-wrap { max-width: 1100px; margin: 0 auto; padding: 22px; }
.loc-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.loc-toolbar__title { font-weight: 700; }
.loc-toolbar .right { display: flex; gap: 8px; align-items: center; }

.loc-table { width: 100%; border-collapse: collapse; background: var(--panel, #fff);
  border: 1px solid var(--rule, #e7e4dc); border-radius: 12px; overflow: hidden; }
.loc-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--txt-3, #8A8E94); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--rule, #e7e4dc); }
.loc-table td { padding: 11px 12px; border-bottom: 1px solid var(--rule-2, #f0ede6); font-size: 13.5px; vertical-align: middle; }
.loc-row:hover { background: var(--rule-2-wash, #faf9f5); }
.loc-table a { color: inherit; text-decoration: none; font-weight: 600; }
.loc-table a:hover { text-decoration: underline; }

.loc-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.loc-detail-head h2 { margin: 0; font-size: 20px; font-family: var(--font-mono, monospace); }
.loc-detail-head .right { margin-left: auto; }
.loc-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.loc-detail-grid .card:first-child { grid-column: 1 / -1; }
@media (max-width: 820px) { .loc-detail-grid { grid-template-columns: 1fr; } }

.loc-items { display: flex; flex-direction: column; gap: 10px; }
.loc-item { display: flex; gap: 12px; }
.loc-item__thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex: none;
  background: var(--rule-2, #f0ede6); display: grid; place-items: center; }
.loc-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.loc-item__title { font-weight: 600; font-size: 13.5px; }
.loc-ship { line-height: 1.5; font-size: 13.5px; }

.loc-label-actions { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.loc-label-links { display: inline-flex; gap: 8px; align-items: center; }

/* ============ Partner shop view (location-limited access) ============ */
/* The partner shell renders straight into #root (which is height:100vh with
   body overflow hidden), so it must be its OWN scroll region — otherwise tall
   pages (order detail) get clipped with no scrollbar and users have to zoom out. */
.shopapp { height: 100vh; height: 100dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--paper); display: flex; flex-direction: column; }
.shop-top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 22px; background: #000; color: #fff; position: sticky; top: 0; z-index: 20; }
.shop-brand { display: flex; align-items: center; gap: 12px; }
.shop-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 900; color: #00271a; font-size: 14px; }
.shop-title { font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1.1; }
.shop-sub { font-size: 11px; color: #9aa1a8; }
.shop-top__right { display: flex; align-items: center; gap: 12px; }
.shop-user { font-size: 12px; color: #c7ccd1; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-main { flex: 1; max-width: 1080px; width: 100%; margin: 0 auto; padding: 22px; }
/* Admin preview renders inside the normal shell body (.content has no padding),
   so give it the same breathing room + centred column as the partner shell. */
.shop-preview-wrap { max-width: 1080px; width: 100%; margin: 0 auto; padding: 22px 26px 40px; }
.shop-list, .shop-detail { animation: fade .2s ease; }

.shop-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.shop-tab { border: 1px solid var(--rule); background: var(--panel); color: var(--sub);
  padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.shop-tab:hover { color: var(--txt); }
.shop-tab.is-active { background: var(--mint); border-color: var(--mint); color: #00271a; }
.shop-tab .cnt { font-family: var(--font-mono); font-size: 11px; background: rgba(0,0,0,.12); padding: 0 6px; border-radius: 8px; }

.shop-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px;
  background: var(--mint-wash); border: 1px solid var(--mint); border-radius: var(--radius); margin-bottom: 12px; }

.shop-tbl { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.shop-tbl th { text-align: left; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sub); padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.shop-tbl td { padding: 12px; border-bottom: 1px solid var(--rule); font-size: 13px; vertical-align: middle; }
.shop-tbl tr:last-child td { border-bottom: none; }
.shop-row { cursor: pointer; }
.shop-row:hover td { background: var(--mint-wash); }
.shop-row .icon-btn, .shop-tbl svg { width: 16px; height: 16px; color: var(--sub); }
.shop-daterow td { background: var(--wash, #f6f8fa); padding: 7px 12px !important; }
.shop-daterow__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--sub); font-weight: 600; }
.shop-daterow__cnt { margin-left: 8px; font-size: 11px; color: var(--sub); }
.shop-daterow__m { margin-left: 10px; }
.shop-daterow:hover td { background: var(--wash, #f6f8fa); }
.shop-total-m { display: inline-flex; align-items: center; gap: 6px; }
/* Same-day cutoff flag (placed before 11:00, still to dispatch) */
.shop-row--cutoff td { background: #fff7ed; }
.shop-row--cutoff:hover td { background: #ffedd5; }
.shop-row--cutoff td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.badge--cutoff { background: #fff1dd; color: #b45309; border-color: transparent; margin-left: 4px; }
.badge--cutoff svg { width: 12px; height: 12px; }
.shop-track { font-size: 11px; margin-top: 4px; }
.shop-track a { color: var(--mint-ink); text-decoration: underline; }

.shop-flow { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; font-family: var(--font-mono); font-size: 11px; }
.shop-flow__step { color: #aeb4bb; letter-spacing: .04em; text-transform: uppercase; }
.shop-flow__step.is-on { font-weight: 700; }
.shop-flow__bar { width: 26px; height: 2px; background: #d6dade; border-radius: 2px; }
.shop-flow__bar.is-on { background: var(--mint); }

/* fixed layout so a long filename in a cell can't stretch the table past the
   screen; the middle (content) column takes the remaining width and wraps. */
.shop-items { width: 100%; border-collapse: collapse; table-layout: fixed; }
.shop-items td { padding: 8px 6px; border-bottom: 1px solid var(--rule); vertical-align: middle; overflow-wrap: anywhere; }
.shop-items td:first-child { width: 52px; }
.shop-items td:last-child { width: 92px; }
.shop-items tr:last-child td { border-bottom: none; }
.shop-item__title { font-weight: 600; word-break: break-word; }
.shop-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); background: #fff; }
.shop-thumb--ph { display: grid; place-items: center; color: var(--ph); }
.shop-thumb--ph svg { width: 20px; height: 20px; }

.shop-art-head { margin: 16px 0 2px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--sub); font-family: var(--font-mono); }
.shop-prop--pr { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.shop-pr-dl { text-decoration: none; }
.handover { display: inline-flex; align-items: center; gap: 6px; }
.handover svg { width: 15px; height: 15px; color: var(--sub); }
.rm-in--sm { padding: 4px 8px; font-size: 12px; }

/* UV / DTF print-type tags */
.kind-tag { display: inline-block; font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .05em;
  line-height: 1.5; padding: 0 5px; border-radius: 4px; vertical-align: middle; margin-right: 4px; }
.kind-tag--uv { background: var(--c-violet); color: #fff; }
.kind-tag--dtf { background: var(--mint-wash); color: var(--mint-ink); border: 1px solid var(--mint); }
/* Shipping service badge — shop double-checks this before making a label. */
.svc-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; vertical-align: middle; }
.svc--sd { background: #fff4d6; color: #8a6d1a; border-color: #e7c86a; }   /* Special Delivery — stands out */
.svc--24 { background: #e3efff; color: #1f5fae; }
.svc--48 { background: #eef1f4; color: #5b6673; }
.svc--collect { background: #e6fbf3; color: #0f7a52; }
.svc--intl { background: #fdecec; color: #c0392b; }
.svc--std { background: #eef1f4; color: #5b6673; }

/* clickable line-item properties (artwork / file / url) */
.shop-prop { display: flex; gap: 8px; align-items: baseline; font-size: 12px; margin-top: 3px; }
.shop-prop__k { flex: none; color: var(--sub); min-width: 96px; font-size: 11px; }
.shop-prop__v { min-width: 0; word-break: break-word; }
.shop-fileprop { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.shop-dl { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--mint-ink); white-space: nowrap; }
.shop-dl svg { width: 13px; height: 13px; }
.shop-propimg { display: inline-block; }
.shop-propimg img { max-width: 120px; max-height: 90px; border-radius: 6px; border: 1px solid var(--rule); background: #fff; }

/* Create-label modal — clean labelled form (replaces cramped fixed-width inputs) */
.shop-lbl { display: flex; flex-direction: column; gap: 14px; }
.shop-lbl__all { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px;
  background: var(--mint-wash); border: 1px solid var(--mint); border-radius: var(--radius); }
.shop-lbl__all .shop-lin { flex: 1; min-width: 120px; }
.shop-lbl__row { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; }
.shop-lbl__ord { font-weight: 700; margin-bottom: 8px; }
.shop-lbl__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.shop-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.shop-field > span { font-size: 11px; color: var(--sub); font-weight: 600; }
.shop-lin { width: 100%; border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; font-size: 13px;
  background: var(--panel); color: var(--txt); font-family: inherit; }
.shop-lin:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-wash); }
select.shop-lin { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6673' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

@media (max-width: 720px) {
  .shop-main { padding: 14px; }
  .shop-top { padding: 10px 14px; }
  .shop-user { display: none; }
}

/* --- Stock (internal blank-garment inventory) — editable table cells --- */
.stk-tbl tbody tr { cursor: default; }
.stk-tbl tbody td { vertical-align: middle; }
.stk-in {
  width: 100%; border: 1px solid transparent; background: transparent;
  border-radius: 6px; padding: 4px 6px; font-size: 13px; color: inherit;
  font-family: inherit; box-sizing: border-box; transition: border-color .1s, background .1s;
}
.stk-in:hover { border-color: var(--rule); }
.stk-in:focus { outline: none; border-color: var(--mint); background: #fff; box-shadow: 0 0 0 2px var(--mint-wash); }
.stk-in::placeholder { color: #b7b2a6; }
.stk-in.stk-qty { width: 48px; text-align: center; -moz-appearance: textfield; }
.stk-in.stk-qty::-webkit-outer-spin-button,
.stk-in.stk-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn.stk-step { min-width: 26px; padding: 2px 0; text-align: center; font-weight: 700; line-height: 1; }

/* Per-line stock availability on the order detail */
.li__stock { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; font-size: 11px; }
.li__stock--load { color: #8a857a; }
.li__stock-link { font-family: var(--font-mono); font-size: 10.5px; color: #6b6559; }
.li__stock-note { color: #b45309; }

/* SKU picker dropdown (grouped by product) */
.stk-skus {
  position: absolute; z-index: 40; top: 100%; left: 0; margin-top: 3px;
  min-width: 340px; max-width: 460px; max-height: 340px; overflow: auto;
  background: #fff; border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14); padding: 4px;
}
.stk-skus__hint, .stk-skus__none { padding: 8px 10px; font-size: 12px; color: #8a857a; }
.stk-skus__none { text-align: center; }
.stk-skus__grp:not(:first-child) { border-top: 1px solid var(--rule); margin-top: 2px; padding-top: 2px; }
.stk-skus__ghead { padding: 6px 10px 3px; font-size: 11px; font-weight: 700; color: var(--mint-ink); text-transform: none; position: sticky; top: 0; background: #fff; }
.stk-skus__row { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.stk-skus__row:hover { background: var(--mint-wash); }
.stk-skus__opt { flex: 1; min-width: 0; }
.stk-skus__sku { font-family: var(--font-mono); font-size: 11px; color: #6b6559; white-space: nowrap; }
.stk-skus__stk { font-family: var(--font-mono); font-size: 11px; min-width: 34px; text-align: right; color: #057a54; }
.stk-skus__unlink { color: #b91c1c; border-bottom: 1px solid var(--rule); border-radius: 0; margin-bottom: 2px; }

/* Notification centre (top-bar bell) */
.notif__panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: 340px; max-width: 88vw; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.notif__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--rule); font-size: 13px; position: sticky; top: 0; background: #fff; }
.notif__list { padding: 4px; }
.notif__empty { padding: 22px 14px; text-align: center; color: #8a857a; font-size: 13px; }
.notif__item { display: flex; gap: 10px; padding: 9px 10px; border-radius: 8px; }
.notif__item.is-link { cursor: pointer; }
.notif__item.is-link:hover { background: var(--mint-wash); }
.notif__item.is-unread { background: #f4fbf8; }
.notif__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.notif__title { font-size: 13px; font-weight: 600; color: #1b1b1b; }
.notif__body { font-size: 12px; color: #666; margin-top: 1px; }
.notif__time { font-size: 11px; color: #a8a29a; margin-top: 3px; }
.notif__arrow { color: #b7b2a6; font-size: 12px; align-self: center; }
/* Stacked notification cards: each item is a raised card, layered with a slight
   overlap so the panel reads as a stack rather than a flat list. */
.notif__list { padding: 10px 10px 12px; display: flex; flex-direction: column; }
.notif__item { position: relative; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 11px 12px; box-shadow: 0 2px 6px rgba(0,0,0,.06); margin-top: -6px; transition: transform .12s ease, box-shadow .12s ease; }
.notif__item:first-child { margin-top: 0; }
.notif__item:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.12); z-index: 2; }
.notif__item.is-unread { background: #f4fbf8; border-color: color-mix(in srgb, var(--c-mint, #18f4af) 45%, var(--rule)); }
.notif__item.is-unread::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--c-mint, #18f4af); }
.notif__acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.notif__act { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--rule); background: #fff; color: #333; cursor: pointer; }
.notif__act svg { width: 13px; height: 13px; }
.notif__act:hover { background: var(--mint-wash); border-color: color-mix(in srgb, var(--c-mint, #18f4af) 50%, var(--rule)); }
.notif__act--reprint { border-color: color-mix(in srgb, var(--c-mint, #18f4af) 55%, var(--rule)); color: #0b6b4f; }
.notif__act--reprint:hover { background: var(--c-mint, #18f4af); color: #08281d; }

/* --- Customer artwork library modal (~70% fullscreen) --------------------- */
.modal.lib { max-width: 74vw; width: 74vw; height: 84vh; max-height: 84vh; }
.lib__body { flex: 1; min-height: 0; display: flex; }
.lib__side { width: 216px; flex: none; border-right: 1px solid var(--rule); padding: 12px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.lib__side-h { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--txt-3); margin: 12px 6px 4px; }
.lib__folder { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--txt-2); position: relative; }
.lib__folder:hover { background: var(--mint-wash); }
.lib__folder.is-sel { background: var(--mint-wash); color: var(--mint-ink); font-weight: 600; }
.lib__folder svg { width: 15px; height: 15px; flex: none; }
.lib__fname, .lib__folder span:not(.lib__n):not(.lib__fx) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib__n { margin-left: auto; font-size: 11px; color: var(--txt-3); }
.lib__fx { display: none; margin-left: auto; gap: 2px; }
.lib__folder:hover .lib__fx { display: flex; }
.lib__folder:hover .lib__n { display: none; }
.icon-btn--xs { width: 22px; height: 22px; padding: 0; }
.icon-btn--xs svg { width: 13px; height: 13px; }
.lib__main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.lib__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.lib__search { flex: 1; display: flex; align-items: center; gap: 7px; border: 1px solid var(--rule); border-radius: 9px; padding: 7px 11px; }
.lib__search svg { width: 15px; height: 15px; color: var(--txt-3); flex: none; }
.lib__search input { border: none; outline: none; width: 100%; font-size: 13px; background: transparent; }
.lib__sort { border: 1px solid var(--rule); border-radius: 8px; padding: 7px 9px; font-size: 12.5px; background: #fff; }
.lib__err { margin: 10px 16px 0; padding: 8px 11px; border-radius: 8px; background: var(--c-red-w, #fdecec); color: var(--c-red, #b91c1c); font-size: 12.5px; }
.lib__busy { margin: 10px 16px 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt-2); }
.lib__grid { flex: 1; overflow-y: auto; padding: 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; align-content: start; }
.lib-card { border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.lib-card.is-sel { border-color: var(--mint-ink); box-shadow: 0 0 0 2px var(--mint-wash); }
.lib-card__thumb { position: relative; height: 168px; overflow: hidden; cursor: pointer;
  background-color: #eceff2;
  background-image: linear-gradient(45deg,#e0e4e8 25%,transparent 25%),linear-gradient(-45deg,#e0e4e8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e0e4e8 75%),linear-gradient(-45deg,transparent 75%,#e0e4e8 75%);
  background-size: 18px 18px; background-position: 0 0,0 9px,9px -9px,-9px 0; }
.lib-card__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.lib-card__ck { position: absolute; top: 7px; left: 7px; width: 17px; height: 17px; accent-color: var(--mint-ink); z-index: 2; }
.lib-card__more { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: none; border-radius: 50%; background: rgba(20,22,26,.55); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.lib-card__more:hover { background: rgba(20,22,26,.8); }
.lib-card__more svg { width: 15px; height: 15px; }
.lib-menu-scrim { position: fixed; inset: 0; z-index: 1290; }
.lib-menu { position: fixed; z-index: 1300; background: #fff; border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.18)); padding: 5px; min-width: 200px; display: flex; flex-direction: column; }
.lib-menu button, .lib-menu a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: none; background: none; text-align: left; font-size: 13px; color: var(--txt); border-radius: 7px; cursor: pointer; text-decoration: none; }
.lib-menu button:hover, .lib-menu a:hover { background: var(--mint-wash); }
.lib-menu svg { width: 15px; height: 15px; color: var(--txt-2); }
.lib-menu .is-danger { color: var(--c-red, #b91c1c); border-top: 1px solid var(--rule); border-radius: 0 0 7px 7px; margin-top: 3px; }
.lib-menu .is-danger svg { color: var(--c-red, #b91c1c); }
.lib-card__name { font-size: 12.5px; font-weight: 600; padding: 8px 9px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-card__meta { font-size: 11px; color: var(--txt-3); padding: 2px 9px 0; }
.lib-card__tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 7px 9px 9px; }
.lib-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; background: var(--mint-wash); color: var(--mint-ink); border: none; padding: 2px 6px; border-radius: 5px; }
.lib-tag button { border: none; background: none; color: inherit; cursor: pointer; font-size: 12px; line-height: 1; padding: 0; }
.lib-tag--add { background: #f2f1ec; color: var(--txt-3); cursor: pointer; }
.lib-tag--add svg { width: 10px; height: 10px; }
.lib-pick { border: 1px solid var(--rule); border-radius: 10px; max-height: 46vh; overflow-y: auto; }
.lib-pick__row { display: flex; align-items: center; gap: 9px; padding: 10px 12px; cursor: pointer; font-size: 13.5px; border: 2px solid transparent; border-radius: 8px; }
.lib-pick__row:hover { background: var(--mint-wash); }
.lib-pick__row.is-sel { border-color: var(--mint-ink); }
.lib-pick__row svg { width: 16px; height: 16px; color: var(--txt-2); flex: none; }
@media (max-width: 900px) { .modal.lib { width: 96vw; max-width: 96vw; height: 90vh; } .lib__side { width: 150px; } }
/* Centered ~60% preview panel */
.lib-lightbox { position: fixed; inset: 0; z-index: 1400; background: rgba(10,11,13,.6); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lib-lightbox__panel { position: relative; width: 60vw; height: 74vh; max-width: 60vw; background: #fff; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.lib-lightbox__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background-color: #eceff2;
  background-image: linear-gradient(45deg,#dfe3e8 25%,transparent 25%),linear-gradient(-45deg,#dfe3e8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dfe3e8 75%),linear-gradient(-45deg,transparent 75%,#dfe3e8 75%);
  background-size: 22px 22px; background-position: 0 0,0 11px,11px -11px,-11px 0; }
.lib-lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lib-lightbox__stage.is-dark { background-color: #1b1d20;
  background-image: linear-gradient(45deg,#33363b 25%,transparent 25%),linear-gradient(-45deg,#33363b 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#33363b 75%),linear-gradient(-45deg,transparent 75%,#33363b 75%); }
.lib-lightbox__x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(20,22,26,.55); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.lib-lightbox__x:hover { background: rgba(20,22,26,.8); }
.lib-lightbox__x svg { width: 17px; height: 17px; }
.lib-lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--rule); }
.lib-lightbox__name { font-size: 13px; color: var(--txt-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-lightbox__edit { padding: 12px 16px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.lib-lightbox__row { display: flex; align-items: center; gap: 10px; }
.lib-lightbox__name-in { flex: 1; min-width: 0; border: 1px solid var(--rule); border-radius: 8px; padding: 8px 11px; font-size: 14px; font-weight: 600; outline: none; }
.lib-lightbox__name-in:focus { border-color: var(--mint-ink); }
.lib-lightbox__tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lib-lightbox__tag-in { border: 1px dashed var(--rule); border-radius: 6px; padding: 5px 9px; font-size: 12px; min-width: 96px; outline: none; }
.lib-lightbox__tag-in:focus { border-color: var(--mint-ink); border-style: solid; }
@media (max-width: 900px) { .lib-lightbox__panel { width: 94vw; max-width: 94vw; height: 82vh; } }
/* Shopify-style tag editor popover */
.lib-te { position: fixed; z-index: 1310; width: 268px; background: #fff; border: 1px solid var(--rule); border-radius: 11px; box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.18)); display: flex; flex-direction: column; overflow: hidden; }
.lib-te__chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 10px 8px; border-bottom: 1px solid var(--rule); }
.lib-te__search { display: flex; align-items: center; gap: 7px; padding: 9px 11px; border-bottom: 1px solid var(--rule); }
.lib-te__search svg { width: 15px; height: 15px; color: var(--txt-3); flex: none; }
.lib-te__search input { border: none; outline: none; width: 100%; font-size: 13px; background: transparent; }
.lib-te__list { max-height: 240px; overflow-y: auto; padding: 5px; }
.lib-te__h { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--txt-3); padding: 8px 8px 4px; }
.lib-te__row { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.lib-te__row:hover { background: var(--mint-wash); }
.lib-te__row input { accent-color: var(--mint-ink); width: 15px; height: 15px; }
.lib-te__add { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; border: none; background: none; text-align: left; font-size: 13px; font-weight: 600; color: var(--mint-ink); border-radius: 7px; cursor: pointer; }
.lib-te__add:hover { background: var(--mint-wash); }
.lib-te__add svg { width: 14px; height: 14px; }
.lib-te__empty { font-size: 12px; color: var(--txt-3); padding: 8px; }
.lib-te__foot { padding: 8px 10px; border-top: 1px solid var(--rule); display: flex; justify-content: flex-end; }

/* ---- Analytics Dashboard ------------------------------------------------- */
.an-board { padding-bottom: 40px; }
.an-bar { gap: 10px; flex-wrap: wrap; }
.an-nav { display: flex; align-items: center; gap: 4px; }
.an-nav .icon-btn { width: 28px; height: 28px; border: 1px solid var(--rule); border-radius: 7px; }
.an-nav__label { font-size: 12.5px; font-weight: 600; color: var(--txt-2); min-width: 160px; text-align: center; white-space: nowrap; }

/* KPI cards grid */
.an-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 4px; }
@media (max-width: 1100px) { .an-kpis { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .an-kpis { grid-template-columns: repeat(2, 1fr); } }

.an-kpi {
  background: var(--paper-2, #f8f9fa); border: 1px solid var(--rule);
  border-radius: 12px; padding: 12px 14px 10px; text-align: left;
  cursor: default; transition: border-color .12s, box-shadow .12s;
  position: relative; overflow: hidden;
}
.an-kpi[onclick], .an-kpi[class*="is-active"] { cursor: pointer; }
.an-kpi:hover { border-color: color-mix(in srgb, var(--accent, #18f4af) 50%, var(--rule)); }
.an-kpi.is-active { border-color: var(--accent, #18f4af); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #18f4af) 18%, transparent); background: color-mix(in srgb, var(--accent, #18f4af) 5%, var(--paper-2)); }

.an-kpi__label { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--txt-3); margin-bottom: 3px; }
.an-kpi__val   { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; line-height: 1.1; color: var(--txt); }
.an-kpi__delta { display: flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; margin-top: 4px; }
.an-kpi__arrow { font-size: 10px; }
.an-kpi__prev  { font-size: 11px; color: var(--txt-3); font-weight: 400; margin-left: 2px; }
.an-kpi__bar   { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--rule); }
.an-kpi__bar span { display: block; height: 100%; background: var(--accent, #18f4af); opacity: .6; }

/* Line chart */
.an-card-chart { margin-top: 14px; overflow: visible; }
.an-chart-wrap { position: relative; padding: 8px 0 0; }
.an-chart-svg  { width: 100%; height: auto; display: block; }
.an-chart-svg--sm { max-height: 140px; }
.an-chart--empty { padding: 32px; text-align: center; color: var(--txt-3); font-size: 13px; }

/* Chart tooltip */
.an-tooltip {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  background: var(--panel, #fff); border: 1px solid var(--rule);
  border-radius: 10px; padding: 9px 12px; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.13); font-size: 12.5px; z-index: 10;
  white-space: nowrap;
}
.an-tooltip__label { font-weight: 700; font-size: 12px; margin-bottom: 6px; color: var(--txt-2); }
.an-tooltip__row   { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.an-tooltip__dot   { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.an-tooltip__name  { flex: 1; color: var(--txt-2); }
.an-tooltip__val   { font-weight: 700; font-family: var(--font-mono); margin-left: 12px; }

/* Chart legend toggles */
.an-legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 12px; }
.an-legend__item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--txt-2);
  padding: 4px 10px; border: 1px solid var(--rule);
  border-radius: 20px; background: var(--paper-2); cursor: pointer;
  transition: border-color .1s, background .1s;
}
.an-legend__item.is-active { background: var(--paper); border-color: var(--txt-2); color: var(--txt); }
.an-legend__item:hover { border-color: var(--txt-3); }
.an-legend__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* Customer growth + retention row */
.an-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 720px) { .an-row2 { grid-template-columns: 1fr; } }
.an-card-cust, .an-card-ret { min-height: 180px; }

/* Retention mini-stats */
.an-ret { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; text-align: center; }
.an-ret__big    { font-family: var(--font-display); font-weight: 800; font-size: 36px; letter-spacing: -.02em; }
.an-ret__label  { font-size: 12px; color: var(--txt-2); }
.an-ret__delta  { font-size: 12px; font-weight: 700; }
.an-ret__breakdown { display: flex; gap: 32px; margin-top: 10px; }
.an-ret__num    { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.an-ret__sublabel { font-size: 11px; color: var(--txt-3); margin-top: 2px; }

/* AI insights panel */
.an-ai { margin-top: 14px; }
.an-ai .btn svg { width: 14px; height: 14px; }
.an-ai--open { }
.an-ai__loading { display: flex; align-items: center; gap: 8px; color: var(--txt-2); font-size: 13px; padding: 6px 0; }
.an-ai__err     { color: #c0392b; font-size: 13px; padding: 6px 0; }
.an-ai__text p  { font-size: 13.5px; line-height: 1.6; margin: 0 0 8px; color: var(--txt); }
.an-ai__text p:last-child { margin-bottom: 0; }
.an-ai__ts      { font-size: 11px; margin-top: 8px; }

/* Spam exclusion */
.an-spam { position: relative; }
.an-spam__panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30;
  width: 360px; max-width: 92vw;
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
}
.an-spam__list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.an-spam__row  { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; padding: 4px 0; }
.an-spam__add  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-spam__add .input--sm { flex: 1; min-width: 120px; }
.cnt--sm { font-size: 10px; background: var(--mint, #18f4af); color: #08281d; border-radius: 9px; padding: 1px 5px; }

/* Analytics custom date range */
.an-custom-range { display:flex; align-items:center; gap:6px; }
.an-date-in { width:136px; padding:6px 9px; font-size:13px; }
.an-kpi--btn { cursor:pointer; }
.an-kpi--btn:hover { border-color:color-mix(in srgb, var(--accent) 60%, var(--rule)); }
.an-kpi__accent { position:absolute; bottom:0; left:0; right:0; height:3px; opacity:0.5; }
