/* Deli Smalls back office, Beta A "The Shopfront" */
:root {
  --teal: #009D8E;
  --teal-ink: #00756A;
  --teal-deep: #00695F;
  --teal-side: #007A6E;
  --teal-soft: #D5EFEB;
  --mustard: #E9A825;
  --mustard-ink: #8A5F00;
  --mustard-soft: #FBEBC4;
  --cream: #F3F1E8;
  --paper: #FBFAF4;
  --ink: #1A1A18;
  --ink-2: #3B3A35;
  --muted: #625F55;
  --line: #E4DFCD;
  --line-2: #D6D0BA;
  --terra: #C9532F;
  --terra-soft: #F8DDD2;
  --red: #B3261E;
  --red-soft: #F9DEDB;
  --green: #2F7D32;
  --green-soft: #DCEFD9;
  --white: #fff;
  --radius: 20px;
  --shadow: 0 1px 0 rgba(26,26,24,.04), 0 10px 30px -18px rgba(70,55,20,.35);
  --hard: 3px 3px 0 var(--ink);
  --display: 'Archivo Black', 'Arial Black', sans-serif;
  --body: 'Space Grotesk', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); font-size: 15px; line-height: 1.45;
  background-color: var(--cream);
  background-image: radial-gradient(rgba(120,100,40,.07) 1px, transparent 1px);
  background-size: 18px 18px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
a { color: var(--teal-ink); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 2px solid var(--ink); background: var(--white); color: var(--ink);
  font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s; white-space: nowrap; text-decoration: none;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: var(--hard); }
.btn:active { transform: translate(1px,1px); box-shadow: none; }
.btn.primary { background: var(--mustard); }
.btn.teal { background: var(--teal-ink); color: #fff; border-color: var(--teal-deep); }
.btn.teal:hover { box-shadow: 3px 3px 0 var(--teal-deep); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.05); box-shadow: none; transform: none; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.xs { padding: 3px 9px; font-size: 12px; border-width: 1.5px; }
.btn.icon { padding: 7px; width: 36px; height: 36px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--teal-ink); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Sign in ---------- */
.signin { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.signin-art { position: relative; background: var(--teal) url(../../assets/Deli-Small-Shop-Front-2.jpg) center 70%/cover; min-height: 100vh; }
.signin-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,40,36,.75)); }
.signin-art .quote { position: absolute; left: 40px; right: 40px; bottom: 40px; z-index: 1; color: #fff; }
.signin-art .quote b { font-family: var(--display); font-size: 40px; line-height: 1.02; display: block; letter-spacing: -.01em; }
.signin-art .quote span { opacity: .9; font-size: 15px; }
.signin-art .addr { position: absolute; top: 24px; left: 24px; z-index: 1; background: rgba(255,255,255,.92); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.signin-art .addr i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.signin-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.signin-card { width: 100%; max-width: 400px; }
.signin-card .logo { width: 132px; margin: 0 auto 14px; }
.signin-card h1 { font-family: var(--display); font-size: 30px; text-align: center; line-height: 1.1; }
.signin-card .sub { text-align: center; color: var(--muted); margin: 8px 0 26px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .lbl { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; border: 2px solid var(--line-2); background: var(--white); border-radius: 14px; padding: 10px 13px; outline: none; transition: border-color .12s;
}
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,157,142,.15); }
.signin-card .btn { width: 100%; padding: 13px; font-size: 15px; }
.code-boxes { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.code-boxes input { width: 46px; height: 56px; text-align: center; font-size: 24px; font-weight: 700; border: 2px solid var(--line-2); border-radius: 14px; background: #fff; }
.code-boxes input:focus { border-color: var(--teal); outline: none; }
.fine { font-size: 12px; color: var(--muted); text-align: center; margin-top: 16px; }
.beta-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--mustard-soft); color: var(--mustard-ink); border: 1.5px dashed var(--mustard); border-radius: 999px; padding: 3px 10px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0,1fr); min-height: 100vh; }
.sidebar {
  background: var(--teal-side); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px 16px; overflow-y: auto; z-index: 30;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 16px 16px;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 20px; text-decoration: none; color: #fff; }
.side-brand img { width: 56px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.15)); }
.side-brand b { font-family: var(--display); font-size: 19px; line-height: 1; display: block; }
.side-brand small { font-size: 12px; opacity: .85; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 14px; border: 0; background: transparent; color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; text-align: left;
}
.nav button svg { width: 20px; height: 20px; flex: none; }
.nav button:hover { background: rgba(255,255,255,.12); }
.nav button.on { background: var(--mustard); color: var(--ink); box-shadow: 3px 3px 0 rgba(0,0,0,.25); }
.nav .count { margin-left: auto; background: rgba(255,255,255,.2); color: #fff; font-size: 12px; border-radius: 999px; padding: 1px 8px; }
.nav button.on .count { background: var(--ink); color: #fff; }
.side-foot { margin-top: auto; padding-top: 20px; }
.side-site { display: block; background: rgba(0,0,0,.18); border-radius: 16px; padding: 12px 14px; font-size: 13px; margin-bottom: 12px; }
.side-site b { display: block; font-size: 14px; }
.side-site .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7CE3A0; margin-right: 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; }
.me img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 2px solid var(--mustard); }
.me b { display: block; font-size: 14px; }
.me small { opacity: .85; font-size: 12px; }
.me .btn { margin-left: auto; color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }
.me .btn:hover { box-shadow: none; background: rgba(255,255,255,.12); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 32px; position: sticky; top: 0; z-index: 20; background: rgba(243,241,232,.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .crumb { font-size: 13px; color: var(--muted); }
.topbar .crumb b { color: var(--ink); }
.topbar .sp { flex: 1; }
.topbar .menu { display: none; }
.search { position: relative; width: 260px; }
.search input { padding-left: 36px; border-radius: 999px; padding-top: 8px; padding-bottom: 8px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.view { padding: 28px 32px 60px; max-width: 1360px; width: 100%; }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-family: var(--display); font-size: 36px; line-height: 1.02; letter-spacing: -.01em; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-ink); }

/* ---------- Cards and grids ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card.pad0 { padding: 0; overflow: hidden; }
.card h2, .h2 { font-family: var(--display); font-size: 19px; line-height: 1.15; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .sp { flex: 1; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; width: 100%; }
.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); }
.mt { margin-top: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row .sp { flex: 1; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }

/* KPI */
.kpi { position: relative; overflow: hidden; }
.kpi .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .val { font-family: var(--display); font-size: 32px; line-height: 1.05; margin: 8px 0 6px; letter-spacing: -.01em; }
.kpi .delta { font-size: 13px; font-weight: 700; }
.up { color: var(--green); }
.down { color: var(--red); }
.kpi.hero { background: var(--mustard); border-color: var(--ink); border-width: 2px; box-shadow: var(--hard); }
.kpi.hero .lbl, .kpi.hero .delta { color: var(--ink); }
.kpi .spark { margin-top: 10px; height: 34px; width: 100%; }
.kpi .peek { position: absolute; right: -14px; bottom: -18px; width: 108px; opacity: .95; pointer-events: none; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--cream); color: var(--ink-2); white-space: nowrap; }
.pill.teal { background: var(--teal-soft); color: var(--teal-deep); }
.pill.mustard { background: var(--mustard-soft); color: var(--mustard-ink); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.terra { background: var(--terra-soft); color: #8E3517; }
.pill.ink { background: var(--ink); color: #fff; }
.pill.dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.thumb { width: 44px; height: 44px; border-radius: 12px; background: var(--cream); object-fit: contain; flex: none; border: 1px solid var(--line); }
.thumb.lg { width: 64px; height: 64px; border-radius: 16px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--ink); background: var(--mustard-soft); border: 2px solid var(--mustard); }
.avatar.t { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-deep); }
.li-main { min-width: 0; flex: 1; }
.li-main b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-main span { font-size: 13px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--paper); }
table.t td.num, table.t th.num { text-align: right; }

/* Tabs */
.tabs { display: inline-flex; gap: 4px; background: var(--white); border: 1px solid var(--line); padding: 4px; border-radius: 999px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.tabs button.on { background: var(--ink); color: #fff; }
.tabs button:not(.on):hover { background: var(--cream); }

/* Progress */
.bar { height: 10px; background: var(--cream); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 999px; transition: width .3s; }
.bar.m i { background: var(--mustard); }

/* Empty */
.empty { text-align: center; padding: 26px 16px; color: var(--muted); }
.empty img { width: 92px; margin: 0 auto 10px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }

/* ---------- Dashboard ---------- */
.welcome { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: center; background: var(--white); border: 2px solid var(--ink); border-radius: 26px; padding: 24px 28px; box-shadow: var(--hard); margin-bottom: 20px; position: relative; overflow: hidden; }
.welcome h1 { font-family: var(--display); font-size: 34px; line-height: 1.05; }
.welcome p { margin: 8px 0 14px; color: var(--ink-2); max-width: 58ch; }
.welcome .board { width: 330px; margin: -10px -10px -24px 0; }
.next-market { display: flex; gap: 16px; align-items: stretch; }
.datechip { flex: none; width: 74px; border-radius: 16px; border: 2px solid var(--ink); text-align: center; overflow: hidden; background: #fff; align-self: flex-start; }
.datechip span { display: block; background: var(--teal-ink); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 0; text-transform: uppercase; letter-spacing: .06em; }
.datechip b { display: block; font-family: var(--display); font-size: 30px; line-height: 1.2; }
.datechip small { display: block; font-size: 12px; font-weight: 700; padding-bottom: 4px; }
.pack-mini { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pack-mini .pm { position: relative; }
.pack-mini img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: var(--cream); border: 1px solid var(--line); }
.pack-mini .pm.ok::after { content: '✓'; position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%; background: var(--teal-ink); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 700; border: 2px solid #fff; }
.pack-mini .pm:not(.ok) img { opacity: .55; }
.stock-row .bar { width: 90px; }

/* ---------- Outreach ---------- */
.board-wrap { overflow-x: auto; padding-bottom: 8px; margin: 0 -4px; }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(178px, 1fr)); gap: 10px; padding: 0 4px; }
.col { background: rgba(255,255,255,.55); border: 1px dashed var(--line-2); border-radius: 18px; padding: 10px; min-height: 260px; transition: background .12s; }
.col.over { background: var(--mustard-soft); border-color: var(--mustard); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.col-head b { font-size: 14px; }
.col-head .pill { margin-left: auto; }
.col-head .sw { width: 10px; height: 10px; border-radius: 3px; }
.deal { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; margin-bottom: 8px; cursor: grab; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.deal:hover { border-color: var(--ink); }
.deal.dragging { opacity: .5; }
.deal b { font-size: 14px; display: block; }
.deal .meta { font-size: 12px; color: var(--muted); }
.deal .foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.deal .foot .sp { flex: 1; }
.mv { border: 1.5px solid var(--line-2); background: #fff; border-radius: 8px; width: 26px; height: 24px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.mv:hover { border-color: var(--ink); }
.mv svg { width: 14px; height: 14px; }
.due { white-space: nowrap; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--cream); }
.due.late { background: var(--red-soft); color: var(--red); }
.due.today { background: var(--mustard-soft); color: var(--mustard-ink); }
.stage-sel { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-sel button { border: 1.5px solid var(--line-2); background: #fff; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; }
.stage-sel button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 14px 44px; }
.timeline .ic { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); border: 2px solid #fff; }
.timeline .ic svg { width: 15px; height: 15px; }
.timeline b { font-size: 13px; }
.timeline p { margin: 2px 0 0; font-size: 14px; }
.tpl-preview { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.tpl-preview .subj { font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; white-space: normal; }
.merge { background: var(--mustard-soft); color: var(--mustard-ink); border-radius: 4px; padding: 0 1px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1.5px dashed var(--teal); background: var(--teal-soft); color: var(--teal-deep); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 8px; cursor: pointer; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tpl-list button { display: block; width: 100%; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; }
.tpl-list button.on { border-color: var(--ink); box-shadow: var(--hard); }
.tpl-list b { display: block; font-size: 14px; }
.tpl-list span { font-size: 12px; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .input { width: auto; padding: 7px 12px; border-radius: 999px; }

/* ---------- Charts ---------- */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--body); fill: var(--muted); font-size: 11px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.hbar { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 7px 0; }
.hbar .track { height: 12px; border-radius: 999px; background: var(--cream); overflow: hidden; margin-top: 5px; }
.hbar .track i { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.hbar b { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-tip { position: fixed; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 10px; font-size: 12px; z-index: 200; line-height: 1.4; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.channel-split { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 18px; align-items: center; }
.channel-split .row { padding: 6px 0; border-top: 1px solid var(--line); }
.channel-split .row:first-child { border-top: 0; }
.margin-big { font-family: var(--display); font-size: 44px; line-height: 1; }
.cost-row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cost-row:first-child { border-top: 0; }

/* ---------- Markets ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--line); gap: 1px; }
.cal .dow { background: var(--paper); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; }
.cal .day { background: #fff; min-height: 104px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; }
.cal .day:hover { background: var(--paper); }
.cal .day.other { background: #FAF8F1; }
.cal .day.other .dn { opacity: .4; }
.cal .day.today .dn { background: var(--ink); color: #fff; }
.cal .dn { font-size: 12px; font-weight: 700; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.ev { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--teal); background: var(--teal-soft); color: var(--teal-deep); padding: 4px 6px; font-size: 12px; font-weight: 700; border-radius: 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.napier { border-color: var(--mustard); background: var(--mustard-soft); color: var(--mustard-ink); }
.ev.event { border-color: var(--terra); background: var(--terra-soft); color: #8E3517; }
.ev.applied { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255,255,255,.6) 6px 9px); }
.mk-card { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.mk-card:first-child { border-top: 0; }
.mk-card:hover .mk-name { text-decoration: underline; }
.mk-card .datechip { width: 62px; }
.mk-card .datechip b { font-size: 24px; }
.mk-name { font-weight: 700; font-size: 15px; }
.pack-list { list-style: none; padding: 0; margin: 0; }
.pack-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pack-list li:first-child { border-top: 0; }
.pack-list li.done .li-main b { text-decoration: line-through; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: 999px; overflow: hidden; background: #fff; }
.stepper button { border: 0; background: transparent; width: 30px; height: 30px; cursor: pointer; font-weight: 700; font-size: 16px; }
.stepper button:hover { background: var(--cream); }
.stepper span { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-2); background: #fff; cursor: pointer; display: grid; place-items: center; flex: none; padding: 0; }
.check.on { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.check svg { width: 15px; height: 15px; }
.status-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.status-steps button { border: 1.5px solid var(--line-2); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.status-steps button.on { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.weather { display: flex; gap: 10px; align-items: flex-start; background: var(--teal-soft); color: var(--teal-deep); padding: 10px 12px; border-radius: 14px; font-size: 14px; }
.weather svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

/* ---------- Website manager ---------- */
.cms { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.cms-preview { position: sticky; top: 84px; }
.browser { border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--hard); }
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--paper); border-bottom: 1.5px solid var(--ink); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.browser-bar .url { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; padding: 4px 12px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.preview-scroll { height: calc(100vh - 220px); min-height: 520px; overflow-y: auto; background: #e9e6da; }
.preview-scroll.phone { display: flex; justify-content: center; padding: 16px 0; }
.preview-scroll.phone .site { width: 360px; border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 8px var(--ink); margin: 10px 0; height: max-content; }
.prod-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ptile { border: 1.5px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; cursor: pointer; text-align: left; padding: 0; transition: border-color .12s, transform .12s; position: relative; }
.ptile:hover { border-color: var(--ink); transform: translateY(-2px); }
.ptile.on { border-color: var(--ink); box-shadow: var(--hard); }
.ptile img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--cream); }
.ptile .pt-body { padding: 9px 11px 11px; }
.ptile b { font-size: 13px; display: block; line-height: 1.25; }
.ptile .pill { position: absolute; top: 8px; left: 8px; }
.ptile.hidden-p img { opacity: .4; }
.toggle { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); border: 0; cursor: pointer; flex: none; transition: background .15s; padding: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle.on { background: var(--teal-ink); }
.toggle.on::after { transform: translateX(18px); }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.img-pick { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.img-pick button { border: 2px solid var(--line); border-radius: 12px; padding: 0; background: var(--cream); cursor: pointer; overflow: hidden; aspect-ratio: 1; }
.img-pick button.on { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,157,142,.25); }
.img-pick img { width: 100%; height: 100%; object-fit: contain; }
.publish-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; margin-bottom: 16px; }
.publish-bar .sp { flex: 1; }
.hours-grid { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 8px 10px; align-items: center; }
.cms-section { margin-bottom: 16px; }

/* The mini public site */
.site { background: var(--cream); color: #020202; font-family: var(--body); container-type: inline-size; }
.site .s-ann { background: var(--teal); color: #fff; text-align: center; font-size: 12px; font-weight: 700; padding: 8px 14px; }
.site .s-nav { display: flex; align-items: center; gap: 18px; padding: 12px 22px; background: var(--cream); }
.site .s-nav img { width: 46px; }
.site .s-nav .links { display: flex; gap: 16px; font-size: 13px; font-weight: 600; margin-left: auto; }
.site .s-nav .cart { font-size: 13px; font-weight: 700; }
.site .s-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px; padding: 26px 22px 30px; }
.site .s-hero h2 { font-family: var(--display); font-size: 38px; line-height: .98; letter-spacing: -.01em; }
.site .s-hero p { font-size: 14px; margin: 12px 0 16px; }
.site .s-btn { display: inline-block; background: var(--mustard); color: #020202; font-weight: 700; font-size: 13px; padding: 10px 18px; border-radius: 999px; border: 0; }
.site .s-about { background: var(--teal); color: #fff; padding: 30px 22px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; align-items: center; }
.site .s-about img { border-radius: 14px; aspect-ratio: 4/3; object-fit: cover; }
.site .s-about h3 { font-family: var(--display); font-size: 26px; line-height: 1.05; color: var(--mustard); }
.site .s-about p { font-size: 13px; line-height: 1.55; margin: 10px 0 0; }
.site .s-range { padding: 30px 22px; }
.site .s-range h3, .site .s-visit h3 { font-family: var(--display); font-size: 24px; margin-bottom: 14px; }
.site .s-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.site .s-prod { background: #fff; border-radius: 14px; overflow: hidden; position: relative; }
.site .s-prod img { aspect-ratio: 1; object-fit: contain; width: 100%; background: #fff; }
.site .s-prod div { padding: 8px 10px 12px; font-size: 13px; }
.site .s-prod b { display: block; }
.site .s-prod .tag { position: absolute; top: 8px; left: 8px; background: #020202; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.site .s-prod.sold img { opacity: .5; }
.site .s-visit { padding: 26px 22px 30px; background: var(--mustard); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.site .s-visit table { font-size: 13px; border-collapse: collapse; width: 100%; }
.site .s-visit td { padding: 3px 0; }
.site .s-visit ul { margin: 0; padding-left: 18px; font-size: 13px; }
.site .s-visit li { margin-bottom: 6px; }
.site .s-foot { background: #020202; color: #fff; padding: 20px 22px; font-size: 12px; display: flex; gap: 12px; align-items: center; }
.site .s-foot b { font-family: var(--display); color: var(--mustard); font-size: 15px; }
@container (max-width: 520px) {
  .site .s-nav .links { display: none; }
  .site .s-nav .cart { margin-left: auto; }
  .site .s-hero, .site .s-about, .site .s-visit { grid-template-columns: 1fr; }
  .site .s-hero h2 { font-size: 34px; }
  .site .s-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ---------- Overlays ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20,20,15,.45); z-index: 100; animation: fade .15s; }
.modal { position: fixed; z-index: 101; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--paper); border: 2px solid var(--ink); border-radius: 24px; box-shadow: 6px 6px 0 var(--ink); animation: pop .18s; }
.modal.wide { width: min(860px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 0; }
.modal-head h2 { font-family: var(--display); font-size: 22px; flex: 1; line-height: 1.15; }
.modal-body { padding: 16px 22px 8px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 22px 20px; flex-wrap: wrap; }
.drawer { position: fixed; z-index: 101; right: 0; top: 0; bottom: 0; width: min(520px, 100vw); background: var(--paper); border-left: 2px solid var(--ink); overflow-y: auto; animation: slide .2s ease-out; display: flex; flex-direction: column; }
.drawer-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 1; }
.drawer-head .row { align-items: flex-start; }
.drawer-head h2 { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.drawer-body { padding: 18px 22px 40px; }
.drawer-body section { margin-bottom: 22px; }
.drawer-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 24px); }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; gap: 10px; align-items: center; animation: up .2s; }
.toast i { width: 22px; height: 22px; border-radius: 50%; background: var(--mustard); color: var(--ink); display: grid; place-items: center; font-style: normal; font-weight: 700; flex: none; font-size: 13px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%,-46%); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }

/* Invoice */
.invoice { background: #fff; border-radius: 16px; border: 1px solid var(--line); padding: 26px; font-size: 13px; }
.invoice .inv-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.invoice .inv-top img { width: 84px; }
.invoice h3 { font-family: var(--display); font-size: 26px; }
.invoice table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.invoice th { text-align: left; border-bottom: 2px solid var(--ink); padding: 6px 4px; font-size: 12px; }
.invoice td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.invoice .r { text-align: right; }
.invoice .tot td { border: 0; padding: 4px; }
.invoice .tot .grand td { font-weight: 700; font-size: 16px; border-top: 2px solid var(--ink); padding-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cms { grid-template-columns: minmax(0, 1fr); }
  .cms-preview { position: static; }
  .preview-scroll { height: 640px; }
  .welcome .board { width: 260px; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-105%); transition: transform .2s; box-shadow: 10px 0 40px rgba(0,0,0,.25); }
  .shell.nav-open .sidebar { transform: none; }
  .topbar { padding: 10px 16px; }
  .topbar .menu { display: inline-flex; }
  .search { display: none; }
  .view { padding: 20px 16px 60px; }
  .g-main, .g-3, .g-2 { grid-template-columns: minmax(0,1fr); }
  .signin { grid-template-columns: 1fr; }
  .signin-art { min-height: 240px; }
  .signin-art .quote b { font-size: 28px; }
  .signin-art .quote { left: 20px; bottom: 20px; right: 20px; }
}
@media (max-width: 600px) {
  .g-4 { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
  .page-head h1 { font-size: 28px; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .welcome { grid-template-columns: 1fr; padding: 20px; }
  .welcome h1 { font-size: 27px; }
  .welcome .board { display: none; }
  .card { padding: 16px; }
  .kpi .val { font-size: 24px; }
  .kpi .peek { display: none; }
  .cal .day { min-height: 64px; padding: 4px 3px; }
  .cal .ev { font-size: 0; padding: 0; height: 6px; border-left-width: 0; border-radius: 3px; background: var(--teal); }
  .cal .ev.napier { background: var(--mustard); }
  .cal .ev.event { background: var(--terra); }
  .cal .dow { padding: 6px 4px; font-size: 11px; text-align: center; }
  .channel-split { grid-template-columns: 1fr; }
  .channel-split svg { max-width: 160px; margin: 0 auto; }
  .hide-sm { display: none !important; }
  .list li.order { flex-wrap: wrap; }
  .list li.order .li-main { flex-basis: calc(100% - 140px); }
  .list li.order > .btn, .list li.order > .pill { margin-left: 56px; }
  .img-pick { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .modal-foot .btn { flex: 1; }
  .kv { grid-template-columns: 96px minmax(0,1fr); }
  .code-boxes input { width: 40px; height: 50px; }
  .topbar .beta-badge { font-size: 10px; padding: 2px 8px; }
  .topbar .crumb .pre { display: none; }
}

/* ---------- Review fixes ---------- */
/* Phone menu: a real scrim you can tap, and a close button inside the drawer */
.nav-scrim, .side-close, .search-btn { display: none; }
.side-close { position: absolute; top: 18px; right: 12px; color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }
.side-close:hover { box-shadow: none; background: rgba(255,255,255,.12); }
@media (max-width: 960px) {
  .side-close { display: inline-flex; }
  .shell.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .search-btn { display: inline-flex; }
}

/* KPI cards: all four are buttons with the same layout */
button.kpi-btn { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; transition: transform .12s, box-shadow .12s, border-color .12s; }
button.kpi-btn:not(.hero) { background: var(--white); border: 1px solid var(--line); }
button.kpi-btn:hover { border-color: var(--ink); transform: translate(-1px,-1px); }
button.kpi-btn .val { display: block; }
.kpi .peek { position: absolute; top: 10px; right: 10px; bottom: auto; width: 54px; opacity: .9; }
@media (min-width: 601px) { .kpi .peek ~ .lbl, .kpi .peek ~ .val, .kpi .peek ~ span { padding-right: 58px; } }
.card.flash { box-shadow: 0 0 0 3px var(--mustard), var(--shadow); transition: box-shadow .3s; }

/* Packing list: stock shortfalls */
.short-line { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: 13px; font-weight: 600; }
.short-hint { color: var(--red); font-weight: 600; }
.stepper.over { border-color: var(--red); background: var(--red-soft); }
.stepper.over span { color: var(--red); }
.pack-list .li-main b { white-space: normal; overflow: visible; line-height: 1.25; }
.pack-list .li-main span { white-space: normal; }

/* Market drawer: venue, time and weather wrap instead of cutting off */
.drawer-head .li-main span { white-space: normal; overflow: visible; }
.weather textarea.grow { background: transparent; border: 0; padding: 0; box-shadow: none; min-height: 0; resize: none; overflow: hidden; color: inherit; line-height: 1.45; }

/* Toasts: at most two, bottom right on desktop, with an Undo */
.toast-undo { margin-left: 6px; background: transparent; border: 1.5px solid rgba(255,255,255,.6); color: #fff; border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.toast-undo:hover { background: rgba(255,255,255,.12); }
@media (min-width: 961px) {
  .toasts { left: auto; right: 24px; transform: none; align-items: flex-end; max-width: 420px; }
}

/* Contacts: search filter chip */
.filter-chip { font-family: var(--body); font-size: 13px; padding: 6px 12px; border-radius: 999px; border-style: solid; }

/* Website: compact product picker, sticky preview from the top of the tab */
.prod-tiles { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.ptile img { aspect-ratio: 4/3; }
.ptile .pt-body { padding: 6px 9px 8px; }
.ptile b { font-size: 12.5px; }
.ptile .pill { top: 6px; left: 6px; font-size: 10.5px; padding: 2px 7px; }
.cms-preview { top: 90px; }
.pane-switch { display: none; }

/* The mini site: darker teal behind body text (white on #00756A is 5.3:1), cream heading */
.site .s-ann { background: var(--teal-ink); }
.site .s-about { background: var(--teal-ink); }
.site .s-about h3 { color: var(--cream); }
.site .s-prod.sel { box-shadow: 0 0 0 3px var(--mustard); }
.site .s-detail { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; background: #fff; border-radius: 16px; padding: 16px; margin-bottom: 18px; }
.site .s-detail img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: var(--cream); }
.site .s-crumb { font-size: 11px; color: #555; }
.site .s-detail h4 { font-family: var(--display); font-size: 22px; line-height: 1.05; margin: 4px 0 6px; font-weight: 400; }
.site .s-price { font-weight: 700; font-size: 15px; }
.site .s-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.site .s-sizes span { border: 1.5px solid #020202; border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; }
.site .s-sizes span.on { background: #020202; color: #fff; }
.site .s-detail p { font-size: 13px; line-height: 1.5; margin: 10px 0 12px; }
.site .s-btn.off { background: #D6D0BA; color: #3B3A35; }
.site .s-hidden { position: absolute; top: -10px; right: 12px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
@container (max-width: 520px) { .site .s-detail { grid-template-columns: 1fr; } }

/* Phones */
@media (max-width: 699px) {
  .tabs.scroll-sm { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .tabs.scroll-sm::-webkit-scrollbar { display: none; }
  .tabs.scroll-sm button { flex: none; white-space: nowrap; }
  .chart text { font-size: 12px; }
  .pane-switch { display: flex; position: sticky; top: 64px; z-index: 15; margin: 0 0 14px; background: #fff; box-shadow: var(--hard); }
  .pane-switch button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; font-size: 13px; }
  .pane-switch svg { width: 15px; height: 15px; }
  .cms.pane-edit .cms-preview { display: none; }
  .cms.pane-preview .cms-form { display: none; }
  .pv-modes { display: none; }
  .preview-scroll { height: calc(100vh - 230px); min-height: 460px; }
  .preview-scroll.phone { padding: 0; display: block; }
  .preview-scroll.phone .site { width: auto; border-radius: 0; box-shadow: none; margin: 0; }
}
@media (min-width: 961px) { body.drawer-open .toasts { right: calc(min(520px, 100vw) + 20px); } }
.shell.nav-open ~ .toasts { display: none; } /* never cover the Sign out row in the phone menu */
