/* Executive Dashboard 4.0 base: tokens, type, scrollbars, motion and every shared control.
   Zero-saturation charcoal. Violet is used only for the active navigation item. Status colour is
   text, a thin border, a dot or a strip; solid red is kept for the ad budget alert.
   The pre-4.0 layout rules live in @layer legacy (ed4/legacy/*.css); everything here is unlayered,
   so it always wins over them whatever their specificity. */

/* The boards load Geist from Google Fonts in four fixed weights (Geist 400/500/600/700, Mono
   400/500/600), so a 650 title renders at 700 there. The variable files are declared at the same
   fixed weights, so every weight snaps exactly as it does on the approved boards. */
@font-face { font-family: 'Geist'; src: url('/assets/fonts/geist.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/assets/fonts/geist.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/assets/fonts/geist.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/assets/fonts/geist.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/assets/fonts/geist-mono.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/assets/fonts/geist-mono.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/assets/fonts/geist-mono.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root,
:root[data-admin-theme='dark'] {
  color-scheme: dark;
  --ed-frame: #0b0b0b;
  --ed-panel: #141414;
  --ed-card: #1a1a1a;
  --ed-card2: #222222;
  --ed-raise: #2b2b2b;
  --ed-line: rgba(255, 255, 255, 0.08);
  --ed-line2: rgba(255, 255, 255, 0.14);
  --ed-ink: #ededed;
  --ed-ink2: #a8a8a8;
  --ed-ink3: #8c8c8c;
  --ed-menu: #202020;
  --ed-sheet: #1c1c1c;
  /* the frame (sidebar, top bar actions) stays dark in both themes */
  --ed-fink: #ededed;
  --ed-fink2: #9c9c9c;
  --ed-fitem: #171717;
  --ed-fon: #1f1f1f;
  --ed-facc: #c9a0ff;
  --ed-violet: #c9a0ff;
  --ed-red: #ff6b81;
  --ed-reds: rgba(255, 107, 129, 0.14);
  --ed-redl: rgba(255, 107, 129, 0.45);
  --ed-amber: #ffb547;
  --ed-ambers: rgba(255, 181, 71, 0.14);
  --ed-amberl: rgba(255, 181, 71, 0.4);
  --ed-mint: #5ee0a6;
  --ed-mints: rgba(94, 224, 166, 0.13);
  --ed-mintl: rgba(94, 224, 166, 0.4);
  --ed-cyan: #4fd8f0;
  --ed-cyans: rgba(79, 216, 240, 0.14);
  --ed-cyanl: rgba(79, 216, 240, 0.4);
  --ed-alert: #c81e3a;
  --ed-grid: rgba(255, 255, 255, 0.06);
  --ed-sh1: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 18px -10px rgba(0, 0, 0, 0.85);
  --ed-sh2: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -24px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.4);
  --ed-shm: 0 16px 40px rgba(0, 0, 0, 0.42);
  --ed-scrim: rgba(0, 0, 0, 0.62);
  --ed-thumb: rgba(150, 150, 150, 0.32);
  /* skeleton blocks, toasts and tooltips (both stay dark in the light theme), chart tooltip lift */
  --ed-sk: #262626;
  --ed-toast: #2a2a2a;
  --ed-tipsh: 0 18px 40px -16px rgba(0, 0, 0, 0.85);
  /* one deep, saturated chart palette applied by order; Others is grey */
  --ed-p1: #1fb6d9;
  --ed-p2: #7cc215;
  --ed-p3: #f59e0b;
  --ed-p4: #e8456b;
  --ed-p5: #3b82f6;
  --ed-p6: #c9952a;
  --ed-p0: #5c5c5c;
  /* sales accounts keep the Store Ops colours */
  --ed-acc-jg: #4fd8f0;
  --ed-acc-zero: #a6d95b;
  --ed-font: 'Geist', Inter, system-ui, sans-serif;
  --ed-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ed-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ed-r-card: 18px;
  --ed-r-field: 11px;

  /* old names still read by scripts and inline styles */
  --admin-bg: var(--ed-frame);
  --admin-surface: var(--ed-panel);
  --admin-surface-strong: var(--ed-card);
  --admin-surface-soft: var(--ed-card2);
  --admin-border: var(--ed-line2);
  --admin-text: var(--ed-ink);
  --admin-muted: var(--ed-ink2);
  --admin-shadow: none;
  --admin-accent-primary: var(--ed-ink);
  --admin-accent-secondary: var(--ed-ink2);
  --admin-accent-tertiary: var(--ed-red);
  --admin-accent-quaternary: var(--ed-ink);
  --admin-on-accent: var(--ed-panel);
  --admin-success: var(--ed-mint);
  --admin-warning: var(--ed-amber);
  --admin-danger: var(--ed-red);
  --admin-info: var(--ed-cyan);
  --admin-heading-font: var(--ed-font);
  --ui-accent: var(--ed-ink);
}

:root[data-admin-theme='light'] {
  color-scheme: light;
  --ed-frame: #262626;
  --ed-panel: #f2f2f2;
  --ed-card: #ffffff;
  --ed-card2: #f6f6f6;
  --ed-raise: #e9e9e9;
  --ed-line: rgba(0, 0, 0, 0.08);
  --ed-line2: rgba(0, 0, 0, 0.15);
  --ed-ink: #161616;
  --ed-ink2: #525252;
  --ed-ink3: #6b6b6b;
  --ed-menu: #ffffff;
  --ed-sheet: #ffffff;
  --ed-fink: #efefef;
  --ed-fink2: #a6a6a6;
  --ed-fitem: #2f2f2f;
  --ed-fon: #3a3a3a;
  --ed-facc: #d2adff;
  --ed-violet: #7a4fd6;
  --ed-red: #d42a48;
  --ed-reds: rgba(212, 42, 72, 0.1);
  --ed-redl: rgba(212, 42, 72, 0.4);
  --ed-amber: #a86400;
  --ed-ambers: rgba(214, 140, 20, 0.13);
  --ed-amberl: rgba(168, 100, 0, 0.4);
  --ed-mint: #0e8f5b;
  --ed-mints: rgba(14, 143, 91, 0.1);
  --ed-mintl: rgba(14, 143, 91, 0.4);
  --ed-cyan: #08819a;
  --ed-cyans: rgba(8, 129, 154, 0.1);
  --ed-cyanl: rgba(8, 129, 154, 0.4);
  --ed-alert: #d42a48;
  --ed-grid: rgba(0, 0, 0, 0.07);
  --ed-sh1: 0 1px 2px rgba(24, 20, 34, 0.06), 0 8px 20px -12px rgba(24, 20, 34, 0.25);
  --ed-sh2: 0 30px 60px -28px rgba(24, 20, 34, 0.45), 0 2px 8px rgba(24, 20, 34, 0.08);
  --ed-shm: 0 16px 40px rgba(24, 20, 34, 0.18);
  --ed-scrim: rgba(0, 0, 0, 0.42);
  --ed-thumb: rgba(0, 0, 0, 0.22);
  --ed-sk: #ececec;
  --ed-toast: #161616;
  --ed-tipsh: 0 18px 40px -18px rgba(24, 20, 34, 0.4), 0 2px 6px rgba(24, 20, 34, 0.08);
  --ed-p1: #0e9fc0;
  --ed-p2: #5e9a0f;
  --ed-p3: #d48606;
  --ed-p4: #d1335a;
  --ed-p5: #2563eb;
  --ed-p6: #a87a17;
  --ed-p0: #a0a0a0;
  --ed-acc-jg: #0b9bb8;
  --ed-acc-zero: #5e9a12;
}

/* ---------- page ---------- */
html {
  background: var(--ed-frame);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* The old design's decorative backdrops were fixed, invisible boxes that caught clicks (top right,
   bottom left, bottom right). 4.0 has no backdrops, so they are switched off everywhere. */
body::before, body::after, .admin-app::before, .admin-app::after { content: none !important; display: none !important; }
body {
  margin: 0;
  background: var(--ed-frame);
  color: var(--ed-ink);
  font-family: var(--ed-font);
  font-size: 0.8438rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--ed-font); font-weight: 600; letter-spacing: -0.01em; color: var(--ed-ink); }
h1 { font-size: 1.375rem; font-weight: 650; letter-spacing: -0.025em; }
h2 { font-size: 0.9375rem; }
h3 { font-size: 0.875rem; }
h4, h5, h6 { font-size: 0.8438rem; }
p { color: inherit; }
a { color: inherit; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }
small { font-size: 0.75rem; }
strong, b { font-weight: 600; }
code, kbd, samp, pre, .mono { font-family: var(--ed-mono); }
kbd { display: inline-block; box-sizing: border-box; height: 24px; padding: 0 7px; border: 1px solid var(--ed-line2); border-radius: 7px; font-size: 0.7188rem; line-height: 22px; color: var(--ed-ink3); background: transparent; box-shadow: none; }
hr { height: 1px; margin: 12px 0; border: 0; background: var(--ed-line); }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: rgba(150, 150, 150, 0.32); color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: 2px; }
.admin-backdrop, .admin-search-surface, .admin-search-sweep, .admin-search-focus-ring, .admin-search-surface-glow, .admin-search-topline { display: none !important; }

/* tabular figures wherever numbers line up */
td, th, .mono, [class*='-amount'], [class*='-value'], [class*='-total'], [class*='-count'], [class*='-qty'], [class*='-metric'] strong { font-variant-numeric: tabular-nums; }

/* ---------- scrollbars: one rule for every scrolling box ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--ed-thumb) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-track-piece, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb { background-color: var(--ed-thumb); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(150, 150, 150, 0.5); }

/* ---------- motion ---------- */
@keyframes ed-rise { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
@keyframes ed-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }
@keyframes ed-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ed-pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes ed-sheet { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes ed-drawer { from { transform: translate3d(104%, 0, 0); } to { transform: none; } }
@keyframes ed-spin { to { transform: rotate(360deg); } }
@keyframes ed-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes ed-breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes ed-ind { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@keyframes ed-ping { 0% { opacity: 0.9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes ed-shake { 10%, 90% { transform: rotate(-4deg); } 20%, 80% { transform: rotate(6deg); } 30%, 50%, 70% { transform: rotate(-10deg); } 40%, 60% { transform: rotate(10deg); } }
@keyframes ed-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) {
  /* transitions off outright: a tiny duration would turn on an "all" transition for every element
     (visibility included), which lags state changes by a frame. No script waits for transitionend. */
  /* Animations start already finished (a delay of minus their whole length), so the first frame
     shows the end state; they still end and keep their fill. */
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: -1ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}

/* ---------- buttons ---------- */
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
/* every button starts as a quiet secondary button; component classes below refine it */
button { border: 0; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); cursor: pointer; transition: background-color 0.25s, color 0.25s, transform 0.35s var(--ed-ease), opacity 0.25s; }
button:hover { background: var(--ed-raise); }
button:active { transform: scale(0.97); transition-duration: 0.08s; }
button.is-active, button[aria-pressed='true'], button[aria-selected='true'] { background: var(--ed-raise); color: var(--ed-ink); font-weight: 600; }
button:disabled { opacity: 0.4; transform: none; }
button:disabled, [aria-disabled='true'] { cursor: not-allowed; }

.ed-btn,
.admin-primary-btn, .admin-ghost-btn, .admin-soft-btn, .admin-secondary-btn, .admin-danger-btn, .admin-link-btn,
.blog-primary-button, .blog-secondary-button, .admin-arrangement-secondary-button, .admin-arrangement-text-button,
.admin-sku-action-btn, .admin-sku-add-btn, .admin-destination-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  min-height: 38px;
  height: auto;
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  background: var(--ed-card2);
  color: var(--ed-ink);
  font-family: var(--ed-font);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.25s, opacity 0.25s, transform 0.35s var(--ed-ease), color 0.25s, border-color 0.25s;
}
.ed-btn svg, .admin-primary-btn svg, .admin-ghost-btn svg, .admin-soft-btn svg, .admin-secondary-btn svg, .admin-danger-btn svg, .admin-link-btn svg { width: 15px; height: 15px; flex: none; }
.ed-btn:hover, .admin-ghost-btn:hover, .admin-soft-btn:hover, .admin-secondary-btn:hover, .blog-secondary-button:hover, .admin-arrangement-secondary-button:hover, .admin-sku-action-btn:hover, .admin-sku-add-btn:hover, .admin-destination-button:hover { background: var(--ed-raise); color: var(--ed-ink); }
.ed-btn:active, .admin-primary-btn:active, .admin-ghost-btn:active, .admin-soft-btn:active, .admin-secondary-btn:active, .admin-danger-btn:active, .admin-link-btn:active, .blog-primary-button:active, .blog-secondary-button:active { transform: scale(0.97); transition-duration: 0.08s; }
.ed-btn.is-primary, .admin-primary-btn, .blog-primary-button {
  background: var(--ed-ink);
  color: var(--ed-card);
  font-weight: 600;
}
.ed-btn.is-primary:hover, .admin-primary-btn:hover, .blog-primary-button:hover { background: var(--ed-ink); color: var(--ed-card); opacity: 0.88; }
.ed-btn.is-primary:active, .admin-primary-btn:active, .blog-primary-button:active { opacity: 0.8; }
.ed-btn.is-quiet, .admin-link-btn, .admin-arrangement-text-button { background: transparent; color: var(--ed-ink2); }
.ed-btn.is-quiet:hover, .admin-link-btn:hover, .admin-arrangement-text-button:hover { background: var(--ed-card2); color: var(--ed-ink); }
/* destructive: red text on a thin red line; hover tints the fill (the board keeps these tints in both themes) */
.ed-btn.is-danger, .admin-danger-btn { background: transparent; color: var(--ed-red); border: 1px solid rgba(255, 107, 129, 0.5); font-weight: 600; }
.ed-btn.is-danger:hover, .admin-danger-btn:hover { background: rgba(255, 107, 129, 0.08); color: var(--ed-red); }
.ed-btn.is-small { min-height: 32px; padding: 0 11px; font-size: 0.7813rem; border-radius: 10px; }
.ed-btn:disabled, .admin-primary-btn:disabled, .admin-ghost-btn:disabled, .admin-soft-btn:disabled, .admin-secondary-btn:disabled, .admin-danger-btn:disabled, .admin-link-btn:disabled, .blog-primary-button:disabled, .blog-secondary-button:disabled { opacity: 0.4; transform: none; }
/* loading: the button keeps its width and fill, a spinning arc leads the label */
.is-loading.admin-primary-btn, .is-loading.admin-ghost-btn, .is-loading.admin-secondary-btn, .is-loading.admin-danger-btn, .ed-btn.is-loading, [aria-busy='true'].admin-primary-btn { pointer-events: none; opacity: 1 !important; }
.is-loading.admin-primary-btn::before, .is-loading.admin-ghost-btn::before, .is-loading.admin-secondary-btn::before, .is-loading.admin-danger-btn::before, .ed-btn.is-loading::before, [aria-busy='true'].admin-primary-btn::before { content: ''; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--ed-arc) center / contain no-repeat; mask: var(--ed-arc) center / contain no-repeat; animation: ed-spin 0.9s linear infinite; }
:root { --ed-arc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 3a9 9 0 1 1-9 9'/%3E%3C/svg%3E"); }

/* icon buttons */
.ed-icon-btn, .admin-icon-btn, .admin-chart-icon-btn, .admin-orders-icon-btn, .partner-profile-icon-btn, .admin-back-icon-button, .admin-chart-info-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--ed-card2);
  color: var(--ed-ink);
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, transform 0.35s var(--ed-ease);
}
.ed-icon-btn:hover, .admin-icon-btn:hover, .admin-chart-icon-btn:hover, .admin-orders-icon-btn:hover, .partner-profile-icon-btn:hover, .admin-back-icon-button:hover, .admin-chart-info-btn:hover { background: var(--ed-raise); color: var(--ed-ink); }
.ed-icon-btn:active, .admin-icon-btn:active, .admin-chart-icon-btn:active, .admin-orders-icon-btn:active, .admin-back-icon-button:active { transform: scale(0.97); transition-duration: 0.08s; }
.ed-icon-btn svg, .admin-icon-btn svg, .admin-chart-icon-btn svg, .admin-orders-icon-btn svg, .partner-profile-icon-btn svg, .admin-back-icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-chart-info-btn { width: 24px; height: 24px; border-radius: 50%; background: transparent; color: var(--ed-ink3); font-size: 0.75rem; font-weight: 600; }
.admin-chart-info-btn:hover { background: var(--ed-card2); }

/* ---------- fields ---------- */
input:where(:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='file']):not([type='hidden']):not([type='submit']):not([type='button']):not([type='reset']):not([type='image'])),
select,
textarea,
.ed-field {
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--ed-r-field);
  background: var(--ed-card2);
  color: var(--ed-ink);
  font-family: var(--ed-font);
  font-size: 0.8125rem;
  line-height: 1.3;
  box-shadow: none;
  outline: 0;
  transition: background-color 0.25s, box-shadow 0.25s;
}
textarea { min-height: 84px; padding: 10px 12px; line-height: 1.45; resize: vertical; }
input:where(:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='file']):not([type='hidden'])):hover,
select:hover, textarea:hover { background: var(--ed-raise); }
input:where(:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='file']):not([type='hidden'])):focus,
input:where(:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='file']):not([type='hidden'])):focus-visible,
select:focus, select:focus-visible, textarea:focus, textarea:focus-visible {
  background: var(--ed-card2);
  box-shadow: 0 0 0 1px var(--ed-ink3);
  outline: 0;
}
input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true'], input.is-invalid, .is-invalid > input, input:user-invalid { box-shadow: 0 0 0 1px var(--ed-red) !important; }
input::placeholder, textarea::placeholder { color: var(--ed-ink3); opacity: 1; }
input:disabled, select:disabled, textarea:disabled, input[readonly]:not([type='search']) { opacity: 0.45; cursor: not-allowed; }
input[readonly] { opacity: 0.8; cursor: default; }
input[type='number'] { font-family: var(--ed-mono); font-size: 0.8125rem; }
/* number fields show the figure only (Controls board); a stepper is its own control */
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }
input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* the stepper and month pager of the Controls board */
.ed-stepper { display: inline-flex; align-items: center; border-radius: 11px; background: var(--ed-card2); }
.ed-stepper > button { display: grid; place-items: center; width: 34px; height: 36px; min-height: 0; padding: 0; background: transparent; color: var(--ed-ink); }
.ed-stepper > button:disabled { color: var(--ed-ink3); opacity: 1; }
.ed-stepper > output, .ed-stepper > b { min-width: 40px; font: 500 0.8438rem var(--ed-mono); text-align: center; }
.ed-pager-month { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 11px; background: var(--ed-card2); }
.ed-pager-month > button { display: grid; place-items: center; width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 9px; background: transparent; color: var(--ed-ink2); }
.ed-pager-month > button:disabled { color: var(--ed-ink3); opacity: 0.4; }
.ed-pager-month > strong { min-width: 110px; font-size: 0.8125rem; font-weight: 600; text-align: center; }
/* the clear cross shows only once the field has text, so it never cuts into the placeholder */
input[type='search']:placeholder-shown::-webkit-search-cancel-button { display: none; }
input[type='search']::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; background: currentColor; -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.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%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.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat; color: var(--ed-ink3); cursor: pointer; }
/* date fields read in the body face (Form board); money and counts are the mono ones */
input[type='date'], input[type='month'], input[type='time'], input[type='datetime-local'] { font-family: var(--ed-font); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
/* the picker mark at full colour, as the Form board draws it */
::-webkit-calendar-picker-indicator { opacity: 1; cursor: pointer; }
:root[data-admin-theme='dark'] ::-webkit-calendar-picker-indicator, :root:not([data-admin-theme]) ::-webkit-calendar-picker-indicator { filter: invert(1); }
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
  cursor: pointer;
}
select:hover, select:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px 14px; }
/* an open select keeps the focus line and turns its chevron up (Controls board) */
select:open { box-shadow: 0 0 0 1px var(--ed-ink3); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 14 4-4 4 4'/%3E%3C/svg%3E"); }
/* a required select still on its empty choice reads as a placeholder */
select:required:invalid { color: var(--ed-ink3); }
select[multiple] { padding: 6px; background-image: none; }
option, optgroup { background: var(--ed-menu); color: var(--ed-ink); }
input[type='file'] { font-size: 0.7813rem; color: var(--ed-ink2); }
input[type='file']::file-selector-button { height: 34px; margin-right: 10px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); font: 500 0.7813rem/1 var(--ed-font); cursor: pointer; transition: background-color 0.25s; }
input[type='file']::file-selector-button:hover { background: var(--ed-raise); }
input[type='color'] { width: 40px; height: 40px; padding: 4px; border: 0; border-radius: 11px; background: var(--ed-card2); cursor: pointer; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; font-size: 0.7813rem; color: var(--ed-ink2); }
label { color: inherit; }
.admin-control-label, .admin-field-label, .blog-field > span:first-child, .admin-affiliate-field > span:first-child { font-size: 0.7813rem; color: var(--ed-ink2); font-weight: 400; letter-spacing: normal; text-transform: none; }
.admin-form-error, .admin-login-error, .admin-field-error { color: var(--ed-red); font-size: 0.75rem; }

/* checkbox and radio */
input[type='checkbox'], input[type='radio'] {
  -webkit-appearance: none;
  appearance: none;
  display: inline-grid;
  place-content: center;
  flex: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--ed-line2);
  border-radius: 6px;
  background: transparent;
  vertical-align: middle;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
input[type='radio'] { width: 17px; height: 17px; border-radius: 50%; }
input[type='checkbox']::before { content: ''; width: 11px; height: 11px; background: var(--ed-card); -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='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17l9-10'/%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='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17l9-10'/%3E%3C/svg%3E") center / contain no-repeat; transform: scale(0); transition: transform 0.25s var(--ed-ease); }
input[type='checkbox']:indeterminate::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E"); }
input[type='radio']::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ed-ink); transform: scale(0); transition: transform 0.25s var(--ed-ease); }
input[type='checkbox']:checked, input[type='checkbox']:indeterminate { border-color: var(--ed-ink); background: var(--ed-ink); }
input[type='radio']:checked { border-color: var(--ed-ink); }
input[type='checkbox']:checked::before, input[type='checkbox']:indeterminate::before, input[type='radio']:checked::before { transform: scale(1); }
input[type='checkbox']:hover:not(:checked):not(:disabled), input[type='radio']:hover:not(:checked):not(:disabled) { border-color: var(--ed-ink3); }
input[type='checkbox']:disabled, input[type='radio']:disabled { opacity: 0.4; cursor: not-allowed; }
/* switches: a checkbox marked role=switch, or the old toggle classes */
input[type='checkbox'][role='switch'], .ed-switch, .admin-arrangement-switch-control input[type='checkbox'] {
  position: relative;
  width: 40px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ed-raise);
  transition: background-color 0.3s var(--ed-ease);
}
input[type='checkbox'][role='switch']::before, .ed-switch::before, .admin-arrangement-switch-control input[type='checkbox']::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ed-ink3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  -webkit-mask: none;
  mask: none;
  transform: none;
  transition: transform 0.35s var(--ed-ease), background-color 0.3s;
}
input[type='checkbox'][role='switch']:checked, .ed-switch:checked, .admin-arrangement-switch-control input[type='checkbox']:checked { background: var(--ed-ink); }
input[type='checkbox'][role='switch']:checked::before, .ed-switch:checked::before, .admin-arrangement-switch-control input[type='checkbox']:checked::before { background: var(--ed-card); transform: translateX(16px); }

/* range */
input[type='range'] { -webkit-appearance: none; appearance: none; height: 20px; min-height: 0; padding: 0; background: transparent; cursor: pointer; }
/* the filled part of the track (mobile.js keeps --ed-range-fill in step with the value) */
input[type='range']::-webkit-slider-runnable-track { height: 6px; border-radius: 9px; background: linear-gradient(to right, var(--ed-ink) var(--ed-range-fill, 0%), var(--ed-raise) var(--ed-range-fill, 0%)); }
input[type='range']::-moz-range-track { height: 6px; border-radius: 9px; background: var(--ed-raise); }
input[type='range']::-moz-range-progress { height: 6px; border-radius: 9px; background: var(--ed-ink); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; box-sizing: border-box; border: 2px solid var(--ed-ink); border-radius: 50%; background: var(--ed-card); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
input[type='range']::-moz-range-thumb { width: 20px; height: 20px; box-sizing: border-box; border: 2px solid var(--ed-ink); border-radius: 50%; background: var(--ed-card); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }

/* ---------- segmented controls and tabs ---------- */
.ed-seg, .admin-sliding-chart-toggle, .admin-panel-inline-toggles, .admin-toggle-row, .admin-context-segment, .product-flavor-segment, .whatsapp-filter-pills {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 0;
  border-radius: 12px;
  background: var(--ed-card2);
  box-shadow: none;
}
/* the old shell pushed segmented controls 2px up and 12px down off their row; they sit on it */
.admin-panel-inline-toggles, .admin-app.admin-app-suite .admin-sliding-chart-toggle { margin: 0; }
/* a segment is as wide as its label (the old phone layout forced 132px halves), and a row that
   outgrows its space scrolls sideways instead of running off the card */
.admin-sliding-chart-toggle, .admin-toggle-row { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.admin-sliding-chart-toggle > .admin-toggle-pill, .admin-toggle-row > .admin-toggle-pill { flex: 0 0 auto; min-width: 0; }
.ed-seg > button, .ed-seg > a, .admin-toggle-pill, .admin-sliding-chart-toggle > button, .admin-context-segment > button, .product-flavor-segment > button, .whatsapp-filter-pills > button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 32px;
  height: auto;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ed-ink2);
  font-family: var(--ed-font);
  font-size: 0.7813rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.3s var(--ed-ease), color 0.25s;
}
.ed-seg > button:hover, .ed-seg > a:hover, .admin-toggle-pill:hover, .admin-sliding-chart-toggle > button:hover, .admin-context-segment > button:hover, .product-flavor-segment > button:hover, .whatsapp-filter-pills > button:hover { color: var(--ed-ink); }
.ed-seg > [aria-pressed='true'], .ed-seg > [aria-selected='true'], .ed-seg > [aria-checked='true'], .ed-seg > .is-active,
.admin-toggle-pill.is-active, .admin-toggle-pill[aria-pressed='true'], .admin-toggle-pill[aria-selected='true'],
.admin-sliding-chart-toggle > .is-active, .admin-sliding-chart-toggle > [aria-pressed='true'], .admin-sliding-chart-toggle > [aria-selected='true'],
.admin-context-segment > .is-active, .admin-context-segment > [aria-pressed='true'], .product-flavor-segment > .is-active, .product-flavor-segment > [aria-pressed='true'],
.whatsapp-filter-pills > .is-active, .whatsapp-filter-pills > [aria-pressed='true'] {
  background: var(--ed-raise);
  color: var(--ed-ink);
  font-weight: 600;
}
.admin-sliding-chart-toggle-indicator, .admin-toggle-indicator, [class*='-toggle-thumb'], [class*='-sliding-indicator'] { display: none !important; }
/* The selected segment's highlight slides from option to option (admin.js sets --sliding-toggle-x
   and --sliding-toggle-width on it); the active pill itself stays clear above it. */
[data-sliding-chart-toggle] { position: relative; isolation: isolate; }
.admin-sliding-toggle-indicator { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; display: block; width: var(--sliding-toggle-width, 0); border-radius: 9px; background: var(--ed-raise); transform: translateX(var(--sliding-toggle-x, 0)); transition: transform 0.45s var(--ed-ease), width 0.45s var(--ed-ease); pointer-events: none; }
.admin-sliding-toggle-indicator.is-positioning { transition: none; }
[data-sliding-chart-toggle].has-active-toggle > .admin-toggle-pill { z-index: 1; }
[data-sliding-chart-toggle].has-active-toggle > .admin-toggle-pill.is-active { background: transparent; }

.ed-tabs, [role='tablist'] { display: flex; flex-wrap: wrap; gap: 18px; border-bottom: 1px solid var(--ed-line); }
.ed-tabs > button, .ed-tabs > a, [role='tablist'] > [role='tab'] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  margin-bottom: -1px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ed-ink2);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: color 0.25s, border-color 0.3s var(--ed-ease);
}
.ed-tabs > button:hover, .ed-tabs > a:hover, [role='tablist'] > [role='tab']:hover { color: var(--ed-ink); }
.ed-tabs > [aria-selected='true'], .ed-tabs > .is-active, [role='tablist'] > [role='tab'][aria-selected='true'] { border-bottom-color: var(--ed-ink); color: var(--ed-ink); font-weight: 600; }
/* a count beside a tab label */
.ed-tabs > * > .ed-count, [role='tablist'] > [role='tab'] > .ed-count, .ed-seg > * > .ed-count { color: var(--ed-ink3); font: 400 0.6875rem var(--ed-mono); }

/* chips: a filter that is on sits on a fill with a darker line; removable chips end in a 12px cross */
.ed-chip, .admin-chip, .admin-chip-accent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--ed-line2);
  border-radius: 999px;
  background: transparent;
  color: var(--ed-ink2);
  font-size: 0.7813rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: none;
  white-space: nowrap;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
button.ed-chip:hover, a.ed-chip:hover { background: var(--ed-card2); color: var(--ed-ink); }
.ed-chip.is-active, .ed-chip[aria-pressed='true'], .ed-chip[aria-selected='true'] { border-color: var(--ed-ink3); background: var(--ed-card2); color: var(--ed-ink); font-weight: 400; }
.ed-chip.is-removable { padding-right: 8px; background: var(--ed-card2); color: var(--ed-ink); }
.ed-chip > svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ed-chip.is-plain { border-color: transparent; background: transparent; }

/* status marks: text, a thin border and a dot */
.ed-pill, .admin-status-badge, .whatsapp-history-status, .ps-status, .admin-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--ed-line2);
  border-radius: 999px;
  background: transparent;
  color: var(--ed-ink2);
  font-size: 0.7188rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
}
.ed-pill::before, .admin-status-badge::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ed-pill.is-good, .is-paid.ed-pill, .admin-status-badge.is-success, .admin-status-badge.is-paid { color: var(--ed-mint); border-color: var(--ed-mintl); }
.ed-pill.is-warn, .admin-status-badge.is-warning, .admin-status-badge.is-pending { color: var(--ed-amber); border-color: var(--ed-amberl); }
.ed-pill.is-bad, .admin-status-badge.is-danger, .admin-status-badge.is-failed, .admin-status-badge.is-error { color: var(--ed-red); border-color: var(--ed-redl); }
.ed-pill.is-info, .admin-status-badge.is-info { color: var(--ed-cyan); border-color: var(--ed-cyanl); }
.admin-status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ed-ink3); }

/* ---------- surfaces ---------- */
.ed-card, .admin-panel, .admin-note-card, .admin-settings-card, .admin-metric-card, .admin-category-guide-card, .admin-website-bento-card, .admin-flavor-chart-card, .admin-product-mix-card, .admin-order-breakdown-card, .admin-cogs-step-card, .partner-access-summary-card, .admin-sku-master-card,
.pnl-panel, .partner-sales-panel, .product-analytics-panel, .whatsapp-detail-panel, .whatsapp-order-panel, .customer-profile-panel, .partner-profile-panel, .partner-create-panel, .admin-accounting-panel {
  box-sizing: border-box;
  border: 0;
  border-radius: var(--ed-r-card);
  background: var(--ed-card);
  color: var(--ed-ink);
  box-shadow: none;
  backdrop-filter: none;
}
.admin-panel, .ed-card { padding: 16px 18px; }
.admin-panel::before, .admin-panel::after, .admin-metric-card::before, .admin-metric-card::after, .admin-note-card::before, .admin-note-card::after { display: none; }
.admin-panel-head, .pnl-panel-head, .partner-sales-panel-head, .customer-panel-head, .whatsapp-detail-panel-head, .whatsapp-order-panel-head, .partner-profile-panel-head, .partner-create-panel-head, .admin-settings-card-head, .product-costs-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
}
/* a head with nothing under it, or one sitting straight in the page panel (whose 12px gap already
   spaces it), adds no margin of its own */
:is(.admin-panel-head, .pnl-panel-head, .partner-sales-panel-head, .customer-panel-head, .whatsapp-detail-panel-head, .whatsapp-order-panel-head, .partner-profile-panel-head, .partner-create-panel-head, .admin-settings-card-head, .product-costs-panel-head):last-child,
:is(main, .admin-layout) > :is(.admin-panel-head, .pnl-panel-head, .partner-sales-panel-head, .customer-panel-head, .whatsapp-detail-panel-head, .whatsapp-order-panel-head, .partner-profile-panel-head, .partner-create-panel-head, .admin-settings-card-head, .product-costs-panel-head) { margin-bottom: 0; }
.admin-panel-head h2, .admin-panel-head h3, .pnl-panel-head h2, .pnl-panel-head h3, .partner-sales-panel-head h2, .partner-sales-panel-head h3, .customer-panel-head h2, .whatsapp-detail-panel-head h2, .whatsapp-order-panel-head h2, .partner-profile-panel-head h2, .admin-settings-card-head h3, .product-costs-panel-head h2 { margin: 0; font-size: 0.875rem; font-weight: 600; letter-spacing: -0.01em; text-transform: none; }
.admin-panel-head p, .admin-panel-meta, .pnl-panel-head p, .partner-sales-panel-head p, .customer-panel-head p, .admin-settings-card-head p { margin: 3px 0 0; font-size: 0.75rem; color: var(--ed-ink3); font-weight: 400; }
/* no eyebrows: the old small uppercase kickers become a quiet caption under the title */
.admin-panel-kicker, .admin-chip-kicker, [class$='-kicker'], [class*='-eyebrow'], .admin-section-eyebrow {
  display: block;
  margin: 0;
  color: var(--ed-ink3);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  order: 2;
}
.admin-note-card { padding: 12px 14px; border: 1px solid var(--ed-line); background: transparent; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-note-stack { display: flex; flex-direction: column; gap: 8px; }

/* empty states: quiet centred text, a bold first line when there is one; no box around it */
.admin-empty, .partner-access-empty, .pl-empty, .partner-sales-empty, .pnl-allocation-empty, .ps-empty, .ps-detail-empty, .admin-notification-empty, .ed-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 0;
  padding: 44px 20px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ed-ink3);
  font-size: 0.7813rem;
  text-align: center;
  box-shadow: none;
}
p.admin-empty, div.admin-empty { max-width: none; }
/* inside a table the empty state stays a cell, so it spans the columns it was given */
td.admin-empty { display: table-cell; height: 96px; min-height: 0; padding: 18px 16px; border: 0; border-radius: 0; vertical-align: middle; text-align: center; }
.admin-empty strong, .ed-empty strong { color: var(--ed-ink); font-size: 0.8438rem; font-weight: 600; }
.ed-empty > svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* the larger empty state (filters match nothing, record not found): icon tile, title, reason, ways out */
.ed-empty.is-large { gap: 8px; min-height: 230px; padding: 24px; }
.ed-empty.is-large > .ed-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--ed-card); color: var(--ed-ink3); }
.ed-empty.is-large > .ed-empty-icon svg { width: 22px; height: 22px; }
.ed-empty.is-large strong { font-size: 0.9375rem; font-weight: 650; }
.ed-empty.is-large > span, .ed-empty.is-large > p { max-width: 380px; margin: 0; color: var(--ed-ink2); font-size: 0.8125rem; }
.ed-empty.is-large > .ed-empty-code { color: var(--ed-ink3); font: 600 1.75rem var(--ed-mono); }
.ed-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
/* a section that failed while the rest of the page works */
.ed-error { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 18px; border: 1px dashed rgba(255, 107, 129, 0.45); border-radius: 14px; color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-error > strong { display: inline-flex; align-items: center; gap: 8px; color: var(--ed-ink); font-size: 0.8438rem; font-weight: 600; }
.ed-error > strong svg { width: 16px; height: 16px; fill: none; stroke: var(--ed-red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ed-error-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
/* a notice inside a card: stale numbers, figures still missing */
.ed-notice { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid rgba(255, 181, 71, 0.38); border-radius: 12px; color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-notice > svg { flex: none; width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: var(--ed-amber); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-notice > i { flex: none; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--ed-amber); }
.ed-notice strong { display: block; color: var(--ed-ink); font-weight: 600; }
.ed-notice > button { flex: none; min-height: 28px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.75rem; }

/* ---------- tables ---------- */
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.7813rem; color: var(--ed-ink); background: transparent; }
caption { padding: 0 0 8px; color: var(--ed-ink3); font-size: 0.75rem; text-align: left; }
thead th, th {
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid var(--ed-line);
  background: transparent;
  color: var(--ed-ink3);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  white-space: nowrap;
  box-shadow: none;
}
td {
  height: 46px;
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid var(--ed-line);
  background: transparent;
  color: var(--ed-ink);
  font-size: 0.8125rem;
  box-shadow: none;
}
/* codes and figures in a cell are mono at 12px; a second line under a name is 11.5px grey */
td.mono, td .mono, td code { font-size: 0.75rem; }
td small { color: var(--ed-ink3); font-size: 0.7188rem; font-weight: 400; }
td a { text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }
tbody tr { transition: background-color 0.2s; }
tbody tr:hover > td { background: var(--ed-card2); }
tbody tr:last-child > td { border-bottom: 0; }
/* a ticked row keeps the hover fill and gets a short bar at its left edge; keyboard focus draws the ring inside the row */
tbody tr.is-selected > td, tbody tr[aria-selected='true'] > td { background: var(--ed-card2); }
tbody tr.is-selected > td:first-child, tbody tr[aria-selected='true'] > td:first-child { background-image: linear-gradient(var(--ed-ink), var(--ed-ink)); background-size: 3px calc(100% - 20px); background-position: 0 50%; background-repeat: no-repeat; }
tbody tr:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: -2px; }
td input[type='checkbox'], th input[type='checkbox'] { width: 15px; height: 15px; border-radius: 5px; }
td input[type='checkbox']::before, th input[type='checkbox']::before { width: 10px; height: 10px; }
tfoot td, tfoot th { border-top: 1px solid var(--ed-line2); border-bottom: 0; color: var(--ed-ink); font-weight: 600; }
th[aria-sort], th.is-sortable, th button { cursor: pointer; transition: color 0.2s; }
th button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
th button:hover, th.is-sortable:hover { color: var(--ed-ink); }
th[aria-sort='ascending'], th[aria-sort='descending'] { color: var(--ed-ink); }
th button > svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ed-ease), opacity 0.2s; }
th[aria-sort='ascending'] button > svg { transform: rotate(180deg); }
/* the row of a table footer: count on the left, pager on the right */
.ed-table-foot { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px 0 18px; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-table-foot > :first-child { margin-right: auto; white-space: nowrap; }
.ed-pager { display: inline-flex; align-items: center; gap: 6px; }
.ed-pager > span { min-width: 56px; color: var(--ed-ink2); font-family: var(--ed-mono); text-align: center; white-space: nowrap; }
.ed-pager > button { display: grid; place-items: center; width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); }
.ed-pager > button:disabled { color: var(--ed-ink3); opacity: 0.55; }
.ed-pager > button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-table-wrap, [class*='-table-wrap'], [class*='-table-scroll'] { border: 0; border-radius: 12px; background: transparent; box-shadow: none; overflow: auto; }
.admin-table-note { color: var(--ed-ink3); font-size: 0.75rem; }

/* ---------- dialogs, menus, toasts, tooltips ---------- */
dialog { color: var(--ed-ink); }
dialog::backdrop { background: var(--ed-scrim); }
.admin-modal-backdrop, .admin-modal-backdrop:hover, .admin-modal-backdrop:active { position: absolute; inset: 0; border: 0; border-radius: 0; background: var(--ed-scrim); backdrop-filter: none; box-shadow: none; transform: none; cursor: default; }
.admin-modal-backdrop { animation: ed-fade 0.3s var(--ed-ease) both; }
/* the "swipe to see all columns" note mobile.js adds above wide tables */
.ed-table-scroll-hint { margin: 0; padding: 0 18px 8px; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-sheet, .admin-modal-card, .admin-hard-set-dialog, dialog:not(.ed-search):not(.ed-plain) {
  box-sizing: border-box;
  border: 1px solid var(--ed-line2);
  border-radius: 20px;
  background: var(--ed-sheet);
  color: var(--ed-ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  animation: ed-sheet 0.45s var(--ed-ease) both;
}
.admin-modal-card { padding: 20px; }
.admin-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 0; border: 0; background: transparent; }
.admin-modal-head h2, .admin-modal-head h3 { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; text-transform: none; }
.admin-modal-head p { margin: 5px 0 0; color: var(--ed-ink2); font-size: 0.8125rem; }
.admin-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; padding: 0; border: 0; background: transparent; }
.admin-modal-close, [class*='-modal-close'], [data-modal-close] { border: 0; background: var(--ed-card2); color: var(--ed-ink2); border-radius: 10px; }

.ed-menu, [role='menu'], [role='listbox']:not(select), .admin-menu, .admin-dropdown-menu, [class*='-dropdown-menu'] {
  box-sizing: border-box;
  padding: 5px;
  border: 1px solid var(--ed-line2);
  border-radius: 13px;
  background: var(--ed-menu);
  color: var(--ed-ink);
  box-shadow: var(--ed-shm);
}
.ed-menu > button, .ed-menu > a, [role='menu'] > [role='menuitem'], [role='menu'] > [role='menuitemradio'], [role='menu'] > [role='menuitemcheckbox'], [role='listbox'] > [role='option'], .admin-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ed-ink);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.2s;
}
.ed-menu > button:hover, .ed-menu > a:hover, [role='menu'] > [role='menuitem']:hover, [role='listbox'] > [role='option']:hover, [role='listbox'] > [role='option'][aria-selected='true'], .admin-menu-item:hover { background: var(--ed-card2); }
/* the chosen row is bold and ends in a tick; a row that cannot be chosen sits at 40% */
[role='listbox'] > [role='option'][aria-selected='true'] { font-weight: 600; }
[role='listbox']:not([aria-multiselectable='true']) > [role='option'][aria-selected='true']::after { content: ''; flex: none; width: 14px; height: 14px; margin-left: auto; background: currentColor; -webkit-mask: var(--ed-tick) center / contain no-repeat; mask: var(--ed-tick) center / contain no-repeat; }
[role='listbox'] > [role='option'][aria-disabled='true'], .ed-menu > :disabled { opacity: 0.4; cursor: not-allowed; }
.ed-menu > svg, [role='menu'] > [role='menuitem'] > svg, .ed-menu > * > svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--ed-ink3); }
.ed-menu kbd, [role='menu'] kbd { height: auto; margin-left: auto; padding: 0; border: 0; color: var(--ed-ink3); font-size: 0.6875rem; line-height: 1; }
.ed-menu hr, [role='menu'] > [role='separator'] { display: block; height: 1px; margin: 4px 6px; border: 0; background: var(--ed-line); }
.ed-menu > .is-danger, [role='menu'] > [role='menuitem'].is-danger, .ed-menu > .is-danger svg, [role='menu'] > .is-danger svg { color: var(--ed-red); }
:root { --ed-tick: 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.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17l9-10'/%3E%3C/svg%3E"); }

/* toasts (Dialogs board): a dark slip in both themes, a status ring on the left, a thin timer strip along the foot.
   window.edToast (admin-chrome.js) builds them; they stack bottom right, three at most, and pause while hovered. */
.ed-toasts { position: fixed; inset: auto 24px 24px auto; z-index: 10070; display: flex; flex-direction: column; gap: 8px; box-sizing: border-box; width: min(332px, calc(100vw - 32px)); height: auto; margin: 0; padding: 0; border: 0; background: transparent; color: #ededed; overflow: visible; pointer-events: none; }
.ed-toasts:empty, .ed-toasts[popover]:not(:popover-open) { display: none; }
.ed-toast { --ed-toast-tone: #5ee0a6; position: relative; display: flex; align-items: flex-start; gap: 10px; box-sizing: border-box; width: 100%; padding: 12px 12px 14px; border: 0; border-radius: 14px; background: var(--ed-toast); color: #ededed; font-size: 0.8125rem; line-height: 1.4; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); overflow: hidden; pointer-events: auto; animation: ed-toast-in 0.45s var(--ed-ease) both; }
.ed-toast[data-tone='error'] { --ed-toast-tone: #ff6b81; }
.ed-toast[data-tone='info'] { --ed-toast-tone: #a8a8a8; }
.ed-toast.is-settled { animation: none; }
.ed-toast.is-leaving { animation: ed-toast-out 0.24s var(--ed-ease) both; }
.ed-toast-ring { flex: none; display: grid; place-items: center; box-sizing: content-box; width: 24px; height: 24px; border: 1.5px solid var(--ed-toast-tone); border-radius: 50%; color: var(--ed-toast-tone); }
.ed-toast-ring svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ed-toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ed-toast-text strong { display: block; color: #ededed; font-weight: 400; }
.ed-toast-text small { display: block; color: #a8a8a8; font-size: 0.75rem; }
.ed-toast-action { flex: none; height: 28px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: background-color 0.25s; }
.ed-toast-action:hover { background: rgba(255, 255, 255, 0.18); }
.ed-toast-action:focus-visible { outline: 2px solid #a8a8a8; outline-offset: 2px; }
.ed-toast-timer { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--ed-toast-tone); transform-origin: left; animation: ed-toast-timer var(--ed-toast-time, 4s) linear var(--ed-toast-shift, 0ms) both; }
.ed-toasts.is-paused .ed-toast-timer { animation-play-state: paused; }
@keyframes ed-toast-in { from { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes ed-toast-out { to { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.98); } }
@keyframes ed-toast-timer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* phones: full width above the tab bar */
@media (max-width: 767px) { .ed-toasts { inset: auto 16px calc(84px + env(safe-area-inset-bottom, 0px)) 16px; width: auto; } }
@media (pointer: coarse) { .ed-toast-action { height: 44px; min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .ed-toast, .ed-toast.is-leaving, .ed-toast-timer { animation: none; } }

/* tooltips: the same dark slip, small, with an arrow when it points at something */
.ed-tip, [role='tooltip'] {
  box-sizing: border-box;
  max-width: 230px;
  padding: 9px 11px;
  border: 0;
  border-radius: 10px;
  background: var(--ed-toast);
  color: #ededed;
  font-size: 0.75rem;
  line-height: 1.4;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
/* chart tooltips: one step above the card, no outline (the Chart board) */
.admin-chart-tooltip, [class*='-chart-tooltip']:not([class*='-tooltip-']) {
  box-sizing: border-box;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--ed-raise);
  color: var(--ed-ink2);
  font-size: 0.75rem;
  line-height: 1.4;
  box-shadow: var(--ed-tipsh);
  pointer-events: none;
}
/* chart tooltips: hidden until a point is hovered, moved with transform only */
.admin-chart-tooltip { position: absolute; left: 0; top: 0; z-index: 5; min-width: 184px; max-width: 300px; opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0s linear 0.15s; will-change: transform; }
.admin-chart-tooltip.is-visible { opacity: 1; visibility: visible; transition: opacity 0.15s; }
.admin-chart-tooltip > strong { display: block; margin: 0 0 4px; color: var(--ed-ink); font-size: 0.7813rem; font-weight: 600; }
.admin-chart-tooltip-body { display: flex; flex-direction: column; gap: 3px; }
.admin-chart-tooltip-row { display: flex; align-items: center; gap: 8px; min-height: 18px; color: var(--ed-ink2); font-size: 0.75rem; }
.admin-chart-tooltip-row > span:not(.admin-chart-tooltip-dot) { flex: 1; min-width: 0; }
.admin-chart-tooltip-row strong, .admin-chart-tooltip-row b { margin-left: auto; color: var(--ed-ink); font-family: var(--ed-mono); font-size: 0.7188rem; font-weight: 500; white-space: nowrap; }
.admin-chart-tooltip-row.is-primary, .admin-chart-tooltip-row.is-pace { color: var(--ed-ink); font-weight: 500; }
.admin-chart-tooltip-row.is-pace { padding-bottom: 4px; margin-bottom: 2px; border-bottom: 1px solid var(--ed-line); }
.admin-chart-tooltip-row.is-total { margin-top: 2px; padding-top: 4px; border-top: 1px solid var(--ed-line); color: var(--ed-ink); }
.admin-chart-tooltip-dot { flex: none; width: 8px; height: 8px; border-radius: 3px; }
.admin-chart-tooltip small { color: var(--ed-ink3); font-size: 0.7188rem; }
canvas { display: block; }

/* progress and loading */
.ed-bar, progress { -webkit-appearance: none; appearance: none; height: 5px; border: 0; border-radius: 9px; background: var(--ed-card2); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--ed-card2); border-radius: 9px; }
progress::-webkit-progress-value { background: var(--ed-ink); border-radius: 9px; }
progress::-moz-progress-bar { background: var(--ed-ink); border-radius: 9px; }
/* indeterminate progress: a 40% strip that sweeps across */
.ed-bar.is-indeterminate { position: relative; }
.ed-bar.is-indeterminate::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: 9px; background: var(--ed-ink); animation: ed-ind 1.4s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
/* loading blocks pulse in place (no shimmer); the spinner is an open arc with round ends */
.ed-skel { border-radius: 8px; background: var(--ed-sk); animation: ed-pulse 1.6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.ed-spin { display: inline-block; flex: none; width: 16px; height: 16px; background: var(--ed-ink2); -webkit-mask: var(--ed-arc) center / contain no-repeat; mask: var(--ed-arc) center / contain no-repeat; animation: ed-spin 0.9s linear infinite; }

/* text for screen readers only */
.sr-only, .visually-hidden, .admin-sr-only, .admin-visually-hidden, .ed-sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }

/* marks drawn for one theme: white on dark surfaces, black on light ones */
.ed-mark-on-light { display: none !important; }
:root[data-admin-theme='light'] .ed-mark-on-light { display: block !important; }
:root[data-admin-theme='light'] .ed-mark-on-dark { display: none !important; }

/* Touch screens up to tablet width: 44px tap targets and 16px fields (iOS zooms into smaller ones).
   Mouse and trackpad users keep the compact controls at every width. */
@media (max-width: 1024px) and (pointer: coarse) {
  :is(main, .admin-shell-main) :is(button, summary):not(.admin-liquidity-segment, .admin-liquidity-commitment-overlay) { min-height: 44px !important; }
  input:where(:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='hidden'])), select, textarea { font-size: max(16px, 1rem) !important; }
}
