/* ───────────────────────────────────────────────────────────
   BagelOps — shared design system
   Matches the LoveladyBread storefront brand:
   Playfair Display + Lato · warm brown / gold / cream
   Everything scoped under .bo so it never collides with the
   design-canvas chrome.
   ─────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,500&family=Lato:ital,wght@0,400;0,700;0,900;1,400&display=swap');

.bo {
  /* surfaces */
  --bg:        #FAF6F0;
  --surface:   #FFFFFF;
  --surface-2: #FFFCF7;
  --surface-3: #F6EFE4;   /* faint warm fill (zebra, chips) */

  /* ink */
  --ink:   #2C1A0E;
  --ink-2: #735B47;       /* secondary text */
  --ink-3: #A2917F;       /* tertiary / placeholder */

  /* brand */
  --brown:   #6B3F1F;
  --brown-d: #512E15;
  --espresso:#36210F;
  --gold:    #D4A853;
  --gold-d:  #B07F22;

  /* lines */
  --line:   #EBE0D1;
  --line-2: #F2EADD;

  /* status — received / baking / ready / pickedup / cancelled / noshow */
  --st-rec:    #3D6B8C;  --st-rec-bg:    #E9F0F5;
  --st-bake:   #B27D17;  --st-bake-bg:   #FAEFD6;
  --st-ready:  #4C7A45;  --st-ready-bg:  #E8F1E5;
  --st-picked: #8A8175;  --st-picked-bg: #EFEBE4;
  --st-cancel: #A8443A;  --st-cancel-bg: #F6E4E1;
  --st-noshow: #3A332D;  --st-noshow-bg: #E9E5DF;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(54,33,15,.05), 0 6px 20px rgba(54,33,15,.06);
  --shadow-lg: 0 8px 40px rgba(54,33,15,.16);

  font-family: 'Lato', -apple-system, system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  box-sizing: border-box;
}
.bo *, .bo *::before, .bo *::after { box-sizing: border-box; }

/* ── App frame: sidebar + content ─────────────────────────── */
.bo-app {
  display: flex;
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.bo-side {
  width: 232px;
  flex: 0 0 232px;
  background: linear-gradient(180deg, #3D2512 0%, #2A1809 100%);
  color: #EFE3D2;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  transition: width .18s ease, flex-basis .18s ease, padding .18s ease;
}
.bo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
}
.bo-collapse {
  margin-left: auto;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  color: #B49A7C;
  cursor: pointer;
  padding: 9px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bo-collapse:hover { background: rgba(255,255,255,.07); color: #F4E8D6; }
.bo-collapse svg { width: 20px; height: 20px; }

/* The Settings + identity block, pinned to the bottom of the rail. */
.bo-side-bottom { margin-top: auto; }
.bo-side-bottom .bo-navitem { margin-bottom: 4px; }
.bo-brand .mark { flex: 0 0 auto; }
.bo-brand .wordmark {
  font-family: 'Playfair Display', serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #FBF3E6;
  line-height: 1;
}
.bo-brand .wordmark b { color: var(--gold); font-weight: 700; }

.bo-nav { display: flex; flex-direction: column; gap: 2px; }
.bo-navitem {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  border-radius: 9px;
  color: #D8C7B0;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  letter-spacing: .1px;
}
.bo-navitem svg { width: 21px; height: 21px; flex: 0 0 auto; opacity: .85; }
.bo-navitem:hover { background: rgba(255,255,255,.05); color: #F4E8D6; }
.bo-navitem.is-active {
  background: rgba(212,168,83,.16);
  color: #FBF3E6;
}
.bo-navitem.is-active svg { opacity: 1; color: var(--gold); }
.bo-navitem.is-active::before {
  content: '';
  position: absolute;
  left: -16px; top: 9px; bottom: 9px;
  width: 4px; border-radius: 0 4px 4px 0;
  background: var(--gold);
}
.bo-navitem .count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255,255,255,.12);
  color: #EBD9BF;
  border-radius: 20px;
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}

.bo-side-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 8px 2px;
  border-top: 1px solid rgba(255,255,255,.09);
}
.bo-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold);
  color: #3A2410;
  font-weight: 900;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.bo-side-foot .who { line-height: 1.25; }
.bo-side-foot .who .n { font-size: 14px; font-weight: 700; color: #F4E8D6; }
.bo-side-foot .who .s { font-size: 12px; color: #B49A7C; }
.bo-side-foot .out {
  margin-left: auto; color: #B49A7C; display: flex;
}
.bo-side-foot .out svg { width: 18px; height: 18px; }

/* ── Collapsed rail ("pancake" toggle) ────────────────────── */
html.bo-collapsed .bo-side {
  width: 68px;
  flex-basis: 68px;
  padding: 24px 12px 18px;
}
html.bo-collapsed .bo-brand { gap: 0; padding: 4px 0 22px; justify-content: center; }
html.bo-collapsed .bo-brand .mark,
html.bo-collapsed .bo-brand .wordmark { display: none; }
html.bo-collapsed .bo-collapse { margin-left: 0; }
html.bo-collapsed .bo-navitem { justify-content: center; gap: 0; padding: 11px 0; }
html.bo-collapsed .bo-navitem span,
html.bo-collapsed .bo-navitem .count { display: none; }
html.bo-collapsed .bo-navitem.is-active::before { left: -12px; }
html.bo-collapsed .bo-side-foot { justify-content: center; padding: 12px 0 2px; }
html.bo-collapsed .bo-side-foot .who,
html.bo-collapsed .bo-side-foot .out { display: none; }

/* ── Content column ───────────────────────────────────────── */
.bo-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.bo-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 38px 32px 18px;
  gap: 20px;
}
.bo-topbar .title {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--ink);
}
.bo-topbar .sub { font-size: 13.5px; color: var(--ink-2); margin-top: 7px; }
.bo-topbar .actions { display: flex; align-items: center; gap: 10px; }

.bo-body { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 0 28px 24px; }

/* ── Buttons ──────────────────────────────────────────────── */
.bo-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: 14.5px; font-weight: 700;
  border-radius: 9px; padding: 10px 16px; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap; line-height: 1;
}
.bo-btn svg { width: 17px; height: 17px; }
.bo-btn-primary { background: var(--brown); color: #FCF6EC; box-shadow: 0 1px 2px rgba(54,33,15,.18); }
.bo-btn-primary:hover { background: var(--brown-d); }
.bo-btn-gold { background: var(--gold); color: #3A2410; box-shadow: 0 1px 2px rgba(54,33,15,.14); }
.bo-btn-ghost { background: var(--surface); color: var(--brown); border-color: var(--line); }
.bo-btn-ghost:hover { background: var(--surface-3); }
.bo-btn-sm { padding: 8px 12px; font-size: 13.5px; border-radius: 8px; }

/* ── Status pill ──────────────────────────────────────────── */
.bo-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 900; letter-spacing: .2px;
  padding: 4px 10px 4px 8px; border-radius: 20px; line-height: 1;
  white-space: nowrap;
}
.bo-pill .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.bo-pill.lg { font-size: 14px; padding: 7px 14px 7px 11px; }
.bo-pill.lg .dot { width: 8px; height: 8px; }
.st-rec    { background: var(--st-rec-bg);    color: var(--st-rec); }    .st-rec .dot    { background: var(--st-rec); }
.st-bake   { background: var(--st-bake-bg);   color: var(--st-bake); }   .st-bake .dot   { background: var(--st-bake); }
.st-ready  { background: var(--st-ready-bg);  color: var(--st-ready); }  .st-ready .dot  { background: var(--st-ready); }
.st-picked { background: var(--st-picked-bg); color: var(--st-picked); } .st-picked .dot { background: var(--st-picked); }
.st-cancel { background: var(--st-cancel-bg); color: var(--st-cancel); } .st-cancel .dot { background: var(--st-cancel); }
.st-noshow { background: var(--st-noshow-bg); color: var(--st-noshow); } .st-noshow .dot { background: var(--st-noshow); }

/* small type tags */
.bo-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
  text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
  background: var(--surface-3); color: var(--ink-2);
}
.bo-tag.retail { background: #EFEBE4; color: #6E6457; }
.bo-tag.whole  { background: #ECE6F0; color: #6B5586; }

/* ── Cards ────────────────────────────────────────────────── */
.bo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ── Stat strip ───────────────────────────────────────────── */
.bo-stats { display: flex; gap: 9px; }
.bo-stat {
  flex: 1 1 0; min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  position: relative;
}
.bo-stat .num {
  font-family: 'Playfair Display', serif;
  font-size: 27px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 8px;
}
.bo-stat .num .dot { width: 9px; height: 9px; border-radius: 50%; }
.bo-stat .lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-top: 7px; letter-spacing: .2px; }
.bo-stat.is-active { border-color: var(--brown); box-shadow: 0 0 0 1px var(--brown); }

/* ── Filter / search bar ──────────────────────────────────── */
.bo-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bo-search {
  flex: 1 1 auto; display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 13px; color: var(--ink-3);
  font-size: 14.5px; min-width: 0;
}
.bo-search svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--ink-3); }
.bo-chips { display: flex; gap: 6px; }
.bo-chip {
  font-size: 13.5px; font-weight: 700; padding: 8px 13px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.bo-chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.bo-chip.is-active { background: var(--brown); color: #FBF3E6; border-color: var(--brown); }
.bo-select {
  font-size: 13.5px; font-weight: 700; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.bo-select svg { width: 13px; height: 13px; opacity: .6; }

/* ── Table ────────────────────────────────────────────────── */
.bo-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.bo-table thead th {
  text-align: left; font-size: 11.5px; font-weight: 900; letter-spacing: .5px;
  text-transform: uppercase; color: var(--ink-3);
  padding: 26px 16px 12px; border-bottom: 1px solid var(--line);
}
.bo-table tbody td { padding: 16px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.bo-table tbody tr:hover td { background: var(--surface-2); }
.bo-table .num { font-variant-numeric: tabular-nums; }
.bo-table .ordno { font-weight: 900; color: var(--brown); font-variant-numeric: tabular-nums; }
.bo-table .cust { font-weight: 700; color: var(--ink); }
.bo-table .muted { color: var(--ink-2); }
.bo-table .total { font-weight: 900; font-variant-numeric: tabular-nums; }
.bo-table .chev { color: var(--ink-3); text-align: right; }
.bo-table .chev svg { width: 16px; height: 16px; }

/* utility */
.bo-divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.bo-mono { font-variant-numeric: tabular-nums; }
