/* Admin console layout.
   Adapted from the Atlas Ops reference onto Nuzza's own tokens — the
   reference's dark-green rail, cream field and warm accent map almost directly
   onto --charcoal-deep, --cream and --amber, so no new palette is introduced. */

:root {
  --side-w: 232px;
  --rail-w: 320px;
  --console-gap: 18px;
  --console-top-h: 63px;
  --ok: #3F7A4A;
  --ok-soft: #E4F0E2;
  --warn: #A4471F;
  --warn-soft: #FBE9DF;
  --muted: #7C8A80;
}

body.console-body { background: var(--cream); margin: 0; }

.console { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }

/* ---- Sidebar ---- */
.console-side {
  background: var(--charcoal-deep); color: var(--lavender-tint);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}

/* ---- Collapsed rail ---- */
.side-toggle {
  position: absolute; top: 70px; right: -13px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--line); color: var(--charcoal);
  display: grid; place-items: center; cursor: pointer; z-index: 6; padding: 0;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .14);
}
.side-toggle:hover { border-color: var(--amber); color: var(--amber); }
.side-toggle svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.3; transition: transform .22s ease; }
/* Points back toward the rail while it is open, forward once collapsed. */
body:not(.side-collapsed) .side-toggle svg { transform: rotate(180deg); }

body.side-collapsed { --side-w: 68px; }
body.side-collapsed .side-brand { justify-content: center; padding: 20px 0 22px; }
body.side-collapsed .side-brand > span:not(.mark) { display: none; }
body.side-collapsed .side-nav { padding: 0 8px; }
body.side-collapsed .side-nav a { justify-content: center; padding: 10px 0; }
body.side-collapsed .side-nav a > span, body.side-collapsed .side-nav .count { display: none; }
body.side-collapsed .side-nav a.active { box-shadow: none; }
body.side-collapsed .side-user { justify-content: center; padding: 14px 0; }
body.side-collapsed .side-user > span:not(.avatar) { display: none; }
body.side-collapsed .side-user .chev { display: none; }
/* Group labels would not fit; keep a divider dot so the grouping still reads. */
body.side-collapsed .side-section { font-size: 0; text-align: center; padding: 12px 0 6px; }
body.side-collapsed .side-section::after { content: '\00B7'; font-size: 15px; opacity: .45; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 22px; text-decoration: none; color: var(--white); }
.side-brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--amber); color: var(--white);
  display: grid; place-items: center; font-family: var(--display); font-size: 16px; flex-shrink: 0;
}
.side-brand strong { display: block; font-family: var(--display); font-size: 15.5px; font-weight: 600; letter-spacing: .01em; }
.side-brand span { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; opacity: .55; margin-top: 2px; }

.side-scroll { flex: 1; overflow-y: auto; padding-bottom: 12px; }
.side-section { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; opacity: .45; padding: 14px 18px 8px; }
.side-nav { list-style: none; margin: 0; padding: 0 10px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  color: var(--lavender-tint); text-decoration: none; font-size: 13.5px; line-height: 1.2;
  transition: background .15s ease, color .15s ease;
}
.side-nav a:hover { background: rgba(255,255,255,.07); color: var(--white); }
.side-nav a.active { background: rgba(215,111,82,.16); color: var(--white); box-shadow: inset 2px 0 0 var(--amber); }
.side-nav svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; opacity: .85; }
.side-nav .count { margin-left: auto; font-family: var(--mono); font-size: 10.5px; background: rgba(255,255,255,.1); padding: 2px 7px; border-radius: 100px; }
.side-nav a.active .count { background: var(--amber); color: var(--white); }
/* Only the overview page fills these in; elsewhere an empty pill is noise. */
.side-nav .count:empty { display: none; }

/* Account block: the signed-in user, and the menu holding shop settings and
   signing out. */
.side-account { position: relative; }
.side-user {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 18px; text-align: left;
  border: 0; border-top: 1px solid rgba(255,255,255,.08); background: none; color: inherit; cursor: pointer;
  font-family: var(--body); transition: background .15s ease;
}
.side-user:hover, .side-account[data-open="true"] .side-user { background: rgba(255,255,255,.07); }
.side-user.current { box-shadow: inset 2px 0 0 var(--amber); }
.side-user .who { min-width: 0; }
.side-user .chev { width: 13px; height: 13px; margin-left: auto; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2.2; opacity: .5; transition: transform .18s ease; }
.side-account[data-open="true"] .chev { transform: rotate(180deg); }

.user-menu {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 10px; right: 10px; min-width: 188px;
  background: var(--white); border-radius: 12px; padding: 6px; z-index: 8;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .32);
}
.side-account[data-open="true"] .user-menu { display: block; }
.user-menu a, .user-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; text-align: left;
  border: 0; background: none; border-radius: 9px; cursor: pointer;
  font-family: var(--body); font-size: 13px; color: var(--charcoal); text-decoration: none;
}
.user-menu a:hover, .user-menu button:hover { background: var(--cream); }
.user-menu a.active { background: var(--cream-dim); font-weight: 600; }
.user-menu svg { width: 15px; height: 15px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; }
.user-menu .menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.side-user .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: var(--white); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; }
.side-user b { display: block; font-size: 12.5px; font-weight: 600; color: var(--white); }
.side-user span { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; opacity: .5; }

/* ---- Top bar ---- */
.console-main { display: flex; flex-direction: column; min-width: 0; }
.console-top {
  display: flex; align-items: center; gap: 14px; padding: 12px 22px;
  border-bottom: 1px solid var(--line); background: var(--cream); position: sticky; top: 0; z-index: 5;
  min-height: var(--console-top-h); box-sizing: border-box;
}

/* The product editor brings its own sticky action bar; inside the console it
   has to sit below the top bar rather than underneath it. */
.console .editor-header { top: var(--console-top-h); z-index: 4; }
.console .editor-body { padding-top: 20px; }
.console .editor-header > .wrap, .console .editor-body > .wrap { padding-left: 22px; padding-right: 22px; }
.crumb { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.crumb b { color: var(--charcoal); font-weight: 600; }
.console-top .spacer { flex: 1; }
.console-search {
  display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line);
  border-radius: 100px; padding: 7px 14px; min-width: 240px;
}
.console-search input { border: 0; background: transparent; font-family: var(--body); font-size: 13px; width: 100%; outline: none; color: var(--charcoal); }
.console-search svg { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 1.8; flex-shrink: 0; }

/* ---- Ticker ---- */
.console-ticker {
  display: flex; gap: 26px; align-items: center; padding: 8px 22px; overflow-x: auto;
  border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .06em; color: var(--muted); white-space: nowrap; scrollbar-width: none;
}
.console-ticker::-webkit-scrollbar { display: none; }
.console-ticker i { font-style: normal; color: var(--amber); }

/* ---- Content ---- */
.console-content { display: grid; grid-template-columns: minmax(0,1fr) var(--rail-w); gap: var(--console-gap); padding: 22px; align-items: start; }
.console-col { display: flex; flex-direction: column; gap: var(--console-gap); min-width: 0; }

.greet-date { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.greet h1 { font-family: var(--display); font-size: clamp(26px, 3vw, 36px); line-height: 1.1; margin: 6px 0 0; color: var(--charcoal); }
.greet h1 .dot { color: var(--amber); }
.greet-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.greet-pill {
  display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line);
  border-radius: 100px; padding: 8px 14px; font-family: var(--mono); font-size: 11.5px; color: var(--charcoal);
}
.greet-pill em { font-style: normal; color: var(--amber); }

/* ---- KPI cards ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi .k-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.kpi .k-value { font-family: var(--display); font-size: 25px; font-weight: 600; color: var(--charcoal); line-height: 1.05; }
.kpi .k-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi .spark { width: 78px; height: 26px; flex-shrink: 0; }
.delta { font-family: var(--mono); font-size: 10.5px; padding: 2px 7px; border-radius: 100px; white-space: nowrap; }
.delta.up { background: var(--ok-soft); color: var(--ok); }
.delta.down { background: var(--warn-soft); color: var(--warn); }
.delta.flat { background: var(--cream-dim); color: var(--muted); }

/* ---- Panels ---- */
.pnl { background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pnl-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; flex-wrap: wrap; }
.pnl-head h2 { font-family: var(--display); font-size: 20px; font-weight: 600; margin: 0; color: var(--charcoal); }
.pnl-head .sub { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.pnl-head .spacer { flex: 1; }
.pnl-note { padding: 0 18px 12px; font-size: 12.5px; color: var(--muted); }
.pnl-body { padding: 0 18px 18px; }

.seg { display: inline-flex; background: var(--cream-dim); border-radius: 100px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; cursor: pointer; border-radius: 100px; padding: 5px 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.seg button.active { background: var(--white); color: var(--charcoal); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.tabs { display: flex; gap: 4px; padding: 0 18px 12px; flex-wrap: wrap; }
.tabs button {
  border: 0; background: transparent; cursor: pointer; border-radius: 100px; padding: 6px 12px;
  font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px;
}
.tabs button:hover { background: var(--cream-dim); }
.tabs button.active { background: var(--charcoal); color: var(--white); }
.tabs button .n { font-family: var(--mono); font-size: 10px; opacity: .7; }

/* ---- Tables ---- */
.otable-wrap { overflow-x: auto; }
table.otable { width: 100%; border-collapse: collapse; }
table.otable th {
  text-align: left; font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.otable td { padding: 12px; border-bottom: 1px solid var(--cream-dim); font-size: 13px; color: var(--charcoal); vertical-align: middle; }
table.otable tr:last-child td { border-bottom: 0; }
table.otable tbody tr:hover { background: var(--cream); }
.o-id { font-family: var(--mono); font-size: 12px; }
.cust { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cust .av { width: 28px; height: 28px; border-radius: 50%; background: var(--lavender); color: var(--white); display: grid; place-items: center; font-family: var(--mono); font-size: 10px; flex-shrink: 0; }
.cust b { display: block; font-weight: 600; font-size: 13px; }
.cust span { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.amount { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.when { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.st { font-family: var(--mono); font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase; padding: 4px 9px; border-radius: 100px; white-space: nowrap; display: inline-block; }
.st.paid, .st.delivered { background: var(--ok-soft); color: var(--ok); }
.st.pending { background: #FAF0DC; color: #91701F; }
.st.shipped { background: var(--lavender-tint); color: var(--lavender-deep); }
.st.cancelled, .st.failed { background: var(--warn-soft); color: var(--warn); }
/* Fulfilment reads as a second, quieter axis beside the payment status. */
.st.ful { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.st.ful.shipped { border-color: var(--lavender-deep); color: var(--lavender-deep); background: transparent; }
.st.ful.delivered { border-color: var(--ok); color: var(--ok); background: transparent; }
.tab-sep { width: 1px; align-self: stretch; background: var(--line); margin: 4px 6px; }

/* ---- Right rail ---- */
.console-rail { display: flex; flex-direction: column; gap: var(--console-gap); position: sticky; top: 92px; }
.rail { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 15px 16px; }
.rail .r-eyebrow { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rail h3 { font-family: var(--display); font-size: 17px; font-weight: 600; margin: 4px 0 12px; color: var(--charcoal); }
.rail .r-big { font-family: var(--display); font-size: 28px; font-weight: 600; color: var(--charcoal); line-height: 1; }
.rail-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--cream-dim); font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

.donut-row { display: flex; align-items: center; gap: 14px; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend .sw { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.legend .lg-val { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }

.movers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.movers li { display: flex; align-items: center; gap: 10px; }
.movers .rank { font-family: var(--mono); font-size: 10.5px; color: var(--muted); width: 12px; flex-shrink: 0; }
.movers b { font-size: 12.5px; font-weight: 600; display: block; line-height: 1.3; }
.movers span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.movers .m-val { margin-left: auto; text-align: right; font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.feed li { display: flex; gap: 10px; align-items: flex-start; }
.feed .ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; font-family: var(--mono); font-size: 10px; background: var(--cream-dim); color: var(--muted); }
.feed .ic.ok { background: var(--ok-soft); color: var(--ok); }
.feed .ic.warn { background: var(--warn-soft); color: var(--warn); }
.feed b { font-size: 12.5px; font-weight: 600; display: block; line-height: 1.35; }
.feed span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

.live-dot { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ok); }
.live-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

/* ---- Status bar ---- */
.console-status {
  margin-top: auto; display: flex; align-items: center; gap: 16px; padding: 9px 22px;
  border-top: 1px solid var(--line); font-family: var(--mono); font-size: 10px;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.console-status .spacer { flex: 1; }

.order-heading { font-family: var(--display); font-size: 27px; font-weight: 600; margin: 0 0 10px; color: var(--charcoal); }

.empty { padding: 26px 12px; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---- Responsive ---- */
@media (max-width: 1180px) {
  .console-content { grid-template-columns: minmax(0,1fr); }
  .console-rail { position: static; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .console { grid-template-columns: 1fr; }
  .side-toggle { display: none; }
  body.side-collapsed { --side-w: 100%; }
  body.side-collapsed .side-nav a > span { display: inline; }
  .console-side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; }
  /* flex:1 (basis 0) collapsed to nothing once the account actions joined the
     row as siblings — size to content instead and let the rail scroll. */
  .console-side .side-scroll { display: flex; align-items: center; flex: 0 0 auto; overflow: visible; }
  .console-side .side-section, .console-side .side-user { display: none; }
  .side-account { display: contents; }
  .user-menu {
    display: flex; position: static; background: none; box-shadow: none;
    padding: 0 8px; min-width: 0; gap: 4px;
  }
  .user-menu a, .user-menu button { width: auto; white-space: nowrap; color: var(--lavender-tint); font-size: 13.5px; }
  .user-menu a:hover, .user-menu button:hover { background: rgba(255,255,255,.07); }
  .user-menu a.active { background: rgba(215,111,82,.16); color: var(--white); }
  .user-menu .menu-sep { width: 1px; height: auto; margin: 6px 4px; background: rgba(255,255,255,.12); }
  .side-nav { display: flex; gap: 4px; }
  .console-search { min-width: 0; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .console-content { padding: 14px; }
}

/* ---- Order book tools (filter, sort, export) ---- */
.ob-tools { display: flex; align-items: center; gap: 8px; padding: 0 18px 12px; flex-wrap: wrap; }
.ob-filter { display: flex; align-items: center; gap: 8px; background: var(--cream); border: 1px solid var(--line); border-radius: 100px; padding: 7px 13px; flex: 1; min-width: 190px; }
.ob-filter input { border: 0; background: transparent; font-family: var(--body); font-size: 12.5px; width: 100%; outline: none; color: var(--charcoal); }
.ob-filter svg { width: 13px; height: 13px; stroke: var(--muted); fill: none; stroke-width: 1.9; flex-shrink: 0; }
.ob-sort {
  border: 1px solid var(--line); background: var(--white); cursor: pointer; border-radius: 100px; padding: 6px 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.ob-sort.active { border-color: var(--charcoal); color: var(--charcoal); }
.ob-sort .dir { color: var(--amber); }

/* ---- Order drawer ---- */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(20, 37, 30, .42); z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(452px, 100vw); z-index: 41;
  background: var(--white); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .34s cubic-bezier(.32, .72, 0, 1);
  box-shadow: -18px 0 44px rgba(0, 0, 0, .17);
}
.drawer.open { transform: none; }
.drawer-head { background: var(--charcoal-deep); color: var(--white); padding: 17px 20px 19px; position: relative; }
.drawer-head .r-eyebrow { color: rgba(255,255,255,.55); }
.drawer-head h2 { font-family: var(--display); font-size: 27px; font-weight: 600; margin: 3px 0 8px; color: var(--white); }
.drawer-head .meta { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.72); flex-wrap: wrap; }
.drawer-head .cap-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-top: 14px; }
.drawer-head .cap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 3px; }
.drawer-head .cap { font-family: var(--display); font-size: 29px; font-weight: 600; color: var(--white); line-height: 1; }
.drawer-close {
  position: absolute; top: 15px; right: 16px; width: 29px; height: 29px; border-radius: 50%; cursor: pointer;
  border: 0; background: rgba(255,255,255,.13); color: var(--white); font-size: 15px; line-height: 1; display: grid; place-items: center;
}
.drawer-close:hover { background: rgba(255,255,255,.24); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 22px; }
.drawer-sec { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 20px 0 11px; }
.drawer-sec:first-child { margin-top: 0; }
.drawer-foot { border-top: 1px solid var(--line); padding: 13px 20px; display: flex; gap: 9px; align-items: center; }
.drawer-foot .btn { flex: 1; justify-content: center; }

.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: flex; gap: 12px; padding-bottom: 15px; position: relative; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ''; position: absolute; left: 11px; top: 25px; bottom: 0; width: 1.5px; background: var(--cream-dim); }
.tl li:last-child::before { display: none; }
.tl .dot { width: 23px; height: 23px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white); display: grid; place-items: center; flex-shrink: 0; font-size: 11px; color: transparent; }
.tl li.done .dot { background: var(--ok); border-color: var(--ok); color: var(--white); }
.tl b { font-size: 13px; font-weight: 600; display: block; line-height: 1.4; }
.tl .tl-when { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.tl li:not(.done) b { color: var(--muted); font-weight: 500; }
/* Cancelled and failed are reached states, not progress. */
.tl li.terminal .dot { background: var(--warn); border-color: var(--warn); }
.tl li.terminal b { color: var(--warn); }

.ditem { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; }
.ditem .qty { font-family: var(--mono); font-size: 10.5px; background: var(--cream-dim); color: var(--muted); border-radius: 7px; padding: 4px 7px; flex-shrink: 0; }
.ditem b { font-size: 12.5px; font-weight: 600; display: block; line-height: 1.35; }
.ditem span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.ditem .line { margin-left: auto; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.dtotals { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 11px; }
.dtotals div { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.dtotals div.grand { color: var(--charcoal); font-weight: 600; font-size: 14px; margin-bottom: 0; }
.dtotals .v { font-family: var(--mono); }
.dcust { display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--line); border-radius: 11px; padding: 12px; }
.dcust .av { width: 32px; height: 32px; border-radius: 50%; background: var(--lavender); color: var(--white); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; flex-shrink: 0; }
.dcust b { font-size: 13px; font-weight: 600; display: block; }
.dcust span { font-family: var(--mono); font-size: 11px; color: var(--muted); display: block; line-height: 1.6; }

table.otable tbody tr.clickable { cursor: pointer; }
@media (max-width: 560px) { .drawer { width: 100vw; } }
