/* Executive Dashboard 4.0 shell: sidebar, top bar, the page panel, page search, the ad budget
   alert and the phone menu. The sidebar is fixed to the window at full height, so it never
   scrolls with the page; only its own list scrolls if an open area does not fit. */

:root { --ed-nav-full: 248px; --ed-nav-rail: 76px; --ed-nav-w: var(--ed-nav-full); }
/* Text grows with wide windows: 100% up to 1440 px, then up to 112.5% (18 px) around 1900 px.
   Font sizes in ed4/*.css are in rem; spacing stays in px. */
@media screen { :root[data-ed-nav] { font-size: clamp(100%, calc(100% + (100vw - 1440px) * 0.00435), 112.5%); } }
@media (min-width: 768px) { :root[data-ed-nav='rail'] { --ed-nav-w: var(--ed-nav-rail); } }
@media (max-width: 767px) { :root { --ed-nav-w: 0px; } }

/* same-origin page changes cross-fade instead of flashing white */
/* @view-transition is printed in the head by ed4_head(): opting in from a late-loaded sheet aborts transitions */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; animation-timing-function: var(--ed-ease); }
::view-transition-old(ed-nav), ::view-transition-new(ed-nav) { animation: none; }

:root[data-ed-nav] body { min-height: 100vh; padding: 0 10px 10px var(--ed-nav-w); box-sizing: border-box; transition: padding-left 0.55s var(--ed-ease); }
@media (max-width: 767px) { :root[data-ed-nav] body { padding: 0 6px 6px; } }

/* ---------- sidebar ---------- */
.ed-nav {
  view-transition-name: ed-nav;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: var(--ed-nav-w);
  height: 100vh;
  height: 100dvh;
  padding: 14px 12px 12px;
  background: var(--ed-frame);
  color: var(--ed-fink);
  font-family: var(--ed-font);
  font-size: 0.8438rem;
  line-height: 1.3;
  overflow: hidden;
  transition: width 0.55s var(--ed-ease), box-shadow 0.4s;
}
.ed-nav *, .ed-search * { box-sizing: border-box; }
/* a reset only: :where() keeps it from outranking the row colours and sizes below */
.ed-nav :where(a, button) { color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
.ed-nav button { padding: 0; border: 0; background: none; }
.ed-nav svg { display: block; flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-nav :focus-visible { outline: 2px solid var(--ed-fink2); outline-offset: 2px; }

.ed-nav-head { display: flex; align-items: center; gap: 10px; flex: none; height: 44px; margin-bottom: 12px; padding: 0 2px; }
.ed-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.ed-brand-mark { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--ed-fitem); }
.ed-brand-mark img { display: block; width: 24px; height: 24px; }
.ed-brand-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; white-space: nowrap; transition: opacity 0.3s, transform 0.5s var(--ed-ease); }
.ed-brand-copy strong { font-size: 0.9375rem; font-weight: 650; letter-spacing: -0.01em; }
.ed-brand-copy small { font-size: 0.7188rem; color: var(--ed-fink2); }
.ed-collapse { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; color: var(--ed-fink2); transition: background-color 0.25s, color 0.25s, transform 0.35s var(--ed-ease); }
.ed-collapse:hover { background: var(--ed-fitem); color: var(--ed-fink); }
.ed-collapse:active { transform: scale(0.94); }
.ed-collapse svg { width: 18px; height: 18px; }
/* the panel mark's chevron points the way a click moves the sidebar */
.ed-collapse .ed-panel-open { display: none; }

.ed-navigation-columns { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; margin: 0 -12px; padding: 0 12px 6px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.ed-search-open { display: flex; align-items: center; gap: 10px; flex: none; width: 100%; height: 40px; margin-bottom: 14px; padding: 0 10px 0 13px !important; border-radius: 12px; background: var(--ed-fitem) !important; color: var(--ed-fink2) !important; font-size: 0.8125rem; text-align: left; white-space: nowrap; overflow: hidden; transition: color 0.25s; }
.ed-search-open:hover { color: var(--ed-fink) !important; }
.ed-search-open svg { width: 16px; height: 16px; }
.ed-search-open kbd { margin-left: auto; height: auto; padding: 2px 6px; border: 0; border-radius: 6px; background: var(--ed-fon); color: var(--ed-fink2); font: 0.6563rem/1.3 var(--ed-mono); }

.ed-areas { display: flex; flex-direction: column; gap: 2px; }
.ed-group-head { position: relative; display: flex; }
.ed-area { position: relative; display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; height: 40px; padding: 0 44px 0 12px !important; border-radius: 12px; text-decoration: none; color: var(--ed-fink2); font-weight: 500 !important; text-align: left; white-space: nowrap; transition: color 0.25s, background-color 0.25s; }
.ed-area:hover, .ed-area.is-selected { color: var(--ed-fink); }
.ed-area > span:not(.ed-chev) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.3s; }
/* the chevron is its own button at the row's end: it opens the list without leaving the page */
.ed-group-toggle { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: inherit; transition: color 0.25s, opacity 0.3s; }
.ed-group-toggle:hover { background: transparent; }
.ed-group-head { color: var(--ed-fink2); transition: color 0.25s; }
.ed-group-head:hover, .ed-group-head:has(.ed-area.is-selected) { color: var(--ed-fink); }
.ed-area { color: inherit; }
.ed-chev { display: grid; place-items: center; flex: none; opacity: 0.6; transition: opacity 0.3s; }
.ed-chev svg { width: 16px; height: 16px; transition: transform 0.45s var(--ed-ease); }
.ed-group.is-open > .ed-group-head .ed-chev svg { transform: rotate(90deg); }
/* a closed area still shows that something inside needs attention */
.ed-area-mark { display: none; position: absolute; left: 27px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--ed-amber); box-shadow: 0 0 0 2px var(--ed-frame); }
.ed-group:not(.is-open) .ed-area.has-alert .ed-area-mark { display: block; }
.ed-area.has-budget-alert .ed-area-mark, .ed-group:not(.is-open) .ed-area.has-budget-alert .ed-area-mark { display: grid; place-items: center; left: 23px; top: 5px; width: 15px; height: 15px; background: #dc2643; animation: ed-pop 0.5s var(--ed-ease) both; }
.ed-area.has-budget-alert .ed-area-mark::before { content: '!'; color: #fff; font: 800 0.625rem/1 var(--ed-font); font-style: normal; }

.ed-group-pages { display: none; flex-direction: column; gap: 2px; margin: 4px 0 8px 21px; padding-left: 12px; border-left: 1px solid var(--ed-fitem); }
.ed-group.is-open > .ed-group-pages { display: flex; animation: ed-open 0.45s var(--ed-ease) both; }
@keyframes ed-open { from { opacity: 0; transform: translate3d(0, -6px, 0); } to { opacity: 1; transform: none; } }
.ed-group-pages > h2 { display: none; }
.ed-gap { display: block; height: 1px; margin: 5px 10px; background: var(--ed-fitem); }
.ed-page { position: relative; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; color: var(--ed-fink2); font-size: 0.8125rem; font-weight: 500; white-space: nowrap; transition: background-color 0.25s, color 0.25s; }
.ed-page:hover { background: var(--ed-fitem); color: var(--ed-fink); }
.ed-page > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ed-page > svg { width: 15px; height: 15px; margin-left: -2px; stroke-width: 2.2; }
.ed-page.is-current { background: var(--ed-fon); box-shadow: var(--ed-sh1); color: var(--ed-facc); font-weight: 600; }
.ed-page .admin-rail-unpaid-dot { display: none; flex: none; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--ed-red); }
.ed-page.has-unpaid-direct-order .admin-rail-unpaid-dot { display: block; }
.ed-page.has-critical-dot::after { content: ''; flex: none; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--ed-amber); }
.ed-page.is-credit-alert::after { content: ''; flex: none; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--ed-red); }

.ed-nav-footer { display: flex; flex-direction: column; gap: 0; flex: none; padding-top: 8px; }
.ed-budget-link { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 8px; padding: 8px 12px; border: 1px solid rgba(255, 107, 129, 0.45); border-radius: 12px; color: var(--ed-fink); font-size: 0.7813rem; white-space: nowrap; overflow: hidden; animation: ed-pop 0.5s var(--ed-ease) both; }
.ed-budget-link > i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #ff6b81; }
.ed-budget-link > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ed-budget-link strong { font-weight: 600; }
.ed-budget-link small { font-size: 0.7188rem; color: var(--ed-fink2); }
.ed-budget-link small { overflow: hidden; text-overflow: ellipsis; }
.ed-foot-line { display: block; height: 1px; margin: 4px 12px 8px; background: var(--ed-fitem); }
.ed-foot-link { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 12px; color: var(--ed-fink2); font-weight: 500; white-space: nowrap; transition: color 0.25s; }
.ed-foot-link:hover { color: var(--ed-fink); }
.ed-foot-link > span { transition: opacity 0.3s; }
.ed-group[data-ed-group='settings'] .ed-area svg:first-child { transition: transform 0.8s var(--ed-ease); }
.ed-group[data-ed-group='settings'].is-open .ed-area svg:first-child { transform: rotate(60deg); }
.ed-build { margin: 8px 12px 0; color: var(--ed-fink2); font: 0.6563rem/1.3 var(--ed-mono); letter-spacing: 0.06em; white-space: nowrap; transition: opacity 0.3s; }

/* icon rail (collapsed, or every window from 768px to 1199px) */
@media (min-width: 768px) {
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-brand-copy,
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-area > span:not(.ed-chev),
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-chev,
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-search-open > span,
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-search-open kbd,
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-foot-link > span,
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-budget-link > span,
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-build { opacity: 0; pointer-events: none; }
  /* the hidden chevron leaves the tab order too: Tab goes from an area icon straight into its flyout */
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-group-toggle { visibility: hidden; opacity: 0; }
  /* the rail (Sidebar board, collapsed): the expand button sits under the mark */
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-nav-head { flex-direction: column; align-items: flex-start; height: auto; gap: 6px; margin-bottom: 10px; }
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-brand-copy { position: absolute; }
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-collapse { width: 52px; height: 36px; margin-left: 0; }
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-collapse .ed-panel-shut { display: none; }
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-collapse .ed-panel-open { display: inline; }
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-search-open { width: 44px; padding: 0 !important; justify-content: center; }
  /* no chevron in the rail, so the area link drops the room it keeps for one */
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-area { padding: 0 12px !important; }
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-search-open > span, :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-search-open > kbd { position: absolute; width: 0; overflow: hidden; }
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-group-pages { display: none; }
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-group.is-flyout > .ed-group-pages {
    position: fixed;
    left: calc(var(--ed-nav-rail) - 6px);
    z-index: 90;
    display: flex;
    min-width: 220px;
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: #171717;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
    animation: ed-pop 0.3s var(--ed-ease) both;
  }
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-group.is-flyout > .ed-group-pages > h2 { display: block; margin: 2px 10px 6px; color: var(--ed-fink2); font-size: 0.75rem; font-weight: 500; }
  /* the rail keeps the alert's outline at full rail width, its words faded out (Sidebar board) */
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-budget-link > span { transition: opacity 0.3s; }
  :root[data-ed-nav='rail'] .ed-nav:not(.is-peek) .ed-foot-line { margin: 4px 8px 8px; }
  .ed-nav.is-peek { width: var(--ed-nav-full); box-shadow: 18px 0 48px rgba(0, 0, 0, 0.45); }
}

/* phone: the sidebar is a drawer over the page */
.ed-mobile-toggle, .admin-mobile-rail-toggle { display: none; }
@media (max-width: 767px) {
  .ed-nav { width: min(86vw, 300px); transform: translate3d(-104%, 0, 0); transition: transform 0.5s var(--ed-ease); box-shadow: none; }
  body.admin-rail-open .ed-nav { transform: none; box-shadow: 24px 0 60px rgba(0, 0, 0, 0.5); }
  .ed-collapse { display: none; }
  .admin-mobile-rail-backdrop { position: fixed; inset: 0; z-index: 79; background: var(--ed-scrim); animation: ed-fade 0.3s var(--ed-ease) both; }
  .ed-mobile-toggle, .admin-mobile-rail-toggle { position: fixed; top: 10px; left: 10px; z-index: 81; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: var(--ed-fitem); color: var(--ed-fink); }
  .ed-mobile-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .ed-toggle-close-icon { display: none; }
  body.admin-rail-open .ed-toggle-close-icon { display: block; }
  body.admin-rail-open .ed-toggle-menu-icon { display: none; }
  body.admin-rail-open .ed-mobile-toggle { left: auto; right: 10px; }
}

/* ---------- top bar and page panel (dashboard and pages built on .admin-shell) ---------- */
.admin-app, .admin-app-suite { position: relative; width: 100%; max-width: none; min-height: 100vh; margin: 0; padding: 0; background: transparent; }
.admin-shell { display: block; width: auto; max-width: none; margin: 0; padding: 0; background: transparent; }
.admin-shell-main { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; padding: 10px 0 0; box-sizing: border-box; }
.admin-shell > .admin-rail:not(.ed-nav), .admin-sidebar, .admin-quick-menu { display: none !important; }

.admin-topbar {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  min-height: 64px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--ed-panel) 50%);
  box-shadow: none;
  backdrop-filter: none;
}
.admin-topbar-left,
.admin-topbar > .admin-topbar-brand:first-child,
.admin-topbar > .admin-heading-with-back:first-child {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  min-width: 0;
  max-width: 56%;
  padding: 10px 26px 4px 24px;
  border-radius: 26px 26px 0 0;
  background: var(--ed-panel);
  color: var(--ed-ink);
  animation: ed-rise 0.7s var(--ed-ease) both;
}
.admin-topbar-brand { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; }
.admin-topbar > .admin-topbar-brand:first-child, .admin-topbar > .admin-heading-with-back:first-child { flex-direction: column; align-items: flex-start; gap: 1px; }
/* a top bar without an actions area still ends in the frame's curve */
.admin-topbar::after { content: ''; order: 99; flex: 1; min-width: 0; border-bottom-left-radius: 24px; background: var(--ed-frame); }
.admin-topbar:has(> .admin-topbar-actions)::after { display: none; }
/* "← Accounting" style back links above a title read as a small caption */
.admin-topbar-brand > a:first-child, .admin-heading-with-back > a:first-child, .cash-flow-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 2px; color: var(--ed-ink3); font-size: 0.75rem; text-decoration: none; transition: color 0.2s; }
.admin-topbar-brand > a:first-child:hover, .cash-flow-back:hover { color: var(--ed-ink); }
.admin-topbar-brand > .admin-chip, .admin-topbar-brand > .admin-panel-kicker { display: none; }
.admin-topbar-brand h1, .admin-topbar h1 { margin: 0; font-size: 1.375rem; font-weight: 650; letter-spacing: -0.025em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; }
.admin-topbar-brand > p { margin: 2px 0 0; font-size: 0.75rem; color: var(--ed-ink3); }
.admin-topbar-actions {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  padding: 4px 6px 12px 14px;
  border-bottom-left-radius: 24px;
  background: var(--ed-frame);
  color: var(--ed-fink);
}
.admin-layout, .admin-shell-main > main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 20px 22px 26px;
  border-radius: 0 26px 26px 26px;
  background: var(--ed-panel);
  color: var(--ed-ink);
}

/* round frame buttons on the top bar: search, notifications, theme */
.admin-topbar-actions > button, .admin-topbar-actions > a, .admin-topbar-actions .admin-search-icon-button, .admin-notification-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ed-fitem);
  color: var(--ed-fink);
  font-size: 0.7813rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
  transition: background-color 0.25s, transform 0.35s var(--ed-ease);
}
.admin-topbar-actions > button:hover, .admin-topbar-actions > a:hover, .admin-notification-button:hover, .admin-topbar-actions .admin-search-icon-button:hover { background: var(--ed-fon); color: var(--ed-fink); }
.admin-topbar-actions > button:active, .admin-notification-button:active { transform: scale(0.96); }
.admin-topbar-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-notification-button { position: relative; width: 40px; padding: 0; }
.admin-notification-button-copy { display: none; }
/* the count badge sits inside the button's corner, so it never spills out of the 40px circle */
.admin-notification-button-icon { position: static; display: grid; place-items: center; width: 100%; height: 100%; flex: none; margin: 0; }
.admin-notification-button [data-billing-notification-count] { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border: 2px solid var(--ed-fitem); border-radius: 9px; background: var(--ed-red); color: #fff; font: 700 0.5938rem/12px var(--ed-mono); text-align: center; }
.admin-search-shell, .admin-search-shell-topbar { position: relative; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: var(--ed-fitem); box-shadow: none; }
.admin-search-shell .admin-search-icon-button { width: 40px; padding: 0; background: transparent; }
.admin-search-shell .admin-search-form { display: none; }
.admin-search-shell.is-open .admin-search-form, .admin-search-shell[data-open='true'] .admin-search-form { display: flex; }
.admin-search-shell .admin-search-input { width: 240px; min-height: 36px; background: transparent; color: var(--ed-fink); box-shadow: none !important; }
.admin-search-shell .admin-search-close-button { display: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ed-fink2); }
.admin-search-shell.is-open .admin-search-close-button { display: grid; place-items: center; }
.admin-search-results { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: min(440px, 80vw); max-height: 60vh; overflow: auto; padding: 6px; border: 1px solid var(--ed-line2); border-radius: 14px; background: var(--ed-menu); color: var(--ed-ink); box-shadow: var(--ed-shm); }

/* back to the parent page, shown above the title on record pages */
.ed-page-tools { display: none; }
.ed-page-tools.has-back { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.ed-back { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 6px; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink2); font-size: 0.7813rem; text-decoration: none; transition: background-color 0.25s, color 0.25s; }
.ed-back:hover { background: var(--ed-raise); color: var(--ed-ink); }
/* Back as a caption above the page title */
.has-back-caption { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.ed-back.ed-back-caption { display: inline-flex; align-items: center; gap: 4px; height: auto; margin: 0 0 1px; padding: 0; border-radius: 0; background: none; color: var(--ed-ink3); font-size: 0.75rem; line-height: 1.2; }
.ed-back.ed-back-caption:hover { background: none; color: var(--ed-ink); }
.ed-back.ed-back-caption svg { width: 12px; height: 12px; }
@media (max-width: 767px) { .admin-topbar .ed-back.ed-back-caption { display: none; } }
.ed-back svg { width: 15px; height: 15px; transform: rotate(180deg); fill: none; stroke: currentColor; stroke-width: 2; }
.ed-breadcrumb { display: none; }

/* ---------- the ad budget alert: solid red, it is an alert and not a notice ---------- */
.ed-budget-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  box-sizing: border-box;
  min-height: 62px;
  margin: 0 0 12px;
  padding: 10px 10px 10px 12px;
  border-radius: 16px;
  background: var(--ed-alert);
  color: #fff;
  font-size: 0.8125rem;
  animation: ed-in 0.6s var(--ed-ease) both;
}
.ed-budget-alert[hidden] { display: none; }
.ed-budget-icon { position: relative; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, 0.16); }
.ed-budget-icon > i { position: absolute; inset: 0; border: 1.5px solid rgba(255, 255, 255, 0.55); border-radius: 12px; animation: ed-ping 2.6s var(--ed-ease) infinite; }
.ed-budget-icon svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; animation: ed-shake 1s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0.8s 2 both; }
.ed-budget-alert > div { flex: 1 1 360px; min-width: 0; }
.ed-budget-alert strong { display: block; font-size: 0.9063rem; font-weight: 650; letter-spacing: -0.01em; }
.ed-budget-alert div > span.ed-narrow { display: block; }
.ed-budget-alert div > span { color: rgba(255, 255, 255, 0.88); }
.ed-budget-alert > a { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 15px; border-radius: 12px; background: #fff; color: var(--ed-alert); font-size: 0.8125rem; font-weight: 650; text-decoration: none; transition: opacity 0.25s, transform 0.35s var(--ed-ease); }
.ed-budget-alert > a:hover { opacity: 0.92; }
.ed-budget-alert > a:active { transform: scale(0.97); }
.ed-budget-alert > a svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* copy that differs between the desktop and phone boards */
@media (min-width: 768px) { .ed-narrow { display: none !important; } }
@media (max-width: 767px) { .ed-wide { display: none !important; } }

/* ---------- page search palette ---------- */
.ed-search {
  width: min(560px, calc(100vw - 32px));
  max-height: min(70vh, 620px);
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--ed-line2);
  border-radius: 20px;
  background: var(--ed-sheet);
  color: var(--ed-ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.ed-search[open] { display: flex; flex-direction: column; animation: ed-sheet 0.4s var(--ed-ease) both; }
.ed-search::backdrop { background: var(--ed-scrim); animation: ed-fade 0.3s var(--ed-ease) both; }
.ed-search-head { display: flex; align-items: center; gap: 10px; flex: none; height: 56px; padding: 0 10px 0 18px; border-bottom: 1px solid var(--ed-line); }
.ed-search-head > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ed-ink3); stroke-width: 2; stroke-linecap: round; }
.ed-search-head input[type='search'] { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent !important; color: var(--ed-ink); font-size: 0.9375rem; box-shadow: none !important; }
.ed-search-head button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ed-ink3); }
.ed-search-head button:hover { background: var(--ed-card2); color: var(--ed-ink); }
.ed-search-head button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ed-search-results { flex: 1; min-height: 0; padding: 6px; overflow: auto; }
.ed-search-result { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 11px; color: var(--ed-ink); font-size: 0.8438rem; font-weight: 500; text-decoration: none; transition: background-color 0.2s; }
.ed-search-result small { color: var(--ed-ink3); font-size: 0.75rem; font-weight: 400; }
.ed-search-result:hover, .ed-search-result.is-selected { background: var(--ed-card2); }
.ed-search-results > p { margin: 18px; color: var(--ed-ink3); text-align: center; }
.ed-search footer { display: flex; gap: 16px; flex: none; padding: 10px 18px; border-top: 1px solid var(--ed-line); color: var(--ed-ink3); font-size: 0.75rem; }
.ed-search footer kbd { height: 20px; margin-right: 3px; padding: 0 5px; line-height: 18px; }

/* the old loader overlay and rotate prompt are replaced by in-place loading states */
.admin-rotate-screen { display: none !important; }
.admin-loader { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--ed-frame); transition: opacity 0.45s var(--ed-ease), visibility 0.45s; }
.admin-loader.is-hidden, .admin-loader[hidden], .admin-loader.is-complete, body.admin-ready .admin-loader { opacity: 0; visibility: hidden; pointer-events: none; }
.admin-loader-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(320px, 80vw); padding: 0; border: 0; background: transparent; box-shadow: none; text-align: center; }
.admin-loader-panel > .admin-chip, .admin-loader-panel > h2, .admin-loader-panel > p, .admin-loader-worm { display: none; }
.admin-loader-bar { width: 100%; height: 4px; border-radius: 9px; background: var(--ed-fitem); overflow: hidden; }
.admin-loader-progress { display: block; height: 100%; border-radius: 9px; background: var(--ed-fink); transition: width 0.4s var(--ed-ease); }
.admin-loader-label { color: var(--ed-fink2); font-size: 0.75rem; font-weight: 400; }

@media (max-width: 767px) {
  .admin-shell-main { padding-top: 6px; }
  .admin-topbar { flex-wrap: wrap; background: transparent; }
  .admin-topbar-left { max-width: none; flex: 1 1 100%; order: 2; padding: 10px 16px 4px 16px; }
  .admin-topbar-actions { order: 1; flex: 1 1 100%; justify-content: flex-end; padding: 0 0 8px 56px; border-radius: 0; }
  .admin-layout, .admin-shell-main > main { padding: 14px 12px 20px; border-radius: 0 0 22px 22px; }
  .ed-budget-alert > a { width: 100%; justify-content: center; }
}

/* ---------- notifications drawer ---------- */
.admin-notification-drawer {
  position: fixed;
  top: 10px;
  right: 10px;
  bottom: 10px;
  left: auto;
  max-height: none;
  height: auto;
  z-index: 120;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(460px, calc(100vw - 20px));
  margin: 0;
  padding: 0;
  border: 1px solid var(--ed-line2);
  border-radius: 22px;
  background: var(--ed-sheet);
  color: var(--ed-ink);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  visibility: hidden;
  transform: translate3d(calc(100% + 24px), 0, 0);
  transition: transform 0.5s var(--ed-ease), visibility 0s linear 0.5s;
}
.admin-notification-drawer.is-open { visibility: visible; transform: none; transition: transform 0.5s var(--ed-ease), visibility 0s; }
.admin-notification-backdrop { position: fixed; inset: 0; z-index: 119; background: var(--ed-scrim); animation: ed-fade 0.35s var(--ed-ease) both; }
.admin-notification-head { display: flex; align-items: center; gap: 10px; flex: none; margin: 0; padding: 16px 14px 12px 18px; border: 0; background: transparent; }
.admin-notification-head-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.admin-notification-head h2 { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.admin-notification-mode { margin: 2px 0 0; font-size: 0.75rem; color: var(--ed-ink3); }
.admin-notification-store-icon { display: none; }
.admin-notification-round-btn, .admin-notification-head .admin-orders-icon-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--ed-ink3); }
.admin-notification-round-btn:hover, .admin-notification-head .admin-orders-icon-btn:hover { background: var(--ed-card2); color: var(--ed-ink); }
.admin-notification-round-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-notification-list { flex: 1; min-height: 0; padding: 0 10px 14px; overflow: auto; }
.admin-notification-list > .admin-empty { margin: 8px; }
/* the inbox list scrolls; each entry keeps its full height (a grid would squeeze rows to their minimum) */
.admin-partner-billing-list { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; }
.admin-billing-notification-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 11px; align-items: center; flex: none; width: 100%; height: auto; min-height: 66px; padding: 12px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ed-ink); text-align: left; cursor: pointer; transition: background-color 0.2s; animation: ed-in 0.4s var(--ed-ease) both; }
.admin-billing-notification-row:hover { background: var(--ed-card2); }
.admin-billing-notification-main { display: contents; }
.admin-billing-notification-copy { min-width: 0; }
.admin-billing-notification-copy strong { display: block; font-size: 0.8125rem; font-weight: 600; }
.admin-billing-notification-copy span, .admin-billing-notification-copy p { display: block; margin: 0; font-size: 0.7813rem; color: var(--ed-ink2); }
.admin-billing-notification-row.is-new .admin-billing-notification-copy strong { font-weight: 650; }
.ed-notification-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ed-red); }
.admin-billing-row-arrow { width: 15px; height: 15px; fill: none; stroke: var(--ed-ink3); stroke-width: 2; }
.admin-billing-detail { display: flex; flex-direction: column; gap: 14px; padding: 4px 8px 18px; animation: ed-in 0.35s var(--ed-ease) both; }

/* ---------- phone tab bar ---------- */
.admin-mobile-tabbar { display: none; }
@media (max-width: 767px) {
  .admin-mobile-tabbar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 70;
    display: flex;
    justify-content: space-around;
    gap: 2px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: rgba(17, 17, 17, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  }
  .admin-mobile-tab { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 52px; padding: 0; border: 0; border-radius: 16px; background: transparent; color: var(--ed-fink2); font-size: 0.6875rem; font-weight: 500; text-decoration: none; transition: color 0.25s, background-color 0.25s; }
  .admin-mobile-tab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .admin-mobile-tab.is-active, .admin-mobile-tab[aria-current='page'] { background: var(--ed-fon); color: var(--ed-facc); font-weight: 600; }
  :root[data-ed-nav] body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* the build number lives at the foot of the sidebar now */
.admin-build-badge { display: none !important; }

/* ---------- phone top bar: the title beside the menu button on the frame, then one row of actions ---------- */
@media (max-width: 767px) {
  .admin-topbar { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-height: 0; margin: 0 0 8px; padding: 0; background: transparent; }
  .admin-topbar::after { display: none; }
  .admin-topbar-left, .admin-topbar > .admin-topbar-brand:first-child, .admin-topbar > .admin-heading-with-back:first-child { order: 1; flex: none; max-width: none; min-height: 40px; padding: 0 56px 0 56px; border-radius: 0; background: transparent; color: var(--ed-fink); animation: none; }
  .admin-topbar-brand h1, .admin-topbar h1 { color: var(--ed-fink); font-size: 1.125rem; line-height: 40px; }
  .admin-topbar-left, .admin-topbar > .admin-topbar-brand:first-child { width: 100%; min-width: 0; }
  .admin-topbar-brand h1 { max-width: 100% !important; }
  /* the smallest phones: a long page name steps down a size and may take two lines rather than being cut */
  @media (max-width: 380px) { .admin-topbar h1 { font-size: 1rem; line-height: 1.25; white-space: normal; overflow: visible; text-overflow: clip; padding: 9px 0; } }
  .admin-topbar-brand > p { display: none; }
  .admin-topbar-actions { position: static !important; order: 2; flex: none; flex-wrap: nowrap; justify-content: flex-start; gap: 6px; padding: 0 0 2px; overflow-x: auto; border-radius: 0; background: transparent; transform: none !important; scrollbar-width: none; }
  .admin-topbar-actions::-webkit-scrollbar { display: none; }
  .admin-topbar-actions > * { flex: none; }
  .admin-notification-button { position: fixed; top: 10px; right: 10px; z-index: 81; }
  .ed-view-actions { flex-wrap: nowrap; }
  .admin-shell-main { padding-top: 10px; }
  .admin-layout, .admin-shell-main > main { border-radius: 22px; }
}
/* the record search sits beside the bell instead of over it */
.admin-search-shell, .admin-search-shell-topbar { width: auto; min-width: 40px; overflow: visible; }
.admin-search-shell .admin-search-icon-button { position: static !important; flex: none; width: 40px; height: 40px; border-radius: 50%; background: transparent; color: var(--ed-fink); }
.admin-search-shell.is-open, .admin-search-shell[data-open='true'] { padding-right: 4px; }
/* notification filter: All / New as a segmented control, Mark all read as a quiet button */
.ed-notification-tools { display: flex; align-items: center; gap: 8px; padding: 0 18px 12px; }
.ed-notification-tools > div[role='group'] { display: flex; flex: 1; gap: 2px; padding: 3px; border-radius: 11px; background: var(--ed-card2); }
.ed-notification-tools > div[role='group'] > button { flex: 1; min-height: 30px; padding: 0 10px; border-radius: 8px; background: transparent; color: var(--ed-ink2); font-size: 0.7813rem; font-weight: 500; }
.ed-notification-tools > div[role='group'] > button[aria-pressed='true'] { background: var(--ed-raise); color: var(--ed-ink); font-weight: 600; }
.ed-notification-tools > div[role='group'] > button span { margin-left: 6px; color: var(--ed-ink3); font: 0.7188rem var(--ed-mono); }
.ed-notification-tools > button { min-height: 30px; padding: 0 10px; border-radius: 9px; background: transparent; color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-notification-tools > button:hover { background: var(--ed-card2); color: var(--ed-ink); }
.admin-notification-empty, .admin-billing-empty { margin: 8px; }

/* ---------- stacking: dialogs open above the fixed sidebar on every page ---------- */
/* The legacy shell made its own stacking context (isolation on .admin-app, z-index on .admin-shell),
   which trapped every .admin-modal-shell under the sidebar. */
.admin-app { isolation: auto; }
.admin-app > .admin-shell { z-index: auto; }
/* Without that context the top bar keeps its own: above the panel (its menus open over content),
   below the sidebar drawer (80), the notifications drawer (119) and dialogs (10000). */
.admin-topbar { z-index: 50; }
:root { --admin-topbar-control-height: 40px; }

/* the title tab joins the panel on every page (some legacy page shells set a gap between them) */
.admin-shell-main { gap: 0; }
/* colour-mode switch: the current mode's mark (moon in dark, sun in light); see the fidelity section below */
.ed-theme-btn { width: 40px; padding: 0 !important; justify-content: center; }
.ed-theme-btn svg { flex: none; width: 17px !important; height: 17px !important; }
.ed-theme-btn .ed-theme-moon { display: none; }
:root[data-admin-theme='light'] .ed-theme-btn .ed-theme-sun { display: none; }
:root[data-admin-theme='light'] .ed-theme-btn .ed-theme-moon { display: block; }

/* ---------- phone: dialogs and the on-screen keyboard (mobile.js sets these body classes) ---------- */
@media (max-width: 767px) {
  body.ed-dialog-open .admin-mobile-tabbar, body.ed-dialog-open .ed-mobile-toggle { visibility: hidden !important; }
  body.ed-keyboard-open .admin-mobile-tabbar, body.ed-keyboard-open:not(.admin-rail-open) .ed-mobile-toggle { display: none !important; }
  .admin-modal-shell { box-sizing: border-box; padding: 12px !important; grid-template-columns: minmax(0, 1fr); }
  /* the Orders filter is a full-screen sheet on phones */
  .admin-modal-shell:has(> .admin-orders-filter-card) { padding: 0 !important; }
}
.ed-scroll-region:focus-visible { outline: 2px solid var(--ed-ink3); outline-offset: 2px; }
/* phones: the inbox is a full-screen sheet */
@media (max-width: 767px) {
  .admin-notification-drawer { top: 0; right: 0; bottom: 0; left: 0; width: 100vw; border: 0; border-radius: 0; }
}
/* phones: a page's own actions come before the shared search and theme buttons */
@media (max-width: 767px) {
  .admin-topbar > :not(:first-child):not(.admin-topbar-actions) { order: 2; }
  .admin-topbar > .admin-topbar-actions { order: 3; }
}

/* ======================================================================================
   4.0 fidelity pass: the shell as drawn on the Sidebar, Topbar, Notifications, PageSearch,
   PhoneMenu and PhoneNotifications boards.
   ====================================================================================== */

/* ---------- sidebar details ---------- */
.ed-nav-footer .ed-group-pages { margin: 2px 0 6px 21px; }

/* ---------- top bar ---------- */
.admin-topbar-left, .admin-topbar > .admin-topbar-brand:first-child, .admin-topbar > .admin-heading-with-back:first-child { max-width: 52%; }
.admin-topbar-brand h1, .admin-topbar h1 { font-size: 1.5rem; line-height: 1.4; }
.admin-topbar h1.is-long-title { font-size: 1.3125rem; }
.admin-topbar-actions > button, .admin-topbar-actions > a { padding: 0 15px; }
/* the live pill opens the frame row; the page's own actions sit at its right end, beside search */
.admin-topbar-actions > .ed-view-actions { flex: 1 1 auto; justify-content: flex-end; margin-right: 0; min-width: 0; }
.admin-topbar-actions > .ed-view-actions > .ed-live { margin-right: auto; }
/* record pages: a back button beside the title, the parent's name above it (Topbar board) */
.has-back-btn { position: relative; padding-left: 62px !important; }
.ed-back-btn { position: absolute; left: 16px; top: calc(50% + 3px); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink2); transform: translateY(-50%); transition: background-color 0.25s, color 0.25s; }
.ed-back-btn:hover { background: var(--ed-raise); color: var(--ed-ink); }
.ed-back-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-back-btn[hidden], .ed-back[hidden] { display: none !important; }
/* placed first in a title box, the back button must not take the caption-link look */
.admin-topbar-brand > a.ed-back-btn:first-child { display: grid; gap: 0; margin: 0; color: var(--ed-ink2); font-size: inherit; }
.ed-back.ed-back-caption { margin: 0; font-size: 0.75rem; white-space: nowrap; }
.ed-back.ed-back-caption svg { display: none; }

/* round frame buttons: the board's search glass, bell and colour-mode marks */
:root {
  --ed-i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E");
  --ed-i-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 16.5V11a5.5 5.5 0 0 1 11 0v5.5l1.5 1.5H5zM10 20.5h4'/%3E%3C/svg%3E");
}
.admin-search-shell .admin-search-icon-button > svg, .admin-notification-button-icon > svg { display: none; }
.admin-search-shell .admin-search-icon-button::before, .admin-notification-button-icon::before { content: ''; display: block; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--ed-i-search) center / contain no-repeat; mask: var(--ed-i-search) center / contain no-repeat; }
.admin-notification-button-icon::before { -webkit-mask-image: var(--ed-i-bell); mask-image: var(--ed-i-bell); transform-origin: 50% 20%; }
.admin-notification-button:has([data-billing-notification-count]:not([hidden])) .admin-notification-button-icon::before { animation: ed-ring 1.2s var(--ed-ease) 0.9s 1 both; }
@keyframes ed-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-10deg); } 60% { transform: rotate(6deg); } 80% { transform: rotate(-3deg); } }
/* unread is a red dot on the bell (the count is read out in the button's label) */
.admin-notification-button [data-billing-notification-count] { top: 9px; right: 10px; width: 7px; min-width: 0; height: 7px; padding: 0; border: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--ed-fitem); font-size: 0; line-height: 0; color: transparent; overflow: hidden; }
.admin-notification-button:hover [data-billing-notification-count] { box-shadow: 0 0 0 2px var(--ed-fon); }
/* colour mode: the moon shows in the dark theme and the sun in the light one, turning as they swap */
.ed-theme-btn { position: relative; overflow: hidden; }
.ed-theme-btn svg { position: absolute; top: 50%; left: 50%; margin: -9px 0 0 -9px; width: 18px !important; height: 18px !important; stroke-width: 1.9 !important; transition: opacity 0.4s, transform 0.6s var(--ed-ease); }
.ed-theme-btn .ed-theme-sun { width: 19px !important; height: 19px !important; margin: -9.5px 0 0 -9.5px; }
.ed-theme-btn .ed-theme-moon, :root[data-admin-theme='light'] .ed-theme-btn .ed-theme-sun { display: block; opacity: 1; transform: none; }
.ed-theme-btn .ed-theme-sun { display: block; opacity: 0; transform: rotate(90deg) scale(0.5); }
:root[data-admin-theme='light'] .ed-theme-btn .ed-theme-moon { display: block; opacity: 0; transform: rotate(-90deg) scale(0.5); }

/* ---------- page search (PageSearch board) ---------- */
.ed-search { position: fixed; inset: 96px auto auto calc((100vw + var(--ed-nav-w)) / 2 - min(330px, (100vw - 32px) / 2)); width: min(660px, calc(100vw - 32px)); max-height: calc(100dvh - 120px); margin: 0; border-radius: 20px; }
.ed-search[open] { animation: ed-search-pop 0.35s var(--ed-ease) both; }
@keyframes ed-search-pop { from { opacity: 0; transform: translate3d(0, -8px, 0) scale(0.98); } to { opacity: 1; transform: none; } }
.ed-search::backdrop { background: rgba(0, 0, 0, 0.5); }
.ed-search-head { gap: 12px; height: 60px; padding: 0 12px 0 18px; }
.ed-search-head > svg { width: 19px; height: 19px; }
.ed-search-head input[type='search'] { font-size: 1rem; }
.ed-search-head input[type='search'].is-code { font-family: var(--ed-mono); }
.ed-search-head input[type='search']::-webkit-search-cancel-button { display: none; }
.ed-search-head .ed-search-clear { width: 30px; height: 30px; min-height: 0; border-radius: 9px; }
.ed-search-head .ed-search-clear svg { width: 15px; height: 15px; stroke-width: 2.2; }
.ed-search-head .ed-search-esc { width: auto; height: 24px; min-height: 0; padding: 0 7px; border: 1px solid var(--ed-line2); border-radius: 7px; background: transparent; color: var(--ed-ink3); font: 0.7188rem/22px var(--ed-mono); }
.ed-search-head .ed-search-esc:hover { background: var(--ed-card2); color: var(--ed-ink); }
.ed-search-results, .ed-search-results[role='listbox'] { max-height: 456px; padding: 8px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.ed-search-section { padding: 10px 10px 4px; color: var(--ed-ink3); font-size: 0.7188rem; font-weight: 600; }
.ed-search-result, .ed-search-results > .ed-search-result[role='option'] { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 6px 10px; border-radius: 12px; color: var(--ed-ink); font-size: 0.8438rem; font-weight: 500; text-decoration: none; animation: ed-search-row 0.3s var(--ed-ease) calc(var(--row, 0) * 25ms) both; }
.ed-search-results > .ed-search-result[role='option'][aria-selected='true'] { font-weight: 500; }
.ed-search-results > .ed-search-result[role='option']::after { display: none; }
@keyframes ed-search-row { from { opacity: 0; transform: translate3d(0, 3px, 0); } to { opacity: 1; transform: none; } }
.ed-search-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink2); transition: background-color 0.15s; }
.ed-search-result.is-selected .ed-search-icon { background: var(--ed-raise); }
.ed-search-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-search-text { display: flex; flex-direction: column; min-width: 0; }
.ed-search-name { font-size: 0.8438rem; font-weight: 500; }
.ed-search-name mark { padding: 0 1px; border-radius: 3px; background: var(--ed-raise); color: var(--ed-ink); font-weight: 650; }
.ed-search-result small { color: var(--ed-ink3); font-size: 0.75rem; font-weight: 400; }
.ed-search-result kbd { visibility: hidden; height: 22px; padding: 0 7px; font-size: 0.6875rem; line-height: 20px; }
.ed-search-result.is-selected kbd { visibility: visible; }
.ed-search-note, .ed-search-results > .ed-search-note { margin: 6px 10px 8px; padding: 12px; border: 1px dashed var(--ed-line2); border-radius: 12px; color: var(--ed-ink3); font-size: 0.7813rem; text-align: left; }
.ed-search footer { align-items: center; height: 40px; padding: 0 18px; font-size: 0.75rem; }
.ed-search footer > span { display: inline-flex; align-items: center; gap: 6px; }
.ed-search footer kbd { height: auto; margin: 0; padding: 0 5px; border-radius: 5px; font-size: 0.6875rem; line-height: 1.45; }
.ed-search footer .ed-search-toggle-hint { margin-left: auto; }
@media (max-width: 767px) {
  .ed-search { inset: 12px 12px auto 12px; width: auto; max-height: calc(100dvh - 24px); }
  .ed-search footer { display: none; }
  .ed-search-results, .ed-search-results[role='listbox'] { max-height: calc(100dvh - 100px); }
}

/* ---------- notifications drawer (Notifications board) ---------- */
:root, :root[data-admin-theme='dark'] { --ed-drawer: #181818; }
:root[data-admin-theme='light'] { --ed-drawer: #fbfbfb; }
.admin-notification-drawer { background: var(--ed-drawer); opacity: 0; transform: translate3d(24px, 0, 0); transition: transform 0.45s var(--ed-ease), opacity 0.45s var(--ed-ease), visibility 0s linear 0.45s; }
.admin-notification-drawer.is-open { opacity: 1; transform: none; transition: transform 0.45s var(--ed-ease), opacity 0.45s var(--ed-ease), visibility 0s; }
.admin-notification-backdrop { background: rgba(0, 0, 0, 0.5); }
.admin-notification-head-main > div { min-width: 0; }
.admin-notification-head h2 { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-notification-head h2:empty { display: none; }
.admin-notification-mode { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-notification-head .admin-notification-back { margin-left: -6px; color: var(--ed-ink2); }
.admin-notification-head .admin-notification-back svg { width: 17px; height: 17px; }
.admin-notification-head .admin-orders-icon-btn svg { width: 16px; height: 16px; }
.ed-notification-mark-read { flex: none; height: 30px; min-height: 30px; padding: 0 10px; border-radius: 9px; background: transparent; color: var(--ed-ink2); font-size: 0.7813rem; font-weight: 400; }
.ed-notification-mark-read:hover { background: var(--ed-raise); color: var(--ed-ink); }
.ed-notification-mark-read:disabled { opacity: 0.4; }
.ed-notification-tools { padding: 0 18px 12px; }
.ed-notification-tools > div[role='group'] { position: relative; border-radius: 11px; }
.ed-notification-slide { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 4px); border-radius: 8px; background: var(--ed-raise); transition: transform 0.45s var(--ed-ease); pointer-events: none; }
.ed-notification-tools.is-new .ed-notification-slide { transform: translateX(calc(100% + 2px)); }
.ed-notification-tools > div[role='group'] > button { position: relative; height: 30px; min-height: 30px; border-radius: 8px; background: transparent !important; font-size: 0.7813rem; transition: color 0.25s; }
.ed-notification-tools > div[role='group'] > button:hover { color: var(--ed-ink); }
.ed-notification-tools > div[role='group'] > button span { margin-left: 6px; font: 400 0.7188rem var(--ed-mono); color: var(--ed-ink3); }
.ed-notification-group { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 8px 6px; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-notification-group > span { color: var(--ed-ink2); font-weight: 600; }
.ed-notification-group > small { font-size: inherit; }
.admin-partner-billing-list { gap: 0; }
.admin-billing-notification-row { display: block; min-height: 0; padding: 0; border-radius: 12px; background: transparent; animation: ed-note-row 0.4s var(--ed-ease) calc(var(--billing-row-index, 0) * 40ms) both; }
.admin-billing-notification-row:hover { background: transparent; }
@keyframes ed-note-row { from { opacity: 0; transform: translate3d(0, 4px, 0); } to { opacity: 1; transform: none; } }
.admin-billing-notification-main { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 11px; align-items: center; box-sizing: border-box; width: 100%; min-height: 66px; padding: 8px; border: 0; border-radius: 12px; background: transparent; color: var(--ed-ink); text-align: left; transition: background-color 0.2s; }
.admin-billing-notification-main:hover { background: var(--ed-card2); }
.admin-billing-notification-main:active { transform: none; }
.ed-note-icon { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink2); }
.admin-billing-notification-main:hover .ed-note-icon { background: var(--ed-raise); }
.ed-note-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-note-icon > i { position: absolute; top: -2px; right: -2px; box-sizing: content-box; width: 9px; height: 9px; border: 2px solid var(--ed-drawer); border-radius: 50%; background: var(--ed-red); }
.admin-billing-notification-copy { display: block; min-width: 0; }
.admin-billing-notification-copy strong { font-size: 0.8125rem; font-weight: 500; overflow-wrap: anywhere; }
.admin-billing-notification-row.is-new .admin-billing-notification-copy strong { font-weight: 650; }
.admin-billing-notification-copy > span { display: block; color: var(--ed-ink2); font-size: 0.7813rem; overflow-wrap: anywhere; }
.admin-billing-notification-copy > small { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--ed-amber); font-size: 0.75rem; }
.admin-billing-notification-copy > small > i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.admin-billing-notification-copy > small.is-cyan { color: var(--ed-cyan); }
.admin-billing-notification-copy > small.is-muted { color: var(--ed-ink3); }
.admin-billing-notification-copy :is(span, small) > span { display: inline; margin: 0; color: inherit; font-size: inherit; }
.ed-note-time { align-self: start; padding-top: 2px; color: var(--ed-ink3); font-size: 0.7188rem; white-space: nowrap; }
.admin-notification-empty.admin-billing-empty { display: block; min-height: 0; margin: 30px 18px; padding: 0; color: var(--ed-ink3); font-size: 0.7813rem; text-align: center; }
.admin-billing-loading { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.ed-note-skel { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 11px; align-items: center; min-height: 66px; padding: 8px; }
.ed-note-skel > .ed-skel { width: 36px; height: 36px; border-radius: 11px; }
.ed-note-skel > span { display: flex; flex-direction: column; gap: 6px; }
.ed-note-skel > span > .ed-skel { height: 10px; }
.ed-note-skel > span > .ed-skel:nth-child(1) { width: 45%; }
.ed-note-skel > span > .ed-skel:nth-child(2) { width: 80%; }
.ed-note-skel > span > .ed-skel:nth-child(3) { width: 55%; }
/* an opened item: the board's detail views */
.admin-billing-detail { gap: 14px; padding: 4px 8px 18px; animation: ed-note-view 0.35s var(--ed-ease) both; }
@keyframes ed-note-view { from { opacity: 0; transform: translate3d(12px, 0, 0); } to { opacity: 1; transform: none; } }
.admin-billing-feedback:not(.is-error) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 60%; padding: 24px 32px 80px; text-align: center; }
.admin-billing-feedback:not(.is-error) > strong { margin-top: 4px; font-size: 1rem; font-weight: 650; }
.admin-billing-feedback:not(.is-error) > p { max-width: 300px; margin: 0; color: var(--ed-ink2); font-size: 0.8125rem; }
.admin-billing-feedback:not(.is-error) > button { height: 36px; min-height: 36px; margin-top: 8px; }
.ed-note-done { display: grid; place-items: center; width: 56px; height: 56px; box-sizing: border-box; border: 1.5px solid rgba(94, 224, 166, 0.45); border-radius: 50%; color: var(--ed-mint); animation: ed-note-done 0.6s var(--ed-ease) both; }
.ed-note-done.is-muted { border-color: var(--ed-line2); color: var(--ed-ink2); }
.ed-note-done svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes ed-note-done { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.admin-billing-feedback.is-error { margin: 8px; }
/* an opened item (the board's deposit view): summary card, framed proof, fields, actions at the foot */
.admin-notification-list:has(> .ed-nd), .admin-notification-list:has(> .admin-billing-feedback:not(.is-error)) { display: flex; flex-direction: column; padding: 0; }
.admin-notification-list > .admin-billing-feedback:not(.is-error) { flex: 1 0 auto; min-height: 0; }
.admin-billing-detail.ed-nd { display: flex; flex-direction: column; flex: 1 0 auto; gap: 14px; padding: 4px 18px 18px; }
.ed-nd-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.ed-nd-form[hidden], .ed-nd-field[hidden], .ed-nd-error[hidden] { display: none; }
.ed-nd-sum { display: flex; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 12px; background: var(--ed-card2); color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-nd-sum > span:first-child { min-width: 0; }
.ed-nd-sum > span:last-child:not(:first-child) { flex: none; max-width: 48%; color: var(--ed-ink3); font-size: 0.75rem; text-align: right; overflow-wrap: anywhere; }
.ed-nd-sum b { display: block; font-weight: 500; }
.ed-nd-sum > span:first-child > b { color: var(--ed-ink); font: 600 1.125rem/1.35 var(--ed-mono); overflow-wrap: anywhere; }
.ed-nd-sum > span:first-child > b > i { margin: 0 6px; color: var(--ed-ink3); font-style: normal; font-weight: 400; }
.ed-nd-sum > span:last-child:not(:first-child) > b { color: var(--ed-ink2); }
/* the claimed amount doubles as the amount to credit: it reads as the board's figure until edited */
.ed-nd-money { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; color: var(--ed-ink); }
.ed-nd-money > em { flex: none; color: var(--ed-ink3); font: 400 0.75rem var(--ed-mono); font-style: normal; }
.ed-nd-money > input { box-sizing: border-box; width: 112px; min-width: 0; height: 32px; min-height: 0; padding: 0 8px; border: 0; border-radius: 9px; background: var(--ed-card); color: var(--ed-ink); font: 500 0.8125rem var(--ed-mono); text-align: right; box-shadow: none; }
.ed-nd-money.is-big { display: flex; margin-top: 1px; }
.ed-nd-money.is-big > em { display: none; }
.ed-nd-money.is-big > input { width: 100%; height: auto; padding: 0; border-radius: 6px; background: transparent; font: 600 1.125rem/1.35 var(--ed-mono); text-align: left; transition: background-color 0.2s, box-shadow 0.2s; }
.ed-nd-money.is-big::before { content: 'Rp'; flex: none; color: var(--ed-ink); font: 600 1.125rem/1.35 var(--ed-mono); }
.ed-nd-sum.is-edit:hover .ed-nd-money.is-big > input { background: transparent; box-shadow: 0 1px 0 var(--ed-line2); }
.ed-nd-money.is-big > input:focus, .ed-nd-money.is-big > input:focus-visible { background: transparent !important; box-shadow: 0 1px 0 var(--ed-ink3) !important; outline: 0; }
.ed-nd-proof { display: grid; place-items: center; height: 222px; overflow: hidden; border: 1px solid var(--ed-line); border-radius: 14px; background: var(--ed-card2); }
.ed-nd-proof > a { display: grid; place-items: center; width: 100%; height: 100%; }
.ed-nd-proof img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.ed-nd-proof.is-pdf { height: 320px; }
.ed-nd-proof object { width: 100%; height: 100%; }
.ed-nd-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.ed-nd-field > span:first-child { color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-nd-field > p { margin: 0; color: var(--ed-ink); font-size: 0.8125rem; line-height: 1.45; overflow-wrap: anywhere; }
.ed-nd-field textarea { box-sizing: border-box; width: 100%; min-height: 0; padding: 10px 12px; border: 0; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.8125rem; resize: vertical; box-shadow: none; animation: ed-note-row 0.3s var(--ed-ease) both; }
.ed-nd-order { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: var(--ed-card2); }
.ed-nd-order > header, .ed-nd-order.is-row { display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.ed-nd-order > header { flex-wrap: wrap; }
.ed-nd-order > header > strong { min-width: 0; font: 500 0.7813rem var(--ed-mono); white-space: nowrap; }
.ed-nd-order > header > b { margin-left: auto; }
.ed-nd-order b { flex: none; font: 600 0.7813rem var(--ed-mono); white-space: nowrap; }
.ed-nd-order b > i { color: var(--ed-ink3); font-style: normal; font-weight: 400; }
.ed-nd-order > p { margin: 0; color: var(--ed-ink2); font-size: 0.7813rem; overflow-wrap: anywhere; }
.ed-nd-order > small, .ed-nd-order.is-row small { color: var(--ed-ink3); font-size: 0.75rem; }
.ed-nd-order.is-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ed-nd-order.is-row strong { font-size: 0.8125rem; font-weight: 500; overflow-wrap: anywhere; }
.ed-nd-field > .ed-nd-order + .ed-nd-order { margin-top: 2px; }
.ed-nd-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--ed-line); }
.ed-nd-line > span:first-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 140px; }
.ed-nd-line strong { font-size: 0.7813rem; font-weight: 500; overflow-wrap: anywhere; }
.ed-nd-line small { color: var(--ed-ink3); font-size: 0.7188rem; }
.ed-nd-price { display: inline-flex; align-items: center; gap: 6px; flex: none; font: 0.75rem var(--ed-mono); }
.ed-nd-price del { color: var(--ed-ink3); }
.ed-nd-price > i { color: var(--ed-ink3); font-style: normal; }
.ed-nd-file { display: flex; align-items: center; gap: 10px; }
.ed-nd-file small { color: var(--ed-ink3); font-size: 0.75rem; overflow-wrap: anywhere; }
.ed-nd-error { margin: 0; padding: 10px 12px; border: 1px solid rgba(255, 107, 129, 0.42); border-radius: 12px; color: var(--ed-red); font-size: 0.7813rem; }
.ed-nd-actions { display: flex; gap: 8px; margin-top: auto; }
.ed-nd-actions.is-reversed { flex-direction: row-reverse; }
.ed-nd :is(.ed-nd-primary, .ed-nd-danger, .ed-nd-quiet) { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 42px; min-height: 42px; padding: 0 16px; border-radius: 12px; font-size: 0.8125rem; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 0.25s, opacity 0.25s, transform 0.35s var(--ed-ease); }
.ed-nd .ed-nd-primary { flex: 1; min-width: 0; border: 0; background: var(--ed-ink); color: var(--ed-card); font-size: 0.8438rem; font-weight: 650; }
.ed-nd .ed-nd-primary:hover { background: var(--ed-ink); opacity: 0.9; }
.ed-nd .ed-nd-danger { flex: none; border: 1px solid rgba(255, 107, 129, 0.42); background: transparent; color: var(--ed-red); }
.ed-nd .ed-nd-danger:hover { background: rgba(255, 107, 129, 0.08); }
.ed-nd .ed-nd-quiet { flex: none; border: 0; background: var(--ed-card2); color: var(--ed-ink); font-weight: 500; }
.ed-nd .ed-nd-quiet:hover { background: var(--ed-raise); }
.ed-nd-form > .ed-nd-quiet { align-self: flex-start; height: 36px; min-height: 36px; padding: 0 14px; border-radius: 11px; font-size: 0.7813rem; }
.ed-nd-file > .ed-nd-quiet { height: 32px; min-height: 32px; padding: 0 12px; border-radius: 9px; font-size: 0.75rem; }
.ed-nd :is(.ed-nd-primary, .ed-nd-danger, .ed-nd-quiet):active { transform: scale(0.97); }
.ed-nd-link { align-self: flex-start; margin-top: -6px; color: var(--ed-ink3); font-size: 0.75rem; text-decoration: none; }
.ed-nd-link:hover { color: var(--ed-ink); }
.ed-nd .ed-nd-primary:disabled, .ed-nd .ed-nd-danger:disabled, .ed-nd .ed-nd-quiet:disabled { opacity: 0.4; }
/* touch screens: the drawer's controls get the same 44px tap targets as the page's */
@media (max-width: 1024px) and (pointer: coarse) { .admin-notification-drawer :is(button, .ed-nd-primary) { min-height: 44px !important; } }
@media (max-width: 767px) {
  .admin-notification-drawer { transform: translate3d(0, 24px, 0); }
  .admin-notification-drawer.is-open { transform: none; }
}
/* the ad budget alert sits inside the panel, so the panel's gap spaces it */
:is(main, .admin-layout) > .ed-budget-alert { margin: 0; }

/* ---------- phones (PhoneMenu, PhoneNotifications and the phone page boards) ---------- */
.ed-nav-theme { display: none; }
.ed-title-live-mirror { display: none; }
.ed-nav .ed-ph-mark { display: none; }
@media (max-width: 767px) {
  :root { --ed-ph-item: rgba(255, 255, 255, 0.07); }
  :root[data-ed-nav] body { padding: 0; }
  /* the header: menu, page name, search and bell on the frame, always at the top */
  .ed-mobile-toggle, .admin-mobile-rail-toggle { top: 12px; left: 12px; background: var(--ed-ph-item); }
  .admin-shell-main { padding-top: 64px; }
  .admin-topbar { margin: 0; }
  .admin-topbar-left, .admin-topbar > .admin-topbar-brand:first-child, .admin-topbar > .admin-heading-with-back:first-child { position: fixed; top: 0; left: 0; right: 0; z-index: 72; box-sizing: border-box; width: auto; max-width: none; height: 64px; min-height: 64px; padding: 0 112px 0 62px !important; justify-content: center; background: var(--ed-frame); }
  .admin-topbar-left { flex-direction: row; align-items: center; justify-content: flex-start; }
  .admin-topbar-left > .admin-topbar-brand, .admin-topbar-left > .ed-sales-titlebar { min-width: 0; max-width: 100%; }
  /* the ad budget alert on a phone: one compact row (PhoneOverview board) */
  .ed-budget-alert { flex-wrap: nowrap; gap: 10px; min-height: 0; padding: 10px; }
  .ed-budget-icon { width: 34px; height: 34px; border-radius: 11px; }
  .ed-budget-icon > i { border-radius: 11px; }
  .ed-budget-icon svg { width: 17px; height: 17px; }
  .ed-budget-alert > div { flex: 1 1 auto; font-size: 0.7813rem; }
  .ed-budget-alert strong { font-size: 0.8125rem; }
  .ed-budget-alert > a { flex: none; width: auto; height: 32px; padding: 0 11px; border-radius: 10px; font-size: 0.75rem; }
  .ed-budget-alert > a svg { display: none; }
  .admin-topbar-left > :not(h1):not(.admin-topbar-brand):not(.ed-sales-titlebar):not(.g-titlestack) { display: none; }
  .admin-topbar-brand h1, .admin-topbar h1, .admin-topbar h1.is-long-title { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; }
  /* the smallest phones: a long page name steps down a size and takes two lines rather than being cut */
  @media (max-width: 380px) { .admin-topbar h1, .admin-topbar-brand h1, .admin-topbar h1.is-long-title { font-size: 1rem; line-height: 1.2; padding: 0; } }
  /* a long page or record name takes up to two lines inside the 64px header, then ends in an
     ellipsis as the Topbar board's title does; it never runs out of the header over the page */
  :root[data-ed-nav] .admin-topbar h1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; max-width: 100%; line-height: 1.2; white-space: normal; overflow: hidden; text-overflow: clip; overflow-wrap: anywhere; }
  .admin-topbar .ed-back-btn { display: none !important; }
  /* the live line under the page title (PhoneOverview, PhoneOrders, PhoneAccounting boards) */
  :root[data-ed-nav] .admin-topbar .ed-live.is-title-live { display: inline-flex !important; position: fixed; top: 36px; left: 62px; z-index: 73; width: auto; max-width: calc(100vw - 174px); height: 16px; min-height: 0; gap: 5px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ed-fink2); font-size: 0.7188rem; line-height: 16px; white-space: nowrap; overflow: hidden; }
  :root[data-ed-nav] .admin-topbar .ed-live.is-title-live .ed-live-clock { color: inherit; font: inherit; }
  :root[data-ed-nav] .admin-topbar .ed-live.is-title-live .ed-live-clock:not(:empty)::before { content: '· '; }
  :root[data-ed-nav] .admin-topbar .ed-live.is-title-live > small:not(.ed-sr):not(:empty) { display: inline; color: inherit; font: inherit; }
  :root[data-ed-nav] .admin-topbar .ed-live.is-title-live > small:not(.ed-sr):not(:empty)::before { content: '· '; }
  :root.ed-has-title-live .admin-topbar h1 { transform: translateY(-8px); -webkit-line-clamp: 1; line-clamp: 1; }
  .has-back-btn { padding-left: 62px !important; }
  /* the page's own actions: one full-width row under the header that wraps rather than cutting a button off */
  .admin-topbar-actions { box-sizing: border-box; width: auto; max-width: none; flex-wrap: wrap; overflow: visible; padding: 2px 12px 10px; }
  .admin-topbar-actions > .ed-view-actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; max-width: 100%; }
  .admin-topbar-actions > * { max-width: 100%; }
  .admin-search-shell, .admin-search-shell-topbar { position: fixed !important; top: 12px; right: 60px; z-index: 81; background: var(--ed-ph-item); border-radius: 12px; }
  .admin-search-shell .admin-search-icon-button { border-radius: 12px; }
  .admin-notification-button, .admin-topbar-actions > .admin-notification-button { top: 12px; right: 12px; border-radius: 12px; background: var(--ed-ph-item); }
  .admin-notification-button [data-billing-notification-count] { top: 8px; right: 9px; width: 8px; height: 8px; border: 2px solid var(--ed-frame); box-shadow: none; box-sizing: content-box; }
  .admin-topbar-actions > .ed-theme-btn { display: none; }
  .admin-layout, .admin-shell-main > main { padding: 14px 12px 96px; border-radius: 24px 24px 0 0; }
  /* the tab bar: four tabs along the bottom edge */
  .admin-mobile-tabbar { left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px 10px calc(14px + env(safe-area-inset-bottom, 0px)); border: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0; background: var(--ed-frame); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .admin-mobile-tab { height: auto; min-height: 44px; padding: 6px 0; gap: 3px; border-radius: 12px; font-size: 0.6875rem; }
  .admin-mobile-tab.is-active, .admin-mobile-tab[aria-current='page'] { background: transparent; color: var(--ed-facc); font-weight: 650; }
  .admin-mobile-tabbar:not([data-ed-tabs]) .admin-mobile-tab:nth-child(n+5) { display: none; }
  :root[data-ed-nav] body { padding-bottom: 0; }
  /* the menu: a full-screen sheet on the frame */
  .ed-nav { width: 100vw; padding: 0 12px 18px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; transform: translate3d(-14px, 0, 0); opacity: 0; visibility: hidden; transition: transform 0.4s var(--ed-ease), opacity 0.4s var(--ed-ease), visibility 0s linear 0.4s; }
  body.admin-rail-open .ed-nav { transform: none; opacity: 1; visibility: visible; box-shadow: none; transition: transform 0.4s var(--ed-ease), opacity 0.4s var(--ed-ease), visibility 0s; }
  body.admin-rail-open .ed-mobile-toggle { top: 12px; right: 12px; left: auto; color: var(--ed-fink); }
  .admin-mobile-rail-backdrop { display: none; }
  .ed-navigation-columns, .ed-nav-footer { display: contents; }
  .ed-nav-head, .ed-search-open, .ed-budget-link, .ed-areas, .ed-foot-line, .ed-nav-footer > .ed-group, .ed-foot-link, .ed-build { flex: none; }
  .ed-nav-head { order: 0; height: 64px; margin: 0; padding: 0 104px 0 0; }
  .ed-brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--ed-ph-item); }
  .ed-brand-mark img { width: 22px; height: 22px; }
  .ed-brand-copy strong { font-size: 1rem; }
  .ed-nav-theme { position: absolute; top: 12px; right: 62px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ed-ph-item) !important; color: var(--ed-fink2); }
  .ed-nav-theme svg { width: 17px !important; height: 17px !important; stroke-width: 2 !important; margin: -8.5px 0 0 -8.5px !important; }
  .ed-search-open { order: 1; height: 46px; margin: 6px 0 0; padding: 0 14px !important; border-radius: 14px; background: var(--ed-ph-item) !important; font-size: 0.875rem; }
  .ed-search-open > span { font-size: 0; }
  .ed-search-open > span::before { content: 'Find a page or order ID'; font-size: 0.875rem; }
  .ed-search-open kbd { display: none; }
  .ed-budget-link { order: 2; margin: 10px 0 0; padding: 11px 13px; border-color: rgba(255, 107, 129, 0.5); border-radius: 14px; font-size: 0.8125rem; line-height: 1.4; }
  .ed-budget-link > i { width: 8px; height: 8px; }
  .ed-budget-link small { font-size: 0.75rem; }
  .ed-budget-link::after { content: ''; flex: none; width: 15px; height: 15px; margin-left: auto; background: var(--ed-fink2); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10 7 5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10 7 5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat; }
  .ed-areas { order: 3; margin-top: 12px; }
  .ed-foot-line { order: 4; margin: auto 0 0; padding-top: 12px; height: 0; background: none; border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .ed-nav-footer > .ed-group, .ed-launcher, .ed-lock { order: 5; }
  .ed-build { order: 6; margin: 0; padding: 8px 12px 0; color: #8c8c8c; font-size: 0.6875rem; letter-spacing: 0; text-transform: lowercase; }
  .ed-build::first-letter { text-transform: uppercase; }
  .ed-group-head { color: var(--ed-fink); }
  .ed-area { height: 50px; gap: 12px; border-radius: 13px; font-size: 0.9375rem; }
  .ed-area > svg { width: 19px; height: 19px; color: var(--ed-fink2); }
  .ed-area > svg:first-child:has(+ .ed-ph-mark) { display: none; }
  .ed-area > .ed-ph-mark { display: block; }
  /* Settings is a plain link to its first page here */
  .ed-nav-footer .ed-group[data-ed-group='settings'] .ed-group-toggle, .ed-nav-footer .ed-group[data-ed-group='settings'] > .ed-group-pages { display: none !important; }
  .ed-nav-footer .ed-group[data-ed-group='settings'] .ed-area { padding-right: 12px !important; background: transparent !important; }
  .ed-nav-footer .ed-group[data-ed-group='settings'] .ed-area svg:first-child { transform: none !important; }
  /* a tap leaves no hover colour behind on the round header buttons */
  .ed-mobile-toggle:hover, .admin-mobile-rail-toggle:hover, .ed-nav-theme:hover, .admin-notification-button:hover { background: var(--ed-ph-item) !important; color: var(--ed-fink); }
  .admin-search-shell .admin-search-icon-button:hover { background: transparent !important; }
  .ed-area.is-selected > svg { color: var(--ed-facc); }
  .ed-group.is-open > .ed-group-head > .ed-area { background: var(--ed-ph-item); font-weight: 600 !important; }
  .ed-group-toggle { top: 9px; right: 6px; color: #8c8c8c; }
  .ed-chev svg { width: 15px; height: 15px; transform: rotate(90deg); }
  .ed-group.is-open > .ed-group-head .ed-chev svg { transform: rotate(-90deg); }
  .ed-chev { opacity: 1; }
  .ed-area-mark, .ed-group:not(.is-open) .ed-area.has-alert .ed-area-mark { position: static; flex: none; margin-left: auto; box-shadow: none; }
  .ed-area.has-budget-alert .ed-area-mark { position: static; width: 16px; height: 16px; background: var(--ed-alert); }
  .ed-group-pages { margin: 0 0 6px 22px; padding-left: 13px; border-left-color: rgba(255, 255, 255, 0.08); }
  .ed-gap { display: none; }
  /* the phone menu lists All orders before Create direct order (PhoneMenu board) */
  .ed-group-pages > .ed-page { order: 2; }
  .ed-group-pages > .ed-page[data-ed-page='orders'] { order: 0; }
  .ed-group-pages > .ed-page.is-action { order: 1; }
  .ed-page { height: 42px; padding: 0 12px; border-radius: 11px; font-size: 0.875rem; }
  .ed-page.is-current { background: var(--ed-ph-item); box-shadow: none; }
  .ed-page > svg { display: none; }
  .ed-foot-link { height: 46px; border-radius: 13px; font-size: 0.875rem; font-weight: 400; }
  .ed-foot-link > svg { width: 18px; height: 18px; }
  .ed-nav-footer .ed-area { height: 46px; font-size: 0.875rem; font-weight: 400 !important; color: var(--ed-fink2); }
  .ed-nav-footer .ed-group-head { color: var(--ed-fink2); }
  /* the inbox (PhoneNotifications board): a full-screen sheet with each item on its own card */
  .admin-notification-drawer { z-index: 76; background: var(--ed-frame); color: var(--ed-fink); }
  /* the inbox is a page under the usual header: menu, title, search and the bell that closes it,
     with the tab bar still along the bottom */
  body.admin-notifications-open .admin-mobile-tabbar { z-index: 77; visibility: visible !important; }
  body.admin-notifications-open:not(.ed-notification-detail) .ed-mobile-toggle { visibility: visible !important; }
  .admin-notification-backdrop { display: none !important; }
  /* the top bar holds search and the bell; lift it over the inbox and show only those two */
  body.admin-notifications-open .admin-topbar { z-index: 78; visibility: hidden; }
  body.admin-notifications-open .admin-topbar :is(.admin-search-shell, .admin-notification-button) { visibility: visible; }
  .admin-notification-head { height: 64px; padding: 0 112px 0 62px; }
  .admin-notification-head > [data-billing-notification-close] { display: none; }
  .admin-notification-head .admin-notification-back { position: absolute; top: 12px; left: 12px; margin: 0; }
  body.ed-notification-detail .ed-mobile-toggle { visibility: hidden; }
  body.admin-rail-open .ed-mobile-toggle { visibility: visible; }
  .ed-notification-group > small { display: none; }
  .ed-notification-tools { align-items: center; }
  .ed-notification-tools > .ed-notification-mark-read { margin-left: auto; height: 32px; min-height: 32px; padding: 0; background: transparent !important; color: var(--ed-ink2); font-size: 0.7813rem; }
  .admin-notification-list { padding-bottom: 96px; }
  .admin-notification-list:has(> .ed-nd), .admin-notification-list:has(> .admin-billing-feedback:not(.is-error)) { padding: 0 0 84px; background: transparent; }
  .admin-notification-list > .admin-billing-feedback:not(.is-error) { border-radius: 24px 24px 0 0; background: var(--ed-panel); color: var(--ed-ink); }
  .admin-billing-detail.ed-nd { padding: 14px 12px 14px; border-radius: 24px 24px 0 0; background: var(--ed-panel); color: var(--ed-ink); }
  .admin-notification-head h2 { color: var(--ed-fink); font-size: 1.0625rem; }
  .admin-notification-mode { color: var(--ed-fink2); font-size: 0.7188rem; }
  .admin-notification-head .admin-orders-icon-btn, .admin-notification-head .admin-notification-back { width: 40px; height: 40px; border-radius: 12px; background: var(--ed-ph-item); color: var(--ed-fink); }
  .ed-notification-mark-read { color: var(--ed-fink2); }
  .ed-notification-tools, .admin-notification-list { background: var(--ed-panel); }
  .ed-notification-tools { padding: 14px 12px 0; border-radius: 24px 24px 0 0; }
  .ed-notification-tools > div[role='group'] { flex: 0 1 auto; gap: 6px; padding: 0; background: transparent; }
  .ed-notification-slide { display: none; }
  .ed-notification-tools > div[role='group'] > button { flex: none; height: 32px; min-height: 32px; padding: 0 12px; border: 1px solid var(--ed-line2); border-radius: 999px; color: var(--ed-ink); font-weight: 400; }
  .ed-notification-tools > div[role='group'] > button[aria-pressed='true'] { border-color: var(--ed-ink3); background: var(--ed-card2) !important; font-weight: 400; }
  .ed-notification-tools > div[role='group'] > button span { margin-left: 0; color: inherit; font: inherit; }
  .ed-notification-tools > div[role='group'] > button span::before { content: ' · '; }
  .admin-notification-list { padding: 4px 12px 24px; }
  .admin-partner-billing-list { gap: 10px; }
  .ed-notification-group { padding: 6px 2px 0; }
  .admin-billing-notification-main { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 12px; border-radius: 16px; background: var(--ed-card); }
  .admin-billing-notification-main:hover, .admin-billing-notification-main:active { background: var(--ed-card2); }
  .ed-note-icon { width: 38px; height: 38px; border-radius: 12px; }
  .ed-note-icon > i { border-color: var(--ed-card); }
  .admin-billing-notification-copy strong { font-size: 0.875rem; }
}

/* ---------- sign-in (SignIn board): spacing of the form and the code field's placeholder ---------- */
.ed-signin .ed-signin-form h2 + .ed-signin-label { margin-top: 0; }
.ed-signin .ed-signin-form .admin-login-error { box-sizing: border-box; min-height: 18px; margin: 4px 0 8px; padding: 0; font-size: 0.7813rem; line-height: 18px; }
.ed-signin .ed-signin-code input::placeholder { font-family: var(--ed-mono); font-size: 1rem; letter-spacing: 0; }
.ed-signin .ed-signin-build { color: var(--ed-fink2); }

/* ---------- the live pill in the top bar, in each state (States board) ---------- */
.admin-topbar .ed-live > i { position: relative; }
.admin-topbar .ed-live[data-overview-freshness='live'] > i { background: var(--ed-mint); }
.admin-topbar .ed-live[data-overview-freshness='live'] > i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ed-live-ping 1.8s var(--ed-ease) infinite; }
@keyframes ed-live-ping { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.4); opacity: 0; } }
/* updating: a small turning arc in place of the dot */
.admin-topbar .ed-live:is([data-overview-freshness='refreshing'], [data-overview-freshness='checking']) > i { width: 12px; height: 12px; border-radius: 0; background: var(--ed-fink2); -webkit-mask: var(--ed-arc) center / contain no-repeat; mask: var(--ed-arc) center / contain no-repeat; animation: ed-spin 0.9s linear infinite; }
/* paused on saved numbers, or offline */
.admin-topbar .ed-live[data-overview-freshness='cached'] > i, .admin-topbar .ed-live[data-overview-freshness='stale'] > i { background: var(--ed-amber); animation: none; }
.admin-topbar .ed-live[data-overview-freshness='offline'] > i { background: var(--ed-red); animation: none; }

/* The whole sidebar stays visible without scrolling: on shorter windows (mouse use only, so touch
   keeps 44px targets) rows tighten in steps instead of the page list scrolling. */
@media (min-width: 768px) and (pointer: fine) and (max-height: 940px) {
  .ed-nav { padding-top: 10px; }
  .ed-nav-head { margin-bottom: 8px; }
  .ed-search-open { height: 36px; margin-bottom: 10px; }
  .ed-area { height: 34px; }
  .ed-page { height: 28px; }
  .ed-group-pages { margin: 2px 0 6px 21px; }
  .ed-gap { margin: 3px 10px; }
  .ed-foot-link { height: 34px; }
  .ed-budget-link { min-height: 40px; margin-bottom: 6px; padding-block: 5px; }
}
@media (min-width: 768px) and (pointer: fine) and (max-height: 780px) {
  .ed-nav-head { height: 40px; }
  .ed-search-open { height: 32px; margin-bottom: 8px; }
  .ed-area { height: 30px; }
  .ed-page { height: 26px; }
  .ed-foot-link { height: 30px; }
  .ed-budget-link { min-height: 36px; padding-block: 4px; }
  .ed-foot-line { margin: 2px 12px 4px; }
}
@media (min-width: 768px) and (pointer: fine) and (max-height: 690px) {
  .ed-area { height: 28px; }
  .ed-page { height: 24px; }
  .ed-foot-link { height: 28px; }
  .ed-group-pages { gap: 1px; margin: 1px 0 4px 21px; }
  .ed-build { display: none; }
}
