/* Executive Dashboard 4.0 page layouts. Shared controls live in base.css, the frame in shell.css.
   Wide two- and three-column rows stack below 1300px; nothing is clipped at any width. */

.ed-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* only the active dashboard view is ever shown */
.admin-view:not(.is-active) { display: none !important; }
/* Main board: the overview's banners, KPI row and card rows sit 12px apart (not the legacy 28px view gap) */
.admin-view[data-view-panel='overview'] { gap: 12px; }
/* The legacy -2px / 12px margins on segmented controls push them off the boards' rows (a 44px box for a
   34px control); on the overview-group views they sit flush, as the boards draw them. */
:is([data-view-panel='overview'], [data-view-panel='daily'], [data-view-panel='context'], [data-view-panel='wallet'], [data-view-panel='ad-view'], [data-view-panel='home'], [data-view-panel='website'], [data-view-panel='hard-set'], [data-view-panel='settings']) :is(.admin-sliding-chart-toggle, .admin-panel-inline-toggles) { margin-top: 0; margin-bottom: 0; }

/* ---------- rows ---------- */
.ed-row { display: grid; gap: 12px; min-width: 0; }
.ed-row > * { min-width: 0; margin: 0; }
.ed-row-8-4 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ed-row-6-3-3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.ed-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ed-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1300px) {
  .ed-row-8-4 { grid-template-columns: minmax(0, 1fr); }
  .ed-row-6-3-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-row-6-3-3 > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1100px) { .ed-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .ed-row-6-3-3, .ed-row-3, .ed-row-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- top bar view actions (shown only for their view) ---------- */
.ed-view-actions { display: none; align-items: center; gap: 6px; margin-right: auto; }
[data-admin-dashboard][data-active-view='overview'] .ed-view-actions[data-ed-view-actions='overview'],
[data-admin-dashboard]:not([data-active-view]) .ed-view-actions[data-ed-view-actions='overview'] { display: flex; }
.ed-live { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--ed-fitem); color: var(--ed-fink2); font-size: 0.7813rem; white-space: nowrap; }
.ed-live > i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ed-mint); animation: ed-breathe 2.6s ease-in-out infinite; }
.ed-live > small { color: var(--ed-fink); font: 0.75rem var(--ed-mono); }
.ed-live > small:empty { display: none; }
/* Business overview top bar, as on the board: "Live 23.00" on the left, the view's actions on the right */
[data-ed-view-actions='overview'] { flex: 1 1 auto; min-width: 0; }
[data-ed-view-actions='overview'] > .ed-live { margin-right: auto; }
.ed-live-clock { color: var(--ed-fink); font: 0.7813rem var(--ed-mono); font-variant-numeric: tabular-nums; }
.ed-live-clock:empty { display: none; }
/* the board's select pill: 15px, label, 8px, a 14px chevron in the frame ink, 15px (84px for "2026") */
.ed-year select, .ed-year select:hover, .ed-year 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='%23ededed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E"); background-position: right 15px center; background-size: 14px 14px; }
.ed-year select { min-width: 0; min-height: 40px; height: 40px; padding: 0 37px 0 15px; border-radius: 999px; background-color: var(--ed-fitem); color: var(--ed-fink); font-size: 0.7813rem; font-weight: 500; }
.ed-year select:hover, .ed-year select:focus { background-color: var(--ed-fon); box-shadow: none; }
.ed-year select:open { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ededed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 14 4-4 4 4'/%3E%3C/svg%3E"); }
.ed-frame-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border: 0; border-radius: 999px; background: var(--ed-fitem); color: var(--ed-fink); font-size: 0.7813rem; font-weight: 500; white-space: nowrap; transition: background-color 0.25s, transform 0.35s var(--ed-ease); }
.ed-frame-btn:hover { background: var(--ed-fon); }
.ed-frame-btn:active { transform: scale(0.96); }
.ed-frame-btn[aria-expanded='true'] { background: var(--ed-fon); color: var(--ed-fink); }
.ed-frame-btn.is-icon { width: 40px; padding: 0; justify-content: center; }
.ed-frame-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-frame-btn.is-loading svg, .admin-overview-refresh.is-loading svg { animation: ed-spin 0.9s linear infinite; }
@media (max-width: 1180px) { .ed-live > small { display: none; } }
@media (max-width: 767px) { .ed-view-actions { margin-right: 0; flex-wrap: wrap; } .ed-live { display: none; } }

/* ---------- KPI cards ---------- */
.ed-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ed-kpi { display: flex; flex-direction: column; min-width: 0; height: 112px; box-sizing: border-box; padding: 15px 18px 14px; border: 1px solid transparent; border-radius: var(--ed-r-card); background: var(--ed-card); color: inherit; text-decoration: none; container-type: inline-size; transition: transform 0.45s var(--ed-ease), background-color 0.3s; animation: ed-rise 0.6s var(--ed-ease) both; }
.ed-kpi:nth-child(2) { animation-delay: 0.04s; } .ed-kpi:nth-child(3) { animation-delay: 0.08s; } .ed-kpi:nth-child(4) { animation-delay: 0.12s; }
.ed-kpi:hover { transform: translateY(-2px); }
.ed-kpi-label { height: 18px; color: var(--ed-ink2); font-size: 0.7813rem; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-kpi-value { margin-top: 6px; font-size: 1.625rem; font-weight: 650; line-height: 1.12; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ed-kpi-meta { display: flex; align-items: center; gap: 6px; min-width: 0; height: 26px; margin-top: auto; color: var(--ed-ink3); font-size: 0.75rem; white-space: nowrap; }
.ed-kpi-meta > span:not(.ed-kpi-tone) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ed-kpi-tone { font-variant-numeric: tabular-nums; }
.ed-kpi-tone:empty { display: none; }
.ed-kpi-tone[data-tone='up'] { color: var(--ed-mint); }
.ed-kpi-tone[data-tone='down'] { color: var(--ed-red); }
.ed-kpi-spark { flex: none; width: 86px; height: 30px; margin-left: auto; color: var(--ed-ink2); overflow: visible; }
@container (max-width: 250px) { .ed-kpi-spark { display: none; } }
@media (max-width: 1100px) { .ed-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .ed-kpi { height: auto; min-height: 104px; } .ed-kpi-value { font-size: 1.375rem; } }

/* ---------- chart cards ---------- */
.admin-panel-chart { display: flex; flex-direction: column; min-width: 0; }
.admin-chart-title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.admin-chart-title-row h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-chart-surface { position: relative; flex: 1; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.admin-chart-canvas { display: block; width: 100%; height: 220px; }
.ed-overview-grid { display: flex; flex-direction: column; gap: 12px; }
.ed-overview-grid .admin-panel-wide { width: auto; }

/* Business overview cards follow the Chart board: one height per row (340, 276, 244, 260), the
   title and caption on the left, the segmented control on the right, a legend, then the plot,
   which fills what is left of the card. */
.ed-overview-grid .admin-panel-chart { box-sizing: border-box; padding: 16px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.ed-overview-grid .admin-panel-chart > .admin-panel-head { flex-wrap: nowrap; align-items: flex-start; gap: 12px; margin: 0 0 10px; }
.ed-overview-grid .admin-panel-chart > .admin-panel-head > div:first-child { min-width: 0; }
.ed-overview-grid .admin-panel-chart > .admin-panel-head h3 { font-size: 0.875rem; font-weight: 600; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.ed-overview-grid .admin-panel-chart > .admin-panel-head .admin-panel-meta { display: block; margin: 3px 0 0; font-size: 0.75rem; color: var(--ed-ink3); }
.ed-overview-grid .admin-panel-head .admin-sliding-chart-toggle { flex: none; margin-top: 0; margin-bottom: 0; margin-left: auto; padding: 3px; border-radius: 12px; }
/* Chart board segments are at least 56px wide, so "Units | Rp" reads as two equal halves */
.ed-overview-grid .admin-panel-head .admin-sliding-chart-toggle > .admin-toggle-pill { min-width: 56px; justify-content: center; }
.ed-overview-grid .admin-panel-head .admin-sliding-chart-toggle > .admin-toggle-pill { min-height: 28px; height: 28px; padding: 0 12px; font-size: 0.75rem; }
.ed-chart-tools { display: flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; margin-left: auto; }
.ed-chart-tools > .admin-sliding-chart-toggle { flex: 0 1 auto; min-width: 0; }
.admin-chart-range-control { flex: none; }
@media (max-width: 767px) { .ed-overview-grid .admin-panel-chart > .admin-panel-head { flex-wrap: wrap; } .ed-chart-tools, .ed-overview-grid .admin-panel-head .admin-sliding-chart-toggle { margin-left: 0; } }
.ed-chart-tools > .admin-sliding-chart-toggle { margin-left: 0; }
.ed-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; color: var(--ed-ink2); font-size: 0.75rem; }
.ed-chart-legend:empty { display: none; }
.ed-chart-legend { --ed-ghost: #4a4a4a; }
:root[data-admin-theme='light'] .ed-chart-legend { --ed-ghost: #c4c4c4; }
.ed-chart-legend > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.ed-chart-legend i { flex: none; }
.ed-chart-legend i.is-box { width: 10px; height: 10px; border-radius: 3px; }
.ed-chart-legend i.is-line { width: 14px; height: 0; border-top: 2px solid; }
.ed-chart-legend i.is-line.is-dashed { border-top-style: dashed; }
.ed-chart-legend.is-partial > span:nth-child(2) { display: none; }
.ed-overview-grid .admin-chart-surface { position: relative; flex: 1 1 auto; min-height: 0; }
/* Chart board plots start right under the legend (top gridline 8px below it); the canvas keeps 8px of
   room above its top gridline for the tick label, so it starts 8px higher */
.ed-overview-grid .admin-panel-chart > .admin-chart-surface { margin-top: -8px; }
.ed-overview-grid .admin-panel-chart .admin-chart-surface > .admin-chart-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed-overview-grid .ed-row-8-4:first-child > .admin-panel-chart { height: 340px; }
.ed-overview-grid .ed-row-6-3-3 > * { height: 276px; }
.ed-overview-grid .ed-row-3 > .admin-panel-chart { height: 244px; }
.ed-overview-grid .ed-row-8-4:not(:first-child) > .admin-panel-chart, .ed-overview-grid > .ed-order-volume-card { height: 260px; }
/* below the board width the cards stack; charts keep their height, text cards grow to fit */
@media (max-width: 1300px) { .ed-overview-grid .ed-row-6-3-3 > .admin-customer-lifecycle-card, .ed-overview-grid .ed-row-6-3-3 > .admin-repeat-orders-card { height: auto; min-height: 276px; } }
/* Main board rows are spans of a 12-column grid with 12px gutters (8+4, 6+3+3), not 2fr/1fr splits */
@media (min-width: 1301px) {
  .ed-overview-grid .ed-row-8-4 { grid-template-columns: minmax(0, calc((100% - 132px) / 12 * 8 + 84px)) minmax(0, 1fr); }
  .ed-overview-grid .ed-row-6-3-3 { grid-template-columns: minmax(0, calc((100% - 132px) / 12 * 6 + 60px)) minmax(0, 1fr) minmax(0, 1fr); }
}

/* custom range calendar on the revenue chart, beside its metric control */
.admin-chart-range-control { position: relative; z-index: 3; display: flex; gap: 4px; }
.admin-chart-icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink2); transition: background-color 0.25s, color 0.25s; }
.admin-chart-icon-btn:hover, .admin-chart-icon-btn.is-active { background: var(--ed-raise); color: var(--ed-ink); }
.admin-chart-icon-calendar, .admin-chart-icon-restart { display: block; width: 15px; height: 15px; background: currentColor; -webkit-mask: var(--ed-icon) center / contain no-repeat; mask: var(--ed-icon) center / contain no-repeat; }
.admin-chart-icon-calendar { --ed-icon: 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%3Crect x='4' y='5' width='16' height='15' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16'/%3E%3C/svg%3E"); }
.admin-chart-icon-restart { --ed-icon: 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='M4 12a8 8 0 1 0 2.3-5.7M4 4v4h4'/%3E%3C/svg%3E"); }
.admin-chart-info-icon { display: block; 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' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%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'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.admin-chart-range-popover { position: absolute; top: calc(100% + 8px); right: 0; width: 300px; padding: 12px; border: 1px solid var(--ed-line2); border-radius: 16px; background: var(--ed-menu); box-shadow: var(--ed-shm); animation: ed-pop 0.3s var(--ed-ease) both; }
.admin-range-calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.admin-range-calendar-head strong { font-size: 0.8125rem; font-weight: 600; }
.admin-range-nav { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px; background: var(--ed-card2); color: var(--ed-ink2); }
.admin-range-nav::before { content: '‹'; font-size: 1rem; line-height: 1; }
.admin-range-nav-next::before { content: '›'; }
.admin-range-weekdays, .admin-range-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.admin-range-weekdays span { padding: 4px 0; color: var(--ed-ink3); font-size: 0.6875rem; }
.admin-range-grid button { height: 34px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--ed-ink); font: 0.7813rem var(--ed-mono); transition: background-color 0.2s; }
.admin-range-grid button:hover { background: var(--ed-card2); }
.admin-range-grid button:disabled { color: var(--ed-ink3); opacity: 0.4; }
.admin-range-grid .is-in-range, .admin-range-grid [data-in-range='true'] { background: var(--ed-card2); border-radius: 0; }
.admin-range-grid .is-range-start, .admin-range-grid .is-range-end, .admin-range-grid .is-selected { background: var(--ed-ink); color: var(--ed-card); }
.admin-range-grid .is-today { box-shadow: inset 0 0 0 1px var(--ed-ink3); }
.admin-chart-info-popover { position: fixed; z-index: 140; max-width: 320px; padding: 12px 14px; border: 1px solid var(--ed-line2); border-radius: 14px; background: var(--ed-menu); color: var(--ed-ink2); font-size: 0.7813rem; line-height: 1.5; box-shadow: var(--ed-shm); animation: ed-pop 0.3s var(--ed-ease) both; }

/* donut cards (flavours, volume mix), as on the Chart board: a 136px ring beside its legend */
.ed-donut { flex: 1 1 auto; display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 18px; align-items: center; min-height: 0; }
.ed-donut[hidden] { display: none; }
.ed-donut > .admin-expandable-chart-legend { width: 100%; max-width: 340px; margin: 0; }
.ed-donut > .admin-chart-surface { position: relative; flex: none; width: 136px; height: 136px; }
.ed-donut > .admin-chart-surface > .admin-chart-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.admin-flavor-chart-link { display: block; color: inherit; text-decoration: none; cursor: pointer; border-radius: 50%; }
.admin-flavor-chart-link:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: 2px; }
.admin-flavor-chart-card, .ed-volume-card { container-type: inline-size; }
@container (max-width: 320px) { .ed-donut { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; } .ed-donut > .admin-chart-surface { width: 104px; height: 104px; } }
.admin-expandable-chart-legend { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-self: center; padding: 0; border: 0; background: none; }
.ed-overview-grid .admin-flavor-chart-card, .ed-overview-grid .ed-volume-card { overflow: visible; }
/* the hourly card is a third of the row: its metric control drops under the title */
.ed-overview-grid .admin-overview-hourly-card > .admin-panel-head { flex-wrap: wrap; }
.ed-overview-grid .admin-overview-hourly-card > .admin-panel-head > div:first-child { flex: 1 1 160px; }
.ed-overview-grid .admin-overview-hourly-card > .admin-panel-head .admin-sliding-chart-toggle { margin-left: 0; }
.admin-expandable-chart-legend-list { display: flex; flex-direction: column; gap: 3px; }
.admin-expandable-chart-legend-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 26px; margin: 0 -6px; padding: 0 6px; border-radius: 8px; font-size: 0.7813rem; color: var(--ed-ink2); cursor: default; transition: background-color .2s; }
.admin-expandable-chart-legend-item.is-active { background: var(--ed-card2); }
.admin-expandable-chart-legend-item i { width: 10px; height: 10px; border-radius: 3px; }
.admin-expandable-chart-legend-item span { min-width: 0; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.admin-expandable-chart-legend-item strong { color: var(--ed-ink); font: 400 0.75rem var(--ed-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-expandable-chart-legend-toggle { align-self: flex-start; height: 26px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--ed-ink2); font-size: 0.75rem; transition: background-color 0.2s; }
.admin-expandable-chart-legend-toggle:hover { background: var(--ed-card2); color: var(--ed-ink); }
.admin-expandable-chart-legend.ed-chart-legend { flex-direction: row; align-self: auto; }
.admin-expandable-chart-legend.ed-chart-legend > span { max-width: 100%; }

/* Customers, as on the board: one link per order band, its share right, a thin bar under it */
.admin-customer-lifecycle-card { color: inherit; }
.ed-mono-ink { color: var(--ed-ink); font-family: var(--ed-mono); font-variant-numeric: tabular-nums; }
.admin-customer-lifecycle-chart { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; flex: 1; margin-top: 6px; }
/* Repeat orders: the headline share, its change, the monthly bars, then the scope */
.admin-repeat-orders-summary { display: flex; align-items: baseline; gap: 10px; margin-top: 0; }
.admin-repeat-orders-summary strong { font-size: 2.5rem; font-weight: 650; letter-spacing: -0.03em; line-height: 1.4; font-variant-numeric: tabular-nums; }
.admin-repeat-orders-summary span { color: var(--ed-ink3); font-size: 0.7813rem; font-variant-numeric: tabular-nums; }
.admin-repeat-orders-summary span.is-up { color: var(--ed-mint); }
.admin-repeat-orders-summary span.is-down { color: var(--ed-red); }
.admin-repeat-orders-bars { display: flex; align-items: flex-end; gap: 4px; height: 64px; margin-top: auto; }
.admin-repeat-orders-bars > .admin-empty { margin: auto 0 0; }
.admin-repeat-orders-bar { flex: 1; height: var(--bar, 0%); min-width: 0; border-radius: 3px 3px 2px 2px; background: var(--ed-card2); transition: height 0.8s var(--ed-ease), background-color 0.25s; }
.admin-repeat-orders-bar:hover { background: var(--ed-raise); }
.admin-repeat-orders-bar.is-current { background: var(--ed-ink); }
.admin-repeat-orders-foot { display: block; margin: 10px 0 0; color: var(--ed-ink3); font-size: 0.7188rem; line-height: 1.35; }

/* Orders by province (IndonesiaMap board): the map beside a ranked top eight, the scale in the
   header; hovering a province or a row highlights it and fades the rest */
.admin-location-heatmap-card > .admin-panel-head, .ed-overview-grid .admin-location-heatmap-card > .admin-panel-head { margin-bottom: 8px; }
.admin-location-heatmap-shell { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: center; }
/* the map keeps to its own column (on real data a stretched map ran under the ranking list) */
.admin-location-map { position: relative; min-width: 0; width: 100%; max-width: 100%; overflow: hidden; align-self: center; }
.admin-location-map svg { display: block; width: 100%; height: auto; min-height: 0; animation: ed-mapin 0.8s var(--ed-ease) both; }
.admin-location-province { stroke: var(--ed-card); stroke-width: 0.8; transition: opacity 0.25s; cursor: default; }
.admin-location-map.has-active .admin-location-province:not(.is-active) { opacity: 0.55; }
.admin-location-province:focus { outline: none; }
.admin-location-map-empty { display: grid; place-items: center; min-height: 240px; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-location-summary { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; background: transparent; }
.admin-location-legend { flex: none; display: flex; align-items: center; gap: 6px; color: var(--ed-ink3); font-size: 0.7188rem; white-space: nowrap; }
.admin-location-legend .admin-location-steps { display: flex; gap: 2px; height: auto; background: none; }
.admin-location-steps b { width: 12px; height: 8px; border-radius: 2px; background: var(--step); }
.admin-location-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.admin-location-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 34px; padding: 0 8px; border-radius: 9px; font-size: 0.7813rem; transition: background-color 0.2s; }
.admin-location-row::after { content: none; }
.admin-location-row.is-active { background: var(--ed-card2); }
.admin-location-row > *, .admin-location-row span { order: 0; flex: initial; white-space: normal; }
.admin-location-rank { color: var(--ed-ink3); font: 0.6875rem var(--ed-mono); }
.admin-location-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.admin-location-name i { flex: none; width: 8px; height: 8px; border-radius: 2px; }
.admin-location-name span { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.admin-location-share { font: 0.75rem var(--ed-mono); font-variant-numeric: tabular-nums; }
.admin-location-rest { padding: 6px 8px 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-location-tip { position: absolute; left: 12px; bottom: 6px; z-index: 2; min-width: 190px; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; background: var(--ed-raise); box-shadow: var(--ed-tipsh, 0 18px 40px -16px rgba(0, 0, 0, 0.85)); color: var(--ed-ink2); font-size: 0.75rem; pointer-events: none; animation: ed-fade 0.25s var(--ed-ease) both; }
.admin-location-tip[hidden] { display: none; }
.admin-location-tip strong { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; color: var(--ed-ink); font-size: 0.7813rem; font-weight: 600; }
.admin-location-tip strong i { width: 9px; height: 9px; border-radius: 3px; }
.admin-location-tip > span { display: flex; justify-content: space-between; gap: 14px; }
.admin-location-tip b { color: var(--ed-ink); font: 500 0.75rem var(--ed-mono); }
.admin-location-tip small { display: block; margin-top: 4px; color: var(--ed-ink3); font-size: 0.7188rem; }
@keyframes ed-mapin { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) { .admin-location-heatmap-shell { grid-template-columns: minmax(0, 1fr); } }

/* The Shopee ad status (Main board): an amber dot, one line, then Review ads, Reload status and a
   close button; hidden, it becomes a small pill. Review ads opens the per-account status and the
   monitoring choices underneath. */
.ad-monitor { display: flex; flex-direction: column; margin: 0; padding: 7px 8px 7px 16px; border: 1px solid rgba(255, 181, 71, 0.35); border-radius: 14px; background: transparent; color: var(--ed-ink2); font-size: 0.8125rem; animation: ed-in 0.6s var(--ed-ease) 0.08s both; }
:root[data-admin-theme='light'] .ad-monitor { border-color: rgba(168, 100, 0, 0.35); }
.ad-monitor[data-severity='ok'] { border-color: var(--ed-line2); }
/* MonitorTools board: unexpected pauses are amber (dot and thin border); red is kept for the ad budget alert */
.ad-monitor[data-severity='warning'] { border-color: rgba(255, 181, 71, 0.35); }
:root[data-admin-theme='light'] .ad-monitor[data-severity='warning'] { border-color: rgba(168, 100, 0, 0.35); }
.ad-monitor.is-collapsed { padding: 0; border: 0; }
.ad-monitor:has(> [data-monitor-compact]:not([hidden])) { padding: 0; border: 0; }
.ad-monitor-header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; min-height: 36px; margin: 0; }
.ad-monitor-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ed-amber); }
.ad-monitor[data-severity='ok'] .ad-monitor-dot { background: var(--ed-mint); }
.ad-monitor[data-severity='warning'] .ad-monitor-dot { background: var(--ed-amber); }
.ad-monitor-header h2 { flex: 1 1 360px; min-width: 0; margin: 0; color: var(--ed-ink2); font-size: 0.8125rem; font-weight: 400; letter-spacing: normal; line-height: 1.4; }
.ad-monitor-header h2 strong { color: var(--ed-ink); font-weight: 600; }
.ad-monitor-header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ad-monitor-review, .ad-monitor-reload, .ad-monitor-close { display: inline-flex; align-items: center; justify-content: center; height: 36px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; font-size: 0.7813rem; cursor: pointer; transition: background-color 0.25s, color 0.25s, transform 0.35s var(--ed-ease); }
.ad-monitor-review { background: transparent; color: var(--ed-ink2); }
.ad-monitor-reload { background: var(--ed-card2); color: var(--ed-ink); font-weight: 500; }
.ad-monitor-close { width: 36px; padding: 0; background: transparent; color: var(--ed-ink2); }
.ad-monitor-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ad-monitor-review:hover, .ad-monitor-reload:hover, .ad-monitor-close:hover, .ad-monitor-review[aria-expanded='true'] { background: var(--ed-raise); color: var(--ed-ink); }
.ad-monitor-review:active, .ad-monitor-reload:active, .ad-monitor-close:active { transform: scale(0.97); }
.ad-monitor-reload:disabled { opacity: 0.5; cursor: default; }
.ad-monitor-review-panel { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 8px 19px; padding-right: 8px; animation: ed-in 0.45s var(--ed-ease) both; }
.ad-monitor-review-panel[hidden] { display: none; }
.ad-monitor-review-panel p { margin: 0; color: var(--ed-ink3); font-size: 0.75rem; line-height: 1.5; }
.ad-monitor-review-panel [data-monitor-error] { color: var(--ed-amber); }
.ad-monitor-account-status-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ad-monitor-account-status { padding-left: 10px; border-left: 2px solid rgba(255, 181, 71, 0.45); overflow-wrap: anywhere; }
.ad-monitor-account-status[data-state='fresh'] { border-left-color: var(--ed-mint); }
.ad-monitor-account-status strong { color: var(--ed-ink); font-size: 0.7813rem; font-weight: 600; }
/* review cards (MonitorTools board) */
.ad-monitor-account { display: flex; flex-direction: column; gap: 8px; }
.ad-monitor-account + .ad-monitor-account { margin-top: 10px; }
.ad-monitor-account-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ad-monitor-account h3 { margin: 4px 0; color: var(--ed-ink); font-size: 0.8438rem; font-weight: 600; }
.ad-monitor-seller { color: var(--ed-ink2); font-size: 0.75rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ed-line2); }
.ad-monitor-seller:hover { color: var(--ed-ink); text-decoration-color: currentColor; }
.ad-monitor-campaign { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 12px 12px 12px 12px; border-radius: 14px; background: var(--ed-card2); overflow-wrap: anywhere; }
.ad-monitor-campaign-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ad-monitor-campaign h4 { margin: 0; color: var(--ed-ink); font-size: 0.7813rem; font-weight: 600; }
.ad-monitor-campaign-state { flex: none; color: var(--ed-amber); font-size: 0.75rem; }
.ad-monitor-review-panel .ad-monitor-campaign p { color: var(--ed-ink2); font-size: 0.75rem; }
.ad-monitor-campaign-seen strong { color: var(--ed-ink); font-weight: 600; }
.ad-monitor-review-panel .ad-monitor-campaign .ad-monitor-campaign-times { color: var(--ed-ink3); font: 0.7188rem var(--ed-mono); }
.ad-monitor-review-panel .ad-monitor-account-foot { color: var(--ed-ink3); font-size: 0.7188rem; }
.ad-monitor-caution { color: var(--ed-amber) !important; }
.ad-monitor-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ad-monitor-actions .admin-ghost-btn, .ad-monitor-campaign > .admin-ghost-btn { align-self: flex-start; min-height: 32px; height: 32px; padding: 0 11px; border-radius: 9px; background: var(--ed-card); color: var(--ed-ink); font-size: 0.75rem; font-weight: 500; }
.ad-monitor-actions .admin-ghost-btn:hover { background: var(--ed-raise); }
.ad-monitor-actions .admin-ghost-btn.is-primary { background: var(--ed-ink); color: var(--ed-card); font-weight: 600; }
.ad-monitor-actions .admin-ghost-btn.is-primary:hover { opacity: 0.88; }
.ad-monitor-dialog-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 12px 0; padding: 12px; border-radius: 12px; background: var(--ed-card2); font-size: 0.7813rem; }
.ad-monitor-dialog-summary:empty { display: none; }
.ad-monitor-dialog-summary dt { color: var(--ed-ink3); }
.ad-monitor-dialog-summary dd { margin: 0; color: var(--ed-ink); text-align: right; overflow-wrap: anywhere; }
.ad-monitor-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ad-monitor-links a { color: var(--ed-ink); text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }
.ad-monitor-links a:hover { text-decoration-color: currentColor; }
/* MonitorTools board: each account is a card (amber edge when it has pauses), a dot before its title,
   Seller Centre with an out-arrow, raised choice buttons; the confirm dialog's buttons sit right */
.ad-monitor-review-panel .ad-monitor-account { gap: 10px; padding: 16px 18px; border: 1px solid var(--ed-line); border-radius: 18px; background: var(--ed-card); }
.ad-monitor-review-panel .ad-monitor-account.has-incidents { border-color: rgba(255, 181, 71, 0.38); }
:root[data-admin-theme='light'] .ad-monitor-review-panel .ad-monitor-account.has-incidents { border-color: rgba(168, 100, 0, 0.38); }
.ad-monitor-account-head { align-items: center; }
.ad-monitor-account h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 0.875rem; }
.ad-monitor-account-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ed-ink3); }
.ad-monitor-account.has-incidents .ad-monitor-account-dot, .ad-monitor-account:not([data-state='fresh']) .ad-monitor-account-dot { background: var(--ed-amber); }
.ad-monitor-account[data-state='fresh']:not(.has-incidents) .ad-monitor-account-dot { background: var(--ed-mint); }
.ad-monitor-seller { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 0.7813rem; }
.ad-monitor-seller svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ad-monitor-review-panel .ad-monitor-campaign { gap: 8px; }
.ad-monitor-review-panel .ad-monitor-campaign .ad-monitor-campaign-times { font-size: 0.7188rem; }
.ad-monitor-review-panel .ad-monitor-account-foot { font-size: 0.75rem; }
.ad-monitor-actions .admin-ghost-btn, .ad-monitor-campaign > .admin-ghost-btn { height: 30px; min-height: 30px; background: var(--ed-raise); }
.ad-monitor-actions .admin-ghost-btn:hover { background: var(--ed-line2); }
/* MonitorTools board confirm sheet: 20px padding, a 16px question, one plain ink2 sentence, the
   campaign summary and the buttons 14px apart */
dialog.ad-monitor-dialog { padding: 20px; }
.ad-monitor-dialog h2 { margin: 0; font-size: 1rem; font-weight: 650; }
.ad-monitor-dialog [data-monitor-confirm-description] { margin: 5px 0 0; color: var(--ed-ink2); font-size: 0.8125rem; line-height: 1.4; }
.ad-monitor-dialog .ad-monitor-dialog-summary { margin: 14px 0 0; }
.ad-monitor-dialog .ad-monitor-dialog-summary dd { font-weight: 500; }
.ad-monitor-dialog [data-monitor-confirm-error] { margin: 10px 0 0; color: var(--ed-amber); font-size: 0.75rem; }
.ad-monitor-dialog [data-monitor-confirm-error]:empty { display: none; }
[data-monitor-confirm] .ad-monitor-actions { justify-content: flex-end; gap: 8px; margin-top: 14px; }
[data-monitor-confirm] .ad-monitor-actions [data-monitor-confirm-cancel] { font-weight: 400; }
[data-monitor-confirm] .ad-monitor-actions .admin-ghost-btn { height: 34px; min-height: 34px; padding: 0 12px; border-radius: 10px; background: var(--ed-card2); font-size: 0.7813rem; }
[data-monitor-confirm] .ad-monitor-actions .admin-ghost-btn:hover { background: var(--ed-raise); }
[data-monitor-confirm] .ad-monitor-actions .admin-primary-btn { height: 34px; min-height: 34px; padding: 0 14px; border-radius: 10px; font-size: 0.7813rem; font-weight: 600; }
@media (pointer: coarse) { .ad-monitor-actions .admin-ghost-btn, [data-monitor-confirm] .ad-monitor-actions .admin-ghost-btn, [data-monitor-confirm] .ad-monitor-actions .admin-primary-btn { height: 44px; min-height: 44px; } }
[data-monitor-compact] { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--ed-ink3); font-size: 0.7813rem; animation: ed-in 0.45s var(--ed-ease) both; }
[data-monitor-compact][hidden] { display: none; }
[data-monitor-compact] .admin-ghost-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; height: 32px; padding: 0 12px; border: 1px solid var(--ed-line2); border-radius: 999px; background: transparent; color: var(--ed-ink); font-size: 0.75rem; font-weight: 400; }
[data-monitor-compact] .admin-ghost-btn::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ed-amber); }
[data-monitor-compact] .admin-ghost-btn:hover { background: var(--ed-raise); }

/* Sales recap (SalesRecap board): a modal sheet 1120px wide, 110px from the top, centred on the
   page beside the sidebar; the metric column stays put while the months scroll; Total sits on a fill. */
dialog.ed-recap { position: fixed; inset: 110px auto auto calc((100vw + var(--ed-nav-w)) / 2 - min(560px, (100vw - var(--ed-nav-w) - 48px) / 2)); display: none; flex-direction: column; box-sizing: border-box; width: min(1120px, calc(100vw - var(--ed-nav-w) - 48px)); max-width: none; max-height: calc(100dvh - 140px); margin: 0; 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; animation: ed-recap-pop 0.4s var(--ed-ease) both; }
dialog.ed-recap[open] { display: flex; }
dialog.ed-recap::backdrop { background: rgba(0, 0, 0, 0.5); animation: ed-fade 0.3s var(--ed-ease) both; }
@keyframes ed-recap-pop { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
.ed-recap-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 14px 14px 20px; }
.ed-recap-copy { flex: 1 1 260px; min-width: 0; margin-right: auto; }
.ed-recap-copy h2 { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.ed-recap-copy p { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.7813rem; }
.ed-recap-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.7813rem; font-weight: 500; white-space: nowrap; }
.ed-recap-btn:hover { background: var(--ed-raise); }
.ed-recap-btn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-recap-btn[data-feedback='done'] { color: var(--ed-mint); }
.ed-recap-btn[data-feedback='failed'] { color: var(--ed-red); }
.ed-recap-btn[data-feedback] > span { animation: ed-recap-flash 0.3s var(--ed-ease); }
@keyframes ed-recap-flash { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.ed-recap-close { display: grid; place-items: center; width: 34px; height: 34px; min-height: 34px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ed-ink3); transition: background-color 0.2s, color 0.2s; }
.ed-recap-close:hover { background: var(--ed-card2); color: var(--ed-ink); }
.ed-recap-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ed-recap-scroll { flex: 0 1 auto; min-height: 0; overflow: auto; border-top: 1px solid var(--ed-line); }
.ed-recap-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.ed-recap-table th, .ed-recap-table td { height: auto; border: 0; border-bottom: 1px solid var(--ed-line); vertical-align: middle; white-space: nowrap; }
.ed-recap-table thead th { height: 40px; padding: 0 8px; background: var(--ed-sheet); color: var(--ed-ink3); font-size: 0.75rem; font-weight: 500; text-align: right; }
.ed-recap-table thead th small, .ed-recap-table tbody th small { display: block; color: var(--ed-ink3); font-weight: 400; }
.ed-recap-table thead th small { font-size: 0.6563rem; }
.ed-recap-table thead th:first-child { position: sticky; left: 0; z-index: 2; width: 180px; padding: 0 12px 0 20px; text-align: left; }
.ed-recap-table tbody th { position: sticky; left: 0; z-index: 1; height: 44px; padding: 0 12px 0 20px; background: var(--ed-sheet); color: var(--ed-ink); font-size: 0.7813rem; font-weight: 600; text-align: left; }
.ed-recap-table tbody th small { font-size: 0.7188rem; }
.ed-recap-table td { height: 44px; padding: 0 8px; background: transparent; color: var(--ed-ink); font-family: var(--ed-mono); font-size: 0.75rem; text-align: right; }
.ed-recap-table td.is-partial { color: var(--ed-ink3); }
.ed-recap-table .is-total { padding: 0 20px 0 12px; background: var(--ed-card2); color: var(--ed-ink); font-weight: 600; }
.ed-recap-table thead th.is-total { color: var(--ed-ink); font-weight: 600; }
.ed-recap-table tbody tr { transition: background-color 0.15s; }
.ed-recap-table tbody tr:hover, .ed-recap-table tbody tr:hover > th, .ed-recap-table tbody tr:hover > td { background: var(--ed-card2); }
.ed-recap-table tbody tr:last-child > * { border-bottom: 1px solid var(--ed-line); }
.ed-recap-table td.admin-empty { position: static; height: 96px; font-family: var(--ed-font); text-align: center; }
.ed-recap-foot { margin: 0; padding: 12px 20px 14px; color: var(--ed-ink3); font-size: 0.75rem; }
@media (max-width: 767px) {
  dialog.ed-recap { inset: 12px auto auto 8px; width: calc(100vw - 16px); max-height: calc(100dvh - 24px); }
  .ed-recap-head { padding: 14px 10px 12px 16px; }
  .ed-recap-copy { flex-basis: calc(100% - 64px); }
  .ed-recap-head > .ed-recap-close { order: -1; margin-left: auto; }
  .ed-recap-head > .ed-recap-copy { order: -2; }
  .ed-recap-table thead th:first-child, .ed-recap-table tbody th { width: 120px; min-width: 120px; max-width: 132px; padding: 6px 10px 6px 16px; white-space: normal; }
  .ed-recap-foot { padding: 10px 16px 14px; }
}
@media (max-width: 1024px) and (pointer: coarse) { .ed-recap-btn { min-height: 44px !important; } .ed-recap-close { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { dialog.ed-recap, dialog.ed-recap::backdrop { animation: none; } }

/* old panels carried their own grid spans; inside the new rows every card takes one cell */
.ed-row > *, .ed-overview-grid > * { grid-column: auto; grid-row: auto; width: auto; max-width: none; }
.admin-chart-range-control { left: auto; bottom: auto; }

.ad-monitor-account-status-list:empty { display: none; }

/* customer rows: "New · 1 order" and its share on one line, a thin bar under them */
.admin-customer-lifecycle-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'label value' 'track track'; gap: 5px 10px; align-items: baseline; border-radius: 6px; color: inherit; text-decoration: none; }
.admin-customer-lifecycle-row:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: 2px; }
/* the order band sits beside the name and drops under it when the card is narrow, never cut off */
.admin-customer-lifecycle-label { grid-area: label; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; min-width: 0; font-size: 0.7813rem; }
.admin-customer-lifecycle-label strong { font-weight: 400; }
.admin-customer-lifecycle-label span { color: var(--ed-ink3); white-space: nowrap; }
.admin-customer-lifecycle-value { grid-area: value; font: normal 0.75rem var(--ed-mono); font-variant-numeric: tabular-nums; }
.admin-customer-lifecycle-track { grid-area: track; height: 5px; border-radius: 9px; background: var(--ed-card2); overflow: hidden; }
.admin-customer-lifecycle-track i { display: block; width: var(--lifecycle-share, 0%); height: 100%; border-radius: 9px; background: var(--ed-s2, #b8b8b8); transition: width 0.8s var(--ed-ease); }
:root[data-admin-theme='light'] .admin-customer-lifecycle-track i { background: #4f4f4f; }
.admin-customer-lifecycle-row.is-lead .admin-customer-lifecycle-track i { background: var(--ed-ink); }
.admin-customer-lifecycle-row:hover .admin-customer-lifecycle-label strong { color: var(--ed-ink); text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }

/* chart tooltips on dashboard views follow the Chart board: raised, no border, 184px wide */
.admin-view .admin-chart-tooltip { min-width: 184px; max-width: 260px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--ed-raise); color: var(--ed-ink2); font-size: 0.75rem; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.85); transition: opacity 0.15s, visibility 0s linear 0.15s, transform 0.3s var(--ed-ease); }
:root[data-admin-theme='light'] .admin-view .admin-chart-tooltip { box-shadow: 0 18px 40px -18px rgba(24, 20, 34, 0.4), 0 2px 6px rgba(24, 20, 34, 0.08); }
.admin-view .admin-chart-tooltip > strong { margin-bottom: 4px; color: var(--ed-ink); font-size: 0.7813rem; font-weight: 600; }
.admin-view .admin-chart-tooltip-body { gap: 0; }
.admin-view .admin-chart-tooltip-row { gap: 14px; min-height: 0; line-height: 1.55; font-size: 0.75rem; }
.admin-view .admin-chart-tooltip-row > span:not(.admin-chart-tooltip-dot) { white-space: nowrap; }
.admin-view .admin-chart-tooltip-row .admin-chart-tooltip-dot + span { margin-left: -8px; }
.admin-view .admin-chart-tooltip-row strong { font-size: 0.7188rem; font-weight: 600; }
.admin-view .admin-chart-tooltip-row.is-up strong { color: var(--ed-mint); }
.admin-view .admin-chart-tooltip-row.is-down strong { color: var(--ed-red); }
.admin-view .admin-chart-tooltip-row.is-total { margin-top: 3px; padding-top: 3px; }
.ed-overview-grid { align-items: stretch; justify-content: flex-start; }
.ed-overview-grid > .ed-row, .ed-overview-grid > .admin-panel { width: 100%; box-sizing: border-box; }

/* ---------- sign in ---------- */
body.is-login { min-height: 100vh; padding: 0; background: var(--ed-frame); }
.ed-signin { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; box-sizing: border-box; min-height: 100vh; padding: 24px; overflow: hidden; background: var(--ed-frame); }
.ed-signin-field { position: absolute; inset: 0; display: block; width: 100%; height: 100%; animation: ed-fade 1.6s var(--ed-ease) both; }
.ed-signin-card { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; width: 880px; max-width: 100%; border-radius: 28px; background: var(--ed-panel); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45); overflow: hidden; animation: ed-rise 0.7s var(--ed-ease) 0.15s both; }
.ed-signin-intro { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 36px; }
.ed-signin-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--ed-card); }
.ed-signin-mark img { display: block; width: 26px; height: 26px; }
.ed-signin-intro h1 { margin: 0; font-size: 2.125rem; font-weight: 650; letter-spacing: -0.025em; line-height: 1.08; }
.ed-signin-intro p { max-width: 330px; margin: 12px 0 0; color: var(--ed-ink2); font-size: 0.8438rem; }
.ed-signin-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--ed-ink3); font-size: 0.7813rem; text-decoration: none; transition: color 0.2s; }
.ed-signin-back:hover { color: var(--ed-ink); }
.ed-signin-back svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-signin-form { display: flex; flex-direction: column; gap: 6px; margin: 10px; padding: 26px; border-radius: 20px; background: var(--ed-card); }
.ed-signin-form h2 { margin: 0 0 12px; font-size: 1rem; font-weight: 650; }
.ed-signin-label { margin-top: 8px; color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-signin-form input { width: 100%; min-height: 42px; font-size: 0.8438rem; }
.ed-signin-form input[readonly] { opacity: 1; cursor: default; }
.ed-signin-code { position: relative; display: flex; align-items: center; }
.ed-signin-code input { padding-right: 44px; font-family: var(--ed-mono); font-size: 1rem; letter-spacing: 0.32em; }
.ed-signin-code.is-invalid input { box-shadow: 0 0 0 1px var(--ed-red); animation: ed-signin-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
.ed-signin-eye { position: absolute; right: 5px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 9px; background: transparent; color: var(--ed-ink3); }
.ed-signin-eye:hover { background: transparent; color: var(--ed-ink); }
.ed-signin-eye svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-signin-form .admin-primary-btn { min-height: 44px; border-radius: 12px; font-size: 0.875rem; font-weight: 650; }
/* the error line, the code placeholder and the build stamp's colour are set in shell.css (SignIn board) */
.ed-signin-build { position: absolute; z-index: 1; right: 22px; bottom: 18px; font: 0.7188rem var(--ed-mono); }
@keyframes ed-signin-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
@media (max-width: 760px) {
  .ed-signin-card { grid-template-columns: minmax(0, 1fr); }
  .ed-signin-intro { gap: 24px; padding: 26px 26px 8px; }
  .ed-signin-intro h1 { font-size: 1.875rem; }
}

/* ---------- Launch Pad ---------- */
body.is-launch-pad { min-height: 100vh; margin: 0; padding: 10px; box-sizing: border-box; background: var(--ed-frame); }
.ed-launch { max-width: 1040px; margin: 0 auto; padding-top: 70px; }
.ed-launch-head { display: flex; align-items: center; gap: 14px; padding: 0 6px 22px; color: var(--ed-fink); }
.ed-launch-head > div { margin-right: auto; }
.ed-launch-head h1 { margin: 0; color: var(--ed-fink); font-size: 1.5rem; font-weight: 650; letter-spacing: -0.015em; }
.ed-launch-head p { margin: 2px 0 0; color: var(--ed-fink2); font-size: 0.7813rem; }
.ed-launch-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); }
.ed-launch-icon svg, .ed-launch-theme svg, .ed-launch-tag svg, .ed-launch-go svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-launch-icon svg { width: 20px; height: 20px; }
.ed-launch-theme { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; background: transparent; color: var(--ed-fink2); overflow: hidden; }
.ed-launch-theme:hover { background: rgba(255, 255, 255, 0.06); color: var(--ed-fink); }
.ed-launch-theme svg { position: absolute; width: 18px; height: 18px; transition: opacity 0.4s, transform 0.6s var(--ed-ease); }
.ed-launch-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
:root[data-admin-theme='light'] .ed-launch-sun { opacity: 1; transform: none; }
:root[data-admin-theme='light'] .ed-launch-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
.ed-launch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; border-radius: 28px; background: var(--ed-panel); }
.ed-launch-app { display: flex; flex-direction: column; gap: 18px; min-height: 196px; box-sizing: border-box; padding: 20px; border-radius: 20px; background: var(--ed-card); color: var(--ed-ink); text-decoration: none; transition: transform 0.45s var(--ed-ease); animation: ed-rise 0.55s var(--ed-ease) both; }
.ed-launch-app:hover { transform: translateY(-3px); }
.ed-launch-app:hover .ed-launch-go { background: var(--ed-ink); color: var(--ed-card); }
.ed-launch-app:active { transform: scale(0.985); }
.ed-launch-top { display: flex; align-items: center; gap: 12px; }
.ed-launch-tile { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--ed-card2); overflow: hidden; }
.ed-launch-tile img { display: block; width: 24px; height: 24px; object-fit: contain; }
.ed-launch-tile.is-wide { width: 118px; }
.ed-launch-tile.is-jg img { width: 96px; height: 30px; object-fit: cover; }
.ed-launch-tile.is-zero img { width: 78px; height: 23px; }
:root:not([data-admin-theme='light']) .ed-launch-tile.is-zero img { filter: invert(1); }
.ed-launch-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-launch-tag svg { width: 14px; height: 14px; }
.ed-launch-copy { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.ed-launch-copy strong { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; }
.ed-launch-copy span { color: var(--ed-ink2); font-size: 0.8125rem; }
.ed-launch-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--ed-line); }
.ed-launch-domain { color: var(--ed-ink3); font: 0.75rem var(--ed-mono); overflow-wrap: anywhere; }
.ed-launch-go { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); transition: background-color 0.3s, color 0.3s; }
.ed-launch-go svg { width: 16px; height: 16px; }
.ed-launch-build { margin: 16px 6px 0; color: var(--ed-fink2); font: 0.7188rem var(--ed-mono); }
@media (max-width: 760px) {
  .ed-launch { padding-top: 24px; }
  .ed-launch-grid { grid-template-columns: minmax(0, 1fr); padding: 10px; border-radius: 24px; }
  .ed-launch-app { min-height: 168px; }
}

/* ---------- Daily sales ---------- */
[data-admin-dashboard][data-active-view='daily'] .ed-view-actions[data-ed-view-actions='daily'] { display: flex; }
/* Daily board top bar: "Live 23.01" on the left; the month as a pill (calendar icon, month, chevron)
   and Export PDF on the right. The month stays a real month input under the pill. */
[data-ed-view-actions='daily'] { flex: 1 1 auto; min-width: 0; }
[data-ed-view-actions='daily'] > .ed-live { margin-right: auto; }
.ed-month { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 13px 0 15px; border-radius: 999px; background: var(--ed-fitem); color: var(--ed-fink); font-size: 0.7813rem; font-weight: 500; transition: background-color 0.25s; cursor: pointer; }
.ed-month:hover, .ed-month:focus-within { background: var(--ed-fon); }
.ed-month:focus-within { outline: 2px solid var(--ed-fink2); outline-offset: 2px; }
.ed-month svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-month .ed-month-chevron { width: 14px; height: 14px; }
.ed-month-label { white-space: nowrap; }
.ed-month-label:empty::before { content: 'Month'; }
.ed-month input[type='month'] { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: transparent; opacity: 0; cursor: pointer; }
.ed-month input[type='month']::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; opacity: 0; cursor: pointer; }
.ed-daily { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; border: 0; background: transparent; }
.ed-daily .daily-trend-panel { box-sizing: border-box; height: 300px; }
.ed-daily .daily-trend-panel > .admin-panel-head { flex-wrap: nowrap; margin-bottom: 10px; }
.ed-daily .daily-trend-panel > .admin-panel-head .admin-sliding-chart-toggle { flex: none; margin: 0 0 0 auto; }
.ed-daily .daily-trend-panel, .ed-overview-grid .admin-panel-chart { gap: 0; }
.ed-daily .daily-trend-panel > .admin-panel-head .admin-sliding-chart-toggle > .admin-toggle-pill { min-height: 28px; height: 28px; padding: 0 12px; font-size: 0.75rem; }
.ed-daily .daily-trend-chart-surface { position: relative; flex: 1 1 auto; min-height: 0; }
.ed-daily .daily-trend-chart { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 767px) { .ed-daily .daily-trend-panel > .admin-panel-head { flex-wrap: wrap; } }
.daily-sheet-panel { display: flex; flex-direction: column; padding-bottom: 8px; }
.daily-sheet-scroll { max-height: 474px; margin: 0 -18px; overflow: auto; border: 0; background: transparent; }
.daily-sheet-foot-line { margin: 8px 0 4px; color: var(--ed-ink3); font-size: 0.75rem; }
.daily-sheet-foot-line:empty { display: none; }
.daily-sheet-table tbody th.daily-day-cell[tabindex] { cursor: pointer; }
.daily-sheet-table tbody th.daily-day-cell[tabindex]:hover strong { text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }
.daily-sheet-table tbody th.daily-day-cell[tabindex]:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: -2px; }
.daily-sheet-table { min-width: 100%; border-collapse: separate; border-spacing: 0; }
.daily-sheet-table th, .daily-sheet-table td { height: auto; padding: 8px 12px; white-space: nowrap; }
.daily-sheet-table thead th { position: sticky; top: 0; z-index: 2; height: 34px; background: var(--ed-card); color: var(--ed-ink3); font-size: 0.75rem; font-weight: 500; text-align: right; }
.daily-sheet-table thead th:first-child, .daily-sheet-table .daily-day-cell { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--ed-card); }
.daily-sheet-table thead th:first-child { z-index: 3; padding-left: 18px; }
.daily-account-header small { display: block; color: var(--ed-ink3); font-size: 0.6875rem; font-weight: 400; }
.daily-sheet-table tbody th, .daily-sheet-table tbody td { height: 54px; border-bottom: 1px solid var(--ed-line); }
.daily-day-cell { padding-left: 18px !important; font-weight: 400; }
.daily-day-cell strong { display: block; font-size: 0.7813rem; font-weight: 500; }
.daily-day-cell small { display: block; color: var(--ed-ink3); font-size: 0.7188rem; }
.daily-number-cell { text-align: right; vertical-align: middle; font-variant-numeric: tabular-nums; }
.daily-cell-qty { display: block; font: 500 0.7813rem var(--ed-mono); }
.daily-cell-rp { display: block; color: var(--ed-ink3); font: 0.6875rem var(--ed-mono); }
.daily-cell-rp:empty { display: none; }
.daily-cell-total { font: 600 0.7813rem var(--ed-mono); }
.daily-total-cell { padding-right: 18px !important; }
.daily-total-header:last-child { padding-right: 18px !important; }
.daily-zero { color: var(--ed-ink3); font: 0.75rem var(--ed-mono); }
.daily-sheet-table tbody tr.is-today > th, .daily-sheet-table tbody tr.is-today > td { background: var(--ed-card2); }
.daily-sheet-table tbody .daily-day-cell { color: var(--ed-ink); }
/* today reads as one band: date, zeros, quantities and totals all in full ink on the highlight */
.daily-sheet-table tbody tr.is-today .daily-day-cell strong { font-weight: 650; }
.daily-sheet-table tbody tr.is-today .daily-zero, .daily-sheet-table tbody tr.is-today .daily-cell-qty, .daily-sheet-table tbody tr.is-today .daily-cell-total { color: var(--ed-ink); }
.daily-sheet-table tbody tr.is-future > th strong { color: var(--ed-ink3); font-weight: 400; }
.daily-sheet-table tfoot th, .daily-sheet-table tfoot td { position: sticky; z-index: 2; height: 44px; background: var(--ed-card); border-bottom: 0; color: var(--ed-ink); }
.daily-sheet-table tfoot tr.daily-foot-total > * { bottom: 44px; border-top: 1px solid var(--ed-line2); }
.daily-sheet-table tfoot tr.daily-foot-average > * { bottom: 0; }
.daily-sheet-table tfoot .daily-day-cell { z-index: 3; }
.daily-sheet-table tfoot .daily-day-cell strong { font-weight: 600; }
.daily-sheet-table tbody tr:hover > td, .daily-sheet-table tbody tr:hover > th { background: var(--ed-card2); }
/* Custom columns (Daily board): one row; the title on the left, then channel chips, the name field
   with its label inside, and Add column. Columns already added are listed under it. */
.daily-sheet-footbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 16px 14px 18px; }
.daily-sheet-footbar > .admin-panel-head { flex: 1 1 260px; margin: 0; }
.daily-platform-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.daily-platform-picker { flex: 0 1 auto; margin: 0; padding: 0; border: 0; min-width: 0; }
.daily-platform-form > .daily-add-platform-btn { margin-left: 0; }
.daily-platform-options { display: flex; flex-wrap: wrap; gap: 6px; }
.daily-platform-options label { position: relative; display: inline-flex; align-items: center; height: 34px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--ed-line); border-radius: 999px; background: transparent; color: var(--ed-ink2); font-size: 0.75rem; font-weight: 500; cursor: pointer; transition: background-color 0.25s, color 0.2s, border-color 0.2s, transform 0.35s var(--ed-ease); }
.daily-platform-options label:hover { background: var(--ed-raise); }
.daily-platform-options label:active { transform: scale(0.97); }
.daily-platform-options label input { position: absolute; opacity: 0; pointer-events: none; }
.daily-platform-options label:has(input:checked) { border-color: var(--ed-ink3); background: var(--ed-card2); color: var(--ed-ink); }
.daily-platform-options label:has(input:focus-visible) { outline: 2px solid var(--ed-ink2); outline-offset: 2px; }
.daily-platform-options .admin-empty { margin: 0; padding: 0; border: 0; background: none; color: var(--ed-ink3); font-size: 0.75rem; }
.daily-column-name-field { display: flex; align-items: center; gap: 8px; flex: 0 1 220px; box-sizing: border-box; width: 220px; height: 36px; padding: 0 12px; border-radius: 11px; background: var(--ed-card2); cursor: text; }
.daily-column-name-field:focus-within { box-shadow: 0 0 0 1px var(--ed-ink3); }
.daily-column-name-field > span { flex: none; color: var(--ed-ink3); font-size: 0.75rem; white-space: nowrap; }
.daily-column-name-field input { flex: 1; width: 100%; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; background: transparent !important; box-shadow: none !important; color: var(--ed-ink); font-size: 0.7813rem; }
.daily-add-platform-btn { height: 36px; min-height: 36px; padding: 0 14px; border-radius: 11px; background: var(--ed-ink) !important; color: var(--ed-card) !important; font-size: 0.7813rem !important; font-weight: 600 !important; }
.daily-add-platform-btn:disabled { opacity: 0.4; }
.daily-platform-list { flex-basis: 100%; }
.daily-platform-list[hidden] { display: none; }
.daily-platform-feedback { flex-basis: 100%; margin: 0; color: var(--ed-ink3); font-size: 0.75rem; }
.daily-platform-list { display: flex; flex-wrap: wrap; gap: 6px; }
.daily-platform-list > .admin-empty { min-height: 0; padding: 10px 14px; flex: 1; }
.daily-platform-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--ed-card2); font-size: 0.7813rem; }
.daily-platform-chip-actions { display: inline-flex; gap: 2px; }
.daily-platform-chip-actions button { width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 50%; background: transparent; color: var(--ed-ink3); }
.daily-platform-chip-actions button:hover { background: var(--ed-raise); color: var(--ed-ink); }
/* removing a manual column: the Dialogs board's "Protected change · PIN" sheet with six PIN boxes */
dialog.daily-column-remove-dialog { width: min(442px, calc(100vw - 24px)); max-width: none; padding: 0; overflow: visible; }
.daily-column-remove-dialog form { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 20px; }
.daily-column-remove-head h2 { margin: 0; font-size: 1rem; font-weight: 650; line-height: 1.4; letter-spacing: normal; overflow-wrap: anywhere; }
.daily-column-remove-head p { margin: 5px 0 0; color: var(--ed-ink2); font-size: 0.8125rem; line-height: 1.4; }
.daily-pin-field { display: flex; flex-direction: column; gap: 6px; }
.daily-pin-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.daily-pin-boxes.is-bad { animation: ed-signin-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
.daily-pin-boxes input { width: 100%; min-width: 0; height: 46px; min-height: 46px; padding: 0; border: 0; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink); font: 600 1.125rem/1 var(--ed-mono); text-align: center; caret-color: var(--ed-ink3); box-shadow: none; }
.daily-pin-boxes input:hover { background: var(--ed-card2); }
.daily-pin-boxes input:focus, .daily-pin-boxes input:focus-visible { background: var(--ed-card2); box-shadow: 0 0 0 1px var(--ed-ink3); outline: 0; }
.daily-pin-boxes.is-bad input { box-shadow: 0 0 0 1px var(--ed-red); }
.daily-pin-error { display: block; min-height: 16px; color: var(--ed-red); font-size: 0.75rem; line-height: 1.4; }
.daily-column-remove-actions { display: flex; justify-content: flex-end; gap: 8px; }
.daily-column-remove-actions > button { height: 38px; min-height: 38px; padding: 0 14px; border-radius: 11px; font-size: 0.8125rem; font-weight: 400; }
.daily-column-remove-actions > .admin-danger-btn { font-weight: 650; }
@media (pointer: coarse) {
  .daily-pin-boxes input { min-width: 44px; font-size: 1.125rem !important; }
  .daily-column-remove-actions > button { height: 44px; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .daily-pin-boxes.is-bad { animation: none; } }

/* ---------- Activity & signals (manual history) ---------- */
.admin-context-view.is-active { display: flex; flex-direction: column; gap: 12px; }
/* Context board: "How it works" sits in the top bar on the right */
[data-admin-dashboard][data-active-view='context'] .ed-view-actions[data-ed-view-actions='context'] { display: flex; margin-left: auto; margin-right: 0; }
.admin-context-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 12px 12px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.admin-context-intro { flex: 0 1 auto; min-width: 0; margin-right: auto; }
.admin-context-field, .admin-context-field-label { text-align: left; justify-content: flex-start; align-items: stretch; }
.admin-context-field-label { align-items: center; }
.admin-context-intro h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.admin-context-intro p { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-context-segments { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--ed-card2); }
.admin-context-segments > .admin-context-segment { width: 110px; min-height: 30px; height: 30px; padding: 0; border-radius: 9px; background: transparent; color: var(--ed-ink2); font-size: 0.7813rem; font-weight: 500; }
.admin-context-segments > .admin-context-segment:hover { background: transparent; color: var(--ed-ink); }
.admin-context-segments > .admin-context-segment.is-active { color: var(--ed-ink); font-weight: 600; }
.admin-context-status { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 4px; color: var(--ed-ink3); font-size: 0.7813rem; }
.admin-context-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.admin-context-status[data-tone='saved'] { color: var(--ed-mint); }
.admin-context-status[data-tone='warn'] { color: var(--ed-amber); }
.admin-context-status[data-tone='bad'] { color: var(--ed-red); }
.admin-context-save { order: 9; height: 38px; min-height: 38px; padding: 0 16px; border-radius: 11px; font-size: 0.8125rem; font-weight: 600; }
.admin-context-save:disabled { opacity: 0.45; }
.admin-context-workspace { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px; align-items: start; }
.admin-context-periods { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.admin-context-period { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ed-ink2); font-size: 0.8125rem; font-weight: 500; text-align: left; transition: background-color 0.2s, color 0.2s; }
.admin-context-period:hover { background: var(--ed-card2); color: var(--ed-ink); }
.admin-context-period.is-active { background: var(--ed-raise); color: var(--ed-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.admin-context-period small { color: var(--ed-ink3); font: 0.7188rem var(--ed-mono); }
.admin-context-period.is-complete small { color: var(--ed-ink3); }
.admin-context-editor { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px 20px; border-radius: var(--ed-r-card); background: var(--ed-card); animation: ed-in 0.5s var(--ed-ease) both; }
.admin-context-period-mark { display: flex; align-items: baseline; gap: 12px; }
.admin-context-period-mark strong { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; }
.admin-context-period-note { color: var(--ed-ink3); font-size: 0.7813rem; }
.admin-context-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-context-field { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--ed-card2); cursor: text; }
.admin-context-field-label { display: flex; align-items: center; gap: 8px; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-context-field-icon { display: grid; place-items: center; min-width: 24px; height: 22px; box-sizing: border-box; padding: 0 5px; border-radius: 7px; background: var(--ed-raise); color: var(--ed-ink); font: 400 0.6875rem var(--ed-mono); }
.admin-context-field-name { color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-context-field input { height: 34px; min-height: 34px; padding: 0; border: 0; background: transparent !important; box-shadow: none !important; color: var(--ed-ink); font: 400 1.25rem var(--ed-mono); font-variant-numeric: tabular-nums; letter-spacing: normal; }
.admin-context-field:focus-within { box-shadow: 0 0 0 1px var(--ed-ink3); }
.admin-context-field-help { color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-context-preview { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--ed-line); border-radius: 14px; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-context-preview svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-context-preview span { min-width: 0; }
.admin-context-preview a { margin-left: auto; color: var(--ed-ink); white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ed-line2); }
.admin-context-preview a:hover { text-decoration-color: currentColor; }
@media (max-width: 900px) { .admin-context-workspace { grid-template-columns: minmax(0, 1fr); } .admin-context-periods { flex-direction: row; overflow-x: auto; } .admin-context-period { flex: none; } }
@media (max-width: 560px) { .admin-context-form { grid-template-columns: minmax(0, 1fr); } .admin-context-preview { flex-wrap: wrap; } .admin-context-preview a { margin-left: 28px; } .admin-context-segments { width: 100%; } .admin-context-segments > .admin-context-segment { flex: 1; width: auto; } }
.admin-context-workspace > * { grid-column: auto; width: auto; max-width: none; margin: 0; }
.admin-context-period-mark { justify-content: flex-start; }
.admin-context-field input::placeholder { color: var(--ed-ink3); font: 400 0.8125rem var(--ed-font); letter-spacing: 0; }

/* map legend: seven steps of the map's own scale (admin.js paints --step; these are the dark-theme fallbacks) */
.admin-location-legend i { background: none !important; }
.admin-location-steps b { flex: none; background: var(--step, rgb(41, 128, 157)); }
.admin-location-map { min-height: 0; aspect-ratio: 1000 / 420; }
.admin-location-map-empty { height: 100%; }
.admin-location-province:focus-visible { opacity: 1; stroke: var(--ed-ink); stroke-width: 1.2; }

/* ---------- All orders ---------- */
[data-admin-dashboard][data-active-view='orders'] .ed-view-actions[data-ed-view-actions='orders'] { display: flex; }
.admin-orders-view.is-active { display: flex; flex-direction: column; gap: 12px; }
.admin-orders-view > .admin-main-grid { display: block; }
.admin-orders-view .admin-panel-table { padding: 0; overflow: hidden; }
/* ---------- Date range popover (DateRange board), shared by every range in the dashboard ---------- */
.ed-dr { --ed-dr-band: rgba(255, 255, 255, 0.07); position: fixed; z-index: 400; display: grid; grid-template-columns: 170px minmax(0, 1fr); box-sizing: border-box; width: min(702px, calc(100vw - 24px)); border: 1px solid var(--ed-line2); border-radius: 18px; background: var(--ed-menu); color: var(--ed-ink); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); overflow: hidden; font-size: 0.8438rem; animation: ed-dr-pop 0.3s var(--ed-ease) both; }
:root[data-admin-theme='light'] .ed-dr { --ed-dr-band: rgba(0, 0, 0, 0.06); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18); }
.ed-dr[hidden] { display: none; }
.ed-dr:not(.has-presets) { grid-template-columns: minmax(0, 1fr); width: min(562px, calc(100vw - 24px)); }
@keyframes ed-dr-pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.ed-dr-scrim { position: fixed; inset: 0; z-index: 399; background: var(--ed-scrim); animation: ed-fade 0.25s var(--ed-ease) both; }
.ed-dr-scrim[hidden] { display: none; }
.ed-dr .ed-dr-presets { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 0; border-right: 1px solid var(--ed-line); border-radius: 0; background: transparent; box-shadow: none; }
.ed-dr .ed-dr-presets > .ed-dr-preset::after { content: none; display: none; }
.ed-dr .ed-dr-presets > .ed-dr-preset { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 34px; min-height: 34px; padding: 0 10px; border-radius: 9px; background: transparent; color: var(--ed-ink); font-size: 0.8125rem; font-weight: 500; text-align: left; white-space: nowrap; transition: background-color 0.15s; }
.ed-dr .ed-dr-presets > .ed-dr-preset:hover { background: var(--ed-card2); }
.ed-dr-preset:active { transform: none; }
.ed-dr .ed-dr-presets > .ed-dr-preset[aria-selected='true'] { background: var(--ed-card2); font-weight: 600; }
.ed-dr-preset svg { flex: none; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity 0.2s; }
.ed-dr-preset[aria-selected='true'] svg { opacity: 1; }
.ed-dr-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px 16px; }
.ed-dr-title { font-size: 0.8125rem; font-weight: 600; }
.ed-dr-fields { display: flex; align-items: center; gap: 8px; }
.ed-dr-fields > svg { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--ed-ink3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-dr-field { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 11px; border-radius: 11px; background: var(--ed-card2); transition: box-shadow 0.25s; }
.ed-dr-field.is-active { box-shadow: 0 0 0 1px var(--ed-ink3); }
.ed-dr-field small { color: var(--ed-ink3); font-size: 0.7188rem; }
.ed-dr-field b { font: 500 0.8125rem/1.4 var(--ed-mono); white-space: nowrap; overflow-wrap: normal; }
.ed-dr-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ed-dr-month-head { display: flex; align-items: center; justify-content: space-between; height: 30px; margin-bottom: 4px; }
.ed-dr-month-head strong { flex: 1; font-size: 0.8125rem; font-weight: 600; text-align: center; }
.ed-dr-nav { flex: none; width: 28px; height: 28px; }
.ed-dr-nav { display: grid; place-items: center; min-height: 28px; padding: 0; border-radius: 8px; background: transparent; color: var(--ed-ink2); }
.ed-dr-nav:hover { background: var(--ed-raise); }
.ed-dr-nav:disabled { color: var(--ed-ink3); opacity: 0.4; background: transparent; }
.ed-dr-nav svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-dr-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); color: var(--ed-ink3); font-size: 0.7188rem; text-align: center; }
.ed-dr-weekdays span { height: 24px; line-height: 24px; }
.ed-dr-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.ed-dr-cell { height: 36px; }
.ed-dr-cell.is-band { background: var(--ed-dr-band); }
.ed-dr-cell.is-band-start { border-radius: 10px 0 0 10px; }
.ed-dr-cell.is-band-end { border-radius: 0 10px 10px 0; }
.ed-dr-cell.is-band-start.is-band-end { border-radius: 10px; }
.ed-dr-cell.is-preview { background: color-mix(in srgb, var(--ed-dr-band) 70%, transparent); }
.ed-dr-day { width: 100%; height: 36px; min-height: 36px; padding: 0; border-radius: 10px; background: transparent; color: var(--ed-ink); font: 400 0.7813rem var(--ed-mono); transition: background-color 0.15s, color 0.15s; }
.ed-dr-day:not(:disabled):hover { background: var(--ed-raise); }
.ed-dr-day:active { transform: none; }
.ed-dr-day.is-today { box-shadow: inset 0 0 0 1.5px var(--ed-ink3); }
.ed-dr-day.is-picked, .ed-dr-day.is-picked:hover { background: var(--ed-ink); color: var(--ed-card); font-weight: 600; box-shadow: none; }
.ed-dr-day:disabled { opacity: 0.35; background: transparent; }
.ed-dr-day:focus-visible, .ed-dr-preset:focus-visible, .ed-dr-nav:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: 2px; }
.ed-dr-foot { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--ed-line); }
.ed-dr-foot > span { margin-right: auto; color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-dr-cancel, .ed-dr-apply { height: 34px; min-height: 34px; padding: 0 13px; border-radius: 10px; font-size: 0.7813rem; }
.ed-dr-cancel { background: var(--ed-card2); color: var(--ed-ink); }
.ed-dr-apply { padding: 0 15px; background: var(--ed-ink); color: var(--ed-card); font-weight: 600; }
.ed-dr-apply:hover { background: var(--ed-ink); opacity: 0.88; }
.ed-dr-apply:disabled { opacity: 0.4; }
/* phone: a bottom sheet with one month and the quick ranges in a scrolling row */
.ed-dr.is-sheet { top: auto !important; right: 0; bottom: 0; left: 0 !important; grid-template-columns: minmax(0, 1fr); width: 100%; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: ed-sheet 0.4s var(--ed-ease) both; }
.ed-dr.is-sheet .ed-dr-presets { border-right: 0; flex-direction: row; gap: 6px; padding: 12px 12px 2px; border-right: 0; overflow-x: auto; scrollbar-width: none; }
.ed-dr.is-sheet .ed-dr-presets::-webkit-scrollbar { display: none; }
.ed-dr.is-sheet .ed-dr-preset { flex: none; border: 1px solid var(--ed-line); border-radius: 999px; }
.ed-dr.is-sheet .ed-dr-preset svg { display: none; }
.ed-dr.is-sheet .ed-dr-preset[aria-selected='true'] { border-color: var(--ed-ink3); }
.ed-dr.is-sheet .ed-dr-main { padding: 12px 16px 16px; }
.ed-dr.is-sheet .ed-dr-months { grid-template-columns: minmax(0, 1fr); }
.ed-dr.is-sheet .ed-dr-foot > button { flex: none; min-width: 88px; }
@media (pointer: coarse) {
  .ed-dr .ed-dr-cell, .ed-dr .ed-dr-day, .ed-dr .ed-dr-presets > .ed-dr-preset, .ed-dr .ed-dr-cancel, .ed-dr .ed-dr-apply { height: 44px; min-height: 44px; }
  .ed-dr .ed-dr-nav { width: 44px; height: 44px; min-height: 44px; }
  .ed-dr .ed-dr-month-head { height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .ed-dr, .ed-dr-scrim { animation: none; } }
/* the Orders toolbar's icon button for the filters the board leaves out (channel, account, product) */
.ed-orders-tool.is-icon { position: relative; justify-content: center; width: 36px; padding: 0; }
.ed-orders-tool.is-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ed-orders-tool.is-icon.is-active::after { content: ''; position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--ed-ink); }
/* (Orders board) the channel chips sit on the panel above the table card */
.ed-order-channels { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.ed-order-channels:empty { display: none; }
.ed-channel-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; min-height: 34px; padding: 0 13px; border: 1px solid var(--ed-line); border-radius: 999px; background: transparent; color: var(--ed-ink2); font-size: 0.7813rem; font-weight: 500; }
.ed-channel-chip { transition: background-color 0.25s, border-color 0.25s, color 0.25s; }
.ed-channel-chip:hover { color: var(--ed-ink); }
.ed-channel-chip[aria-pressed='true'] { border-color: var(--ed-ink3); background: var(--ed-card); color: var(--ed-ink); font-weight: 500; }
.ed-channel-chip i { width: 7px; height: 7px; border-radius: 50%; }
.ed-channel-chip b { color: var(--ed-ink3); font: 500 0.7188rem var(--ed-mono); }
.admin-orders-toolbar { flex-wrap: wrap; align-items: center; margin: 0; padding: 12px 18px; }
.admin-orders-copy { flex: 1 1 260px; min-width: 0; }
.admin-orders-toolbar { display: flex; gap: 8px 10px; padding: 14px 16px 12px 18px; }
.admin-orders-cancellation-quick > button { gap: 6px; height: 28px; min-height: 28px; font-size: 0.75rem; }
.ed-orders-search { flex: 0 1 280px; width: 280px; min-width: 160px; }
.ed-orders-filter-btn { gap: 0; padding: 0 10px 0 12px; border: 0; font-size: 0.7813rem; }
.ed-orders-filter-btn > b { margin-left: 7px; color: var(--ed-ink); font-weight: 400; white-space: nowrap; }
.ed-orders-filter-btn > svg { width: 13px; height: 13px; margin-left: 7px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-orders-filter-btn:active { transform: none; }
.ed-orders-tool { display: inline-flex; align-items: center; gap: 7px; height: 36px; min-height: 36px; padding: 0 12px; border-radius: 11px; font-size: 0.7813rem; font-weight: 500; white-space: nowrap; }
.ed-orders-tool[hidden] { display: none; }
.ed-orders-foot { border-top: 1px solid var(--ed-line); }
.ed-orders-foot .admin-panel-meta { margin: 0; color: var(--ed-ink3); font-size: 0.75rem; }
/* (PhoneOrders board) on a phone the channel chips scroll in one line and every order is a card:
   channel mark, order ID and time; buyer and net revenue; product × quantity and the funds mark */
@media (max-width: 767px) {
  .ed-order-channels { flex-wrap: nowrap; margin: 0 -12px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .ed-order-channels::-webkit-scrollbar { display: none; }
  .ed-channel-chip { flex: none; }
  .admin-orders-view .admin-orders-toolbar { gap: 8px; padding: 12px; }
  .admin-orders-cancellation-quick { align-self: flex-start; }
  .admin-orders-actions { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0 -12px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .admin-orders-actions::-webkit-scrollbar { display: none; }
  .ed-orders-search { flex: none; order: -1; width: 100%; }
  .admin-orders-actions > :not(.ed-orders-search) { flex: none; }
  .admin-orders-view .admin-orders-actions { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .admin-orders-view .admin-orders-table-wrap { overflow: visible; max-height: none; border-top: 0; }
  .admin-orders-table, .admin-orders-table tbody { display: block; min-width: 0 !important; width: 100%; }
  .admin-orders-table thead { display: none; }
  .admin-orders-table tbody tr { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: 'chan id time' 'buyer buyer amount' 'product product funds'; align-items: center; gap: 4px 10px; margin: 0 12px 8px; padding: 12px 14px; border-radius: 16px; background: var(--ed-card2); }
  .admin-orders-table tbody tr:hover > td { background: transparent; }
  .admin-orders-view .admin-orders-table tbody tr > td { display: block; width: auto !important; min-width: 0 !important; max-width: none !important; height: auto; min-height: 0; padding: 0 !important; border: 0; background: transparent; white-space: normal; }
  .admin-orders-table tbody tr > td:nth-child(1) { grid-area: time; color: var(--ed-ink3); text-align: right; }
  .admin-orders-table tbody tr > td:nth-child(2) { grid-area: id; min-width: 0; }
  .admin-orders-table tbody tr > td:nth-child(2) .admin-order-id { color: var(--ed-ink2); text-decoration: none; }
  .admin-orders-table tbody tr > td:nth-child(3) { grid-area: chan; width: 10px; overflow: hidden; color: transparent; font-size: 0; }
  .admin-orders-table tbody tr > td:nth-child(3) i { margin: 0; border-radius: 2px; }
  .admin-orders-table tbody tr > td:nth-child(4) { grid-area: product; max-width: none; min-width: 0; color: var(--ed-ink2); font-size: 0.75rem; }
  .admin-orders-table tbody tr > td:nth-child(4)[data-qty]:not([data-qty=''])::after { content: attr(data-qty); margin-left: 4px; color: var(--ed-ink3); }
  .admin-orders-table tbody tr > td:nth-child(4) > span { display: inline; -webkit-line-clamp: unset; }
  .admin-orders-table tbody tr > td:nth-child(5), .admin-orders-table tbody tr > td:nth-child(6), .admin-orders-table tbody tr > td:nth-child(8) { display: none; }
  .admin-orders-table tbody tr > td:nth-child(7) { grid-area: amount; color: var(--ed-ink); font-size: 0.8125rem; font-weight: 600; }
  .admin-orders-table tbody tr > td:nth-child(9) { grid-area: funds; justify-self: end; }
  .admin-orders-table tbody tr > td:nth-child(10) { grid-area: buyer; min-width: 0; }
  .admin-orders-table tbody tr > td:nth-child(10) strong { font-size: 0.875rem; font-weight: 600; }
  .admin-orders-table tbody tr > td:nth-child(10) small, .admin-orders-table tbody tr > td:nth-child(10) .admin-order-buyer-more { display: none; }
  .admin-orders-table tbody tr > td.admin-empty { grid-column: 1 / -1; padding: 24px 12px !important; text-align: center; }
  .admin-orders-table tbody tr:has(> td.admin-empty) { display: block; background: transparent; }
  .ed-orders-foot { border-top: 0; }
}
.admin-orders-copy .admin-panel-meta { margin: 0; }
.admin-orders-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-orders-actions .admin-ghost-btn, .admin-orders-actions .admin-link-btn { min-height: 36px; padding: 0 12px; font-size: 0.7813rem; }
.admin-orders-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-orders-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.admin-orders-table-wrap { max-height: calc(100vh - 290px); min-height: 360px; border-radius: 0; }
.admin-orders-table thead th { position: sticky; top: 0; z-index: 1; background: var(--ed-card); }
.admin-orders-table th:first-child, .admin-orders-table td:first-child { padding-left: 18px; }
.admin-orders-table th:last-child, .admin-orders-table td:last-child { padding-right: 18px; }
.admin-orders-table td { height: 56px; vertical-align: middle; white-space: normal; }
.admin-orders-table .is-num { text-align: right; font-family: var(--ed-mono); font-size: 0.75rem; white-space: nowrap; }
.admin-orders-table th.is-num { font-family: var(--ed-font); }
.admin-order-time { color: var(--ed-ink2); font: 0.75rem var(--ed-mono); white-space: nowrap; }
.admin-order-id { font: 500 0.75rem var(--ed-mono); color: var(--ed-ink); text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; overflow-wrap: anywhere; }
.admin-order-channel { white-space: nowrap; font-size: 0.7813rem; }
.admin-order-channel i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; vertical-align: 1px; }
.admin-order-product { min-width: 160px; font-size: 0.7813rem; overflow-wrap: anywhere; }
.admin-order-po { color: var(--ed-ink2); font: 0.75rem var(--ed-mono); white-space: nowrap; }
.admin-order-wallet-cell .ed-pill { cursor: default; }
.admin-order-wallet-cell button.ed-pill { min-height: 22px; cursor: pointer; transition: background-color 0.2s; }
.admin-order-wallet-cell button.ed-pill:hover { background: var(--ed-ambers); }
.admin-order-buyer { position: relative; min-width: 180px; text-align: left !important; }
/* long marketplace listing names: two lines at most, as narrow as the board's product column */
.admin-order-product { max-width: 260px; }
.admin-order-product > span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.admin-orders-table-wrap { margin-top: 0; padding-top: 0; border-top: 1px solid var(--ed-line); }
/* The board's buyer cell is a name over a city. The address and phone buttons appear over the
   cell on hover or focus, so a row stays one height; touch screens keep them in the cell. */
@media (hover: hover) and (pointer: fine) {
  .admin-order-buyer-more { position: absolute; top: 50%; right: 14px; margin: 0; padding: 4px; border-radius: 9px; background: var(--ed-card2); box-shadow: -12px 0 12px -4px var(--ed-card2); opacity: 0; pointer-events: none; transform: translateY(-50%); transition: opacity 0.2s; }
  .admin-orders-table tbody tr:hover .admin-order-buyer-more, .admin-orders-table tbody tr:focus-within .admin-order-buyer-more { opacity: 1; pointer-events: auto; }
}
.admin-order-buyer strong { display: block; font-size: 0.7813rem; font-weight: 500; overflow-wrap: anywhere; }
.admin-order-buyer small { display: block; color: var(--ed-ink3); font-size: 0.7188rem; overflow-wrap: anywhere; }
.admin-order-buyer-more { display: inline-flex; gap: 4px; margin-top: 3px; }
.admin-order-buyer-more:empty { display: none; }
.admin-order-view-btn { min-height: 22px; padding: 0 7px; border-radius: 7px; background: transparent; color: var(--ed-ink3); font-size: 0.6875rem; box-shadow: inset 0 0 0 1px var(--ed-line2); }
.admin-order-view-btn:hover { background: var(--ed-card2); color: var(--ed-ink); }
.admin-orders-table tr.is-canceled td { color: var(--ed-ink3); }
.admin-orders-table tr.is-canceled .admin-order-id { text-decoration: line-through; }
.admin-orders-table tbody tr[data-order-detail-url] { cursor: pointer; }
/* the old table pinned 1640px and 12 fixed columns; the new one fits its card */
.admin-orders-table { min-width: 980px; width: 100%; table-layout: auto; }
.admin-orders-table td, .admin-orders-table th { width: auto !important; padding-left: 10px; padding-right: 10px; }
.admin-orders-table td:nth-child(1), .admin-orders-table th:nth-child(1) { width: 1% !important; }
.admin-orders-table td:nth-child(2) { white-space: nowrap; }
.admin-order-id { overflow-wrap: normal; white-space: nowrap; }
.admin-orders-table td:nth-child(4) { width: 26% !important; }
.admin-orders-payment-audit.is-automatic { display: none; }
.admin-orders-payment-audit:not(.is-automatic) { display: block; margin-top: 2px; color: var(--ed-amber); font-size: 0.75rem; }
.admin-orders-table td.admin-order-time, .admin-orders-table td.admin-order-channel, .admin-orders-table td.admin-order-po, .admin-orders-table td.is-num { white-space: nowrap; }
.admin-orders-filter-open-btn { display: inline-flex !important; flex-direction: row !important; width: auto !important; gap: 6px; }

/* ---------- Marketplace wallets ---------- */
[data-admin-dashboard][data-active-view='wallet'] .ed-view-actions[data-ed-view-actions='wallet'] { display: flex; }
.admin-wallet-view.is-active { display: flex; flex-direction: column; gap: 12px; }
.ed-kpis.ed-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .ed-kpis.ed-kpis-3 { grid-template-columns: minmax(0, 1fr); } }
.admin-wallet-panel { padding: 16px 0 6px; }
.admin-wallet-panel > .admin-panel-head { align-items: center; padding: 0 18px; }
.admin-wallet-panel > .admin-panel-head > div:first-child { flex: 1 1 260px; }
.admin-wallet-table th:first-child, .admin-wallet-table td:first-child { padding-left: 18px; }
.admin-wallet-table th:last-child, .admin-wallet-table td:last-child { padding-right: 18px; }
.admin-wallet-table .is-num { text-align: right; font: 0.7813rem var(--ed-mono); white-space: nowrap; }
.admin-wallet-table th.is-num { font-family: var(--ed-font); font-size: 0.75rem; }
.admin-wallet-table .is-num strong { font-weight: 600; }
.admin-wallet-account-title { display: flex; align-items: center; gap: 8px; }
.admin-wallet-account-title i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.admin-wallet-account-title strong { font-size: 0.8125rem; font-weight: 600; }
.admin-wallet-account small { display: block; margin: 2px 0 0 15px; color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-wallet-total-row td { background: var(--ed-card2); }
.admin-wallet-total-row .admin-wallet-account small { margin-left: 0; }
.admin-wallet-balance-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-wallet-updated { color: var(--ed-ink2); font: 0.75rem var(--ed-mono); }
.admin-wallet-set-link { min-height: 28px; padding: 0 10px; border-radius: 8px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.75rem; }
.admin-wallet-set-link:hover { background: var(--ed-raise); }
.admin-wallet-row-unset .is-num strong { color: var(--ed-amber); font-weight: 500; }
.admin-wallet-balance-control { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.admin-wallet-balance-control input { min-height: 34px; }
.admin-wallet-balance-amount { width: 150px; }
.admin-wallet-action { min-height: 34px; padding: 0 12px; border-radius: 10px; background: var(--ed-ink); color: var(--ed-card); font-size: 0.7813rem; font-weight: 600; }
.admin-wallet-action:hover { background: var(--ed-ink); opacity: 0.88; }
.admin-wallet-action.is-secondary { background: var(--ed-card2); color: var(--ed-ink); font-weight: 500; }
/* API tab (MonitorTools board): GET field with Run and Copy, the JSON in a code well, then status · time · read only */
.admin-wallet-api { display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; width: 100%; min-width: 0; padding: 16px 18px 6px; }
.admin-wallet-api > * { min-width: 0; max-width: 100%; }
.admin-wallet-api-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-wallet-api-field { flex: 1 1 300px; display: flex; align-items: center; gap: 8px; box-sizing: border-box; min-width: 0; height: 38px; padding: 0 12px; border-radius: 11px; background: var(--ed-card2); transition: box-shadow 0.25s, background-color 0.25s; }
.admin-wallet-api-field:hover { background: var(--ed-raise); }
.admin-wallet-api-field:focus-within { box-shadow: 0 0 0 1px var(--ed-ink3); background: var(--ed-card2); }
.admin-wallet-api-field > span { flex: none; color: var(--ed-ink3); font: 0.75rem var(--ed-mono); }
.admin-wallet-api-field input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; color: var(--ed-ink); font: 0.7813rem var(--ed-mono); }
.admin-wallet-api-bar .admin-wallet-action, .admin-wallet-balance-control .admin-wallet-action { min-width: 0; }
.admin-wallet-api-bar .admin-wallet-action { height: 38px; min-height: 38px; padding: 0 14px; }
.admin-wallet-api-bar .admin-wallet-action.is-secondary { padding: 0 12px; transition: background-color 0.25s, color 0.25s; }
.admin-wallet-api-bar .admin-wallet-action.is-secondary:hover { background: var(--ed-raise); opacity: 1; }
.admin-wallet-api-bar .admin-wallet-action.is-copied { color: var(--ed-mint); }
.admin-wallet-api-output { min-height: 0; max-height: 240px; margin: 0; padding: 12px 14px; overflow: auto; border-radius: 12px; background: var(--ed-code, #111111); color: var(--ed-ink2); font: 0.75rem/1.6 var(--ed-mono); white-space: pre; }
:root[data-admin-theme='light'] .admin-wallet-api-output { background: var(--ed-card2); }
.admin-wallet-api-foot { margin: 0; color: var(--ed-ink3); font-size: 0.75rem; overflow-wrap: anywhere; }
.admin-wallet-api-foot.is-error { color: var(--ed-red); }
.admin-wallet-backtrack.is-loading { color: var(--ed-fink2); }
.admin-wallet-table-wrap { margin-top: 4px; padding-top: 0; }
.admin-wallet-panel > .admin-panel-head { margin-bottom: 4px; }
/* Wallets board: Live on the left of the top bar; the title with Wallets | API beside it, Open in
   Accounting on the right; plain account names; the read-time line under the table */
[data-ed-view-actions='wallet'] { flex: 1 1 auto; min-width: 0; }
[data-ed-view-actions='wallet'] > .ed-live { margin-right: auto; }
.admin-wallet-panel > .admin-panel-head { flex-wrap: wrap; justify-content: flex-start; gap: 10px 14px; padding: 0 18px 12px; margin: 0; border-bottom: 1px solid var(--ed-line); }
.admin-wallet-panel > .admin-panel-head > h3 { flex: none; margin: 0; font-size: 0.875rem; font-weight: 600; }
.admin-wallet-panel > .admin-panel-head > .admin-wallet-mode > .admin-toggle-pill { min-height: 28px; height: 28px; padding: 0 12px; font-size: 0.75rem; }
.admin-wallet-panel > .admin-panel-head > a { margin-left: auto; }
.admin-wallet-table tbody td { height: 46px; }
.admin-wallet-table tbody tr:last-child td { border-bottom: 1px solid var(--ed-line); }
.admin-wallet-foot { margin: 0; padding: 12px 18px 8px; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-wallet-updated { color: var(--ed-ink3); font: 0.75rem var(--ed-mono); font-variant-numeric: tabular-nums; }
.admin-wallet-updated.is-stale { color: var(--ed-amber); }
.admin-wallet-refresh svg { width: 15px; height: 15px; }
.admin-wallet-refresh.is-loading svg { animation: ed-spin 0.9s linear infinite; }
/* Table board head: 14px over a 36px control row, title then 64px-wide tabs, the action on the right;
   the table (at least 1000px) starts right under it; Set has its own last column */
.admin-wallet-panel { padding-top: 14px; }
.admin-wallet-panel > .admin-panel-head { gap: 8px 10px; padding: 0 16px 12px 18px; }
.admin-wallet-panel > .admin-panel-head > h3 { margin-right: 6px; }
.admin-wallet-panel > .admin-panel-head > .admin-wallet-mode { margin: 0; }
.admin-wallet-panel > .admin-panel-head > .admin-wallet-mode > .admin-toggle-pill { min-width: 64px; justify-content: center; }
.admin-wallet-panel > .admin-panel-head > a { display: inline-flex; align-items: center; height: 36px; min-height: 36px; padding: 0 12px; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.7813rem; font-weight: 500; }
.admin-wallet-panel > .admin-panel-head > a:hover { background: var(--ed-raise); }
.admin-wallet-table-wrap { margin-top: 0; }
.admin-wallet-table { min-width: 1000px; }
.admin-wallet-table td.admin-wallet-account { min-width: 0; }
/* Released to wallets: plot starts right under the legend, as on the Chart board (see the overview cards) */
.admin-wallet-release-panel .admin-panel-meta { line-height: 1.4; }
.admin-wallet-release-panel > .admin-chart-surface { margin-top: -8px; }
.admin-wallet-table .is-num { font-size: 0.75rem; }
.admin-wallet-table td.admin-wallet-action-cell { text-align: left; }
.admin-wallet-set-link { height: 28px; border-radius: 9px; font-weight: 500; }
.ed-kpi-label { display: flex; align-items: center; gap: 8px; }
.ed-kpi-dot { flex: none; display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ed-amber); }
[data-wallet-oldest-card].is-warn { border-color: rgba(255, 181, 71, 0.32); }
:root[data-admin-theme='light'] [data-wallet-oldest-card].is-warn { border-color: rgba(168, 100, 0, 0.32); }
[data-wallet-oldest-card].is-warn .ed-kpi-dot { display: block; }
/* set a balance by hand (MonitorTools board): Balance with an Rp prefix, Seen at, then Save */
.admin-wallet-table tr.is-editing td { border-bottom-color: transparent; }
.admin-wallet-table tbody tr.admin-wallet-editor-row td, .admin-wallet-table tbody tr.admin-wallet-editor-row:hover td { height: auto; padding: 0 18px 14px; background: transparent; }
.admin-wallet-balance-control { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; max-width: 680px; margin-top: 0; animation: ed-in 0.35s var(--ed-ease) both; }
.admin-wallet-balance-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: var(--ed-ink2); font-size: 0.75rem; }
.admin-wallet-balance-input { position: relative; display: flex; align-items: center; }
.admin-wallet-balance-input b { position: absolute; left: 12px; color: var(--ed-ink3); font: 400 0.75rem var(--ed-font); pointer-events: none; }
.admin-wallet-balance-control input { box-sizing: border-box; width: 100%; height: 38px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink); font: 0.8125rem var(--ed-mono); font-variant-numeric: tabular-nums; }
.admin-wallet-balance-control input.admin-wallet-balance-at { font-size: 0.7813rem; }
.admin-wallet-balance-control input[aria-invalid='true'] { box-shadow: 0 0 0 1px var(--ed-red); }
.admin-wallet-balance-input input { padding-left: 34px; text-align: right; }
.admin-wallet-balance-control .admin-wallet-action { height: 38px; min-height: 38px; padding: 0 14px; border-radius: 10px; }
/* backtrack progress (MonitorTools board): spinner, what is being rebuilt and how far, then Stop */
.admin-wallet-backtrack-row { display: flex; align-items: center; gap: 10px; margin: 10px 18px 0; padding: 10px 12px; border-radius: 12px; background: var(--ed-card2); color: var(--ed-ink2); font-size: 0.7813rem; animation: ed-in 0.45s var(--ed-ease) both; }
.admin-wallet-backtrack-row[hidden] { display: none; }
.admin-wallet-backtrack-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.admin-wallet-backtrack-spin { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; animation: ed-spin 0.9s linear infinite; }
.admin-wallet-backtrack-row.is-failed { color: var(--ed-ink); }
.admin-wallet-backtrack-row.is-failed .admin-wallet-backtrack-spin { stroke-width: 2.2; color: var(--ed-red); animation: none; }
.admin-wallet-backtrack-row .admin-wallet-set-link { flex: none; }
.admin-wallet-backtrack-row .admin-wallet-set-link:disabled { opacity: 0.5; cursor: default; }
/* on phones the wallet table scrolls sideways; the editor stays in view under the account */
@media (max-width: 760px) {
  .admin-wallet-editor-row td > .admin-wallet-balance-control { position: sticky; left: 18px; box-sizing: border-box; width: min(680px, calc(100vw - 76px)); }
}
@media (max-width: 560px) {
  .admin-wallet-balance-control { grid-template-columns: minmax(0, 1fr); }
  .admin-wallet-api-bar .admin-wallet-action { flex: 1 1 0; }
}
.admin-wallet-release-panel { box-sizing: border-box; height: 268px; gap: 0; }
.admin-wallet-release-panel > .admin-panel-head { margin-bottom: 10px; }
.admin-wallet-release-panel .admin-chart-surface { position: relative; flex: 1 1 auto; min-height: 0; }
.admin-wallet-release-panel .admin-chart-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Stock coverage, purchase planning, purchase history, PO details ---------- */
[data-admin-dashboard][data-active-view='inventory-recap'] .ed-view-actions[data-ed-view-actions='inventory-recap'] { display: flex; }
.ed-frame-btn.is-light, .ed-frame-btn.is-primary { background: var(--ed-fink); color: #141414; font-weight: 600; }
.ed-frame-btn.is-light:hover, .ed-frame-btn.is-primary:hover { background: var(--ed-fink); opacity: 0.88; }
.ed-frame-btn svg { flex: none; }
.admin-inventory-recap-view.is-active, .admin-purchase-order-view.is-active, .admin-po-history-view.is-active, .admin-po-detail-view.is-active { display: flex; flex-direction: column; gap: 12px; }
/* Stock coverage: KPI cards, the purchase orders already on the way, then one card with tabs, search,
   filters and the product rows. At the owner's request (Dec 2026) it carries everything the 3.99 page
   showed: each row shows identity, stock, demand and the trigger controls at once, and each PO card
   shows what has arrived and what has been paid. */
.ed-stock { --ed-stock-s2: #b8b8b8; }
:root[data-admin-theme='light'] .ed-stock { --ed-stock-s2: #4f4f4f; }
.ed-stock-kpis .ed-kpi-label { display: flex; align-items: center; gap: 8px; }
.ed-stock-kpi-dot { display: none; flex: none; width: 6px; height: 6px; border-radius: 50%; }
.ed-stock-kpis .ed-kpi.is-bad { border-color: rgba(255, 107, 129, 0.32); }
.ed-stock-kpis .ed-kpi.is-warn { border-color: rgba(255, 181, 71, 0.32); }
:root[data-admin-theme='light'] .ed-stock-kpis .ed-kpi.is-bad { border-color: rgba(212, 42, 72, 0.32); }
:root[data-admin-theme='light'] .ed-stock-kpis .ed-kpi.is-warn { border-color: rgba(168, 100, 0, 0.32); }
.ed-stock-kpis .ed-kpi.is-bad .ed-stock-kpi-dot { display: block; background: var(--ed-red); }
.ed-stock-kpis .ed-kpi.is-warn .ed-stock-kpi-dot { display: block; background: var(--ed-amber); }
.ed-stock-incoming { padding: 16px 18px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.ed-stock-incoming-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 12px; }
.ed-stock-incoming-head h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.ed-stock-incoming-head span { color: var(--ed-ink3); font-size: 0.75rem; }
/* PO cards: three across from 1300 px, two on a tablet, one on a phone. Each card spans six rows of
   the grid (subgrid), so cards in a row share row heights and their meters line up. */
.ed-stock-po-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1299px) { .ed-stock-po-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .ed-stock-po-grid { grid-template-columns: minmax(0, 1fr); } }
.ed-stock-po { --po-tone: var(--ed-p5); --po-ink: color-mix(in srgb, var(--po-tone) 70%, #fff); position: relative; display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 10px; align-content: start; min-width: 0; box-sizing: border-box; padding: 14px 16px 14px 15px; border: 1px solid var(--ed-line); border-left: 3px solid var(--po-tone); border-radius: 14px; background: var(--ed-card); cursor: pointer; transition: border-color 0.25s, background-color 0.25s; animation: ed-in 0.45s var(--ed-ease) var(--ed-stock-delay, 0s) both; }
.ed-stock-po:hover { border-top-color: var(--ed-line2); border-right-color: var(--ed-line2); border-bottom-color: var(--ed-line2); }
.ed-stock-po.is-state-ordered { --po-tone: var(--ed-p5); }
.ed-stock-po.is-state-arriving { --po-tone: var(--ed-p1); }
.ed-stock-po.is-state-unpaid { --po-tone: var(--ed-amber); --po-ink: var(--ed-amber); }
.ed-stock-po.is-state-draft { --po-tone: var(--ed-p0); --po-ink: var(--ed-ink2); border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-top-color: var(--ed-line2); border-right-color: var(--ed-line2); border-bottom-color: var(--ed-line2); }
:root[data-admin-theme='light'] .ed-stock-po { --po-ink: color-mix(in srgb, var(--po-tone) 62%, #000); }
:root[data-admin-theme='light'] .ed-stock-po.is-state-unpaid { --po-ink: var(--ed-amber); }
:root[data-admin-theme='light'] .ed-stock-po.is-state-draft { --po-ink: var(--ed-ink2); }
/* the header is a size container: number, chip and action share one line on a wide card; on a
   narrow one the chip drops under the number and the action stays on the right */
.ed-stock-po-head { container-type: inline-size; min-width: 0; }
.ed-stock-po-headin { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'num state act'; align-items: center; gap: 6px 10px; }
@container (max-width: 390px) { .ed-stock-po-headin { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'num act' 'state act'; } }
.ed-stock-po-number { grid-area: num; justify-self: start; color: var(--ed-ink); font: 600 0.8125rem/1.35 var(--ed-mono); text-decoration: none; white-space: nowrap; }
.ed-stock-po-number:hover { color: var(--ed-ink); text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }
.ed-stock-po-number:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: 2px; border-radius: 4px; }
.ed-stock-po-state { grid-area: state; justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 22px; box-sizing: border-box; padding: 0 9px; border: 1px solid color-mix(in srgb, var(--po-tone) 50%, transparent); border-radius: 999px; color: var(--po-ink); font-size: 0.7188rem; font-weight: 600; white-space: nowrap; }
.ed-stock-po.is-state-draft .ed-stock-po-state { border-style: dashed; border-color: var(--ed-line2); }
.ed-stock-po-state > i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--po-tone); }
.ed-stock-po-action { grid-area: act; }
.ed-stock-po-type { margin: 0; color: var(--ed-ink3); font-size: 0.75rem; line-height: 1.4; }
.ed-stock-po-meter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ed-stock-po-meter.is-received { --po-bar: var(--ed-stock-s2); }
.ed-stock-po-meter.is-paid { --po-bar: var(--ed-p2); }
.ed-stock-po-bar { display: block; height: 6px; border-radius: 9px; background: var(--ed-raise); overflow: hidden; }
.ed-stock-po-bar > i { display: block; height: 100%; border-radius: 9px; background: var(--po-bar); transform-origin: left; animation: ed-stock-bar 0.7s var(--ed-ease) var(--ed-stock-delay, 0s) both; }
.ed-stock-po-meter.is-nocogs .ed-stock-po-bar { box-sizing: border-box; border: 1px dashed var(--ed-line2); background: transparent; }
.ed-stock-po-meter p { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin: 0; color: var(--ed-ink2); font-size: 0.75rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.ed-stock-po-meter p b { color: var(--ed-ink); font-weight: 600; }
.ed-stock-po-aside { color: var(--ed-ink3); white-space: nowrap; }
.ed-stock-po-aside.is-warn { color: var(--ed-amber); font-weight: 600; }
.ed-stock-po-tag { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; color: var(--ed-ink3); font-size: 0.75rem; cursor: text; }
.ed-stock-po-tag input { flex: 1; min-width: 0; height: 32px; min-height: 32px; box-sizing: border-box; padding: 0 10px; border: 0; border-radius: 9px; background: var(--ed-card2); color: var(--ed-ink); font: 400 0.75rem var(--ed-font); text-overflow: ellipsis; }
.ed-stock-po-skus { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px 12px; max-height: 36px; margin: 0; overflow: hidden; color: var(--ed-ink3); font: 400 0.6875rem/16px var(--ed-mono); font-variant-numeric: tabular-nums; }
.ed-stock-po-skus > span { white-space: nowrap; }
.ed-stock-po-skus > [hidden] { display: none; }
.ed-stock-po-skus > em { color: var(--ed-ink2); font: 500 0.7188rem/16px var(--ed-font); font-style: normal; white-space: nowrap; }
.ed-stock-po-empty { grid-column: 1 / -1; margin: 0; padding: 14px 2px; color: var(--ed-ink3); font-size: 0.7813rem; }
.ed-stock-po-toggle { grid-column: 1 / -1; justify-self: center; min-height: 36px; padding: 0 16px; border: 1px solid var(--ed-line); border-radius: 11px; background: transparent; color: var(--ed-ink); font-size: 0.7813rem; font-weight: 500; }
.ed-stock-po-toggle:hover { background: var(--ed-card2); color: var(--ed-ink); }
@media (pointer: coarse) { .ed-stock-po-tag input { height: 44px; min-height: 44px; } }
.ed-stock-table { display: flex; flex-direction: column; min-width: 0; border-radius: var(--ed-r-card); background: var(--ed-card); }
.ed-stock-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 16px 12px 18px; }
.ed-stock-gap { flex: 1; }
.ed-stock-tabs { max-width: 100%; }
.ed-stock-tabs > .admin-toggle-pill { height: 28px; min-height: 28px; gap: 6px; font-size: 0.75rem; }
.ed-stock-count { font: 400 0.6875rem var(--ed-mono); color: var(--ed-ink3); }
.ed-stock-count:empty { display: none; }
.admin-inventory-filter-alert { display: inline-block; flex: none; width: 6px; height: 6px; margin-left: -2px; border-radius: 50%; background: var(--ed-amber); }
.admin-inventory-filter-alert[hidden] { display: none; }
.ed-stock-search { display: flex; align-items: center; gap: 8px; flex: 0 1 260px; width: 260px; min-width: 150px; max-width: 100%; height: 36px; box-sizing: border-box; padding: 0 12px; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink3); transition: box-shadow 0.25s; }
.ed-stock-search:focus-within { box-shadow: 0 0 0 1px var(--ed-line2); }
.ed-stock-search svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ed-stock-search input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; background: transparent !important; box-shadow: none !important; color: var(--ed-ink); font-size: 0.7813rem; }
.ed-stock-filter { position: relative; display: inline-flex; align-items: center; box-sizing: border-box; height: 36px; margin: 0; padding: 0 0 0 12px; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink3); font-size: 0.7813rem; white-space: nowrap; transition: background-color 0.25s, box-shadow 0.25s; }
.ed-stock-filter:hover { background: var(--ed-raise); }
.ed-stock-filter:focus-within { box-shadow: 0 0 0 1px var(--ed-ink3); }
.ed-stock-filter > span, .ed-stock-filter label > span { pointer-events: none; }
.ed-stock-filter select { field-sizing: content; min-height: 0; height: 36px; max-width: 170px; padding: 0 30px 0 7px; border: 0; border-radius: 11px; background-color: transparent !important; background-position: right 9px center; background-size: 13px 13px; box-shadow: none !important; color: var(--ed-ink); font-size: 0.7813rem; text-overflow: ellipsis; }
.ed-stock-orderdays label { display: inline-flex; align-items: center; height: 100%; cursor: text; }
.ed-stock-orderdays input { width: 52px; min-height: 0; height: 36px; padding: 0 10px 0 7px; border: 0; background: transparent !important; box-shadow: none !important; color: var(--ed-ink); font: 400 0.7813rem var(--ed-font); -moz-appearance: textfield; }
.ed-stock-orderdays input::-webkit-inner-spin-button, .ed-stock-orderdays input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ed-stock-orderdays.is-busy { opacity: 0.6; }
.ed-stock-scroll { position: relative; overflow: auto; border-top: 1px solid var(--ed-line); container-type: inline-size; scroll-behavior: smooth; }
.ed-stock-grid { min-width: 980px; font-variant-numeric: tabular-nums; }
.ed-stock-grid th { position: sticky; top: 0; z-index: 1; height: 38px; padding: 0 10px; background: var(--ed-card); border-bottom: 1px solid var(--ed-line); font-size: 0.75rem; }
.ed-stock-grid th:first-child, .ed-stock-grid td:first-child { padding-left: 18px; }
.ed-stock-grid th:last-child, .ed-stock-grid td:last-child { padding-right: 18px; }
.ed-stock-grid th.is-num { text-align: right; }
.ed-stock-th { display: inline-flex; align-items: center; gap: 4px; min-height: 0; height: auto; padding: 0; border: 0; background: transparent !important; color: var(--ed-ink3); font-size: 0.75rem; font-weight: 500; white-space: nowrap; transition: color 0.2s; }
.ed-stock-th:hover, .ed-stock-th.is-active { color: var(--ed-ink); }
.ed-stock-th:active { transform: none; }
.ed-stock-sort { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: transform 0.35s var(--ed-ease), opacity 0.2s; }
.ed-stock-th.is-active .ed-stock-sort { opacity: 1; }
.ed-stock-sort.is-up { transform: rotate(180deg); }
.ed-stock-row { cursor: pointer; }
.ed-stock-row.is-entering { animation: ed-stock-row 0.45s var(--ed-ease) var(--ed-stock-delay, 0s) both; }
@keyframes ed-stock-row { from { opacity: 0; transform: translate3d(0, 4px, 0); } to { opacity: 1; transform: none; } }
.ed-stock-row > td { height: 46px; padding: 6px 10px; font-size: 0.8125rem; white-space: nowrap; }
.ed-stock-row > td.is-num { text-align: right; font: 400 0.75rem var(--ed-mono); }
.ed-stock-row > td.is-strong { font-weight: 600; }
.ed-stock-muted { color: var(--ed-ink3); }
.ed-stock-cover { width: 200px; }
.ed-stock-cover { --ed-stock-bar: var(--ed-stock-s2); }
.ed-stock-cover.is-warn { --ed-stock-bar: var(--ed-amber); }
.ed-stock-cover.is-bad { --ed-stock-bar: var(--ed-red); }
.ed-stock-cover > .ed-stock-bar { display: inline-block; width: calc(100% - 74px); min-width: 50px; height: 5px; margin-right: 8px; border-radius: 9px; background: var(--ed-card2); overflow: hidden; vertical-align: middle; }
.ed-stock-cover .ed-stock-bar > i { display: block; height: 100%; border-radius: 9px; background: var(--ed-stock-bar); transform-origin: left; animation: ed-stock-bar 0.7s var(--ed-ease) var(--ed-stock-delay, 0s) both; }
@keyframes ed-stock-bar { from { transform: scaleX(0); } to { transform: none; } }
.ed-stock-days { display: inline-block; min-width: 64px; font: 400 0.75rem var(--ed-mono); text-align: right; vertical-align: middle; }
.ed-stock-cover.is-none .ed-stock-days { color: var(--ed-ink3); font-family: var(--ed-font); }
/* Product rows: one row per product inside the list card. A 3 px left edge and the pill carry the
   urgency; four blocks follow: identity, stock, demand, controls (24 / 26 / 28 / 22 from 1300 px). */
.ed-stock-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; flex: 1 1 100%; min-width: 0; }
.ed-stock-list { border-top: 1px solid var(--ed-line); }
.ed-stock-rows { display: flex; flex-direction: column; }
.ed-stock-item { --row-tone: transparent; --row-bar: var(--ed-stock-s2); position: relative; display: grid; grid-template-columns: minmax(0, 24fr) minmax(0, 26fr) minmax(0, 28fr) minmax(0, 22fr); align-items: start; gap: 18px 20px; padding: 16px 18px; border-top: 1px solid var(--ed-line); box-shadow: inset 3px 0 0 var(--row-tone); }
.ed-stock-item:first-child { border-top: 0; }
.ed-stock-item:hover, .ed-stock-item:focus-within { z-index: 2; }
.ed-stock-item.is-entering { animation: ed-stock-row 0.45s var(--ed-ease) var(--ed-stock-delay, 0s) both; }
.ed-stock-item.is-bad { --row-tone: var(--ed-red); --row-bar: var(--ed-red); }
.ed-stock-item.is-warn { --row-tone: var(--ed-amber); --row-bar: var(--ed-amber); }
.ed-stock-item.is-info { --row-tone: var(--ed-cyan); --row-bar: var(--ed-cyan); }
.ed-stock-item.is-near { --row-tone: var(--ed-ink3); }
.ed-stock-label, .ed-stock-figures dt, .ed-stock-setting-fields label > span { color: var(--ed-ink3); font-size: 0.7188rem; font-weight: 400; line-height: 1.3; }
/* A: identity */
.ed-stock-id { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ed-stock-id > .ed-pill { margin-bottom: 2px; }
.ed-stock-id h3 { margin: 0; color: var(--ed-ink); font-size: 0.875rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.ed-stock-id small { color: var(--ed-ink3); font: 400 0.6875rem/1.4 var(--ed-mono); overflow-wrap: anywhere; }
/* B: stock now, projected stock and trigger; the bar with its trigger tick; the explanation */
.ed-stock-balance { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ed-stock-figures { position: relative; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.ed-stock-figures > div { min-width: 0; }
.ed-stock-figures dd { margin: 3px 0 0; }
.ed-stock-figures strong { display: block; color: var(--ed-ink); font: 600 1.1875rem/1.25 var(--ed-font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ed-stock-meter-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ed-stock-meter { position: relative; flex: 1; min-width: 60px; height: 6px; border-radius: 9px; background: var(--ed-raise); }
.ed-stock-meter > i { display: block; height: 100%; border-radius: 9px; background: var(--row-bar); transform-origin: left; animation: ed-stock-bar 0.7s var(--ed-ease) var(--ed-stock-delay, 0s) both; }
.ed-stock-meter > em { position: absolute; top: 0; bottom: 0; border-radius: 9px; background: var(--ed-cyan); opacity: 0.5; transform-origin: left; animation: ed-stock-bar 0.7s var(--ed-ease) var(--ed-stock-delay, 0s) both; }
.ed-stock-meter > b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ed-ink); }
.ed-stock-cover-days { flex: none; color: var(--ed-ink2); font-size: 0.7188rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ed-stock-why { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; color: var(--ed-ink2); font-size: 0.75rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.ed-stock-why li { overflow-wrap: anywhere; }
.ed-stock-why li::first-letter { text-transform: uppercase; }
.ed-stock .admin-inventory-incoming-qty { width: auto; color: var(--ed-cyan); font-weight: 500; }
/* projected stock opens the orders behind it on hover, keyboard focus or a tap, under the figures */
.ed-stock .admin-inventory-commitment-details { position: static; display: inline-block; width: auto; max-width: 100%; }
.ed-stock-proj-btn { display: inline-flex; align-items: center; gap: 2px; min-height: 0; height: auto; padding: 0; border: 0; border-radius: 4px; background: transparent !important; color: var(--ed-ink); font: inherit; cursor: pointer; }
.ed-stock-proj-btn:active { transform: none; }
.ed-stock-proj-btn:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: 3px; }
.ed-stock-proj-btn strong { text-decoration: underline dotted var(--ed-ink3); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.ed-stock-proj-btn svg { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--ed-ink3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ed-ease); }
.ed-stock-proj.is-open .ed-stock-proj-btn svg { transform: rotate(180deg); }
.ed-stock .admin-inventory-commitment-panel { position: absolute; z-index: 6; top: calc(100% + 8px); left: 0; display: none; flex-direction: column; gap: 6px; width: min(320px, 100%); box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--ed-line2); border-radius: 12px; background: var(--ed-menu); box-shadow: var(--ed-shm); animation: ed-in 0.25s var(--ed-ease) both; }
.ed-stock .admin-inventory-commitment-panel::before { content: ''; position: absolute; top: -10px; right: 0; left: 0; height: 10px; }
.ed-stock-proj:hover .admin-inventory-commitment-panel, .ed-stock-proj:focus-within .admin-inventory-commitment-panel, .ed-stock-proj.is-open .admin-inventory-commitment-panel { display: flex; }
.ed-stock-proj.is-dismissed:not(.is-open) .admin-inventory-commitment-panel { display: none; }
.ed-stock-proj-head { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--ed-line); font-size: 0.75rem; }
.ed-stock-proj-head small { color: var(--ed-ink3); font-size: 0.7188rem; line-height: 1.4; }
.ed-stock .admin-inventory-commitment-panel ul { display: grid; max-height: 220px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.ed-stock .admin-inventory-commitment-panel li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 6px 2px; font-size: 0.75rem; }
.ed-stock .admin-inventory-commitment-panel li > a { display: inline-flex; gap: 5px; align-items: baseline; min-width: 0; color: var(--ed-ink); font-family: var(--ed-mono); overflow-wrap: anywhere; }
.ed-stock .admin-inventory-commitment-panel li > b { flex: none; font: 600 0.75rem var(--ed-mono); color: var(--ed-ink2); }
/* C: demand per 10-day block (the latest 30 days brighter), its totals and the window note */
.ed-stock-demand { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ed-stock-buckets { display: grid; grid-template-columns: repeat(var(--bucket-count, 9), minmax(0, 1fr)); align-items: end; gap: 4px; height: 52px; border-bottom: 1px solid var(--ed-line2); }
.ed-stock-buckets > i { display: block; height: var(--bucket-height, 4%); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--ed-stock-s2); opacity: 0.38; transform-origin: bottom; animation: ed-stock-grow 0.6s var(--ed-ease) var(--ed-stock-delay, 0s) both; transition: opacity 0.2s; }
.ed-stock-buckets > i.is-recent { opacity: 1; }
.ed-stock-buckets > i:hover { opacity: 0.85; }
.ed-stock-buckets > i.is-recent:hover { opacity: 1; }
@keyframes ed-stock-grow { from { transform: scaleY(0); } to { transform: none; } }
.ed-stock-metrics { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ed-ink3); font-size: 0.75rem; line-height: 1.4; }
.ed-stock-metrics span { white-space: nowrap; }
.ed-stock-metrics b { color: var(--ed-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-stock-note { margin: 0; color: var(--ed-ink3); font-size: 0.7188rem; line-height: 1.45; }
/* D: Automatic, manual trigger, MOQ and Save, in a thin-bordered box */
.ed-stock-settings { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--ed-line); border-radius: 12px; }
.ed-stock-switch { display: inline-flex; align-items: center; gap: 10px; width: max-content; max-width: 100%; color: var(--ed-ink); font-size: 0.7813rem; font-weight: 500; cursor: pointer; }
.ed-stock-switch input[aria-busy='true'] { opacity: 0.6; }
.ed-stock-setting-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.ed-stock-setting-fields label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ed-stock-setting-fields label > span { white-space: nowrap; }
.ed-stock-setting-fields input { width: 100%; min-width: 0; min-height: 34px; height: 34px; box-sizing: border-box; padding: 0 10px; font-variant-numeric: tabular-nums; }
.ed-stock-save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.ed-stock-save { flex: none; min-width: 64px; }
.ed-stock-save.is-saved:disabled { color: var(--ed-mint); opacity: 1; }
/* the status sits beside Save when it fits whole, and moves under it when it does not */
.ed-stock-setting-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; flex: 1 1 auto; min-width: 0; font-size: 0.7188rem; line-height: 1.4; }
.ed-stock-setting-status small { color: var(--ed-ink3); font-size: 0.7188rem; }
.ed-stock-setting-status small.is-error { color: var(--ed-red); }
.ed-stock .admin-inventory-trigger-why { position: static; display: block; margin: 0; }
.ed-stock .admin-inventory-trigger-why[open] { flex-basis: 100%; }
.ed-stock .admin-inventory-trigger-why summary { display: inline-flex; align-items: center; min-height: 0; padding: 0; color: var(--ed-ink2); font-size: 0.7188rem; text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; cursor: pointer; list-style: none; }
.ed-stock .admin-inventory-trigger-why summary::before { content: '·'; margin-right: 6px; color: var(--ed-ink3); text-decoration: none; }
.ed-stock .admin-inventory-trigger-why[open] summary::before { content: none; }
.ed-stock .admin-inventory-trigger-why summary::-webkit-details-marker { display: none; }
.ed-stock .admin-inventory-trigger-why summary:hover { color: var(--ed-ink); }
.ed-stock .admin-inventory-trigger-why > div { position: static; flex-basis: 100%; display: grid; gap: 5px; width: auto; box-sizing: border-box; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--ed-line); border-radius: 12px; background: transparent; box-shadow: none; color: var(--ed-ink2); font-size: 0.7188rem; line-height: 1.4; animation: ed-in 0.3s var(--ed-ease) both; }
.ed-stock .admin-inventory-trigger-why > div b { color: var(--ed-ink); font-family: var(--ed-mono); }
/* two by two below 1300 px (identity and stock, then demand and controls); stacked on a phone */
@media (max-width: 1299px) { .ed-stock-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 767px) {
  .ed-stock-item { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 14px 16px 16px; }
  .ed-stock-filters { gap: 8px; }
}
/* touch: 44 px fields and targets; the projected-stock button keeps its line height in the layout */
@media (pointer: coarse) {
  .ed-stock-setting-fields input { min-height: 44px; height: 44px; }
  .ed-stock-proj-btn { min-height: 44px; margin: -10px 0; }
  .ed-stock .admin-inventory-trigger-why summary { min-height: 44px; }
}
.ed-stock-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 20px; color: var(--ed-ink3); font-size: 0.7813rem; text-align: center; }
.ed-stock-empty svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ed-stock-empty strong { color: var(--ed-ink); font-size: 0.8438rem; font-weight: 600; }
.ed-stock-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 48px; box-sizing: border-box; padding: 6px 12px 6px 18px; border-top: 1px solid var(--ed-line); color: var(--ed-ink3); font-size: 0.75rem; }
.ed-stock-days-message:empty { display: none; }
.ed-stock-days-message.is-error { color: var(--ed-red); }
.ed-stock-pager { display: flex; align-items: center; gap: 8px; }
.ed-stock-pager[hidden] { display: none; }
.ed-stock-pager > span { color: var(--ed-ink2); font-family: var(--ed-mono); white-space: nowrap; }
.ed-stock-page-btn { display: grid; place-items: center; width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); }
.ed-stock-page-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-stock-page-btn:disabled { color: var(--ed-ink3); opacity: 0.55; }
@media (max-width: 1300px) {
  .ed-stock-cover { width: 170px; }
}
/* the phone top bar keeps only the title and its own tools, as on the phone boards */
@media (max-width: 767px) {
  [data-admin-dashboard][data-active-view='inventory-recap'] .ed-view-actions[data-ed-view-actions='inventory-recap'],
  [data-admin-dashboard][data-active-view='orders'] .ed-view-actions[data-ed-view-actions='orders'],
  [data-admin-dashboard][data-active-view='purchase-order'] .ed-view-actions[data-ed-view-actions='purchase-order'],
  [data-admin-dashboard][data-active-view='po-history'] .ed-view-actions[data-ed-view-actions='po-history'],
  [data-admin-dashboard][data-active-view='po-detail'] .ed-view-actions[data-ed-view-actions='po-detail'] { display: none; }
}
@media (max-width: 760px) {
  .ed-stock-toolbar { padding: 12px 12px 10px; }
  .ed-stock-gap { display: none; }
  .ed-stock-tabs { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; }
  .ed-stock-tabs > .admin-toggle-pill { flex: 1 0 auto; padding: 0 10px; }
  .ed-stock-search { flex: 1 1 100%; width: auto; }
  .ed-stock-filter { flex: 1 1 auto; }
  .ed-stock-filter select { flex: 1; max-width: none; min-width: 0; }
  .ed-stock-orderdays label { flex: 1; }
  .ed-stock-orderdays input { flex: 1; width: 72px; min-width: 64px; }
  .ed-stock-grid th:first-child, .ed-stock-grid td.ed-stock-product { position: sticky; left: 0; z-index: 2; background: var(--ed-card); box-shadow: 1px 0 0 var(--ed-line); }
  .ed-stock-foot { padding: 8px 12px; }
  .ed-stock-incoming { padding: 14px 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { .ed-stock-row.is-entering, .ed-stock-item.is-entering, .ed-stock-po, .ed-stock-cover .ed-stock-bar > i, .ed-stock-meter > i, .ed-stock-meter > em, .ed-stock-po-bar > i, .ed-stock-buckets > i, .ed-stock .admin-inventory-commitment-panel { animation: none; } }

/* purchase planning: the plan on the left, the order summary beside it */
/* (PurchasePlanning board) a mode card and the recommended order on the left, the PO beside them */
[data-admin-dashboard][data-active-view='purchase-order'] .ed-view-actions[data-ed-view-actions='purchase-order'],
[data-admin-dashboard][data-active-view='po-history'] .ed-view-actions[data-ed-view-actions='po-history'],
[data-admin-dashboard][data-active-view='po-detail'] .ed-view-actions[data-ed-view-actions='po-detail'] { display: flex; }
.ed-view-actions[data-ed-view-actions='po-history'] a.ed-frame-btn { text-decoration: none; }
.ed-view-actions .ed-frame-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-purchase-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.ed-purchase-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ed-plan-card { min-width: 0; border-radius: var(--ed-r-card); background: var(--ed-card); }
.ed-plan-modes { padding: 16px 18px; }
.admin-purchase-mode-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; }
.admin-purchase-mode-picker button { display: flex; align-items: flex-start; gap: 10px; min-height: 0; height: auto; padding: 12px; border: 1px solid var(--ed-line); border-radius: 13px; background: transparent; color: var(--ed-ink); font-weight: 400; text-align: left; white-space: normal; transition: border-color 0.3s, background-color 0.3s; }
.admin-purchase-mode-picker button:hover { background: var(--ed-card2); }
.admin-purchase-mode-picker button.is-active { border-color: var(--ed-ink3); background: var(--ed-card2); font-weight: 400; }
.admin-purchase-mode-picker button > i { display: grid; place-items: center; flex: none; width: 16px; height: 16px; margin-top: 1px; box-sizing: border-box; border: 1.5px solid var(--ed-line2); border-radius: 50%; }
.admin-purchase-mode-picker button > i::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ed-ink); transform: scale(0); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.admin-purchase-mode-picker button.is-active > i { border-color: var(--ed-ink); }
.admin-purchase-mode-picker button.is-active > i::after { transform: scale(1); }
.admin-purchase-mode-picker button > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-purchase-mode-picker strong { font-size: 0.8125rem; font-weight: 600; }
.admin-purchase-mode-picker small { color: var(--ed-ink3); font-size: 0.75rem; }
.ed-plan-list-card { overflow: hidden; }
.ed-plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px 12px 18px; }
.ed-plan-heading { margin-right: auto; min-width: 0; }
.ed-plan-heading h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.ed-plan-heading p { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-plan-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ed-plan-tools[hidden] { display: none; }
.ed-plan-search { display: flex; align-items: center; gap: 8px; width: 240px; max-width: 100%; height: 36px; box-sizing: border-box; padding: 0 12px; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink3); transition: box-shadow 0.25s; }
.ed-plan-search:focus-within { box-shadow: 0 0 0 1px var(--ed-line2); }
.ed-plan-search svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ed-plan-search input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; background: transparent !important; box-shadow: none !important; color: var(--ed-ink); font-size: 0.7813rem; }
.ed-plan-toggle-all { min-height: 36px; padding: 0 12px; border-radius: 11px; font-size: 0.7813rem; font-weight: 500; }
.ed-plan-toggle-all[aria-pressed='true'] { background: var(--ed-card2); font-weight: 500; }
.ed-plan-adder { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 12px; }
.ed-plan-adder[hidden] { display: none; }
.ed-plan-adder-search { width: 100%; }
.ed-plan-results { display: flex; flex-direction: column; }
.ed-plan-results:empty { display: none; }
.ed-plan-results .admin-overflow-product-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 8px 2px; border-bottom: 1px solid var(--ed-line); }
.ed-plan-results .admin-overflow-product-result strong { font-size: 0.8125rem; font-weight: 600; overflow-wrap: anywhere; }
.ed-plan-results .admin-overflow-product-result span { grid-column: 1; color: var(--ed-ink3); font-size: 0.7188rem; }
.ed-plan-results .admin-overflow-product-result button { grid-column: 2; grid-row: 1 / span 2; min-height: 32px; padding: 0 12px; border-radius: 10px; font-size: 0.7813rem; }
.ed-plan-list { border-top: 1px solid var(--ed-line); }
.ed-plan-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 110px 130px 150px 120px; align-items: center; gap: 10px; min-height: 58px; padding: 8px 18px; border-bottom: 1px solid var(--ed-line); opacity: 0.45; transition: opacity 0.3s, background-color 0.2s; animation: ed-stock-row 0.45s var(--ed-ease) var(--ed-stock-delay, 0s) both; }
.ed-plan-row.is-selected, .ed-plan[data-plan-mode='overflow'] .ed-plan-row { opacity: 1; }
.ed-plan-row:hover { background: var(--ed-card2); }
.ed-plan-row:last-child { border-bottom: 0; }
.ed-plan-check { justify-self: start; }
.ed-plan-remove { display: grid; place-items: center; width: 26px; height: 26px; min-height: 26px; padding: 0; border-radius: 8px; background: transparent; color: var(--ed-ink3); }
.ed-plan-remove:hover { background: var(--ed-raise); color: var(--ed-ink); }
.ed-plan-remove svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ed-plan-name { display: flex; flex-direction: column; min-width: 0; }
.ed-plan-name strong { font-size: 0.8125rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ed-plan-name small { color: var(--ed-ink3); font-size: 0.7188rem; line-height: 1.4; }
.ed-plan-name small .admin-inventory-incoming-qty { color: var(--ed-cyan); font-weight: 500; }
.ed-plan-line-note { width: 100%; min-height: 0; height: 22px; margin-top: 2px; padding: 0 6px; margin-left: -6px; border-radius: 6px; background: transparent !important; box-shadow: none; color: var(--ed-ink2); font-size: 0.7188rem; }
.ed-plan-line-note:hover { background: var(--ed-raise) !important; }
.ed-plan-line-note:focus { background: var(--ed-card) !important; box-shadow: 0 0 0 1px var(--ed-line2) !important; }
.ed-plan-line-note:placeholder-shown:not(:focus) { width: max-content; max-width: 100%; }
.ed-plan-meta { color: var(--ed-ink2); font-size: 0.75rem; white-space: nowrap; }
.ed-plan-meta b { color: var(--ed-ink); font: 500 0.75rem var(--ed-mono); }
.ed-plan-stepper { display: inline-flex; align-items: center; gap: 2px; justify-self: start; padding: 2px; border-radius: 10px; background: var(--ed-card2); }
.ed-plan-stepper button { display: grid; place-items: center; width: 28px; height: 28px; min-height: 28px; padding: 0; border-radius: 8px; background: transparent; color: var(--ed-ink); }
.ed-plan-stepper button:hover { background: var(--ed-raise); }
.ed-plan-stepper button:active { transform: scale(0.95); }
.ed-plan-stepper svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ed-plan-stepper input { width: 58px; min-height: 0; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent !important; box-shadow: none; color: var(--ed-ink); font: 600 0.8125rem var(--ed-mono); text-align: center; -moz-appearance: textfield; }
.ed-plan-stepper input:focus { box-shadow: 0 0 0 1px var(--ed-line2) !important; }
.ed-plan-stepper input::-webkit-inner-spin-button, .ed-plan-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ed-plan-subtotal { text-align: right; font: 600 0.7813rem var(--ed-mono); white-space: nowrap; }
.ed-plan-empty { margin: 0; padding: 36px 20px; color: var(--ed-ink3); font-size: 0.7813rem; text-align: center; }
.ed-plan-advanced { padding: 12px 18px 14px; border-top: 1px solid var(--ed-line); color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-plan-advanced summary { width: max-content; min-height: 0; color: var(--ed-ink); cursor: pointer; }
.ed-plan-advanced .admin-purchase-rule { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 10px; color: var(--ed-ink2); font-size: 0.75rem; }
.ed-plan-advanced .admin-purchase-rule[hidden] { display: none; }
.ed-plan-advanced .admin-purchase-rule code { color: var(--ed-ink3); font: 0.7188rem var(--ed-mono); }
.admin-purchase-no-cogs { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; font-size: 0.7813rem; cursor: pointer; }
.admin-purchase-no-cogs small { display: block; margin-top: 2px; color: var(--ed-ink3); font-size: 0.7188rem; }
.ed-purchase-summary { position: sticky; top: 10px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; padding: 16px 18px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.7); }
.ed-purchase-summary h2 { margin: 0; font-size: 0.875rem; font-weight: 600; overflow-wrap: anywhere; }
.ed-plan-totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; font-size: 0.7813rem; }
.ed-plan-totals dt { color: var(--ed-ink2); }
.ed-plan-totals dd { margin: 0; font-family: var(--ed-mono); text-align: right; }
.ed-plan-totals .is-total { color: var(--ed-ink); font-weight: 600; }
.ed-plan-totals dd.is-total { font-size: 0.9375rem; }
.admin-purchase-ledger-meta { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--ed-line); color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-purchase-ledger-meta > span { display: flex; justify-content: space-between; gap: 8px; padding: 0; }
.admin-purchase-ledger-meta { align-items: stretch; justify-content: flex-start; margin: 0; padding-bottom: 0; }
.admin-purchase-order-note { margin: 0; }
.admin-purchase-ledger-meta strong { color: var(--ed-ink2); font: 500 0.7188rem var(--ed-mono); }
.admin-purchase-ledger-meta .is-short { color: var(--ed-amber); }
.admin-purchase-order-note { display: flex; flex-direction: column; gap: 6px; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-purchase-order-note textarea { min-height: 64px; }
.ed-purchase-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ed-purchase-actions button { min-height: 40px; padding: 0 10px; border-radius: 11px; font-size: 0.7813rem; font-weight: 500; }
.ed-purchase-actions button.is-primary { grid-column: 1 / -1; min-height: 46px; border-radius: 13px; background: var(--ed-ink); color: var(--ed-card); font-size: 0.875rem; font-weight: 600; }
.ed-purchase-actions button.is-primary:hover { background: var(--ed-ink); opacity: 0.88; }
.ed-purchase-actions button.is-primary:disabled { opacity: 0.35; }
.ed-purchase-caption { margin: -4px 0 0; color: var(--ed-ink3); font-size: 0.7188rem; text-align: center; }
@media (max-width: 1300px) { .ed-purchase-layout { grid-template-columns: minmax(0, 1fr); } .ed-purchase-summary { position: static; } }
@media (max-width: 1100px) { .ed-plan-row { grid-template-columns: 28px minmax(0, 1fr) auto auto; grid-template-areas: 'tick name name sub' 'tick moq unit step'; row-gap: 6px; } .ed-plan-check, .ed-plan-remove { grid-area: tick; align-self: start; margin-top: 2px; } .ed-plan-name { grid-area: name; } .ed-plan-row > .ed-plan-meta:nth-of-type(2) { grid-area: moq; } .ed-plan-row > .ed-plan-meta:nth-of-type(3) { grid-area: unit; } .ed-plan-stepper { grid-area: step; justify-self: end; } .ed-plan-subtotal { grid-area: sub; align-self: start; } }
@media (max-width: 760px) { .admin-purchase-mode-picker { grid-template-columns: minmax(0, 1fr); } .ed-plan-head { padding: 12px; } .ed-plan-tools { flex: 1 1 100%; flex-wrap: nowrap; } .ed-plan-search { flex: 1 1 auto; width: auto; min-width: 0; } .ed-plan-row { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: 'tick name name' 'tick moq sub' 'tick unit step'; padding: 10px 12px; } .ed-plan-adder { padding: 0 12px 12px; } }
.admin-purchase-success-modal { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 20px; }
.admin-purchase-success-modal[hidden] { display: none; }
.admin-purchase-success-backdrop { position: absolute; inset: 0; background: var(--ed-scrim); animation: ed-fade 0.3s var(--ed-ease) both; }
.admin-purchase-success-modal section { position: relative; display: flex; flex-direction: column; gap: 10px; width: min(440px, 100%); padding: 22px; border: 1px solid var(--ed-line2); border-radius: 20px; background: var(--ed-sheet); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); animation: ed-sheet 0.45s var(--ed-ease) both; }
.admin-purchase-success-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--ed-mintl); border-radius: 12px; color: var(--ed-mint); font-size: 1.125rem; }
.admin-purchase-success-modal .admin-panel-kicker { display: none; }
.admin-purchase-success-modal h3 { margin: 0; font-size: 1rem; font-weight: 650; }
.admin-purchase-success-modal p { margin: 0; color: var(--ed-ink2); font-size: 0.8125rem; }
.admin-purchase-success-progress { display: flex; flex-direction: column; gap: 6px; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-purchase-success-progress i { display: block; height: 4px; border-radius: 9px; background: var(--ed-card2); overflow: hidden; position: relative; }
.admin-purchase-success-progress i::after { content: ''; position: absolute; inset: 0 60% 0 0; border-radius: 9px; background: var(--ed-ink); animation: ed-ind 1.4s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.admin-purchase-success-actions { display: flex; justify-content: flex-end; gap: 8px; }
.admin-purchase-success-actions .is-primary { background: var(--ed-ink); color: var(--ed-card); font-weight: 600; }
.admin-purchase-success-actions button { min-height: 36px; padding: 0 14px; }
/* purchase history and PO details (PurchaseHistory and PurchaseDetail boards) */
.admin-po-history-view .admin-panel-kicker, .admin-po-detail-view .admin-panel-kicker { display: none; }
.admin-po-history-view.is-active > *, .admin-po-detail-view.is-active > * { margin: 0; }
.ed-po-export { display: inline-flex; align-items: center; gap: 7px; height: 36px; min-height: 36px; padding: 0 12px; border-radius: 11px; font-size: 0.7813rem; font-weight: 500; white-space: nowrap; }
.ed-po-export svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-po-grid { min-width: 1060px; }
.ed-po-row > td { font-size: 0.8125rem; }
.ed-po-link { color: var(--ed-ink); font: 400 0.75rem var(--ed-mono); white-space: nowrap; text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }
.ed-po-link:hover { color: var(--ed-ink); text-decoration-color: var(--ed-ink3); }
.ed-po-mono { font: 400 0.75rem var(--ed-mono) !important; }
.ed-po-wrap { min-width: 110px; max-width: 220px; white-space: normal !important; overflow-wrap: anywhere; line-height: 1.35; }
.ed-po-grid th.ed-po-col-received, .ed-po-received { width: 150px; }
.ed-po-received.is-done { --ed-stock-bar: var(--ed-mint); }
.ed-po-received .ed-stock-days { min-width: 40px; }
.ed-po-received > .ed-stock-bar { width: calc(100% - 50px); }
.ed-po-payment { font-size: 0.7813rem !important; white-space: nowrap; }
.ed-po-payment.is-good { color: var(--ed-mint); }
.ed-po-payment.is-warn { color: var(--ed-amber); }
.ed-po-payment.is-muted { color: var(--ed-ink3); }
.ed-po-topbar-status[hidden] { display: none; }
.ed-po-topbar-status { align-self: center; margin-right: 4px; }
/* PurchaseDetail board: the status pill follows the PO number inside the title tab (phones keep it beside the actions) */
.ed-po-title-status { margin-left: 12px; vertical-align: 4px; letter-spacing: normal; }
@media (min-width: 768px) { .ed-po-topbar-status { display: none !important; } }
@media (max-width: 767px) { .ed-po-title-status { display: none; } }
.ed-po-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.ed-po-card-head { padding: 14px 16px 12px 18px; }
.ed-po-card-head h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.ed-po-card-head p { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-po-items-grid { min-width: 620px; }
.ed-po-items-grid td { height: 46px; font-size: 0.8125rem; }
.ed-po-items-grid td.is-num { text-align: right; font: 400 0.75rem var(--ed-mono); white-space: nowrap; }
.ed-po-items-grid td.is-warn { color: var(--ed-amber); }
.ed-po-items-grid th.is-num { text-align: right; }
.ed-po-product strong { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ed-po-product small { display: block; margin-top: 2px; color: var(--ed-ink3); font-size: 0.7188rem; }
.ed-po-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ed-po-card { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.ed-po-card h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.ed-po-card-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ed-po-left { color: var(--ed-ink2); font: 400 0.7813rem var(--ed-mono); white-space: nowrap; }
.ed-po-left.is-warn { color: var(--ed-amber); }
.ed-po-left.is-good { color: var(--ed-mint); }
.ed-po-facts { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: baseline; gap: 8px 12px; margin: 0; font-size: 0.7813rem; }
.ed-po-facts dt { color: var(--ed-ink3); }
.ed-po-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.ed-po-by { color: var(--ed-ink3); font-family: var(--ed-font); }
.ed-po-note { color: var(--ed-ink2); }
.ed-po-tag-input { width: 100%; min-height: 0; height: 30px; margin: -6px 0 -6px -8px; padding: 0 8px; border-radius: 8px; background: transparent !important; color: var(--ed-ink); font-size: 0.7813rem; }
.ed-po-tag-input:hover { background: var(--ed-card2) !important; }
.ed-po-tag-input:focus { background: var(--ed-card2) !important; }
.ed-po-payments { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 0.7813rem; }
.ed-po-payments li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: baseline; gap: 10px; }
.ed-po-payments li > i { width: 8px; height: 8px; border-radius: 50%; background: var(--ed-mint); transform: translateY(-1px); }
.ed-po-payments li.is-due > i { box-sizing: border-box; border: 1.5px solid var(--ed-ink3); background: transparent; }
.ed-po-payments li.is-due { color: var(--ed-ink2); }
.ed-po-payments li.is-empty { grid-template-columns: minmax(0, 1fr); color: var(--ed-ink3); }
.ed-po-payments li > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ed-po-payments li b { font-weight: 400; overflow-wrap: anywhere; }
.ed-po-payments li small { color: var(--ed-ink3); font-size: 0.7188rem; }
.ed-po-payments li > em { font: normal 400 0.7813rem var(--ed-mono); white-space: nowrap; }
.ed-po-payments .admin-po-proof-links { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.ed-po-payments .admin-po-proof-link { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ed-ink); font-size: 0.7188rem; text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }
.ed-po-payments .admin-po-proof-link small { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.ed-po-primary { width: 100%; min-height: 40px; border-radius: 11px; background: var(--ed-ink); color: var(--ed-card); font-size: 0.8125rem; font-weight: 600; }
.ed-po-primary:hover { background: var(--ed-ink); opacity: 0.88; }
.ed-po-primary:disabled { background: var(--ed-card2); color: var(--ed-ink3); opacity: 1; }
.ed-po-secondary { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px; font-size: 0.7813rem; text-align: left; }
.ed-po-secondary small { color: var(--ed-ink3); font-size: 0.7188rem; font-weight: 400; }
.ed-po-paid-line { margin: -4px 0 0; color: var(--ed-ink3); font-size: 0.7188rem; text-align: center; }
.ed-po-actions { display: flex; flex-direction: column; gap: 6px; }
.ed-po-action { display: flex; align-items: center; justify-content: flex-start; min-height: 38px; padding: 0 12px; border-radius: 10px; font-size: 0.7813rem; font-weight: 400; text-align: left; }
.ed-po-action.is-danger { border: 1px solid var(--ed-redl); background: transparent; color: var(--ed-red); }
.ed-po-action.is-danger:hover { background: var(--ed-reds); }
@media (max-width: 1300px) { .ed-po-detail-grid { grid-template-columns: minmax(0, 1fr); } .ed-po-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; } }
/* paying a PO: the dialog uses the sheet style shared by every dialog */
.admin-po-payment-modal { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 20px; }
.admin-po-payment-modal[hidden] { display: none; }
.admin-po-payment-modal form { position: relative; display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 20px 22px 22px; border: 1px solid var(--ed-line2); border-radius: 20px; background: var(--ed-sheet); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); animation: ed-sheet 0.45s var(--ed-ease) both; }
.admin-po-payment-modal .admin-panel-kicker { display: none; }
.admin-po-payment-modal h3 { margin: 0; padding-right: 36px; font-size: 1rem; font-weight: 650; }
.admin-po-payment-modal form > p { margin: -6px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-po-modal-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 10px; font-size: 1.125rem; line-height: 1; }
.admin-po-payment-modes { align-self: flex-start; }
.admin-po-payment-modal label { display: flex; flex-direction: column; gap: 6px; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-po-payment-modal [data-po-payment-fields] label { position: relative; }
.admin-po-payment-modal [data-po-payment-fields] b { position: absolute; right: 12px; bottom: 11px; color: var(--ed-ink3); font-weight: 400; }
.admin-po-payment-full { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--ed-card2); color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-po-payment-full strong { color: var(--ed-ink); font: 600 0.875rem var(--ed-mono); }
.admin-po-payment-select-head { display: flex; gap: 6px; }
.admin-po-payment-select-head button { min-height: 30px; padding: 0 10px; font-size: 0.75rem; }
.admin-po-payment-products { display: flex; flex-direction: column; max-height: 220px; overflow: auto; border-top: 1px solid var(--ed-line); }
.admin-po-payment-modal .admin-po-payment-products label { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--ed-line); color: var(--ed-ink); cursor: pointer; }
.admin-po-payment-products strong { display: block; font-size: 0.7813rem; font-weight: 600; overflow-wrap: anywhere; }
.admin-po-payment-products small { color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-po-payment-products label > b { font: 500 0.75rem var(--ed-mono); }
.admin-po-payment-proof small { color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-po-payment-total { display: flex; align-items: baseline; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--ed-line); color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-po-payment-total strong { color: var(--ed-ink); font: 600 1rem var(--ed-mono); }
.admin-po-payment-confirm { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; background: var(--ed-ink); color: var(--ed-card); font-size: 0.8125rem; font-weight: 600; }
.admin-po-payment-confirm:hover { background: var(--ed-ink); opacity: 0.88; }
.admin-po-payment-confirm svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.admin-po-payment-modal [data-po-payment-message] { color: var(--ed-red); font-size: 0.75rem; }
.admin-po-payment-modal [data-po-payment-message]:empty { display: none; }
.admin-po-context-menu { position: fixed; z-index: 140; min-width: 160px; padding: 6px; border: 1px solid var(--ed-line2); border-radius: 12px; background: var(--ed-menu); box-shadow: var(--ed-shm); animation: ed-in 0.25s var(--ed-ease) both; }
.admin-po-context-menu[hidden] { display: none; }
.admin-po-context-menu button { width: 100%; min-height: 34px; padding: 0 10px; border-radius: 8px; background: transparent; color: var(--ed-red); font-size: 0.7813rem; text-align: left; }
.admin-po-context-menu button:hover { background: var(--ed-reds); }

/* ---------- Shopee ads ---------- */
[data-admin-dashboard][data-active-view='ad-view'] .ed-view-actions[data-ed-view-actions='ad-view'] { display: flex; }
[data-view-panel='ad-view'].is-active { display: flex; flex-direction: column; gap: 12px; }
[data-view-panel='ad-view'] .admin-panel-kicker { display: none; }
.admin-ad-view-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding: 0; background: transparent; }
.admin-ad-view-timeframes { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--ed-card); }
.admin-ad-view-timeframes > *, .admin-ad-view-timeframes button { min-height: 30px; padding: 0 12px; border-radius: 9px; background: transparent; color: var(--ed-ink2); font-size: 0.7813rem; font-weight: 500; }
.admin-ad-view-timeframes button.is-active { background: var(--ed-raise); color: var(--ed-ink); font-weight: 600; }
.admin-ad-view-custom-range { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-ad-view-custom-range label { display: inline-flex; align-items: center; gap: 6px; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-ad-view-custom-range input { min-height: 34px; }
.admin-ad-view-sync-status { height: 40px; }
.admin-ad-view-sync-status .admin-status-dot { width: 6px; height: 6px; background: var(--ed-mint); }
.admin-ad-view-workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1300px) { .admin-ad-view-workspace { grid-template-columns: minmax(0, 1fr); } }
.admin-ad-view-live-panel { padding: 16px 0 8px; }
.admin-ad-view-live-panel > .admin-panel-head { padding: 0 18px; }
.admin-ad-view-live-list { display: flex; flex-direction: column; }
.admin-ad-view-live-row { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) repeat(2, 104px) 78px; align-items: center; gap: 12px; min-height: 52px; padding: 6px 18px; border: 0; border-top: 1px solid var(--ed-line); border-radius: 0; background: transparent; color: var(--ed-ink); text-align: left; }
.admin-ad-view-live-row:hover { background: var(--ed-card2); }
.admin-ad-view-live-row.is-selected { background: var(--ed-card2); font-weight: 400; box-shadow: inset 3px 0 0 var(--ed-ink); }
.admin-ad-view-product-image { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ed-card2); overflow: hidden; color: var(--ed-ink2); font-weight: 600; }
.admin-ad-view-product-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.admin-ad-view-product-image.is-large { width: 56px; height: 56px; border-radius: 14px; }
.admin-ad-view-live-copy strong { display: block; font-size: 0.8125rem; font-weight: 600; overflow-wrap: anywhere; }
.admin-ad-view-live-copy small { display: block; color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-ad-view-live-metric, .admin-ad-view-live-roas { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.admin-ad-view-live-metric small, .admin-ad-view-live-roas small { color: var(--ed-ink3); font-size: 0.6875rem; }
.admin-ad-view-live-metric strong { font: 500 0.7813rem var(--ed-mono); }
.admin-ad-view-live-roas strong { font: 600 0.8125rem var(--ed-mono); color: var(--ed-mint); }
.admin-ad-view-credit-panel { display: flex; flex-direction: column; gap: 10px; }
.admin-ad-view-credits article { display: flex; flex-direction: column; gap: 10px; }
.admin-ad-view-credits article > div:first-child > span { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; }
.admin-ad-view-credits article > div:first-child > small { color: var(--ed-ink3); font-size: 0.75rem; }
.admin-ad-view-credit-settings { width: 28px; height: 28px; margin-left: auto; padding: 0; border-radius: 8px; background: transparent; color: var(--ed-ink3); }
.admin-ad-view-credit-settings svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.admin-ad-view-credit-breakdown { display: flex; flex-direction: column; gap: 8px; }
.admin-ad-view-credit-breakdown > span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--ed-card2); }
.admin-ad-view-credit-breakdown small { color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-ad-view-credit-breakdown strong { font: 600 0.8125rem var(--ed-mono); }
.admin-ad-view-credit-breakdown strong.is-credit-alert { color: var(--ed-red); }
.admin-ad-view-trend-panel .admin-panel-head h3 { font-size: 0.875rem; }
.admin-ad-view-kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (max-width: 1300px) { .admin-ad-view-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.admin-ad-view-kpis button { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr); grid-template-areas: 'box label' 'value value'; align-items: center; gap: 4px 6px; min-height: 64px; padding: 10px 12px; overflow: hidden; border: 1px solid var(--ed-line); border-radius: 12px; background: transparent; color: var(--ed-ink); text-align: left; font-weight: 400; }
.admin-ad-view-kpis button::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ad-metric-color, transparent); }
.admin-ad-view-kpis button:hover { background: var(--ed-card2); }
.admin-ad-view-kpis button.is-selected { border-color: var(--ed-line2); background: var(--ed-card2); font-weight: 400; }
.admin-ad-view-kpis button > i { grid-area: box; width: 13px; height: 13px; box-sizing: border-box; border: 1.5px solid var(--ed-line2); border-radius: 4px; }
.admin-ad-view-kpis button.is-selected > i { border-color: var(--ad-metric-color); background: var(--ad-metric-color); }
.admin-ad-view-kpis button > span { grid-area: label; color: var(--ed-ink2); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-ad-view-kpis button > strong { grid-area: value; font: 600 0.875rem var(--ed-mono); white-space: nowrap; }
.admin-ad-view-trend-panel .admin-chart-canvas { height: 240px; }
.admin-ad-view-detail-panel { display: flex; flex-direction: column; gap: 12px; }
.admin-ad-view-detail-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.admin-ad-view-detail-head h3 { margin: 2px 0 0; font-size: 1.0625rem; font-weight: 650; }
.admin-ad-view-detail-head p, .admin-ad-view-detail-head small { margin: 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-ad-view-live-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--ed-mint); font-size: 0.7188rem; font-weight: 600; }
.admin-ad-view-live-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.admin-ad-view-tag { display: inline-flex; height: 22px; margin: 4px 4px 0 0; padding: 0 8px; border: 1px solid var(--ed-line2); border-radius: 999px; color: var(--ed-ink2); font: 0.6875rem var(--ed-mono); line-height: 20px; }
.admin-ad-view-detail-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.admin-ad-view-detail-section-head h4 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.admin-ad-view-detail-section-head small { color: var(--ed-ink3); font-size: 0.75rem; }
.admin-ad-view-profit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.admin-ad-view-profit-grid article { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; background: var(--ed-card2); }
.admin-ad-view-profit-grid span { color: var(--ed-ink3); font-size: 0.75rem; }
.admin-ad-view-profit-grid strong { font: 600 1rem var(--ed-mono); }
.admin-ad-view-profit-grid strong.is-negative { color: var(--ed-red); }
.admin-ad-view-profit-grid small { color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-ad-view-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.admin-ad-view-insights article { position: relative; padding: 10px 12px 10px 26px; border-radius: 12px; border: 1px solid var(--ed-line); }
.admin-ad-view-insights article::before { content: ''; position: absolute; left: 12px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--ed-ink3); }
.admin-ad-view-insights article.is-good::before, .admin-ad-view-insights article.is-positive::before { background: var(--ed-mint); }
.admin-ad-view-insights article.is-warning::before, .admin-ad-view-insights article.is-warn::before { background: var(--ed-amber); }
.admin-ad-view-insights article.is-bad::before, .admin-ad-view-insights article.is-negative::before { background: var(--ed-red); }
.admin-ad-view-insights strong { font-size: 0.7813rem; font-weight: 600; }
.admin-ad-view-insights p { margin: 2px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-ad-view-direct-metrics summary { color: var(--ed-ink2); font-size: 0.7813rem; cursor: pointer; }
.admin-ad-view-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-top: 10px; }
.admin-ad-view-settings-grid span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--ed-card2); }
.admin-ad-view-settings-grid small { color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-ad-view-settings-grid strong { font-size: 0.7813rem; font-weight: 500; overflow-wrap: anywhere; }
.admin-ad-view-detail-empty { display: grid; place-items: center; gap: 4px; min-height: 140px; color: var(--ed-ink3); text-align: center; font-size: 0.7813rem; }
.admin-ad-view-detail-empty strong { color: var(--ed-ink); font-size: 0.8438rem; }
/* Compare two live ads (ShopeeAds board): title and period on the left, A and B pickers on the right,
   then six metrics in three columns, each with a grey A bar, a cyan B bar and the change */
.admin-ad-view-compare-panel { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; overflow: visible; }
.admin-ad-view-compare-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.admin-ad-view-compare-title { flex: 1 1 220px; min-width: 0; margin-right: auto; }
.admin-ad-view-compare-title h3 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.admin-ad-view-compare-title .admin-panel-meta { display: block; margin-top: 3px; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-ad-view-compare-pick { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: min(320px, 100%); height: 36px; padding: 0 10px 0 12px; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.7813rem; cursor: pointer; transition: box-shadow 0.25s, background-color 0.25s; }
.admin-ad-view-compare-pick:hover { background: var(--ed-raise); }
.admin-ad-view-compare-pick:focus-within { box-shadow: 0 0 0 1px var(--ed-ink3); }
.admin-ad-view-compare-pick > span { flex: none; color: var(--ed-ink3); }
.admin-ad-view-compare-pick select { flex: 1 1 auto; min-width: 0; width: auto; height: 100%; min-height: 0; padding: 0 18px 0 0; margin-right: -18px; border: 0; border-radius: 0; outline: 0; background: transparent; box-shadow: none; color: inherit; font: inherit; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; -webkit-appearance: none; appearance: none; cursor: pointer; }
.admin-ad-view-compare-pick select:focus-visible { outline: 0; }
.admin-ad-view-compare-pick svg { flex: none; width: 13px; height: 13px; fill: none; stroke: var(--ed-ink3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.admin-ad-view-compare-pick option { background: var(--ed-card); color: var(--ed-ink); }
.admin-ad-view-scorecard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 22px; overflow: visible; }
.admin-ad-view-scorecard > .admin-empty { grid-column: 1 / -1; margin: 0; padding: 22px 0; border-top: 1px solid var(--ed-line); text-align: center; }
.admin-ad-view-scorecard .admin-ad-score-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px 0; border-top: 1px solid var(--ed-line); }
.admin-ad-view-scorecard .admin-ad-score-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; }
.admin-ad-view-scorecard .admin-ad-score-head strong { margin: 0; font-size: 0.7813rem; font-weight: 600; }
.admin-ad-view-scorecard .admin-ad-score-delta { flex: none; align-self: auto; padding: 0; border: 0; background: none; color: var(--ed-ink3); font: 0.75rem var(--ed-mono); white-space: nowrap; }
.admin-ad-view-scorecard .admin-ad-score-delta.is-good { color: var(--ed-mint); }
.admin-ad-view-scorecard .admin-ad-score-delta.is-bad { color: var(--ed-red); }
.admin-ad-view-scorecard .admin-ad-score-line { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(84px, auto); gap: 8px; align-items: center; margin: 0; color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-ad-view-scorecard .admin-ad-score-track { display: block; height: 6px; border-radius: 9px; background: var(--ed-card2); overflow: hidden; }
.admin-ad-view-scorecard .admin-ad-score-fill { display: block; min-width: 0; height: 100%; border-radius: 9px; background: var(--ed-p0); transform-origin: left; animation: ed-ads-bar 0.7s var(--ed-ease) both; }
.admin-ad-view-scorecard .is-b .admin-ad-score-fill { background: var(--ed-p1); }
.admin-ad-view-scorecard .admin-ad-score-line b { color: var(--ed-ink2); font: 500 0.7188rem var(--ed-mono); text-align: right; white-space: nowrap; }
.admin-ad-view-scorecard .is-b b { color: var(--ed-ink); }
@keyframes ed-ads-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 1100px) { .admin-ad-view-scorecard { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .admin-ad-view-scorecard { grid-template-columns: minmax(0, 1fr); }
  .admin-ad-view-compare-pick { flex: 1 1 100%; max-width: none; }
}
.admin-ad-view-action-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-ad-view-action-form label { display: flex; flex-direction: column; gap: 6px; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-ad-view-action-form label:has(textarea), .admin-ad-view-action-form label:has([name='tags']) { grid-column: 1 / -1; }
.admin-ad-view-action-form button[type='submit'] { grid-column: 2; justify-self: end; }
[data-view-panel='ad-view'] > .admin-main-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 1100px) { [data-view-panel='ad-view'] > .admin-main-grid { grid-template-columns: minmax(0, 1fr); } }
.admin-ad-view-editor-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.admin-ad-view-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.admin-ad-view-live-header { display: grid; grid-template-columns: 36px minmax(0, 1fr) repeat(2, 104px) 78px; gap: 12px; padding: 6px 18px; color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-ad-view-live-header span:first-child { grid-column: 2; }
.admin-ad-view-live-header span:not(:first-child) { text-align: right; }
.admin-ad-view-live-metric small, .admin-ad-view-live-roas small { display: none; }
.admin-ad-view-live-roas.is-below strong { color: var(--ed-red); }
.admin-ad-view-timeframes > span, .admin-ad-view-timeframes > small, .admin-ad-view-timeframes > label { display: none; }
.admin-ad-view-profit-grid article, .admin-ad-view-profit-grid strong { text-align: left; align-items: flex-start; }
.admin-ad-view-compare-panel > summary em, .admin-ad-view-compare-panel > summary i { font-style: normal; color: var(--ed-ink2); }
@media (max-width: 760px) { .admin-ad-view-live-row, .admin-ad-view-live-header { grid-template-columns: 36px minmax(0, 1fr) 78px; } .admin-ad-view-live-metric, .admin-ad-view-live-header span:nth-child(2), .admin-ad-view-live-header span:nth-child(3) { display: none; } }
.admin-ad-view-timeframes > div { display: contents; }

/* ShopeeAds board: Live on the left of the top bar; the account picker and Sync ads on the right */
[data-ed-view-actions='ad-view'] { flex: 1 1 auto; min-width: 0; }
[data-ed-view-actions='ad-view'] > .ed-live { order: -1; margin-right: auto; }
[data-ed-view-actions='ad-view'] .ed-frame-btn svg { width: 15px; height: 15px; }
.admin-ad-view-toolbar:not(:has(> :not([hidden]))) { display: none; }
/* Live ads: the title with its count, the period control on the right */
.admin-ad-view-live-panel > .admin-panel-head { align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.admin-ad-view-live-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.admin-ad-view-live-title h3 { margin: 0; }
.admin-ad-view-live-title .admin-panel-meta { margin: 0; }
.admin-ad-view-live-panel .admin-ad-view-timeframes { margin-left: auto; background: var(--ed-card2); }
.admin-ad-view-live-panel .admin-ad-view-timeframes > .admin-toggle-pill { min-height: 28px; height: 28px; padding: 0 14px; font-size: 0.75rem; }
.admin-ad-view-live-panel .admin-ad-view-timeframes > .admin-toggle-pill.is-active { background: transparent; }
.admin-ad-view-live-roas strong { color: var(--ed-mint); }
.admin-ad-view-live-roas.is-below strong { color: var(--ed-red); }
.admin-ad-view-live-foot { margin: 0; padding: 10px 18px 2px; border-top: 1px solid var(--ed-line); color: var(--ed-ink3); font-size: 0.7188rem; }
/* Ad credit: one row per account with a bar and its alert line */
.admin-ad-view-credit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-ad-view-credit-head h3 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.admin-ad-view-credits .admin-ad-view-credit-settings { display: inline-flex; align-items: center; gap: 6px; width: auto; height: 28px; margin: 0; padding: 0 10px; border: 1px solid var(--ed-line2); border-radius: 999px; background: transparent; color: var(--ed-ink2); font-size: 0.7188rem; white-space: nowrap; }
.admin-ad-view-credits .admin-ad-view-credit-settings:hover { background: var(--ed-raise); color: var(--ed-ink); }
.admin-ad-view-credits .admin-ad-view-credit-settings svg { width: 12px; height: 12px; }
.admin-ad-view-credit-breakdown { gap: 0; }
.admin-ad-view-credit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--ed-line); }
.admin-ad-view-credit-name { min-width: 0; color: var(--ed-ink); font-size: 0.7813rem; font-weight: 500; overflow-wrap: anywhere; }
.admin-ad-view-credit-row > strong { font: 600 0.7813rem var(--ed-mono); font-variant-numeric: tabular-nums; }
.admin-ad-view-credit-row > strong.is-credit-alert { color: var(--ed-red); }
.admin-ad-view-credit-bar { position: relative; grid-column: 1 / -1; height: 4px; border-radius: 9px; background: var(--ed-card2); }
.admin-ad-view-credit-bar i { display: block; height: 100%; border-radius: 9px; background: var(--ed-ink2); transition: width 0.8s var(--ed-ease); }
.admin-ad-view-credit-row.is-alert .admin-ad-view-credit-bar i { background: var(--ed-red); }
.admin-ad-view-credit-bar b { position: absolute; top: -3px; width: 2px; height: 10px; margin-left: -1px; border-radius: 1px; background: var(--ed-ink3); }
.admin-ad-view-credit-row > small { grid-column: 1 / -1; color: var(--ed-ink3); font-size: 0.7188rem; }
.admin-ad-view-credit-row.is-alert > small { color: var(--ed-red); }
/* the selected ad: its header, metric tiles, then the chart with its own title and legend */
.admin-ad-view-trend-panel { gap: 0; }
.admin-ad-view-trend-panel > .admin-ad-view-detail-head { margin-bottom: 14px; }
.admin-ad-view-trend-panel > .admin-ad-view-detail-head:has(.admin-ad-view-detail-empty) { display: block; }
.admin-ad-view-detail-head .admin-ad-view-detail-empty { min-height: 60px; }
.admin-ad-view-detail-head p { margin: 2px 0 0; overflow-wrap: anywhere; }
.admin-ad-view-chart-head { display: flex; flex-direction: column; gap: 3px; margin: 6px 0 8px; padding-left: 4px; }
.admin-ad-view-chart-head h3 { margin: 0; font-size: 0.8438rem; font-weight: 600; }
.admin-ad-view-chart-head .admin-panel-meta { margin: 0; }
.admin-ad-view-chart-head .ed-chart-legend { margin: 6px 0 0; }
.admin-ad-view-chart-head .ed-chart-legend i.is-line { border-top-width: 2px; }
/* Profit after ads (6 tiles) beside What the numbers say */
.admin-ad-view-profit-row { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: stretch; }
@media (max-width: 1100px) { .admin-ad-view-profit-row { grid-template-columns: minmax(0, 1fr); } }
.admin-ad-view-profit-heading h3 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.admin-ad-view-profit-grid strong { font: 600 1rem var(--ed-mono); font-variant-numeric: tabular-nums; }
.admin-ad-view-profit-grid strong.is-positive { color: var(--ed-mint); }
.admin-ad-view-profit-grid article { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; }
.admin-ad-view-profit-grid article > * { align-self: flex-start; margin: 0; text-align: left; }
/* action marker form: When beside Title, as on the board */
.admin-ad-view-action-form label.admin-ad-view-field-wide:has([name='title']) { grid-column: auto; }
.admin-ad-view-insights-panel > .admin-panel-head { margin-bottom: 4px; }
.admin-ad-view-insights-panel .admin-ad-view-insights { display: flex; flex-direction: column; gap: 0; }
.admin-ad-view-insights-panel .admin-ad-view-insights article { padding: 12px 0 12px 16px; border: 0; border-top: 1px solid var(--ed-line); border-radius: 0; }
.admin-ad-view-insights-panel .admin-ad-view-insights article::before { left: 0; top: 18px; }
.admin-ad-view-insights-panel .admin-ad-view-insights strong { color: var(--ed-ink); font-size: 0.7813rem; }
.admin-ad-view-insights-panel .admin-ad-view-insights p { color: var(--ed-ink2); }
.admin-ad-view-insights article.is-danger::before { background: var(--ed-red); }
/* Live ads rows (board): 40px image, full names that wrap, 58px rows */
.admin-ad-view-live-row, .admin-ad-view-live-header { grid-template-columns: 40px minmax(0, 1fr) 96px 110px 76px; }
.admin-ad-view-live-row { flex: none; min-height: 58px; padding: 8px 18px; }
.admin-ad-view-live-list { max-height: 640px; overflow: auto; overscroll-behavior: contain; }
.admin-ad-view-live-row .admin-ad-view-product-image { width: 40px; height: 40px; }
.admin-ad-view-live-copy { min-width: 0; }
.admin-ad-view-live-copy strong { font-weight: 500; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.admin-ad-view-live-row.is-selected .admin-ad-view-live-copy strong { font-weight: 650; }
@media (max-width: 760px) { .admin-ad-view-live-row, .admin-ad-view-live-header { grid-template-columns: 40px minmax(0, 1fr) 76px; } }
/* Ad credit and Paused stack beside Live ads; Paused fills the rest of the column */
.admin-ad-view-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; align-self: stretch; }
.admin-ad-view-paused-panel { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.admin-ad-view-paused-panel[hidden] { display: none; }
.admin-ad-view-paused-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 16px 10px 18px; }
.admin-ad-view-paused-head h3 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.admin-ad-view-paused-head .admin-panel-meta { margin: 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-ad-view-paused-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 54px; padding: 8px 14px 8px 18px; border-top: 1px solid var(--ed-line); color: var(--ed-ink2); }
.admin-ad-view-product-image.is-paused { width: 34px; height: 34px; border-radius: 9px; opacity: 0.6; }
.admin-ad-view-paused-copy { min-width: 0; }
.admin-ad-view-paused-copy > span { display: block; font-size: 0.8125rem; overflow-wrap: anywhere; }
.admin-ad-view-paused-copy > small { display: block; color: var(--ed-ink3); font-size: 0.7188rem; overflow-wrap: anywhere; }
.admin-ad-view-paused-resume { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.75rem; text-decoration: none; transition: background-color 0.25s, transform 0.35s var(--ed-ease); }
.admin-ad-view-paused-resume:hover { background: var(--ed-raise); color: var(--ed-ink); }
.admin-ad-view-paused-resume:active { transform: scale(0.97); }
.admin-ad-view-paused-more { margin: 0; padding: 10px 18px 12px; border-top: 1px solid var(--ed-line); color: var(--ed-ink3); font-size: 0.75rem; }
/* metric tiles (board): a 3px top edge in the line's colour, the change against the prior period */
.admin-ad-view-kpis button { grid-template-areas: 'box label' 'value value' 'change change'; align-content: start; gap: 4px 6px; padding: 9px 12px 11px; border-radius: 13px; transition: transform 0.4s var(--ed-ease), border-color 0.3s, background-color 0.3s; }
.admin-ad-view-kpis button::before { height: 3px; }
.admin-ad-view-kpis button:hover { transform: translateY(-2px); }
.admin-ad-view-kpis button.is-selected { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 18px -10px rgba(0, 0, 0, 0.85); }
:root[data-admin-theme='light'] .admin-ad-view-kpis button.is-selected { box-shadow: 0 1px 2px rgba(24, 20, 34, 0.06), 0 8px 20px -12px rgba(24, 20, 34, 0.25); }
.admin-ad-view-kpis button > i { border-color: var(--ed-ink3); }
.admin-ad-view-kpis button > small { grid-area: change; min-height: 1.3em; color: var(--ed-ink3); font-size: 0.6875rem; white-space: nowrap; }
.admin-ad-view-kpis button > small[data-tone='up'] { color: var(--ed-mint); }
.admin-ad-view-kpis button > small[data-tone='down'] { color: var(--ed-red); }
/* Campaign setup and SKU mapping: a full-width row with a chevron, then five plain label/value pairs */
.admin-ad-view-setup { border-top: 1px solid var(--ed-line); }
.admin-ad-view-setup-toggle { display: flex; align-items: center; justify-content: space-between; width: calc(100% + 16px); height: 42px; min-height: 42px; margin: 4px -8px 0; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ed-ink); font-size: 0.8125rem; font-weight: 500; transition: background-color 0.2s; }
.admin-ad-view-setup-toggle:hover { background: var(--ed-card2); }
.admin-ad-view-setup-toggle svg { width: 15px; height: 15px; fill: none; stroke: var(--ed-ink3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ed-ease); }
.admin-ad-view-setup-toggle[aria-expanded='true'] svg { transform: rotate(180deg); }
.admin-ad-view-setup .admin-ad-view-settings-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding-top: 6px; animation: ed-in 0.35s var(--ed-ease) both; }
.admin-ad-view-setup .admin-ad-view-settings-grid[hidden] { display: none; }
.admin-ad-view-setup .admin-ad-view-settings-grid span { gap: 2px; padding: 0; border-radius: 0; background: transparent; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-ad-view-setup .admin-ad-view-settings-grid small { color: var(--ed-ink3); font-size: 0.75rem; }
.admin-ad-view-setup .admin-ad-view-settings-grid strong { color: var(--ed-ink); font: 500 0.7813rem var(--ed-mono); overflow-wrap: anywhere; }
@media (max-width: 760px) { .admin-ad-view-setup .admin-ad-view-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[data-view-panel='ad-view'] > .admin-main-grid { align-items: stretch; }
/* Actions in this period (board): date on the left, title, what followed, tags */
.admin-ad-view-events-panel > .admin-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.admin-ad-view-events-panel > .admin-panel-head .admin-panel-meta { min-width: 0; color: var(--ed-ink3); font-size: 0.75rem; text-align: right; overflow-wrap: anywhere; }
.admin-ad-view-events-panel .admin-event-feed { display: flex; flex-direction: column; gap: 0; }
.admin-ad-view-event { position: relative; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border: 0; border-top: 1px solid var(--ed-line); border-radius: 0; background: transparent; font-size: 0.7813rem; }
.admin-ad-view-event-date { color: var(--ed-ink3); font-family: var(--ed-mono); white-space: nowrap; }
.admin-ad-view-event-body { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.admin-ad-view-event-body > strong { font-weight: 600; }
.admin-ad-view-event-body > span:not(.admin-ad-view-event-tags) { color: var(--ed-ink2); }
.admin-ad-view-event-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.admin-ad-view-event-tags .admin-ad-view-tag { height: 20px; margin: 0; padding: 0 7px; border: 0; border-radius: 6px; background: var(--ed-card2); color: var(--ed-ink2); font: 0.6875rem/20px var(--ed-mono); }
.admin-ad-view-event-delete { width: 28px; height: 28px; min-height: 28px; padding: 0; border-radius: 8px; background: transparent; color: var(--ed-ink3); opacity: 0; transition: opacity 0.2s, background-color 0.2s; }
.admin-ad-view-event:hover .admin-ad-view-event-delete, .admin-ad-view-event-delete:focus-visible { opacity: 1; }
.admin-ad-view-event-delete:hover { background: var(--ed-raise); color: var(--ed-ink); }
@media (hover: none) { .admin-ad-view-event-delete { opacity: 1; } }
.admin-ad-view-profit-heading { flex-wrap: wrap; row-gap: 3px; }
@media (max-width: 1024px) and (pointer: coarse) {
  .admin-ad-view-paused-resume, .admin-ad-view-compare-pick { height: 44px; min-height: 44px; }
  .admin-ad-view-event-delete { width: 44px; }
}
@media (max-width: 560px) {
  .admin-ad-view-profit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-ad-view-action-form { grid-template-columns: minmax(0, 1fr); }
  .admin-ad-view-action-form label, .admin-ad-view-action-form label.admin-ad-view-field-wide:has([name='title']) { grid-column: 1 / -1; }
  .admin-ad-view-action-form button[type='submit'] { grid-column: 1 / -1; justify-self: stretch; }
  .admin-ad-view-events-panel > .admin-panel-head { flex-direction: column; align-items: flex-start; gap: 3px; }
  .admin-ad-view-events-panel > .admin-panel-head .admin-panel-meta { text-align: left; }
  .admin-ad-view-event { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; }
}
/* ShopeeAds board, measured against the build: 12-column spans (8+4, 7+5) with 12px gutters, the
   cards 12px apart, and each card's own spacing and type */
@media (min-width: 1301px) { .admin-ad-view-workspace { grid-template-columns: minmax(0, calc((100% - 132px) / 12 * 8 + 84px)) minmax(0, 1fr); } }
@media (min-width: 1101px) {
  .admin-ad-view-profit-row, [data-view-panel='ad-view'] > .admin-main-grid { grid-template-columns: minmax(0, calc((100% - 132px) / 12 * 7 + 72px)) minmax(0, 1fr); }
}
[data-view-panel='ad-view'] > .admin-main-grid, [data-view-panel='ad-view'] > .admin-ad-view-compare-panel { margin: 0; }
.admin-ad-view-live-panel { padding-top: 0; }
.admin-ad-view-live-panel > .admin-panel-head { padding: 12px 14px 10px 18px; margin: 0; }
.admin-ad-view-live-panel .admin-ad-view-timeframes { margin: 0 0 0 auto; border-radius: 11px; }
.admin-ad-view-live-panel .admin-ad-view-timeframes > .admin-toggle-pill { width: 64px; padding: 0; justify-content: center; border-radius: 8px; }
.admin-ad-view-live-metric strong { font-weight: 400; }
.admin-ad-view-credit-panel { padding: 14px 16px 12px 18px; }
.admin-ad-view-credits article { gap: 4px; padding: 0; }
.admin-ad-view-credit-head { margin-bottom: 6px; }
.admin-ad-view-credits .admin-ad-view-credit-settings { gap: 6px; padding: 0 9px; border: 0; border-radius: 8px; background: var(--ed-card2); color: var(--ed-ink2); font-size: 0.75rem; }
.admin-ad-view-credits .admin-ad-view-credit-settings svg { width: 13px; height: 13px; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-ad-view-credit-row { padding: 10px 0; }
.admin-ad-view-credit-name { font-size: 0.8125rem; }
.admin-ad-view-credit-row > strong { font-size: 0.8438rem; }
.admin-ad-view-credit-bar { height: 5px; overflow: hidden; }
.admin-ad-view-credit-bar b { top: 0; height: 100%; margin-left: -1px; border-radius: 0; }
.admin-ad-view-credit-row > small { font-size: 0.75rem; }
.admin-ad-view-product-image.is-large { width: 64px; height: 64px; }
.admin-ad-view-live-badge { display: flex; padding: 0; font-size: 0.75rem; font-weight: 400; line-height: 1.4; }
.admin-ad-view-detail-head h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
.admin-ad-view-detail-head p { font-size: 0.7813rem; }
.admin-ad-view-detail-head > .admin-soft-btn { height: 36px; min-height: 36px; padding: 0 13px; border: 0; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.7813rem; font-weight: 500; }
.admin-ad-view-detail-head > .admin-soft-btn:hover { background: var(--ed-raise); }
.admin-ad-view-kpis { margin: 0; }
.admin-ad-view-kpis button > span { font-size: 0.7188rem; }
.admin-ad-view-kpis button > i { width: 12px; height: 12px; }
.admin-ad-view-kpis button > strong { line-height: 1.4; }
.admin-ad-view-chart-head { gap: 3px; margin: 30px 0 0; padding-left: 18px; }
.admin-ad-view-chart-head h3 { font-size: 0.875rem; }
.admin-ad-view-chart-head .ed-chart-legend { margin: 7px 0 0; }
.admin-ad-view-trend-panel > .admin-chart-surface { margin-top: -4px; }
.admin-ad-view-trend-panel .admin-chart-canvas { height: 186px; }
.admin-ad-view-trend-panel { padding-bottom: 34px; }
.admin-ad-view-profit-grid article { min-height: 0; padding: 12px; border-radius: 13px; }
.admin-ad-view-profit-grid span { color: var(--ed-ink2); }
.admin-ad-view-insights-panel > .admin-panel-head { margin-bottom: 12px; }
.admin-ad-view-insights-panel .admin-ad-view-insights article { padding: 10px 0 10px 18px; }
.admin-ad-view-insights-panel .admin-ad-view-insights article::before { top: 16px; width: 7px; height: 7px; }
.admin-ad-view-insights-panel .admin-ad-view-insights strong { display: block; font-size: 0.8125rem; }
.admin-ad-view-insights-panel .admin-ad-view-insights p { margin: 0; font-size: 0.7813rem; }
.admin-ad-view-events-panel { align-content: start; }
.admin-ad-view-events-panel > .admin-panel-head { margin-bottom: 10px; }
.admin-ad-view-events-panel .admin-event-feed { justify-content: flex-start; }
.admin-ad-view-events-panel .admin-event-feed::before { content: none; }
.admin-ad-view-action-panel { align-content: start; }
.admin-ad-view-action-panel > .admin-panel-head { margin-bottom: 14px; }
.admin-ad-view-action-panel > .admin-panel-head .admin-panel-meta { line-height: 1.4; }
.admin-ad-view-action-form { gap: 12px; }
.admin-ad-view-action-form button[type='submit'] { height: 40px; min-height: 40px; }

/* ---------- Appearance & preferences ---------- */
/* device IDs wrap on narrow phones instead of ending in "…" */
.admin-view-settings code { min-width: 0; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.admin-view-settings .admin-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.admin-view-settings .admin-settings-grid { align-items: stretch; }
.admin-view-settings .admin-settings-grid > * { grid-area: auto !important; margin: 0; width: auto; max-width: none; }
/* the sidebar footer already has "Lock dashboard" */
.admin-view-settings .admin-settings-lock-zone { display: none; }
@media (max-width: 1100px) { .admin-view-settings .admin-settings-grid { grid-template-columns: minmax(0, 1fr); } }
.admin-settings-card { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.admin-settings-card-head { margin: 0; }
.admin-settings-card-head .admin-panel-kicker { display: none; }
.admin-theme-options { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 !important; background: transparent !important; }
.admin-theme-options > button { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; min-height: 0; height: auto; padding: 10px 10px 10px 34px; border: 1px solid var(--ed-line); border-radius: 14px; background: transparent; color: var(--ed-ink); font-size: 0.7813rem; font-weight: 500; text-align: left; }
.admin-theme-options > button::before { content: ''; order: -1; width: calc(100% + 24px); margin-left: -24px; height: 48px; border-radius: 9px; background: linear-gradient(90deg, #0b0b0b 0 26%, #141414 26% 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.admin-theme-options > button[data-admin-theme-option='light']::before, .admin-theme-options > button:nth-child(2)::before { background: linear-gradient(90deg, #262626 0 26%, #f2f2f2 26% 100%); }
.admin-theme-options > button[data-admin-theme-option='system']::before, .admin-theme-options > button:nth-child(3)::before { background: linear-gradient(90deg, #0b0b0b 0 26%, #141414 26% 63%, #f2f2f2 63% 100%); }
.admin-theme-options > button::after { content: ''; position: absolute; left: 12px; bottom: 12px; width: 14px; height: 14px; box-sizing: border-box; border: 1.5px solid var(--ed-line2); border-radius: 50%; }
.admin-theme-options > button.is-active, .admin-theme-options > button[aria-pressed='true'] { border-color: var(--ed-ink3); background: var(--ed-card2); }
.admin-theme-options > button.is-active::after, .admin-theme-options > button[aria-pressed='true']::after { border-color: var(--ed-ink); box-shadow: inset 0 0 0 3px var(--ed-card2), inset 0 0 0 7px var(--ed-ink); }
.admin-regional-preview { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 0; background: transparent; font: 0.75rem var(--ed-mono); color: var(--ed-ink2); }
.admin-regional-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-regional-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-device-current { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--ed-card2); }
.admin-device-current-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 0.7813rem; }
.admin-device-current-main code, .admin-device-current-main strong { font: 0.7188rem var(--ed-mono); color: var(--ed-ink3); overflow-wrap: anywhere; }
.admin-device-current-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-device-manual-entry summary { color: var(--ed-ink2); font-size: 0.7813rem; cursor: pointer; }
.admin-settings-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.admin-settings-form input { flex: 1 1 200px; }
.admin-settings-device-list-head { color: var(--ed-ink3); font-size: 0.75rem; }
.admin-settings-chip-row { display: flex; flex-direction: column; gap: 4px; }
.admin-settings-lock-zone { display: flex; justify-content: flex-end; }
.admin-marketplace-auth-list { display: flex; flex-direction: column; }
.admin-marketplace-auth-list > * { padding: 10px 0; border-top: 1px solid var(--ed-line); }
.admin-marketplace-auth-notice { padding: 10px 12px; border: 1px solid var(--ed-line2); border-radius: 12px; color: var(--ed-ink2); font-size: 0.7813rem; }
/* destination cards read like the others: title, one line, then the way out */
.admin-settings-destination-card { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; }
.admin-settings-destination-icon, .admin-settings-destination-copy .admin-panel-kicker { display: none !important; }
.admin-settings-destination-copy { display: block; }
.admin-view-settings .admin-destination-button { align-self: flex-start; width: auto; }
.admin-settings-destination-copy p { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-marketplace-auth-dialog-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.admin-marketplace-auth-dialog-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ed-card2); }
.admin-marketplace-auth-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Website order activation (WebsiteActivation board) ----------
   Big Set (8 columns) beside the Branch lock (4); Readiness (8) beside the Activation record (4).
   The switch is a 200 x 92 track whose knob slides 107px; it is the only control that turns it on. */
.ed-act.is-active { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; align-items: stretch; align-content: start; }
.ed-act > * { min-width: 0; margin: 0; }
.ed-act-card { display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; min-width: 0; padding: 16px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.ed-act-card h2 { margin: 0; font-size: 0.875rem; font-weight: 600; letter-spacing: normal; }
.ed-act-card h2 + p, .ed-act-card > div > p { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-act-hero { grid-column: span 8; display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 22px; align-items: center; padding: 22px 24px; }
.ed-act-lock, .ed-act-audit { grid-column: span 4; }
.ed-act-ready { grid-column: span 8; }
.ed-act-hero-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ed-act-state { color: var(--ed-ink); font-size: 2.125rem; font-weight: 650; letter-spacing: -0.025em; line-height: 1.1; transition: color 0.4s; }
.ed-act-state[data-tone='mint'] { color: var(--ed-mint); }
.ed-act-state[data-tone='amber'] { color: var(--ed-amber); }
.ed-act-explain { max-width: 520px; margin: 0; color: var(--ed-ink2); font-size: 0.8125rem; }
.ed-act-switch-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ed-act-switch { position: relative; flex: none; width: 200px; height: 92px; min-height: 92px; padding: 0; border: 1.5px solid var(--ed-line2); border-radius: 999px; background: var(--ed-card2); transition: border-color 0.4s, opacity 0.3s; }
.ed-act-switch:hover { background: var(--ed-card2); }
.ed-act-switch:active { transform: none; }
.ed-act-switch:disabled { opacity: 0.6; }
.ed-act-switch.is-on { border-color: var(--ed-mint); }
.ed-act-switch.is-on.is-paused { border-color: var(--ed-amber); }
.ed-act-knob { position: absolute; top: 9px; left: 10px; display: grid; place-items: center; width: 71px; height: 71px; border-radius: 50%; background: var(--ed-raise); color: var(--ed-ink3); transition: transform 0.6s cubic-bezier(0.34, 1.3, 0.64, 1), background-color 0.4s, color 0.4s; }
.ed-act-knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-act-switch.is-on .ed-act-knob { transform: translateX(107px); background: var(--ed-ink); color: var(--ed-card); }
.ed-act-switch:not(:disabled):hover .ed-act-knob { transform: scale(1.04); }
.ed-act-switch.is-on:not(:disabled):hover .ed-act-knob { transform: translateX(107px) scale(1.04); }
.ed-act-note { color: var(--ed-ink3); font-size: 0.75rem; text-align: center; overflow-wrap: anywhere; }
.ed-act-note.is-error { color: var(--ed-red); }
.ed-act-lock-head { display: flex; align-items: flex-start; gap: 12px; }
.ed-act-lock-head > div { min-width: 0; }
.ed-act-lock-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--ed-card2); color: var(--ed-ink); }
.ed-act-lock-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-act-lock-form { display: flex; flex: 1; flex-direction: column; gap: 12px; }
.ed-act-lock-form[hidden] { display: none; }
.ed-act-lock-form input { width: 100%; height: 40px; font-size: 0.8125rem; }
.ed-act-primary, .ed-act-secondary { width: 100%; height: 40px; min-height: 40px; margin-top: auto; padding: 0 14px; border: 0; border-radius: 11px; font-size: 0.8125rem; }
.ed-act-primary { background: var(--ed-ink); color: var(--ed-card); font-weight: 600; transition: opacity 0.25s, transform 0.35s var(--ed-ease); }
.ed-act-primary:hover { background: var(--ed-ink); opacity: 0.88; }
.ed-act-secondary { background: var(--ed-card2); color: var(--ed-ink); font-weight: 500; }
.ed-act-secondary:hover { background: var(--ed-raise); }
.ed-act-signed { display: flex; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 12px; background: var(--ed-card2); color: var(--ed-ink3); font-size: 0.7813rem; animation: ed-act-in 0.35s var(--ed-ease) both; }
.ed-act-signed[hidden] { display: none; }
.ed-act-signed b { min-width: 0; color: var(--ed-ink); font-family: var(--ed-mono); font-weight: 500; overflow-wrap: anywhere; text-align: right; }
@keyframes ed-act-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ed-act-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ed-act-ready-line { display: flex; align-items: center; gap: 6px; color: var(--ed-ink3) !important; }
.ed-act-ready-line > i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ed-act-ready-line.is-good { color: var(--ed-mint) !important; }
.ed-act-ready-line.is-bad { color: var(--ed-red) !important; }
.ed-act-btn { display: inline-flex; flex: none; align-items: center; gap: 7px; height: 34px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.7813rem; font-weight: 500; }
.ed-act-btn:hover { background: var(--ed-raise); }
.ed-act-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-act-btn.is-busy svg { animation: ed-spin 0.9s linear infinite; }
.ed-act-btn:disabled { opacity: 1; }
.ed-act-ready-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.ed-act-ready-grid > .admin-empty, .ed-act-ready-grid > .ed-error { grid-column: 1 / -1; }
.ed-act-col { display: flex; flex-direction: column; min-width: 0; }
.ed-act-set { display: flex; flex-direction: column; min-width: 0; }
.ed-act-set-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 0 6px; }
.ed-act-set-head > span:first-child { color: var(--ed-ink2); font-size: 0.75rem; font-weight: 600; }
.ed-act-set-head > span:last-child { font-size: 0.7188rem; }
.ed-act-set-head > .is-good { color: var(--ed-mint); }
.ed-act-set-head > .is-bad { color: var(--ed-red); }
.ed-act-check { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-top: 1px solid var(--ed-line); font-size: 0.7813rem; }
.ed-act-check > svg { width: 15px; height: 15px; margin-top: 1px; fill: none; stroke: var(--ed-mint); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ed-act-check.is-bad > svg { stroke: var(--ed-red); }
.ed-act-check > span { min-width: 0; }
.ed-act-check small { display: block; color: var(--ed-ink3); font-size: 0.75rem; overflow-wrap: anywhere; }
.ed-act-check.is-bad small { color: var(--ed-red); }
.ed-act-audit { gap: 10px; }
.ed-act-events { display: flex; flex-direction: column; }
.ed-act-event { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--ed-line); font-size: 0.7813rem; animation: ed-act-in 0.35s var(--ed-ease) both; }
.ed-act-event > i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--ed-ink3); }
.ed-act-event[data-tone='ink'] > i { background: var(--ed-ink); }
.ed-act-event[data-tone='mint'] > i { background: var(--ed-mint); }
.ed-act-event[data-tone='amber'] > i { background: var(--ed-amber); }
.ed-act-event[data-tone='cyan'] > i { background: var(--ed-cyan); }
.ed-act-event > span { min-width: 0; }
.ed-act-event small { display: block; color: var(--ed-ink3); font-family: var(--ed-mono); font-size: 0.7188rem; overflow-wrap: anywhere; }
.ed-act-none { margin: 0; padding: 18px 12px; border: 1px dashed var(--ed-line2); border-radius: 12px; color: var(--ed-ink3); font-size: 0.7813rem; text-align: center; }
/* the Big Set state beside the page title (the board's top-bar tag) */
.ed-title-tag { display: inline-flex; flex: none; align-items: center; gap: 6px; box-sizing: content-box; height: 24px; padding: 0 9px; border: 1px solid var(--ed-line2); border-radius: 999px; color: var(--ed-ink2); font-size: 0.7188rem; font-weight: 600; white-space: nowrap; }
.ed-title-tag[hidden] { display: none; }
.ed-title-tag > i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ed-title-tag[data-tone='mint'] { border-color: var(--ed-mint); color: var(--ed-mint); }
.ed-title-tag[data-tone='amber'] { border-color: var(--ed-amber); color: var(--ed-amber); }
[data-admin-dashboard][data-active-view='hard-set'] .ed-view-actions[data-ed-view-actions='hard-set'] { display: flex; flex: 1 1 auto; justify-content: flex-start; min-width: 0; }
/* the confirmation before the permanent switch */
dialog.ed-act-confirm { width: min(470px, calc(100vw - 24px)); padding: 0; }
.ed-act-confirm form { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 20px 22px; }
.ed-act-confirm form > * { margin: 0; }
.ed-act-confirm form > [hidden] { display: none; }
.ed-act-confirm-head { display: flex; align-items: flex-start; gap: 12px; }
.ed-act-confirm-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; box-sizing: border-box; border: 1px solid var(--ed-redl); border-radius: 12px; color: var(--ed-red); }
.ed-act-confirm-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ed-act-confirm h2 { margin: 0; font-size: 1rem; font-weight: 650; }
.ed-act-confirm-head p { margin: 5px 0 0; color: var(--ed-ink2); font-size: 0.8125rem; }
.ed-act-confirm-field { display: flex; flex-direction: column; gap: 6px; color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-act-confirm-field b { color: var(--ed-ink); font-family: var(--ed-mono); font-weight: 600; }
.ed-act-confirm-field input { width: 100%; font-family: var(--ed-mono); font-size: 0.8125rem; letter-spacing: 0.04em; }
.ed-act-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ed-act-confirm-actions > button { width: auto; height: 38px; min-height: 38px; margin: 0; }
.ed-act-danger { padding: 0 14px; border: 1px solid rgba(255, 107, 129, 0.5); border-radius: 11px; background: transparent; color: var(--ed-red); font-size: 0.8125rem; font-weight: 650; }
.ed-act-danger:hover { background: rgba(255, 107, 129, 0.08); }
@media (max-width: 1100px) {
  .ed-act-hero, .ed-act-ready { grid-column: span 12; }
  .ed-act-lock, .ed-act-audit { grid-column: span 12; }
}
@media (max-width: 860px) { .ed-act-ready-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .ed-act-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px; }
  .ed-act-state { font-size: 1.875rem; }
  .ed-act-card-head { flex-wrap: wrap; }
}
@media (max-width: 1024px) and (pointer: coarse) { .ed-act-btn { min-height: 44px !important; } .ed-act-switch { min-height: 92px !important; } }
@media (prefers-reduced-motion: reduce) { .ed-act-knob, .ed-act-event, .ed-act-signed { transition: none; animation: none; } }

/* ---------- Store operations ---------- */
.admin-store-ops-layout.is-active { display: flex; flex-direction: column; gap: 12px; }
.admin-store-ops-layout .admin-panel-kicker { display: none; }
.admin-metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
@media (max-width: 767px) { .admin-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .admin-metric-grid > * { min-width: 0; } }
.admin-metric-card { display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 15px 18px 14px; }
.admin-metric-card > span:first-child, .admin-metric-card h3, .admin-metric-card .admin-metric-label { margin: 0; color: var(--ed-ink2); font-size: 0.7813rem; font-weight: 400; }
.admin-metric-card strong { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.admin-metric-card small, .admin-metric-card p { margin: auto 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-store-ops-filter-panel .admin-panel-head { align-items: center; }
.admin-store-ops-heading-actions { display: flex; gap: 6px; }
.admin-store-ops-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.admin-store-ops-filter-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-store-ops-employee-picker summary { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.8125rem; cursor: pointer; list-style: none; }
.admin-store-ops-employee-picker summary::-webkit-details-marker { display: none; }
/* Fulfillment board (Form select): the employee picker reads "Everyone" with a chevron */
.admin-store-ops-employee-picker summary { gap: 8px; }
.admin-store-ops-employee-picker summary::after { content: ''; flex: none; width: 14px; height: 14px; margin-left: auto; background: var(--ed-ink3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E") center / 14px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E") center / 14px no-repeat; }
.admin-store-ops-filter-grid input[type='date']::-webkit-calendar-picker-indicator { opacity: 1; }
.admin-store-ops-status-controls { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.admin-store-ops-status-controls button { height: 30px; min-height: 30px; padding: 0 11px; border: 1px solid var(--ed-line); border-radius: 999px; background: transparent; color: var(--ed-ink2); font-size: 0.75rem; font-weight: 500; transition: background-color 0.25s, border-color 0.25s, color 0.25s; }
.admin-store-ops-status-controls button.is-active, .admin-store-ops-status-controls button[aria-pressed='true'] { border-color: var(--ed-ink3); background: var(--ed-card2); color: var(--ed-ink); font-weight: 500; }
.admin-store-ops-filter-actions { display: flex; justify-content: flex-end; gap: 6px; grid-column: 1 / -1; }
.admin-store-ops-table td, .admin-store-ops-table th { white-space: nowrap; }
.admin-store-ops-table td:first-child { font: 0.75rem var(--ed-mono); }
/* (Fulfillment board) KPI cards, the hourly bars beside throughput by person, the filter form and the log */
[data-admin-dashboard][data-active-view='store-ops'] .ed-view-actions[data-ed-view-actions='store-ops'] { display: flex; }
.ed-ops-kpis .ed-kpi.is-warn { border-color: rgba(255, 181, 71, 0.32); }
:root[data-admin-theme='light'] .ed-ops-kpis .ed-kpi.is-warn { border-color: rgba(168, 100, 0, 0.32); }
.ed-ops-kpis .ed-kpi.is-warn .ed-stock-kpi-dot { display: block; background: var(--ed-amber); }
.ed-ops-charts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 12px; }
.ed-ops-card { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.ed-ops-card h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.ed-ops-card > p { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-ops-hourly-chart { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 6px; height: 186px; margin-top: 14px; }
.ed-ops-axis { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 20px; color: var(--ed-ink3); font: 400 0.6875rem var(--ed-mono); text-align: right; }
.ed-ops-axis span { line-height: 1; transform: translateY(-50%); }
.ed-ops-axis span:last-child { transform: translateY(50%); }
.ed-ops-plot { display: flex; flex-direction: column; min-width: 0; }
.ed-ops-bars { position: relative; flex: 1; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); align-items: end; gap: 4px; border-bottom: 1px solid var(--ed-line); background: linear-gradient(var(--ed-grid), var(--ed-grid)) 0 50% / 100% 1px no-repeat, linear-gradient(var(--ed-grid), var(--ed-grid)) 0 0 / 100% 1px no-repeat; }
.ed-ops-bar { position: relative; display: flex; align-items: flex-end; height: 100%; outline: none; }
.ed-ops-bar > i { display: block; width: 100%; height: var(--h); min-height: 0; border-radius: 3px 3px 0 0; background: var(--ed-ink); transform-origin: bottom; animation: ed-stock-grow 0.6s var(--ed-ease) var(--ed-ops-delay, 0s) both; transition: opacity 0.2s; }
.ed-ops-bar.is-now > i { box-sizing: border-box; border: 1.5px solid var(--ed-ink); background: transparent; }
.ed-ops-bar.is-ahead > i { background: var(--ed-raise); }
.ed-ops-bars:hover .ed-ops-bar > i { opacity: 0.45; }
.ed-ops-bars .ed-ops-bar:hover > i, .ed-ops-bar:focus-visible > i { opacity: 1; }
.ed-ops-bar > em { position: absolute; bottom: calc(var(--h) + 6px); left: 50%; z-index: 2; padding: 4px 7px; border-radius: 7px; background: var(--ed-toast); box-shadow: var(--ed-tipsh); color: var(--ed-ink); font: normal 500 0.6875rem var(--ed-mono); white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 4px); transition: opacity 0.2s, transform 0.3s var(--ed-ease), visibility 0.2s; }
.ed-ops-bar:nth-child(n+20) > em { left: auto; right: 0; transform: translate(0, 4px); }
.ed-ops-bar:nth-child(-n+4) > em { left: 0; transform: translate(0, 4px); }
.ed-ops-bar:hover > em, .ed-ops-bar:focus-visible > em { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.ed-ops-bar:nth-child(n+20):hover > em, .ed-ops-bar:nth-child(n+20):focus-visible > em, .ed-ops-bar:nth-child(-n+4):hover > em, .ed-ops-bar:nth-child(-n+4):focus-visible > em { transform: none; }
.ed-ops-hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; height: 20px; color: var(--ed-ink3); font: 400 0.6875rem var(--ed-mono); line-height: 20px; }
.ed-ops-hours span { overflow: visible; white-space: nowrap; }
.ed-ops-people-list { display: flex; flex-direction: column; gap: 9px; margin: 14px 0 0; padding: 0; list-style: none; }
.ed-ops-people-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; align-items: center; gap: 10px; font-size: 0.7813rem; animation: ed-in 0.4s var(--ed-ease) var(--ed-ops-delay, 0s) both; }
.ed-ops-people-list li.is-empty { display: block; color: var(--ed-ink3); }
/* Chart board (rank): one line per name, a long name ends in an ellipsis with the full name as its tooltip */
.ed-ops-people-list li > span { overflow: hidden; color: var(--ed-ink2); white-space: nowrap; text-overflow: ellipsis; }
.ed-ops-people-list li > i { display: block; height: 6px; border-radius: 9px; background: var(--ed-card2); overflow: hidden; }
.ed-ops-people-list li > i > b { display: block; height: 100%; border-radius: 9px; background: var(--ed-stock-s2, #8c8c8c); transform-origin: left; animation: ed-stock-bar 0.7s var(--ed-ease) both; }
.ed-ops-people-list li > i > b.is-top { background: var(--ed-ink); }
.ed-ops-people-list li > strong { font: 400 0.75rem var(--ed-mono); text-align: right; }
.ed-ops-card > .ed-ops-people-foot { margin: 12px 0 0; padding-top: 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-store-ops-layout { --ed-stock-s2: #b8b8b8; }
:root[data-admin-theme='light'] .admin-store-ops-layout { --ed-stock-s2: #4f4f4f; }
.admin-store-ops-filter-panel { padding: 16px 18px 18px; }
.admin-store-ops-filter-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.admin-store-ops-filter-grid > label:nth-of-type(4) { grid-column: span 2; }
.admin-store-ops-filter-grid label > span, .admin-store-ops-employee-field > span { color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-store-ops-employee-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.admin-store-ops-status-controls { align-items: center; grid-column: 1 / -1; }
.admin-store-ops-status-controls > span { flex-basis: 100%; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-store-ops-filter-actions { margin-top: 4px; }
.admin-store-ops-filter-actions .admin-primary-btn, .admin-store-ops-filter-actions .admin-ghost-btn { min-height: 40px; padding: 0 18px; }
.admin-store-ops-layout > .admin-panel-wide:last-of-type { padding: 0; overflow: hidden; }
.admin-store-ops-layout > .admin-panel-wide:last-of-type > .admin-panel-head { margin: 0; padding: 14px 18px 12px; }
.admin-store-ops-layout > .admin-panel-wide:last-of-type > .admin-panel-head h3 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.admin-store-ops-table-wrap { margin: 0; padding: 0; border-top: 1px solid var(--ed-line); border-radius: 0; }
.admin-store-ops-layout > .admin-panel-wide:last-of-type > .admin-panel-head + .admin-store-ops-table-wrap { margin-top: 0; }
.admin-store-ops-table th:first-child, .admin-store-ops-table td:first-child { padding-left: 18px; }
.admin-store-ops-table th:last-child, .admin-store-ops-table td:last-child { padding-right: 18px; }
.admin-store-ops-table th.is-num, .admin-store-ops-table td.is-num { text-align: right; }
.admin-store-ops-table tbody tr { cursor: pointer; }
.admin-store-ops-table tbody tr:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: -2px; }
.ed-ops-order { color: var(--ed-ink); font: 400 0.75rem var(--ed-mono); text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }
.ed-ops-channel { font-size: 0.7813rem; }
.ed-ops-channel i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 2.5px; vertical-align: 0; }
.ed-ops-time { font: 400 0.75rem var(--ed-mono) !important; }
.ed-ops-foot .ed-ops-status { color: var(--ed-ink3); }
@media (max-width: 1100px) { .ed-ops-charts { grid-template-columns: minmax(0, 1fr); } .admin-store-ops-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-store-ops-filter-grid > label:nth-of-type(4) { grid-column: 1 / -1; } }
@media (max-width: 767px) {
  [data-admin-dashboard][data-active-view='store-ops'] .ed-view-actions[data-ed-view-actions='store-ops'] { display: none; }
  .ed-ops-hourly-chart { height: 150px; }
  .ed-ops-bars, .ed-ops-hours { gap: 2px; }
}
.admin-store-ops-drawer-card { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(460px, calc(100vw - 20px)); overflow: auto; border-radius: 22px; animation: ed-drawer 0.5s var(--ed-ease) both; }

/* ---------- Shipment arrangements ---------- */
.admin-shipment-arrangement.is-active { display: flex; flex-direction: column; gap: 12px; }
.admin-shipment-arrangement .admin-panel-kicker { display: none; }
.admin-arrangement-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 0; background: transparent; }
.admin-arrangement-hero h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.admin-arrangement-hero p { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-arrangement-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-arrangement-workspace { display: flex; flex-direction: column; gap: 12px; }
.shipment-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.shipment-metrics > * { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 96px; padding: 14px 18px; border: 1px solid transparent; border-radius: var(--ed-r-card); background: var(--ed-card); color: var(--ed-ink); text-align: left; }
.shipment-metrics > *:hover { background: var(--ed-card); border-color: var(--ed-line2); }
.shipment-metrics > .is-active, .shipment-metrics > [aria-pressed='true'] { border-color: var(--ed-ink3); background: var(--ed-card); }
.shipment-metrics strong { font-size: 1.625rem; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
/* "Needs attention" keeps its warning colour, as text only */
.shipment-metrics > .is-red strong { color: var(--ed-red); }
.shipment-metrics span, .shipment-metrics small { color: var(--ed-ink3); font-size: 0.75rem; }
@media (max-width: 900px) { .shipment-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shipment-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px 0; border-radius: var(--ed-r-card) var(--ed-r-card) 0 0; background: var(--ed-card); }
.shipment-toolbar h3 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.shipment-day-nav { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 11px; background: var(--ed-card2); }
.shipment-day-nav button { min-height: 30px; min-width: 30px; padding: 0 10px; border-radius: 8px; background: transparent; font-size: 0.7813rem; }
.shipment-day-nav input[type='date'] { min-height: 30px; padding: 0 8px; background: transparent; }
.shipment-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.shipment-filters select, .shipment-filters input { min-height: 34px; }
.shipment-legend summary { color: var(--ed-ink2); font-size: 0.7813rem; cursor: pointer; }
.admin-arrangement-agenda { padding: 12px 18px 18px; border-radius: 0 0 var(--ed-r-card) var(--ed-r-card); background: var(--ed-card); }
.admin-arrangement-rules-head h3, .admin-arrangement-access h3, .admin-arrangement-guide h3 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.admin-arrangement-access, .admin-arrangement-guide, .admin-arrangement-example { padding: 16px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.admin-arrangement-unlock-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.admin-arrangement-savebar { position: sticky; bottom: 10px; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px; border: 1px solid var(--ed-line2); border-radius: 14px; background: var(--ed-menu); box-shadow: var(--ed-shm); }
.admin-arrangement-event-overlay { position: fixed; inset: 0; z-index: 120; background: var(--ed-scrim); animation: ed-fade 0.3s var(--ed-ease) both; }
.admin-arrangement-event-dialog { position: fixed; left: 50%; top: 50%; z-index: 121; width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 20px; border: 1px solid var(--ed-line2); border-radius: 20px; background: var(--ed-sheet); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); transform: translate(-50%, -50%); }
.admin-arrangement-event-dialog[hidden] { display: none; }
.admin-arrangement-event-dialog-head h3 { margin: 0; font-size: 1rem; font-weight: 650; }
/* (Shipments board) status cards with a dot, then one "Pickup timeline" card: day switch, filters,
   an hour axis and one lane per courier and shop with its pickup window drawn as a block */
.admin-arrangement-hero { justify-content: flex-end; margin-bottom: -4px; }
.admin-arrangement-live { color: var(--ed-ink3); font-size: 0.75rem; }
.shipment-metrics > button { position: relative; height: 104px; min-height: 104px; box-sizing: border-box; padding: 15px 18px; border: 1px solid transparent; border-radius: var(--ed-r-card); background: var(--ed-card); color: var(--ed-ink); text-align: left; font-weight: 400; transition: border-color 0.25s, background-color 0.25s; }
.shipment-metrics > button:hover { background: var(--ed-card); border-color: var(--ed-line2); }
.shipment-metrics > button[aria-pressed='true'], .shipment-metrics > button.is-selected { border-color: var(--ed-ink3); background: var(--ed-card); }
.shipment-metrics > button > span { order: 1; display: flex; align-items: center; gap: 8px; color: var(--ed-ink2); font-size: 0.7813rem; }
.shipment-metrics > button > span::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ed-ink3); }
.shipment-metrics > button.is-red > span::before { background: var(--ed-red); }
.shipment-metrics > button.is-amber > span::before { background: var(--ed-amber); }
.shipment-metrics > button.is-green > span::before { background: var(--ed-mint); }
.shipment-metrics > button > strong { order: 2; color: var(--ed-ink) !important; font-size: 1.625rem; line-height: 1.15; }
.shipment-metrics > button > small { order: 3; margin-top: auto; color: var(--ed-ink3); font-size: 0.75rem; }
.shipment-toolbar { gap: 8px 10px; margin: 0; padding: 14px 18px 0; }
.shipment-toolbar > div:first-child { display: flex; flex-direction: column; margin-right: 10px; }
.shipment-toolbar > div:first-child > span { color: var(--ed-ink3); font-size: 0.75rem; }
.shipment-toolbar .shipment-day-nav { margin-right: auto; }
.shipment-day-nav > button:not([data-shipment-today]) { display: grid; place-items: center; width: 30px; min-width: 30px; height: 30px; padding: 0; color: var(--ed-ink2); }
.shipment-day-nav > [data-shipment-today] { height: 30px; padding: 0 12px; background: var(--ed-raise); color: var(--ed-ink); font-weight: 600; }
.shipment-day-nav input[type='date'] { width: 132px; height: 30px; min-height: 30px; border-radius: 9px; font-size: 0.75rem; }
.shipment-filters { margin: 0; padding: 12px 18px 12px; border-radius: 0; background: var(--ed-card); gap: 8px; }
.shipment-filters > [data-shipment-filter='all'] { height: 36px; min-height: 36px; padding: 0 12px; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink2); font-size: 0.7813rem; font-weight: 400; }
.shipment-filters > [data-shipment-filter='all'][aria-pressed='true'] { color: var(--ed-ink); }
.shipment-filters > select { min-height: 36px; height: 36px; max-width: 220px; border-radius: 11px; font-size: 0.7813rem; }
.shipment-filters > input[type='search'] { width: 230px; min-height: 36px; height: 36px; border-radius: 11px; font-size: 0.7813rem; }
.shipment-filters > .shipment-legend { margin-left: auto; }
.admin-arrangement-agenda { padding: 0 18px 18px; }
.shipment-timeline-scroll { overflow-x: auto; }
.shipment-timeline { min-width: 760px; }
.shipment-axis, .shipment-lane { display: grid; grid-template-columns: 180px minmax(320px, 1fr) 200px; column-gap: 12px; }
.shipment-axis { height: 26px; align-items: center; color: var(--ed-ink3); font-size: 0.7188rem; }
.shipment-axis > div { position: relative; height: 26px; }
.shipment-axis > div > span { position: absolute; top: 5px; color: var(--ed-ink3); font: 400 0.6563rem var(--ed-mono); transform: translateX(-50%); white-space: nowrap; }
.shipment-axis > div > span:first-child { transform: none; }
.shipment-axis > div > span:last-of-type { transform: translateX(-100%); }
.shipment-now-label { position: absolute; top: 2px; z-index: 2; padding: 2px 6px; border-radius: 6px; background: var(--ed-raise); color: var(--ed-ink); font: 600 0.6563rem var(--ed-mono); transform: translateX(-50%); white-space: nowrap; }
.shipment-lane { width: 100%; min-height: 56px; height: auto; margin: 0; padding: 0; border: 0; border-top: 1px solid var(--ed-line); border-radius: 0; background: transparent; color: var(--ed-ink); text-align: left; font-weight: 400; cursor: pointer; transition: background-color 0.2s; }
.shipment-lane:hover { background: var(--ed-card2); }
.shipment-lane:active { transform: none; }
.shipment-lane:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: -2px; }
.shipment-lane-heading { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; padding: 8px 0 8px 15px; position: relative; }
.shipment-lane-heading::before { content: ''; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; margin-top: -11px; border-radius: 50%; background: var(--ed-ink3); }
.shipment-lane.is-red .shipment-lane-heading::before { background: var(--ed-red); }
.shipment-lane.is-amber .shipment-lane-heading::before { background: var(--ed-amber); }
.shipment-lane.is-green .shipment-lane-heading::before { background: var(--ed-mint); }
.shipment-lane.is-blue .shipment-lane-heading::before { background: var(--ed-cyan); }
.shipment-lane-heading strong { font-size: 0.7813rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.shipment-lane-heading small { color: var(--ed-ink3); font-size: 0.7188rem; }
.shipment-lane-progress { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--ed-ink3); font-size: 0.6875rem; }
.shipment-lane-progress > i { display: block; width: 44px; height: 4px; border-radius: 9px; background: var(--ed-card2); overflow: hidden; }
.shipment-lane-progress > i > b { display: block; height: 100%; border-radius: 9px; background: var(--ed-mint); }
.shipment-lane-track { position: relative; min-height: 56px; }
.shipment-now { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--ed-ink3); }
.shipment-window { position: absolute; top: 50%; height: 34px; min-width: 6px; box-sizing: border-box; margin-top: -17px; border: 1px solid var(--ed-line2); border-radius: 10px; background: var(--ed-card2); transform-origin: left; animation: ed-stock-bar 0.6s var(--ed-ease) both; }
.shipment-window.is-point { width: 10px !important; border-radius: 6px; }
.shipment-lane.is-red .shipment-window { border-color: var(--ed-redl); }
.shipment-lane.is-amber .shipment-window { border-color: var(--ed-amberl); }
.shipment-lane.is-green .shipment-window { border-color: var(--ed-mintl); }
.shipment-lane.is-blue .shipment-window { border-color: var(--ed-cyanl); }
.shipment-window-time { position: absolute; top: 50%; z-index: 1; padding-left: 9px; color: var(--ed-ink); font: 500 0.6875rem/34px var(--ed-mono); white-space: nowrap; transform: translateY(-50%); pointer-events: none; }
.shipment-window-time.is-after { padding-left: 7px; color: var(--ed-ink2); }
.shipment-window-time.is-before { padding: 0 7px 0 0; color: var(--ed-ink2); transform: translate(-100%, -50%); }
.admin-arrangement-workspace.is-schedule .admin-arrangement-primary { display: flex; flex-direction: column; gap: 0; }
.admin-arrangement-workspace.is-schedule .shipment-metrics { margin-bottom: 12px; }
.admin-arrangement-workspace.is-schedule .shipment-notice:not([hidden]) { margin: 0 0 12px; }
.shipment-deadline { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border: 1.5px solid var(--ed-amber); background: var(--ed-card); transform: rotate(45deg); }
.shipment-lane-result { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; padding: 8px 0; font-size: 0.7188rem; }
.shipment-lane-result strong { font-size: 0.7813rem; font-weight: 600; }
.shipment-lane.is-red .shipment-lane-result strong { color: var(--ed-red); }
.shipment-lane.is-amber .shipment-lane-result strong { color: var(--ed-amber); }
.shipment-lane.is-green .shipment-lane-result strong { color: var(--ed-mint); }
.shipment-lane-result small, .shipment-lane-result span { color: var(--ed-ink3); }
.shipment-other { margin-top: 14px; }
.shipment-other header h3 { margin: 0; font-size: 0.8125rem; font-weight: 600; }
.shipment-other header h3 span { color: var(--ed-ink3); font: 400 0.75rem var(--ed-mono); }
.shipment-other header p { margin: 2px 0 8px; color: var(--ed-ink3); font-size: 0.75rem; }
.shipment-order { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) 20px; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 4px; border: 0; border-top: 1px solid var(--ed-line); border-radius: 0; background: transparent; color: var(--ed-ink); text-align: left; font-weight: 400; }
.shipment-order:hover { background: var(--ed-card2); }
.shipment-order > span { display: flex; flex-direction: column; min-width: 0; }
.shipment-order strong { font-size: 0.7813rem; font-weight: 600; overflow-wrap: anywhere; }
.shipment-order small { color: var(--ed-ink3); font-size: 0.7188rem; overflow-wrap: anywhere; }
.shipment-order.is-red > span:nth-child(2) strong { color: var(--ed-red); }
.shipment-order.is-amber > span:nth-child(2) strong { color: var(--ed-amber); }
.shipment-order-arrow { color: var(--ed-ink3); }
.shipment-board-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ed-line); color: var(--ed-ink3); font-size: 0.75rem; }
.shipment-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; color: var(--ed-ink3); text-align: center; font-size: 0.7813rem; }
.shipment-empty strong { color: var(--ed-ink); font-size: 0.8438rem; }
.shipment-empty p { margin: 0; }
@media (max-width: 767px) {
  .shipment-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .shipment-metrics > button { height: auto; min-height: 96px; padding: 12px 14px; }
  .shipment-toolbar, .shipment-filters { padding-left: 12px; padding-right: 12px; }
  .shipment-filters > input[type='search'], .shipment-filters > select { flex: 1 1 100%; width: auto; max-width: none; }
  .admin-arrangement-agenda { padding: 0 12px 14px; }
  /* a phone lane: courier and status side by side, the day's track full width under them */
  .shipment-timeline { min-width: 0; }
  .shipment-axis { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; }
  .shipment-axis > span { display: none !important; }
  .shipment-lane { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; grid-template-areas: 'head result' 'track track'; column-gap: 10px; padding-bottom: 6px; }
  .shipment-lane-heading { grid-area: head; }
  .shipment-lane-result { grid-area: result; align-items: flex-end; text-align: right; }
  .shipment-lane-track { grid-area: track; display: block !important; min-height: 42px; }
  .shipment-toolbar { justify-content: flex-start; text-align: left; }
  .shipment-toolbar > div:first-child { flex: 1 1 100%; align-items: flex-start; text-align: left; }
  .shipment-order { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .shipment-order > span:nth-child(3), .shipment-order-arrow { display: none; }
}

/* ---------- Landing page campaigns ---------- */
.admin-campaign-view.is-active { display: flex; flex-direction: column; gap: 12px; }
.admin-campaign-view .admin-panel-kicker { display: none; }
/* Campaigns: the landing pages for each product, as a reference card under the charts */
.admin-campaign-command { order: 9; padding: 16px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.admin-campaign-command > .admin-website-child-return { display: none; }
.admin-launchpad-head { flex-direction: row; justify-content: flex-start; }
.admin-launchpad-head .admin-panel-kicker { display: block; order: -1; color: var(--ed-ink); font-size: 0.8125rem; font-weight: 600; }
.admin-launchpad-head strong { color: var(--ed-ink3); font-size: 0.75rem; font-weight: 400; }
@media (max-width: 760px) { .admin-launchpad { grid-template-columns: minmax(0, 1fr); } }
.admin-product-cart-panel { height: auto !important; min-height: 0 !important; }
.admin-launchpad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-launchpad-section { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.admin-launchpad-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-launchpad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.admin-launchpad-grid a { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 12px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.7813rem; text-decoration: none; transition: background-color 0.2s; }
.admin-launchpad-grid a:hover { background: var(--ed-raise); }
.admin-launchpad-grid small { color: var(--ed-ink3); font: 0.6875rem var(--ed-mono); overflow-wrap: anywhere; white-space: normal; }
.admin-control-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; background: transparent; }
.admin-control-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-control-group > span, .admin-control-group > label > span { color: var(--ed-ink3); font-size: 0.75rem; }
.admin-campaign-view > .admin-main-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.admin-campaign-view > .admin-main-grid > .admin-panel-wide { grid-column: auto; }
.admin-campaign-view > .admin-main-grid > .admin-product-cart-panel { grid-column: 1 / -1; }
@media (max-width: 1300px) { .admin-campaign-view > .admin-main-grid { grid-template-columns: minmax(0, 1fr); } }
.admin-website-child-return a, .admin-website-child-return button { min-height: 32px; padding: 0 12px; font-size: 0.7813rem; }
/* Campaigns board: Live on the left of the top bar, Websites on the right; the period and metric
   controls without their labels; the Bubur / Jamu switches read as the chart's legend */
[data-ed-view-actions='home'] { flex: 1 1 auto; min-width: 0; }
[data-ed-view-actions='home'] > .ed-live { margin-right: auto; }
.admin-campaign-controls .admin-control-group { gap: 0; }
.admin-campaign-view [data-home-series-controls] { gap: 14px; margin: 0 0 8px; padding: 0; border-radius: 0; background: transparent; overflow: visible; }
.admin-campaign-view [data-home-series-controls] .admin-sliding-toggle-indicator { display: none; }
.admin-campaign-view [data-home-series-controls] > .admin-toggle-pill { gap: 6px; min-height: 22px; height: 22px; padding: 0; background: transparent !important; color: var(--ed-ink2); font-size: 0.75rem; font-weight: 400; opacity: 0.45; transition: opacity 0.25s; }
.admin-campaign-view [data-home-series-controls] > .admin-toggle-pill.is-active { opacity: 1; color: var(--ed-ink2); font-weight: 400; }
.admin-campaign-view [data-home-series-controls] > .admin-toggle-pill::before { content: ''; width: 14px; height: 0; border-top: 2px solid var(--ed-p1); }
.admin-campaign-view [data-home-series-controls] > .admin-toggle-pill-series-jamu::before { border-top-color: var(--ed-p3); }
/* Campaigns board: the landing-page link card is not on the board */
.admin-campaign-view > .admin-campaign-command { display: none; }
/* period and measure: 36px segments of fixed width (56px / 96px) on a card track */
.admin-campaign-controls { gap: 10px; }
.admin-campaign-controls .admin-toggle-row { gap: 2px; margin: 0; padding: 4px; border-radius: 14px; background: var(--ed-card); }
.admin-campaign-view .admin-metric-card small > span { display: inline; }
.admin-campaign-view [data-home-series-controls] > .admin-toggle-pill::before { display: block; flex: none; }
.admin-campaign-view > .admin-main-grid .admin-chart-surface .admin-chart-canvas { height: 230px; }
[data-ed-view-actions='home'] a.ed-frame-btn { text-decoration: none; }
.admin-campaign-controls .admin-toggle-row > .admin-toggle-pill { justify-content: center; width: 56px; min-width: 0; height: 36px; min-height: 36px; padding: 0; border-radius: 10px; font-size: 0.7813rem; }
.admin-campaign-controls [data-home-metric-controls] > .admin-toggle-pill { width: 96px; }
.admin-campaign-controls .admin-sliding-toggle-indicator { border-radius: 10px; }
/* chart cards: title, then how to read it, then the legend */
.admin-campaign-view > .admin-main-grid > .admin-panel-chart > .admin-panel-head { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 3px; margin-bottom: 8px; }
.admin-campaign-view > .admin-main-grid > .admin-panel-chart > .admin-panel-head .admin-panel-meta { margin: 0; color: var(--ed-ink3); font-size: 0.75rem; text-align: left; }
.admin-campaign-view .admin-hour-activity-panel > .ed-chart-legend { margin: 0 0 6px; }
/* Added to cart: a table card like the board's (title and period, the rows, the count under them) */
.admin-campaign-view .admin-product-cart-panel { padding: 16px 0 0; gap: 0; }
.admin-campaign-view .admin-product-cart-panel > .admin-panel-head { flex-direction: column; align-items: flex-start; gap: 3px; margin: 0; padding: 0 18px 12px; border-bottom: 1px solid var(--ed-line); }
.admin-campaign-view .admin-product-cart-panel > .admin-panel-head .admin-panel-meta { margin: 0; color: var(--ed-ink3); font-size: 0.75rem; }
.admin-campaign-cart-wrap { margin: 0; padding: 0; overflow-x: auto; }
.admin-campaign-cart-table th:first-child, .admin-campaign-cart-table td:first-child { padding-left: 18px; }
.admin-campaign-cart-table th:last-child, .admin-campaign-cart-table td:last-child { padding-right: 18px; }
.admin-campaign-cart-table tbody td { height: 46px; }
.admin-campaign-cart-table td strong { font-weight: 600; }
.admin-campaign-cart-table .is-num { text-align: right; font-family: var(--ed-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-campaign-cart-table th.is-num { font-family: var(--ed-font); }
.admin-campaign-cart-rate.is-good { color: var(--ed-mint); }
.admin-campaign-cart-rate.is-low { color: var(--ed-amber); }
.admin-campaign-cart-foot { margin: 0; padding: 12px 18px 14px; border-top: 1px solid var(--ed-line); color: var(--ed-ink3); font-size: 0.75rem; }
.admin-campaign-cart-foot:empty { display: none; }
/* Campaigns board, measured: KPI cards as the Kpis board draws them (112px, 26px values, the meta on a
   26px line at the foot); the chart row is 8+4 of a 12-column grid, both cards 320px, the plot right
   under the legend */
.admin-campaign-view .admin-metric-card { height: 112px; box-sizing: border-box; }
.admin-campaign-view .admin-metric-card > strong { margin: 6px 0 0; font-size: 1.625rem; line-height: 1.12; letter-spacing: -0.02em; }
.admin-campaign-view .admin-metric-card > small { margin-top: auto; font-size: 0.75rem; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1301px) { .admin-campaign-view > .admin-main-grid { grid-template-columns: minmax(0, calc((100% - 132px) / 12 * 8 + 84px)) minmax(0, 1fr); } }
.admin-campaign-view > .admin-main-grid > .admin-panel-chart { height: 320px; box-sizing: border-box; }
.admin-campaign-view > .admin-main-grid > .admin-panel-chart > .admin-panel-head { margin-bottom: 10px; }
.admin-campaign-view .admin-hour-activity-panel > .ed-chart-legend { margin: 0 0 8px; }
@media (pointer: fine) and (min-width: 1025px) { .admin-campaign-view [data-home-series-controls] > .admin-toggle-pill { height: 17px; min-height: 17px; } }
.admin-campaign-view > .admin-main-grid > .admin-panel-chart > .admin-chart-surface { position: relative; flex: 1 1 auto; min-height: 0; margin-top: -8px; }
.admin-campaign-view > .admin-main-grid > .admin-panel-chart > .admin-chart-surface > .admin-chart-canvas { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; }
/* the views line chart keeps 14px above its top gridline (the bar chart 8px) */
.admin-campaign-view > .admin-main-grid > .admin-panel-wide > .admin-chart-surface { margin-top: -14px; }
@media (max-width: 640px) {
  .admin-campaign-controls .admin-toggle-row { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; }
  .admin-campaign-cart-table th:nth-child(2), .admin-campaign-cart-table td:nth-child(2) { display: none; }
}

/* ---------- Websites & storefronts (Websites, WebsiteItems, WebsiteDiscounts boards) ----------
   The two storefronts are a sliding tab pair with their logos; under the site, Analytics / Items for
   sale (Catalog and Event voucher on ZERO) / Discounts; the live note sits at the right of that row. */
[data-view-panel='website'].is-active { display: flex; flex-direction: column; gap: 12px; }
[data-view-panel='website'] .admin-panel-kicker { display: none; }
[data-admin-dashboard][data-active-view='website'] .ed-view-actions[data-ed-view-actions='website'] { display: flex; flex: 1 1 auto; min-width: 0; }
[data-ed-view-actions='website'] > .ed-live { margin-right: auto; }
[data-ed-view-actions='website'] > a.ed-frame-btn { text-decoration: none; }
.ed-ws-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.ed-ws-sites { position: relative; display: flex; flex-wrap: nowrap; gap: 2px; padding: 4px; border: 0; border-radius: 14px; background: var(--ed-card); }
.ed-ws-sites-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 170px; border-radius: 10px; background: var(--ed-raise); transition: transform 0.45s var(--ed-ease); pointer-events: none; }
.ed-ws-sites[data-site='zero'] .ed-ws-sites-thumb { transform: translateX(172px); }
.ed-ws-sites > [role='tab'] { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; width: 170px; height: 44px; min-height: 44px; margin: 0; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ed-ink2); text-align: left; }
.ed-ws-sites > [role='tab']:hover, .ed-ws-sites > [role='tab'][aria-selected='true'] { border: 0; background: transparent; color: var(--ed-ink); font-weight: 500; }
.ed-ws-sites > [role='tab'] small { color: var(--ed-ink3); font: 0.6875rem var(--ed-mono); }
.ed-ws-logo { display: block; flex: none; opacity: 0.6; transition: opacity 0.3s; }
.ed-ws-sites > [role='tab'][aria-selected='true'] .ed-ws-logo, .ed-ws-sites > [role='tab']:hover .ed-ws-logo { opacity: 1; }
.ed-ws-logo.is-jg { width: 92px; height: 18px; object-fit: cover; }
.ed-ws-logo.is-zero { width: 56px; height: 16px; object-fit: contain; object-position: left center; }
:root:not([data-admin-theme='light']) .ed-ws-logo.is-zero { filter: invert(1); }
.ed-ws-tabs { display: flex; flex-wrap: nowrap; gap: 18px; border-bottom: 1px solid var(--ed-line); }
.ed-ws-tabs > [role='tab'] { height: 38px; min-height: 38px; padding: 0 2px; font-size: 0.8125rem; white-space: nowrap; }
.ed-ws-tabs > [role='tab'][hidden] { display: none; }
.ed-ws-status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-left: auto; color: var(--ed-ink2); font-size: 0.75rem; }
.ed-ws-status > i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ed-mint); }
.ed-ws-status.is-offline > i { background: var(--ed-ink3); }
.ed-ws-status-ips { color: var(--ed-ink3); }
.ed-ws-detail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ed-ws-site { display: contents; }
.ed-ws-site[hidden], .ed-ws-pane[hidden] { display: none; }
.ed-ws-pane { display: flex; flex-direction: column; gap: 12px; min-width: 0; animation: ed-ws-in 0.4s var(--ed-ease) both; }
@keyframes ed-ws-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.ed-ws-card { display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; min-width: 0; padding: 16px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.ed-ws-card h2 { margin: 0; font-size: 0.875rem; font-weight: 600; letter-spacing: -0.005em; }
.ed-ws-card h2 + p, .ed-ws-card > div > p, .ed-ws-card > form > div > p { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-ws-mono { font-family: var(--ed-mono); }
/* analytics */
.ed-ws-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ed-ws-seg.admin-sliding-chart-toggle { flex-wrap: nowrap; gap: 2px; padding: 3px; border-radius: 11px; background: var(--ed-card); overflow: visible; }
.ed-ws-seg > .admin-toggle-pill { flex: none; height: 30px; min-height: 30px; padding: 0; border-radius: 8px; font-size: 0.75rem; }
.ed-ws-seg.is-time > .admin-toggle-pill { width: 50px; font-family: var(--ed-mono); }
.ed-ws-seg.is-metric > .admin-toggle-pill { width: 98px; }
.ed-ws-seg .admin-sliding-toggle-indicator { border-radius: 8px; }
.ed-ws-links { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.ed-ws-link, .ed-ws-tbtn { display: inline-flex; align-items: center; box-sizing: border-box; height: 30px; min-height: 30px; padding: 0 11px; border: 0; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.75rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color 0.25s, transform 0.35s var(--ed-ease); }
.ed-ws-link:hover, .ed-ws-tbtn:hover { background: var(--ed-raise); color: var(--ed-ink); }
.ed-ws-tcard-head .ed-ws-tbtn { height: 36px; min-height: 36px; padding: 0 12px; font-size: 0.7813rem; }
.ed-ws-tbtn.is-small { height: 28px; min-height: 28px; padding: 0 10px; border-radius: 9px; font-size: 0.75rem; }
.ed-ws-groups-head .ed-ws-tbtn.is-small { height: 30px; min-height: 30px; }
.ed-ws-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ed-ws-kpi { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; padding: 12px 14px; border-radius: 14px; background: var(--ed-card); }
.ed-ws-kpi > span { color: var(--ed-ink2); font-size: 0.75rem; }
.ed-ws-kpi > strong { font: 600 1.125rem var(--ed-mono); letter-spacing: normal; overflow-wrap: anywhere; }
.ed-ws-kpi > small { color: var(--ed-ink3); font-size: 0.7188rem; }
.ed-ws-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: stretch; }
.ed-ws-chart { gap: 0; height: 300px; }
.ed-ws-chart .ed-ws-card-head { margin-bottom: 10px; }
.ed-ws-chart .ed-chart-legend { margin: 0 0 6px; }
.ed-ws-chart .ed-chart-legend i { display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--ed-p1); border-radius: 0; background: none; }
.ed-ws-chart .admin-chart-surface { flex: 1; min-height: 0; }
.ed-ws-chart .admin-chart-canvas { width: 100%; height: 100%; }
.ed-ws-sales { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ed-ws-sales .ed-ws-kpi > strong { font-size: 1.0625rem; }
/* Websites board: tile values at line-height 1.4 (88px traffic tiles); the four sales tiles share the
   chart's height in two equal rows even when a long region name wraps */
.ed-ws-kpi > strong { line-height: 1.4; }
@media (min-width: 1024px) { .ed-ws-sales { grid-template-rows: repeat(2, minmax(0, 1fr)); } }
/* table cards (Table board) */
.ed-ws-tcard { gap: 0; padding: 0; overflow: hidden; }
.ed-ws-tcard-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; padding: 14px 16px 12px 18px; }
.ed-ws-tcard-head > div { min-width: 0; margin-right: auto; }
.ed-ws-tscroll { overflow: auto; border-top: 1px solid var(--ed-line); }
.ed-ws-table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.ed-ws-table th { position: sticky; top: 0; z-index: 1; height: 38px; padding: 0 10px; background: var(--ed-card); color: var(--ed-ink3); font-size: 0.75rem; font-weight: 500; }
.ed-ws-table td { height: 46px; padding: 0 10px; font-size: 0.8125rem; white-space: nowrap; }
.ed-ws-table th:first-child, .ed-ws-table td:first-child { padding-left: 18px; }
.ed-ws-table th:last-child, .ed-ws-table td:last-child { padding-right: 18px; }
.ed-ws-table .is-num { text-align: right; }
.ed-ws-table .is-end { text-align: right; }
.ed-ws-table td.ed-ws-mono { font-size: 0.75rem; }
.ed-ws-table td.ed-ws-wrap { min-width: 140px; white-space: normal; overflow-wrap: anywhere; }
.ed-ws-table td .is-muted, .ed-ws-table td.is-muted { color: var(--ed-ink3); }
.ed-ws-table td .is-bad { color: var(--ed-red); }
.ed-ws-table td.admin-empty { white-space: normal; }
.ed-ws-table tr.is-selected > td { background: var(--ed-card2); }
.ed-ws-table .ed-pill { font-family: var(--ed-font); }
.ed-ws-order-id { color: var(--ed-ink); }
.ed-ws-tcard > .ed-table-foot { border-top: 1px solid var(--ed-line); }
.ed-ws-tcard > .ed-table-foot:has(> span:empty:only-child) { display: none; }
.ed-ws-search { display: flex; align-items: center; gap: 8px; box-sizing: border-box; width: 220px; height: 36px; padding: 0 12px; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink3); transition: box-shadow 0.25s; }
.ed-ws-search:focus-within { box-shadow: 0 0 0 1px var(--ed-ink3); }
.ed-ws-search svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ed-ws-search input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent !important; box-shadow: none !important; color: var(--ed-ink); font-size: 0.7813rem; }
.ed-ws-search.is-small { width: 180px; height: 32px; }
.ed-ws-search[hidden] { display: none; }
/* items for sale: the list and the item being edited */
.ed-ws-items { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
.ed-ws-items[hidden] { display: none; }
.ed-ws-edit-form { display: flex; flex-direction: column; gap: 12px; }
.ed-ws-edit-form > div > h2 { overflow-wrap: anywhere; }
.ed-ws-edit-form > div > p.ed-ws-mono { overflow-wrap: anywhere; }
.ed-ws-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ed-ws-field[hidden] { display: none; }
.ed-ws-field > small, .ed-ws-edit-form small { color: var(--ed-ink3); font-size: 0.75rem; }
.ed-ws-lab { color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-ws-lab > span { color: var(--ed-ink3); }
.ed-ws-fld { display: flex; align-items: center; gap: 8px; box-sizing: border-box; height: 40px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink3); font-size: 0.7813rem; transition: box-shadow 0.25s, background-color 0.25s; }
.ed-ws-fld:hover { background: var(--ed-raise); }
.ed-ws-fld:focus-within { background: var(--ed-card2); box-shadow: 0 0 0 1px var(--ed-ink3); }
.ed-ws-fld > span[hidden] { display: none; }
.ed-ws-fld input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent !important; box-shadow: none !important; color: var(--ed-ink); font-size: 0.8125rem; }
.ed-ws-fld input.is-money { font-family: var(--ed-mono); text-align: right; }
.ed-ws-fld input.is-code { font-family: var(--ed-mono); text-transform: uppercase; }
.ed-ws-switch { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--ed-ink); font-size: 0.8125rem; font-weight: 400; text-align: left; }
.ed-ws-switch:hover, .ed-ws-switch[aria-checked] { background: transparent; }
.ed-ws-switch:active { transform: none; }
.ed-ws-switch > span:last-child { min-width: 0; }
.ed-ws-switch small { display: block; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-ws-switch-track { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--ed-raise); transition: background-color 0.35s; }
.ed-ws-switch-track::before { content: ''; 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); transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.35s; }
.ed-ws-switch[aria-checked='true'] .ed-ws-switch-track { background: var(--ed-ink); }
.ed-ws-switch[aria-checked='true'] .ed-ws-switch-track::before { background: var(--ed-card); transform: translateX(16px); }
.ed-ws-switch.is-field { align-self: end; gap: 10px; height: 40px; cursor: pointer; }
.ed-ws-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.ed-ws-btn, .ed-ws-pbtn { height: 36px; min-height: 36px; padding: 0 13px; border: 0; border-radius: 11px; font-size: 0.7813rem; white-space: nowrap; }
.ed-ws-btn { background: var(--ed-card2); color: var(--ed-ink); font-weight: 400; }
.ed-ws-btn:hover { background: var(--ed-raise); }
.ed-ws-pbtn { padding: 0 15px; background: var(--ed-ink); color: var(--ed-card); font-weight: 600; transition: opacity 0.25s, transform 0.35s var(--ed-ease); }
.ed-ws-pbtn:hover { background: var(--ed-ink); color: var(--ed-card); opacity: 0.88; }
/* discount groups */
.ed-ws-disc { display: grid; grid-template-columns: 360px minmax(0, 1fr); align-items: start; }
.ed-ws-disc[hidden] { display: none; }
.ed-ws-groups { gap: 4px; }
.ed-ws-groups-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ed-ws-group-list { display: flex; flex-direction: column; max-height: 560px; margin: 0 -8px; padding: 0 8px; overflow: auto; }
.ed-ws-group { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 0; margin: 0 -8px; padding: 10px 8px; border: 0; border-top: 1px solid var(--ed-line); border-radius: 10px; background: transparent; color: var(--ed-ink); font-weight: 400; text-align: left; transition: background-color 0.2s; }
.ed-ws-group:hover, .ed-ws-group[aria-pressed='true'], .ed-ws-group.is-selected { background: var(--ed-card2); color: var(--ed-ink); font-weight: 400; }
.ed-ws-group-top { display: flex; justify-content: space-between; gap: 10px; }
.ed-ws-group-top strong { min-width: 0; font-size: 0.8125rem; font-weight: 600; overflow-wrap: anywhere; }
.ed-ws-group-state { flex: none; font-size: 0.75rem; font-weight: 500; }
.ed-ws-group-state.is-good, .ed-ws-state.is-good { color: var(--ed-mint); }
.ed-ws-group-state.is-info, .ed-ws-state.is-info { color: var(--ed-cyan); }
.ed-ws-group-state.is-off, .ed-ws-state.is-off { color: var(--ed-ink3); }
.ed-ws-group-sub { color: var(--ed-ink3); font-size: 0.75rem; }
.ed-ws-note { margin: 8px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-ws-none { margin: 0; padding: 18px 12px; border: 1px dashed var(--ed-line2); border-radius: 12px; color: var(--ed-ink3); font-size: 0.7813rem; text-align: center; }
.ed-ws-disc-form { display: flex; flex-direction: column; gap: 12px; }
.ed-ws-form-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ed-ws-form-head h2 { min-width: 0; overflow-wrap: anywhere; }
.ed-ws-del { flex: none; height: 30px; min-height: 30px; padding: 0 10px; border: 1px solid rgba(255, 107, 129, 0.5); border-radius: 9px; background: transparent; color: var(--ed-red); font-size: 0.75rem; font-weight: 600; }
.ed-ws-del:hover { background: rgba(255, 107, 129, 0.08); }
.ed-ws-del[hidden] { display: none; }
.ed-ws-disc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ed-ws-disc-grid > .is-wide { grid-column: span 2; }
.ed-ws-field-end { justify-content: flex-end; }
.ed-ws-seg2 { position: relative; display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--ed-card2); }
.ed-ws-seg2-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 8px) / 2); border-radius: 8px; background: var(--ed-raise); transition: transform 0.45s var(--ed-ease); pointer-events: none; }
.ed-ws-seg2[data-value='percent'] .ed-ws-seg2-thumb { transform: translateX(calc(100% + 2px)); }
.ed-ws-seg2 > button { position: relative; flex: 1; min-width: 0; height: 32px; min-height: 32px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ed-ink2); font-size: 0.7813rem; font-weight: 500; }
.ed-ws-seg2 > button:hover { background: transparent; color: var(--ed-ink); }
.ed-ws-seg2 > button[aria-checked='true'] { background: transparent; color: var(--ed-ink); font-weight: 600; }
.ed-ws-runs { justify-content: space-between; width: 100%; color: var(--ed-ink); font: 400 0.7813rem var(--ed-mono); text-align: left; }
.ed-ws-runs.is-empty { color: var(--ed-ink3); font-family: var(--ed-font); }
.ed-ws-runs svg { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--ed-ink3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-ws-skus { display: flex; flex-direction: column; gap: 6px; }
.ed-ws-skus-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.ed-ws-skus-tools { display: inline-flex; align-items: center; gap: 10px; }
.ed-ws-textbtn { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--ed-ink2); font-size: 0.75rem; font-weight: 400; }
.ed-ws-textbtn:hover { background: transparent; color: var(--ed-ink); }
.ed-ws-sku-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; max-height: 340px; overflow: auto; }
.ed-ws-sku { display: flex; align-items: center; gap: 10px; min-height: 0; margin: 0 -6px; padding: 7px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--ed-ink); font-size: 0.8125rem; font-weight: 400; text-align: left; transition: background-color 0.2s; }
.ed-ws-sku:hover, .ed-ws-sku[aria-checked] { color: var(--ed-ink); font-weight: 400; }
.ed-ws-sku:hover { background: var(--ed-card2); }
.ed-ws-sku[aria-checked='true'] { background: transparent; }
.ed-ws-sku[aria-checked='true']:hover { background: var(--ed-card2); }
.ed-ws-sku:active { transform: none; }
.ed-ws-check { display: grid; place-items: center; flex: none; box-sizing: border-box; width: 16px; height: 16px; border: 1.5px solid var(--ed-line2); border-radius: 5px; transition: background-color 0.2s, border-color 0.2s; }
.ed-ws-check svg { width: 10px; height: 10px; fill: none; stroke: var(--ed-card); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.ed-ws-sku[aria-checked='true'] .ed-ws-check { border-color: var(--ed-ink); background: var(--ed-ink); }
.ed-ws-sku[aria-checked='true'] .ed-ws-check svg { opacity: 1; }
.ed-ws-sku-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ed-ws-sku-name small { display: block; color: var(--ed-ink3); font: 0.6875rem var(--ed-mono); }
.ed-ws-sku-warn { flex: none; max-width: 45%; color: var(--ed-amber); font: 0.7188rem var(--ed-mono); text-align: right; overflow-wrap: anywhere; }
/* ZERO event voucher */
.ed-ws-voucher { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.ed-ws-voucher[hidden] { display: none; }
.ed-ws-voucher-form { display: flex; flex-direction: column; gap: 12px; }
.ed-ws-voucher-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ed-ws-voucher-grid > * { grid-column: span 2; }
.ed-ws-voucher-grid > :nth-child(4), .ed-ws-voucher-grid > :nth-child(5) { grid-column: span 3; }
@media (max-width: 767px) { .ed-ws-voucher-grid { grid-template-columns: minmax(0, 1fr); } .ed-ws-voucher-grid > *, .ed-ws-voucher-grid > :nth-child(4), .ed-ws-voucher-grid > :nth-child(5) { grid-column: auto; } }
.ed-ws-voucher-grid input[type='datetime-local'] { width: 100%; font-family: var(--ed-mono); font-size: 0.7813rem; }
.ed-ws-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ed-ws-choice > label { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--ed-line); border-radius: 12px; cursor: pointer; transition: border-color 0.3s, background-color 0.3s; }
.ed-ws-choice > label:has(input:checked) { border-color: var(--ed-ink3); background: var(--ed-card2); }
.ed-ws-choice input { width: 16px; height: 16px; margin-top: 1px; }
.ed-ws-choice strong { display: block; font-size: 0.8125rem; font-weight: 600; }
.ed-ws-choice small { color: var(--ed-ink3); font-size: 0.75rem; }
.ed-ws-voucher-state p { margin: 0; color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-ws-state { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8438rem; font-weight: 600; }
.ed-ws-state > i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ed-ws-example { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--ed-line); font-size: 0.7813rem; }
.ed-ws-example > span { display: flex; justify-content: space-between; gap: 10px; color: var(--ed-ink3); }
.ed-ws-example b { flex: none; color: var(--ed-ink); font-family: var(--ed-mono); font-weight: 500; }
.ed-ws-example b.is-strong { font-weight: 600; }
@media (max-width: 1300px) {
  .ed-ws-items, .ed-ws-disc, .ed-ws-voucher { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .ed-ws-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ed-ws-kpis > * { grid-column: span 2; }
  .ed-ws-kpis > :nth-child(n+4) { grid-column: span 3; }
  .ed-ws-split { grid-template-columns: minmax(0, 1fr); }
  .ed-ws-sales { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ed-ws-status { flex: 1 1 100%; margin-left: 0; }
}
@media (max-width: 767px) {
  .ed-ws-head { gap: 10px; }
  .ed-ws-sites { width: 100%; box-sizing: border-box; }
  .ed-ws-sites > [role='tab'] { flex: 1 1 0; width: auto; min-width: 0; }
  .ed-ws-sites-thumb { width: calc((100% - 10px) / 2); }
  .ed-ws-sites[data-site='zero'] .ed-ws-sites-thumb { transform: translateX(calc(100% + 2px)); }
  .ed-ws-tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .ed-ws-toolbar > .ed-ws-seg { width: 100%; box-sizing: border-box; }
  .ed-ws-seg > .admin-toggle-pill, .ed-ws-seg.is-time > .admin-toggle-pill, .ed-ws-seg.is-metric > .admin-toggle-pill { flex: 1 1 0; width: auto; min-width: 0; padding: 0 2px; }
  .ed-ws-links { margin-left: 0; }
  .ed-ws-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-ws-kpis > *, .ed-ws-kpis > :nth-child(n+4) { grid-column: auto; }
  .ed-ws-kpis > :last-child { grid-column: span 2; }
  .ed-ws-sales { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-ws-chart { height: 280px; }
  .ed-ws-search { width: 100%; }
  .ed-ws-disc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-ws-sku-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-ws-choice { grid-template-columns: minmax(0, 1fr); }
  .ed-ws-table td.ed-ws-wrap { min-width: 160px; }
}
@media (max-width: 1024px) and (pointer: coarse) {
  .ed-ws-link, .ed-ws-tbtn, .ed-ws-del, .ed-ws-textbtn { min-height: 44px !important; }
  .ed-ws-seg > .admin-toggle-pill { height: 44px; }
  .ed-ws-sku { min-height: 44px !important; }
}
@media (prefers-reduced-motion: reduce) { .ed-ws-pane { animation: none; } .ed-ws-sites-thumb, .ed-ws-seg2-thumb { transition: none; } }
.admin-store-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.admin-store-form label { display: flex; flex-direction: column; gap: 6px; color: var(--ed-ink2); font-size: 0.7813rem; }
.admin-store-form label.admin-checkbox-line { flex-direction: row; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 1px solid var(--ed-line); border-radius: 10px; color: var(--ed-ink); }
.admin-input-suffix { display: flex; align-items: center; gap: 6px; }
.zero-catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-inline-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-website-selector { flex: 2 1 560px; }
.admin-website-ecosystem-map { flex-direction: column; width: 100%; height: auto; min-height: 0; }
.admin-website-storefronts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; height: auto; }
.admin-website-selection-card { position: relative; display: grid !important; grid-template-columns: 40px minmax(0, 1fr) auto !important; align-items: center; gap: 4px 12px; height: auto !important; min-height: 0 !important; }
.admin-website-node-index { display: none; }
.admin-website-node-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ed-card2); color: var(--ed-ink); font: 600 0.8125rem var(--ed-font); }
.admin-website-node-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.admin-website-node-copy strong { font: 500 0.8125rem var(--ed-mono); }
.admin-website-node-action { color: var(--ed-ink2); font-size: 0.75rem; white-space: nowrap; }
.admin-website-growth-nodes { display: flex !important; width: 100%; height: auto; }
.admin-website-growth-nodes > * { width: auto !important; height: auto !important; position: static !important; }
.admin-website-ecosystem-map { overflow: visible; gap: 10px; }
.admin-website-storefronts, .admin-website-growth-nodes { position: static !important; inset: auto !important; transform: none !important; }
.admin-website-selection-card { overflow: visible; }
.ed-volume-sizes { margin: 0 0 4px; color: var(--ed-ink3); font: 0.7188rem var(--ed-mono); }
/* lines of the same order share an accent: a thin coloured underline under the ID */
.admin-orders-table .admin-order-id { text-decoration-color: var(--admin-order-id-color, var(--ed-line2)); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- phone fixes for dashboard views ---------- */
@media (max-width: 767px) {
  .admin-sliding-chart-toggle, .admin-panel-inline-toggles, .ed-seg, .admin-inventory-filters, .admin-ad-view-timeframes, .admin-context-segments { flex-wrap: wrap; max-width: 100%; }
  .admin-panel-head { flex-direction: column; align-items: stretch; }
  .admin-chart-range-control { position: static; justify-content: flex-end; margin-top: -4px; }
  .admin-overview-primary-chart .admin-panel-head { padding-right: 0; }
  .admin-orders-toolbar { flex-direction: column; align-items: stretch; height: auto; min-height: 0; }
  .admin-orders-copy { flex: none; }
  .admin-orders-actions { justify-content: flex-start; }
  .admin-orders-table-wrap { max-height: none; min-height: 0; }
  .ed-order-channels { padding: 12px 12px 0; }
  .ed-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ed-kpi { padding: 12px 14px; height: auto; min-height: 96px; }
  .ed-kpi-value { font-size: 1.3125rem; }
  .ed-kpi-meta { white-space: normal; height: auto; }
  .ed-kpi-spark { display: none; }
  .daily-sheet-scroll { margin: 0 -18px; }
}
.ed-view-actions > * { width: auto !important; max-width: none; flex: none; margin: 0; }
.ed-view-actions > .ed-frame-btn.is-icon { width: 40px !important; }
.ed-view-actions .ed-month { display: inline-flex; padding: 0; background: transparent; }
/* in a site, the storefront cards become tabs and the hub copy steps aside */
.admin-website-header.is-detail { padding: 10px 12px; }
.admin-website-header.is-detail .admin-website-header-copy { display: none; }
.admin-website-header.is-detail .admin-website-selection-card { grid-template-columns: 34px minmax(0, 1fr) !important; padding: 8px 12px; border-radius: 12px; }
.admin-website-header.is-detail .admin-website-node-mark { width: 34px; height: 34px; border-radius: 10px; }
.admin-website-header.is-detail .admin-website-node-copy small, .admin-website-header.is-detail .admin-website-node-copy em, .admin-website-header.is-detail .admin-website-node-action { display: none; }
.admin-website-header.is-detail .admin-website-ecosystem-map { flex-direction: row; flex-wrap: wrap; align-items: center; }
.admin-website-header.is-detail .admin-website-storefronts { display: flex; width: auto; }
.admin-website-header.is-detail .admin-website-growth-nodes { width: auto; margin-left: auto; }
.admin-website-header.is-detail .admin-website-growth-nodes > * { min-height: 32px; font-size: 0.75rem; }
.admin-website-header.is-detail .admin-website-growth-nodes em, .admin-website-header.is-detail .admin-website-growth-copy small { display: none; }
.admin-website-header.is-detail .admin-website-growth-node { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 10px; }
.admin-website-header.is-detail .admin-website-growth-icon { display: inline-grid; width: 18px; height: 18px; }
.admin-website-header.is-detail .admin-website-growth-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-website-header.is-detail .admin-website-growth-copy { display: block; }
.admin-website-header.is-detail .admin-website-growth-copy strong { font-size: 0.7813rem; font-weight: 550; }
[data-website-back] { display: none !important; }
/* phone: the two sites side by side, links under them, toggles on one row */
@media (max-width: 767px) {
  .admin-website-live-status { align-items: center; justify-content: flex-start; text-align: left; }
  .admin-website-live-status > * { width: auto; margin: 0; }
  .admin-website-header.is-detail .admin-website-ecosystem-map { padding: 0; gap: 6px; }
  .admin-website-header.is-detail .admin-website-selection-card { grid-template-columns: 26px minmax(0, 1fr) !important; gap: 7px; padding: 7px 8px; }
  .admin-website-header.is-detail .admin-website-node-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 0.6875rem; }
  .admin-website-header.is-detail .admin-website-node-copy { min-width: 0; }
  .admin-website-header.is-detail .admin-website-node-copy strong { display: block; overflow: hidden; font-family: var(--ed-font); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 380px) {
  .admin-website-header.is-detail .admin-website-node-mark { display: none; }
  .admin-website-header.is-detail .admin-website-selection-card { grid-template-columns: minmax(0, 1fr) !important; justify-items: center; }
  .admin-website-header.is-detail { padding: 8px; }
  .admin-website-header.is-detail .admin-website-storefronts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .admin-website-header.is-detail .admin-website-selection-card { width: auto; min-width: 0; }
  .admin-website-header.is-detail .admin-website-growth-nodes { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin: 0; }
  .admin-website-header.is-detail .admin-website-growth-node { justify-content: center; }
  .admin-control-strip-compact .admin-control-group { width: 100%; flex-direction: column; align-items: stretch; gap: 6px; }
  .admin-control-strip-compact .admin-sliding-chart-toggle { flex-wrap: nowrap; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .admin-control-strip-compact .admin-sliding-chart-toggle > .admin-toggle-pill { flex: 1 0 auto; min-width: 0; padding: 0 10px; }
}

/* Campaigns: products added to cart, one share bar per product */
.admin-product-cart-rundown { display: flex; flex-direction: column; justify-content: flex-start; flex: none; gap: 16px; height: auto; min-height: 0; padding: 4px 0 2px; }
.admin-product-cart-row { display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: 0; border: 0; background: transparent; }
.admin-product-cart-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.admin-product-cart-row-head strong { font-size: 0.8125rem; font-weight: 550; }
.admin-product-cart-row-head span { font: 500 0.8125rem var(--ed-mono); }
.admin-product-cart-track { height: 6px; border-radius: 9px; background: var(--ed-card2); overflow: hidden; }
.admin-product-cart-track i { display: block; width: var(--cart-share, 0%); height: 100%; border-radius: 9px; background: var(--cart-color, var(--ed-p1)); transition: width 0.8s var(--ed-ease); }
.admin-product-cart-row small { color: var(--ed-ink3); font: 0.75rem var(--ed-mono); }
[data-admin-dashboard][data-active-view='home'] .ed-view-actions[data-ed-view-actions='home'] { display: flex; }
.admin-view-settings .admin-settings-grid > * { align-self: stretch; }
.admin-view-settings .admin-settings-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-view-settings .admin-regional-preview { margin-left: auto; align-items: flex-end; text-align: right; }
.admin-marketplace-auth-footnote { margin: auto 0 0; color: var(--ed-ink3); font-size: 0.75rem; line-height: 1.5; }
/* purchase type buttons wrap their description instead of cutting it on narrow phones */
.admin-purchase-mode-picker > button { min-width: 0; white-space: normal; }
.admin-purchase-mode-picker > button > * { overflow-wrap: anywhere; }
/* activation: long internal source names break instead of pushing the card wider than the phone */
[data-view-panel='hard-set'] h3, [data-view-panel='hard-set'] .admin-panel-head > div { min-width: 0; overflow-wrap: anywhere; }
/* narrow phones: the radio moves into the swatch's corner so each option keeps its full label */
@media (max-width: 420px) {
  .admin-theme-options > button { padding: 8px; }
  .admin-theme-options > button::before { width: 100%; margin-left: 0; }
  .admin-theme-options > button::after { left: auto; right: 14px; bottom: auto; top: 14px; }
}

/* PO payment: one column that never grows wider than the dialog (the method row scrolls if it must) */
.admin-po-payment-modal form { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 767px) { .admin-po-payment-modal { padding: 12px; } .admin-po-payment-modal form { padding: 18px; } }
.admin-po-payment-modal label { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.admin-po-payment-modal input[type='file'] { width: 100%; min-width: 0; max-width: 100%; }
/* stock coverage search: the text starts after the magnifier */
.admin-inventory-product-search-query { position: relative; }
.admin-inventory-product-search-query > input { padding-left: 34px !important; }
.admin-inventory-product-search-query > svg { left: 12px; width: 15px; height: 15px; fill: none; stroke: var(--ed-ink3); stroke-width: 2; pointer-events: none; }
/* phones: each product's landing pages get the full width */
@media (max-width: 760px) { .admin-campaign-command .admin-launchpad { grid-template-columns: minmax(0, 1fr); } }
/* Shopee ads metric pickers: two per row on phones, so the names fit */
@media (max-width: 520px) { .admin-ad-view-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* Wallets: the oldest-unreleased figure gets an amber dot (.ed-kpi-dot) and border when orders have waited too long */
.admin-wallet-panel { gap: 0; }
.admin-wallet-panel > .admin-wallet-table-wrap { margin-top: 0; }
/* phones: card headers stack, so their parts keep their own height (a row's 260px basis would become height) */
@media (max-width: 767px) { .admin-panel-head > * { flex: none !important; } }
/* Stock coverage: the Store Ops status is a sentence, so it wraps instead of being cut */
.admin-inventory-trigger-status strong { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.2; }
/* ---------- Shipment arrangements: tabs, Pickup rules and the shipment dialogs (PickupRules and ShipmentDialogs boards) ---------- */
[data-admin-dashboard][data-active-view='shipment-arrangement'] .ed-view-actions[data-ed-view-actions='shipment-arrangement'] { display: flex; }
[data-ed-view-actions='shipment-arrangement'] { flex: 1 1 auto; min-width: 0; }
[data-ed-view-actions='shipment-arrangement'] > .ed-live { margin-right: auto; }
[data-ed-view-actions='shipment-arrangement'] > [hidden] { display: none; }
.admin-shipment-arrangement.is-active { display: flex; flex-direction: column; gap: 12px; }
.sa-tabs { display: flex; align-items: center; gap: 18px; min-width: 0; border-bottom: 1px solid var(--ed-line); }
.sa-tabs-list { display: flex; gap: 18px; }
.sa-tabs-list > button { height: 38px; min-height: 38px; 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: 400; line-height: 38px; transition: color 0.25s, border-color 0.35s var(--ed-ease); }
.sa-tabs-list > button:hover { background: transparent; color: var(--ed-ink); }
.sa-tabs-list > button.is-active { border-bottom-color: var(--ed-ink); color: var(--ed-ink); font-weight: 600; }
.sa-tabs-meta { display: inline-flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto; color: var(--ed-ink2); font-size: 0.75rem; text-align: right; }
.sa-tabs-meta[hidden] { display: none; }
.sa-tabs-meta svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sa-rules { display: flex; flex-direction: column; gap: 12px; }
.sa-rules[hidden], .sa-rules-form[hidden], .sa-savebar[hidden] { display: none; }
.sa-rules-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.sa-rules-empty { margin: 0; padding: 44px 20px; border-radius: var(--ed-r-card); background: var(--ed-card); color: var(--ed-ink3); font-size: 0.8125rem; text-align: center; }
.sa-rules-empty[hidden] { display: none; }
.sa-rules-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 12px; align-items: start; }
.sa-rules-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sa-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px 18px; border-radius: 18px; background: var(--ed-card); }
.sa-card h3 { margin: 0; font-size: 0.875rem; font-weight: 600; line-height: 1.4; }
.sa-flow-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sa-sub { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; line-height: 1.4; }
.sa-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sa-card-note { color: var(--ed-ink3); font-size: 0.75rem; white-space: nowrap; }
.sa-lab { color: var(--ed-ink2); font-size: 0.7813rem; }
.sa-lab em { margin-left: 6px; color: var(--ed-ink3); font-size: 0.6875rem; font-style: normal; }
.sa-mono { font-family: var(--ed-mono); }
.sa-btn, .sa-pbtn { display: inline-flex; align-items: center; justify-content: center; height: 34px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.7813rem; font-weight: 400; white-space: nowrap; cursor: pointer; transition: background-color 0.25s, opacity 0.25s, transform 0.35s var(--ed-ease); }
.sa-btn:hover { background: var(--ed-raise); }
.sa-pbtn { padding: 0 14px; background: var(--ed-ink); color: var(--ed-card); font-weight: 600; }
.sa-pbtn:hover { background: var(--ed-ink); opacity: 0.88; }
.sa-btn:active, .sa-pbtn:active { transform: scale(0.97); transition-duration: 0.08s; }
.sa-btn:disabled, .sa-pbtn:disabled { opacity: 0.45; cursor: default; transform: none; }
.sa-btn.is-sm { height: 30px; min-height: 30px; font-size: 0.75rem; }
.sa-fld { position: relative; display: flex; align-items: center; gap: 8px; height: 36px; min-width: 0; padding: 0 11px; box-sizing: border-box; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); transition: box-shadow 0.25s; }
.sa-fld:focus-within { box-shadow: 0 0 0 1px var(--ed-line2); }
.sa-fld.is-invalid { box-shadow: 0 0 0 1px var(--ed-red); }
.sa-fld input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; box-shadow: none; color: var(--ed-ink); font-size: 0.7813rem; }
.sa-fld input:focus, .sa-fld input[aria-invalid='true'], .sa-fld input:invalid { border: 0; outline: 0; box-shadow: none; background: transparent; }
.sa-fld > b { color: var(--ed-ink3); font-size: 0.75rem; font-weight: 400; }
.sa-time, .sa-fld input.sa-time { font-family: var(--ed-mono); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.sa-select { padding: 0; }
.sa-select select { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0 28px 0 11px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: var(--ed-ink); font-size: 0.75rem; appearance: none; -webkit-appearance: none; cursor: pointer; }
.sa-select select:focus { box-shadow: none; }
.sa-select > svg { position: absolute; right: 10px; width: 11px; height: 11px; fill: none; stroke: var(--ed-ink3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.sa-select.is-shift select { color: var(--ed-amber); }
.sa-select.is-dim { opacity: 0.75; }
/* two-choice segments with a sliding thumb */
.sa-segs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sa-seg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: opacity 0.35s; }
.sa-seg { position: relative; display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--ed-card2); }
.sa-seg-thumb { position: absolute; top: 3px; bottom: 3px; left: calc(3px + var(--sa-i, 0) * ((100% - 8px) / 2 + 2px)); width: calc((100% - 8px) / 2); border-radius: 8px; background: var(--ed-raise); transition: left 0.45s var(--ed-ease); }
.sa-seg > button { position: relative; flex: 1; min-width: 0; height: 32px; min-height: 32px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ed-ink2); font-size: 0.75rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: color 0.25s; }
.sa-seg > button:hover { background: transparent; color: var(--ed-ink); }
.sa-seg > button[aria-checked='true'] { color: var(--ed-ink); font-weight: 600; }
.sa-seg.is-small { align-self: flex-start; width: 200px; }
.sa-seg.is-small > button { height: 28px; min-height: 28px; }
.sa-hint { color: var(--ed-ink3); font-size: 0.7188rem; }
.sa-rules .is-muted { opacity: 0.5; }
/* switches */
.sa-switches { display: flex; flex-direction: column; gap: 8px; }
.sa-switch { display: flex; align-items: center; gap: 12px; min-height: 0; height: auto; padding: 0; border: 0; background: transparent; color: var(--ed-ink); text-align: left; font-weight: 400; cursor: pointer; transition: opacity 0.35s; }
.sa-switch:hover { background: transparent; }
.sa-switch-track { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--ed-raise); transition: background-color 0.35s; }
.sa-switch-knob { 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); transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.35s; }
.sa-switch[aria-checked='true'] .sa-switch-track { background: var(--ed-ink); }
.sa-switch[aria-checked='true'] .sa-switch-knob { background: var(--ed-card); transform: translateX(16px); }
.sa-switch-copy > span { display: block; font-size: 0.8125rem; }
.sa-switch-copy > small { color: var(--ed-ink3); font-size: 0.75rem; }
.sa-timing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sa-timing-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: opacity 0.35s; }
.sa-timing-field .sa-fld { height: 30px; }
.sa-timing-field .sa-fld input { font-family: var(--ed-mono); font-size: 0.75rem; }
/* the decision path */
.sa-path { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--ed-line); list-style: none; }
.sa-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: stretch; }
.sa-step-rail { position: relative; display: flex; flex-direction: column; align-items: center; }
.sa-step-num { z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; box-sizing: border-box; border: 1.5px solid var(--ed-line); border-radius: 50%; background: transparent; color: var(--ed-ink3); font: normal 0.6875rem var(--ed-mono); transition: border-color 0.35s, background-color 0.35s, color 0.35s; }
.sa-step-line { flex: 1; width: 1.5px; margin-top: 2px; margin-bottom: -8px; background: var(--ed-line2); }
.sa-step:last-child .sa-step-line { background: transparent; }
.sa-step-card { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 9px 12px; border: 1px solid var(--ed-line); border-radius: 12px; background: transparent; opacity: 0.5; transition: border-color 0.35s, background-color 0.35s, opacity 0.35s; }
.sa-step-card strong { font-size: 0.8125rem; font-weight: 600; }
.sa-step-card small { color: var(--ed-ink3); font-size: 0.75rem; }
.sa-step.is-on .sa-step-num { border-color: var(--ed-ink3); background: var(--ed-ink); color: var(--ed-card); }
.sa-step.is-on .sa-step-card { border-color: var(--ed-ink3); background: var(--ed-card2); opacity: 1; }
/* order day to pickup day */
.sa-daymap { font-size: 0.7813rem; }
.sa-daymap-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; min-height: 38px; border-top: 1px solid var(--ed-line); }
.sa-daymap-row.is-head { min-height: 26px; height: 26px; border-top: 0; color: var(--ed-ink3); font-size: 0.7188rem; }
.sa-daymap-row > [role='rowheader'] { font-weight: 500; }
.sa-daymap .sa-select { height: 30px; }
/* arrangement hours */
.sa-hours { display: flex; flex-direction: column; gap: 8px; }
.sa-hours-rows { display: flex; flex-direction: column; gap: 6px; }
.sa-hours-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 96px; gap: 6px; align-items: center; }
.sa-hours-day { font-size: 0.7813rem; font-weight: 500; }
.sa-hours-row .sa-fld { height: 30px; }
.sa-hours-row.is-off .sa-fld:not(.sa-select) { opacity: 0.45; }
.sa-carriers { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; }
.sa-carriers.is-off { opacity: 0.45; }
.sa-carrier { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sa-carrier-name { color: var(--ed-ink3); font-size: 0.6875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-hours-rows.is-tiktok .sa-hours-row { padding-bottom: 6px; border-bottom: 1px solid var(--ed-line); }
.sa-hours-rows.is-tiktok .sa-hours-row:last-child { border-bottom: 0; }
/* save bar */
.sa-savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--ed-card); }
.sa-savebar > svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--ed-ink2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sa-savebar-note { flex: 1 1 260px; min-width: 0; color: var(--ed-ink2); font-size: 0.7813rem; }
.sa-dirty { color: var(--ed-ink3); font-size: 0.75rem; white-space: nowrap; }
.sa-dirty.is-amber { color: var(--ed-amber); }
.sa-error { flex: 1 1 100%; margin: 0; color: var(--ed-red); font-size: 0.75rem; }
.sa-error[hidden] { display: none; }
.sa-unlock-form { display: flex; flex-wrap: wrap; gap: 6px; }
.sa-unlock-form .sa-fld { width: 150px; height: 34px; }
.sa-rules-form.is-read-only .sa-seg > button, .sa-rules-form.is-read-only .sa-switch, .sa-rules-form.is-read-only select { cursor: default; }
.sa-rules-form.is-read-only .sa-seg > button:disabled, .sa-rules-form.is-read-only .sa-switch:disabled { opacity: 1; }
.sa-rules-form.is-read-only .sa-fld input:disabled, .sa-rules-form.is-read-only select:disabled { opacity: 1; color: var(--ed-ink); }
.sa-rules-form.is-read-only .sa-select.is-shift select:disabled { color: var(--ed-amber); }
.sa-rules-form.is-read-only [data-arrangement-apply-monday] { display: none; }
/* the shipment dialogs */
.admin-arrangement-event-overlay { display: grid; place-items: center; padding: 20px; box-sizing: border-box; overflow: auto; }
.admin-arrangement-event-overlay[hidden] { display: none; }
.sa-dlg, .admin-arrangement-event-dialog.sa-dlg { position: relative; left: auto; top: auto; z-index: 121; display: flex; flex-direction: column; gap: 14px; width: min(900px, calc(100vw - 40px)); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); box-sizing: border-box; overflow: hidden; padding: 20px; 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); transform: none; outline: 0; animation: sa-dlg-in 0.45s var(--ed-ease) both; }
.sa-dlg[hidden] { display: none; }
.sa-move { width: min(460px, calc(100vw - 40px)); overflow: auto; }
@keyframes sa-dlg-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.sa-dlg h3 { margin: 0; font-size: 1rem; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.sa-dlg .sa-sub { margin-top: 5px; color: var(--ed-ink2); font-size: 0.8125rem; }
.sa-dlg .sa-btn { height: 36px; min-height: 36px; padding: 0 13px; border-radius: 11px; }
.sa-dlg .sa-pbtn { height: 36px; min-height: 36px; padding: 0 15px; border-radius: 11px; }
.sa-dlg .sa-btn.is-sm { height: 32px; min-height: 32px; font-size: 0.75rem; }
.sa-dlg-head { display: flex; align-items: flex-start; gap: 12px; }
.sa-dlg-head > div { flex: 1; min-width: 0; }
.sa-progress { flex: none; display: block; height: 6px; border-radius: 9px; background: var(--ed-card2); overflow: hidden; }
.sa-progress > i { display: block; width: var(--sa-progress, 0%); height: 100%; border-radius: 9px; background: var(--ed-mint); transition: width 0.6s var(--ed-ease); }
.sa-dlg-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; min-height: 0; overflow: hidden; }
.sa-dlg-list { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px; margin: 0 -8px; }
.sa-dlg-row { flex: none; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: calc(100% + 16px); min-height: 0; height: auto; margin: 0 -8px; padding: 9px 8px; border: 0; border-top: 1px solid var(--ed-line); border-radius: 10px; background: transparent; color: var(--ed-ink); text-align: left; font-weight: 400; cursor: pointer; transition: background-color 0.2s; }
.sa-dlg-row:hover, .sa-dlg-row.is-selected { background: var(--ed-card2); }
.sa-dlg-row-copy { min-width: 0; }
.sa-dlg-row-copy > .sa-mono { display: block; font-size: 0.75rem; }
.sa-dlg-row-copy > small { display: block; color: var(--ed-ink3); font-size: 0.75rem; overflow-wrap: anywhere; }
.sa-dlg-row-status { font-size: 0.75rem; text-align: right; }
.sa-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ed-ink3); }
.sa-dot.is-mint { background: var(--ed-mint); }
.sa-dot.is-amber { background: var(--ed-amber); }
.sa-dot.is-red { background: var(--ed-red); }
.sa-dlg .is-mint { color: var(--ed-mint); }
.sa-dlg .is-amber { color: var(--ed-amber); }
.sa-dlg .is-red { color: var(--ed-red); }
.sa-dlg-empty { margin: 0; padding: 24px 0; color: var(--ed-ink3); font-size: 0.8125rem; }
.sa-dlg-detail { display: flex; flex-direction: column; gap: 10px; align-self: start; min-width: 0; max-height: 100%; box-sizing: border-box; overflow-y: auto; padding: 14px; border-radius: 14px; background: var(--ed-card2); }
.sa-dlg-detail[hidden] { display: none; }
.sa-dlg-detail > .admin-arrangement-order-breakdown { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sa-detail-id { color: var(--ed-ink3); font-size: 0.75rem; text-decoration: none; overflow-wrap: anywhere; }
a.sa-detail-id:hover { color: var(--ed-ink); text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }
.sa-detail-item { font-size: 0.875rem; font-weight: 600; overflow-wrap: anywhere; }
.sa-dl, .sa-dl.shipment-inspector-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; padding: 0; font-size: 0.7813rem; }
.sa-dl dt { color: var(--ed-ink3); }
.sa-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sa-dl dd.sa-mono { font-size: 0.75rem; }
.sa-money { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--ed-line); font-size: 0.7813rem; }
.sa-money > span { display: flex; justify-content: space-between; gap: 10px; color: var(--ed-ink3); }
.sa-money > span > b { color: var(--ed-ink); font: 500 0.75rem var(--ed-mono); white-space: nowrap; }
.sa-money > span.is-net { color: var(--ed-ink2); font-weight: 600; }
.sa-money > span.is-net > b { font-weight: 600; }
.sa-money > small { color: var(--ed-ink3); font-size: 0.7188rem; }
.sa-money.is-loading { gap: 8px; }
.sa-skel { display: block; height: 12px; border-radius: 6px; background: var(--ed-raise); animation: ed-breathe 1.6s ease-in-out infinite; }
.sa-skel.is-title { width: 70%; height: 16px; }
.sa-skel.is-option { height: 58px; border-radius: 12px; }
.sa-detail-error { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 10px; border-top: 1px solid var(--ed-line); font-size: 0.75rem; color: var(--ed-ink3); }
.sa-detail-error strong { color: var(--ed-ink); font-size: 0.7813rem; font-weight: 600; }
.sa-options { display: flex; flex-direction: column; gap: 6px; }
.sa-option { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 0; height: auto; padding: 10px 12px; border: 1px solid var(--ed-line); border-radius: 12px; background: transparent; color: var(--ed-ink); text-align: left; font-weight: 400; cursor: pointer; transition: border-color 0.3s, background-color 0.3s; }
.sa-option:hover { background: transparent; border-color: var(--ed-line2); }
.sa-option.is-selected { border-color: var(--ed-ink3); background: var(--ed-card2); }
.sa-option:disabled { opacity: 0.5; cursor: default; }
.sa-radio { flex: none; display: grid; place-items: center; width: 16px; height: 16px; box-sizing: border-box; border: 1.5px solid var(--ed-line2); border-radius: 50%; transition: border-color 0.3s; }
.sa-radio > i { width: 8px; height: 8px; border-radius: 50%; background: var(--ed-ink); transform: scale(0); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.sa-option.is-selected .sa-radio { border-color: var(--ed-ink); }
.sa-option.is-selected .sa-radio > i { transform: scale(1); }
.sa-option-copy { flex: 1; min-width: 0; }
.sa-option-copy strong { display: block; font-size: 0.8125rem; font-weight: 600; overflow-wrap: anywhere; }
.sa-option-copy small { color: var(--ed-ink3); font-size: 0.75rem; }
.sa-move-note { margin: 0; color: var(--ed-ink2); font-size: 0.7813rem; }
.sa-dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 1180px) {
  .sa-rules-grid { grid-template-columns: minmax(0, 1fr) 380px; }
  .sa-timing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sa-daymap-row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .sa-rules-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .sa-tabs { flex-wrap: wrap; gap: 4px 18px; padding-bottom: 8px; }
  .sa-tabs-meta { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; text-align: left; }
  .sa-segs, .sa-timing { grid-template-columns: minmax(0, 1fr); }
  .sa-card { padding: 14px; }
  .sa-daymap-row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); }
  .sa-hours-row { grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr) 88px; }
  .sa-savebar-note { flex-basis: calc(100% - 30px); }
  .sa-dirty { flex: 1; }
  .sa-unlock-form { flex: 1 1 100%; }
  .sa-unlock-form .sa-fld { flex: 1 1 140px; width: auto; }
  .admin-arrangement-event-overlay { place-items: end center; padding: 0; }
  .sa-dlg, .admin-arrangement-event-dialog.sa-dlg, .sa-move { width: 100%; max-height: 92vh; max-height: 92dvh; padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; overflow-y: auto; }
  .sa-dlg-body { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .sa-dlg-list { overflow: visible; }
  .sa-dlg-detail { order: -1; max-height: none; overflow: visible; }
}
@media (max-width: 1024px) and (pointer: coarse) {
  .sa-dlg :is(button, a.sa-detail-id), .sa-rules :is(.sa-btn, .sa-pbtn, .sa-seg > button) { min-height: 44px !important; }
  .sa-dlg .sa-btn, .sa-dlg .sa-pbtn, .sa-rules .sa-btn, .sa-rules .sa-pbtn { height: 44px; }
  a.sa-detail-id { display: flex; align-items: center; }
  .sa-switch { min-height: 44px !important; }
  .sa-fld, .sa-hours-row .sa-fld, .sa-daymap .sa-select, .sa-timing-field .sa-fld, .sa-unlock-form .sa-fld { height: 44px; }
  .sa-fld input, .sa-select select { font-size: max(16px, 1rem) !important; }
  .sa-tabs-list > button { height: 44px; line-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .sa-seg-thumb, .sa-switch-knob, .sa-switch-track, .sa-step-num, .sa-step-card, .sa-progress > i, .sa-radio > i, .sa-dlg { transition: none; animation: none; }
}
/* ---------- All orders: sortable headers, Product filter, pager (Orders board) and the phone list (PhoneOrders board) ---------- */
[data-ed-view-actions='orders'] { flex: 1 1 auto; min-width: 0; }
[data-ed-view-actions='orders'] > .ed-live { margin-right: auto; }
[data-ed-view-actions='store-ops'] { flex: 1 1 auto; min-width: 0; }
[data-ed-view-actions='store-ops'] > .ed-live { margin-right: auto; }
.ed-ops-foot .ed-orders-pager { margin-left: 0; }
.admin-orders-view .admin-orders-table-wrap { max-height: none; min-height: 0; overflow-x: auto; overflow-y: visible; }
.admin-orders-table thead th { height: 38px; vertical-align: middle; }
.ed-th { display: inline-flex; align-items: center; gap: 4px; min-height: 0; height: auto; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ed-ink3); font-size: 0.75rem; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color 0.2s; }
.ed-th:hover { background: transparent; color: var(--ed-ink); }
.ed-th.is-sorted { color: var(--ed-ink); font-weight: 500; }
.ed-th > svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: transform 0.35s var(--ed-ease), opacity 0.2s; }
.ed-th.is-sorted > svg { opacity: 1; }
.ed-th.is-asc > svg { transform: rotate(180deg); }
.admin-orders-table th.is-num { text-align: right; }
.admin-orders-table .admin-order-id { padding: 0; text-decoration-color: var(--ed-line2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.admin-order-channel i { width: 8px; height: 8px; border-radius: 2.5px; vertical-align: 0; }
/* one line per cell, as on the board: long product and buyer names end in an ellipsis; the full text is the tooltip */
.admin-orders-table td.admin-order-product { width: auto !important; min-width: 0; max-width: 220px; }
.admin-order-product > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: unset; line-clamp: unset; }
.admin-orders-table td.admin-order-buyer { min-width: 0; max-width: 200px; }
.admin-order-buyer strong, .admin-order-buyer small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; }
.admin-order-buyer small { margin-top: 2px; }
/* Orders board cells: text in 13px ink at weight 400, the time and order ID in 12px mono ink */
@media (min-width: 768px) {
  .admin-orders-table td.admin-order-time { color: var(--ed-ink); }
  .admin-orders-table .admin-order-id { font-weight: 400; }
  .admin-orders-table td.admin-order-channel, .admin-orders-table td.admin-order-product { font-size: 0.8125rem; }
  .admin-orders-table .admin-order-buyer strong { font-size: 0.8125rem; font-weight: 400; }
}
/* DirectDialogs board, "Mark … as paid": a title with one line under it, Cash / Bank cards, then the actions */
.admin-order-payment-dialog { width: min(460px, calc(100% - 24px)); }
.ed-pay-form { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.ed-pay-head h2 { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: normal; }
.ed-pay-head p { margin: 5px 0 0; color: var(--ed-ink2); font-size: 0.8125rem; line-height: 1.45; }
.ed-pay-form .admin-order-payment-methods.ed-pay-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.ed-pay-form .ed-pay-choice { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; box-sizing: border-box; min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--ed-line); border-radius: 13px; background: transparent; color: var(--ed-ink); cursor: pointer; transition: border-color 0.3s, background-color 0.3s; }
.ed-pay-form .ed-pay-choice:has(input:checked) { border-color: var(--ed-ink3); background: var(--ed-card2); }
.ed-pay-form .ed-pay-choice:has(input:focus-visible) { outline: 2px solid var(--ed-ink2); outline-offset: 2px; }
.ed-pay-form .ed-pay-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ed-pay-form .ed-pay-choice svg { width: 18px; height: 18px; fill: none; stroke: var(--ed-ink2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ed-pay-form .ed-pay-choice > span { display: flex; flex-direction: column; gap: 2px; padding: 0; }
.ed-pay-form .ed-pay-choice strong { font-size: 0.8125rem; font-weight: 600; }
.ed-pay-form .ed-pay-choice small { color: var(--ed-ink3); font-size: 0.75rem; }
.ed-pay-form .admin-modal-actions { margin-top: 0; }
@media (max-width: 480px) { .ed-pay-form .admin-order-payment-methods.ed-pay-choices { grid-template-columns: minmax(0, 1fr); } }
.admin-orders-table td.ed-orders-empty { height: auto; padding: 44px 20px !important; color: var(--ed-ink3); font-size: 0.7813rem; text-align: center; white-space: normal; }
.ed-orders-empty strong { display: block; margin-bottom: 6px; color: var(--ed-ink); font-size: 0.8438rem; font-weight: 600; }
.ed-orders-tool > svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-orders-tool:disabled { opacity: 0.45; }
.ed-orders-foot { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px 0 18px; }
.ed-orders-foot > .admin-panel-meta { flex: 1; min-width: 0; }
.ed-orders-pager { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.ed-orders-pager[hidden] { display: none; }
.ed-orders-page-btn { display: grid; place-items: center; width: 32px; height: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); cursor: pointer; transition: background-color 0.25s, transform 0.35s var(--ed-ease); }
.ed-orders-page-btn:hover { background: var(--ed-raise); }
.ed-orders-page-btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.ed-orders-page-btn:disabled { color: var(--ed-ink3); opacity: 0.55; cursor: default; transform: none; }
.ed-orders-page-btn:disabled:hover { background: var(--ed-card2); }
.ed-orders-page-btn > svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-orders-page-text { color: var(--ed-ink2); font: 0.75rem var(--ed-mono); white-space: nowrap; }
.ed-orders-product { position: relative; display: inline-flex; }
.ed-orders-filter-btn.is-set > b { font-weight: 500; }
.ed-orders-filter-btn > b { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ed-orders-product-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; display: flex; flex-direction: column; gap: 6px; width: 340px; max-height: min(440px, 70vh); box-sizing: border-box; padding: 8px; border: 1px solid var(--ed-line2); border-radius: 14px; background: var(--ed-menu); box-shadow: var(--ed-shm); animation: ed-fade 0.25s var(--ed-ease) both; }
.ed-orders-product-pop[hidden] { display: none; }
.ed-orders-product-search { display: flex; align-items: center; gap: 8px; flex: none; height: 36px; padding: 0 11px; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink3); }
.ed-orders-product-search svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ed-orders-product-search input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; color: var(--ed-ink); font-size: 0.7813rem; }
.ed-orders-product-tree { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ed-orders-product-tree .admin-empty { margin: 0; padding: 18px 8px; color: var(--ed-ink3); font-size: 0.75rem; text-align: center; }
.ed-orders-product-tree details { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.ed-orders-product-tree summary { display: flex; align-items: center; gap: 2px; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; list-style: none; cursor: pointer; }
.ed-orders-product-tree .admin-orders-nested-content { display: block; margin: 0; padding: 0 0 0 18px; border: 0; }
.ed-orders-product-tree summary::-webkit-details-marker { display: none; }
.ed-orders-product-tree summary::before { content: ''; flex: none; width: 22px; height: 30px; background: var(--ed-ink3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10 8 4 4-4 4'/%3E%3C/svg%3E") center / 12px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10 8 4 4-4 4'/%3E%3C/svg%3E") center / 12px no-repeat; transition: transform 0.3s var(--ed-ease); }
.ed-orders-product-tree details[open] > summary::before { transform: rotate(90deg); }
.ed-orders-product-tree .admin-orders-filter-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 1; min-width: 0; width: 100%; height: 30px; min-height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ed-ink); font-size: 0.7813rem; font-weight: 400; text-align: left; cursor: pointer; }
.ed-orders-product-tree .admin-orders-flavor-row { margin-left: 22px; width: calc(100% - 22px); }
.ed-orders-product-tree .admin-orders-filter-row:hover { background: var(--ed-card2); }
.ed-orders-product-tree .admin-orders-filter-row > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ed-orders-product-tree .admin-orders-filter-row > small { flex: none; color: var(--ed-ink3); font: 0.6875rem var(--ed-mono); }
.ed-orders-product-tree .admin-orders-filter-row.is-selected { background: var(--ed-raise); font-weight: 600; }
.ed-orders-product-tree .admin-orders-filter-row.is-selected::after { content: '✓'; flex: none; color: var(--ed-ink); font-size: 0.75rem; }
.ed-orders-product-foot { display: flex; justify-content: flex-end; gap: 6px; flex: none; padding-top: 6px; border-top: 1px solid var(--ed-line); }
.ed-orders-product-foot .ed-orders-tool { height: 32px; min-height: 32px; background: var(--ed-card2); color: var(--ed-ink); }
.ed-orders-product-foot .ed-orders-tool.is-primary { background: var(--ed-ink); color: var(--ed-card); font-weight: 600; }
.ed-orders-phone, .ed-orders-more { display: none; }
.ed-orders-phone[hidden], .ed-orders-more[hidden] { display: none !important; }
@media (max-width: 767px) {
  .admin-orders-view .ed-order-channels, .admin-orders-view .admin-orders-cancellation-quick, .admin-orders-view .admin-orders-actions > :not(.ed-orders-search), .admin-orders-view .ed-orders-foot { display: none !important; }
  .admin-orders-view .admin-panel-table { grid-template-columns: minmax(0, 1fr); background: transparent; border-radius: 0; overflow: visible; }
  .admin-orders-view .admin-panel-table > * { min-width: 0; }
  .admin-orders-view .admin-orders-toolbar { padding: 0 0 10px; }
  .admin-orders-view .admin-orders-actions { margin: 0; padding: 0; }
  .admin-orders-view .ed-orders-search { width: 100%; height: 42px; padding: 0 12px; border-radius: 12px; background: var(--ed-card2); }
  .admin-orders-view .ed-orders-search input { font-size: 0.875rem; }
  .ed-orders-phone { position: relative; display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }
  .ed-orders-phone-chips { display: flex; gap: 6px; margin: 0 -12px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .ed-orders-phone-chips::-webkit-scrollbar { display: none; }
  .ed-ochip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; min-height: 32px; padding: 0 12px; border: 1px solid var(--ed-line2); border-radius: 999px; background: transparent; color: var(--ed-ink); font-size: 0.7813rem; font-weight: 400; white-space: nowrap; cursor: pointer; transition: background-color 0.25s, border-color 0.25s; }
  .ed-ochip:hover { background: transparent; }
  .ed-ochip.is-on, .ed-ochip[aria-expanded='true'] { border-color: var(--ed-ink3); background: var(--ed-card2); color: var(--ed-ink); font-weight: 400; }
  .ed-ochip > svg { width: 11px; height: 11px; fill: none; stroke: var(--ed-ink3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .ed-orders-phone-menu { position: absolute; top: 40px; left: 0; right: 0; z-index: 30; display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; padding: 6px; border: 1px solid var(--ed-line2); border-radius: 14px; background: var(--ed-menu); box-shadow: var(--ed-shm); animation: ed-fade 0.25s var(--ed-ease) both; }
  .ed-orders-phone-menu[hidden] { display: none; }
  .ed-ochip-option { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ed-ink); font-size: 0.8125rem; font-weight: 400; text-align: left; }
  .ed-ochip-option > i { flex: none; width: 8px; height: 8px; border-radius: 2.5px; }
  .ed-ochip-option > span { flex: 1; min-width: 0; }
  .ed-ochip-option > b { color: var(--ed-ink3); font: 0.75rem var(--ed-mono); }
  .ed-ochip-option[aria-selected='true'] { background: var(--ed-card2); font-weight: 600; }
  .ed-orders-phone-sum { display: flex; justify-content: space-between; gap: 10px; margin: 0; color: var(--ed-ink3); font-size: 0.75rem; }
  .admin-orders-view .admin-orders-table tbody tr { margin: 0 0 8px; padding: 12px 14px; border-radius: 16px; background: var(--ed-card); }
  .admin-orders-view .admin-orders-table tbody tr > td:nth-child(10) strong { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
  .admin-orders-view .admin-orders-table tbody tr > td:nth-child(4) > span { white-space: normal; overflow: visible; }
  .admin-orders-view .admin-orders-table td.admin-order-buyer, .admin-orders-view .admin-orders-table td.admin-order-product { max-width: none; }
  .admin-orders-view .admin-orders-table tbody tr > td:nth-child(1) { font-size: 0.7188rem; font-family: var(--ed-font); }
  .admin-orders-view .admin-orders-table tbody tr > td:nth-child(7) { font-family: var(--ed-mono); font-size: 0.875rem; font-weight: 600; }
  .admin-orders-view .admin-orders-table tbody tr > td:nth-child(3) i { width: 8px; height: 8px; border-radius: 2.5px; }
  .admin-orders-view .admin-orders-table tbody tr:has(> td.admin-empty) { background: transparent; }
  .ed-orders-more { display: flex; align-items: center; justify-content: center; width: 100%; height: 40px; min-height: 40px; margin-top: 2px; border: 0; border-radius: 12px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.8125rem; font-weight: 400; }
}
@media (max-width: 767px) and (pointer: coarse) {
  .ed-ochip { min-height: 44px !important; }
  .ed-orders-more { min-height: 44px !important; }
}

/* ======================================================================================
   PhoneOverview board: below 768px the overview is its own layout. Period tabs, four tiles,
   Revenue by month, where the sales came from, top products and Syrup flavours, in that order.
   ====================================================================================== */
.ed-ph-periods, .ed-ph-kpis, .ed-ph-card { display: none !important; }
/* the chart range button stays on the card when the metric toggle runs out of room */
@media (max-width: 1023px) { .ed-chart-tools { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; } }
@media (max-width: 767px) {
  /* header: "Overview" with the shell's "● Live · 12.08" line under it (shell.css); the year, Sales recap and refresh are desktop-only */
  [data-admin-dashboard][data-active-view='overview'] .admin-topbar-actions { min-height: 0; padding: 0; }
  [data-admin-dashboard][data-active-view='overview'] .ed-view-actions[data-ed-view-actions='overview'] > :not(.ed-live) { display: none !important; }

  [data-view-panel='overview'].is-active { display: flex; flex-direction: column; gap: 10px; }
  [data-view-panel='overview'] > .ed-overview-grid, [data-view-panel='overview'] > .ed-overview-grid > .ed-row { display: contents; }
  [data-view-panel='overview'] > .ed-kpis,
  [data-view-panel='overview'] :is([data-chart-id='C4'], [data-chart-id='C5'], [data-chart-id='CL'], [data-chart-id='RO'], [data-chart-id='C7'], [data-chart-id='C8'], [data-chart-id='C12'], [data-chart-id='C13'], [data-chart-id='C14'], [data-chart-id='C2']) { display: none !important; }
  [data-view-panel='overview'] > * { margin: 0; }
  [data-view-panel='overview'] > .ad-monitor { order: 0; }
  [data-view-panel='overview'] > .ed-ph-periods { order: 1; }
  [data-view-panel='overview'] > .ed-ph-kpis { order: 2; }
  [data-view-panel='overview'] [data-chart-id='C1'] { order: 3; }
  [data-view-panel='overview'] > .ed-ph-sources { order: 4; }
  [data-view-panel='overview'] > .ed-ph-top { order: 5; }
  [data-view-panel='overview'] [data-chart-id='C6'] { order: 6; }

  /* period tabs: three equal segments on the card, the highlight slides between them */
  .ed-ph-periods { display: flex !important; box-sizing: border-box; width: 100%; max-width: none; gap: 2px; padding: 3px; border-radius: 12px; background: var(--ed-card); overflow: visible; }
  .ed-ph-periods > .admin-toggle-pill { flex: 1 1 0; min-width: 0; height: 32px; min-height: 32px; padding: 0 6px; border-radius: 9px; font-size: 0.7813rem; }

  /* the four tiles */
  .ed-ph-kpis { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ed-ph-kpi { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px; border-radius: 16px; background: var(--ed-card); animation: ed-rise 0.6s var(--ed-ease) both; }
  .ed-ph-kpi > span { font-size: 0.75rem; color: var(--ed-ink2); }
  .ed-ph-kpi > strong { font: 600 1.1875rem/1.25 var(--ed-mono); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .ed-ph-kpi > small { min-height: 1.4em; font-size: 0.7188rem; line-height: 1.4; color: var(--ed-ink3); }
  .ed-ph-kpi > small[data-tone='up'] { color: var(--ed-mint); }
  .ed-ph-kpi > small[data-tone='down'] { color: var(--ed-red); }

  /* where the sales came from, and top products */
  .ed-ph-card { display: flex !important; flex-direction: column; gap: 10px; box-sizing: border-box; min-width: 0; padding: 14px; border-radius: 18px; background: var(--ed-card); }
  .ed-ph-card h2 { margin: 0; color: var(--ed-ink); font-size: 0.875rem; font-weight: 600; letter-spacing: -0.005em; line-height: 1.4; }
  .ed-ph-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .ed-ph-head > span { flex: none; color: var(--ed-ink3); font-size: 0.75rem; }
  .ed-ph-share { display: flex; height: 10px; border-radius: 6px; background: var(--ed-card2); overflow: hidden; }
  .ed-ph-share > span { min-width: 2px; border-right: 2px solid var(--ed-card); transition: flex-grow 0.8s var(--ed-ease); }
  .ed-ph-share > span:last-child { border-right: 0; }
  .ed-ph-sources-list { display: flex; flex-direction: column; gap: 10px; }
  .ed-ph-source { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 0.8125rem; line-height: 1.4; }
  .ed-ph-source > i { flex: none; width: 9px; height: 9px; border-radius: 3px; }
  .ed-ph-source > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .ed-ph-source > b { flex: none; font: 400 0.7813rem var(--ed-mono); font-variant-numeric: tabular-nums; }
  .ed-ph-source > em { flex: none; width: 40px; color: var(--ed-ink3); font: normal 0.75rem var(--ed-mono); text-align: right; }
  .ed-ph-top { gap: 0; min-height: 230px; padding: 16px 18px; }
  .ed-ph-top h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ed-ph-sub { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
  .ed-ph-rank { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
  .ed-ph-rank-row { display: grid; grid-template-columns: 124px minmax(0, 1fr) minmax(36px, auto); align-items: center; gap: 10px; font-size: 0.7813rem; line-height: 1.4; }
  .ed-ph-rank-row > span:first-child { color: var(--ed-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ed-ph-rank-bar { height: 6px; border-radius: 999px; background: var(--ed-card2); overflow: hidden; }
  .ed-ph-rank-bar > i { display: block; height: 100%; border-radius: 999px; background: #b8b8b8; opacity: 0.92; animation: ed-ph-grow 0.8s var(--ed-ease) both; transform-origin: left; }
  :root[data-admin-theme='light'] .ed-ph-rank-bar > i { background: #4f4f4f; }
  .ed-ph-rank-bar > i.is-lead, :root[data-admin-theme='light'] .ed-ph-rank-bar > i.is-lead { background: var(--ed-ink); }
  .ed-ph-rank-row:hover .ed-ph-rank-bar > i { opacity: 1; }
  .ed-ph-rank-row > em { color: var(--ed-ink); font: normal 0.75rem var(--ed-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
  .ed-ph-more { margin: 12px 0 0; color: var(--ed-ink3); font-size: 0.75rem; }
  .ed-ph-empty { margin: 0; padding: 14px 0; color: var(--ed-ink3); font-size: 0.75rem; text-align: center; }
  .ed-ph-retry { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--ed-ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

  /* the two shared cards, as the board draws them on a phone */
  [data-view-panel='overview'] [data-chart-id='C1'], [data-view-panel='overview'] [data-chart-id='C6'] { flex: none !important; width: auto !important; height: 250px !important; min-height: 0; padding: 16px 18px; border-radius: 18px; }
  [data-view-panel='overview'] [data-chart-id='C1'] .ed-chart-tools, [data-view-panel='overview'] [data-chart-id='C6'] .admin-sliding-chart-toggle { display: none !important; }
  [data-view-panel='overview'] [data-chart-id='C1'] > .admin-panel-head, [data-view-panel='overview'] [data-chart-id='C6'] > .admin-panel-head { flex-direction: row; margin: 0 0 10px; }
}
@keyframes ed-ph-grow { from { transform: scaleX(0); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ed-ph-rank-bar > i, .ed-ph-kpi { animation: none; } }
/* ---------- Shipment arrangements, Schedule (Shipments board): status cards, then one timeline card ---------- */
.sh-schedule { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sh-schedule[hidden] { display: none; }
.sh-schedule .shipment-metrics { margin: 0; }
.sh-schedule .shipment-metrics > button { transition: transform 0.45s var(--ed-ease), border-color 0.3s, background-color 0.3s; }
.sh-schedule .shipment-metrics > button:hover { transform: translateY(-2px); border-color: transparent; }
.sh-schedule .shipment-metrics > button[aria-pressed='true'] { border-color: var(--ed-line); }
.sh-schedule .shipment-metrics > button.is-red[aria-pressed='true'] { border-color: color-mix(in srgb, var(--ed-red) 40%, transparent); }
.sh-schedule .shipment-metrics > button.is-amber[aria-pressed='true'] { border-color: color-mix(in srgb, var(--ed-amber) 40%, transparent); }
.sh-schedule .shipment-metrics > button.is-green[aria-pressed='true'] { border-color: color-mix(in srgb, var(--ed-mint) 35%, transparent); }
.sh-schedule .shipment-notice:not([hidden]) { margin: 0; }
.shipment-board { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px 18px 18px; border-radius: var(--ed-r-card); background: var(--ed-card); }
.sh-schedule .shipment-toolbar { position: relative; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; margin: 0; padding: 0; border-radius: 0; background: transparent; text-align: left; }
.sh-schedule .shipment-toolbar h3 { margin: 0 10px 0 0; font-size: 0.875rem; font-weight: 600; }
.sh-schedule .shipment-day-nav { display: flex; gap: 2px; margin: 0; padding: 3px; border-radius: 12px; background: var(--ed-card2); }
.sh-schedule .shipment-day-nav > button { display: grid; place-items: center; width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--ed-ink2); font-weight: 400; transition: background-color 0.25s, transform 0.35s var(--ed-ease); }
.sh-schedule .shipment-day-nav > button:hover { background: var(--ed-raise); }
.sh-schedule .shipment-day-nav > button:active { transform: scale(0.96); transition-duration: 0.08s; }
.sh-schedule .shipment-day-nav > button > svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sh-schedule .shipment-day-nav > .shipment-day-label { width: auto; padding: 0 12px; background: var(--ed-raise); color: var(--ed-ink); font-size: 0.7813rem; font-weight: 600; white-space: nowrap; }
.sh-schedule .shipment-today { height: 30px; min-height: 30px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ed-ink2); font-size: 0.75rem; font-weight: 400; text-decoration: underline; text-decoration-color: var(--ed-line2); text-underline-offset: 3px; }
.sh-schedule .shipment-today:hover { background: transparent; color: var(--ed-ink); }
.sh-schedule .shipment-today[hidden] { display: none; }
.sh-schedule .shipment-date { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.sh-schedule .shipment-gap { flex: 1; }
.sh-schedule .shipment-select select { max-width: 200px; }
.sh-schedule .shipment-search { display: flex; align-items: center; gap: 8px; width: 254px; height: 36px; box-sizing: border-box; padding: 0 12px; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink3); transition: box-shadow 0.25s; }
.sh-schedule .shipment-search:focus-within { box-shadow: 0 0 0 1px var(--ed-line2); }
.sh-schedule .shipment-search > svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sh-schedule .shipment-search > input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; box-shadow: none; color: var(--ed-ink); font-size: 0.7813rem; }
.sh-schedule .admin-arrangement-agenda { padding: 0; border-radius: 0; background: transparent; }
/* the timeline: 150px of courier and shop, then the hour track */
.shipment-grid { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 12px; }
.shipment-hours { position: relative; height: 22px; }
.shipment-hours > span { position: absolute; top: 0; color: var(--ed-ink3); font: 0.6563rem var(--ed-mono); white-space: nowrap; transform: translateX(-50%); }
.shipment-hours > span:last-child { transform: translateX(-100%); }
.sh-schedule .shipment-other header { margin: 0; padding: 0; }
.shipment-row-label { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 52px; border-top: 1px solid var(--ed-line); font-size: 0.7813rem; }
.shipment-row-label.is-more { border-top: 0; }
.shipment-row-label > i { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.shipment-row-label > span { min-width: 0; }
.shipment-row-label strong { display: block; overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.shipment-row-label small { display: block; overflow: hidden; color: var(--ed-ink3); font-size: 0.7188rem; white-space: nowrap; text-overflow: ellipsis; }
.shipment-track { position: relative; min-height: 52px; border-top: 1px solid var(--ed-line); }
.shipment-track.is-more { border-top: 0; }
.sh-schedule .shipment-lane { position: absolute; top: 9px; display: flex; align-items: center; gap: 6px; width: auto; min-width: 44px; height: 34px; min-height: 34px; margin: 0; padding: 0 9px; box-sizing: border-box; border: 1px solid var(--ed-line2); border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.75rem; font-weight: 400; text-align: left; white-space: nowrap; overflow: hidden; cursor: pointer; transform-origin: left; animation: sh-blk 0.6s var(--ed-ease) var(--sh-delay, 0s) both; transition: transform 0.35s var(--ed-ease), background-color 0.25s; }
.sh-schedule .shipment-lane:hover { background: var(--ed-raise); transform: translateY(-1px); }
.sh-schedule .shipment-lane:focus-visible { z-index: 3; outline: 2px solid var(--ed-ink2); outline-offset: 2px; }
.sh-schedule .shipment-lane > b { flex: none; font: 600 0.75rem var(--ed-mono); }
.sh-schedule .shipment-lane > .shipment-lane-state { min-width: 0; overflow: hidden; color: var(--ed-ink2); text-overflow: ellipsis; }
.sh-schedule .shipment-lane > .shipment-window-time { display: none; }
.sh-schedule .shipment-lane.is-mint { border-color: color-mix(in srgb, var(--ed-mint) 45%, transparent); }
.sh-schedule .shipment-lane.is-amber { border-color: color-mix(in srgb, var(--ed-amber) 55%, transparent); }
.sh-schedule .shipment-lane.is-red { border-color: color-mix(in srgb, var(--ed-red) 55%, transparent); }
@keyframes sh-blk { from { opacity: 0; transform: scaleX(0.6); } to { opacity: 1; transform: none; } }
@keyframes sh-now { 50% { opacity: 0.55; } }
.sh-schedule .shipment-now { position: absolute; top: 22px; bottom: 0; left: calc(162px + (100% - 162px) * var(--sh-now, 0)); z-index: 2; width: 0; border-left: 1.5px dashed var(--ed-ink2); pointer-events: none; animation: sh-now 2.4s ease-in-out infinite; }
.sh-schedule .shipment-now > span { position: absolute; top: -20px; left: 0; padding: 1px 6px; border-radius: 6px; background: var(--ed-ink); color: var(--ed-card); font: 0.625rem var(--ed-mono); white-space: nowrap; transform: translateX(-50%); }
.sh-schedule .shipment-other { margin: 6px 0 0; }
.sh-schedule .shipment-other header h4 { margin: 0; font-size: 0.8125rem; font-weight: 600; }
.sh-schedule .shipment-other header h4 span { color: var(--ed-ink3); font: 400 0.75rem var(--ed-mono); }
.sh-schedule .shipment-other header p { margin: 2px 0 8px; color: var(--ed-ink3); font-size: 0.75rem; }
.sh-schedule .shipment-order-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sh-schedule .shipment-show-more { margin-top: 10px; }
.sh-schedule .shipment-legend { margin: 0; color: var(--ed-ink2); font-size: 0.7813rem; }
.sh-schedule .shipment-legend summary { width: max-content; color: var(--ed-ink); font-size: 0.7813rem; cursor: pointer; }
.sh-schedule .shipment-legend p { max-width: 760px; margin: 8px 0 0; }
@media (max-width: 1180px) {
  .sh-schedule .shipment-search { width: 200px; }
}
@media (max-width: 767px) {
  .sh-schedule .shipment-lane { display: flex !important; grid-template-columns: none !important; grid-template-areas: none; padding-bottom: 0; }
}
@media (max-width: 680px) {
  .shipment-board { padding: 14px 12px 14px; }
  .sh-schedule .shipment-toolbar h3 { flex: 1 1 auto; }
  .sh-schedule .shipment-gap { display: none; }
  .sh-schedule .shipment-select { flex: 1 1 140px; }
  .sh-schedule .shipment-select select { flex: 1; max-width: none; }
  .sh-schedule .shipment-search { flex: 1 1 100%; width: auto; }
  .shipment-grid { grid-template-columns: minmax(0, 1fr); }
  .shipment-hours, .shipment-hours-spacer, .sh-schedule .shipment-now { display: none; }
  .shipment-row-label { min-height: 0; padding: 10px 0 6px; }
  .shipment-row-label.is-more { display: none; }
  .shipment-track { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; padding: 0 0 10px; border-top: 0; }
  .sh-schedule .shipment-lane { position: static !important; flex: 0 1 auto; width: auto !important; max-width: 100%; height: 34px; }
  .sh-schedule .shipment-lane > .shipment-window-time { position: static; z-index: auto; display: inline; padding: 0; color: var(--ed-ink3); font: 0.6875rem/1.3 var(--ed-mono); overflow: hidden; text-overflow: ellipsis; transform: none; pointer-events: none; }
}
@media (max-width: 1024px) and (pointer: coarse) {
  .sh-schedule .shipment-lane, .sh-schedule .shipment-search, .sh-schedule .shipment-select { min-height: 44px !important; height: 44px; }
  .sh-schedule .shipment-day-nav > button { width: 44px; min-width: 44px; height: 44px; }
  .sh-schedule .shipment-day-nav > .shipment-day-label { width: auto; }
  .sh-schedule .shipment-today { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-schedule .shipment-lane, .sh-schedule .shipment-now, .sh-schedule .shipment-metrics > button { animation: none; transition: none; }
}

/* ======================================================================================
   Preferences board: theme tiles, locale and time, Shopee authorization, browsers and devices,
   the assistant connection and API health, on a 12-column grid (5/7, 7/5, 6/6).
   ====================================================================================== */
.ed-pref { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; align-content: start; }
.ed-pref-card { position: relative; grid-column: span 6; display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; min-width: 0; padding: 16px 18px; border-radius: 18px; background: var(--ed-card); color: var(--ed-ink); animation: ed-rise 0.6s var(--ed-ease) both; }
.ed-pref-theme, .ed-pref-devices { grid-column: span 5; }
.ed-pref-locale, .ed-pref-shopee { grid-column: span 7; }
.ed-pref-theme, .ed-pref-locale { gap: 14px; }
.ed-pref-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ed-pref-head > div:first-child { min-width: 0; }
.ed-pref-card h2 { margin: 0; color: var(--ed-ink); font-size: 0.875rem; font-weight: 600; letter-spacing: normal; line-height: 1.4; }
.ed-pref-head p { margin: 3px 0 0; color: var(--ed-ink3); font-size: 0.75rem; line-height: 1.4; }
.ed-pref-btn, .ed-pref-primary { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.7813rem; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform 0.35s var(--ed-ease), background-color 0.25s, opacity 0.25s; }
.ed-pref-btn:hover { background: var(--ed-raise); color: var(--ed-ink); }
.ed-pref-primary { background: var(--ed-ink); color: var(--ed-card); font-weight: 600; }
.ed-pref-primary:hover { opacity: 0.88; }
.ed-pref-btn:active, .ed-pref-primary:active { transform: scale(0.97); transition-duration: 0.08s; }
.ed-pref-btn:disabled, .ed-pref-primary:disabled { opacity: 0.45; cursor: default; transform: none; }
.ed-pref-btn svg, .ed-pref-primary svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* theme tiles, each a small picture of the theme */
.ed-pref-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ed-pref-tile { display: flex; flex-direction: column; gap: 9px; min-width: 0; height: auto; min-height: 0; padding: 8px 8px 10px; border: 1px solid var(--ed-line); border-radius: 14px; background: transparent; color: var(--ed-ink); text-align: left; cursor: pointer; transition: border-color 0.3s, background-color 0.3s; }
.ed-pref-tile:hover { background: var(--ed-card2); }
.ed-pref-tile[aria-checked='true'] { border-color: var(--ed-ink3); background: var(--ed-card2); }
.ed-pref-mini { --mini-frame: #0b0b0b; --mini-panel: #141414; --mini-card: #1f1f1f; display: flex; gap: 4px; height: 62px; box-sizing: border-box; padding: 5px 5px 5px 0; border-radius: 9px; background: var(--mini-frame); overflow: hidden; }
.ed-pref-mini.is-light { --mini-frame: #262626; --mini-panel: #f2f2f2; --mini-card: #ffffff; }
.ed-pref-mini-nav { display: flex; flex-direction: column; gap: 4px; width: 20px; box-sizing: border-box; padding: 3px 0 0 5px; }
.ed-pref-mini-nav i { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); }
.ed-pref-mini-nav i:first-child { background: #c9a0ff; }
.ed-pref-mini-panel { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 6px; background: var(--mini-panel); }
.ed-pref-mini-panel i { border-radius: 3px; background: var(--mini-card); }
.ed-pref-mini-panel i:last-child { grid-column: span 2; }
.ed-pref-mini-split { flex: 1; display: grid; gap: 4px; margin-left: -4px; padding: 5px; border-radius: 0 6px 6px 0; background: #f2f2f2; }
.ed-pref-mini-split i { border-radius: 3px; background: #ffffff; }
.ed-pref-tile-label { display: flex; align-items: center; gap: 8px; padding: 0 2px; font-size: 0.8125rem; font-weight: 500; }
.ed-pref-tile[aria-checked='true'] .ed-pref-tile-label { font-weight: 600; }
.ed-pref-radio { flex: none; display: grid; place-items: center; width: 15px; height: 15px; box-sizing: border-box; border: 1.5px solid var(--ed-line2); border-radius: 50%; }
.ed-pref-radio i { width: 7px; height: 7px; border-radius: 50%; background: var(--ed-ink); transform: scale(0); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ed-pref-tile[aria-checked='true'] .ed-pref-radio { border-color: var(--ed-ink); }
.ed-pref-tile[aria-checked='true'] .ed-pref-radio i { transform: scale(1); }
.ed-pref-note { margin: 0; color: var(--ed-ink2); font-size: 0.7813rem; }

/* locale and time */
.ed-pref-preview { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding: 7px 12px; border-radius: 12px; background: var(--ed-card2); }
.ed-pref-preview strong { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.ed-pref-preview span { color: var(--ed-ink2); font: 0.75rem var(--ed-mono); white-space: nowrap; }
.ed-pref-locale-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.ed-pref-field { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ed-pref-field > span { color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-pref-select { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; min-height: 40px; box-sizing: border-box; padding: 0 12px; border: 0; border-radius: 11px; background: var(--ed-card2); color: var(--ed-ink); font-size: 0.8438rem; text-align: left; cursor: pointer; transition: box-shadow 0.25s, background-color 0.25s; }
.ed-pref-select:hover { background: var(--ed-raise); }
.ed-pref-select[aria-expanded='true'] { box-shadow: 0 0 0 1px var(--ed-ink3); background: var(--ed-card2); }
.ed-pref-select > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-pref-select > small { color: var(--ed-ink3); font: 0.75rem var(--ed-mono); white-space: nowrap; }
.ed-pref-select > svg { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--ed-ink3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ed-ease); }
.ed-pref-select[aria-expanded='true'] > svg { transform: rotate(180deg); }
.ed-pref-menu { position: absolute; z-index: 6; top: 72px; left: 0; right: 0; display: flex; flex-direction: column; gap: 2px; padding: 5px; border: 1px solid var(--ed-line2); border-radius: 13px; background: var(--ed-menu); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42); animation: ed-pref-menu 0.28s var(--ed-ease); outline: 0; }
.ed-pref-menu[hidden] { display: none; }
.ed-pref-option { display: flex; align-items: center; gap: 10px; height: 36px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ed-ink); text-align: left; cursor: pointer; transition: background-color 0.2s; }
.ed-pref-option:hover, .ed-pref-option:focus-visible, .ed-pref-option[aria-selected='true'] { background: var(--ed-card2); }
.ed-pref-option:focus-visible { outline: 2px solid var(--ed-ink2); outline-offset: -2px; }
.ed-pref-option > span { flex: 1; min-width: 0; font-size: 0.8125rem; font-weight: 500; }
.ed-pref-option[aria-selected='true'] > span { font-weight: 600; }
.ed-pref-option > small { color: var(--ed-ink3); font: 0.75rem var(--ed-mono); }
.ed-pref-option > svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.ed-pref-menu > .ed-pref-option::after { display: none; }
.ed-pref-option[aria-selected='true'] > svg { opacity: 1; }
@keyframes ed-pref-menu { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.ed-pref-seg { --pref-count: 2; --pref-index: 0; --pref-w: calc((100% - 6px - (var(--pref-count) - 1) * 2px) / var(--pref-count)); position: relative; display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--ed-card2); }
.ed-pref-seg-thumb { position: absolute; top: 3px; bottom: 3px; left: calc(3px + var(--pref-index) * (var(--pref-w) + 2px)); width: var(--pref-w); border-radius: 9px; background: var(--ed-raise); transition: left 0.45s var(--ed-ease); }
.ed-pref-seg > button { position: relative; flex: 1; min-width: 0; height: 34px; min-height: 34px; padding: 0 6px; border: 0; border-radius: 9px; background: transparent; color: var(--ed-ink2); font: 500 0.75rem var(--ed-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: color 0.25s; }
.ed-pref-seg > button:hover { color: var(--ed-ink); }
/* narrower than the board: the date field gets the wider column and its labels step down, so
   "Dec 13, 2026" never ends in an ellipsis */
.ed-pref-locale, .ed-pref-field { container-type: inline-size; }
@container (max-width: 600px) { .ed-pref-locale-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
@container (max-width: 300px) { .ed-pref-seg > button { padding: 0 3px; font-size: 0.6875rem; } }
@container (max-width: 270px) { .ed-pref-seg > button { padding: 0 2px; font-size: 0.6563rem; } }
.ed-pref-seg > button[aria-checked='true'] { color: var(--ed-ink); font-weight: 600; }

/* Shopee authorization */
.ed-pref-notice { padding: 9px 12px; border: 1px solid var(--ed-line2); border-radius: 12px; color: var(--ed-ink2); font-size: 0.75rem; }
.ed-pref-notice.is-error { border-color: rgba(255, 107, 129, 0.45); color: var(--ed-red); }
.ed-pref-notice[hidden] { display: none; }
.ed-pref-shops { display: flex; flex-direction: column; }
.ed-pref-shop { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 104px; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--ed-line); }
.ed-pref-shop-name { min-width: 0; }
.ed-pref-shop-name strong { display: block; font-size: 0.8438rem; font-weight: 600; overflow-wrap: anywhere; }
.ed-pref-shop-name small { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-pref-shop-name small i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ed-pref-shop-name small.is-connected { color: var(--ed-mint); }
.ed-pref-shop-name small.is-renewal-due { color: var(--ed-amber); }
.ed-pref-shop-name small.is-expired { color: var(--ed-red); }
.ed-pref-shop-name small > span { color: var(--ed-ink3); }
.ed-pref-shop-date { min-width: 0; color: var(--ed-ink3); font-size: 0.75rem; }
.ed-pref-shop-date b { display: block; color: var(--ed-ink); font: 500 0.7813rem var(--ed-mono); }
.ed-pref-shop > button { justify-self: end; font-weight: 600; }
.ed-pref-foot { margin: 0; padding-top: 10px; border-top: 1px solid var(--ed-line); color: var(--ed-ink3); font-size: 0.75rem; }
.ed-pref-empty { margin: 0; padding: 14px 0; border-top: 1px solid var(--ed-line); color: var(--ed-ink3); font-size: 0.75rem; }

/* browsers and devices */
.ed-pref-me { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 13px; background: var(--ed-card2); }
.ed-pref-me-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--ed-ink3); font-size: 0.75rem; white-space: nowrap; }
.ed-pref-me-line b { min-width: 0; color: var(--ed-ink2); font: 500 0.7188rem var(--ed-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-pref-me-row, .ed-pref-add-form { display: flex; gap: 8px; }
.ed-pref-add-form { margin-top: -4px; }
.ed-pref-add-form[hidden] { display: none; }
.ed-pref-input { flex: 1; min-width: 0; display: flex; align-items: center; height: 36px; box-sizing: border-box; padding: 0 11px; border-radius: 10px; background: var(--ed-card); transition: box-shadow 0.25s, background-color 0.25s; }
.ed-pref-add-form .ed-pref-input { background: var(--ed-card2); }
.ed-pref-input:hover { background: var(--ed-raise); }
.ed-pref-input:focus-within { box-shadow: 0 0 0 1px var(--ed-ink3); background: var(--ed-card2); }
.ed-pref-input input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; color: var(--ed-ink); font-size: 0.8125rem; }
.ed-pref-input.is-mono input { font: 0.7813rem var(--ed-mono); }
.ed-pref-input input::placeholder { color: var(--ed-ink3); }
.ed-pref-me-row .ed-pref-primary, .ed-pref-add-form .ed-pref-btn { height: 36px; min-height: 36px; }
.ed-pref-add { display: flex; align-items: center; justify-content: space-between; height: 36px; min-height: 36px; margin: 0 -6px; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; color: var(--ed-ink2); font-size: 0.7813rem; cursor: pointer; transition: background-color 0.2s; }
.ed-pref-add:hover { background: var(--ed-card2); }
.ed-pref-add svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: transform 0.35s var(--ed-ease); }
.ed-pref-add[aria-expanded='true'] svg { transform: rotate(45deg); }
.ed-pref-error { margin: 0; color: var(--ed-red); font-size: 0.75rem; }
.ed-pref-ignored { display: flex; flex-direction: column; gap: 2px; }
.ed-pref-ignored-head { color: var(--ed-ink3); font-size: 0.75rem; }
.ed-pref-ignored-list { display: flex; flex-direction: column; gap: 2px; }
.ed-pref-ignored-row { display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0 -6px; padding: 0 6px; border-radius: 10px; transition: background-color 0.2s; }
.ed-pref-ignored-row:hover { background: var(--ed-card2); }
.ed-pref-ignored-row > span { flex: 1; min-width: 0; }
.ed-pref-ignored-row strong { display: block; font-size: 0.8125rem; font-weight: 500; overflow-wrap: anywhere; }
.ed-pref-ignored-row small { display: block; color: var(--ed-ink3); font: 0.7188rem var(--ed-mono); overflow-wrap: anywhere; }
.ed-pref-remove { flex: none; height: 28px; min-height: 28px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--ed-ink2); font-size: 0.75rem; cursor: pointer; transition: background-color 0.25s, color 0.25s; }
.ed-pref-remove:hover { background: var(--ed-raise); color: var(--ed-ink); }
.ed-pref-none { margin: 4px 0 0; padding: 12px; border: 1px dashed var(--ed-line2); border-radius: 12px; color: var(--ed-ink3); font-size: 0.7813rem; text-align: center; }

/* assistant connection */
.ed-pref-caps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ed-pref-caps li { display: flex; align-items: center; gap: 10px; min-height: 34px; border-top: 1px solid var(--ed-line); font-size: 0.7813rem; }
.ed-pref-caps li i { flex: none; width: 15px; height: 15px; background: var(--ed-ink3); -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.2' stroke-linecap='round'%3E%3Cpath d='M7 12h10'/%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.2' stroke-linecap='round'%3E%3Cpath d='M7 12h10'/%3E%3C/svg%3E") center / contain no-repeat; }
.ed-pref-caps li span { flex: 1; min-width: 0; }

/* API health */
.ed-pref-health-count { display: flex; align-items: baseline; gap: 8px; }
.ed-pref-health-count strong { font: 600 1.625rem var(--ed-mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ed-pref-health-count span { color: var(--ed-ink2); font-size: 0.7813rem; }
.ed-pref-health-bar { display: grid; grid-template-columns: repeat(var(--pref-health-count, 14), minmax(0, 1fr)); gap: 4px; }
.ed-pref-health-bar:empty { display: none; }
.ed-pref-health-bar span { height: 6px; border-radius: 3px; background: var(--ed-mint); }
.ed-pref-health-bar span.is-bad { background: var(--ed-red); }
.ed-pref-health-row { display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0 -6px; padding: 0 6px; border-radius: 10px; color: var(--ed-ink); text-decoration: none; transition: background-color 0.2s; }
.ed-pref-health-row:hover { background: var(--ed-card2); color: var(--ed-ink); }
.ed-pref-health-row i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ed-red); }
.ed-pref-health-row span { flex: 1; min-width: 0; font-size: 0.7813rem; overflow-wrap: anywhere; }
.ed-pref-health-row b { flex: none; color: var(--ed-red); font: 400 0.75rem var(--ed-mono); }
.ed-pref-health-more, .ed-pref-health-error { margin: 0; color: var(--ed-ink3); font-size: 0.75rem; }

/* the renew dialog */
dialog.ed-pref-dialog { position: fixed; inset: 170px auto auto calc((100vw + var(--ed-nav-w, 0px)) / 2 - 230px); width: 460px; max-width: calc(100vw - 24px); margin: 0; padding: 0; background: var(--ed-card); }
dialog.ed-pref-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.ed-pref-dialog-card { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 20px 22px; }
.ed-pref-dialog-card h2 { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
.ed-pref-dialog-card h2 + p { margin: 4px 0 0; color: var(--ed-ink3); font-size: 0.7813rem; }
.ed-pref-dialog-card ol { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ed-pref-dialog-card li { display: flex; gap: 10px; color: var(--ed-ink2); font-size: 0.8125rem; }
.ed-pref-dialog-card li > span:first-child { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ed-card2); color: var(--ed-ink); font: 0.7188rem var(--ed-mono); }
.ed-pref-dialog-card li > span:last-child { padding-top: 2px; }
.ed-pref-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.ed-pref-dialog-actions > button { height: 38px; min-height: 38px; padding: 0 14px; border-radius: 11px; font-size: 0.8125rem; }

/* a long list of ignored browsers scrolls inside the card rather than stretching the row */
.ed-pref-ignored-list { max-height: 228px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (max-width: 1100px) {
  .ed-pref-card, .ed-pref-theme, .ed-pref-locale, .ed-pref-shopee, .ed-pref-devices { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .ed-pref-head { flex-wrap: wrap; }
  .ed-pref-locale > .ed-pref-head > .ed-pref-preview { align-items: flex-start; width: 100%; box-sizing: border-box; }
  .ed-pref-locale-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-pref-shop { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .ed-pref-shop-name { grid-column: 1 / -1; }
  .ed-pref-me-row, .ed-pref-add-form { flex-wrap: wrap; }
  .ed-pref-me-row .ed-pref-input { flex-basis: 100%; }
  .ed-pref-me-row .ed-pref-primary { flex: 1; }
  .ed-pref-tile-label { gap: 6px; padding: 0; font-size: 0.75rem; }
}
@media (max-width: 767px) {
  dialog.ed-pref-dialog { inset: auto 12px 12px 12px; width: auto; }
  .ed-pref-dialog-actions { flex-wrap: wrap; }
  .ed-pref-dialog-actions > button { flex: 1; }
}
@media (max-width: 1024px) and (pointer: coarse) {
  .ed-pref-btn, .ed-pref-primary, .ed-pref-select, .ed-pref-option, .ed-pref-seg > button, .ed-pref-add, .ed-pref-remove { min-height: 44px !important; }
  .ed-pref-me-row .ed-pref-primary, .ed-pref-add-form .ed-pref-btn, .ed-pref-input { height: 44px; }
  .ed-pref-menu { top: 82px; }
}
@media (prefers-reduced-motion: reduce) { .ed-pref-card, .ed-pref-menu { animation: none; } .ed-pref-seg-thumb, .ed-pref-radio i { transition: none; } }
