@charset "UTF-8";
:root {
  /* --- Control Center (tb-*) --- */
  --tb-aubergine-900: #220d39;
  --tb-aubergine-700: #3c2851;
  --tb-coral-500: #ed7455;
  --tb-coral-700: #ba5036;
  --tb-coral-800: #a24228;
  --tb-coral-900: #8f3a25;
  --tb-coral-50: #fbeae5;
  --tb-focus: #5767ce;
  --tb-ink: #121826;
  --tb-slate: #4a5567;
  --tb-grey: #666;
  --tb-placeholder: #8a8794;
  --tb-surface: #f4f3f5;
  --tb-surface-hover: #e9e6ee;
  --tb-border: #dddae2;
  --tb-border-strong: #d2ced7;
  --tb-border-hover: #c5c0cc;
  --tb-rule: #eeedf1;
  --tb-rule-strong: #e4e2e9;
  --tb-row-hover: #faf9fb;
  --tb-danger: #a3223f;
  --tb-danger-dark: #8a1a34;
  --tb-success-bg: #def1e4;
  --tb-success-fg: #2c5e3b;
  --tb-danger-bg: #f9e3e2;
  --tb-danger-fg: #94294c;
  --tb-warn-bg: #fdf0d9;
  --tb-warn-fg: #8a5300;
  --tb-info-bg: #e5ecf7;
  --tb-info-fg: #34548a;
  --tb-neutral-bg: #e9ecf1;
  --tb-neutral-fg: #4a5567;
  --tb-coral-bg: #fbeae5;
  --tb-coral-fg: #a24228;
  --tb-aubergine-bg: #ece6f2;
  --tb-aubergine-fg: #3c2851;
  --tb-code-bg: #402754;
  --tb-radius-sm: 0.25rem;
  --tb-radius: 0.375rem;
  --tb-radius-lg: 0.5rem;
  --tb-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* --- Page --- */
  --body-bg: #fff;
  --body-max-width: 100rem;
  --body-font-family: PPFraktionSans, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, Liberation Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  --heading-font-family: PPNeueMontreal, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, Liberation Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  --link-color: #ff6b4a;
  --link-hover-color: #dd5739;
  /* --- Buttons --- */
  --button-border-radius: 0.5rem;
  --button-focus-outline-color: #dd5739;
  --button-primary-bg: #ff6b4a;
  --button-primary-border-color: #ff6b4a;
  --button-primary-box-shadow: none;
  --button-primary-hover-bg: #dd5739;
  --button-primary-hover-border-color: #dd5739;
  --button-primary-active-bg: #bb4328;
  --button-primary-active-border-color: #bb4328;
  --button-primary-active-box-shadow: none;
  --button-primary-disabled-bg: #761a05;
  /* --- Google button --- */
  --button-google-border-color: #d0d5dd;
  --button-google-color: #2e343c;
  --button-google-hover-bg: #f1f4f7;
  --button-google-hover-color: #171a1e;
  /* --- Okta button --- */
  --button-okta-hover-border-color: #007dc1;
  --button-okta-hover-color: #007dc1;
  /* --- Inputs & form controls --- */
  --input-border-radius: 0.5rem;
  --form-switch-checked-bg: #dd5739;
  --form-type-check-input-checked-bg: #dd5739;
  --form-type-check-input-border-color: #d0d5dd;
  /* --- Alerts --- */
  --alert-padding-x: 0.75rem;
  --alert-padding-y: 0.75rem;
  --alert-border-width: 0.125rem;
  --alert-border-radius: 0.25rem;
  --alert-warning-bg: #ffeacb;
  --alert-warning-color: #7b5c00;
  --alert-warning-border-color: currentcolor;
  /* --- Cards --- */
  --card-border-radius: 1rem;
  --card-shadow: 0 1px 2px rgba(26, 4, 50, .04), 0 6px 24px rgba(26, 4, 50, .05);
  /* --- Tables & pagination --- */
  --table-divider-border-color: #d0d5dd;
  --table-thead-sorted-marker-color: #ff6b4a;
  --pagination-active-bg: #ff6b4a;
  /* --- Sidebar --- */
  --sidebar-bg: #250b3b;
  --sidebar-padding-left: 0;
  --sidebar-padding-right: 0;
  --sidebar-max-width: 15rem;
  --sidebar-compact-width: 3.125rem;
  --sidebar-menu-color: #fff;
  --sidebar-menu-border-radius: 0.5rem;
  --sidebar-menu-submenu-color: #fff;
  --sidebar-menu-active-item-bg: #402754;
  --sidebar-menu-active-item-color: #fff;
  --sidebar-menu-icon-active-color: #ff6b4a;
  --sidebar-locale-color: #fff;
  --sidebar-rule: #402754;
  --sidebar-collapse-icon-color: rgba(255, 255, 255, .7);
  --sidebar-icon-hover-bg: rgba(255, 255, 255, .12);
  --sidebar-heading-color: rgba(204, 204, 204, 1);
  --sidebar-locale-border: var(--sidebar-rule);
  --sidebar-locale-border-hover: rgba(255, 255, 255, .55);
  --sidebar-locale-menu-bg: #2d0f42;
  --sidebar-locale-menu-active: #4a2c5e;
  --sidebar-locale-menu-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, .35);
  --sidebar-select-bg: rgba(255, 255, 255, .08);
  --sidebar-select-border: rgba(255, 255, 255, .3);
  --sidebar-light-bg: #59426c;
  /* --- Login page --- */
  --page-login-bg: #250b3b;
  --page-login-form-control-button-bg:#ff6b4a;
  /* --- Content header --- */
  --content-search-border-color: #e5e7eb;
  --content-search-bg: #fff;
  --content-search-input-bg: #fff;
  --content-top-scrolled-bg: #fff;
  --content-top-scrolled-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, .08);
  /* --- App header --- */
  --app-header-padding-block: 1.5rem;
  --app-header-gap: 1.5rem;
  --app-header-title-size: 2.375rem;
  --app-header-title-color: #111827;
  --app-header-control-h: 2rem;
  --app-header-store-w: 12.25rem;
  --app-header-help-color: #000;
  --app-header-avatar: 2rem;
  --app-header-avatar-bg: var(--dashboard-brand-orange, #ff6b4a);
  --app-header-avatar-color: #fff;
  --app-header-avatar-size: 1.25rem;
  /* --- Or-separator --- */
  --or-separator-color: #98a2b3;
  --or-separator-border-color: #d0d5dd;
  /* --- Bar chart --- */
  --bar-percent-color: #2e343c;
  --bar-label-color: #000;
  --bar-label-icon-color: #6b7280;
  --bar-fill-bg: #e8ecf2;
  /* --- CRUD page shell --- */
  --toolbar-gap: 0.75rem;
  --toolbar-filter-bg: #dbe5f6;
  --toolbar-filter-hover-bg: #cddcf2;
  /* --- Dashboard --- */
  --dashboard-surface-bg: #fff;
  --dashboard-surface-border: #d3ced8;
  --dashboard-control-bg: #f4f3f5;
  --dashboard-control-border: #dfdfdf;
  --dashboard-scrollbar-bg: #9b9b9b;
  --dashboard-table-rule: #e9eaeb;
  --dashboard-table-rule-strong: #d3ced8;
  --dashboard-kpi-rule: 0.0625rem solid var(--dashboard-surface-border);
  --dashboard-text-primary: #000;
  --dashboard-text-secondary: #666;
  --dashboard-radius-card: 0.5rem;
  --dashboard-radius-control: 0.25rem;
  --dashboard-gap-200: 0.25rem;
  --dashboard-gap-300: 0.5rem;
  --dashboard-gap-400: 0.75rem;
  --dashboard-gap-500: 1rem;
  --dashboard-gap-600: 1.5rem;
  --dashboard-success-bg: #f1f9f0;
  --dashboard-success-text: #46743d;
  --dashboard-danger-bg: #fdeeea;
  --dashboard-danger-text: #9a4a38;
  --dashboard-warning-bg: #ffefdb;
  --dashboard-warning-text: #66471e;
  --dashboard-brand-orange: #ff6b4a;
  --dashboard-brand: #c9472b;
  --dashboard-brand-lighter: #ffad9b;
  --dashboard-brand-lightest: #ffe9e4;
  --dashboard-highlight-blue: #eff6ff;
  --dashboard-control-size: 1rem;
  --dashboard-control-border-idle: #929292;
  --dashboard-control-radius: 0.25rem;
  /* --- Calendar --- */
  --dashboard-calendar-border: #e5e5e5;
  --dashboard-day-muted: #929292;
  --dashboard-day-cell: 2rem;
  --dashboard-series-qomit: #507cb8;
  --dashboard-series-native: #c9472b;
  /* --- Embed --- */
  --embed-warning-bg: #fdf4e6;
  --embed-warning-text: #8a5a1f;
  --embed-muted-bg: #f1f0f3;
  --embed-muted-text: #5b5667;
  --embed-destructive: #d63939;
  --embed-destructive-active: #b02a2a;
  /* --- Changelog type badges --- */
  --changelog-type-feature-bg: #cee3ff;
  --changelog-type-feature-color: #2c4a7a;
  --changelog-type-improvement-bg: #f5e7ff;
  --changelog-type-improvement-color: #6b4a8a;
  --changelog-type-change-bg: #ffc3b8;
  --changelog-type-change-color: #9a4a38;
  --changelog-type-fix-bg: #e6deec;
  --changelog-type-fix-color: #5a4a6b;
}

/* ============================================================
 * Index of component partials.
 *
 * Two purposes:
 *  - wire the styles of EasyAdmin/Bootstrap components to our component design tokens
 *  - tweak a few CSS rules when needed
 *
 * Add a new entry whenever you create a file under ./components/.
 * ============================================================ */
/* ============================================================
 * "Connect your AI assistant" — packages/merchant/Resources/views/ai_assistants/index.html.twig
 *
 * Built from the dashboard tokens (shared with the Overview) and shapes, not new ones: the white default page,
 * cards bordered with --dashboard-surface-border on --dashboard-radius-card, controls on the
 * page background, the brand orange only for what is ACTIONABLE (the step numbers, the copy
 * button, the screenshot highlights it echoes).
 *
 * The tabs echo the dashboard's segmented controls: white, bordered,
 * the selected one filled with --dashboard-brand-lightest and bold. One segmented control, no
 * underline tabs, so the page reads as part of the same product.
 * ============================================================ */
.tb-ai {
  display: flex;
  flex-direction: column;
  gap: var(--dashboard-gap-600);
  max-width: 68.75rem;
  padding-bottom: var(--dashboard-gap-600);
  color: var(--dashboard-text-primary);
  /* --- Intro and server URL ------------------------------------------------- */
  /* --- Tabs (the Overview's period-scale control) --------------------------- */
  /* --- Steps ------------------------------------------------------------------ */
  /* Text beside the screenshot on a wide screen, above it on a narrow one: a step reads as
     "do this — here", and the screenshot is the "here". */
  /* --- Coding assistants (terminal commands) --------------------------------- */
  /* --- After connecting ------------------------------------------------------- */
}
.tb-ai__intro {
  display: flex;
  flex-direction: column;
  gap: var(--dashboard-gap-500);
}
.tb-ai__lead {
  margin: 0;
  max-width: 47.5rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--dashboard-text-secondary);
}
.tb-ai__url-card {
  display: flex;
  flex-direction: column;
  gap: var(--dashboard-gap-300);
  padding: var(--dashboard-gap-500);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
}
.tb-ai__url-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}
.tb-ai__url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--dashboard-gap-300);
}
.tb-ai__url-value {
  flex: 1 1 17.5rem;
  min-width: 0;
  padding: var(--dashboard-gap-300) var(--dashboard-gap-400);
  background: var(--dashboard-control-bg);
  border-radius: var(--dashboard-radius-control);
  font-size: 0.9375rem;
  color: var(--dashboard-text-primary);
  overflow-wrap: anywhere;
}
.tb-ai__copy {
  display: inline-flex;
  align-items: center;
  gap: var(--dashboard-gap-300);
  height: 2.375rem;
  padding: 0 var(--dashboard-gap-500);
  background: var(--button-primary-bg);
  border: 0;
  border-radius: var(--button-border-radius);
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.tb-ai__copy:hover {
  background: var(--button-primary-hover-bg);
}
.tb-ai__copy:active {
  background: var(--button-primary-active-bg);
}
.tb-ai__copy:focus-visible {
  outline: 0.125rem solid var(--button-focus-outline-color);
  outline-offset: 0.125rem;
}
.tb-ai__url-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--dashboard-text-secondary);
}
.tb-ai__tablist {
  display: inline-flex;
  gap: var(--dashboard-gap-300);
  margin-bottom: var(--dashboard-gap-500);
}
.tb-ai__tab {
  min-width: 7rem;
  height: 2.25rem;
  padding: 0 var(--dashboard-gap-500);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-control-border);
  border-radius: var(--dashboard-radius-control);
  font-size: 0.875rem;
  color: var(--dashboard-text-primary);
  cursor: pointer;
}
.tb-ai__tab:hover {
  background: var(--dashboard-control-bg);
}
.tb-ai__tab[aria-selected=true] {
  background: var(--dashboard-brand-lightest);
  border-color: transparent;
  font-weight: 700;
}
.tb-ai__tab:focus-visible {
  outline: 0.125rem solid var(--button-focus-outline-color);
  outline-offset: 0.125rem;
}
.tb-ai__panel:focus-visible {
  outline: 0.125rem solid var(--button-focus-outline-color);
  outline-offset: 0.25rem;
  border-radius: var(--dashboard-radius-card);
}
.tb-ai__notice {
  display: flex;
  align-items: flex-start;
  gap: var(--dashboard-gap-400);
  margin-bottom: var(--dashboard-gap-500);
  padding: var(--dashboard-gap-400) var(--dashboard-gap-500);
  background: var(--dashboard-control-bg);
  border-radius: var(--dashboard-radius-card);
  font-size: 0.875rem;
  line-height: 1.5;
}
.tb-ai__notice i {
  margin-top: 0.1875rem;
  color: var(--dashboard-text-secondary);
}
.tb-ai__notice p {
  margin: 0;
}
.tb-ai__steps {
  display: flex;
  flex-direction: column;
  gap: var(--dashboard-gap-500);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-ai__step {
  display: grid;
  grid-template-columns: minmax(13.75rem, 1fr) minmax(0, 2fr);
  gap: var(--dashboard-gap-600);
  align-items: start;
  padding: var(--dashboard-gap-500);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
}
@media (max-width: 900px) {
  .tb-ai__step {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--dashboard-gap-400);
  }
}
.tb-ai__step-text {
  display: flex;
  flex-direction: column;
  gap: var(--dashboard-gap-300);
}
.tb-ai__step-number {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--dashboard-brand-orange);
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
}
.tb-ai__step-title {
  margin: 0;
  font-family: var(--heading-font-family);
  font-size: 1.125rem;
  line-height: 1.3;
}
.tb-ai__step-body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--dashboard-text-secondary);
}
.tb-ai__step-url {
  margin: 0;
}
.tb-ai__step-url code {
  display: inline-block;
  padding: var(--dashboard-gap-200) var(--dashboard-gap-300);
  background: var(--dashboard-brand-lightest);
  border-radius: var(--dashboard-radius-control);
  font-size: 0.8125rem;
  color: var(--dashboard-text-primary);
  overflow-wrap: anywhere;
}
.tb-ai__shot {
  margin: 0;
  /* Sized to the IMAGE, not the column: a portrait capture (a dialog, the consent screen)
     stretched to two thirds of the page would be taller than the screen. */
}
.tb-ai__shot a {
  display: inline-block;
  max-width: 100%;
  border-radius: var(--dashboard-radius-card);
  overflow: hidden;
  border: 0.0625rem solid var(--dashboard-table-rule);
  box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.08);
}
.tb-ai__shot a:focus-visible {
  outline: 0.125rem solid var(--button-focus-outline-color);
  outline-offset: 0.125rem;
}
.tb-ai__shot img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 32.5rem;
}
.tb-ai__shot--missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--dashboard-gap-300);
  min-height: 10rem;
  padding: var(--dashboard-gap-500);
  background: var(--dashboard-control-bg);
  border: 0.0625rem dashed var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--dashboard-text-secondary);
}
.tb-ai__shot--missing i {
  font-size: 1.375rem;
}
.tb-ai__shot--missing p {
  margin: 0;
  max-width: 26.25rem;
}
.tb-ai__help {
  display: flex;
  flex-wrap: wrap;
  gap: var(--dashboard-gap-500);
  margin: var(--dashboard-gap-500) 0 0;
  font-size: 0.875rem;
}
.tb-ai__help i {
  font-size: 0.6875rem;
}
.tb-ai__cli {
  display: flex;
  flex-direction: column;
  gap: var(--dashboard-gap-400);
  padding: var(--dashboard-gap-500);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
  font-size: 0.875rem;
  line-height: 1.55;
}
.tb-ai__cli-title {
  margin: 0;
  font-family: var(--heading-font-family);
  font-size: 1.125rem;
}
.tb-ai__cli-intro {
  margin: 0;
  color: var(--dashboard-text-secondary);
}
.tb-ai__cli-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: var(--dashboard-gap-500);
}
.tb-ai__cli-tool {
  display: flex;
  flex-direction: column;
  gap: var(--dashboard-gap-300);
  min-width: 0;
}
.tb-ai__cli-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.tb-ai__cli-step {
  margin: var(--dashboard-gap-200) 0 0;
  font-weight: 600;
}
.tb-ai__cli-command {
  font-family: var(--font-family-monospace, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}
.tb-ai__after {
  padding: var(--dashboard-gap-500);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
  font-size: 0.875rem;
  line-height: 1.55;
}
.tb-ai__after p {
  margin: 0 0 var(--dashboard-gap-300);
}
.tb-ai__after-title {
  margin: 0 0 var(--dashboard-gap-300);
  font-family: var(--heading-font-family);
  font-size: 1.125rem;
}
.tb-ai__examples {
  margin: 0 0 var(--dashboard-gap-400);
  padding-left: var(--dashboard-gap-600);
  color: var(--dashboard-text-primary);
}
.tb-ai__examples li + li {
  margin-top: var(--dashboard-gap-200);
}
.tb-ai__after-note {
  color: var(--dashboard-text-secondary);
}

.alert {
  --bs-border-radius: var(--alert-border-radius);
  padding: var(--alert-padding-y) var(--alert-padding-x);
  border-width: 0 0 0 var(--alert-border-width);
}

.badge.badge-type {
  background-color: #ede7f6;
  color: #6750a4;
}
.badge.badge-type.icons_texts {
  background-color: #cee3ff;
  color: #2c4a7a;
}
.badge.badge-type.trustpilot {
  background-color: #fbe7cc;
  color: #8a5a1f;
}
.badge.badge-type.cross_sell {
  background-color: #f6d9e8;
  color: #8a3a64;
}
.badge.badge-type.delivery_cutoff {
  background-color: #d8e9de;
  color: #2e6b49;
}

.badge.badge-traffic.mixed {
  background-color: #cee3ff;
  color: #2c4a7a;
}
.badge.badge-traffic.isolated {
  background-color: #fbe7cc;
  color: #8a5a1f;
}
.badge.badge-traffic.total {
  background-color: #f6d9e8;
  color: #8a3a64;
}

.changelog-type-badge.changelog-type-feature {
  color: var(--changelog-type-feature-color);
  background-color: var(--changelog-type-feature-bg);
}
.changelog-type-badge.changelog-type-improvement {
  color: var(--changelog-type-improvement-color);
  background-color: var(--changelog-type-improvement-bg);
}
.changelog-type-badge.changelog-type-change {
  color: var(--changelog-type-change-color);
  background-color: var(--changelog-type-change-bg);
}
.changelog-type-badge.changelog-type-fix {
  color: var(--changelog-type-fix-color);
  background-color: var(--changelog-type-fix-bg);
}

.badge.badge-status.active {
  background-color: #d8e9de;
  color: #2e6b49;
}
.badge.badge-status.inactive {
  background-color: #ebe9f0;
  color: #5b5667;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.bar-chart .bar-container {
  padding: 0.5rem 0.75rem;
  display: flex;
  box-sizing: border-box;
  height: auto;
  min-height: 2.5rem;
  border-radius: 0.25rem;
  background: transparent;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bar-chart .bar-container .bar-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--bar-label-color);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  z-index: 10;
  position: relative;
}
.bar-chart .bar-container .bar-label > i {
  color: var(--bar-label-icon-color);
}
.bar-chart .bar-container .bar-percent {
  font-weight: 600;
  color: var(--bar-percent-color);
  white-space: nowrap;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
  z-index: 10;
  position: relative;
}
.bar-chart .bar-container .bar-fill {
  background-color: var(--bar-fill-bg);
  height: 100%;
  display: block;
  border-radius: 0.25rem;
  transition: width 0.3s ease;
  position: absolute;
  inset: 0;
  width: var(--bar-width, 0%);
}

.btn-primary.disabled,
.btn-primary:disabled {
  --bs-btn-disabled-bg: var(--button-primary-disabled-bg);
  --bs-btn-disabled-border-color: var(--button-primary-disabled-bg);
  --button-disabled-opacity: 0.65;
}

.btn-group.btn-group-filter {
  padding: 0.1875rem;
  border-radius: var(--tb-radius);
  background: var(--tb-surface);
}
.btn-group.btn-group-filter > .btn, .btn-group.btn-group-filter > button, .btn-group.btn-group-filter > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2rem;
  padding: 0 0.875rem;
  border: 0;
  border-radius: var(--tb-radius-sm);
  background: transparent;
  color: var(--tb-slate);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn-group.btn-group-filter > .btn:hover, .btn-group.btn-group-filter > button:hover, .btn-group.btn-group-filter > a:hover {
  color: var(--tb-ink);
  text-decoration: none;
}
.btn-group.btn-group-filter > .btn.is-on, .btn-group.btn-group-filter > .btn[aria-pressed=true], .btn-group.btn-group-filter > button.is-on, .btn-group.btn-group-filter > button[aria-pressed=true], .btn-group.btn-group-filter > a.is-on, .btn-group.btn-group-filter > a[aria-pressed=true] {
  background: #fff;
  color: var(--tb-ink);
  box-shadow: 0 1px 2px rgba(34, 13, 57, 0.12);
}
.btn-group.btn-group-filter > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group.btn-group-filter > :not(.btn-check:first-child) + .btn {
  border-radius: var(--tb-radius-sm);
}
.btn-group.btn-group-filter .btn-check:checked + .btn {
  background: #fff;
  color: var(--tb-ink);
  box-shadow: 0 1px 2px rgba(34, 13, 57, 0.12);
}
.btn-group.btn-group-filter.btn-group-sm > .btn, .btn-group.btn-group-filter.btn-group-sm > button, .btn-group.btn-group-filter.btn-group-sm > a {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
}

.date-range-filter {
  padding: 0.1875rem;
  border-radius: var(--tb-radius);
  background: var(--tb-surface);
}
.date-range-filter input[type=date].form-control {
  height: 2.125rem;
  min-height: 0;
  border: 0;
  border-radius: var(--tb-radius-sm);
  background: #fff;
  color: var(--tb-ink);
}

.card {
  --bs-card-spacer-x: 1.5rem;
  --bs-card-spacer-y: 1.5rem;
  --bs-card-bg: #fff;
  --bs-card-border-radius: var(--tb-radius-lg);
  --bs-card-inner-border-radius: var(--tb-radius-lg);
  --bs-card-border-color: var(--tb-border);
  box-shadow: none;
}
.card .card {
  background-color: var(--tb-surface) !important;
}
.card .nav-tabs {
  --bs-nav-link-color: var(--bs-nav-tabs-link-active-color);
  --bs-nav-link-hover-color: var(--bs-nav-tabs-link-active-color);
  --bs-nav-tabs-link-active-border-color: var(--bs-card-border-color) var(--bs-card-border-color) transparent var(--bs-card-border-color);
  --bs-nav-tabs-link-hover-border-color: var(--bs-card-border-color) var(--bs-card-border-color) transparent var(--bs-card-border-color);
}

.has-char-counter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.char-counter {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #98a2b3;
}

/* ============================================================
 * The toggle group — ONE render for every set of exclusive/multi toggle buttons:
 *
 *  - an expanded ChoiceType (markup: input.btn-check + label.btn, rendered by
 *    templates/form/btn_group_toggle.html.twig and the CI form's choice_widget_expanded) —
 *    selection via `:checked`;
 *  - the per-locale translation tabs (`.locale-tabs`, also carrying this class; Bootstrap tab
 *    JS keeps working through data-bs-toggle on the buttons) — selection via `.active`.
 *
 * The render is the CI threshold toggles': recessed `--tb-surface` buttons that fill coral
 * when selected. Specificity note (tasks/lessons.md): keep any later override BELOW the
 * `:checked` rules, or the selected state silently dies.
 * ============================================================ */
.btn-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.btn-toggle-group .btn {
  --bs-btn-padding-y: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.25rem;
  margin: 0;
  padding: 0 0.875rem;
  border: 1px solid transparent;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
  color: var(--tb-ink);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}
.btn-toggle-group .btn-check + .btn:hover,
.btn-toggle-group .btn:hover {
  border-color: transparent;
  background-color: var(--tb-surface-hover);
  color: var(--tb-ink);
}
.btn-toggle-group.is-invalid .btn {
  border-color: var(--tb-danger);
}
.btn-toggle-group .btn-check:checked + .btn,
.btn-toggle-group .btn-check:checked + .btn:hover,
.btn-toggle-group .btn.active,
.btn-toggle-group .btn.active:hover {
  border-color: var(--tb-coral-700);
  background-color: var(--tb-coral-700);
  color: #fff;
}
.btn-toggle-group .btn-check:focus-visible + .btn,
.btn-toggle-group .btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(87, 103, 206, 0.18);
}

.locale-tabs {
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}
.locale-tabs .nav-item {
  margin: 0;
}

.collapse:not(.show) {
  display: none !important;
}

/* ============================================================
 * The DEFAULT page shell: the Control Center look over EasyAdmin's own markup.
 *
 * Any CRUD on EasyAdmin's stock templates — the internal console's, and any future one —
 * gets the new design from this file alone: nothing here forks a template. The layout
 * differences are arrangement, so they are expressed as CSS over the classes EasyAdmin
 * already emits (`.content-header`, `.page-actions`, `.form-column`, `.form-fieldset`,
 * `.datagrid`) plus the thin overrides in `templates/bundles/EasyAdminBundle/crud/`, which
 * only move blocks between the header rows.
 *
 * Bespoke product pages (body `tb-crud`) own their layout and use the `tb-*` components in
 * `_tb-page.scss` instead; they replace EasyAdmin's `ea-*` body classes, so nothing below
 * reaches them. The VALUES below mirror `_tb-page.scss` — change the two files together.
 *
 * The header rows:
 *
 *   list     row 1  title ........................ store selector
 *            row 2  .................. search · filter · create
 *
 *   form     row 1  back link .................... store selector
 *            row 2  title ......................... save actions
 *
 * EasyAdmin renders row 1 in `.content-top` and row 2 in `.content-header`, so both are a
 * matter of deciding which of the two carries the title. That is the `.ea-new`/`.ea-edit`
 * body class below, not a template fork.
 * ============================================================ */
/* --- Console-scoped framework tokens -------------------------------------
   EasyAdmin paints `.btn` and links from these custom properties. Scoped to `.main-content`
   — the login page has none, so its own design (which reads the `:root` values) is
   untouched. */
.main-content {
  --button-border-radius: var(--tb-radius);
  --button-primary-bg: var(--tb-coral-700);
  --button-primary-border-color: var(--tb-coral-700);
  --button-primary-hover-bg: var(--tb-coral-800);
  --button-primary-hover-border-color: var(--tb-coral-800);
  --button-primary-active-bg: var(--tb-coral-900);
  --button-primary-active-border-color: var(--tb-coral-900);
  --button-secondary-bg: #fff;
  --button-secondary-border-color: var(--tb-border-strong);
  --button-secondary-color: var(--tb-ink);
  --button-secondary-hover-bg: var(--tb-surface);
  --button-secondary-hover-border-color: var(--tb-border-strong);
  --button-secondary-hover-color: var(--tb-ink);
  /* Links reach 4.5:1 on white with coral 700, the canvas's own rule — the brand orange is
     for surfaces, not text. */
  --link-color: var(--tb-coral-700);
  --link-hover-color: var(--tb-coral-900);
}

/* The control geometry the tokens cannot express: the 40px button. `:not` keeps the small
   row/toolbar variants on EasyAdmin's own scale; `:where` keeps this DEFAULT at (0,1,0) so any
   component that owns its buttons (`.btn-toggle-group`'s 36px toggles, …) wins without a fight. */
.main-content :where(.btn:not(.btn-sm):not(.btn-lg):not(.dropdown-toggle)) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding-top: 0;
  padding-bottom: 0;
  font-weight: 500;
  box-shadow: none;
}

/* --- Inputs: the canvas's field look -------------------------------------
   Mirrors `.tb-field` in `_tb-page.scss`, over every Symfony/EasyAdmin widget. The search
   boxes opt back out below (they draw their own frame around a borderless input). */
.main-content .form-control,
.main-content .form-select {
  border-color: var(--tb-border);
  border-radius: var(--tb-radius);
  color: var(--tb-ink);
  box-shadow: none;
}
.main-content .form-control:hover,
.main-content .form-select:hover {
  border-color: var(--tb-border-hover);
}
.main-content .form-control:focus,
.main-content .form-select:focus {
  outline: none;
  border-color: var(--tb-focus);
  box-shadow: 0 0 0 3px rgba(87, 103, 206, 0.18);
}
.main-content .form-control::placeholder,
.main-content .form-select::placeholder {
  color: var(--tb-placeholder);
}

.main-content input.form-control:not(textarea),
.main-content select.form-select {
  min-height: 2.375rem;
}

/* TomSelect copies the select's class onto its wrapper; the box is drawn on the wrapper and
   must grow with a multi-select's rows. */
.main-content .ts-wrapper.form-select,
.main-content .ts-wrapper.form-control {
  height: auto;
  min-height: 2.375rem;
}
.main-content .ts-wrapper.form-select.focus,
.main-content .ts-wrapper.form-control.focus {
  border-color: var(--tb-focus);
  box-shadow: 0 0 0 3px rgba(87, 103, 206, 0.18);
}

/* --- Badges: the canvas's shape and tones over EasyAdmin's ---------------- */
.main-content .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 1.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--tb-radius-sm);
  font-size: 0.78125rem;
  font-weight: 500;
  line-height: 1;
}
.main-content .badge.badge-boolean-true {
  background: var(--tb-success-bg);
  color: var(--tb-success-fg);
}
.main-content .badge.badge-boolean-false {
  background: var(--tb-neutral-bg);
  color: var(--tb-neutral-fg);
}
.main-content .badge.badge-secondary {
  background: var(--tb-neutral-bg);
  color: var(--tb-neutral-fg);
}
.main-content .badge.badge-success {
  background: var(--tb-success-bg);
  color: var(--tb-success-fg);
}
.main-content .badge.badge-danger {
  background: var(--tb-danger-bg);
  color: var(--tb-danger-fg);
}
.main-content .badge.badge-warning {
  background: var(--tb-warn-bg);
  color: var(--tb-warn-fg);
}
.main-content .badge.badge-info {
  background: var(--tb-info-bg);
  color: var(--tb-info-fg);
}

/* --- Row 2, list pages: search · filter · create ------------------------- */
/* Keyed on the toolbar rather than on `.ea-index`, so a list that is NOT an EasyAdmin CRUD
   lines up with the others by declaring the same markup, instead of needing a rule of its
   own that would then drift. */
.content-header:has(.ea-toolbar) {
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.ea-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--toolbar-gap);
  align-items: center;
  justify-content: flex-end;
  inline-size: 100%;
  /* EasyAdmin's search form, relocated out of the top bar by the index override, drawn as
     the canvas's search pill (`.tb-search`): a recessed box, bordered only on focus. */
  /* The filter control as the canvas's chip: recessed, borderless until engaged. */
}
.ea-toolbar .content-search {
  flex: initial;
  margin: 0;
}
.ea-toolbar .content-search .form-group {
  padding: 0;
}
.ea-toolbar .content-search .form-group .form-widget {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.5rem;
  padding-inline: 0.25rem;
  background-color: var(--tb-surface);
  border: solid 0.0625rem transparent;
  border-radius: var(--tb-radius-sm);
}
.ea-toolbar .content-search .form-group .form-widget:focus-within {
  border-color: var(--tb-focus);
  background: #fff;
}
.ea-toolbar .content-search .form-group .form-control {
  min-height: 0;
  min-inline-size: 13.75rem !important;
  padding-left: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.ea-toolbar .content-search .form-group .form-control:focus {
  border: 0;
  box-shadow: none;
}
.ea-toolbar .content-search .form-group .icon {
  inline-size: 2.25rem;
  color: var(--tb-grey);
}
.ea-toolbar .content-search .content-search-label {
  padding: 0;
}
.ea-toolbar .content-search .content-search-reset {
  background: none;
}
.ea-toolbar .content-search .content-search-reset:hover {
  background: none;
}
.ea-toolbar .action-filters-button {
  min-height: 2.5rem;
  background-color: var(--tb-surface);
  border-color: transparent;
  color: var(--tb-ink);
}
.ea-toolbar .action-filters-button:hover, .ea-toolbar .action-filters-button:focus, .ea-toolbar .action-filters-button.action-filters-button-count {
  background-color: var(--tb-surface);
  border-color: var(--tb-border-strong);
  color: var(--tb-ink);
}
.ea-toolbar .datagrid-filters,
.ea-toolbar .global-actions {
  margin: 0;
}
.ea-toolbar .global-actions {
  display: flex;
  gap: var(--toolbar-gap);
  align-items: center;
}

/* A list with neither search, filters nor actions must not leave an empty band above the
   table. */
.content-header:has(.ea-toolbar:empty) {
  display: none;
}

/* --- The table itself, as a card ---------------------------------------- */
.ea-datagrid-card {
  /* Scrolls the table, not the page. `hidden` would also stop the page growing, but it would
     do it by cutting columns off with no way to reach them. Row actions are unaffected: they
     are a Bootstrap dropdown, and it flips inside the card rather than being clipped by it —
     verified on the Users list, whose table is the widest in the console. */
  overflow-x: auto;
  /* The card draws the outer frame now, so the table must not draw a second one — and its
     first and last rows must not paint over the rounded corners. */
  /* EasyAdmin labels the row-actions column `<span class="visually-hidden">`, which is
     `position: absolute`. With no positioned ancestor its containing block is `<body>`, so the
     card's `overflow-x` does not clip it: it sits at its static position past the card's right
     edge and drags the page wider — a page scrollbar under the card's own. Measured on `/group`
     at 1440px: `html.scrollWidth` 1525. A positioned `th` keeps it inside the card.

     Deliberately `th`, not the card: the row-action dropdowns are absolute too, and they must
     keep escaping the card rather than be clipped by it. */
  /* EasyAdmin tags the paginator's footer `without-padding`, which is right when the table
     sits edge to edge on the page background and wrong once it is inside a card: the result
     count ends up flush against the card's left edge instead of lining up with the first
     column. The inline padding matches the table's own cell padding so the two align. */
}
.ea-datagrid-card > .table,
.ea-datagrid-card > .table > tbody > tr:last-child > td {
  border-bottom: 0;
}
.ea-datagrid-card > .table {
  margin-block-end: 0;
}
.ea-datagrid-card > .table > thead > tr > th {
  position: relative;
}
.ea-datagrid-card > .table > tbody > tr:first-child > td {
  border-top: 0;
}
.ea-datagrid-card .content-panel-footer {
  padding: 0.25rem 1rem;
}
.ea-datagrid-card .list-pagination {
  margin: 0;
}

@media (min-width: 992px) {
  .ea-datagrid-card {
    background-color: #fff;
    border: solid 0.0625rem var(--tb-border);
    border-radius: var(--tb-radius-lg);
  }
}
/* The datagrid drawn as the canvas's table (`.tb-table`): uppercase hairline header, ruled
   rows, the row lit on hover. */
.main-content .datagrid > thead > tr > th {
  height: 3.25rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--tb-rule-strong);
  background: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111729;
  vertical-align: middle;
}
.main-content .datagrid > thead > tr > th a {
  color: inherit;
}
.main-content .datagrid > tbody > tr > td {
  height: 3.75rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--tb-rule);
  color: var(--tb-slate);
  vertical-align: middle;
}
.main-content .datagrid > tbody > tr:hover > td {
  background: var(--tb-row-hover);
}

/* EasyAdmin's pagination as the canvas's (`.tb-pg`): quiet squares, the current page on a
   coral wash. */
.main-content .list-pagination .pagination {
  margin: 0;
  gap: 0.25rem;
}
.main-content .list-pagination .pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: var(--tb-radius-sm);
  background: transparent;
  color: var(--tb-slate);
  text-decoration: none;
}
.main-content .list-pagination .pagination .page-link:hover {
  background: var(--tb-surface);
  color: var(--tb-slate);
}
.main-content .list-pagination .pagination .page-item.active .page-link {
  background: var(--tb-coral-50);
  color: var(--tb-coral-800);
  font-weight: 600;
}
.main-content .list-pagination .pagination .page-item.disabled .page-link {
  opacity: 0.35;
}

/* --- Row 1 / row 2, form AND detail pages: back link up, title down ------ */
.ea-back-link {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--tb-slate);
  text-decoration: none;
}
.ea-back-link:hover {
  color: var(--tb-ink);
  text-decoration: underline;
}

/* On the body only: a tb-crud form lends `ea-new`/`ea-edit` to #main for form.js (crud/edit). */
:where(body).ea-new,
:where(body).ea-edit,
.ea-detail {
  /* app.scss hides this title on every page because the top bar carries it. On a form the
     design puts it on the SAME row as the save actions, which is this one. The detail page
     joins them: it is where the Edit button lives, so it belongs to the same journey. */
}
:where(body).ea-new .content-header,
:where(body).ea-edit .content-header,
.ea-detail .content-header {
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
:where(body).ea-new .content-header .content-header-title .title,
:where(body).ea-edit .content-header .content-header-title .title,
.ea-detail .content-header .content-header-title .title {
  display: block;
  margin: 0;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--tb-ink);
}
@media (min-width: 992px) {
  :where(body).ea-new .content-header .content-header-title .title,
  :where(body).ea-edit .content-header .content-header-title .title,
  .ea-detail .content-header .content-header-title .title {
    font-size: 2.5rem;
  }
}
:where(body).ea-new .page-actions,
:where(body).ea-edit .page-actions,
.ea-detail .page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--toolbar-gap);
  align-items: center;
  justify-content: flex-end;
}

/* --- The body: one card per fieldset, two columns ----------------------- */
:where(body).ea-new,
:where(body).ea-edit,
.ea-detail {
  /* EasyAdmin gives a column without a label this class; the design's right rail has no
     column heading, only per-card headings. */
}
:where(body).ea-new .form-fieldset,
:where(body).ea-edit .form-fieldset,
.ea-detail .form-fieldset {
  margin-block-end: 1rem;
  padding: 1.5rem;
  background-color: #fff;
  border: solid 0.0625rem var(--tb-border);
  border-radius: var(--tb-radius-lg);
}
:where(body).ea-new .form-fieldset-header,
:where(body).ea-edit .form-fieldset-header,
.ea-detail .form-fieldset-header {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}
:where(body).ea-new .form-fieldset-title,
:where(body).ea-edit .form-fieldset-title,
.ea-detail .form-fieldset-title {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--tb-ink);
}
:where(body).ea-new .form-group > label,
:where(body).ea-new .form-group .form-control-label,
:where(body).ea-edit .form-group > label,
:where(body).ea-edit .form-group .form-control-label,
.ea-detail .form-group > label,
.ea-detail .form-group .form-control-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tb-ink);
}
:where(body).ea-new .form-help,
:where(body).ea-edit .form-help,
.ea-detail .form-help {
  font-size: 0.8125rem;
  color: var(--tb-grey);
}
:where(body).ea-new .form-fieldset-body,
:where(body).ea-edit .form-fieldset-body,
.ea-detail .form-fieldset-body {
  padding: 0;
  /* The last field in a card should not add a trailing gap under itself. */
}
:where(body).ea-new .form-fieldset-body > .form-group:last-child,
:where(body).ea-new .form-fieldset-body > .field-group:last-child,
:where(body).ea-edit .form-fieldset-body > .form-group:last-child,
:where(body).ea-edit .form-fieldset-body > .field-group:last-child,
.ea-detail .form-fieldset-body > .form-group:last-child,
.ea-detail .form-fieldset-body > .field-group:last-child {
  margin-block-end: 0;
}
:where(body).ea-new .form-column-no-header > .form-fieldset:first-child,
:where(body).ea-edit .form-column-no-header > .form-fieldset:first-child,
.ea-detail .form-column-no-header > .form-fieldset:first-child {
  margin-block-start: 0;
}
@media (min-width: 992px) {
  :where(body).ea-new .row:has(> .form-column),
  :where(body).ea-edit .row:has(> .form-column),
  .ea-detail .row:has(> .form-column) {
    margin-inline: 0;
  }
  :where(body).ea-new .row:has(> .form-column) > .form-column:first-child,
  :where(body).ea-edit .row:has(> .form-column) > .form-column:first-child,
  .ea-detail .row:has(> .form-column) > .form-column:first-child {
    padding-inline-start: 0;
  }
  :where(body).ea-new .row:has(> .form-column) > .form-column:last-child,
  :where(body).ea-edit .row:has(> .form-column) > .form-column:last-child,
  .ea-detail .row:has(> .form-column) > .form-column:last-child {
    padding-inline-end: 0;
  }
}

/* The detail page states a value per row rather than editing one. EasyAdmin's own layout
   right-aligns the label against a wide gutter, which reads as two disconnected columns
   once the rows sit inside a card; a label above its value keeps each row one thing. */
.ea-detail {
  /* `.field-group .field-label`, not `.field-label`: EasyAdmin's own rule is
     `.ea-detail .field-group .field-label { inline-size: 130px; text-align: right }` and a
     two-class selector loses to it, which left the labels right-aligned against a 130px
     gutter while the values sat left. Matching its specificity is enough; no !important.

     `.field-boolean` needs naming too. EasyAdmin reverses that row — the label takes
     `min-inline-size: 66%` and comes AFTER the value — which is where the stray badge beside
     "Enabled" came from. A boolean reads like every other field here. */
}
.ea-detail .field-group {
  display: block;
  margin-block-end: 1rem;
}
.ea-detail .field-group:last-child {
  margin-block-end: 0;
}
.ea-detail .field-group .field-label,
.ea-detail .field-group.field-boolean .field-label {
  display: block;
  inline-size: auto;
  min-inline-size: 0;
  margin: 0 0 0.375rem;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: start;
  color: var(--tb-slate);
}
.ea-detail .field-group .field-value {
  padding: 0;
  font-size: 0.9375rem;
  color: var(--tb-ink);
  word-break: break-word;
}

/* A page whose CRUD declares no fieldset — a stock-EasyAdmin detail's rows, or a form's bare
   `.form-group`s — would otherwise sit loose on the page. One card around the lot gives it the
   same footing without asking each controller to declare a layout it does not need. */
.ea-detail #main:not(:has(.form-fieldset)),
.ea-new #main:not(:has(.form-fieldset)),
.ea-edit #main:not(:has(.form-fieldset)) {
  padding: 1.5rem;
  background-color: #fff;
  border: solid 0.0625rem var(--tb-border);
  border-radius: var(--tb-radius-lg);
}

/* Form-control tweaks that are rules, not variables (those live in `_variables.scss`). */
.form-check-input:checked {
  border-color: #dd5739;
}

.ts-control, .ts-control input, .ts-dropdown {
  line-height: 2;
}

.ts-dropdown-content::-webkit-scrollbar {
  width: 0.25rem;
}
.ts-dropdown-content::-webkit-scrollbar-track {
  background: transparent;
}
.ts-dropdown-content::-webkit-scrollbar-thumb {
  border-radius: 0.125rem;
  background: var(--tb-dropdown-scrollbar, var(--tb-border-hover));
}
@supports not selector(::-webkit-scrollbar) {
  .ts-dropdown-content {
    scrollbar-width: thin;
    scrollbar-color: var(--tb-dropdown-scrollbar, var(--tb-border-hover)) transparent;
  }
}

/* ============================================================
 * The loading indicator: the Qomit mark.
 *
 * Four quadrant petals lighting in turn, clockwise from the top left. The DOM order of the
 * paths is the order they appear in the logo file (bottom-left, bottom-right, top-left,
 * top-right), so the delays below are not sequential — reordering the paths to make them
 * sequential would mean editing the mark's geometry for the sake of a stylesheet.
 * ============================================================ */
.tb-qomit-spinner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The mark sits OVER a chart that is still readable underneath; it must never eat a click
     meant for the page behind it. The panel's `is-loading` is what suspends interaction. */
  pointer-events: none;
  /* The brand orange, not the Qomit series blue. A loader drawn in a SERIES colour sits on top
     of a chart drawn in that same colour, so it reads as data rather than as chrome. */
  color: var(--dashboard-brand-orange, #ff6b4a);
  /* A card behind the mark.
     The panel it sits in is dimmed to .55 while loading, which dims the spinner with it — and
     four pale petals over a chart full of plotted lines is not something a reader notices. */
  /* top-left */
  /* top-right */
  /* bottom-right */
  /* bottom-left */
}
.tb-qomit-spinner__mark {
  width: 3rem;
  height: 3rem;
  box-sizing: content-box;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}
.tb-qomit-spinner__q {
  opacity: 0.16;
  animation: tb-qomit-pulse 1.25s ease-in-out infinite;
}
.tb-qomit-spinner__q:nth-child(3) {
  animation-delay: 0s;
}
.tb-qomit-spinner__q:nth-child(4) {
  animation-delay: 0.31s;
}
.tb-qomit-spinner__q:nth-child(2) {
  animation-delay: 0.62s;
}
.tb-qomit-spinner__q:nth-child(1) {
  animation-delay: 0.93s;
}

@keyframes tb-qomit-pulse {
  0%, 100% {
    opacity: 0.16;
  }
  30% {
    opacity: 1;
  }
}
/* A spinner is the one animation that cannot simply be removed: it is the only thing telling a
   reader the page is working. It stops moving and stays visible instead. */
@media (prefers-reduced-motion: reduce) {
  .tb-qomit-spinner__q {
    animation: none;
    opacity: 0.55;
  }
}
/* ============================================================
 * The Control Center CRUD pages: Stores, Clients, Orders, Announcement schedules.
 *
 * Implements the "Control Center — CRUD pages" Claude Design canvas (Foundations artboard).
 * Every rule is namespaced `tb-`, and the pages that use it carry `body.tb-crud` instead of
 * EasyAdmin's `ea-index` / `ea-edit` / `ea-detail`, so the older CRUD shell in
 * `_crud-page.scss` never reaches them and the two looks cannot bleed into each other.
 *
 * Fonts are the product's (the canvas used Geist as a stand-in); sizes and tracking carry over.
 * Coral 700 (#BA5036) replaces the brand orange wherever coral sits behind or under text, so
 * links and primary buttons reach 4.5:1 — the canvas's own rule.
 * ============================================================ */
/* The `--tb-*` design tokens live with every other variable in `_variables.scss`. */
/* The data-bearing helpers the Overview introduced. A visually hidden box clips its CHILD:
   `width: 1px` does not constrain a table, so the box is always a plain 1×1 block. */
.tb-visually-hidden {
  position: absolute;
  display: block;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Page frame ---------------------------------------------------------- */
/* White is the console default (`--body-bg` in `_variables.scss`), so `tb-crud` no longer sets a
   background; its job is marking a page whose template owns the layout. */
body.tb-crud .content-header-wrapper,
body.tb-crud .content-header {
  display: none;
}

.tb-page {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding-bottom: 3.5rem;
  color: var(--tb-ink);
  font-size: 0.875rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.tb-page a {
  color: var(--tb-coral-700);
  text-decoration: none;
}
.tb-page a:hover {
  color: var(--tb-coral-900);
  text-decoration: underline;
}
.tb-page :focus-visible {
  outline: 2px solid var(--tb-focus);
  outline-offset: 2px;
}
.tb-page h1, .tb-page h2, .tb-page h3 {
  font-family: inherit;
}

@media (max-width: 991.98px) {
  .tb-page {
    padding-top: 1.25rem;
  }
}
.tb-h1 {
  margin: 0;
  font-size: 2.75rem;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--tb-ink);
  overflow-wrap: anywhere;
}

.tb-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--tb-grey);
}
.tb-crumbs a {
  color: var(--tb-slate);
  text-decoration: none;
}
.tb-crumbs a:hover {
  color: var(--tb-ink);
  text-decoration: underline;
}
.tb-crumbs [aria-current=page] {
  color: var(--tb-ink);
}
.tb-crumbs i {
  font-size: 0.625rem;
}

/* Title block of a detail/form page: title + meta on the left, actions on the right. */
.tb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}
.tb-head__main {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
}
.tb-head__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
}
.tb-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.125rem;
  color: var(--tb-grey);
}
.tb-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

/* Two columns: the wide one for content, the rail for status/record. Wraps on phones. */
.tb-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}
.tb-cols__main {
  flex: 2 1 32.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}
.tb-cols__rail {
  flex: 1 1 18.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* --- Type helpers -------------------------------------------------------- */
.tb-mono {
  font-family: var(--tb-mono);
  letter-spacing: 0;
}

.tb-muted {
  color: var(--tb-grey);
}

.tb-strong {
  color: var(--tb-ink);
  font-weight: 500;
}

.tb-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--tb-slate);
}

.tb-help {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--tb-grey);
}

.tb-err {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--tb-danger);
}

.tb-req {
  color: var(--tb-coral-700);
}

.tb-small {
  font-size: 0.8125rem;
}

.tb-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Buttons ------------------------------------------------------------- */
.tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.375rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: var(--tb-radius);
  background: transparent;
  color: var(--tb-ink);
  font: inherit;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.tb-btn:hover {
  text-decoration: none;
}
.tb-btn:disabled, .tb-btn[aria-disabled=true] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.tb-btn--primary {
  background: var(--tb-coral-700);
  color: #fff;
}
.tb-btn--primary:hover {
  background: var(--tb-coral-800);
  color: #fff;
}
.tb-btn--secondary {
  background: #fff;
  border-color: var(--tb-border-strong);
  color: var(--tb-ink);
}
.tb-btn--secondary:hover {
  background: var(--tb-surface);
  color: var(--tb-ink);
}
.tb-btn--ghost {
  color: var(--tb-ink);
}
.tb-btn--ghost:hover {
  background: var(--tb-surface);
  color: var(--tb-ink);
}
.tb-btn--danger {
  color: var(--tb-danger);
}
.tb-btn--danger:hover {
  background: var(--tb-danger-bg);
  color: var(--tb-danger);
}
.tb-btn--danger-solid {
  background: var(--tb-danger);
  color: #fff;
}
.tb-btn--danger-solid:hover {
  background: var(--tb-danger-dark);
  color: #fff;
}
.tb-btn--sm {
  height: 2rem;
  padding: 0 0.625rem;
  gap: 0.375rem;
  font-size: 0.8125rem;
}
.tb-btn--icon {
  width: 2.5rem;
  padding: 0;
}
.tb-btn--sm.tb-btn--icon {
  width: 2rem;
}

.tb-page a.tb-btn--primary,
.tb-page a.tb-btn--primary:hover,
.tb-page a.tb-btn--danger-solid,
.tb-page a.tb-btn--danger-solid:hover {
  color: #fff;
  text-decoration: none;
}

.tb-page a.tb-btn--secondary,
.tb-page a.tb-btn--ghost {
  color: var(--tb-ink);
  text-decoration: none;
}

.tb-page a.tb-btn--danger {
  color: var(--tb-danger);
  text-decoration: none;
}

.tb-btn-link {
  display: inline;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tb-coral-700);
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.tb-btn-link:hover {
  color: var(--tb-coral-900);
  text-decoration: underline;
}

/* --- Toolbar: search, filter chips, primary action ----------------------- */
.tb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.tb-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.tb-toolbar__region {
  display: contents;
}
.tb-toolbar__switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.tb-search {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 20rem;
  max-width: 100%;
  height: 2.375rem;
  margin: 0;
  padding: 0 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
  color: var(--tb-grey);
}
.tb-search:hover {
  border-color: var(--tb-border-hover);
}
.tb-search:focus-within {
  border-color: var(--tb-focus);
  background: #fff;
}
.tb-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--tb-ink);
  font: inherit;
  box-shadow: none;
  /* The box itself shows focus (`:focus-within` above); a second ring on the input inside it is noise. */
}
.tb-search input::placeholder {
  color: var(--tb-grey);
}
.tb-search input::-webkit-search-cancel-button {
  cursor: pointer;
}
.tb-search input:focus, .tb-search input:focus-visible {
  outline: none;
  box-shadow: none;
}

.tb-toolbar__filters > .tb-filter,
.tb-toolbar__filters > .tb-toolbar__region > .tb-filter {
  flex: 0 1 auto;
  max-inline-size: 17.5rem;
  align-self: center;
}
@media (max-width: 767.98px) {
  .tb-toolbar__filters {
    flex-basis: 100%;
  }
  .tb-toolbar__filters > *,
  .tb-toolbar__filters > .tb-filter,
  .tb-toolbar__filters > .tb-toolbar__region > *,
  .tb-toolbar__filters > .tb-toolbar__region > .tb-filter {
    flex: 1 1 100%;
    max-inline-size: none;
  }
  .tb-toolbar__filters .tb-chip:not(button) {
    width: 100%;
  }
  .tb-toolbar__filters .tb-chip > .fa-chevron-down {
    margin-inline-start: auto;
  }
}

@media (min-width: 768px) {
  .tb-toolbar__filters .tb-search {
    width: 21.25rem;
  }
}

.tb-chip-wrap {
  position: relative;
}

.tb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.375rem;
  padding: 0 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
  color: #000;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.tb-chip:hover, .tb-chip[aria-expanded=true] {
  border-color: var(--tb-border-strong);
}
.tb-chip__key {
  color: var(--tb-grey);
}
.tb-chip i {
  color: var(--tb-slate);
  font-size: 1rem;
}
.tb-chip i.fa-chevron-down {
  transition: transform 0.15s ease;
  color: var(--dashboard-text-secondary);
  font-size: 0.75rem;
}
.tb-chip[aria-expanded=true] .fa-chevron-down {
  transform: rotate(180deg);
}
.tb-chip .tb-count {
  background: var(--tb-coral-700);
  color: #fff;
}

.tb-pop {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  z-index: 30;
  min-width: 15rem;
  max-height: 22.5rem;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
  background: #fff;
  box-shadow: 0 16px 40px rgba(34, 13, 57, 0.14);
}
.tb-pop--right {
  left: auto;
  right: 0;
}
.tb-pop .tb-choice {
  min-height: 2.5rem;
  padding: 0 0.625rem;
  border-radius: var(--tb-radius-sm);
  color: var(--tb-ink);
  cursor: pointer;
}
.tb-pop .tb-choice:hover {
  background: var(--tb-surface);
}

/* An active filter, removable: "Store: IKKS FI dev ×". */
.tb-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tb-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 1.875rem;
  padding: 0 0.25rem 0 0.625rem;
  border-radius: 0.9375rem;
  background: var(--tb-coral-50);
  color: #7a2f1c;
  font-size: 0.8125rem;
}
.tb-pill a, .tb-pill button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  padding: 0;
  border: 0;
  border-radius: 0.6875rem;
  background: transparent;
  color: #7a2f1c;
  cursor: pointer;
  text-decoration: none;
}
.tb-pill a:hover, .tb-pill button:hover {
  background: #f3d3c9;
  color: #7a2f1c;
  text-decoration: none;
}

/* --- Card ---------------------------------------------------------------- */
.tb-card {
  background: #fff;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
}
.tb-card--pad {
  padding: 1.75rem;
}
.tb-card--stack {
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
}
.tb-card--clip {
  overflow: hidden;
}
.tb-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
}
.tb-card__h {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--tb-ink);
}
.tb-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--tb-rule);
}

.tb-card--pad > .tb-card__h {
  margin-bottom: 1.5rem;
}

.tb-card--stack > .tb-card__h {
  margin-bottom: 0;
}

/* A KPI tile: label, value, sub-line. */
.tb-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12.5rem, 100%), 1fr));
  gap: 0.75rem;
}

.tb-stat {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.125rem 1.25rem;
  min-width: 0;
}
.tb-stat__v {
  font-size: 1.625rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--tb-ink);
  overflow-wrap: anywhere;
}

/* --- Badges -------------------------------------------------------------- */
.tb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  border-radius: var(--tb-radius-sm);
  font-size: 0.78125rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  background: var(--tb-neutral-bg);
  color: var(--tb-neutral-fg);
}
.tb-badge--success {
  background: var(--tb-success-bg);
  color: var(--tb-success-fg);
}
.tb-badge--danger {
  background: var(--tb-danger-bg);
  color: var(--tb-danger-fg);
}
.tb-badge--warn {
  background: var(--tb-warn-bg);
  color: var(--tb-warn-fg);
}
.tb-badge--info {
  background: var(--tb-info-bg);
  color: var(--tb-info-fg);
}
.tb-badge--neutral {
  background: var(--tb-neutral-bg);
  color: var(--tb-neutral-fg);
}
.tb-badge--coral {
  background: var(--tb-coral-bg);
  color: var(--tb-coral-fg);
}
.tb-badge--aubergine {
  background: var(--tb-aubergine-bg);
  color: var(--tb-aubergine-fg);
}
.tb-badge--outline {
  background: #fff;
  color: var(--tb-slate);
  box-shadow: inset 0 0 0 1px var(--tb-border-hover);
}

.tb-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.tb-status-dot,
.tb-status-dot-text {
  display: none;
}

.is-incomplete .tb-status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--tb-coral-700);
  flex: none;
}
.is-incomplete .tb-status-dot-text {
  display: inline;
}

.tb-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  border-radius: 0.625rem;
  background: var(--tb-surface);
  color: var(--tb-slate);
  font-size: 0.75rem;
  font-weight: 500;
}

.tb-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.75rem;
  padding: 0 0.625rem;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
  color: var(--tb-ink);
  font-size: 0.8125rem;
}

.tb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tb-nullv {
  display: inline-flex;
  align-items: center;
  height: 1.375rem;
  padding: 0 0.375rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  font-size: 0.75rem;
  color: var(--tb-grey);
}

.tb-code-chip {
  display: inline-flex;
  align-items: center;
  max-width: 26.25rem;
  min-height: 1.5rem;
  padding: 0 0.5rem;
  overflow: hidden;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
  color: var(--tb-ink);
  font-family: var(--tb-mono);
  font-size: 0.8125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--tb-radius);
  background: #efeaf4;
  color: var(--tb-aubergine-700);
  font-weight: 600;
  font-size: 0.8125rem;
  flex: none;
}
.tb-logo--lg {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--tb-radius-lg);
  font-size: 1.25rem;
}

.tb-check {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--tb-coral-700);
  cursor: pointer;
  flex: none;
}

/* Bulk-selection bar above a table. */
.tb-bulkbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--tb-coral-50);
  border-bottom: 1px solid #f3d3c9;
}
.tb-bulkbar[hidden] {
  display: none;
}
.tb-bulkbar__count {
  margin-right: 0.5rem;
}
.tb-bulkbar__end {
  margin-left: auto;
}

/* --- Pagination ---------------------------------------------------------- */
.tb-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.tb-pager__size {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--tb-grey);
  white-space: nowrap;
}

.tb-pager__size select {
  width: 5.25rem;
  height: 2rem;
  min-height: 2rem !important;
  padding: 0 1.75rem 0 0.625rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  background-color: #fff;
}

.tb-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.tb-pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: var(--tb-radius-sm);
  background: transparent;
  color: var(--tb-slate) !important;
  text-decoration: none !important;
  cursor: pointer;
}
.tb-pg:hover {
  background: var(--tb-surface);
}
.tb-pg.is-on {
  background: var(--tb-coral-50);
  color: var(--tb-coral-800) !important;
  font-weight: 600;
}
.tb-pg.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* --- Tabs ---------------------------------------------------------------- */
.tb-tabs {
  display: flex;
  gap: 1.75rem;
  /* The rule is an inset shadow rather than a border so a tab's 2px underline can sit on it
     without a negative margin — which, inside `overflow-x: auto`, counted as vertical overflow
     and gave the bar a scrollbar. */
  box-shadow: inset 0 -1px 0 var(--tb-rule-strong);
  overflow-x: auto;
}
.tb-tabs--in-card {
  padding: 0 1.25rem;
}

.tb-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--tb-slate) !important;
  font: inherit;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none !important;
  cursor: pointer;
}
.tb-tab:hover {
  color: var(--tb-ink) !important;
}
.tb-tab.is-on, .tb-tab.active, .tb-tab[aria-selected=true] {
  border-bottom-color: var(--tb-coral-500);
  color: var(--tb-ink) !important;
}
.tb-tab.has-error {
  color: var(--tb-danger) !important;
}

.tb-tabpanel[hidden] {
  display: none;
}

/* --- Definition lists ---------------------------------------------------- */
.tb-kv {
  display: grid;
  gap: 1.375rem 1.5rem;
  margin: 0;
}
.tb-kv--auto {
  grid-template-columns: repeat(auto-fit, minmax(11.25rem, 1fr));
}
.tb-kv--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tb-kv dt {
  margin: 0 0 0.375rem;
}
.tb-kv dd {
  margin: 0;
  color: var(--tb-ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.tb-attrs {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 0.5rem 1.25rem;
  margin: 0;
}
.tb-attrs dt {
  color: var(--tb-slate);
  font-weight: 400;
}
.tb-attrs dd {
  margin: 0;
  color: var(--tb-ink);
  overflow-wrap: anywhere;
}

/* --- Forms --------------------------------------------------------------- */
.tb-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16.25rem, 100%), 1fr));
  gap: 1.25rem 1.5rem;
}
.tb-grid2__start {
  grid-column-start: 1;
}

.tb-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  /* EasyAdmin/Symfony widgets rendered inside a field take the canvas's input look. */
  /* Symfony's error list, re-dressed as the canvas's inline error. */
  /* TomSelect copies the select's `form-select` class onto its wrapper, and EasyAdmin's theme
     draws the box on that wrapper (the control inside is borderless). So the wrapper keeps the
     canvas's input box, but with a MIN height: the fixed 44px of the rule above would clip a
     multi-select's second row of tags. */
}
.tb-field[hidden] {
  display: none;
}
.tb-field--full {
  grid-column: 1/-1;
}
.tb-field__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tb-ink);
  margin: 0;
}
.tb-field .form-control, .tb-field .form-select, .tb-field .tb-input {
  display: block;
  width: 100%;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  background-color: #fff;
  color: var(--tb-ink);
  font: inherit;
  box-shadow: none;
}
.tb-field .form-control:hover, .tb-field .form-select:hover, .tb-field .tb-input:hover {
  border-color: var(--tb-border-hover);
}
.tb-field .form-control:focus, .tb-field .form-select:focus, .tb-field .tb-input:focus {
  outline: none;
  border-color: var(--tb-focus);
  box-shadow: 0 0 0 3px rgba(87, 103, 206, 0.18);
}
.tb-field .form-control:disabled, .tb-field .form-control[readonly], .tb-field .form-select:disabled, .tb-field .form-select[readonly], .tb-field .tb-input:disabled, .tb-field .tb-input[readonly] {
  background: var(--tb-surface);
  border-color: var(--tb-surface);
  color: var(--tb-slate);
  cursor: not-allowed;
}
.tb-field .form-control::placeholder, .tb-field .form-select::placeholder, .tb-field .tb-input::placeholder {
  color: var(--tb-placeholder);
}
.tb-field .form-control.is-invalid, .tb-field .form-select.is-invalid, .tb-field .tb-input.is-invalid {
  border-color: var(--tb-danger);
}
.tb-field .form-select {
  padding-right: 2.5rem;
}
.tb-field textarea.form-control, .tb-field textarea.tb-input {
  height: auto;
  min-height: 6rem;
  padding: 0.75rem 0.875rem;
  line-height: 1.5;
  resize: vertical;
}
.tb-field .invalid-feedback, .tb-field .form-error-message, .tb-field ul.form-errors {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--tb-danger);
}
.tb-field .ts-wrapper.form-select, .tb-field .ts-wrapper.form-control {
  height: auto;
  min-height: 2.75rem;
  padding: 0;
}
.tb-field .ts-wrapper.focus {
  border-color: var(--tb-focus);
  box-shadow: 0 0 0 3px rgba(87, 103, 206, 0.18);
}
.tb-field .ts-wrapper .ts-control {
  min-height: 2.625rem;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.tb-field .ts-wrapper.single .ts-control {
  padding: 0 2.5rem 0 0.875rem;
  align-items: center;
}
.tb-field .ts-wrapper.multi .ts-control {
  padding: 0.375rem;
  gap: 0.375rem;
}
.tb-field .ts-wrapper.multi .ts-control > .item {
  height: 1.875rem;
  margin: 0;
  padding: 0 0.25rem 0 0.625rem;
  border: 0;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
  color: var(--tb-ink);
  font-size: 0.8125rem;
  align-items: center;
}
.tb-field .ts-wrapper.multi .ts-control > .item .remove {
  border-left: 0;
  border-radius: 3px;
  color: var(--tb-slate);
}
.tb-field .ts-wrapper.disabled {
  background: var(--tb-surface);
  border-color: var(--tb-surface);
  color: var(--tb-slate);
}
.tb-field .ts-wrapper.disabled .ts-control {
  opacity: 1;
}
.tb-field .ts-wrapper.disabled .ts-control, .tb-field .ts-wrapper.disabled .ts-control * {
  cursor: not-allowed !important;
}
.tb-field .ts-wrapper.disabled.multi .ts-control > .item {
  padding-right: 0.625rem !important;
  border: 0;
  background: #fff;
  color: var(--tb-slate);
}
.tb-field .ts-wrapper.disabled .item .remove {
  display: none;
}

.tb-switch-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  /* Bootstrap's switch, coloured like the canvas's. */
}
.tb-switch-row__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tb-switch-row .form-check {
  margin: 0;
  padding: 0;
  min-height: 0;
}
.tb-switch-row .form-check-label {
  display: none;
}
.tb-switch-row .form-check-input {
  float: none;
  width: 2.5rem;
  height: 1.5rem;
  margin: 0;
  background-color: var(--tb-border-hover);
  border: 0;
  cursor: pointer;
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}
.tb-switch-row .form-check-input:checked {
  background-color: var(--tb-coral-700);
}
.tb-switch-row .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(87, 103, 206, 0.18);
}

.tb-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--tb-radius-lg);
  background: var(--tb-danger-bg);
  color: #7e1f3b;
}
.tb-banner i {
  margin-top: 0.125rem;
}
.tb-banner--warn {
  background: var(--tb-warn-bg);
  color: var(--tb-warn-fg);
}
.tb-banner--info {
  background: var(--tb-info-bg);
  color: var(--tb-info-fg);
}

/* An inline labelled switch (Bootstrap's, coloured like the canvas's; same look as .tb-switch-row). */
.tb-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  color: var(--tb-ink);
  cursor: pointer;
}
.tb-switch .form-check-input {
  float: none;
  width: 2.5rem;
  height: 1.5rem;
  margin: 0;
  border: 0;
  border-radius: 0.75rem;
  background-color: var(--tb-border-hover);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
  background-position: left center;
  background-repeat: no-repeat;
  appearance: none;
  cursor: pointer;
  transition: background-position 0.15s;
}
.tb-switch .form-check-input:checked {
  background-color: var(--tb-coral-700);
  background-position: right center;
}
.tb-switch .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(87, 103, 206, 0.18);
}
.tb-switch .form-check-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tb-form-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tb-rule);
}

.tb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.tb-empty-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px dashed var(--tb-border-strong);
  border-radius: var(--tb-radius-lg);
  background: var(--tb-row-hover);
}

/* --- Toast, dialog, drawer ---------------------------------------------- */
.tb-toasts {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: min(30rem, 100vw - 3rem);
}

.tb-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem 0.875rem 0.875rem;
  border-radius: var(--tb-radius-lg);
  background: var(--tb-aubergine-900);
  color: #fff;
  box-shadow: 0 16px 40px rgba(34, 13, 57, 0.3);
}
.tb-toast a {
  color: #fff;
  text-decoration: underline;
}
.tb-toast__icon {
  color: #7fd19a;
}
.tb-toast--danger .tb-toast__icon {
  color: #ffb3b3;
}
.tb-toast--warning .tb-toast__icon {
  color: #ffd27a;
}
.tb-toast__close {
  margin-left: auto;
  padding: 0 0.25rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.tb-scrim {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 0;
  background: rgba(18, 24, 38, 0.42);
}
.tb-scrim[hidden] {
  display: none;
}

.tb-dialog {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 30rem;
  padding: 1.75rem;
  border-radius: 0.625rem;
  background: #fff;
  box-shadow: 0 24px 64px rgba(34, 13, 57, 0.24);
  color: var(--tb-ink);
  white-space: normal;
  text-align: left;
}
.tb-dialog__title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.tb-dialog__text {
  margin: 0;
  color: var(--tb-slate);
}
.tb-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
  margin-top: 0.5rem;
}

.tb-drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 1050;
  padding: 0;
  border: 0;
  background: rgba(18, 24, 38, 0.32);
  cursor: default;
}

.tb-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1051;
  display: flex;
  flex-direction: column;
  width: min(25rem, 100%);
  background: #fff;
  box-shadow: -16px 0 48px rgba(34, 13, 57, 0.18);
  white-space: normal;
  text-align: left;
}
.tb-drawer[hidden], .tb-drawer-scrim[hidden] {
  display: none;
}
.tb-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.375rem 1.5rem;
  border-bottom: 1px solid var(--tb-rule);
}
.tb-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.tb-drawer__foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.125rem 1.5rem;
  border-top: 1px solid var(--tb-rule);
}
.tb-drawer fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tb-drawer legend {
  margin-bottom: 0.625rem;
  float: none;
}

/* --- AJAX list: the region the list controller swaps, and its loader ------ */
.tb-results {
  position: relative;
  min-height: 7.5rem;
}
.tb-results.is-loading > :not(.tb-qomit-spinner) {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s;
}

.tb-loc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tb-loc {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.125rem;
  padding: 0 0.625rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  background: #fff;
  color: var(--tb-slate);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}
.tb-loc:hover {
  border-color: var(--tb-border-hover);
  color: var(--tb-ink);
}
.tb-loc.is-on {
  border-color: var(--tb-coral-700);
  background: var(--tb-coral-50);
  color: var(--tb-coral-800);
}
.tb-loc__missing {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: #c77a00;
}

/* --- Misc blocks used by detail pages ------------------------------------ */
textarea[readonly] + .CodeMirror {
  --form-input-group-text-bg: var(--tb-surface);
  --form-input-hover-border-color: var(--form-input-border-color);
  --form-input-hover-shadow: none;
  border-style: dashed;
}
textarea[readonly] + .CodeMirror .CodeMirror-cursors {
  display: none;
}

.tb-table .CodeMirror {
  margin: 0.5rem 0;
  max-width: 35rem;
  font-size: 0.75rem;
}
.tb-table .CodeMirror .CodeMirror-scroll {
  max-height: 22.5rem;
}

.tb-addr {
  margin: 0;
  font-style: normal;
  line-height: 1.6;
  color: var(--tb-ink);
}

.tb-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3.5rem;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
  color: #9a97a3;
  flex: none;
}

.tb-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 9.375rem 1.5rem minmax(0, 1fr);
  gap: 0 0.75rem;
  padding-bottom: 1.375rem;
}
.tb-timeline li:last-child {
  padding-bottom: 0;
}
.tb-timeline__time {
  font-family: var(--tb-mono);
  font-size: 0.8125rem;
  color: var(--tb-grey);
  padding-top: 1px;
}
.tb-timeline__rail {
  position: relative;
  display: flex;
  justify-content: center;
}
.tb-timeline__rail::after {
  content: "";
  position: absolute;
  top: 1.375rem;
  bottom: -1.375rem;
  left: 50%;
  width: 1px;
  margin-left: -0.5px;
  background: var(--tb-rule-strong);
}
li:last-child .tb-timeline__rail::after {
  display: none;
}
.tb-timeline__node {
  position: relative;
  z-index: 1;
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.25rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--tb-border);
  background: #9a97a3;
}
.tb-timeline__node--success {
  background: var(--tb-success-fg);
}
.tb-timeline__node--danger {
  background: var(--tb-danger);
}
.tb-timeline__node--coral {
  background: var(--tb-coral-700);
}
.tb-timeline__body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

@media (max-width: 767.98px) {
  .tb-h1 {
    font-size: 2rem;
  }
  .tb-search {
    width: 100%;
  }
  .tb-timeline li {
    grid-template-columns: 6rem 1.5rem minmax(0, 1fr);
  }
  .tb-pager {
    gap: 0.5rem;
    width: 100%;
  }
  .tb-pager__size-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .tb-pager__size select {
    width: 4.5rem;
  }
  .tb-pages {
    gap: 0.125rem;
    margin-left: auto;
  }
  .tb-pg {
    min-width: 1.75rem;
    padding: 0 0.25rem;
  }
}
/* crud/_period_field: a date-time period on the Overview's range calendar (announcement schedule, client product validity). */
.tb-period-field {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* auto-fill, not auto-fit: the end time hides with an open end, and its empty column must
     keep its width or the start time stretches across both. */
}
.tb-period-field__wrap {
  display: block;
  width: 100%;
}
.tb-period-field > .tb-grid2 {
  grid-template-columns: repeat(auto-fill, minmax(min(16.25rem, 100%), 1fr));
}
.tb-field .tb-period-field__trigger {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-align: left;
  cursor: pointer;
}
.tb-field .tb-period-field__trigger > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-field .tb-period-field__trigger > .fa-chevron-down {
  color: var(--tb-grey);
  font-size: 0.75rem;
}
.tb-period-field__pop {
  width: 20rem;
  max-height: none;
}
.tb-period-field__clear {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tb-focus);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}
.tb-period-field__clear:hover {
  text-decoration: underline;
}

/* ============================================================
 * The table component — every `.tb-table` in the console, one file.
 *
 * Two looks, one component:
 *
 *  - The BASE `.tb-table` (+ `.tb-table-wrap` scroller): the Control Center list table —
 *    left-aligned rows, uppercase hairline header, the row lit on hover. The tb-crud pages
 *    and the client/IdP cards use it; `.main-content .datagrid` (`_crud-page.scss`) and
 *    Bootstrap `.table` (`_table.scss`) mirror its values over framework markup.
 *
 *  - The dashboard GRID variant, scoped `.dashboard-wrapper`: every dashboard table — centred
 *    13px figures, a frozen first column with a scroll shadow. The figure tables add
 *    `.tb-table--flat` (dashboard.scss); the payment retry matrix is its own (`.tb-matrix`):
 *
 *      .tb-table__group-start     a heavier rule where one group of columns (a store) begins
 *      .tb-table__cell--highlight a cell that means something (the matrix: each row's own retry and most tried second method)
 *      .tb-table__cell--band      a column set apart from the rest (the matrix outcome columns)
 *      .tb-table__previous        the comparison range's figure under a cell's own
 *
 *    The scope outranks the base (0,2,x vs 0,1,x), so the variant wins whatever the load
 *    order — dashboard pages load both app.css and dashboard.css.
 *
 * Page-specific deltas stay in their page files: `_page-clients.scss`/`_page-idp.scss`
 * first-column padding, the dashboards' `.tb-table--flat`/`.tb-method-table` in dashboard.scss
 * and their page tables' compounds in `partials/_dashboard_*.scss`.
 * ============================================================ */
/* --- Base: the list table ------------------------------------------------- */
.tb-table-wrap {
  overflow-x: auto;
}

.tb-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}
.tb-table th {
  height: 3.25rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--tb-rule-strong);
  background: #fff;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111729;
  white-space: nowrap;
}
.tb-table th[aria-sort=ascending], .tb-table th[aria-sort=descending] {
  box-shadow: inset 0 -2px 0 var(--tb-coral-700);
}
.tb-table td {
  height: 3.75rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--tb-rule);
  color: var(--tb-slate);
  white-space: nowrap;
  vertical-align: middle;
}
.tb-table tbody tr:hover td {
  background: var(--tb-row-hover);
}
.tb-table tbody tr:last-child td {
  border-bottom: 0;
}
.tb-table .tb-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tb-table .tb-cell-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.tb-table .tb-cell-stack > span + span {
  font-size: 0.8125rem;
  color: var(--tb-grey);
}
.tb-table th.tb-col-check, .tb-table td.tb-col-check {
  width: 3.25rem;
}
.tb-table th.tb-col-action, .tb-table td.tb-col-action {
  width: 3.5rem;
}
.tb-table--compact td {
  height: 3rem;
}
.tb-table--tall td {
  height: 4rem;
}

/* A sortable header: a link (it changes the URL) that the list controller fetches in place. */
.tb-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: inherit !important;
  text-decoration: none !important;
}
.tb-th-sort i {
  font-size: 0.75rem;
  color: var(--tb-slate);
  opacity: 0.35;
}
.tb-th-sort.is-sorted i {
  color: var(--tb-coral-700);
  opacity: 1;
}

/* The dashboards' variant: a button sorting the rows in the page (`tb_table_sort_controller.js`). */
button.tb-th-sort {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  cursor: pointer;
}
button.tb-th-sort i {
  transition: opacity 0.15s ease;
}
button.tb-th-sort:not(.is-sorted) i {
  opacity: 0;
}
button.tb-th-sort:not(.is-sorted):hover i, button.tb-th-sort:not(.is-sorted):focus-visible i {
  opacity: 0.35;
}
button.tb-th-sort:hover {
  color: var(--tb-coral-700) !important;
}
button.tb-th-sort:focus-visible {
  outline: 0.125rem solid var(--tb-focus);
  outline-offset: 0.125rem;
  border-radius: 0.125rem;
}

/* --- Dashboard grid variant ------------------------------------------------ */
.dashboard-wrapper .tb-table-frame {
  position: relative;
}

/* The table scrolls, the page does not.
 *
 * Six markets against native is nineteen columns. Left to the document, that width drags the
 * charts and the filter bar sideways with it and the row labels leave the screen. */
.dashboard-wrapper .tb-table-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
  background: var(--dashboard-surface-bg);
}
.dashboard-wrapper .tb-table-scroll:focus-visible {
  outline: 0.125rem solid var(--tb-focus);
  outline-offset: 0.125rem;
}
.dashboard-wrapper .tb-table-scroll::-webkit-scrollbar {
  height: 0.375rem;
}
.dashboard-wrapper .tb-table-scroll::-webkit-scrollbar-track {
  background: var(--dashboard-control-bg);
}
.dashboard-wrapper .tb-table-scroll::-webkit-scrollbar-thumb {
  border-radius: 0.1875rem;
  background: var(--dashboard-scrollbar-bg);
}
@supports not selector(::-webkit-scrollbar) {
  .dashboard-wrapper .tb-table-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--dashboard-scrollbar-bg) var(--dashboard-control-bg);
  }
}
.dashboard-wrapper .tb-table-scroll.is-scrolled th[scope=row]::after,
.dashboard-wrapper .tb-table-scroll.is-scrolled thead th:first-child::after {
  opacity: 1;
}

.dashboard-wrapper .tb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--dashboard-surface-bg);
  font-size: 0.8125rem;
  /* Figures are centred under their store; only the row labels — the first column — read from
     the left. The explicit `height: auto` and `letter-spacing: normal` write off the base
     list-table's row heights and header tracking. */
  /* A heavier rule where one STORE ends and the next begins. The row hairlines separate the
     lines; this separates the groups, which is the question a reader actually has when every
     market repeats the same three sub-columns. */
  /* Every row OPAQUE, striped or not: the frozen first cell inherits its row's fill, and a
     transparent one would let the figures scrolling under it show through. The grid reads by
     its hairlines, not by the base table's row-hover wash. */
  /* The row label stays put while the figures scroll under it: with six markets the leftmost
     column is off screen long before the last one arrives, and a figure with no row name is
     unreadable. */
  /* The header's first cell is sticky too, and OPAQUE: left transparent, the store names in the
     header scrolled underneath it and showed through, while the body cells below were hidden
     by their row labels — the two rows no longer lined up. */
  /* A soft shadow on the right edge of the frozen column once the table has scrolled, so it reads
     as a column the figures pass BEHIND rather than as a cell that swallowed them. Toggled by the
     `scroll-shadow` controller on the scroller; nothing shows at rest, where nothing is hidden. */
}
.dashboard-wrapper .tb-table th, .dashboard-wrapper .tb-table td {
  height: auto;
  padding: 0.5rem 0.75rem;
  text-align: center;
  white-space: nowrap;
  letter-spacing: normal;
  vertical-align: middle;
  /* The design system's table cell (190:8910) rules a hairline under every row. Without it
     nineteen columns of figures read as one block and nothing says which store a number
     belongs to. */
  border-bottom: 0.0625rem solid var(--dashboard-table-rule);
}
.dashboard-wrapper .tb-table th.tb-table__group-start, .dashboard-wrapper .tb-table td.tb-table__group-start {
  border-inline-start: 0.0625rem solid var(--dashboard-table-rule-strong);
}
.dashboard-wrapper .tb-table tbody tr:last-child th,
.dashboard-wrapper .tb-table tbody tr:last-child td {
  border-bottom: 0;
}
.dashboard-wrapper .tb-table tbody tr {
  background: var(--dashboard-surface-bg);
}
.dashboard-wrapper .tb-table tbody tr:hover td {
  background: inherit;
}
.dashboard-wrapper .tb-table th[scope=row],
.dashboard-wrapper .tb-table thead th:first-child {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  text-align: start;
  background: inherit;
}
.dashboard-wrapper .tb-table thead th:first-child {
  z-index: 2;
  background: var(--dashboard-surface-bg);
}
.dashboard-wrapper .tb-table th[scope=row]::after,
.dashboard-wrapper .tb-table thead th:first-child::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 100%;
  inline-size: 0.5rem;
  pointer-events: none;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.15s ease-out;
}
.dashboard-wrapper .tb-table thead th {
  color: var(--dashboard-text-secondary);
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: uppercase;
  text-align: center;
  background: var(--dashboard-surface-bg);
}
.dashboard-wrapper .tb-table__subhead th,
.dashboard-wrapper .tb-table .tb-table__subhead th {
  text-transform: none;
}
.dashboard-wrapper .tb-table tbody th {
  font-weight: 400;
  font-size: inherit;
  color: var(--dashboard-text-secondary);
  text-transform: none;
}
.dashboard-wrapper .tb-table td {
  color: var(--dashboard-text-primary);
}
.dashboard-wrapper .tb-table td.tb-table__cell--band {
  background: var(--dashboard-control-bg);
}
.dashboard-wrapper .tb-table__previous {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--dashboard-gap-200);
  margin-top: 0.125rem;
  font-size: 0.75rem;
  color: var(--dashboard-text-secondary);
}

/* An unexpected error's report (error/_report.html.twig): the message, the reference to quote and,
   for a super-admin, the redacted details. One look on the layout page, the stand-alone error page
   (login.scss shares these components), a Turbo frame and a list region's error state. */
.tb-error-report {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 100%;
  min-width: 0;
  text-align: left;
}
.tb-error-report__message {
  margin: 0;
  color: var(--tb-ink);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.tb-error-report__reference {
  margin: 0;
  color: var(--tb-grey);
  font-size: 0.8125rem;
}
.tb-error-report__details {
  margin-top: 0.5rem;
  min-width: 0;
}
.tb-error-report__details summary {
  cursor: pointer;
  color: var(--tb-ink);
  font-size: 0.8125rem;
  font-weight: 500;
}
.tb-error-report__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.625rem 0 0.5rem;
}
.tb-error-report__text {
  max-height: 26.25rem;
  margin: 0;
  padding: 0.75rem 0.875rem;
  overflow: auto;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  background: var(--tb-surface);
  color: var(--tb-ink);
  font-family: var(--tb-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  white-space: pre;
}
.tb-error-report--compact .tb-error-report__message {
  font-size: 0.875rem;
}

/* On the stand-alone page the report sits under a centred title. */
.error-page .tb-error-report {
  align-self: stretch;
  margin-top: 0.25rem;
}
.error-page .tb-error-report__message, .error-page .tb-error-report__reference {
  text-align: center;
}

/* Page-specific additions for the stores screens. Shared pieces belong in _tb-page.scss. */
/* "FR · fr_FR, en_GB · EUR" — codes, so the column reads as data rather than prose. */
.tb-store-markets {
  font-variant-numeric: tabular-nums;
}

/* Store id + copy button + "Copied" in the detail header's meta line. */
.tb-store-id {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.tb-store-id__done {
  font-size: 0.8125rem;
  color: var(--tb-success-fg);
}

/* Store ID input with the lock icon of a locked (edit) field. */
.tb-store-id-input {
  position: relative;
  display: block;
}
.tb-store-id-input .form-control {
  padding-right: 2.5rem;
}
.tb-store-id-input i {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  transform: translateY(-50%);
  color: var(--tb-grey);
  pointer-events: none;
}

.tb-store-settings__search {
  width: 17.5rem;
}

.tb-store-settings__value {
  display: inline-block;
  max-width: 37.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* A disabled config keeps its value visible, with an outline badge beside it. */
.tb-crud--detail .tb-code-chip + .tb-badge,
.tb-crud--detail .tb-nullv + .tb-badge {
  margin-left: 0.5rem;
}

.tb-demo-steps {
  margin: 0;
  padding-left: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
  .tb-store-settings__search {
    width: 100%;
  }
}
/* Store form: the three market defaults side by side, two then one on narrow screens. */
.tb-store-defaults {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12.5rem, 100%), 1fr));
  gap: 1rem;
}

/* Store page → Payment methods and Shipping methods tabs, their drawers and form pages
   (api/store/method/*). Shared pieces belong in _tb-page.scss. */
.tb-methods {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  /* A switched-off method reads as such without hiding its controls. */
  /* Sortable's fallback clone while a row is dragged. */
}
.tb-methods__issues {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tb-methods__table td {
  vertical-align: middle;
}
.tb-methods__col-handle {
  width: 2.75rem;
}
.tb-methods__handle {
  cursor: grab;
  color: var(--tb-slate);
}
.tb-methods__handle:active {
  cursor: grabbing;
}
.tb-methods__off .tb-strong {
  color: var(--tb-grey);
}
.tb-methods .sortable-chosen {
  background: var(--tb-row-hover);
}
.tb-methods__express {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}
.tb-methods__warn {
  color: var(--tb-warn-fg);
}
.tb-methods__twin {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--tb-info-fg);
}
.tb-methods__group-head th {
  padding: 0.625rem 1rem 0.625rem 3.625rem;
  background: var(--tb-row-hover);
  border-top: 1px solid var(--tb-rule-strong);
  font-weight: 400;
  text-align: left;
}
.tb-methods__order-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--tb-rule);
  background: var(--tb-row-hover);
}
.tb-methods__order-bar[hidden] {
  display: none;
}
.tb-methods__order-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.tb-methods__order-text i {
  color: var(--tb-info-fg);
}
.tb-methods__order-actions {
  display: inline-flex;
  gap: 0.5rem;
}
.tb-methods__foot {
  margin: 0;
}

/* A switch that posts on change: the form carries no layout of its own. */
.tb-method-switch {
  display: inline-flex;
  margin: 0;
}

.tb-methods-express {
  display: flex;
  flex-wrap: wrap;
}
.tb-methods-express__main {
  flex: 999 1 32.5rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
}
.tb-methods-express__main p {
  margin: 0;
}
.tb-methods-express__guest {
  flex: 1 1 20rem;
  min-width: 0;
  padding: 1.25rem 1.5rem;
  border-left: 1px solid var(--tb-rule);
  background: var(--tb-row-hover);
}
.tb-methods-express__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-methods-express__buttons li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 0.875rem 0 0.375rem;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  font-weight: 500;
}
.tb-methods-express__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--tb-aubergine-900);
  color: #fff;
  font-size: 0.78125rem;
}

/* The method drawers and pages: sections separated by a rule, like the canvas's drawer. */
.tb-method-form__section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tb-method-form__section + .tb-method-form__section {
  padding-top: 1.375rem;
  border-top: 1px solid var(--tb-rule);
}
.tb-method-form__h {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tb-slate);
}
.tb-method-form__new {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.tb-method-form__new legend {
  float: none;
  margin-bottom: 0.5rem;
}
.tb-method-form__card {
  max-width: 47.5rem;
}
.tb-method-form .tb-grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
  gap: 1rem;
}

.tb-method-flag {
  align-items: center;
}

.tb-method-family {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.tb-method-family legend {
  float: none;
  margin-bottom: 0.5rem;
}
.tb-method-family__choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.75rem, 1fr));
  gap: 0.5rem;
}
.tb-method-family__choice {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-height: 3.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  cursor: pointer;
}
.tb-method-family__choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tb-method-family__choice:has(input:checked) {
  border-color: var(--tb-coral-700);
  background: var(--tb-coral-bg);
}
.tb-method-family__choice:has(input:focus-visible) {
  outline: 2px solid var(--tb-focus);
  outline-offset: 2px;
}

.tb-method-subtype {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  overflow: hidden;
}
.tb-method-subtype__prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  border-right: 1px solid var(--tb-border);
  background: var(--tb-surface);
  color: var(--tb-slate);
}
.tb-method-subtype .tb-input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
}

.tb-method-preview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: var(--tb-radius-lg);
  background: var(--tb-surface);
}
.tb-method-preview__type code {
  margin-left: 0.375rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  background: #fff;
}
.tb-method-preview__facts {
  margin: 0;
  padding-left: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Store page → Platform tab (api/store/_platform.html.twig) and its edit page. Shared pieces belong in
   _tb-page.scss. */
.tb-platform {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  /* The masked document: long values wrap instead of widening the page. */
}
.tb-platform__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.tb-platform__head .tb-card__h {
  margin: 0;
}
.tb-platform__doc {
  margin: 0;
  max-height: 30rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8125rem;
}

.tb-platform-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* The tab's intro line, above its cards. */
.tb-platform__intro {
  margin: 0;
  max-width: 55rem;
}

/* Settings: the document as the canvas draws it — one section per object of the schema (SLAS client,
   Site, OCAPI…), its fields side by side, each with its document path under it. */
.tb-platform-settings__title {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.tb-platform-settings__title .tb-card__h {
  margin: 0;
}
.tb-platform-settings .tb-platform-fields {
  gap: 0;
}
.tb-platform-settings .tb-platform-fields > .tb-field,
.tb-platform-settings .tb-platform-fields > .tb-int-group {
  padding: 1.125rem 0;
  border: 0;
  border-top: 0.0625rem solid var(--tb-border);
  border-radius: 0;
}
.tb-platform-settings .tb-int-group__title {
  float: none;
  width: auto;
  margin: 0 0 0.125rem;
  padding: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--tb-ink, inherit);
}
.tb-platform-settings .tb-int-group__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr));
  gap: 1.125rem 1.5rem;
  margin-top: 0.5rem;
}
.tb-platform-settings .tb-int-group .tb-int-group {
  grid-column: 1/-1;
  padding: 0.75rem 0.875rem;
  border: 0.0625rem solid var(--tb-border);
  border-radius: var(--dashboard-radius-control);
}
.tb-platform-settings__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 -1.5rem -1.5rem;
  padding: 1rem 1.5rem;
  border-top: 0.0625rem solid var(--tb-border);
  background: var(--tb-surface);
  border-radius: 0 0 var(--dashboard-radius-control) var(--dashboard-radius-control);
}

.tb-int-required {
  margin-left: 0.375rem;
  font-size: 0.71875rem;
  vertical-align: middle;
}

/* A field's document path: what api and Config health call it. */
.tb-int-path {
  font-size: 0.75rem;
  color: var(--tb-slate);
  overflow-wrap: anywhere;
}

/* Connection test: one row per check, its duration or its reason on the right. A failed check with
   api's details is an accordion (<details>): the row is its summary, the details below it. */
.tb-platform-checks {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-platform-checks__row {
  border-top: 0.0625rem solid var(--tb-border);
}
.tb-platform-checks__name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.tb-platform-checks__value {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--tb-slate);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tb-platform-check__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0;
}
.tb-platform-check summary.tb-platform-check__summary {
  cursor: pointer;
  list-style: none;
  border-radius: var(--dashboard-radius-control);
}
.tb-platform-check summary.tb-platform-check__summary::-webkit-details-marker {
  display: none;
}
.tb-platform-check summary.tb-platform-check__summary:hover {
  background: var(--tb-surface);
}
.tb-platform-check summary.tb-platform-check__summary:focus-visible {
  outline: 0.125rem solid var(--tb-coral, #ba5036);
  outline-offset: 0.125rem;
}
.tb-platform-check__chevron {
  transition: transform 0.15s ease;
}
.tb-platform-check[open] .tb-platform-check__chevron {
  transform: rotate(180deg);
}
.tb-platform-check__detail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--dashboard-radius-control);
  background: var(--tb-surface);
  font-size: 0.8125rem;
}
.tb-platform-check__detail > div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.tb-platform-check__detail dt {
  color: var(--tb-slate);
  font-size: 0.75rem;
}
.tb-platform-check__detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.tb-platform-checks__row.is-running {
  color: var(--tb-slate);
}

.tb-platform-check--running {
  color: var(--tb-slate);
}

.tb-platform-test__error {
  padding: 0.625rem 0.75rem;
  border-radius: var(--dashboard-radius-control);
  background: var(--tb-danger-bg);
  color: var(--tb-danger-fg);
  font-size: 0.8125rem;
}

.tb-platform-check--ok {
  color: var(--tb-success-fg);
}

.tb-platform-check--failed {
  color: var(--tb-danger-fg);
}

.tb-platform-check--skipped {
  color: var(--tb-slate);
}

.tb-platform-test__run {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
}

/* Store page → A/B tests (api/store/ab_test/*). Shared pieces belong in _tb-page.scss. */
/* --- Tab: the list of tests ------------------------------------------------- */
.tb-ab-tests {
  /* Cells wrap (the shared table keeps every cell on one line): this table is wide, and on a laptop
     screen it outgrew the card. A badge or a date still never breaks. */
  /* The test id is one long token: let it break rather than widen the column. */
}
.tb-ab-tests__intro {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 20rem;
}
.tb-ab-tests__intro p {
  margin: 0;
}
.tb-ab-tests__table td {
  padding-top: 1rem;
  padding-bottom: 1rem;
  vertical-align: top;
  white-space: normal;
}
.tb-ab-tests__table td .tb-badge, .tb-ab-tests__table td .tb-tag {
  white-space: nowrap;
}
.tb-ab-tests__id {
  overflow-wrap: anywhere;
}
.tb-ab-tests__when {
  white-space: nowrap;
}
.tb-ab-tests__name, .tb-ab-tests__stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  line-height: 1.35;
  min-width: 0;
}
.tb-ab-tests__name .tb-tags {
  margin-top: 0.25rem;
}
.tb-ab-tests__actions {
  display: inline-flex;
  gap: 0.25rem;
}

/* The test api is routing by right now: a stripe on the row, the "Running" badge says the rest. */
#tb-store-panel-ab-tests tr[aria-current=true] > td:first-child {
  box-shadow: inset 0.1875rem 0 0 var(--tb-success-fg);
}

/* One block per variant: name (+ Control) and weight, its share of traffic as a bar, then the
   visitors. Stacked so the column stays narrow: on one line the cell outgrew the card on a laptop
   screen and the visitors ran under the row's actions. */
.tb-ab-variants {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 11rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-ab-variants li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem 0.75rem;
}
.tb-ab-variants__name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.tb-ab-variants__bar {
  grid-column: 1/-1;
  height: 0.375rem;
  border-radius: 0.1875rem;
  background: var(--tb-surface);
  overflow: hidden;
}
.tb-ab-variants__bar i {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: var(--tb-coral-700);
}
.tb-ab-variants__weight {
  text-align: right;
  white-space: nowrap;
}
.tb-ab-variants__visitors {
  grid-column: 1/-1;
}

/* Two icon buttons: the shared 56px action column holds one. */
.tb-ab-tests__table .tb-col-action {
  width: auto;
  white-space: nowrap;
}

/* --- Form ------------------------------------------------------------------- */
.tb-ab-test-form__devices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.tb-ab-test-form__how {
  margin: 0;
  padding-left: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--tb-slate);
}

.tb-ab-test-form__variants {
  /* A cell holding an input and, below it, its error: the input stays on the row's middle line. */
  /* The control radio and the remove checkbox: the console's drawn controls, centred in a fixed
     column so they line up with the inputs instead of floating at the cell's top-left. */
}
.tb-ab-test-form__variants td {
  vertical-align: middle;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}
.tb-ab-test-form__variants .tb-field {
  gap: 0.375rem;
}
.tb-ab-test-form__variants .tb-choice {
  display: inline-flex;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 0.625rem;
}

.tb-ab-test-form__col-control {
  width: 5.5rem;
  text-align: center;
}

.tb-ab-test-form__col-weight {
  width: 9.375rem;
}

.tb-ab-test-form__col-remove {
  width: 3.5rem;
  text-align: center;
}

/* "Add variant", under the rows it adds to (tb-collection). */
.tb-ab-test-form__add {
  margin-top: 0.75rem;
}

/* "%" inside the weight input, on its right edge. */
.tb-ab-test-form__suffixed {
  position: relative;
  display: block;
}
.tb-ab-test-form__suffixed .tb-input {
  padding-right: 2rem;
  text-align: right;
}

.tb-ab-test-form__suffix {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  transform: translateY(-50%);
  color: var(--tb-slate);
  pointer-events: none;
}

/* A scheduled test: when it switches on, and what it replaces. */
.tb-ab-test-form__notice {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.875rem 1.125rem;
  border-radius: var(--tb-radius);
  background: var(--tb-info-bg);
  color: var(--tb-info-fg);
}

/* The takeover to confirm before saving: which running tests stop, and when. */
.tb-ab-test-form__takeover {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--tb-warn-fg);
  border-radius: var(--tb-radius-lg);
  background: var(--tb-warn-bg);
}
.tb-ab-test-form__takeover .tb-card__h {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--tb-warn-fg);
}
.tb-ab-test-form__takeover ul {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.tb-ab-test-form__takeover .tb-choice {
  align-self: flex-start;
  padding: 0;
  min-height: auto;
  font-weight: 500;
}

/* A locked field's value, where the input would be. */
.tb-ab-test-form__fixed {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border-radius: var(--tb-radius);
  background: var(--tb-surface);
  color: var(--tb-ink);
}

.tb-ab-test-form__dup {
  align-self: flex-start;
}

/* Page-specific additions for the clients screens. Shared pieces belong in _tb-page.scss. */
/* Header: the 56px initials tile beside the title block. */
.tb-client-head {
  flex-wrap: nowrap;
  gap: 1rem;
}

.tb-client-head .tb-head__main {
  gap: 0.625rem;
}

/* Client ID input with the lock drawn inside it on edit. */
.tb-client-id {
  position: relative;
  display: block;
}
.tb-client-id__lock {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  transform: translateY(-50%);
  color: var(--tb-grey);
  pointer-events: none;
}
.tb-client-id .form-control {
  padding-right: 2.5rem;
}

/* Stores card: the table runs edge to edge, its first column lined up with the card's title. */
.tb-client-stores {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem 1.75rem 0.5rem;
  overflow: hidden;
}
.tb-client-stores__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.tb-client-stores .tb-table-wrap {
  margin: 0 -1.75rem;
}
.tb-client-stores .tb-table th:first-child,
.tb-client-stores .tb-table td:first-child {
  padding-left: 1.75rem;
}
.tb-client-stores__empty {
  margin-bottom: 1.25rem;
}

/* Record pages: the rail carries the Products card as well as the record, so it gets 40% of the
   width instead of a third. Still wraps under the main column on narrow screens. */
.tb-cols--wide-rail > .tb-cols__main {
  flex: 3 1 32.5rem;
}
.tb-cols--wide-rail > .tb-cols__rail {
  flex: 2 1 22.5rem;
}

/* Products card: a validity period, and in the assign drawer what each product opens. */
.tb-cp-validity {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tb-cp-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.375rem;
}

/* A product with its features under it: the box sits on the label's first line. */
.tb-cp-choice {
  align-items: flex-start;
}

.tb-cp-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

/* A row's validity is its edit button: the dates, and a pen that shows on hover and focus. */
.tb-cp-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: -0.25rem -0.375rem;
  padding: 0.25rem 0.375rem;
  border: 0;
  border-radius: var(--dashboard-radius-control);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tb-cp-edit__icon {
  color: var(--dashboard-text-secondary);
  font-size: 0.75rem;
  opacity: 0.5;
}
.tb-cp-edit:hover, .tb-cp-edit:focus-visible {
  background: var(--dashboard-control-bg);
}
.tb-cp-edit:hover .tb-cp-edit__icon, .tb-cp-edit:focus-visible .tb-cp-edit__icon {
  opacity: 1;
}

/* The dates drawer and the remove dialog are rendered inside their table cell: they must not
   inherit its nowrap or right alignment. */
.tb-client-stores td :is(.tb-drawer, .tb-dialog) {
  white-space: normal;
  text-align: left;
}

/* Groups pages (admin/group/). Shared pieces belong in _tb-page.scss. */
.tb-group-name {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.tb-group-name a {
  color: var(--tb-ink);
}

.tb-group-head__slug {
  color: var(--tb-ink);
}

.tb-gid {
  word-break: break-all;
  font-size: 0.78125rem;
}

/* Store grants: one collapsible block per client. */
.tb-gstores > :not(.tb-card__h, .tb-gstores__head, .tb-gauth__group) {
  margin-left: 1rem;
}
.tb-gstores__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}
.tb-gstores__head > :first-child {
  flex: 1 1 15rem;
  min-width: 0;
}
.tb-gstores__search {
  width: auto;
  max-width: none;
}
.tb-gstores__clients {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tb-gstores__client {
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
}
.tb-gstores__client[hidden] {
  display: none;
}
.tb-gstores__client[open] > .tb-gstores__summary .tb-gstores__chevron {
  transform: rotate(180deg);
}
.tb-gstores__summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  cursor: pointer;
  list-style: none;
}
.tb-gstores__summary::-webkit-details-marker {
  display: none;
}
.tb-gstores__count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
}
.tb-gstores__chevron {
  color: var(--tb-grey);
  font-size: 0.75rem;
  transition: transform 0.15s;
}
.tb-gstores__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: 0.125rem 0.75rem;
  padding: 0 0.875rem 0.75rem 2.75rem;
}
.tb-gstores__store {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: var(--tb-radius-sm);
  cursor: pointer;
}
.tb-gstores__store:hover {
  background: var(--tb-surface);
}
.tb-gstores__store[hidden] {
  display: none;
}
.tb-gstores__store .tb-mono {
  margin-left: auto;
  font-size: 0.75rem;
}
.tb-gstores__store-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-gstores__nomatch {
  margin: 0;
}

/* Reports / features as switch rows. */
.tb-switch-list {
  display: flex;
  flex-direction: column;
}
.tb-switch-list__row {
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--tb-rule);
}
.tb-switch-list__row:last-child {
  border-bottom: 0;
}
.tb-switch-list__label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.tb-gauth__group {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-inline: -1.75rem;
  padding: 1.375rem 1.75rem 0;
  border-top: 1px solid var(--tb-rule);
}
.tb-card__h + .tb-gauth__group {
  padding-top: 0;
  border-top: 0;
}
.tb-gauth__h {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tb-ink);
}
.tb-gauth__body {
  margin-left: 1rem;
}

/* Record page. */
.tb-gaccess__client {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tb-gaccess__dot {
  background: var(--tb-border-hover);
}
.tb-gaccess__dot.is-on {
  background: var(--tb-success-fg);
}
.tb-gaccess__unknown {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  color: var(--tb-warn-fg);
}

.tb-gmembers__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.125rem 1.25rem;
}
.tb-gmembers__empty {
  margin: 0 1.25rem 1.25rem;
}

.tb-gsso__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
}

@media (max-width: 767.98px) {
  .tb-gstores__list {
    padding-left: 0.875rem;
  }
  .tb-gstores > :not(.tb-card__h, .tb-gstores__head, .tb-gauth__group),
  .tb-gauth__body {
    margin-left: 0;
  }
}
/* Page-specific additions for the orders screens. Shared pieces belong in _tb-page.scss. */
/* Header client select: same recessed control as the other context selectors. */
.tb-orders {
  /* Search + chips on the left, the attempts switch on the right; the chip region joins the flex row
     (Checkout recovery, Suspected automation). */
  /* The Orders and Baskets toolbar's second row (a `.tb-toolbar__filters`), under search (+ List | Map)
     and the attempts switch. */
  /* Status cell: the status badge, then the checkout's attempt count or this row's place in it. */
  /* "Show every attempt": a row that is one attempt among several carries a grey rule. */
  /* Holds the Overview's calendar (crud/_range_calendar): wide enough for a 7-column month and
     never a scroll box of its own. */
  /* Two side-by-side fields (the drawer's Total min/max). */
}
.tb-orders__filter-row {
  margin-top: 0.75rem;
}
.tb-orders__stack {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.tb-orders__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.tb-orders__attempts {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  background: #fff;
  color: var(--tb-slate);
  font-size: 0.78125rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.tb-orders__attempts i {
  font-size: 0.6875rem;
}
.tb-orders__attempts:hover {
  border-color: var(--tb-border-hover);
  color: var(--tb-ink);
  text-decoration: none;
}
.tb-orders__attempt-row td:first-child {
  box-shadow: inset 3px 0 0 var(--tb-rule);
}
.tb-orders__period-pop.tb-filter__menu {
  width: 20rem;
  max-height: none;
}
.tb-orders__range {
  margin-top: 0.375rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--tb-rule);
}
.tb-orders__range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.tb-orders__range-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0;
}

.tb-tabs--in-card .tb-count {
  margin-left: 0;
}

/* --- Order detail ---------------------------------------------------------- */
.tb-order {
  /* A failed attempt of a checkout: which attempt it is, and the order that was paid. */
  /* "Payment attempts" card: the checkout's orders, oldest first, this one highlighted. */
  /* The number, and "This order" UNDER it. */
  /* A payment failure code whose message is in the tooltip (api/order/_failure_reason). */
  /* Activity across a checkout: this order's events in Bold, its sibling orders' in grey. Bold, not
     tb-strong: the body font's Medium (500) next to its Regular reads the same at a glance. */
  /* The table's cells are `nowrap`: here a platform attribute can be a long unbroken value (a JSON
     blob), which would stretch the whole table, so the panel wraps and its columns may shrink. */
  /* Custom attributes: a readable measure, long values breaking inside it. */
  /* A delivery method and its type badge on one line. */
}
.tb-order__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
}
.tb-order__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.125rem;
  color: var(--tb-grey);
}
.tb-order__nav {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.tb-order__head-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
}
.tb-order__flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tb-order__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}
.tb-order__main {
  flex: 2 1 32.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}
.tb-order__rail {
  flex: 1 1 18.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}
.tb-order__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.tb-order__banner {
  align-items: center;
  flex-wrap: wrap;
}
.tb-order__banner-text {
  flex: 1 1 22.5rem;
  min-width: 0;
}
.tb-order__attempts {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-order__attempt {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  margin: 0 -0.625rem;
  padding: 0.75rem 0.625rem;
  border-radius: var(--tb-radius);
}
.tb-order__attempt.is-current {
  background: #faf9fb;
  box-shadow: inset 0 0 0 1px var(--tb-rule-strong);
}
.tb-order__attempt-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: var(--tb-slate);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
}
.tb-order__attempt-node--success {
  background: var(--tb-success-fg);
}
.tb-order__attempt-node--danger {
  background: var(--tb-danger);
}
.tb-order__attempt-node--warn {
  background: var(--tb-warn-fg);
}
.tb-order__attempt-node--info {
  background: var(--tb-info-fg);
}
.tb-order__attempt-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.tb-order__attempt-id {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
.tb-order__attempt-reason {
  color: var(--tb-danger-fg);
  font-size: 0.8125rem;
}
.tb-order__reason {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: help;
}
.tb-order__attempts-foot {
  margin: 0.875rem 0 0;
  padding-top: 0.875rem;
  border-top: 1px solid var(--tb-rule);
}
.tb-order__here {
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding: 0 0.375rem;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-ink);
  color: #fff;
  font-size: 0.71875rem;
  font-weight: 500;
  white-space: nowrap;
}
.tb-order__current-row td {
  background: #faf9fb;
}
.tb-order__event-mine {
  color: var(--tb-ink);
  font-weight: 700;
}
.tb-order__event-other {
  color: var(--tb-slate);
  font-weight: 400;
}
.tb-order__line {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--tb-rule);
}
.tb-order__line-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.tb-order__line-total {
  width: 6.875rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tb-order__totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.625rem 1.5rem;
  width: min(23.75rem, 100%);
  margin: 1.125rem 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.tb-order__totals dt {
  color: var(--tb-grey);
  font-weight: 400;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tb-order__totals dd {
  margin: 0;
  text-align: right;
}
.tb-order__totals .is-total {
  padding-top: 0.625rem;
  border-top: 1px solid var(--tb-rule);
  color: var(--tb-ink);
  font-weight: 500;
}
.tb-order__totals dd.is-total {
  font-size: 1rem;
}
.tb-order__section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.125rem;
  border-top: 1px solid var(--tb-rule);
}
.tb-order__products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem 0.875rem 1.25rem;
  border-bottom: 1px solid var(--tb-rule);
}
.tb-order__disc {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tb-order__disc > .fa-chevron-right {
  transition: transform 0.15s;
  color: var(--tb-grey);
}
.tb-order__disc[aria-expanded=true] > .fa-chevron-right {
  transform: rotate(90deg);
}
.tb-order__detail-row > td {
  padding: 0 !important;
  background: var(--tb-surface-soft, #faf9fb);
  white-space: normal;
}
.tb-order__detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16.25rem, 100%), 1fr));
  gap: 1.75rem;
  padding: 1.375rem 1.5rem 1.625rem 5.125rem;
}
.tb-order__detail > * {
  min-width: 0;
}
.tb-order__attrs-col {
  max-width: 45rem;
}
.tb-order__sub-h {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tb-ink);
}
.tb-order__raw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.tb-order__copied {
  font-size: 0.8125rem;
  color: var(--tb-success-fg);
}
.tb-order__method {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tb-order__idtag {
  display: inline-flex;
  align-items: center;
  height: 1.375rem;
  padding: 0 0.375rem;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
  color: var(--tb-slate);
  font-family: var(--tb-mono);
  font-size: 0.75rem;
}

@media (max-width: 767.98px) {
  .tb-order__detail {
    padding-left: 1.5rem;
  }
}
/* A line thumbnail with api's product image over the placeholder icon (see _line_thumb). */
.tb-thumb {
  position: relative;
  overflow: hidden;
}

.tb-thumb--img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--tb-surface);
}

.tb-order__line-name {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Order details → Observability: one card per request of the checkout. */
.tb-obs-order {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tb-obs-order__how {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.tb-obs-order__trace--error {
  border-left: 3px solid var(--tb-danger-fg);
}
.tb-obs-order__body {
  padding: 0 1rem 0.75rem;
}
.tb-obs-order__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tb-obs-order__when {
  white-space: nowrap;
}

/* A stored request/response body or log context, bounded so one payload cannot run the page. */
.tb-obs-payload {
  max-height: 20rem;
  margin: 0;
  padding: 0.625rem;
  overflow: auto;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--tb-neutral-bg);
  border-radius: var(--tb-radius-sm);
}

/* The group takes the row's free space, or a flex-basis filter makes it wrap early. On a phone it takes
   a line of its own (as every `.tb-toolbar__filters` does), the switches going under it. */
.tb-orders .tb-toolbar__filters {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 767.98px) {
  .tb-orders .tb-toolbar__filters {
    flex-basis: 100%;
  }
}

/* "Clear all" stays beside "More filters", its own width — on a phone too, where the row's other
   children take a line each. */
.tb-toolbar__filters > .tb-orders__clear-all {
  flex: 0 0 auto;
  align-self: center;
}

/* A filter dropdown in the "More filters" drawer takes the drawer's width, its menu too. */
.tb-drawer .tb-filter {
  flex: none;
  width: 100%;
  /* The fieldset's legend already names the filter: the button's own key would say it twice. Kept
     for screen readers, which announce the button on its own. */
}
.tb-drawer .tb-filter .tb-filter__menu {
  right: 0;
  width: auto;
  max-width: none;
}
.tb-drawer .tb-filter .tb-filter__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A recorded fact (account, device, delivery type, coupon) links to the list filtered on it — and
   keeps its badge's own colour, which `.tb-page a` (the coral link colour) would otherwise win. */
.tb-page a.tb-fact {
  text-decoration: none;
  cursor: pointer;
}
.tb-page a.tb-fact.tb-badge--neutral {
  color: var(--tb-neutral-fg);
}
.tb-page a.tb-fact.tb-badge--info {
  color: var(--tb-info-fg);
}
.tb-page a.tb-fact.tb-badge--warn {
  color: var(--tb-warn-fg);
}
.tb-page a.tb-fact.tb-order__idtag {
  color: var(--tb-slate);
}
.tb-page a.tb-fact:hover, .tb-page a.tb-fact:focus-visible {
  text-decoration: none;
  filter: brightness(0.95);
  box-shadow: inset 0 0 0 1px currentColor;
}

.tb-page a.tb-order__idtag.tb-fact + a.tb-order__idtag.tb-fact {
  margin-left: 0.25rem;
}

/* --- Attributes tab (order and basket pages): the platform's custom attributes --------------- */
.tb-attributes {
  display: grid;
  gap: 1.25rem;
}
.tb-attributes__section {
  display: grid;
  gap: 0.625rem;
}

/* Page-specific additions for the Baskets screens (list + detail). Shared pieces belong in
   _tb-page.scss; the list and the detail otherwise reuse the Orders classes (tb-orders, tb-order). */
.tb-baskets {
  /* The furthest checkout step: four dots, the reached ones filled, then the step's name. */
  /* Under the tabs: why the Suspected automation tab counts over a shorter span than the period. */
  /* Detail: the baskets of the checkout, oldest first, the current one emphasised. */
}
.tb-baskets__stage {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}
.tb-baskets__stage > span:last-child {
  margin-left: 0.25rem;
}
.tb-baskets__tab-note {
  margin: 0;
  padding: 0.5rem 1rem 0;
}
.tb-baskets__step {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--tb-rule-strong);
}
.tb-baskets__step.is-reached {
  background: var(--tb-info-fg);
}
.tb-baskets__op {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.tb-baskets__chain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tb-baskets__chain li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--tb-rule);
  border-radius: 0.5rem;
}
.tb-baskets__chain li.is-current {
  border-color: var(--tb-info-fg);
}
.tb-baskets__order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tb-baskets__step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}
.tb-baskets__step-label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.tb-baskets__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.375rem;
  margin-top: 0.125rem;
}
.tb-baskets__fact {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.0625rem 0.5rem;
  border: 1px solid var(--tb-rule);
  border-radius: 0.375rem;
  font-size: 0.78125rem;
}
.tb-baskets__event-name {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.25rem 0.75rem;
  margin-left: auto;
  font-size: 0.71875rem;
}
.tb-baskets__journal-step.is-continued {
  margin-top: -0.75rem;
}

.tb-activity:not(.is-technical) .tb-tech {
  display: none !important;
}

/* Map view: the tabs, then the map beside its figures (stacked on a narrow screen).
   On a wide screen the map takes the rest of the window below the toolbar, never less than
   460px: `--tb-basket-map-top` is the body's offset from the top of the page, measured by
   tb-basket-map (it moves with the toolbar's wrapping and the pills); the fallback is a typical
   offset. The figures scroll inside their column. */
.tb-basket-map {
  /* The map and its zoom controls, laid over its top-left corner. */
  /* Our own buttons (the library's 15px ones are hidden): one joined pair, a page button's size. */
  /* A slow pulse says the figures move by themselves; still when the reader asked for less motion. */
}
.tb-basket-map__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18.75rem;
  grid-template-rows: minmax(0, 1fr);
  height: max(28.75rem, 100dvh - var(--tb-basket-map-top, 16rem) - 1.5rem);
}
@media (max-width: 991.98px) {
  .tb-basket-map__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    height: auto;
    min-height: 28.75rem;
  }
}
.tb-basket-map__stage {
  position: relative;
  min-height: 28.75rem;
  background: var(--tb-row-hover);
}
@media (max-width: 575.98px) {
  .tb-basket-map__stage {
    min-height: 18.75rem;
  }
}
.tb-basket-map__canvas {
  position: absolute;
  inset: 0;
  /* A dragged map reads as one: the grab cursor, never the text selection. */
  cursor: grab;
  user-select: none;
}
.tb-basket-map__canvas:active {
  cursor: grabbing;
}
.tb-basket-map__zoom {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  border-radius: var(--tb-radius);
  box-shadow: 0 1px 3px rgba(34, 13, 57, 0.12);
}
.tb-basket-map__zoom .tb-btn {
  font-size: 0.9375rem;
}
.tb-basket-map__zoom .tb-btn:first-child {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.tb-basket-map__zoom .tb-btn:last-child {
  margin-top: -1px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.tb-basket-map__zoom .tb-btn:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--tb-focus);
  outline-offset: 2px;
}
.tb-basket-map__figures {
  min-height: 0;
  border-left: 1px solid var(--tb-rule);
  overflow-y: auto;
}
@media (max-width: 991.98px) {
  .tb-basket-map__figures {
    max-height: 35rem;
    border-left: 0;
    border-top: 1px solid var(--tb-rule);
  }
}
.tb-basket-map__live {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.75rem 1rem;
}
.tb-basket-map__pulse {
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  border-radius: 50%;
  background: var(--tb-success-fg);
  animation: tb-basket-map-pulse 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .tb-basket-map__pulse {
    animation: none;
  }
}

/* The map's hover popover, in the design system's popover look (white card, 8px radius, the pop
   shadow). The library's own sheet loads after ours, lazily, so the selector outranks it. It lives
   on <body>, outside the page. */
body .jvm-tooltip {
  display: none;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 8.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
  background: #fff;
  color: var(--tb-ink);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 16px 40px rgba(34, 13, 57, 0.14);
  pointer-events: none;
}
body .jvm-tooltip.active {
  display: flex;
}

.tb-map-popover__title {
  font-weight: 500;
  color: var(--tb-ink);
}

.tb-map-popover__meta {
  font-size: 0.8125rem;
  color: var(--tb-grey);
}

@keyframes tb-basket-map-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
/* The checkout screens' regions that only some views fill (the list switches, the left-out stores
   note): no box of their own, so an empty one adds no gap to the page and a filled one lays out as if
   its content stood where the region does. tb-list swaps their content in place all the same. */
.tb-source-region {
  display: contents;
}

/* "N selected stores are not shown": one muted line under the toolbar, held close to it. */
.tb-source-note__text {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  margin: -1rem 0 0;
}

/* The Activity tab's journey (order and basket pages): the summary line, the time strip, the chapters.
   Implements "B · Time strip and chapters" of the Activity tab canvas. The tab panel is a padded card;
   the journey runs edge to edge inside it, its rows keeping their own padding. */
.tb-journey {
  --tb-journey-pad: 1.125rem;
  --tb-journey-indent: 3.625rem;
  --tb-journey-step: #9aa0b2;
  display: flex;
  flex-direction: column;
  margin: -1.75rem;
  font-size: 0.8125rem;
  /* --- The time strip ---------------------------------------------------------------------- */
  /* --- The chapters ------------------------------------------------------------------------ */
  /* Routine steps (lists, searches, lookups) wait for "Show routine steps". */
}
.tb-journey__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem 1.25rem;
  padding: 0.875rem var(--tb-journey-pad);
  border-bottom: 1px solid var(--tb-rule);
}
.tb-journey__summary {
  display: flex;
  flex: 1 1 30rem;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}
.tb-journey__dot {
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--tb-slate);
}
.tb-journey__dot--success {
  background: var(--tb-success-fg);
}
.tb-journey__dot--danger {
  background: var(--tb-danger);
}
.tb-journey__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.875rem;
}
.tb-journey__actions .tb-btn i {
  margin-right: 0.375rem;
}
.tb-journey__strip-block {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1rem var(--tb-journey-pad) var(--tb-journey-pad);
  border-bottom: 1px solid var(--tb-rule);
}
.tb-journey__strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.375rem 1rem;
}
.tb-journey__strip-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.375rem 0.75rem;
  font-size: 0.75rem;
}
.tb-journey__strip-title h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}
.tb-journey__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.875rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.71875rem;
  color: var(--tb-slate);
}
.tb-journey__legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.tb-journey__key {
  display: inline-block;
  width: 0.875rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--tb-journey-step);
}
.tb-journey__key--selected {
  background: var(--tb-ink);
}
.tb-journey__key--danger, .tb-journey__key--success {
  width: 0.5rem;
  border-radius: 50%;
}
.tb-journey__key--danger {
  background: var(--tb-danger);
}
.tb-journey__key--success {
  background: var(--tb-success-fg);
}
.tb-journey__key--pause {
  border: 1px dashed var(--tb-border-hover);
  background: var(--tb-surface);
}
.tb-journey__strip-scroll {
  overflow-x: auto;
}
.tb-journey__strip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 42.5rem;
}
.tb-journey__lane {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.625rem;
  align-items: center;
}
.tb-journey__lane.is-empty .tb-journey__lane-label {
  color: var(--tb-grey);
}
.tb-journey__lane-label {
  font-size: 0.75rem;
}
.tb-journey__track {
  position: relative;
  height: 1.625rem;
  border-radius: 3px;
  background: var(--tb-row-hover);
}
.tb-journey__pause {
  position: absolute;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
  border-right: 1px dashed var(--tb-border-hover);
  border-left: 1px dashed var(--tb-border-hover);
  background: var(--tb-surface);
}
.tb-journey__span {
  position: absolute;
  top: 0.3125rem;
  bottom: 0.3125rem;
  min-width: 0.375rem;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--tb-journey-step);
  box-shadow: 0 0 0 1px #fff;
  cursor: pointer;
}
.tb-journey__span--danger {
  background: var(--tb-danger);
}
.tb-journey__span--success {
  background: var(--tb-success-fg);
}
.tb-journey__span.is-selected {
  background: var(--tb-ink);
}
.tb-journey__span:hover {
  filter: brightness(0.88);
}
.tb-journey__span:focus-visible {
  outline: 2px solid var(--tb-focus);
  outline-offset: 2px;
}
.tb-journey__mark {
  position: absolute;
  top: 0.5rem;
  width: 0.625rem;
  height: 0.625rem;
  margin-left: -0.3125rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}
.tb-journey__mark--danger {
  background: var(--tb-danger);
}
.tb-journey__mark--success {
  background: var(--tb-success-fg);
}
.tb-journey__axis {
  position: relative;
  height: 2.125rem;
}
.tb-journey__tick {
  position: absolute;
  top: 0.25rem;
  font-family: var(--tb-mono);
  font-size: 0.6875rem;
  color: var(--tb-slate);
  white-space: nowrap;
  transform: translateX(-50%);
}
.tb-journey__tick--start {
  transform: none;
}
.tb-journey__tick--end {
  transform: translateX(-100%);
}
.tb-journey__pause-label {
  position: absolute;
  top: 1.125rem;
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
  transform: translateX(-50%);
}
.tb-journey__chapters {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-journey__chapters > li + li {
  border-top: 1px solid var(--tb-rule);
}
.tb-journey__gap, .tb-journey__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.625rem;
  padding: 0.5rem var(--tb-journey-pad) 0.5rem var(--tb-journey-indent);
  font-size: 0.75rem;
  color: var(--tb-slate);
}
.tb-journey__gap .tb-strong, .tb-journey__end .tb-strong {
  color: var(--tb-ink);
}
.tb-journey__gap {
  background: var(--tb-row-hover);
}
.tb-journey__end {
  padding-block: 0.625rem;
}
.tb-journey__gap-line {
  width: 1.125rem;
  border-top: 2px dashed var(--tb-border-hover);
}
.tb-journey__end-ring {
  width: 0.625rem;
  height: 0.625rem;
  border: 2px solid var(--tb-slate);
  border-radius: 50%;
}
.tb-journey__chapter-head {
  display: grid;
  grid-template-columns: 1.5rem 7rem 12.25rem 5.25rem minmax(0, 1fr) 4.5rem 1rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.625rem var(--tb-journey-pad);
  font-size: 0.78125rem;
  list-style: none;
  cursor: pointer;
}
.tb-journey__chapter-head::-webkit-details-marker {
  display: none;
}
.tb-journey__chapter-head:hover {
  background: var(--tb-row-hover);
}
.tb-journey__chapter-head:focus-visible {
  outline: 2px solid var(--tb-focus);
  outline-offset: -2px;
}
details[open] > .tb-journey__chapter-head {
  background: var(--tb-row-hover);
}
.tb-journey__n {
  font-family: var(--tb-mono);
  font-size: 0.71875rem;
  color: var(--tb-grey);
}
.tb-journey__step {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  font-weight: 500;
}
.tb-journey__bar {
  width: 0.25rem;
  height: 1rem;
  border-radius: 2px;
  background: var(--tb-journey-step);
}
.tb-journey__chapter--danger .tb-journey__bar {
  background: var(--tb-danger);
}
.tb-journey__chapter--success .tb-journey__bar {
  background: var(--tb-success-fg);
}
.tb-journey__range {
  white-space: nowrap;
  font-family: var(--tb-mono);
  font-size: 0.71875rem;
  color: var(--tb-slate);
}
.tb-journey__duration {
  font-size: 0.75rem;
  color: var(--tb-slate);
}
.tb-journey__digest {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-journey__digest.is-quiet {
  font-weight: 400;
  color: var(--tb-slate);
}
.tb-journey__chapter--danger .tb-journey__digest {
  color: var(--tb-danger);
}
.tb-journey__count {
  font-size: 0.75rem;
  color: var(--tb-grey);
  text-align: right;
}
.tb-journey__chevron {
  font-size: 0.75rem;
  color: var(--tb-slate);
  transition: transform 0.15s ease;
}
details[open] .tb-journey__chevron {
  transform: rotate(180deg);
}
.tb-journey__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.375rem var(--tb-journey-pad) 0.875rem var(--tb-journey-indent);
  background: var(--tb-row-hover);
}
.tb-journey__body .tb-timeline li {
  grid-template-columns: 5rem 1.25rem minmax(0, 1fr);
  padding-bottom: 0.875rem;
}
.tb-journey__body .tb-timeline__node {
  box-shadow: 0 0 0 1px var(--tb-border), 0 0 0 3px var(--tb-row-hover);
}
.tb-journey__body:not(.shows-routine) .is-routine {
  display: none;
}
.tb-journey__routine {
  align-self: flex-start;
}
.tb-journey__previous {
  margin: 0;
}
.tb-journey__note {
  margin: 0;
  padding: 0.75rem var(--tb-journey-pad);
  border-top: 1px solid var(--tb-rule);
  font-size: 0.71875rem;
  color: var(--tb-grey);
}

@media (max-width: 767.98px) {
  .tb-journey__chapter-head {
    grid-template-columns: 1.25rem minmax(0, 1fr) auto 1rem;
    row-gap: 0.125rem;
  }
  .tb-journey__chapter-head .tb-journey__range,
  .tb-journey__chapter-head .tb-journey__count {
    display: none;
  }
  .tb-journey__chapter-head .tb-journey__chevron {
    grid-row: 1;
    grid-column: 4;
  }
  .tb-journey__chapter-head .tb-journey__digest {
    grid-row: 2;
    grid-column: 2/-1;
    white-space: normal;
  }
  .tb-journey__body,
  .tb-journey__gap,
  .tb-journey__end {
    padding-left: var(--tb-journey-pad);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tb-journey__chevron {
    transition: none;
  }
}
/* A marketing tag that misfired: worth a look, not a failure. Same token as `tb-badge--warn`. */
.tb-timeline__node--warning {
  background: var(--tb-warn-fg);
}

/* Page-specific additions for the announcements screens. Shared pieces belong in _tb-page.scss. */
/* --- List page (both views) ----------------------------------------------- */
/* A schedule's name reads as a title, not as a coral link. */
.tb-ann a.tb-strong {
  color: var(--tb-ink);
}

.tb-ann-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- List view ------------------------------------------------------------ */
.tb-ann-table__schedule {
  min-width: 16.25rem;
  max-width: 23.75rem;
  white-space: normal;
}
.tb-ann-table__schedule .tb-cell-stack {
  padding: 0.625rem 0;
  gap: 0.125rem;
}

/* --- Timeline view -------------------------------------------------------- */
.tb-ann-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--tb-slate);
}
.tb-ann-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* One colour rule for the legend swatch and the bar alike (`tb-ann-swatch--{status}`). */
.tb-ann-swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 3px;
}
.tb-ann-swatch--pending {
  background: var(--tb-coral-700);
}
.tb-ann-swatch--applied {
  background: var(--tb-info-fg);
}
.tb-ann-swatch--completed {
  background: var(--tb-success-fg);
}
.tb-ann-swatch--unknown {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #9a97a3;
}
.tb-ann-swatch--today {
  width: 2px;
  height: 0.875rem;
  border-radius: 0;
  background: var(--tb-coral-500);
}

.tb-ann-tl {
  overflow-x: auto;
}
.tb-ann-tl__head {
  border-bottom: 1px solid var(--tb-rule);
}
.tb-ann-tl__row {
  display: grid;
  grid-template-columns: 17.5rem minmax(38.75rem, 1fr);
  min-height: 3.75rem;
  border-bottom: 1px solid var(--tb-rule);
}
.tb-ann-tl__row:last-child {
  border-bottom: 0;
}
.tb-ann-tl__row--head {
  min-height: 2.5rem;
}
.tb-ann-tl__label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.125rem;
  min-width: 0;
  padding: 0.5rem 1.25rem;
}
.tb-ann-tl__row--head .tb-ann-tl__label {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}
.tb-ann-tl__months {
  position: relative;
}
.tb-ann-tl__months > span {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
  border-left: 1px solid var(--tb-rule);
}
.tb-ann-tl__months > span:first-child {
  border-left: 0;
}
.tb-ann-tl__track {
  position: relative;
  min-width: 0;
}
.tb-ann-tl__sep, .tb-ann-tl__today {
  position: absolute;
  top: 0;
  bottom: 0;
}
.tb-ann-tl__sep {
  width: 1px;
  background: var(--tb-rule);
}
.tb-ann-tl__today {
  z-index: 1;
  width: 2px;
  margin-left: -1px;
  background: var(--tb-coral-500);
}
.tb-ann-tl__bar {
  position: absolute;
  top: 50%;
  z-index: 2;
  height: 0.875rem;
  margin-top: -0.4375rem;
  border-radius: 0.4375rem;
  /* Continuing past the window's edge: no rounded cap on that side. */
}
.tb-ann-tl__bar:hover, .tb-ann-tl__bar:focus-visible {
  filter: brightness(0.92);
  outline-offset: 2px;
}
.tb-ann-tl__bar.is-clipped-start {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.tb-ann-tl__bar.is-clipped-end {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.tb-ann-tl__outside {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
}

/* --- Form ----------------------------------------------------------------- */
.tb-ann-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.tb-ann-card-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tb-ann-store {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}
.tb-ann-store > select, .tb-ann-store > .ts-wrapper {
  flex: 1 1 15rem;
  min-width: 0;
}
.tb-ann-store__load {
  flex: 0 0 auto;
  height: 2.75rem;
}

.tb-ann-duration {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.tb-ann-duration[hidden] {
  display: none;
}

/* Scoped under .tb-field so it outranks `.tb-field .tb-input` (display: block, white box),
   which otherwise pins the value to the top of a blank input. */
.tb-field .tb-ann-readonly {
  display: flex;
  align-items: center;
  height: 2.75rem;
  padding: 0 0.875rem;
  border-color: var(--tb-surface);
  border-radius: var(--tb-radius);
  background: var(--tb-surface);
  color: var(--tb-slate);
}
.tb-field .tb-ann-readonly:hover {
  border-color: var(--tb-surface);
}

.tb-ann-elements {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* One element: the canvas's grey panel. */
.tb-ann-el .ap-element-fields {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: 1.25rem;
  border-radius: var(--tb-radius-lg);
  background: var(--tb-surface);
}
.tb-ann-el [data-role].d-none {
  display: none !important;
}
.tb-ann-el .tb-field .form-control,
.tb-ann-el .tb-field .form-select,
.tb-ann-el .tb-field .ts-wrapper .ts-control {
  background-color: #fff;
}
.tb-ann-el .tb-field .ts-wrapper.disabled.multi .ts-control > .item {
  background: var(--tb-surface);
}
.tb-ann-el__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.tb-ann-el__head .ap-element-number {
  flex: 1;
}
.tb-ann-el__foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.tb-ann-default {
  border: 1px dashed var(--tb-border-strong);
  border-radius: var(--tb-radius);
}
.tb-ann-default__summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  list-style: none;
}
.tb-ann-default__summary::-webkit-details-marker {
  display: none;
}
.tb-ann-default__title {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: 0.375rem;
}
.tb-ann-default__chevron {
  color: var(--tb-grey);
  transition: transform 0.15s ease;
}
.tb-ann-default[open] .tb-ann-default__chevron {
  transform: rotate(180deg);
}
.tb-ann-default__body {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: 0.25rem 0.875rem 0.875rem;
}
.tb-ann-default__help {
  flex: 1;
}
.tb-ann-default .tb-field .form-control:disabled, .tb-ann-default .tb-field .form-control[readonly],
.tb-ann-default .tb-field .form-select:disabled,
.tb-ann-default .tb-field .form-select[readonly] {
  border: 1px dashed var(--tb-border-strong);
  background-color: #fff;
  color: var(--tb-slate);
  cursor: default;
}

.tb-ann-counter {
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tb-ann-counter.is-over {
  color: var(--tb-warn-fg);
  font-weight: 500;
}

/* Delete dialog. */
.tb-ann-warn {
  display: flex;
  gap: 0.5rem;
  color: var(--tb-warn-fg);
}

/* --- Preview rail --------------------------------------------------------- */
.tb-ann-rail {
  position: sticky;
  top: 4.5rem;
}
@media (max-width: 991.98px) {
  .tb-ann-rail {
    position: static;
  }
}

.tb-ann-shop {
  overflow: hidden;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
  background: #fff;
}
.tb-ann-shop__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--tb-rule);
}
.tb-ann-shop__brand {
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-ann-shop__body, .tb-ann-shop__banners {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.tb-ann-shop__body {
  padding: 1rem 1.125rem 1.25rem;
}
.tb-ann-shop__banners:empty {
  display: none;
}
.tb-ann-shop__none {
  padding: 0.75rem 0.875rem;
  border: 1px dashed var(--tb-border-strong);
  border-radius: var(--tb-radius);
  color: var(--tb-grey);
  font-size: 0.8125rem;
}
.tb-ann-shop__none[hidden] {
  display: none;
}

.tb-ann-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--tb-radius);
  background: #f3efe9;
  color: #2a2520;
  font-size: 0.8125rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.tb-ann-banner i {
  margin-top: 0.125rem;
}
.tb-ann-banner .is-empty {
  color: var(--tb-placeholder);
  font-style: italic;
}
.tb-ann-banner__link {
  text-decoration: underline;
}
.tb-ann-banner.is-placeholder {
  border: 1px dashed var(--tb-border-strong);
  background: var(--tb-row-hover);
  color: var(--tb-slate);
  font-style: italic;
}

/* Skeleton of the checkout page below the banners: three lines (the third shorter), then a CTA. */
.tb-ann-sk {
  display: block;
  width: 100%;
  height: 2.5rem;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
}
.tb-ann-sk:first-of-type {
  margin-top: 0.375rem;
}
.tb-ann-sk:nth-of-type(3) {
  width: 70%;
}
.tb-ann-sk--cta {
  height: 2.75rem;
  margin-top: 0.375rem;
  background: #2a2520;
  opacity: 0.85;
}

/* Page-specific additions for the Identity providers and SSO configurations screens. Shared
   pieces belong in _tb-page.scss. */
/* List: the initials tile beside the provider name. */
.tb-idp-name {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.tb-idp-name__link {
  color: var(--tb-ink);
}

/* Header: the 56px initials tile beside the title block, and the status badge on the title line. */
.tb-idp-head {
  flex-wrap: nowrap;
  gap: 1rem;
}

.tb-idp-head .tb-head__main {
  gap: 0.625rem;
}

.tb-idp-head__title {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* Provider page: its SSO configurations, the table edge to edge under the card title. */
.tb-idp-sso {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem 1.75rem 0.5rem;
}
.tb-idp-sso__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.tb-idp-sso .tb-table-wrap {
  margin: 0 -1.75rem;
}
.tb-idp-sso .tb-table th:first-child,
.tb-idp-sso .tb-table td:first-child {
  padding-left: 1.75rem;
}
.tb-idp-sso__empty {
  margin: 0 0 1.25rem;
}

/* Disable confirmation: the groups losing this sign-in. */
.tb-idp-groups {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--tb-ink);
}

/* SSO list: the chip region joins the toolbar's flex row. */
.tb-sso-chips {
  display: contents;
}

/* Long issuer URLs and client ids break instead of widening the card. */
.tb-sso-wrap {
  overflow-wrap: anywhere;
}

/* Page-specific additions for the Users screens. Shared pieces belong in _tb-page.scss. */
/* Toolbar: Create user + Invite users stay one group on the right. */
.tb-user-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

/* List: initials + name over email. */
.tb-user-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.tb-user-cell__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.tb-user-cell__text a {
  color: var(--tb-ink);
}

.tb-user-avatar {
  flex: none;
}

.tb-user-head {
  align-items: center;
  gap: 1rem;
}

/* Resend invitation is a POST button among the header's links. */
.tb-user-inline-form {
  display: contents;
}

.tb-user-nowrap {
  white-space: nowrap;
}

.tb-user-params > summary {
  cursor: pointer;
  color: var(--tb-coral-500);
}

.tb-user-activity-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--tb-rule);
}

/* Page-specific additions for the Activity log screens. Shared pieces belong in _tb-page.scss. */
.tb-activity {
  /* The chip region joins the toolbar's flex row. */
  /* A path can be long (a UUID in it); the cell truncates and the title holds the whole. */
  /* Holds the Overview's calendar (crud/_range_calendar), as on the Orders Period chip. */
}
.tb-activity__chips {
  display: contents;
}
.tb-activity__stack {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  color: inherit;
}
.tb-activity__path {
  max-width: 22.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-activity__path-full {
  overflow-wrap: anywhere;
}
.tb-activity__period-pop.tb-filter__menu {
  width: 20rem;
  max-height: none;
}
.tb-activity__range {
  margin-top: 0.375rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--tb-rule);
}
.tb-activity__id {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.tb-activity__done {
  font-size: 0.8125rem;
  color: var(--tb-success-fg);
}
.tb-activity__sub {
  margin: 1rem 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tb-slate);
}
.tb-activity__sub:first-of-type {
  margin-top: 0;
}

.changelog-type-dot {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  vertical-align: middle;
}
.changelog-type-dot.changelog-type-feature {
  background-color: var(--changelog-type-feature-bg);
}
.changelog-type-dot.changelog-type-improvement {
  background-color: var(--changelog-type-improvement-bg);
}
.changelog-type-dot.changelog-type-change {
  background-color: var(--changelog-type-change-bg);
}
.changelog-type-dot.changelog-type-fix {
  background-color: var(--changelog-type-fix-bg);
}

/* List: title with its preview underneath, and the pin / highlight marks. The title wraps (an
   80-character one, or one long word, ran over the next columns: list cells are `nowrap`); the
   preview stays on one line, cut short, and its width is capped so it cannot widen the cell. */
.tb-table td.tb-cl-title {
  min-width: 15rem;
  max-width: 23.75rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  white-space: normal;
}

.tb-cl-title__link {
  overflow-wrap: anywhere;
}
.tb-cl-title__preview {
  display: block;
  max-width: 21.75rem;
  margin-top: 0.125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-cl-pin,
.tb-cl-star {
  margin-left: 0.375rem;
  font-size: 0.75rem;
  color: var(--tb-coral-500);
}

.tb-cl-editor {
  display: block;
  font-size: 0.8125rem;
}

.tb-cl-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tb-cl-actions {
  white-space: nowrap;
}

.tb-cl-actions .tb-btn.is-on {
  color: var(--tb-coral-500);
}

/* Form: one locale's pane of fields, switched by Bootstrap's tab JS; the margin separates the
   panes from the tabs bar above. The tabs themselves are plain `tb-tab` (active, has-error and
   the `.tb-status-dot` all come from the shared components). */
.tb-cl-panes {
  margin-top: 1.25rem;
}
.tb-cl-panes .tab-pane {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}
.tb-cl-panes .tab-pane.active {
  display: flex;
}

.tb-cl-default {
  font-size: 0.75rem;
  font-weight: 400;
}

/* Detail: one locale's content. */
.tb-cl-content {
  padding: 1.5rem 1.75rem 1.75rem;
}
.tb-cl-content__title {
  margin: 0 0 0.625rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--tb-ink);
}
.tb-cl-content__preview {
  margin: 0 0 1.125rem;
  color: var(--tb-slate);
}
.tb-cl-content__body {
  color: var(--tb-ink);
  overflow-wrap: anywhere;
}
.tb-cl-content__body img {
  max-width: 100%;
  height: auto;
}

/* Rail: activity history. */
.tb-cl-activity {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-cl-activity li {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 0.875rem;
}

/* Manage page: the banner of a published entry whose edits wait for a publish. */
.tb-cl-pending {
  flex-wrap: wrap;
  align-items: center;
}
.tb-cl-pending__text {
  flex: 1 1 20rem;
}
.tb-cl-pending__text a {
  color: inherit;
  text-decoration: underline;
}
.tb-cl-pending__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tb-cl-pending__actions form {
  margin: 0;
}

/* Page-specific additions for the Checkout recovery screen and the store History/Health tabs.
   Shared pieces belong in _tb-page.scss. */
/* Checkout recovery (checkout_recovery/*): lost baskets by stage and reason. The reason families
   carry the canvas's colours (refused, at the PSP, technical, checkout rules, in the browser, no
   error); each is a tag, a chip dot and a hover. */
.tb-recovery {
  /* The swapped view (List | Stages | Patterns): its sections keep the page's rhythm. */
  /* The page-load shell: the loader holds the room the KPIs and the view will take. */
  /* Chips, toggles, stage cards and reason rows are links styled as controls: no underline on
     hover (the page underlines text links), the border or the fill says it is live. */
  /* The KPI tiles and the chip rows sit between the toolbar and the list. */
  /* Where / Why: two rows of links that filter the list in place. */
  /* The list's head: title and count, what it is narrowed to, and the "worth chasing" toggles. */
  /* Rows carry two or three lines each (id + store, why + detail, shopper + contact): room around
     them, and between their lines, keeps a long list readable. */
  /* Nine columns beside the sidebar: a two-word header may take two lines rather than push Open out. */
  /* The short basket id is one token: wrapping it splits it in two. */
  /* An email is one long token: cap the column and let it wrap inside, or it pushes Value off screen. */
  /* break-word, not anywhere: a slug wraps only when it cannot fit at all, so it stays whole. */
  /* The other lines under a row's reason, wrapping as the detail does: how a basket with no error was
     left (in ink — for "Left, no error" it IS the answer), what it got past, its last step and time at
     the stage (muted facts, like the detail). */
  /* Shared by the Stages and Patterns views: a section's title row, a share bar, a "more" link. */
  /* Stages: the funnel's cards (cart, the three stages as links, converted). */
  /* A stage card is a link: its text keeps the ink, not the link colour. */
  /* Stages: the reasons table beside its two side cards. */
  /* Stages › payment: payments by tender, a failing tender flagged. */
  /* Patterns: the ranked list beside the "Worth chasing" rail. */
  /* Patterns: the Rises | Shares toggle beside the legend, and the Shares mode's rows per step. */
  /* Its own class: `__share` is the Stages reasons table's bar cell (28% wide), which must not become a grid. */
  /* Stages: what each signal cost, under the browser blockers. */
}
.tb-recovery__view {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.tb-recovery__view--pending {
  min-height: 22.5rem;
}
.tb-recovery :is(a.tb-recovery__pick, a.tb-recovery__toggle, a.tb-recovery__stage-card, a.tb-recovery__reason-link, .btn-group-filter a):hover {
  text-decoration: none;
}
.tb-recovery [data-tb-list-region=kpis] {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.tb-recovery__context {
  margin: 0;
}
.tb-recovery__split {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}
.tb-recovery__delta {
  font-weight: 600;
}
.tb-recovery__delta--up {
  color: var(--tb-danger-fg);
}
.tb-recovery__delta--down {
  color: var(--tb-success-fg);
}
.tb-recovery__chips {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tb-recovery__chip-row {
  display: grid;
  grid-template-columns: 8.75rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}
.tb-recovery__picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tb-recovery__family {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.tb-recovery__family-h {
  margin-right: 0.125rem;
}
.tb-recovery__cart-note {
  margin-left: 0.25rem;
}
.tb-recovery__pick {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--tb-border);
  border-radius: 1.125rem;
  background: #fff;
  color: var(--tb-ink);
  text-decoration: none;
  white-space: nowrap;
}
.tb-recovery__pick:hover {
  border-color: var(--tb-border-hover);
  color: var(--tb-ink);
}
.tb-recovery__pick.is-on {
  border-color: var(--tb-ink);
  background: var(--tb-ink);
  color: #fff;
}
.tb-recovery__pick.is-on .tb-recovery__pick-n {
  color: #d6d3dc;
}
.tb-recovery__pick-n {
  color: var(--tb-slate);
  font-variant-numeric: tabular-nums;
}
.tb-recovery__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}
.tb-recovery__list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
}
.tb-recovery__list-title {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.tb-recovery__chase {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tb-recovery__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  background: #fff;
  color: var(--tb-ink);
  text-decoration: none;
  white-space: nowrap;
}
.tb-recovery__toggle:hover {
  border-color: var(--tb-border-hover);
  color: var(--tb-ink);
}
.tb-recovery__toggle.is-on {
  border-color: var(--tb-coral-500);
  background: var(--tb-coral-50);
  color: var(--tb-coral-800);
}
.tb-recovery__table td, .tb-recovery__samples td {
  height: auto;
  padding-block: 1.125rem;
  vertical-align: top;
  white-space: normal;
  line-height: 1.5;
}
.tb-recovery__table .tb-orders__stack, .tb-recovery__samples .tb-orders__stack {
  gap: 0.25rem;
}
.tb-recovery__table th {
  white-space: normal;
  vertical-align: bottom;
}
.tb-recovery__table .tb-mono, .tb-recovery__table .tb-recovery__when {
  white-space: nowrap;
}
.tb-recovery__shopper {
  min-width: 9.375rem;
  max-width: 15rem;
  overflow-wrap: anywhere;
}
.tb-recovery__row--recovered > td {
  background: var(--tb-success-bg);
}
.tb-recovery__tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.tb-recovery__detail {
  overflow-wrap: break-word;
}
.tb-recovery__left {
  color: var(--tb-ink);
  overflow-wrap: break-word;
}
.tb-recovery__got-past, .tb-recovery__last-step {
  overflow-wrap: break-word;
}
.tb-recovery__recovered, .tb-recovery__came-back {
  color: var(--tb-success-fg);
  font-size: 0.75rem;
}
.tb-recovery__contactable {
  color: var(--tb-success-fg);
  white-space: nowrap;
}
.tb-recovery__tag--refused {
  background: #fbe9e7;
  color: #a3271d;
}
.tb-recovery__pick--refused .tb-recovery__dot, .tb-recovery__dot--refused {
  color: #c8382b;
}
.tb-recovery__tag--psp {
  background: #fbf0d9;
  color: #7a4d00;
}
.tb-recovery__pick--psp .tb-recovery__dot, .tb-recovery__dot--psp {
  color: #e0a422;
}
.tb-recovery__tag--tech {
  background: #efe9f7;
  color: #4e3277;
}
.tb-recovery__pick--tech .tb-recovery__dot, .tb-recovery__dot--tech {
  color: #5c3d87;
}
.tb-recovery__tag--checkout {
  background: #e9eef7;
  color: #2c4570;
}
.tb-recovery__pick--checkout .tb-recovery__dot, .tb-recovery__dot--checkout {
  color: #4f7fc0;
}
.tb-recovery__tag--frontend {
  background: #e3f3ef;
  color: #1d5a4c;
}
.tb-recovery__pick--frontend .tb-recovery__dot, .tb-recovery__dot--frontend {
  color: #2f8f78;
}
.tb-recovery__tag--none {
  background: #efeef2;
  color: #4f5566;
}
.tb-recovery__pick--none .tb-recovery__dot, .tb-recovery__dot--none {
  color: #a3a7b5;
}
.tb-recovery__section-h {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.tb-recovery__section-h p {
  margin: 0.125rem 0 0;
}
.tb-recovery__bar {
  display: block;
  height: 0.375rem;
  border-radius: 0.1875rem;
  background: var(--tb-rule);
  overflow: hidden;
}
.tb-recovery__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tb-slate);
}
.tb-recovery__more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  font-weight: 500;
  text-decoration: none;
}
.tb-recovery__funnel {
  margin-bottom: 1rem;
}
.tb-recovery__stage-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(10.625rem, 100%), 1fr));
  gap: 0.75rem;
}
.tb-recovery__stage-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.875rem;
  border: 1px solid var(--tb-border);
  border-top: 3px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  background: #fff;
  color: var(--tb-ink);
  text-decoration: none;
}
.tb-recovery__stage-card .tb-stat__v {
  font-size: 1.625rem;
}
.tb-recovery__stage-card .tb-recovery__bar {
  margin-top: 0.25rem;
}
.tb-recovery__stage-card:is(a):hover {
  border-color: var(--tb-border-hover);
  color: var(--tb-ink);
}
.tb-recovery__stage-card.is-on {
  border-color: var(--tb-ink);
  border-top-color: var(--tb-coral-500);
  background: var(--tb-surface-2, #fafafb);
}
.tb-recovery__stage-card.is-on .tb-recovery__bar i {
  background: var(--tb-coral-500);
}
.tb-recovery__stage-card--muted {
  background: var(--tb-surface-2, #fafafb);
}
.tb-recovery__stage-card--done {
  border-top-color: var(--tb-success-fg);
}
.tb-recovery a.tb-recovery__stage-card, .tb-recovery a.tb-recovery__stage-card:hover, .tb-recovery a.tb-recovery__reason-link {
  color: var(--tb-ink);
}
.tb-recovery__stage-card-h {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.tb-recovery__stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16.25rem, 21.25rem);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}
.tb-recovery__reasons {
  min-width: 0;
}
.tb-recovery__reason-table td, .tb-recovery__reason-table th {
  white-space: normal;
}
.tb-recovery__reason-table tr.is-on > td {
  background: var(--tb-coral-50);
}
.tb-recovery__reason--child td:first-child {
  padding-left: 1.875rem;
  color: var(--tb-slate);
}
.tb-recovery__reason-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--tb-ink);
  text-decoration: none;
}
.tb-recovery__reason-table td:first-child > .tb-recovery__dot {
  display: inline-block;
  margin-right: 0.5rem;
}
.tb-recovery__share {
  width: 28%;
  min-width: 5rem;
}
.tb-recovery tr.is-on .tb-recovery__share i {
  background: var(--tb-coral-500);
}
.tb-recovery__side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.tb-recovery__side-card h3 {
  margin: 0;
}
.tb-recovery__side-card p {
  margin: 0.25rem 0 0.75rem;
}
.tb-recovery__side-card--quiet {
  background: var(--tb-surface-2, #fafafb);
}
.tb-recovery__items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-recovery__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tb-recovery__item-h {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.tb-recovery__foot {
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--tb-rule);
}
.tb-recovery__tenders {
  margin-bottom: 1rem;
}
.tb-recovery__tenders .tb-badge {
  margin-left: 0.5rem;
}
.tb-recovery__tender-rate {
  width: 24%;
  min-width: 7.5rem;
}
.tb-recovery__tender-rate .tb-recovery__bar {
  margin-top: 0.25rem;
}
.tb-recovery__tenders tr.is-failing > td {
  background: var(--tb-danger-bg);
}
.tb-recovery__tenders tr.is-failing .tb-recovery__tender-failed, .tb-recovery__tenders tr.is-failing .tb-recovery__tender-rate .tb-strong {
  color: var(--tb-danger-fg);
  font-weight: 600;
}
.tb-recovery__tenders tr.is-failing .tb-recovery__bar i {
  background: var(--tb-danger-fg);
}
.tb-recovery__pattern-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 22.5rem);
  gap: 1rem;
  align-items: start;
}
.tb-recovery__patterns {
  min-width: 0;
}
.tb-recovery__legend {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.tb-recovery__legend span {
  display: inline-block;
  width: 0.875rem;
  height: 2px;
}
.tb-recovery__legend span + span, .tb-recovery__legend-now {
  margin-left: 0.5rem;
}
.tb-recovery__legend-prev {
  background: var(--tb-grey);
}
.tb-recovery__legend-now {
  background: var(--tb-coral-500);
}
.tb-recovery__pattern-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-recovery__pattern {
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
}
.tb-recovery__pattern details[open] {
  border-color: var(--tb-border-hover);
}
.tb-recovery__pattern details[open] .tb-recovery__chevron {
  transform: rotate(180deg);
}
.tb-recovery__pattern-h {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr) 8rem 6.875rem 6.25rem 1rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.875rem;
  cursor: pointer;
  list-style: none;
}
.tb-recovery__pattern-h::-webkit-details-marker {
  display: none;
}
.tb-recovery__rank {
  display: inline-grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: var(--tb-rule);
  font-weight: 600;
}
.tb-recovery__pattern-main {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}
.tb-recovery__pattern-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.tb-recovery__ctx-chip {
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--tb-border);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: nowrap;
}
.tb-recovery__pattern-n, .tb-recovery__pattern-v {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  text-align: right;
}
.tb-recovery__pattern-n .tb-stat__v {
  font-size: 1.375rem;
}
.tb-recovery__chevron {
  transition: transform 0.15s;
  color: var(--tb-slate);
}
.tb-recovery__spark {
  width: 8rem;
  height: 2.25rem;
}
.tb-recovery__spark polyline {
  fill: none;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.tb-recovery__spark-prev {
  stroke: var(--tb-grey);
}
.tb-recovery__spark-now {
  stroke: var(--tb-coral-500);
}
.tb-recovery__pattern-body {
  padding: 0 0.875rem 0.875rem;
}
.tb-recovery__samples td {
  white-space: normal;
  vertical-align: top;
}
.tb-recovery__pattern-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.tb-recovery__pattern-foot .tb-recovery__more {
  margin-top: 0.5rem;
}
.tb-recovery__pattern-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 1rem;
}
.tb-recovery__share-stage + .tb-recovery__share-stage {
  margin-top: 1.25rem;
}
.tb-recovery__share-stage p {
  margin: 0.125rem 0 0.5rem;
}
.tb-recovery__share-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-recovery__share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem 8.125rem auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
}
.tb-recovery__share-row .tb-recovery__more {
  margin: 0;
  white-space: nowrap;
}
.tb-recovery__signals {
  margin: 1rem 0;
}
.tb-recovery__falling {
  margin-top: 1.25rem;
}
.tb-recovery__falling ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
.tb-recovery__falling li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}
.tb-recovery__rail {
  min-width: 0;
}
.tb-recovery__rail p {
  margin: 0.25rem 0 0.75rem;
}
.tb-recovery__rail .tb-recovery__chase {
  margin-bottom: 0.25rem;
}
.tb-recovery__chase-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-recovery__chase-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0;
  border-top: 1px solid var(--tb-rule);
}
.tb-recovery__chase-main {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.tb-recovery__chase-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
@media (max-width: 1100px) {
  .tb-recovery__stage-grid, .tb-recovery__pattern-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .tb-recovery__chip-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.375rem;
  }
  .tb-recovery__pattern-h {
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
  }
  .tb-recovery__spark, .tb-recovery__pattern-v, .tb-recovery__chevron {
    display: none;
  }
  .tb-recovery__share-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .tb-recovery__share-row .tb-recovery__more {
    grid-column: 1/-1;
  }
}

/* Store page → History. The table never scrolls sideways: it is fixed-layout, so it keeps to
   the card. A long value scrolls inside its own Before/After cell instead. */
.tb-history__table {
  table-layout: fixed;
  /* Top-aligned rows lose the breathing room under the header the centred ones had. */
}
.tb-history__table th, .tb-history__table td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.tb-history__table tbody tr:first-child td {
  padding-top: 1rem;
}

.tb-history__col-when {
  width: 7.5rem;
}

.tb-history__col-setting {
  width: 18%;
}

.tb-history__col-change {
  width: 6.875rem;
}

.tb-history__col-by {
  width: 14%;
}

.tb-history__col-action {
  width: 8.125rem;
}

.tb-history__value-cell {
  overflow: hidden;
}

.tb-history__scroll {
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 0.25rem;
}
.tb-history__scroll .tb-code-chip {
  white-space: nowrap;
}

/* A JSON value opens in place; inside the cell's scroll, so it scrolls with it. */
.tb-history__json summary {
  cursor: pointer;
  list-style: none;
}
.tb-history__json pre {
  max-height: 20rem;
  margin: 0.375rem 0 0;
  overflow-y: auto;
  font-size: 0.75rem;
  white-space: pre;
}

/* Store page → Health: the critical/warning count above the problems. */
.tb-store-health__summary {
  margin: 0;
  padding: 0.75rem 1rem 0;
}

/* Page-specific additions for the Customers screens (customer/*): the list (avatar, type tabs and
   chips above the table) and the customer page (head, last-checkout banner, overview cards, recent
   activity, identity note). Shared pieces belong in _tb-page.scss. */
.tb-customers {
  /* Second in the toolbar: right of the filters when both fit, under them otherwise. */
  /* The storefront's search hint, a region swapped in place: empty on Qomit's checkout. */
}
.tb-customers__intro {
  margin: 0;
  max-width: 110ch;
}
.tb-customers__search {
  display: flex;
  flex: 0 1 26.25rem;
  flex-direction: column;
  gap: 0.25rem;
  min-width: min(17.5rem, 100%);
}
.tb-customers__search .tb-search {
  width: 100%;
}
@media (max-width: 767.98px) {
  .tb-customers__search {
    flex-basis: 100%;
  }
}
.tb-customers__search-hint:empty {
  display: none;
}
.tb-customers__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem 1.25rem;
  padding-right: 1rem;
  border-bottom: 1px solid var(--tb-rule-strong);
  /* The type filters read as filters, not as tabs: no coral bar, no rule under them. The picked one
     is told by its ink text and its coral count. */
}
.tb-customers__head .tb-tabs--in-card {
  border-bottom: 0;
  box-shadow: none;
}
.tb-customers__head .tb-tab,
.tb-customers__head .tb-tab.is-on {
  border-bottom-color: transparent;
}
.tb-customers__head .tb-tab.is-on .tb-count {
  background: var(--tb-coral-bg);
  color: var(--tb-coral-fg);
}
.tb-customers__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.5rem 0 0.5rem 1rem;
}
.tb-customers__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 1.875rem;
  padding: 0 0.625rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  background: #fff;
  color: var(--tb-ink);
  font-size: 0.78125rem;
  text-decoration: none;
}
.tb-customers__chip:hover {
  border-color: var(--tb-border-hover);
  color: var(--tb-ink);
  text-decoration: none;
}
.tb-customers__chip.is-on {
  border-color: var(--tb-ink);
  background: var(--tb-ink);
  color: #fff;
}
.tb-customers__chip.is-on .tb-customers__chip-n {
  color: #c9cbd3;
}
.tb-customers__chip-n {
  font-family: var(--tb-mono);
  font-size: 0.71875rem;
  color: var(--tb-grey);
}
.tb-customers__note {
  margin: 0;
  padding: 0.625rem 1rem;
}
.tb-customers__load-failed {
  padding: 1.5rem 1rem;
}
.tb-customers__who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.tb-customers__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tb-customers__name a {
  color: var(--tb-ink);
}
.tb-customers__sub {
  max-width: 22.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-customers__baskets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.tb-customers__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  background: #ede6f3;
  color: var(--tb-aubergine-700);
  font-size: 0.78125rem;
  font-weight: 500;
}
.tb-customers__avatar.is-visitor {
  background: var(--tb-surface);
  color: var(--tb-grey);
}
.tb-customers__avatar--lg {
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.125rem;
}

.tb-customer__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}
.tb-customer__head-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.tb-customer__consent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.tb-customer__consent-item {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-right: 0.5rem;
}
.tb-customer__banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--tb-radius);
  background: var(--tb-danger-bg);
}
.tb-customer__banner-label {
  color: var(--tb-danger-fg);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tb-customer__banner-text {
  flex: 1 1 26.25rem;
  min-width: 0;
  font-size: 0.84375rem;
}
.tb-customer__tabs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.tb-customer__tab-tag {
  height: 1.125rem;
  margin-left: 0.375rem;
  font-size: 0.6875rem;
}
.tb-customer__overview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tb-customer__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: 1rem;
}
.tb-customer__prefs {
  display: grid;
  grid-template-columns: 5.625rem minmax(0, 1fr);
  gap: 0 0.75rem;
  margin: 0.625rem 0 0;
}
.tb-customer__prefs dt, .tb-customer__prefs dd {
  margin: 0;
  padding: 0.4375rem 0;
  border-top: 1px solid var(--tb-rule);
  font-size: 0.8125rem;
}
.tb-customer__prefs dt {
  color: var(--tb-slate);
  font-weight: 400;
}
.tb-customer__prefs dd {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.375rem;
}
.tb-customer__recent {
  margin: 0.625rem 0 0;
  padding: 0;
  list-style: none;
}
.tb-customer__recent li {
  display: grid;
  grid-template-columns: 8.125rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.4375rem 0;
  border-top: 1px solid var(--tb-rule);
  font-size: 0.8125rem;
}
.tb-customer__entry-title {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.375rem;
  min-width: 0;
}
.tb-customer__entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.625rem;
}
.tb-customer__entry-value {
  margin-left: auto;
  font-size: 0.78125rem;
}
.tb-customer__timeline, .tb-customer__identity {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tb-customer__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.tb-customer__note {
  padding: 0.75rem 1rem;
  border-radius: var(--tb-radius);
  background: var(--tb-info-bg);
  color: var(--tb-ink);
  font-size: 0.8125rem;
}

@media (max-width: 767.98px) {
  .tb-customers__head {
    padding-right: 0;
  }
  .tb-customers__chips {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .tb-customer__recent li {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .tb-customer__recent li > :first-child {
    grid-column: 1/-1;
  }
}
/* Checkout issues (checkout_issues/*): the list and one issue's page, on the "Checkout issues"
   canvas. Shared pieces (cards, tables, badges, tabs, stats) are _tb-page.scss's. */
.tb-issues {
  /* The lazy cost cards sit in the grid as if the frame were not there. */
  /* The list's head: the status tabs, then the source chips and the sort. */
  /* The severity chips after the source chips: a rule keeps the two groups apart. */
  /* Links styled as controls: the console's link colour must not win (hence `a.`). */
  /* The canvas's rows: room to breathe, text wraps, everything top-aligned. */
  /* The canvas's widths (its 14px gaps folded into each cell's padding); the issue takes the rest. */
  /* A parent's stores, listed under it (a native <details>: no script, survives tb-list swaps). */
  /* The last 24 hours: one bar per hour, zero hours a hairline. */
  /* --- One issue -------------------------------------------------------- */
  /* The split's two columns: the timeline with where it happens under it, and beside them whether it
     blocks and on which devices. A card inside takes its content's height, never the row's flex basis. */
  /* One slot per hour or day, the plot's whole height, so a hover anywhere over it shows its count. */
  /* At the edges the tip opens inwards, never out of the card. */
  /* The four outcomes of "does it block?" (IssueOutcomes): the bar's segments and the legend's keys. */
  /* Does it block? — the verdict, the sentence it proves, the four-way bar and its legend. */
}
.tb-issues__intro {
  margin: 0 0 0.25rem;
}
.tb-issues__view {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.tb-issues__view--pending {
  min-height: 22.5rem;
}
.tb-issues [data-tb-list-region=kpis] {
  margin-bottom: 1rem;
}
.tb-issues__kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13.75rem, 100%), 1fr));
  gap: 0.75rem;
}
.tb-issues__kpi-frame {
  display: contents;
}
.tb-issues__kpi--pending .tb-stat__v {
  color: var(--tb-placeholder);
}
.tb-issues__kpis--five {
  grid-template-columns: repeat(auto-fit, minmax(min(11.875rem, 100%), 1fr));
}
.tb-issues__list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem 1.25rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--tb-rule-strong);
  /* The tabs sit in the head row beside the other controls: no rule of their own (the head's
     border is the row's), no padding, only as wide as they are. */
}
.tb-issues__list-head .tb-tabs {
  flex: 0 1 auto;
  padding: 0;
  box-shadow: none;
  gap: 0.25rem 1.25rem;
}
.tb-issues__list-head .tb-tab {
  height: 3rem;
}
.tb-issues__list-head .tb-card__h {
  margin: 0.875rem 0.5rem 0.875rem 0;
}
.tb-issues__controls, .tb-issues__sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0;
}
.tb-issues__severities {
  margin-left: 0.25rem;
  padding-left: 0.625rem;
  border-left: 1px solid var(--tb-rule-strong);
}
.tb-issues a.tb-issues__source {
  display: inline-flex;
  align-items: center;
  height: 1.875rem;
  padding: 0 0.625rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  background: #fff;
  color: var(--tb-ink);
  font-size: 0.78125rem;
}
.tb-issues a.tb-issues__source:hover {
  border-color: var(--tb-border-hover);
  text-decoration: none;
  color: var(--tb-ink);
}
.tb-issues a.tb-issues__source.is-on {
  background: var(--tb-ink);
  border-color: var(--tb-ink);
  color: #fff;
}
.tb-issues a.tb-issues__sort {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.875rem;
  margin-left: 0.25rem;
  padding: 0 0.625rem;
  border-radius: var(--tb-radius);
  background: var(--tb-surface);
  color: var(--tb-ink);
  font-size: 0.78125rem;
}
.tb-issues a.tb-issues__sort:hover {
  background: var(--tb-surface-hover);
  text-decoration: none;
  color: var(--tb-ink);
}
.tb-issues__scroll {
  overflow-x: auto;
}
.tb-issues__table {
  min-width: 72.5rem;
  table-layout: fixed;
}
.tb-issues__table th {
  padding: 0 0.75rem;
}
.tb-issues__table td {
  height: auto;
  padding: 0.875rem 0.75rem;
  white-space: normal;
  vertical-align: top;
}
.tb-issues__table th:first-child, .tb-issues__table td:first-child {
  padding-left: 1rem;
}
.tb-issues__table .tb-orders__stack {
  gap: 0.3125rem;
}
.tb-issues__col-status {
  width: 7.375rem;
}
.tb-issues__col-trend {
  width: 9.5rem;
}
.tb-issues__col-affected {
  width: 6rem;
}
.tb-issues__col-blocks {
  width: 8.125rem;
}
.tb-issues__col-cost {
  width: 10rem;
}
.tb-issues__col-since {
  width: 11.875rem;
}
.tb-issues__col-links {
  width: 6.25rem;
}
.tb-issues__col-open {
  width: 2.75rem;
}
.tb-issues a.tb-issues__open {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--tb-slate);
}
.tb-issues a.tb-issues__open:hover {
  color: var(--tb-ink);
  text-decoration: none;
}
.tb-issues__affected .tb-table td {
  height: auto;
  padding: 0.6875rem 1rem;
}
.tb-issues__issue {
  min-width: 17.5rem;
}
.tb-issues a.tb-issues__title {
  font-weight: 500;
  color: var(--tb-ink);
}
.tb-issues a.tb-issues__title:hover {
  color: var(--tb-coral-700);
  text-decoration: none;
}
.tb-issues__fp {
  color: var(--tb-slate);
  overflow-wrap: anywhere;
}
.tb-issues__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.125rem;
}
.tb-issues__row--resolved td {
  background: var(--tb-row-hover);
}
.tb-issues__stores {
  margin-top: 0.25rem;
}
.tb-issues__stores > summary {
  cursor: pointer;
  color: var(--tb-slate);
  width: max-content;
}
.tb-issues__stores > summary:hover {
  color: var(--tb-ink);
}
.tb-issues__store-list {
  display: grid;
  gap: 0.25rem;
  margin: 0.375rem 0 0;
  padding: 0;
  list-style: none;
}
.tb-issues__store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tb-issues__stores-card .tb-card__h, .tb-issues__stores-card > p {
  margin: 0;
  padding: 1rem 1rem 0;
}
.tb-issues__stores-card > p {
  padding-bottom: 0.5rem;
}
.tb-issues__breakdown .tb-issues__where > :first-child {
  overflow-wrap: anywhere;
}
.tb-issues__trend {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  width: 7.5rem;
  height: 1.625rem;
  margin-bottom: 0.25rem;
}
.tb-issues__trend > span {
  flex: 1;
  min-height: 1px;
  border-radius: 1px;
  background: var(--tb-warn-fg);
}
.tb-issues__trend > span.is-zero {
  background: var(--tb-rule-strong);
}
.tb-issues__trend--new > span:not(.is-zero) {
  background: var(--tb-danger-fg);
}
.tb-issues__trend--regressed > span:not(.is-zero) {
  background: var(--tb-coral-500);
}
.tb-issues__trend--resolved > span:not(.is-zero) {
  background: var(--tb-border-hover);
}
.tb-issues__cost--lost {
  color: var(--tb-danger-fg);
}
.tb-issues__cost--marketing {
  color: var(--tb-info-fg);
}
.tb-issues__change {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  color: var(--tb-slate);
}
.tb-issues__change-mark {
  flex: none;
  width: 0.4375rem;
  height: 0.4375rem;
  margin-top: 0.3125rem;
  border-radius: 2px;
  background: var(--tb-aubergine-700);
}
.tb-issues__foot {
  margin: 0;
  padding: 0.75rem 1rem;
}
.tb-issues__head-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.tb-issues__head-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}
.tb-issues__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}
.tb-issues__split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}
.tb-issues__main {
  flex: 999 1 35rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tb-issues__side {
  flex: 1 1 21.25rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tb-issues__side > .tb-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tb-issues__main > .tb-card, .tb-issues__side > .tb-card {
  flex: none;
}
.tb-issues__chart-card {
  flex: 999 1 35rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tb-issues__why {
  flex: 1 1 21.25rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.tb-issues__section-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.tb-issues__sub-h {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tb-slate);
}
.tb-issues__plot {
  position: relative;
  height: 9.375rem;
  border-bottom: 1px solid var(--tb-rule-strong);
}
.tb-issues__bars {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 2px;
}
.tb-issues__slot {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
}
.tb-issues__bar {
  width: 100%;
  min-height: 1px;
  border-radius: 2px 2px 0 0;
}
.tb-issues__bar.is-zero {
  background: var(--tb-rule);
}
.tb-issues__bar.is-past {
  background: #f2b4a3;
}
.tb-issues__bar.is-current {
  background: var(--tb-coral-500);
}
.tb-issues__slot:hover .tb-issues__bar {
  filter: brightness(0.9);
}
.tb-issues__slot:hover .tb-issues__bar.is-zero {
  background: var(--tb-border-hover);
}
.tb-issues__tip {
  position: absolute;
  left: 50%;
  z-index: 2;
  display: none;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 0.375rem;
  padding: 0.3125rem 0.5rem;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-ink);
  color: #fff;
  font-size: 0.71875rem;
  line-height: 1.3;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}
.tb-issues__tip .tb-strong {
  color: #fff;
}
.tb-issues__slot:hover .tb-issues__tip {
  display: flex;
}
.tb-issues__slot:nth-child(-n+4) .tb-issues__tip {
  left: 0;
  transform: none;
}
.tb-issues__slot:nth-last-child(-n+4) .tb-issues__tip {
  left: auto;
  right: 0;
  transform: none;
}
.tb-issues__marker {
  position: absolute;
  top: -4px;
  bottom: 0;
  border-left: 2px dashed var(--tb-aubergine-700);
}
.tb-issues__traffic {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 1.625rem;
}
.tb-issues__traffic > span {
  flex: 1;
  min-height: 1px;
  background: #d9d5e0;
}
.tb-issues__ticks {
  position: relative;
  height: 1.125rem;
  color: var(--tb-grey);
}
.tb-issues__ticks > span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.tb-issues__ticks > span:first-child {
  transform: none;
}
.tb-issues__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.125rem;
}
.tb-issues__legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.tb-issues__key {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 2px;
}
.tb-issues__key--occ {
  background: var(--tb-coral-500);
}
.tb-issues__key--traffic {
  background: #d9d5e0;
}
.tb-issues__key--change {
  width: 0;
  height: 0.75rem;
  border-left: 2px dashed var(--tb-aubergine-700);
  border-radius: 0;
}
.tb-issues__key--paid, .tb-issues__split-seg--paid {
  background: var(--tb-success-fg);
}
.tb-issues__key--got_past, .tb-issues__split-seg--got_past {
  background: var(--tb-warn-fg);
}
.tb-issues__key--stopped, .tb-issues__split-seg--stopped {
  background: var(--tb-danger-fg);
}
.tb-issues__key--in_progress, .tb-issues__split-seg--in_progress {
  background: var(--tb-border-hover);
}
.tb-issues__key {
  margin-right: 0.375rem;
}
.tb-issues__dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.375rem 0.875rem;
  margin: 0;
  font-size: 0.8125rem;
}
.tb-issues__dl dt {
  color: var(--tb-slate);
  font-weight: 400;
}
.tb-issues__dl dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.tb-issues__history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.tb-issues__event {
  position: relative;
  padding: 0 0 0.625rem 1.25rem;
  font-size: 0.8125rem;
}
.tb-issues__event::before {
  content: "";
  position: absolute;
  left: 0.3125rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--tb-rule);
}
.tb-issues__event::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3125rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--tb-aubergine-700);
  box-shadow: 0 0 0 2px #fff;
}
.tb-issues__event--first_seen::after {
  background: var(--tb-danger-fg);
}
.tb-issues__event--resolved::after {
  background: var(--tb-success-fg);
}
.tb-issues__event--regressed::after {
  background: var(--tb-coral-500);
}
.tb-issues__event-detail {
  display: block;
}
.tb-issues__three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18.75rem, 100%), 1fr));
  gap: 1rem;
}
.tb-issues__three > .tb-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tb-issues__meter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tb-issues__meter-row {
  display: flex;
  justify-content: space-between;
  gap: 0.625rem;
  font-size: 0.8125rem;
}
.tb-issues__meter-track {
  display: block;
  height: 0.375rem;
  border-radius: 3px;
  background: var(--tb-surface);
  overflow: hidden;
}
.tb-issues__meter-fill {
  display: block;
  height: 100%;
  background: var(--tb-aubergine-700);
}
.tb-issues__where {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) 2.75rem;
  gap: 0.625rem;
  align-items: center;
  font-size: 0.8125rem;
}
.tb-issues__where > :last-child {
  text-align: right;
}
.tb-issues__where--wide {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 2.75rem;
}
.tb-issues__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.875rem;
}
.tb-issues__blocks-cell {
  align-items: flex-start;
}
.tb-issues__kpi-verdict {
  display: block;
}
.tb-issues__proof {
  margin: 0;
  font-size: 0.8125rem;
}
.tb-issues__split-bar {
  display: flex;
  height: 0.625rem;
  border-radius: 5px;
  background: var(--tb-surface);
  overflow: hidden;
}
.tb-issues__split-seg {
  display: block;
  height: 100%;
}
.tb-issues__split-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.375rem 0.875rem;
  margin: 0;
  font-size: 0.8125rem;
}
.tb-issues__split-legend > div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.tb-issues__split-legend dt {
  display: flex;
  align-items: center;
  font-weight: 400;
}
.tb-issues__split-legend dd {
  margin: 0;
}
.tb-issues__example {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--tb-rule);
}
.tb-issues__example:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}
.tb-issues__example-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.625rem;
}
.tb-issues__affected .tb-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

/* Page-specific additions for automation detection: the Suspected automation list, the basket
   page's verdict panel and the store Settings tab's thresholds. Shared pieces belong in _tb-page.scss. */
.tb-automation {
  /* The KPI tiles sit between the toolbar and the list, as on Checkout recovery. */
  /* One badge per rule: its name, then observed / threshold. Wraps on narrow screens. */
}
.tb-automation__intro {
  margin: 0 0 1rem;
}
.tb-automation [data-tb-list-region=kpis] {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.tb-automation__rules {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.tb-automation__rules .tb-badge {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  white-space: normal;
}
.tb-automation__settings {
  margin-top: 1.5rem;
}
.tb-automation__settings form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Page-specific additions for the Tracking health screen (Store → Tracking health). The rate bar is
   the Checkout recovery one (.tb-recovery__bar); shared pieces belong in _tb-page.scss. */
.tb-tag-audit {
  /* A failing vendor, as a failing tender is on Checkout recovery. */
  /* The failing checks wrap onto several lines: table cells have no block padding, so this one gets
     its own, or the first and last badges touch the row's edges. */
  /* One badge per failing check: its name, then the orders it affected. Wraps on narrow screens. */
}
.tb-tag-audit__intro {
  margin: 0 0 1rem;
}
.tb-tag-audit__rate {
  width: 20%;
  min-width: 7.5rem;
}
.tb-tag-audit__rate .tb-recovery__bar {
  margin-top: 0.25rem;
}
.tb-tag-audit tr.is-failing > td {
  background: var(--tb-danger-bg);
}
.tb-tag-audit tr.is-failing .tb-tag-audit__rate .tb-strong {
  color: var(--tb-danger-fg);
  font-weight: 600;
}
.tb-tag-audit tr.is-failing .tb-recovery__bar i {
  background: var(--tb-danger-fg);
}
.tb-tag-audit td.tb-tag-audit__failures {
  min-width: 17.5rem;
  padding-block: 0.875rem;
}
.tb-tag-audit__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.5rem;
}
.tb-tag-audit__checks .tb-badge {
  display: inline-flex;
  gap: 0.5rem;
  height: auto;
  min-height: 1.625rem;
  padding-block: 0.25rem;
  line-height: 1.3;
  white-space: normal;
}

.tb-store-extra__description {
  margin: 0;
}

.tb-setting-tr,
.tb-setting-tr__panes > [role=tabpanel] {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Store config form · "Also apply to" — the same look as Integrations' (.tb-int-targets). */
.tb-sc-targets__list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-sc-targets__list[hidden], .tb-sc-targets__blocked[hidden] {
  display: none;
}
.tb-sc-targets__blocked {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
}
.tb-sc-targets__blocked i {
  margin-top: 0.1875rem;
}

.tb-sc-target {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.tb-sc-target .form-check-input {
  flex: none;
  margin: 0.125rem 0 0;
}
.tb-sc-target.is-current {
  opacity: 0.75;
}
.tb-sc-target--all {
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--tb-rule);
}
.tb-sc-target__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin: 0;
  cursor: pointer;
}

/* Bulk configs: one config across many stores. */
.tb-sc-bulk__option {
  position: relative;
  font-size: 0.875rem;
  padding-block: 0.375rem;
}
.tb-filter .tb-sc-bulk__option input[type=radio] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.tb-sc-bulk__option:has(input:checked) {
  background: var(--dashboard-control-bg);
  font-weight: 600;
}
.tb-sc-bulk__option:has(input:focus-visible) {
  outline: 0.125rem solid var(--dashboard-brand);
  outline-offset: -0.125rem;
}
.tb-sc-bulk__option-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-sc-bulk__option-type {
  flex: none;
  color: var(--dashboard-text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
}
.tb-sc-bulk__option-check {
  flex: none;
  width: 0.75rem;
  color: var(--dashboard-brand);
  font-size: 0.75rem;
  visibility: hidden;
}
.tb-sc-bulk__option:has(input:checked) .tb-sc-bulk__option-check {
  visibility: visible;
}
.tb-sc-bulk__value {
  max-width: 22.5rem;
}
.tb-sc-bulk__status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tb-sc-bulk__text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* Page-specific additions for the observability lists (Calls, Logs, Quotas). Shared pieces
   belong in _tb-page.scss. */
/* The group takes the row, so the "errors only" switch stays at its end; the filters' own widths
   (and a phone's stacking) are every toolbar's, in _tb-page.scss. */
.tb-obs .tb-toolbar__filters {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 767.98px) {
  .tb-obs .tb-toolbar__filters .tb-obs__status .tb-input,
  .tb-obs .tb-toolbar__filters .tb-obs__channel .tb-input {
    width: 100%;
  }
}

.tb-obs {
  /* Free inputs among the chips, dressed as one (the field look only applies inside .tb-field). */
  /* The path wraps; the host sits under it, small — so one long URL cannot push the
     duration, source and store columns out of the card. */
  /* Quotas: KPI tiles above the table. */
}
.tb-obs__status .tb-input, .tb-obs__channel .tb-input {
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
  color: var(--tb-ink);
  font: inherit;
}
.tb-obs__status .tb-input:hover, .tb-obs__channel .tb-input:hover {
  border-color: var(--tb-border-hover);
}
.tb-obs__status .tb-input:focus, .tb-obs__channel .tb-input:focus {
  outline: none;
  border-color: var(--tb-focus);
  background: #fff;
}
.tb-obs__status .tb-input::placeholder, .tb-obs__channel .tb-input::placeholder {
  color: var(--tb-slate);
}
.tb-obs__status .tb-input {
  width: 6.875rem;
}
.tb-obs__channel .tb-input {
  width: 10rem;
}
.tb-obs__url {
  max-width: 28.75rem;
  white-space: normal;
}
.tb-obs__url-path {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tb-obs__message {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 16.25rem;
}
.tb-obs__row--error {
  background: var(--tb-danger-bg);
}
.tb-obs__slow {
  color: var(--tb-danger-fg);
  font-weight: 600;
}
.tb-obs__warm {
  color: var(--tb-warn-fg);
}
.tb-obs__actions {
  white-space: nowrap;
}
.tb-obs__context {
  margin-top: 0.375rem;
}
.tb-obs__stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tb-obs__peak-col {
  width: 12.5rem;
}
.tb-obs__meter {
  display: block;
  height: 0.375rem;
  margin-bottom: 0.25rem;
  border-radius: 999px;
  background: var(--tb-neutral-bg);
  overflow: hidden;
}
.tb-obs__meter-fill {
  display: block;
  height: 100%;
  background: var(--tb-info-fg);
}
.tb-obs__meter-fill--danger {
  background: var(--tb-danger-fg);
}
.tb-obs__meter-fill--warn {
  background: var(--tb-warn-fg);
}

/* Call detail: one platform call, its bodies and the rest of its request. */
.tb-obs-call__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}
.tb-obs-call__method {
  font-size: 1rem;
  vertical-align: middle;
}
.tb-obs-call__path {
  overflow-wrap: anywhere;
  font-size: 1.625rem;
}
.tb-obs-call__stat-text {
  font-size: 1.125rem;
  overflow-wrap: anywhere;
}
.tb-obs-call__failure {
  border-left: 3px solid var(--tb-danger-fg);
  background: var(--tb-danger-bg);
}
.tb-obs-call__failure .tb-card__h {
  color: var(--tb-danger-fg);
}
.tb-obs-call__exception {
  display: block;
  margin-bottom: 0.375rem;
  overflow-wrap: anywhere;
}
.tb-obs-call__message {
  margin: 0;
  overflow-wrap: anywhere;
}
.tb-obs-call__notice {
  margin: 0;
  color: var(--tb-warn-fg);
}
.tb-obs-call__body-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.tb-obs-call__copy {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}
.tb-obs-call__body {
  max-height: 32.5rem;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tb-obs-call__wrap {
  overflow-wrap: anywhere;
}
.tb-obs-call__siblings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tb-obs-call__sibling {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.5rem;
  align-items: baseline;
  padding: 0.5rem 0.625rem;
  border-radius: var(--tb-radius-sm);
}
.tb-obs-call__sibling > .tb-muted {
  grid-column: 2;
}
.tb-obs-call__sibling.is-current {
  background: var(--tb-surface);
}
.tb-obs-call__sibling.is-error {
  border-left: 3px solid var(--tb-danger-fg);
}
.tb-obs-call__sibling-path {
  overflow-wrap: anywhere;
}

/* Traces list: the id column links to the trace. */
.tb-obs-traces__id {
  white-space: nowrap;
}

/* Trace page header: the full id, copyable. */
.tb-obs-trace__id {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  overflow-wrap: anywhere;
}

/*
 * One request's waterfall (trace page and Order details → Observability). A grid row per
 * entry: time · kind · what · duration bar · ms · inspect, so the bars line up down the list.
 */
.tb-trace__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.875rem;
  margin: 0 0 0.625rem;
  color: var(--tb-neutral-fg);
  font-size: 0.8125rem;
}

.tb-trace {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  /* A class name or a channel is shown whole: the shared chip clips at 420px, which hid the
     implementation of an extension point. Here it wraps inside the label instead. */
  /* The body's title, then Copy and Format on the right. */
}
.tb-trace__item {
  padding: 0.5rem 0.75rem;
  border-left: 3px solid transparent;
}
.tb-trace__item + .tb-trace__item {
  border-top: 1px solid var(--tb-border);
}
.tb-trace__item.is-error {
  border-left-color: var(--tb-danger-fg);
  background: var(--tb-danger-bg);
}
.tb-trace__item.is-warn {
  border-left-color: var(--tb-warn-fg);
}
.tb-trace__row {
  display: grid;
  grid-template-columns: 5.75rem 5.25rem minmax(0, 1fr) 10rem 4rem 2rem;
  align-items: center;
  gap: 0.625rem;
}
.tb-trace__time {
  font-family: var(--tb-font-mono, ui-monospace, monospace);
  font-size: 0.75rem;
  color: var(--tb-neutral-fg);
}
.tb-trace__kind {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-trace__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  min-width: 0;
}
.tb-trace__path, .tb-trace__message {
  overflow-wrap: anywhere;
}
.tb-trace__label .tb-code-chip {
  max-width: 100%;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tb-trace__label .tb-strong {
  overflow-wrap: anywhere;
}
.tb-trace__bar {
  display: block;
  height: 0.375rem;
  border-radius: 999px;
  background: var(--tb-neutral-bg);
  overflow: hidden;
}
.tb-trace__bar--quota {
  height: auto;
  background: none;
  font-size: 0.75rem;
  color: var(--tb-neutral-fg);
  text-align: right;
}
.tb-trace__bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--tb-success-fg);
}
.tb-trace__bar-fill--danger {
  background: var(--tb-danger-fg);
}
.tb-trace__bar-fill--warn {
  background: var(--tb-warn-fg);
}
.tb-trace__ms {
  text-align: right;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tb-trace__error {
  margin: 0.375rem 0 0 12.25rem;
  font-size: 0.8125rem;
  color: var(--tb-danger-fg);
  overflow-wrap: anywhere;
}
.tb-trace__item > details {
  margin: 0.5rem 0 0 12.25rem;
  font-size: 0.8125rem;
}
.tb-trace__item > details > summary {
  cursor: pointer;
  color: var(--tb-neutral-fg);
}
.tb-trace__payloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  margin-top: 0.5rem;
}
.tb-trace__payload-h {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.tb-trace__payload-head {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* untitled (a log context): icons right */
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.tb-trace__payload-head .tb-trace__payload-h {
  flex: 1;
  margin: 0;
}
.tb-trace__payload-head .tb-btn[aria-pressed=true] {
  background: var(--tb-surface);
  color: var(--tb-ink);
}
.tb-trace__notice {
  margin: 0.375rem 0 0;
  color: var(--tb-warn-fg);
}
@media (max-width: 900px) {
  .tb-trace__row {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
  }
  .tb-trace__bar {
    display: none;
  }
  .tb-trace__row > :last-child:empty {
    display: none;
  }
  .tb-trace__error, .tb-trace__item > details {
    margin-left: 0;
  }
  .tb-trace__payloads {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Logs: the table fits its card. Fixed layout gives the message column whatever the other
   columns leave, so a long message or context wraps instead of widening the table. */
.tb-obs-logs {
  table-layout: fixed;
}
.tb-obs-logs__time {
  width: 8.125rem;
}
.tb-obs-logs__level {
  width: 7.5rem;
}
.tb-obs-logs__channel {
  width: 10.625rem;
}
.tb-obs-logs__checkout {
  width: 7.5rem;
}
.tb-obs-logs__client {
  width: 8.125rem;
}
.tb-obs-logs__store {
  width: 10.625rem;
}
.tb-obs-logs td {
  overflow: hidden;
}
.tb-obs-logs td .tb-code-chip {
  max-width: 100%;
}
.tb-obs-logs__clip {
  text-overflow: ellipsis;
}
.tb-obs-logs .tb-obs__message {
  min-width: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.tb-obs-logs .tb-obs-payload {
  max-width: 100%;
}

/* Trace and platform-call pages: the orders the request rolls up to. */
.tb-obs-orders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tb-obs-orders__row {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
  overflow-wrap: anywhere;
}
.tb-obs-orders__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tb-obs-request {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.625rem 0 0.25rem;
  border-top: 1px solid var(--tb-border);
}
.tb-obs-request:first-of-type {
  border-top: 0;
}
.tb-obs-request--error {
  border-left: 3px solid var(--tb-danger-fg);
  padding-left: 0.625rem;
}
.tb-obs-request__head {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: inherit;
  font-weight: 600;
}
.tb-obs-request__time {
  font-variant-numeric: tabular-nums;
}

/* Observability → access refused: the lock above the reason. */
.tb-obs__denied-icon {
  font-size: 1.75rem;
  color: var(--tb-grey);
}

/* Page-specific additions for Store → Integrations (tasks/integrations.md). Shared pieces belong in
   _tb-page.scss; everything here is prefixed `tb-int`. */
.tb-int-lead {
  margin: 0;
  max-width: 45rem;
}

.tb-int .tb-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

/* --- Overview: status cards that double as filters ------------------------ */
.tb-int-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12.5rem, 100%), 1fr));
  gap: 0.75rem;
}

.tb-int-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1rem 1.25rem;
  color: var(--tb-ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tb-int-card:hover {
  border-color: var(--tb-border-hover);
  color: var(--tb-ink);
  text-decoration: none;
}
.tb-int-card.is-on {
  border-color: var(--tb-focus);
  box-shadow: inset 0 0 0 1px var(--tb-focus);
}
.tb-int-card__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--tb-slate);
}
.tb-int-card__count {
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.tb-int-card--success .tb-dot {
  color: var(--tb-success-fg);
}
.tb-int-card--danger .tb-dot {
  color: var(--tb-danger);
}
.tb-int-card--neutral .tb-dot {
  color: #9a97a3;
}
.tb-int-card--outline .tb-dot {
  color: var(--tb-border-hover);
}

/* --- Overview: the feature table ----------------------------------------- */
.tb-int-table td {
  height: auto;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  vertical-align: top;
}

.tb-int-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 15rem;
}
.tb-int-feature__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--tb-radius-lg);
  background: var(--tb-surface);
  color: var(--tb-aubergine-700);
}
.tb-int-feature__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.tb-int-providers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  max-width: 26.25rem;
}

.tb-int-chip-link {
  color: inherit;
  text-decoration: none;
}
.tb-int-chip-link:hover {
  text-decoration: none;
}

.tb-int-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 1.875rem;
  padding: 0 0.625rem 0 0.25rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  background: #fff;
  color: var(--tb-ink);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.tb-int-chip-link:hover .tb-int-chip {
  border-color: var(--tb-border-hover);
}
.tb-int-chip.is-off {
  color: var(--tb-grey);
  background: var(--tb-surface);
}
.tb-int-chip__note {
  color: var(--tb-grey);
  font-size: 0.75rem;
}

.tb-int-mono {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: var(--tb-radius-sm);
  background: #efeaf4;
  color: var(--tb-aubergine-700);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tb-int-mono--lg {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--tb-radius-lg);
  font-size: 0.875rem;
}

.tb-int-failure {
  display: flex;
  flex-basis: 100%;
  align-items: flex-start;
  gap: 0.375rem;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--tb-danger);
}
.tb-int-failure i {
  margin-top: 0.1875rem;
}

.tb-int-action {
  text-align: right;
  white-space: nowrap;
}

/* --- Library ------------------------------------------------------------- */
.tb-int-library {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
}
.tb-int-library__nav {
  display: flex;
  flex: 0 1 15rem;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 12.5rem;
}
.tb-int-library__nav .tb-label {
  padding: 0 0.625rem 0.5rem;
}
.tb-int-library__main {
  display: flex;
  flex: 1 1 30rem;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.tb-int-library__results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tb-int-fnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0 0.625rem;
  border-radius: var(--tb-radius);
  color: var(--tb-slate);
  text-decoration: none;
}
.tb-int-fnav:hover {
  background: var(--tb-surface);
  color: var(--tb-ink);
  text-decoration: none;
}
.tb-int-fnav.is-on {
  background: var(--tb-coral-50);
  color: var(--tb-coral-800);
  font-weight: 500;
}

.tb-int-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: 0.75rem;
}
.tb-int-grid--options {
  grid-template-columns: repeat(auto-fill, minmax(min(12.5rem, 100%), 1fr));
}

.tb-int-pcard {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.25rem;
}
.tb-int-pcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.tb-int-pcard__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--tb-ink);
}
.tb-int-pcard__foot {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}
.tb-int-pcard p {
  margin: 0;
}

/* --- Add integration ----------------------------------------------------- */
/* Step 1 reloads in place (tb-list): the region holds the picker card and its footer, spaced as
   the page spaces them. */
.tb-int-pick {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.tb-int-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-int-steps__item {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--tb-grey);
}
.tb-int-steps__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  border: 1px solid var(--tb-border-strong);
  border-radius: 50%;
  background: #fff;
  font-size: 0.8125rem;
}
.tb-int-steps__item.is-current {
  color: var(--tb-ink);
  font-weight: 500;
}
.tb-int-steps__item.is-current .tb-int-steps__n {
  border-color: var(--tb-coral-700);
  background: var(--tb-coral-700);
  color: #fff;
}
.tb-int-steps__item.is-done .tb-int-steps__n {
  border-color: var(--tb-success-fg);
  background: var(--tb-success-bg);
  color: var(--tb-success-fg);
}

.tb-int-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tb-int-choice {
  text-decoration: none;
}
.tb-int-choice i {
  color: var(--tb-aubergine-700);
}
.tb-int-choice.is-on {
  background: var(--tb-coral-50);
  border-color: var(--tb-coral-700);
  color: var(--tb-coral-800);
}
.tb-int-choice:hover {
  text-decoration: none;
}

.tb-int-option {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1rem;
  color: var(--tb-ink);
  text-decoration: none;
}
.tb-int-option:hover {
  border-color: var(--tb-border-hover);
  color: var(--tb-ink);
  text-decoration: none;
}
.tb-int-option.is-on {
  border-color: var(--tb-coral-700);
  box-shadow: inset 0 0 0 1px var(--tb-coral-700);
}
.tb-int-option.is-locked {
  background: var(--tb-surface);
  color: var(--tb-grey);
  cursor: not-allowed;
}
.tb-int-option__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tb-int-title {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.tb-int-title > div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* --- The raw-JSON editors ------------------------------------------------ */
.tb-int-docs {
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
}

.tb-int-editor {
  /* A config key or a method's name: shown as written, not as an uppercase field label. */
}
.tb-int-editor__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.tb-int-editor__name {
  margin: 0;
  font-family: var(--tb-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--tb-ink);
  overflow-wrap: anywhere;
}
.tb-int-editor .CodeMirror {
  height: auto;
  min-height: 7.5rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  font-family: var(--tb-mono);
  font-size: 0.8125rem;
}
.tb-int-editor .CodeMirror-focused {
  border-color: var(--tb-focus);
  box-shadow: 0 0 0 3px rgba(87, 103, 206, 0.18);
}
.tb-int-editor.is-invalid .CodeMirror, .tb-int-editor.is-invalid .form-control {
  border-color: var(--tb-danger);
}

.tb-int-json {
  max-height: 22.5rem;
  margin: 0;
  padding: 0.875rem 1rem;
  overflow: auto;
  border-radius: var(--tb-radius);
  background: var(--tb-surface);
  color: var(--tb-ink);
  font-family: var(--tb-mono);
  font-size: 0.8125rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* --- Unsaved changes ----------------------------------------------------- */
.tb-int-unsaved {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--tb-radius-lg);
  background: var(--tb-aubergine-900);
  color: #fff;
}
.tb-int-unsaved__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* `.tb-page a` colours every link coral; these links are cards, chips and a nav, not prose. */
.tb-page a.tb-int-card, .tb-page a.tb-int-card:hover {
  color: var(--tb-ink);
}

.tb-page a.tb-int-chip-link {
  color: inherit;
}

.tb-page a.tb-int-fnav {
  color: var(--tb-slate);
}

.tb-page a.tb-int-fnav:hover {
  color: var(--tb-ink);
}

.tb-page a.tb-int-fnav.is-on {
  color: var(--tb-coral-800);
}

.tb-page a.tb-int-choice {
  color: #000;
}

.tb-page a.tb-int-choice.is-on {
  color: var(--tb-coral-800);
}

.tb-page a.tb-int-option, .tb-page a.tb-int-option:hover {
  color: var(--tb-ink);
}

/* --- Provider config: the stores running the provider -------------------- */
.tb-int-stores th, .tb-int-stores td {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.tb-int-stores td {
  vertical-align: middle;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.tb-int-store {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tb-int-store__name {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.tb-page a.tb-int-link {
  font-weight: 500;
}

/* --- "Also apply to": the client's other stores ---------------------------- */
.tb-int-targets__list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-int-targets__note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.tb-int-targets__note i {
  margin-top: 0.1875rem;
}

.tb-int-target {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.tb-int-target .form-check-input {
  flex: none;
  margin: 0.125rem 0 0;
}
.tb-int-target.is-current {
  opacity: 0.75;
}
.tb-int-target--all {
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--tb-rule);
}
.tb-int-target__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin: 0;
  cursor: pointer;
}

li.tb-int-target__text {
  cursor: default;
}

/* --- Custom (merchant bundle) providers ------------------------------------ */
.tb-int-pcard__badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.375rem;
}

/* A provider configuration drawn from api's schema: one control per key, nested objects grouped. */
/* A configuration card's header: its title on the left, "Edit as JSON" top right. */
.tb-int-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.tb-int-form,
.tb-int-group {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tb-int-group {
  padding: 0.75rem 0.875rem;
  border: 0.0625rem solid var(--dashboard-control-border);
  border-radius: var(--dashboard-radius-control);
}

.tb-int-mode {
  flex: none;
}

/* Configuration health: the provider page's card and the Config health page. */
.tb-int-health-ok {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--tb-success, #1b7a43);
}

.tb-int-health-doc {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.tb-int-health-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tb-int-health-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.tb-int-health-note {
  margin: 0.75rem 1rem;
}

/* Deployments → Environments: the tenant's environment cards and one environment's tabs. */
.tb-env-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
  gap: 1.25rem;
}

.tb-env-card {
  display: flex;
  flex-direction: column;
}
.tb-env-card .tb-card__h a {
  color: var(--tb-ink);
}
.tb-env-card .tb-card__h a:hover {
  color: var(--tb-coral-700);
}
.tb-env-card__body {
  flex: 1;
  padding: 0 1.5rem 1.25rem;
  gap: 0.875rem;
}
.tb-env-card__ref {
  display: block;
}
.tb-env-card__last {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tb-env-card__foot {
  justify-content: flex-start;
}

.tb-env-history__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tb-env-history__steps {
  margin-top: 0.375rem;
}
.tb-env-history__steps summary {
  cursor: pointer;
  color: var(--tb-grey);
}
.tb-env-history__steps summary .tb-count {
  margin-left: 0.375rem;
}
.tb-env-history__step-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
.tb-env-history__step-list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Raw command output: a step's error, the log tail. */
.tb-env-pre {
  flex-basis: 100%;
  margin: 0;
  padding: 0.75rem 0.875rem;
  border-radius: var(--tb-radius);
  background: var(--tb-code-bg);
  color: #fff;
  font-family: var(--tb-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tb-env-logs__filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  align-items: start;
  gap: 1rem;
}
.tb-env-logs__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding-top: 1.625rem;
}
.tb-env-logs__output {
  min-height: 20rem;
  max-height: 70vh;
  overflow: auto;
}

.tb-env-monitor {
  display: block;
  width: 100%;
  height: 50rem;
  border: 0;
}

.tb-env-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(18.75rem, 100%), 1fr));
  gap: 1.25rem;
}
.tb-env-tools .tb-card__h {
  margin-bottom: 0;
}
.tb-env-tools p {
  margin: 0;
}

.tb-env-backups__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

/* Deployments → Builds. */
.tb-builds__filters .form-select {
  width: auto;
  min-width: 12.5rem;
}
.tb-builds__limit {
  margin: 0;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--tb-rule);
}

/* Deployments → Settings (the tenant's). */
.tb-settings__h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
}
.tb-settings__intro {
  margin: 0;
  padding: 0 1.5rem;
}
.tb-settings__add {
  justify-content: flex-start;
}
.tb-settings__add > .tb-field {
  flex: 1 1 11.25rem;
}

.por-group {
  overflow: hidden;
  border: 1px solid var(--tb-border, #e6e7eb);
  border-radius: var(--tb-radius-lg, 8px);
  background: #fff;
}
.por-group + .por-group {
  margin-top: 1.25rem;
}

.por-group-title {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--tb-rule-strong, #d9dbe1);
  background: var(--tblr-bg-surface-secondary, #f8f9fa);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111729;
}

.por-group-items .accordion-header {
  cursor: grab;
}
.por-group-items .sortable-chosen .accordion-header {
  cursor: grabbing;
}
.por-group-items .sortable-ghost {
  opacity: 0.45;
}
.por-group-items .accordion-item {
  border-radius: 0 !important;
}
.por-group-items .field-collection-item:last-child .accordion-item {
  box-shadow: none;
}
.por-group-items .accordion-button,
.por-group-items .accordion-button:hover {
  padding-inline: 1rem;
}

.tb-por__rules .accordion:has(.por-group) {
  border-radius: 0;
  box-shadow: none;
}

.rpo-list {
  max-width: 32rem;
}
.rpo-list .rpo-handle {
  cursor: grab;
}
.rpo-list .sortable-chosen .rpo-handle {
  cursor: grabbing;
}
.rpo-list .sortable-ghost {
  opacity: 0.45;
}
.rpo-list .form-check-label {
  margin-left: 0.5rem;
}
.rpo-list .rpo-rank {
  min-width: 1.75rem;
  background: var(--tblr-primary, #206bc4);
  color: #fff;
}
.rpo-list .rpo-off .rpo-rank {
  background: var(--tblr-bg-surface-secondary, #f8f9fa);
  color: var(--tblr-secondary, #626976);
}
.rpo-list .rpo-off .form-check-label {
  color: var(--tblr-secondary, #626976);
}

.tb-por__intro {
  margin: 0 0 1rem;
}
.tb-por__actions {
  white-space: nowrap;
}
.tb-por__stat-text {
  font-size: 1.125rem;
}
.tb-por__widget {
  width: 100%;
}
.tb-por__rules > [class*=col-] {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  padding: 0;
}
.tb-por__rules > div > .field-collection {
  margin: 0;
}
.tb-por__rules > div > .field-collection > .form-widget > .form-help {
  display: none;
}
.tb-por__kinds {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tb-por__kind {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--tb-radius-sm);
  background: var(--tb-surface);
}
.tb-por__kind.is-off {
  opacity: 0.6;
}
.tb-por__kind-label {
  flex: 1;
}
.tb-por__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
}

@media (min-width: 992px) {
  .modal {
    left: var(--sidebar-max-width);
    width: calc(100% - var(--sidebar-max-width));
  }
}

.or-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: var(--or-separator-color);
  font-size: 0.875rem;
}
.or-separator::before, .or-separator::after {
  content: "";
  flex: 1;
  border-bottom: 0.0625rem solid var(--or-separator-border-color);
}
.or-separator span {
  padding: 0 0.75rem;
}

/* ============================================================
 * The filter dropdown, its choice rows and the period calendar.
 *
 * Built for the Overview, and reused by the contextual intervention analytics page for its
 * period filter — which is why these rules stay in the global bundle while the rest of the
 * Overview is its own stylesheet (styles/overview.scss), loaded by that page alone.
 * ============================================================ */
.tb-filter {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  /* Regular weight, not bold: the shipped control sets the value in the body face. */
}
.tb-filter__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dashboard-gap-300);
  width: 100%;
  min-height: 2.375rem;
  padding: var(--dashboard-gap-300) var(--dashboard-gap-400);
  background: var(--dashboard-control-bg);
  border: 0;
  border-radius: var(--dashboard-radius-control);
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}
.tb-filter__button:hover, .tb-filter__button[aria-expanded=true] {
  box-shadow: inset 0 0 0 0.0625rem var(--tb-border-hover);
}
.tb-filter__button[aria-expanded=true] .tb-filter__chevron {
  transform: rotate(180deg);
}
.tb-filter__button:focus-visible {
  outline: 0.125rem solid var(--tb-focus);
  outline-offset: 0.125rem;
}
.tb-filter__button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}
.tb-filter__text {
  display: flex;
  align-items: center;
  gap: var(--dashboard-gap-300);
  min-width: 0;
}
.tb-filter__icon, .tb-filter__chevron {
  color: var(--dashboard-text-secondary);
  font-size: 0.75rem;
  flex: none;
}
.tb-filter__chevron {
  transition: transform 0.15s ease;
}
.tb-filter i.tb-filter__icon {
  font-size: 1rem;
}
.tb-filter__label {
  color: var(--dashboard-text-secondary);
  font-size: 0.875rem;
  white-space: nowrap;
}
.tb-filter__value {
  color: var(--dashboard-text-primary);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-filter__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.25rem);
  left: 0;
  width: max-content;
  min-width: 100%;
  max-width: min(26.25rem, 100vw - 2rem);
  padding: var(--dashboard-gap-300);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
  box-shadow: var(--card-shadow);
}
.tb-filter__search {
  display: flex;
  align-items: center;
  gap: var(--dashboard-gap-200);
  padding: var(--dashboard-gap-200) var(--dashboard-gap-300);
  border-bottom: 0.0625rem solid var(--dashboard-surface-border);
  color: var(--dashboard-text-secondary);
}
.tb-filter__search:focus-within {
  outline: 0.125rem solid var(--tb-focus);
  outline-offset: -0.125rem;
  border-radius: var(--dashboard-radius-control);
}
.tb-filter__search-input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 0.875rem;
  background: transparent;
}
.tb-filter__search-input:focus, .tb-filter__search-input:focus-visible {
  outline: none;
  box-shadow: none;
}
.tb-filter__select-all {
  display: block;
  margin-right: auto;
  padding: var(--dashboard-gap-200) var(--dashboard-gap-300);
  border: 0;
  background: none;
  color: var(--dashboard-text-secondary);
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
}
.tb-filter__heading {
  display: flex;
  align-items: center;
  gap: var(--dashboard-gap-200);
  margin: var(--dashboard-gap-200) 0;
  padding: var(--dashboard-gap-200) var(--dashboard-gap-300);
  border-radius: var(--dashboard-radius-control);
  background: var(--dashboard-control-bg);
  border-bottom: 1px solid var(--dashboard-control-border);
  color: var(--dashboard-text-secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}
.tb-filter__heading i {
  font-size: 0.75rem;
}
.tb-filter__options {
  --tb-dropdown-scrollbar: var(--dashboard-surface-border);
  max-height: 16.25rem;
  overflow-y: auto;
}
.tb-filter__options::-webkit-scrollbar {
  width: 0.25rem;
}
.tb-filter__options::-webkit-scrollbar-track {
  background: transparent;
}
.tb-filter__options::-webkit-scrollbar-thumb {
  border-radius: 0.125rem;
  background: var(--tb-dropdown-scrollbar, var(--tb-border-hover));
}
@supports not selector(::-webkit-scrollbar) {
  .tb-filter__options {
    scrollbar-width: thin;
    scrollbar-color: var(--tb-dropdown-scrollbar, var(--tb-border-hover)) transparent;
  }
}
.tb-filter__group + .tb-filter__group, .tb-filter__options > .tb-choice + .tb-filter__group {
  margin-top: var(--dashboard-gap-200);
  padding-top: var(--dashboard-gap-200);
  border-top: 0.0625rem solid var(--dashboard-surface-border);
}
.tb-filter__group > .tb-choice:not(.tb-choice--group) {
  padding-inline-start: calc(var(--dashboard-gap-300) * 2 + var(--dashboard-control-size));
}
.tb-filter__range {
  display: flex;
  align-items: center;
  gap: var(--dashboard-gap-200);
  padding-top: var(--dashboard-gap-300);
  margin-top: var(--dashboard-gap-200);
  border-top: 0.0625rem solid var(--dashboard-surface-border);
}
.tb-filter__range input {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  padding: 0.25rem 0.375rem;
  border: 0.0625rem solid var(--dashboard-control-border);
  border-radius: var(--dashboard-radius-control);
}

.tb-choice {
  display: flex;
  align-items: center;
  gap: var(--dashboard-gap-300);
  padding: var(--dashboard-gap-200) var(--dashboard-gap-300);
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--dashboard-radius-control);
  /* A menu entry that acts rather than toggles an input. */
  /* An option the current filters rule out (a view the period does not allow, a comparison
     with no data): greyed, so it reads as unavailable rather than as a click that did nothing. */
}
.tb-choice:hover {
  background: var(--dashboard-control-bg);
}
.tb-choice--group {
  font-weight: 600;
}
.tb-choice--button {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.tb-choice__hint {
  inline-size: 0;
  min-inline-size: 100%;
  margin: 0 0 var(--dashboard-gap-300) 0;
  padding-block: 0;
  padding-inline: calc(var(--dashboard-gap-300) * 2 + var(--dashboard-control-size)) var(--dashboard-gap-300);
  color: var(--dashboard-text-secondary);
  font-size: 0.75rem;
}
.tb-choice:has(input:disabled) {
  opacity: 0.4;
  cursor: not-allowed;
}
.tb-choice:has(input:disabled):hover {
  background: none;
}
.tb-choice:has(input:disabled) input {
  cursor: not-allowed;
}

/* --- Form controls ----------------------------------------------------------
 *
 * The browser's own checkbox and radio are OS-blue and cannot be recoloured past
 * `accent-color` on every engine. The design draws a 16px box, 4px radius, grey hairline, and
 * a brand fill when checked — so the control is drawn here and the input keeps every native
 * behaviour: focus ring, keyboard, and the accessibility tree.
 * ---------------------------------------------------------------------------- */
.tb-choice input[type=checkbox],
.tb-choice input[type=radio] {
  /* Prefixed too: this project compiles Sass with no autoprefixer (that is the webapp's
     toolchain), and without the prefix Safari keeps drawing its own control on top. */
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: var(--dashboard-control-size);
  height: var(--dashboard-control-size);
  margin: 0;
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-control-border-idle);
  border-radius: var(--dashboard-control-radius);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background-color 0.12s ease-out, border-color 0.12s ease-out;
}

.tb-choice input[type=radio] {
  border-radius: 50%;
}

.tb-choice input[type=checkbox]::before,
.tb-choice input[type=radio]::before {
  content: "";
  transform: scale(0);
  transition: transform 0.12s cubic-bezier(0.3, 1.4, 0.5, 1);
}

/* A tick drawn with clip-path rather than a glyph: no icon font, and it scales with the box. */
.tb-choice input[type=checkbox]::before {
  width: 0.625rem;
  height: 0.625rem;
  background: var(--dashboard-surface-bg);
  clip-path: polygon(14% 44%, 0 60%, 39% 100%, 100% 16%, 84% 0, 39% 68%);
}

.tb-choice input[type=radio]::before {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--dashboard-surface-bg);
}

.tb-choice input[type=checkbox]:checked,
.tb-choice input[type=radio]:checked {
  background: var(--dashboard-brand);
  border-color: var(--dashboard-brand);
}

.tb-choice input[type=checkbox]:checked::before,
.tb-choice input[type=radio]:checked::before {
  transform: scale(1);
}

.tb-choice input[type=checkbox]:indeterminate {
  background: var(--dashboard-brand);
  border-color: var(--dashboard-brand);
}

.tb-choice input[type=checkbox]:indeterminate::before {
  height: 0.125rem;
  clip-path: none;
  transform: scale(1);
}

.tb-choice input[type=checkbox]:focus-visible,
.tb-choice input[type=radio]:focus-visible {
  outline: 0.125rem solid var(--dashboard-brand);
  outline-offset: 0.125rem;
}

/* --- Date range calendar -----------------------------------------------------
 *
 * Replaces the native `<input type="date">` pair, which rendered the OS picker — a blue,
 * single-date, platform-specific control that shares nothing with the design and cannot
 * express a RANGE at all.
 * ---------------------------------------------------------------------------- */
/* The range picker only belongs to `Custom range`: with a preset checked it is noise under
   the choice already made, and it made the menu twice as tall (1525:75908). It appears the
   moment the custom radio is checked — no reload, no script. A panel with no presets (the
   announcement Schedule picker) has nothing to choose between and always shows it. */
.tb-period {
  display: flex;
  flex-direction: column;
  gap: var(--dashboard-gap-300);
  padding: var(--dashboard-gap-500) var(--dashboard-gap-400);
}

.tb-filter__menu:not(:has(input[name=period][value=custom]:checked)) .tb-period,
.tb-pop:has(input[name=period]):not(:has(input[name=period][value=custom]:checked)) .tb-period {
  display: none;
}

.tb-period__bounds {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: var(--dashboard-gap-300);
}

.tb-period__arrow {
  block-size: 2.25rem;
  display: grid;
  place-items: center;
  font-size: 0.6875rem;
  color: var(--dashboard-text-secondary);
}

.tb-period__bound {
  display: flex;
  flex-direction: column;
  gap: var(--dashboard-gap-200);
  margin: 0;
  min-inline-size: 0;
}

.tb-period__bound-label {
  font-size: 0.75rem;
  color: var(--dashboard-text-secondary);
}

.tb-period__bound-input {
  box-sizing: border-box;
  inline-size: 100%;
  block-size: 2.25rem;
  padding: 0 var(--dashboard-gap-300);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-control-border);
  border-radius: var(--dashboard-radius-control);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--dashboard-text-primary);
}
.tb-period__bound-input::placeholder {
  color: var(--dashboard-day-muted);
}
.tb-period__bound-input:focus {
  outline: none;
}
.tb-period__bound-input.is-invalid {
  border-color: var(--tb-danger);
  background: var(--dashboard-danger-bg);
}

.tb-period__bound.is-active .tb-period__bound-input:not(.is-invalid) {
  border-color: var(--dashboard-brand);
  box-shadow: 0 0 0 0.1875rem var(--dashboard-brand-lightest);
}

.tb-period__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--dashboard-gap-300);
  padding-top: var(--dashboard-gap-200);
}

.tb-period__summary {
  font-size: 0.8125rem;
  color: var(--dashboard-text-secondary);
}

.tb-period__actions {
  display: flex;
  gap: var(--dashboard-gap-300);
  margin-inline-start: auto;
}

.tb-period__cancel,
.tb-period__apply {
  block-size: 2rem;
  padding: 0 var(--dashboard-gap-400);
  border: 0;
  border-radius: var(--dashboard-radius-control);
  font-size: 0.875rem;
  cursor: pointer;
}
.tb-period__cancel:focus-visible,
.tb-period__apply:focus-visible {
  outline: 0.125rem solid var(--tb-focus);
  outline-offset: 0.125rem;
}

.tb-period__cancel {
  background: none;
  color: var(--dashboard-text-primary);
}
.tb-period__cancel:hover {
  background: var(--dashboard-control-bg);
}

.tb-period__apply {
  background: var(--tb-coral-700);
  color: #fff;
  font-weight: 500;
}
.tb-period__apply:hover:not(:disabled) {
  background: var(--tb-coral-800);
}
.tb-period__apply:disabled {
  opacity: 0.4;
  cursor: default;
}

.tb-calendar {
  min-inline-size: 16.875rem;
  padding: var(--dashboard-gap-400);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-calendar-border);
  border-radius: var(--dashboard-radius-control);
  /* The month's name zooms out to the year's months, then to twelve years. */
  /* Month and year scales are coarser, so they breathe rather than squeezing into seven. */
}
.tb-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--dashboard-gap-500);
}
.tb-calendar__nav {
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  background: none;
  color: var(--dashboard-text-primary);
  cursor: pointer;
  border-radius: var(--dashboard-radius-control);
}
.tb-calendar__nav:hover {
  background: var(--dashboard-control-bg);
}
.tb-calendar__nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.tb-calendar__title {
  display: inline-flex;
  align-items: center;
  gap: var(--dashboard-gap-300);
  padding: var(--dashboard-gap-200) var(--dashboard-gap-300);
  border: 0;
  background: none;
  border-radius: var(--dashboard-radius-control);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--dashboard-text-primary);
  text-transform: capitalize;
  cursor: pointer;
}
.tb-calendar__title:hover:not(:disabled) {
  background: var(--dashboard-control-bg);
}
.tb-calendar__title:disabled {
  cursor: default;
}
.tb-calendar__title:disabled .tb-calendar__title-chevron {
  display: none;
}
.tb-calendar__title:focus-visible {
  outline: 0.125rem solid var(--dashboard-brand);
}
.tb-calendar__title-chevron {
  font-size: 0.625rem;
  color: var(--dashboard-text-secondary);
}
.tb-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  row-gap: var(--dashboard-gap-300);
}
.tb-calendar__grid--months {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tb-calendar__grid--years {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tb-calendar__weekday {
  font-size: 0.75rem;
  color: var(--dashboard-text-secondary);
  text-align: center;
  padding-bottom: var(--dashboard-gap-200);
}

.tb-day {
  position: relative;
  height: var(--dashboard-day-cell);
  border: 0;
  background: none;
  font-size: 0.75rem;
  color: var(--dashboard-text-primary);
  cursor: pointer;
  display: grid;
  place-items: center;
  /* The range band sits behind the number and bleeds to the cell edges, so consecutive days
     join up into one continuous strip rather than a row of separate pills. */
  /* An endpoint fills only the half of the cell that faces into the range. */
  /* Today (the current month or year on the coarser scales): a ring and a heavier number, so it
     still reads when it is also a range end or inside the band. */
  /* Zoomed out: the months (years) the range covers. */
}
.tb-day::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
}
.tb-day span {
  position: relative;
  z-index: 1;
  width: var(--dashboard-day-cell);
  height: var(--dashboard-day-cell);
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.tb-day--outside {
  color: var(--dashboard-day-muted);
}
.tb-day--in-range::before {
  background: var(--dashboard-brand-lightest);
}
.tb-day--start::before {
  background: linear-gradient(to right, transparent 50%, var(--dashboard-brand-lightest) 50%);
}
.tb-day--end::before {
  background: linear-gradient(to right, var(--dashboard-brand-lightest) 50%, transparent 50%);
}
.tb-day--start.tb-day--end::before {
  background: transparent;
}
.tb-day--start span, .tb-day--end span {
  background: var(--dashboard-brand-lighter);
}
.tb-day--marked span {
  background: var(--dashboard-brand-lightest);
}
.tb-day--today span {
  box-shadow: inset 0 0 0 0.0625rem var(--dashboard-brand);
  font-weight: 600;
}
.tb-day:hover:not(:disabled):not(.tb-day--today) span {
  box-shadow: inset 0 0 0 0.0625rem var(--dashboard-brand-lighter);
}
.tb-day:disabled {
  color: var(--dashboard-day-muted);
  cursor: default;
}
.tb-day:focus-visible {
  outline: 0.125rem solid var(--dashboard-brand);
  outline-offset: -0.125rem;
  border-radius: var(--dashboard-radius-control);
}

/* Month and year cells are wider than a day, so they are pills rather than circles — and set in
   the 14px body size, where a day number is 12px (1525:76140). */
.tb-day--wide {
  font-size: 0.875rem;
}

.tb-day--wide span {
  width: 100%;
  border-radius: var(--dashboard-radius-control);
}

/* A soft opening for the menu; off under `prefers-reduced-motion`. `tb-menu-in` is also
 * used by the Overview's `.tb-select__menu`. */
@keyframes tb-menu-in {
  from {
    opacity: 0;
    transform: translateY(-0.375rem) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.tb-filter__menu {
  transform-origin: top center;
  animation: tb-menu-in 0.16s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .tb-filter__menu {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .tb-filter__chevron {
    transition: none;
  }
}
/* Narrow screens — see the Overview stylesheet for why these exist. */
@media (max-width: 991.98px) {
  /* Filter menus are tapped, not clicked: every option — store, device, preset, comparison — is
     a 44px row (WCAG 2.5.5's target size), where the pointer layout packs them at ~29px and a
     thumb lands on the neighbour. The store list gets the room to show them. */
  .tb-choice {
    min-block-size: 2.375rem;
    padding-block: var(--dashboard-gap-200);
  }
  .tb-filter__options {
    max-height: min(22.5rem, 55vh);
  }
  .tb-period__bound-input,
  .tb-period__arrow {
    block-size: 2.75rem;
  }
  .tb-period__cancel,
  .tb-period__apply {
    block-size: 2.75rem;
  }
  .tb-calendar__nav {
    height: 2.25rem;
    min-width: 2.25rem;
  }
}
@media (max-width: 767.98px) {
  .tb-filter {
    flex: 1 1 calc(50% - var(--dashboard-gap-300));
    min-inline-size: 0;
  }
  /* A 320px menu hanging off an 84px control at the right edge was clipped by the viewport —
     the `Compare` panel lost half of every option. Menus take the width of the page here, and
     the right-hand column anchors to its own right edge so it opens inwards. */
  .tb-filter__menu {
    inline-size: calc(100vw - 2rem);
    max-inline-size: calc(100vw - 2rem);
  }
  .tb-filter:nth-child(even) .tb-filter__menu {
    inset-inline: auto 0;
  }
  /* The calendar is drawn at a fixed cell size; let it shrink with the sheet it sits in. Rows
     only: a column gap cuts the range band into one white-edged block per day. */
  .tb-calendar__grid--days {
    row-gap: 0.125rem;
  }
  .tb-day {
    min-inline-size: 0;
  }
}
/* Shared by the expand control and every rail icon. */
/* --- Shell ------------------------------------------------------------- */
.sidebar {
  box-shadow: none;
}
.sidebar .main-header,
.sidebar #main-menu {
  flex-shrink: 0;
}

body:not(.ea-sidebar-width-compact) .sidebar {
  inline-size: var(--sidebar-max-width);
}

#sidebar-resizer-handler {
  display: none;
}

/* The sidebar scrolls on its own, independently of the page. */
@media (min-width: 992px) {
  .sidebar {
    position: sticky;
    inset-block-start: 0;
    display: flex;
    flex-direction: column;
    block-size: 100vh;
    max-block-size: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    --tb-dropdown-scrollbar: var(--sidebar-locale-border-hover);
  }
  .sidebar::-webkit-scrollbar {
    width: 0.25rem;
  }
  .sidebar::-webkit-scrollbar-track {
    background: transparent;
  }
  .sidebar::-webkit-scrollbar-thumb {
    border-radius: 0.125rem;
    background: var(--tb-dropdown-scrollbar, var(--tb-border-hover));
  }
  @supports not selector(::-webkit-scrollbar) {
    .sidebar {
      scrollbar-width: thin;
      scrollbar-color: var(--tb-dropdown-scrollbar, var(--tb-border-hover)) transparent;
    }
  }
  .sidebar::-webkit-scrollbar {
    width: 0.375rem;
  }
  .sidebar::-webkit-scrollbar-thumb {
    border-radius: 0.1875rem;
  }
  .wrapper {
    transition: grid-template-columns 0.25s ease;
  }
}
@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
  .wrapper {
    transition: none;
  }
}
/* --- Logo -------------------------------------------------------------- */
.main-header .navbar {
  padding-block-start: 0;
  padding-inline-start: 0;
}

.main-header #header-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* The extra `.main-header` outranks EasyAdmin's `.main-header #header-logo a` padding. */
}
.main-header #header-logo .sidebar-logo {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-inline-size: 0;
  padding: 1rem;
}
.main-header #header-logo .sidebar-logo__wordmark {
  display: block;
}
.main-header #header-logo .sidebar-logo__wordmark img {
  display: block;
  max-block-size: 1.6875rem;
  inline-size: auto;
}
.main-header #header-logo .sidebar-logo__wordmark .logo-mobile {
  display: none;
}
.main-header #header-logo .sidebar-logo-expand {
  display: none;
  padding: 1.5rem 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.main-header #header-logo .sidebar-collapse-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  inline-size: 2rem;
  block-size: 2rem;
  margin-inline-end: 0.625rem;
  padding: 0;
  border: 0;
  border-radius: var(--dashboard-radius-control);
  background: transparent;
  color: var(--sidebar-collapse-icon-color);
  cursor: pointer;
}
.main-header #header-logo .sidebar-collapse-icon:hover, .main-header #header-logo .sidebar-collapse-icon:focus-visible {
  background: var(--sidebar-icon-hover-bg);
  color: var(--sidebar-locale-color);
}
.main-header #header-logo .sidebar-collapse-icon:hover::after, .main-header #header-logo .sidebar-collapse-icon:focus-visible::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: calc(100% + 0.375rem);
  z-index: var(--zindex-tooltip, 1080);
  display: flex;
  align-items: center;
  block-size: 1.5rem;
  padding: 0 0.5rem;
  border-radius: 0.25rem;
  background: var(--sidebar-bg);
  box-shadow: 0 0.0625rem 0.046875rem rgba(0, 0, 0, 0.06), 0 0.09375rem 0.25rem rgba(0, 0, 0, 0.12);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
  position: fixed;
  inset-block-start: var(--tooltip-y);
  inset-inline-start: calc(var(--tooltip-x) + 1rem);
  content: attr(data-tooltip);
}

.sidebar-logo__mark,
.sidebar-logo__expand-icon {
  inline-size: 1.625rem;
  block-size: 1.625rem;
}

.sidebar-logo__mark {
  display: block;
}

.sidebar-logo__expand-icon {
  display: none;
  align-items: center;
  justify-content: center;
}

@media (min-width: 992px) {
  /* Matches EasyAdmin's compact selector, which pads the navbar with `--sidebar-padding-left`. */
  body.ea-sidebar-width-compact .sidebar .main-header .navbar {
    padding-inline-start: 0;
  }
  body.ea-sidebar-width-compact .main-header #header-logo {
    /* EasyAdmin clips it to truncate a text title, which would cut the tooltip off. */
    overflow: visible;
  }
  body.ea-sidebar-width-compact .main-header #header-logo .sidebar-logo,
  body.ea-sidebar-width-compact .main-header #header-logo .sidebar-collapse-icon {
    display: none;
  }
  body.ea-sidebar-width-compact .main-header #header-logo .sidebar-logo-expand {
    position: relative;
    display: flex;
    justify-content: center;
    inline-size: 100%;
    color: var(--sidebar-locale-color);
  }
  body.ea-sidebar-width-compact .main-header #header-logo .sidebar-logo-expand:hover::after, body.ea-sidebar-width-compact .main-header #header-logo .sidebar-logo-expand:focus-visible::after {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: calc(100% + 0.375rem);
    z-index: var(--zindex-tooltip, 1080);
    display: flex;
    align-items: center;
    block-size: 1.5rem;
    padding: 0 0.5rem;
    border-radius: 0.25rem;
    background: var(--sidebar-bg);
    box-shadow: 0 0.0625rem 0.046875rem rgba(0, 0, 0, 0.06), 0 0.09375rem 0.25rem rgba(0, 0, 0, 0.12);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-50%);
    content: attr(data-tooltip);
  }
  /* Anywhere on the rail, the mark turns into the expand icon. */
  body.ea-sidebar-width-compact .sidebar:is(:hover, :focus-within) .sidebar-logo__mark {
    display: none;
  }
  body.ea-sidebar-width-compact .sidebar:is(:hover, :focus-within) .sidebar-logo__expand-icon {
    display: flex;
  }
}
/* --- Menu -------------------------------------------------------------- */
/* EasyAdmin paints `.active` on the `<li>`, which wraps a section's submenu; the fill goes on
   the row instead so an open section is not one filled card. */
#main-menu .menu .menu-item {
  --sidebar-menu-icon-color: var(--sidebar-menu-color);
  --sidebar-menu-active-item-color: var(--sidebar-menu-color);
  margin: 0;
  padding-inline: 0;
  border-radius: 0;
  background: transparent;
  /* `!important` beats EasyAdmin's `me-1`. */
}
#main-menu .menu .menu-item + .menu-item {
  margin-block-start: 0.25rem;
}
#main-menu .menu .menu-item > .menu-item-contents {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-block-size: 2.5rem;
  margin: 0;
  padding: 0 1rem;
  border-radius: 0;
  color: var(--sidebar-menu-color);
}
#main-menu .menu .menu-item > .menu-item-contents:hover {
  background: var(--sidebar-menu-active-item-bg);
}
#main-menu .menu .menu-item .menu-icon {
  margin: 0;
  block-size: 1.25rem;
}
#main-menu .menu .menu-item.active:not(.has-submenu) > .menu-item-contents {
  background: var(--sidebar-menu-active-item-bg);
}
#main-menu .menu .menu-item.active:not(.has-submenu) .menu-icon, #main-menu .menu .menu-item.sub-active > a .menu-icon {
  color: var(--sidebar-menu-icon-active-color) !important;
}
#main-menu .menu .menu-item .menu-item-label {
  font-weight: 400 !important;
}
#main-menu .menu .menu-item .submenu-toggle-icon {
  margin: 0 0 0 auto !important;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
  #main-menu .menu .menu-item .submenu-toggle-icon {
    transition: none;
  }
}
#main-menu .menu .menu-item.has-submenu.expanded > .submenu-toggle .submenu-toggle-icon {
  transform: rotate(180deg);
}
#main-menu .menu .submenu {
  margin: 0;
  padding: 0;
}
#main-menu .menu .submenu > .menu-item:first-child {
  margin-block-start: 0.25rem;
}
#main-menu .menu .submenu .menu-item > .menu-item-contents {
  padding-inline-start: 3rem;
}
#main-menu .menu .submenu .menu-item.active {
  padding-inline-start: 0;
}
#main-menu .menu > .menu-item:first-child + .menu-item {
  margin-block-start: 0.75rem;
}
#main-menu .menu .menu-header {
  margin-block-start: 0;
}
#main-menu .menu .menu-header:has(.menu-divider) {
  padding: 0.5rem 0;
}
#main-menu .menu .menu-header:not(:has(.menu-divider)) {
  padding: 0 1rem 0.625rem;
}
#main-menu .menu .menu-header:not(:has(.menu-divider)) .menu-header-contents {
  padding: 0;
  color: var(--sidebar-heading-color);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#main-menu .menu .menu-header:hover {
  background: none;
}
#main-menu .menu .menu-divider {
  margin: 0;
  border: 0;
  border-top: 0.0625rem solid var(--sidebar-rule);
  opacity: 1;
}

@media (min-width: 992px) {
  body:not(.ea-sidebar-width-compact) #main-menu {
    margin-block-start: 1rem;
  }
}
/* --- Compact rail -------------------------------------------------------
 *
 * EasyAdmin's compact styles target its light sidebar (a light hover flyout, icons forced back to
 * their resting colour). Here a rail row is just its icon, with the label as a tooltip; hovering
 * a section opens its links in a box beside the rail, and clicking it does nothing
 * (sidebar_menu_controller.js).
 * ----------------------------------------------------------------------- */
@media (min-width: 992px) {
  body.ea-sidebar-width-compact .sidebar {
    --ea-compact-rail: 3.125rem;
    --ea-compact-icon: 18px;
    --sidebar-padding-left: calc((var(--ea-compact-rail) - var(--ea-compact-icon)) / 2);
    --sidebar-menu-compact-hover-box-shadow:
      0 0.625rem 0.9375rem -0.1875rem rgba(0, 0, 0, .45),
      0 0.25rem 0.375rem -0.25rem rgba(0, 0, 0, .40);
    box-shadow: none;
  }
  /* EasyAdmin hard-codes a 44px track. */
  body.ea-sidebar-width-compact .wrapper {
    grid-template-columns: var(--sidebar-compact-width) auto;
  }
  body.ea-sidebar-width-compact #main-menu {
    padding-block-start: 1rem;
  }
  body.ea-sidebar-width-compact #main-menu .menu {
    /* A section opens its links in a box beside the rail, headed by its label on the icon's
       row. The box touches the row, so the pointer can cross into it without losing the hover. */
  }
  body.ea-sidebar-width-compact #main-menu .menu .menu-header:not(:has(.menu-divider)) {
    display: none;
  }
  body.ea-sidebar-width-compact #main-menu .menu .menu-header:has(.menu-divider) {
    block-size: auto;
    inline-size: auto;
    padding: 0.25rem 0;
    overflow: visible;
  }
  body.ea-sidebar-width-compact #main-menu .menu .menu-item {
    position: relative;
    /* The current page is its orange icon alone, no filled row. */
  }
  body.ea-sidebar-width-compact #main-menu .menu .menu-item:hover {
    min-inline-size: 0;
    background: transparent;
    box-shadow: none;
  }
  body.ea-sidebar-width-compact #main-menu .menu .menu-item > .menu-item-contents {
    justify-content: center;
    min-inline-size: 0;
    inline-size: 100%;
    min-block-size: 2.375rem;
    block-size: 2.375rem;
    padding: 0;
    border-radius: var(--sidebar-menu-border-radius);
  }
  body.ea-sidebar-width-compact #main-menu .menu .menu-item > .menu-item-contents .menu-icon {
    margin: 0;
    font-size: 1rem;
    block-size: 1.625rem;
  }
  body.ea-sidebar-width-compact #main-menu .menu .menu-item:hover > .menu-item-contents {
    background: var(--sidebar-menu-active-item-bg);
    color: var(--sidebar-menu-color);
  }
  body.ea-sidebar-width-compact #main-menu .menu .menu-item.active, body.ea-sidebar-width-compact #main-menu .menu .menu-item.active:not(:hover) > .menu-item-contents {
    background: transparent;
  }
  body.ea-sidebar-width-compact #main-menu .menu .menu-item.active:hover .menu-icon i, body.ea-sidebar-width-compact #main-menu .menu .menu-item.sub-active:hover .menu-icon i {
    color: var(--sidebar-menu-icon-active-color) !important;
  }
  body.ea-sidebar-width-compact #main-menu .menu .menu-item.has-submenu:hover .submenu-toggle-icon, body.ea-sidebar-width-compact #main-menu .menu .menu-item:hover > .menu-item-contents .menu-item-badge {
    display: none;
  }
  body.ea-sidebar-width-compact #main-menu .menu > .menu-item:not(.has-submenu):hover > .menu-item-contents .menu-item-label {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: calc(100% + 0.375rem);
    z-index: var(--zindex-tooltip, 1080);
    display: flex;
    align-items: center;
    block-size: 1.5rem;
    padding: 0 0.5rem;
    border-radius: 0.25rem;
    background: var(--sidebar-bg);
    box-shadow: 0 0.0625rem 0.046875rem rgba(0, 0, 0, 0.06), 0 0.09375rem 0.25rem rgba(0, 0, 0, 0.12);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-50%);
    /* Beats Bootstrap's `.position-relative`, itself `!important`. */
    position: absolute !important;
  }
  body.ea-sidebar-width-compact #main-menu .menu > .menu-item.has-submenu:hover > .submenu-toggle .menu-item-label {
    position: absolute !important;
    inset-block-start: 0;
    inset-inline-start: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    block-size: 2.375rem;
    padding-inline: 1.125rem;
    color: var(--sidebar-heading-color);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
  }
  body.ea-sidebar-width-compact #main-menu .menu > .menu-item.has-submenu:hover > .submenu {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 100%;
    z-index: 1;
    display: block;
    inline-size: max-content;
    min-inline-size: 12.5rem;
    max-block-size: none !important;
    margin: 0;
    padding: 2.375rem 0.375rem 0.375rem;
    border-radius: 0 var(--sidebar-menu-border-radius) var(--sidebar-menu-border-radius) 0;
    background: var(--sidebar-bg);
    box-shadow: var(--sidebar-menu-compact-hover-box-shadow);
    /* EasyAdmin paints every link of a hovered section light. */
  }
  body.ea-sidebar-width-compact #main-menu .menu > .menu-item.has-submenu:hover > .submenu > .menu-item:first-child {
    margin-block-start: 0;
  }
  body.ea-sidebar-width-compact #main-menu .menu > .menu-item.has-submenu:hover > .submenu .menu-item {
    padding-inline: 0;
  }
  body.ea-sidebar-width-compact #main-menu .menu > .menu-item.has-submenu:hover > .submenu .menu-item > .menu-item-contents {
    justify-content: flex-start;
    gap: 0.75rem;
    min-block-size: 2.25rem;
    block-size: auto;
    padding: 0 0.75rem;
    background: transparent;
    color: var(--sidebar-menu-submenu-color);
    white-space: nowrap;
  }
  body.ea-sidebar-width-compact #main-menu .menu > .menu-item.has-submenu:hover > .submenu .menu-item:hover > .menu-item-contents,
  body.ea-sidebar-width-compact #main-menu .menu > .menu-item.has-submenu:hover > .submenu .menu-item.active > .menu-item-contents {
    background: var(--sidebar-menu-active-item-bg);
  }
  /* Matches EasyAdmin's compact selector, which pads every row with `--sidebar-padding-left`. */
  body.ea-sidebar-width-compact .sidebar #main-menu .menu .menu-item {
    padding-inline: 0.375rem;
  }
}
/* --- Phone drawer ------------------------------------------------------ */
/* EasyAdmin hides `.main-header` below 992px, which left the drawer no close control. */
@media (max-width: 991.98px) {
  .sidebar,
  body.ea-sidebar-width-compact .sidebar {
    display: flex;
    flex-direction: column;
    padding: 0;
  }
  .sidebar .main-header {
    display: block;
  }
  .main-header #header-logo .sidebar-logo-expand {
    display: none !important;
  }
  /* The header above already carries the logo, so the drawer drops it and the collapse
     control for a "Menu" title and a close button (`1667:35396`). */
  .main-header #header-logo .sidebar-logo,
  .main-header #header-logo .sidebar-collapse-icon {
    display: none !important;
  }
}
/* --- Phone drawer, per the mobile menu frame (`1667:35394`) ------------ */
.sidebar-drawer-head {
  display: none;
}

@media (max-width: 991.98px) {
  .sidebar {
    --sidebar-max-width: min(20rem, calc(100vw - 4.0625rem));
  }
  .main-header #header-logo {
    padding: 0;
  }
  .sidebar-drawer-head {
    display: flex;
    flex: 1 1 auto;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem 1.5rem 1rem;
    color: var(--sidebar-menu-color);
  }
  .sidebar-drawer-head__title {
    cursor: pointer;
    font-family: var(--body-font-family);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
  }
  .sidebar-drawer-head__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 0.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }
  .sidebar-drawer-head__close i {
    display: block;
    position: relative;
    top: 0.0625rem;
    font-size: 0.875rem;
    line-height: 1;
  }
  .sidebar {
    block-size: 100dvh;
    min-block-size: 100dvh;
  }
  .sidebar .sidebar-locale {
    position: sticky;
    inset-block-end: 0;
    z-index: 1;
    background: var(--sidebar-bg);
  }
  /* 40px and 14px (`1667:35487`). The extra `.sidebar` outranks the base rule further down. */
}
@media (max-width: 991.98px) and (hover: none) {
  #main-menu .menu .menu-item > .menu-item-contents:hover {
    background: transparent;
  }
  #main-menu .menu .menu-item.active:not(.has-submenu) > .menu-item-contents:hover {
    background: var(--sidebar-menu-active-item-bg);
  }
}
@media (max-width: 991.98px) {
  #main-menu .menu {
    padding-inline: 0.75rem;
    /* The menu's own gutter now indents the rows; a heading lines up with their icons. */
  }
  #main-menu .menu .menu-item {
    border-radius: var(--dashboard-radius-control);
  }
  #main-menu .menu .menu-item > .menu-item-contents {
    gap: 0.75rem;
    min-block-size: 2.75rem;
    padding-inline: 0.75rem;
    border-radius: var(--dashboard-radius-control);
    font-size: 1.125rem;
    line-height: 1.5;
  }
  #main-menu .menu .menu-item .menu-icon {
    inline-size: 1rem;
    font-size: 1rem;
  }
  #main-menu .menu .submenu .menu-item > .menu-item-contents {
    min-block-size: 2.5rem;
    padding-inline-start: 2.75rem;
    font-size: 1rem;
  }
  #main-menu .menu .submenu-toggle-icon {
    font-size: 1rem;
  }
  #main-menu .menu .menu-header:not(:has(.menu-divider)) {
    padding-inline: 0.25rem;
  }
  .sidebar .sidebar-locale .locale-switcher-select {
    block-size: 2.5rem;
    min-block-size: 2.5rem;
    font-size: 0.875rem;
  }
}
/* The auto margin pins it to the bottom of the flex column. */
.sidebar-locale {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block-start: auto;
  padding: 1rem;
  border-block-start: 0.0625rem solid var(--sidebar-locale-border);
  /* Only a customizable select lets the open list be styled; others keep the native one. */
}
.sidebar-locale .locale-switcher {
  position: relative;
  flex: 1 0 0;
  min-inline-size: 0;
}
.sidebar-locale .locale-switcher::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0.625rem;
  inline-size: 0.625rem;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") center/0.625rem 0.625rem no-repeat;
  pointer-events: none;
  transition: transform 0.15s ease;
}
@supports selector(:open) {
  .sidebar-locale .locale-switcher:has(.locale-switcher-select:open)::after {
    transform: rotate(180deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar-locale .locale-switcher::after {
    transition: none;
  }
}
.sidebar-locale .locale-switcher-select {
  inline-size: 100%;
  block-size: 2rem;
  min-block-size: 2rem;
  padding-block: 0;
  padding-inline: 0.75rem 1.75rem;
  background-color: transparent;
  background-image: none;
  border: 0.0625rem solid var(--sidebar-locale-border);
  border-radius: var(--dashboard-radius-control);
  box-shadow: none;
  color: var(--sidebar-locale-color);
  color-scheme: dark;
  font-size: 0.75rem;
  line-height: 1.4;
  cursor: pointer;
}
.sidebar-locale .locale-switcher-select:hover, .sidebar-locale .locale-switcher-select:focus-visible {
  border-color: var(--sidebar-locale-border-hover);
}
.sidebar-locale .locale-switcher-select:focus {
  box-shadow: none;
}
.sidebar-locale .locale-switcher-select option {
  background-color: var(--sidebar-locale-menu-bg);
  color: var(--sidebar-locale-color);
}
@supports (appearance: base-select) {
  .sidebar-locale .locale-switcher-select,
  .sidebar-locale .locale-switcher-select::picker(select) {
    appearance: base-select;
  }
  .sidebar-locale .locale-switcher-select {
    display: flex;
    align-items: center;
    /* Only the hovered row is lit. */
  }
  .sidebar-locale .locale-switcher-select::picker-icon {
    display: none;
  }
  .sidebar-locale .locale-switcher-select::picker(select) {
    margin-block: 0.25rem;
    padding: 0;
    overflow: hidden;
    background: var(--sidebar-locale-menu-bg);
    border: 0;
    border-radius: var(--dashboard-radius-control);
    box-shadow: var(--sidebar-locale-menu-shadow);
  }
  .sidebar-locale .locale-switcher-select option {
    min-block-size: 2.5rem;
    padding-inline: 0.75rem;
    background: transparent;
    font-size: 0.875rem;
    cursor: pointer;
  }
  .sidebar-locale .locale-switcher-select option::checkmark {
    display: none;
  }
  .sidebar-locale .locale-switcher-select option:checked, .sidebar-locale .locale-switcher-select option:hover, .sidebar-locale .locale-switcher-select option:focus-visible {
    background: var(--sidebar-locale-menu-active);
    outline: 0;
  }
  .sidebar-locale .locale-switcher-select:has(option:hover) option:checked:not(:hover) {
    background: transparent;
  }
}
.sidebar-locale .locale-switcher__code {
  display: none;
}

/* The rail shows the code; the select lies transparent over it and still opens the list. */
@media (min-width: 992px) {
  body.ea-sidebar-width-compact .sidebar-locale {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    /* Not `opacity: 0`, which would hide the open list too. */
  }
  body.ea-sidebar-width-compact .sidebar-locale .locale-switcher {
    flex: none;
    inline-size: 2.125rem;
  }
  body.ea-sidebar-width-compact .sidebar-locale .locale-switcher__code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--sidebar-locale-color);
    font-size: 0.75rem;
    line-height: 1.4;
  }
  body.ea-sidebar-width-compact .sidebar-locale .locale-switcher__code .fa {
    font-size: 0.625rem;
    transition: transform 0.15s ease;
  }
  body.ea-sidebar-width-compact .sidebar-locale .locale-switcher::after {
    display: none;
  }
  @supports selector(:open) {
    body.ea-sidebar-width-compact .sidebar-locale .locale-switcher:has(.locale-switcher-select:open) .locale-switcher__code .fa {
      transform: rotate(180deg);
    }
  }
  body.ea-sidebar-width-compact .sidebar-locale .locale-switcher-select {
    position: absolute;
    inset: 0;
    block-size: 100%;
    min-block-size: 0;
    background-image: none;
    border-color: transparent;
    color: transparent;
  }
  body.ea-sidebar-width-compact .sidebar-locale .locale-switcher-select::picker(select) {
    min-inline-size: 10rem;
  }
  body.ea-sidebar-width-compact .sidebar-locale .locale-switcher:has(.locale-switcher-select:focus-visible) .locale-switcher__code {
    outline: 0.125rem solid var(--sidebar-locale-border-hover);
    outline-offset: 0.125rem;
    border-radius: var(--dashboard-radius-control);
  }
}
/* Items for the mobile drawer alone (the Help link): the desktop sidebar is never the only way to
   reach them, the page header is. Scoped by the id so no sidebar rule above can show them again. */
@media (min-width: 992px) {
  #main-menu .menu-mobile-only {
    display: none;
  }
}
@media (min-width: 992px) {
  .content-top {
    position: sticky;
    inset-block-start: 0;
    z-index: 1020;
    background-color: transparent;
    transition: box-shadow 0.2s ease, padding-block 0.2s ease, background-color 0.2s ease;
  }
  .content-top.is-scrolled {
    background-color: var(--content-top-scrolled-bg);
    box-shadow: var(--content-top-scrolled-shadow);
    padding-block: 0.75rem;
  }
  .content-top.is-scrolled .title {
    font-size: 1.75rem;
  }
  .content-top .title {
    transition: font-size 0.2s ease;
  }
}
.content-top__filters {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.content-top__filters .datagrid-filters {
  margin-bottom: 0;
}

/* A header-row context filter (`crud/_context_filter.html.twig`): a tom-select autocomplete over
   the page's options. The store and client are picked in the sidebar's switcher instead. */
.context-selector {
  position: relative;
  inline-size: 14.375rem;
  padding: 0;
}
.context-selector > .form-select:not(.ts-hidden-accessible),
.context-selector > .ts-wrapper {
  inline-size: 100%;
  min-block-size: 2.75rem;
  background-color: var(--content-search-bg);
  border: solid 0.0625rem var(--content-search-border-color);
  border-radius: var(--input-border-radius);
  font-size: 0.875rem;
}
.context-selector .ts-control {
  padding-block: 0;
  padding-inline-start: 0.75rem;
  line-height: 3;
}
.context-selector .ts-control .item {
  display: block;
  max-inline-size: calc(100% - 28px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.context-selector .ts-dropdown {
  inset-inline: auto 0;
  inline-size: max-content;
  min-inline-size: 100%;
  max-inline-size: 22.5rem;
}
.context-selector .ts-dropdown .optgroup .optgroup-header {
  font-weight: bold;
  text-transform: uppercase;
  line-height: 2;
}
.context-selector .ts-dropdown .optgroup .option {
  padding-left: 1.25rem;
}
.context-selector.is-loading > .form-select:not(.ts-hidden-accessible),
.context-selector.is-loading > .ts-wrapper {
  background-image: none;
}
.context-selector.is-loading > .ts-wrapper.disabled .ts-control {
  background-color: transparent;
  opacity: 1;
  cursor: progress !important;
}
.context-selector.is-loading > .ts-wrapper.disabled .ts-control .item {
  color: inherit;
  opacity: 0.6;
}
.context-selector.is-loading::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset-block-start: 50%;
  inset-inline-end: 0.75rem;
  inline-size: 0.875rem;
  block-size: 0.875rem;
  margin-block-start: -0.4375rem;
  border: solid 0.125rem var(--content-search-border-color);
  border-block-start-color: currentcolor;
  border-radius: 50%;
  animation: context-selector-spin 0.6s linear infinite;
}

.context-selector > .ts-wrapper {
  --tb-chevron-w: 16px;
  --tb-chevron-h: 12px;
  --tb-chevron-end: 0.75rem;
  background-image: none;
}
.context-selector > .ts-wrapper::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: var(--tb-chevron-end);
  inline-size: var(--tb-chevron-w);
  background: var(--bs-form-select-bg-img) center/var(--tb-chevron-w) var(--tb-chevron-h) no-repeat;
  pointer-events: none;
  transition: transform 0.15s ease;
}
.context-selector > .ts-wrapper.dropdown-active::after {
  transform: rotate(180deg);
}

.context-selector.is-loading > .ts-wrapper::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .context-selector > .ts-wrapper::after {
    transition: none;
  }
}
@keyframes context-selector-spin {
  to {
    transform: rotate(1turn);
  }
}
/* The open list mirrors the Overview's store filter (`.tb-filter__menu`): a card, a search row
   with a magnifier and a placeholder over a hairline, and options that hover to the control grey.
   tom-select's `dropdown_input` plugin renders the search row; its placeholder is the select's
   `data-placeholder`. */
.context-selector .ts-dropdown {
  padding: var(--dashboard-gap-300);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
  box-shadow: var(--card-shadow);
}
.context-selector .ts-dropdown .dropdown-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--dashboard-gap-200);
  padding: var(--dashboard-gap-200) var(--dashboard-gap-300);
  background: transparent;
  border-block-end: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: 0;
  color: var(--dashboard-text-secondary);
  /* `fa-magnifying-glass`, the glyph the store filter uses. */
}
.context-selector .ts-dropdown .dropdown-input-wrap::before {
  content: "\f002";
  flex: none;
  font-family: "Font Awesome 6 Free", sans-serif;
  font-weight: 900;
  font-size: 0.875rem;
  line-height: 1;
}
.context-selector .ts-dropdown .dropdown-input,
.context-selector .ts-dropdown .dropdown-input:focus {
  flex: 1;
  block-size: auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: 0;
  font-size: 0.875rem;
  color: var(--dashboard-text-primary);
}
.context-selector .ts-dropdown .ts-dropdown-content {
  --tb-dropdown-scrollbar: var(--dashboard-surface-border);
  padding-block-start: var(--dashboard-gap-200);
}
.context-selector .ts-dropdown .option {
  padding: var(--dashboard-gap-200) var(--dashboard-gap-300);
  border-radius: var(--dashboard-radius-control);
  color: var(--dashboard-text-primary);
}
.context-selector .ts-dropdown .option.active, .context-selector .ts-dropdown .option:hover {
  background: var(--dashboard-control-bg);
  color: var(--dashboard-text-primary);
}

/* While its list is open the control is outlined 1px in the surface border, like the Overview's
   filters (`1660:35338`), and only then: tom-select keeps `.focus` after the list closes, so the
   outline keys on `.dropdown-active`. Bootstrap's 4px `form-select` focus halo and the inset
   shadow tom-select adds to the control are dropped. */
.context-selector {
  /* Keyboard focus alone still shows, as everywhere else on the Overview. */
}
.context-selector > .ts-wrapper.focus {
  box-shadow: none;
}
.context-selector > .ts-wrapper.dropdown-active {
  box-shadow: inset 0 0 0 0.0625rem var(--dashboard-surface-border);
}
.context-selector > .ts-wrapper:has(.ts-control:focus-visible) {
  outline: 0.125rem solid var(--dashboard-brand-orange);
  outline-offset: 0.125rem;
}
.context-selector .ts-control,
.context-selector .ts-wrapper.focus .ts-control {
  box-shadow: none;
}

/* tom-select paints a focus ring on the search input from the wrapper's `.focus` state, one
   class more specific than the rule above. The row's hairline is the only edge it gets. */
.context-selector .plugin-dropdown_input.focus .ts-dropdown .dropdown-input {
  border: 0;
  box-shadow: none;
}

/* The client › store switcher (`context/_switcher.html.twig`). It sits in the header's right-hand
   cluster on desktop, light like the header's other controls, and on its own row of the phone
   header, which is drawn in the sidebar's aubergine. Everything below reads the `--ctx-*` tokens,
   so the two placements differ by those alone. The panel is a DOM child of the switcher, so it
   inherits them although it is `position: fixed`. */
.tb-context {
  --ctx-fg: var(--dashboard-text-primary);
  --ctx-muted: var(--dashboard-text-secondary);
  --ctx-control-bg: var(--dashboard-control-bg);
  --ctx-control-border: transparent;
  --ctx-control-border-hover: var(--tb-border-hover);
  --ctx-rule: var(--dashboard-surface-border);
  --ctx-menu-bg: var(--dashboard-surface-bg);
  --ctx-menu-border: var(--dashboard-surface-border);
  --ctx-menu-shadow: var(--card-shadow);
  --ctx-option-hover: var(--dashboard-control-bg);
  --ctx-option-active: var(--tb-surface-hover);
  --ctx-current: var(--dashboard-brand-orange);
  position: relative;
}

.responsive-context .tb-context {
  --ctx-fg: var(--sidebar-locale-color);
  --ctx-muted: var(--sidebar-collapse-icon-color);
  --ctx-control-bg: var(--sidebar-select-bg);
  --ctx-control-border: var(--ctx-rule);
  --ctx-control-border-hover: var(--sidebar-locale-border-hover);
  --ctx-rule: var(--sidebar-locale-border);
  --ctx-menu-bg: var(--sidebar-locale-menu-bg);
  --ctx-menu-border: var(--ctx-rule);
  --ctx-menu-shadow: var(--sidebar-locale-menu-shadow);
  --ctx-option-hover: var(--sidebar-locale-menu-active);
  --ctx-option-active: var(--sidebar-menu-active-item-bg);
  --ctx-current: var(--sidebar-menu-icon-active-color);
  inline-size: 100%;
}

.responsive-context {
  display: flex;
  flex: 0 0 100%;
  inline-size: 100%;
}
.responsive-context:not(:has(.tb-context)) {
  display: none;
}

.tb-context__trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  inline-size: 100%;
  min-inline-size: var(--app-header-store-w);
  max-inline-size: 22.5rem;
  min-block-size: var(--app-header-control-h);
  padding: 0.25rem 0.75rem;
  border: 0.0625rem solid var(--ctx-control-border);
  border-radius: var(--dashboard-radius-control);
  background: var(--ctx-control-bg);
  color: var(--ctx-fg);
  font-size: 0.875rem;
  text-align: start;
  cursor: pointer;
}
.tb-context__trigger:hover, .tb-context__trigger[aria-expanded=true] {
  border-color: var(--ctx-control-border-hover);
}
.tb-context__trigger:focus-visible {
  outline: 0.125rem solid var(--dashboard-brand-orange);
  outline-offset: 0.125rem;
}

.tb-context__text {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.375rem;
  min-inline-size: 0;
  line-height: 1.4;
}

.tb-context__client,
.tb-context__store {
  min-inline-size: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tb-context__client:has(+ .tb-context__sep) {
  flex: 0 3 auto;
  color: var(--ctx-muted);
}

.tb-context__sep {
  flex: none;
  color: var(--ctx-muted);
  font-size: 0.5625rem;
}

.tb-context__store {
  flex: 0 1 auto;
  font-weight: 500;
}

.tb-context__chevron {
  flex: none;
  margin-inline-start: auto;
  font-size: 0.625rem;
  transition: transform 0.15s ease;
}
[aria-expanded=true] > .tb-context__chevron {
  transform: rotate(180deg);
}

.tb-context.is-loading .tb-context__trigger {
  cursor: progress;
}

/* --- Panel ------------------------------------------------------------- */
.tb-context__menu {
  position: fixed;
  inset-block-start: var(--tb-context-top, 0);
  inset-inline-end: var(--tb-context-right, 0);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  inline-size: min(32.5rem, 100vw - 2rem);
  max-block-size: min(35rem, 100vh - var(--tb-context-top, 0px) - 1rem);
  padding: var(--dashboard-gap-300);
  border: 0.0625rem solid var(--ctx-menu-border);
  border-radius: var(--dashboard-radius-card);
  background: var(--ctx-menu-bg);
  box-shadow: var(--ctx-menu-shadow);
  color: var(--ctx-fg);
}
.tb-context__menu[hidden] {
  display: none;
}
.tb-context__menu:not(:has(.tb-context__pane--stores)), .tb-context__menu:not(:has(.tb-context__pane--clients)) {
  inline-size: min(20rem, 100vw - 2rem);
}

.responsive-context .tb-context__menu {
  position: absolute;
  inset-block-start: calc(100% + 0.375rem);
  inset-inline: 0;
  inline-size: auto;
}

.tb-context__search {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--dashboard-gap-300);
  padding: var(--dashboard-gap-200) var(--dashboard-gap-300) var(--dashboard-gap-300);
  border-block-end: 0.0625rem solid var(--ctx-rule);
  color: var(--ctx-muted);
}

.tb-context__search-input {
  flex: 1;
  min-inline-size: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ctx-fg);
  font-size: 0.875rem;
}
.tb-context__search-input::placeholder {
  color: var(--ctx-muted);
}

.responsive-context .tb-context__search-input::-webkit-search-cancel-button {
  filter: invert(1);
}

.responsive-context .tb-context__search {
  margin-block-end: var(--dashboard-gap-300);
  padding: var(--dashboard-gap-300);
  border: 0.0625rem solid transparent;
  border-radius: var(--dashboard-radius-control);
  background: var(--sidebar-light-bg);
  color: var(--sidebar-locale-color);
}
.responsive-context .tb-context__search:focus-within {
  border-color: var(--sidebar-locale-border-hover);
}
.responsive-context .tb-context__search .tb-context__search-input::placeholder {
  color: var(--sidebar-collapse-icon-color);
}

.tb-context__kbd {
  flex: none;
  padding: 0.0625rem 0.3125rem;
  border: 0.0625rem solid var(--ctx-rule);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--ctx-muted);
  font-family: inherit;
  font-size: 0.6875rem;
  box-shadow: none;
}

.tb-context__panes {
  display: grid;
  flex: 1;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  min-block-size: 0;
}

.tb-context__pane {
  min-block-size: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  --tb-dropdown-scrollbar: var(--ctx-rule);
}
.tb-context__pane::-webkit-scrollbar {
  width: 0.25rem;
}
.tb-context__pane::-webkit-scrollbar-track {
  background: transparent;
}
.tb-context__pane::-webkit-scrollbar-thumb {
  border-radius: 0.125rem;
  background: var(--tb-dropdown-scrollbar, var(--tb-border-hover));
}
@supports not selector(::-webkit-scrollbar) {
  .tb-context__pane {
    scrollbar-width: thin;
    scrollbar-color: var(--tb-dropdown-scrollbar, var(--tb-border-hover)) transparent;
  }
}
.tb-context__pane + .tb-context__pane {
  padding-inline-start: var(--dashboard-gap-300);
  border-inline-start: 0.0625rem solid var(--ctx-rule);
}

.responsive-context .tb-context__pane {
  --tb-dropdown-scrollbar: var(--sidebar-locale-border-hover);
}
.responsive-context .tb-context__pane::-webkit-scrollbar {
  width: 0.375rem;
}
.responsive-context .tb-context__pane::-webkit-scrollbar-thumb {
  border-radius: 0.1875rem;
}

.tb-context__heading {
  margin: 0;
  padding: var(--dashboard-gap-300) var(--dashboard-gap-300) var(--dashboard-gap-200);
  color: var(--ctx-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.tb-context__pane > .tb-context__heading {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  background: var(--ctx-menu-bg);
  box-shadow: 0 0.0625rem 0 transparent;
}
@supports (animation-timeline: scroll()) {
  .tb-context__pane > .tb-context__heading {
    animation: tb-context-heading-rule linear both;
    animation-range: 0 0.5rem;
    animation-timeline: scroll(nearest block);
  }
}

@keyframes tb-context-heading-rule {
  to {
    box-shadow: 0 0.0625rem 0 var(--ctx-rule);
  }
}
.tb-context__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tb-context__option {
  display: flex;
  align-items: center;
  gap: var(--dashboard-gap-300);
  inline-size: 100%;
  padding: 0.375rem var(--dashboard-gap-300);
  border: 0;
  border-radius: var(--dashboard-radius-control);
  background: transparent;
  color: inherit;
  font-size: 0.875rem;
  text-align: start;
  cursor: pointer;
}
.tb-context__option:hover, .tb-context__option:focus-visible {
  background: var(--ctx-option-hover);
}
.tb-context__option:focus-visible {
  outline: 0.0625rem solid var(--ctx-control-border-hover);
  outline-offset: -0.0625rem;
}
.tb-context__option.is-active {
  background: var(--ctx-option-active);
}
.tb-context__option[aria-current=true] {
  font-weight: 600;
}
.tb-context__option.is-pending::after {
  content: "";
  flex: none;
  inline-size: 0.75rem;
  block-size: 0.75rem;
  margin-inline-start: auto;
  border: solid 0.125rem var(--ctx-rule);
  border-block-start-color: currentcolor;
  border-radius: 50%;
  animation: tb-context-spin 0.6s linear infinite;
}

.tb-context__name {
  flex: 1;
  min-inline-size: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tb-context__code {
  color: var(--ctx-muted);
}

.tb-context__owner {
  display: none;
  flex: none;
  max-inline-size: 45%;
  overflow: hidden;
  color: var(--ctx-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tb-context__owner::after {
  content: " ›";
}
.is-searching .tb-context__owner {
  display: inline;
}

.tb-context__next {
  flex: none;
  margin-inline-start: auto;
  color: var(--ctx-muted);
  font-size: 0.625rem;
}

.tb-context__back {
  display: none;
  align-items: center;
  gap: var(--dashboard-gap-300);
  padding: var(--dashboard-gap-300);
  border: 0;
  background: transparent;
  color: var(--ctx-fg);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.tb-context__empty {
  margin: 0;
  padding: var(--dashboard-gap-500) var(--dashboard-gap-300);
  color: var(--ctx-muted);
  font-size: 0.875rem;
}

.tb-context__menu.is-searching:has(.tb-context__pane--stores) .tb-context__pane--clients {
  display: none;
}

.tb-context__menu.is-searching .tb-context__pane + .tb-context__pane {
  padding-inline-start: 0;
  border-inline-start: 0;
}

/* --- Phone header: one column at a time, clients or a client's stores --- */
@media (max-width: 991.98px) {
  .tb-context__menu {
    inset-inline: var(--dashboard-gap-300);
    inline-size: auto;
    max-block-size: calc(100dvh - var(--tb-context-top, 0px) - 1rem);
  }
  .tb-context__menu:not(:has(.tb-context__pane--stores)) {
    inline-size: auto;
  }
  .tb-context__menu[data-level=stores] .tb-context__pane--clients, .tb-context__menu[data-level=clients] .tb-context__pane--stores {
    display: none;
  }
  .tb-context__menu[data-level=stores]:not(.is-searching) .tb-context__back {
    display: flex;
  }
  .tb-context__menu.is-searching .tb-context__pane--stores {
    display: block;
  }
  .tb-context__pane + .tb-context__pane {
    padding-inline-start: 0;
    border-inline-start: 0;
  }
  .tb-context__trigger {
    max-inline-size: none;
    min-block-size: 2.5rem;
  }
  .tb-context__kbd {
    display: none;
  }
}
.tb-context-toast__reload {
  flex: none;
  margin-inline-start: auto;
  padding: 0.25rem 0.625rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.5);
  border-radius: var(--dashboard-radius-control);
  background: transparent;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
}
.tb-context-toast__reload + .tb-toast__close {
  margin-inline-start: 0;
}

@keyframes tb-context-spin {
  to {
    transform: rotate(1turn);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tb-context__chevron {
    transition: none;
  }
}
/* Bootstrap/EasyAdmin tables take the Control Center table's reading: an uppercase hairline
   header, `--tb-rule` row hairlines, slate figures, the row lit on hover. The values mirror
   `.tb-table` in `_tb-page.scss` — change the two together. */
.table {
  --bs-table-bg: #fff;
  --bs-table-hover-bg: var(--tb-row-hover);
  --bs-table-hover-color: var(--bs-emphasis-color);
  --bs-table-striped-color: initial;
}
.table > tbody > tr.table-group-divider {
  border-top-color: var(--table-divider-border-color);
}
.table > tbody > tr > td {
  --bs-table-color-type: var(--bs-table-color);
}
.table thead th {
  padding: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111729;
  border-bottom: 0.0625rem solid var(--tb-rule-strong);
}
.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  color: var(--tb-slate);
  border-top: 0.0625rem solid var(--tb-rule);
}

/* Clip the card so an edge-to-edge table follows the card's rounded corners. */
.card:has(table) {
  overflow: hidden;
}

/* ============================================================
 * Embed section: the mapper launcher, the configuration editor, the install
 * screen, the config-health report and the internal fleet view.
 *
 * These follow the CONTROL CENTER design system, not the older card tokens:
 * an 8px radius, a `--dashboard-surface-border` hairline and no shadow. An
 * operator reads the Overview and these screens in one sitting, and a 16px
 * shadowed card beside an 8px flat one reads as two different kinds of thing.
 *
 * Almost nothing here holds a literal. Surfaces, radii, gaps, text tones,
 * success and danger all come from `--dashboard-*`; only the warning and muted
 * tones and the destructive control live in `--embed-*`, because the Overview
 * has no equivalent. See `_variables.scss`.
 * ============================================================ */
/* --- These screens sit on white — the console default (`--body-bg`) ------------------------- */
/* --- The page surface -------------------------------------------------------
   Replaces the Bootstrap `card card-body` these screens used to carry. That
   pairing brought EasyAdmin's 16px radius and drop shadow with it, which is the
   CRUD look rather than this one. */
.tb-embed__panel {
  padding: var(--dashboard-gap-600);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
}
.tb-embed__panel + .tb-embed__panel {
  margin-block-start: var(--dashboard-gap-500);
}

.tb-embed__diff {
  table-layout: fixed;
  width: 100%;
}
.tb-embed__diff th:first-child,
.tb-embed__diff td:first-child {
  width: 28%;
}
.tb-embed__diff td {
  vertical-align: top;
}
.tb-embed__diff code,
.tb-embed__diff pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tb-embed__panel-title {
  margin: 0 0 var(--dashboard-gap-400);
  font-family: var(--heading-font-family);
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--dashboard-text-primary);
}

/* The screens carry their secondary copy on Bootstrap's `.text-muted`, which resolves to the
   framework's grey rather than to this design system's. Re-pointing it inside the panel keeps
   the templates on the utility they already use instead of re-classing a dozen paragraphs. */
.tb-embed__panel .text-muted {
  color: var(--dashboard-text-secondary) !important;
}

/* --- Status pill, by severity ----------------------------------------------
   Four tones, because a check answers ok / warning / critical / not-applicable
   and collapsing the last two would report an unconfigured module as broken. */
.tb-embed__status {
  display: inline-flex;
  align-items: center;
  gap: var(--dashboard-gap-200);
  padding: 0.25rem var(--dashboard-gap-300);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.tb-embed__status::before {
  content: "";
  inline-size: 0.4375rem;
  block-size: 0.4375rem;
  border-radius: 50%;
  background: currentColor;
}
.tb-embed__status.is-ok {
  background-color: var(--dashboard-success-bg);
  color: var(--dashboard-success-text);
}
.tb-embed__status.is-warning {
  background-color: var(--embed-warning-bg);
  color: var(--embed-warning-text);
}
.tb-embed__status.is-critical {
  background-color: var(--dashboard-danger-bg);
  color: var(--dashboard-danger-text);
}
.tb-embed__status.is-muted {
  background-color: var(--embed-muted-bg);
  color: var(--embed-muted-text);
}

/* --- Summary tiles, used by health and the fleet view --- */
.tb-embed__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.25rem, 1fr));
  gap: var(--dashboard-gap-500);
}

.tb-embed__tile {
  padding: var(--dashboard-gap-500);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
  /* The border carries the severity. A tinted FILL would put a third background
     behind text that already sits on a tinted pill, and the tile is a count, not
     a verdict. */
}
.tb-embed__tile.is-critical {
  border-color: var(--dashboard-danger-text);
}
.tb-embed__tile.is-warning {
  border-color: var(--embed-warning-text);
}

.tb-embed__tile-label {
  margin-block-end: var(--dashboard-gap-200);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dashboard-text-secondary);
}

.tb-embed__tile-value {
  font-family: var(--heading-font-family);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--dashboard-text-primary);
}

.tb-embed__tile-hint {
  margin-block-start: 0.125rem;
  font-size: 0.75rem;
  color: var(--dashboard-text-secondary);
}

/* --- Health check rows --- */
.tb-embed__check {
  display: flex;
  align-items: flex-start;
  gap: var(--dashboard-gap-500);
  padding: var(--dashboard-gap-500) 0;
  border-block-end: 0.0625rem solid var(--dashboard-table-rule);
}
.tb-embed__check:first-child {
  padding-block-start: 0;
}
.tb-embed__check:last-child {
  padding-block-end: 0;
  border-block-end: none;
}

.tb-embed__check-key {
  min-inline-size: 11.875rem;
  font-family: var(--bs-font-monospace);
  font-size: 0.8125rem;
  color: var(--dashboard-text-primary);
}

.tb-embed__check-detail {
  color: var(--dashboard-text-secondary);
  line-height: 1.5;
}

/* The admin theme ships no `.btn-sm` sizing, so a small button kept the theme's near-zero
   padding and its label touched the border (Packs, Versions). Pinned for the embed pages only;
   the revoke button below sets its own. */
.tb-embed-page .btn-sm {
  padding: 0.375rem var(--dashboard-gap-400);
  line-height: 1.3;
}

/* --- A named row: a storefront on the launcher. --- */
.tb-embed__store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dashboard-gap-600);
  padding: var(--dashboard-gap-500) 0;
  border-block-end: 0.0625rem solid var(--dashboard-table-rule);
}
.tb-embed__store:first-child {
  padding-block-start: 0;
}
.tb-embed__store:last-child {
  padding-block-end: 0;
  border-block-end: none;
}

.tb-embed__store-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--dashboard-text-primary);
}

.tb-embed__store-url {
  font-family: var(--bs-font-monospace);
  font-size: 0.75rem;
  color: var(--dashboard-text-secondary);
  word-break: break-all;
}

/* --- The live-grants table on the launcher ---------------------------------
   The revoke control has to read as a DELETE: it ends someone's mapper session
   mid-edit and cannot be undone.

   Bootstrap's `.btn-danger` alone does not get there. The admin theme paints a
   danger button from `--button-danger-*`, and its default is a WHITE GRADIENT
   (`linear-gradient(180deg, #fff, #f6f8fa)` — the GitHub style, white button
   with red text) applied as a background-IMAGE. A plain `background-color`
   therefore lost: the colour was correct underneath and the gradient painted
   straight over it, so the button read white until hover, when the theme swapped
   in a solid fill and the red finally appeared.

   Setting the theme's own variables goes THROUGH its painting instead of
   fighting it; `background-image: none` disposes of the gradient for good. */
.tb-embed__grants .btn-danger {
  --button-danger-bg: var(--embed-destructive);
  --button-danger-color: #fff;
  --button-danger-border-color: var(--embed-destructive);
  --button-danger-hover-bg: #fff;
  --button-danger-hover-color: var(--embed-destructive);
  --button-danger-hover-border-color: var(--embed-destructive);
  --button-danger-active-bg: var(--embed-destructive-active);
  --button-danger-active-color: #fff;
  --button-danger-active-border-color: var(--embed-destructive-active);
  /* The theme ships no `.btn-sm`, so the padding is pinned here rather than by
     adding a global size variant that would change every existing page. */
  display: inline-flex;
  align-items: center;
  gap: var(--dashboard-gap-200);
  padding: 0.375rem var(--dashboard-gap-400);
  line-height: 1.3;
  color: #fff;
  background-color: var(--embed-destructive);
  background-image: none;
  border-color: var(--embed-destructive);
  border-radius: var(--dashboard-radius-control);
  /* Inverted, with the border keeping the shape so the button does not appear
     to shrink under the pointer. */
}
.tb-embed__grants .btn-danger:hover, .tb-embed__grants .btn-danger:focus-visible {
  color: var(--embed-destructive);
  background-color: #fff;
  background-image: none;
  border-color: var(--embed-destructive);
}
.tb-embed__grants .btn-danger:active {
  color: #fff;
  background-color: var(--embed-destructive-active);
  background-image: none;
  border-color: var(--embed-destructive-active);
}

/* --- The numbered "how this works" strip on the launcher --- */
.tb-embed__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
  gap: var(--dashboard-gap-600);
  counter-reset: embed-step;
}

.tb-embed__step {
  counter-increment: embed-step;
  position: relative;
  padding-inline-start: 2.375rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--dashboard-text-secondary);
  /* The step number is the one branded mark on these screens. `--dashboard-brand`
     is deliberately NOT used: it is byte-identical to the Native chart series,
     so anything that is not a series must stay off it. */
}
.tb-embed__step::before {
  content: counter(embed-step);
  position: absolute;
  inset-block-start: -0.125rem;
  inset-inline-start: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 1.625rem;
  block-size: 1.625rem;
  border-radius: 50%;
  background: var(--dashboard-brand-lightest);
  color: var(--dashboard-brand-orange);
  font-weight: 600;
  font-size: 0.8125rem;
}
.tb-embed__step strong {
  display: block;
  color: var(--dashboard-text-primary);
}

/* --- One save for the whole document ----------------------------------------
   Pinned to the bottom of the viewport: the tabs are deep, and a button at the
   end of the last one is a button nobody finds from the first. */
.tb-embed__savebar {
  position: sticky;
  bottom: 0;
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dashboard-gap-500);
  margin-block-start: var(--dashboard-gap-300);
  padding: var(--dashboard-gap-400) var(--dashboard-gap-600);
  background: var(--dashboard-surface-bg);
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-card);
}
.tb-embed__savebar .btn {
  padding: var(--dashboard-gap-300) 1.125rem;
  line-height: 1.3;
}

.tb-embed__savebar-hint {
  font-size: 0.75rem;
  color: var(--dashboard-text-secondary);
}

/* --- Configuration editor --- */
.tb-embed__config {
  display: grid;
  grid-template-columns: 13.75rem minmax(0, 1fr);
  gap: var(--dashboard-gap-600);
  /* Vertical tab rail: the document has six groups, and a horizontal strip of
     them wraps into an unreadable second row on a laptop. */
}
@media (max-width: 991.98px) {
  .tb-embed__config {
    grid-template-columns: minmax(0, 1fr);
  }
}
.tb-embed__config .nav-pills {
  --bs-nav-pills-link-active-bg: var(--dashboard-text-primary);
  align-self: start;
  position: sticky;
  top: var(--dashboard-gap-500);
}
.tb-embed__config .nav-pills .nav-link {
  text-align: left;
  color: var(--dashboard-text-secondary);
  border-radius: var(--dashboard-radius-card);
}

.tb-embed__tab-count {
  float: right;
  font-size: 0.75rem;
  color: var(--dashboard-text-secondary);
}
.active .tb-embed__tab-count {
  color: rgba(255, 255, 255, 0.7);
}

.tb-embed__property {
  padding: var(--dashboard-gap-600) 0;
  border-block-end: 0.0625rem solid var(--dashboard-table-rule);
  /* The value is JSON and is read far more often than it is typed: monospace,
     and tall enough that a `stage` or an `eventMap` rule does not need scrolling
     to be understood. */
}
.tb-embed__property:first-child {
  padding-block-start: 0;
}
.tb-embed__property:last-child {
  padding-block-end: 0;
  border-block-end: none;
}
.tb-embed__property textarea {
  font-family: var(--bs-font-monospace);
  font-size: 0.78125rem;
  line-height: 1.55;
  background: var(--dashboard-control-bg);
  border-radius: var(--dashboard-radius-control);
}
.tb-embed__property.is-computed .tb-embed__property-value {
  padding: var(--dashboard-gap-300) var(--dashboard-gap-400);
  font-family: var(--bs-font-monospace);
  font-size: 0.8125rem;
  background: var(--dashboard-control-bg);
  border-radius: var(--dashboard-radius-control);
  color: var(--dashboard-text-secondary);
}

.tb-embed__property-name {
  font-family: var(--bs-font-monospace);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--dashboard-text-primary);
}

.tb-embed__property-hint {
  margin-block-start: 0.125rem;
  font-size: 0.75rem;
  color: var(--dashboard-text-secondary);
}

/* --- The install snippet ----------------------------------------------------
   It exists to be selected and copied, so it must not wrap mid-attribute and
   must read as code rather than as prose.

   This block previously referenced `--tb-radius-sm`, `--tb-surface-sunken` and
   `--tb-border`, none of which are defined anywhere in the stylesheet — it had
   been rendering on the hardcoded fallbacks beside them since the day it landed. */
.tb-embed__snippet {
  margin: 0;
  padding: var(--dashboard-gap-400) 0.875rem;
  background: var(--dashboard-control-bg);
  border: 0.0625rem solid var(--dashboard-surface-border);
  border-radius: var(--dashboard-radius-control);
  overflow-x: auto;
  user-select: all;
}
.tb-embed__snippet code {
  white-space: pre;
  font-size: 0.8125rem;
}

/* --- List page (`tb-crud`, like the announcement schedules list) ------------ */
.tb-ci-filters {
  display: contents;
}

.tb-page .tb-ci-add a.tb-choice {
  color: var(--tb-ink);
  text-decoration: none;
}

/* Preview modal, a native <dialog> in the top layer: the store's checkout draws the intervention in the frame. */
.tb-dialog--preview {
  min-width: 0;
  max-width: min(70rem, 100% - 3rem);
  max-height: calc(100% - 3rem);
  overflow: auto;
  border: 0;
}
.tb-dialog--preview:not([open]) {
  display: none;
}
.tb-dialog--preview::backdrop {
  background: rgba(18, 24, 38, 0.42);
}

.tb-ci-preview__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.tb-ci-preview__head .tb-dialog__title {
  margin-right: auto;
}

.tb-ci-preview__stage {
  display: flex;
  min-width: 0;
  justify-content: center;
  justify-content: safe center;
  overflow-x: auto;
  padding: 1rem;
  border-radius: var(--tb-radius);
  background: var(--tb-surface);
}

.tb-ci-preview__frame {
  display: block;
  flex: none;
  max-width: none;
  border: 0;
  background: #fff;
  transition: width 0.2s ease;
}
.tb-ci-preview__frame.is-pending {
  visibility: hidden;
}

/* --- Form page (`tb-crud`, like the announcement schedule form) ------------ */
.tb-ci-pane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tb-ci-items {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.tb-ci-items > .ci-collection-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: stretch;
}
.tb-ci-items > .ci-collection-wrapper:empty {
  display: none;
}

.tb-ci-item {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: 1.25rem;
  border-radius: var(--tb-radius-lg);
  background: var(--tb-surface);
}
.tb-ci-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.875rem;
  color: var(--tb-slate);
}
.tb-ci-item .ci-item-fields {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}
.tb-ci-item .tb-field .form-control,
.tb-ci-item .tb-field .form-select {
  border-color: #fff;
}

.tb-tab.has-error .ci-lang-dot,
.tb-tab.has-error .ci-lang-dot.is-filled {
  background: var(--tb-danger);
}

.tb-ci-times {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ci-lang-dot {
  display: inline-block;
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background: var(--bs-secondary-color, #adb5bd);
}
.ci-lang-dot.is-filled {
  background: var(--bs-success, #2fb344);
}

.rule-builder {
  padding: 1rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-lg);
}
.rule-builder.is-invalid {
  border-color: var(--tb-danger);
}
.rule-builder .rule-builder-group {
  margin-bottom: 0.5rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  background-color: #fff;
}
.rule-builder .rule-builder-group-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.rule-builder .rule-builder-spacer {
  flex: 1 1 auto;
}
.rule-builder .rule-builder-logical-label {
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
}
.rule-builder .rule-builder-logical {
  width: auto;
  min-width: 4.75rem;
  flex: 0 0 auto;
  font-weight: 600;
}
.rule-builder .rule-builder-condition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.rule-builder .rule-builder-attribute,
.rule-builder .rule-builder-operator {
  width: auto;
  flex: 0 1 auto;
}
.rule-builder .rule-builder-value {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 0 1 auto;
  min-width: 0;
}
.rule-builder .rule-builder-number {
  width: 6rem;
}
.rule-builder .rule-builder-value input[type=text],
.rule-builder .rule-builder-value textarea {
  width: 16.25rem;
  resize: vertical;
}
.rule-builder .rule-builder-bool {
  width: auto;
  flex: 0 1 auto;
}
.rule-builder .rule-builder-between {
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.rule-builder .rule-builder-multi {
  min-height: 4rem;
}
.rule-builder .rule-builder-remove {
  flex: 0 0 auto;
}
.rule-builder .rule-builder-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.rule-builder .rule-builder-add {
  padding: 0;
  font-weight: 600;
  text-decoration: none;
}

.tb-table--dim-inactive tr.tb-row-inactive {
  --bs-table-bg: #ebeaee;
  --bs-table-color: #a3a8ae;
  --bs-table-hover-color: #a3a8ae;
}
.tb-table--dim-inactive tr.tb-row-inactive > td:not(:last-child).text-secondary {
  --text-secondary-color: #b9bdc3;
}
.tb-table--dim-inactive tr.tb-row-inactive > td:not(:last-child) a,
.tb-table--dim-inactive tr.tb-row-inactive > td:not(:last-child) .badge,
.tb-table--dim-inactive tr.tb-row-inactive > td:not(:last-child) .tb-badge,
.tb-table--dim-inactive tr.tb-row-inactive > td:not(:last-child) .text-secondary,
.tb-table--dim-inactive tr.tb-row-inactive > td:not(:last-child) .text-muted,
.tb-table--dim-inactive tr.tb-row-inactive > td:not(:last-child) .tb-muted {
  opacity: 0.6;
}

.tb-table.tb-table--dim-inactive tr.tb-row-inactive > td {
  background: #ebeaee;
  color: #a3a8ae;
}

.table tr.tb-row-highlight,
.tb-table tr.tb-row-highlight {
  --bs-table-bg: var(--tb-coral-50);
  --bs-table-hover-bg: transparent;
  scroll-margin-top: 6rem;
}
.table tr.tb-row-highlight > td:first-child,
.tb-table tr.tb-row-highlight > td:first-child {
  box-shadow: inset 3px 0 0 var(--tb-coral-500);
}

.tb-table tr.tb-row-highlight > td {
  background: var(--tb-coral-50);
}

.abt-results-table-wrapper {
  --bs-border-color: #dfdfdf;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--card-border-radius);
}
.abt-results-table-wrapper table thead th {
  padding: 0.5rem 1.25rem;
  color: var(--bs-table-color);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
}

.abt-results-table-wrapper table tbody tr:first-of-type {
  --bs-table-bg: #f4f3f5;
}
.abt-results-table-wrapper table th:first-child,
.abt-results-table-wrapper table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: var(--bs-table-bg, #fff);
}
.abt-results-table-wrapper table th:first-child::after,
.abt-results-table-wrapper table td:first-child::after {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 100%;
  width: 0.5rem;
  pointer-events: none;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.15s ease-out;
}
.abt-results-table-wrapper table thead th:first-child {
  background-color: var(--bs-table-bg, #fff);
}
.abt-results-table-wrapper.is-scrolled th:first-child::after, .abt-results-table-wrapper.is-scrolled td:first-child::after {
  opacity: 1;
}

.abt-results-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.abt-results-cards .abt-results-card {
  padding: 1rem 1.25rem;
}
.abt-results-cards .abt-results-card:first-of-type {
  background-color: transparent;
  --bs-border-color: #ccc;
  border-color: var(--bs-border-color);
}
.abt-results-cards .abt-results-card > * + * {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 0.0625rem dotted var(--bs-border-color);
}
.abt-results-cards .abt-results-card .abt-results-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.abt-results-cards .abt-results-card .abt-results-card-note {
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
  text-align: right;
}
.abt-results-cards .abt-results-card .abt-results-card-more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
}
.abt-results-cards .abt-results-card .abt-results-card-more > summary::-webkit-details-marker {
  display: none;
}
.abt-results-cards .abt-results-card .abt-results-card-more .abt-results-card-more-icon {
  color: var(--bs-secondary-color);
  transition: transform 0.2s ease;
}
.abt-results-cards .abt-results-card .abt-results-card-more[open] > summary .abt-results-card-more-icon {
  transform: rotate(180deg);
}
.abt-results-cards .abt-results-card .abt-results-card-more > ul.abt-alloc-mixed-labels,
.abt-results-cards .abt-results-card .abt-results-card-more > .abt-results-card-metrics {
  margin-top: 0.75rem;
}
.abt-results-cards .abt-results-card .abt-results-card-metrics {
  margin: 0;
}
.abt-results-cards .abt-results-card .abt-results-card-metrics dt {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.abt-results-cards .abt-results-card .abt-results-card-metrics dd {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0;
  text-align: right;
}
.abt-results-cards .abt-results-card .abt-results-card-metrics .abt-results-card-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.abt-results-cards .abt-results-card .abt-results-card-metrics .abt-results-card-metric + .abt-results-card-metric {
  margin-top: 0.625rem;
}
.abt-results-cards .abt-results-card .abt-results-card-metrics .abt-lift {
  margin-top: 0;
}

.abt-lift {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.125rem;
}
.abt-lift .abt-lift-label {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}
.abt-lift .badge.abt-lift-badge {
  margin: 0;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.abt-lift .badge.abt-lift-badge.is-up {
  background-color: #e9f6ec;
  color: #2e7d4f;
}
.abt-lift .badge.abt-lift-badge.is-down {
  background-color: #fdf0e3;
  color: #a2661f;
}

.abt-alloc-bar {
  position: relative;
  display: flex;
  height: 3rem;
  overflow: hidden;
  user-select: none;
}

.abt-alloc-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.abt-alloc-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.875rem;
  transform: translateX(-50%);
  cursor: col-resize;
  pointer-events: auto;
  touch-action: none;
}
.abt-alloc-handle::after {
  content: "";
  position: absolute;
  top: 25%;
  bottom: 25%;
  left: 50%;
  width: 0.25rem;
  transform: translateX(-50%);
  border-radius: 0.125rem;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border-color);
}

.abt-alloc-seg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 0.375rem;
}
.abt-alloc-seg > span {
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.25rem;
}
.abt-alloc-seg:not(:last-child) {
  border-right: 2px dotted #fff;
}
.abt-alloc-seg.abt-alloc-control {
  background-color: #f0edf3;
  background-image: repeating-linear-gradient(135deg, rgba(201, 193, 214, 0.5) 0 1px, transparent 1px 12px);
}
.abt-alloc-seg.abt-alloc-mixed {
  background: #ffad9b;
}
.abt-alloc-seg.abt-alloc-isolated {
  background: #dfc4f6;
}

.abt-alloc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.badge.abt-alloc-control {
  font-size: 0.875rem;
  padding: 2px 10px 1px;
  margin: 0;
  background-color: #f0edf3;
  background-image: repeating-linear-gradient(135deg, rgba(201, 193, 214, 0.5) 0 1px, transparent 1px 6px);
  border: 1px solid #c9c1d6;
}

.badge.abt-alloc-mixed {
  font-size: 0.875rem;
  padding: 2px 10px 1px;
  margin: 0;
  background: #ffad9b;
}

.badge.abt-alloc-isolated {
  font-size: 0.875rem;
  padding: 2px 10px 1px;
  margin: 0;
  background: #dfc4f6;
}

.abt-audience-locked {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0.55;
  pointer-events: none;
}

.abt-add-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--tb-radius-sm);
  background: transparent;
  color: var(--tb-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.abt-add-item:hover:not(.is-disabled) {
  background: var(--tb-surface);
  color: var(--tb-ink);
  text-decoration: none;
}
.abt-add-item:focus-visible {
  outline: 2px solid var(--tb-focus);
  outline-offset: -2px;
}
.abt-add-item.is-disabled {
  color: var(--tb-slate);
  opacity: 0.6;
  cursor: not-allowed;
}
.abt-add-item small {
  color: var(--tb-slate);
  font-size: 0.75rem;
}

.abt-cond-pill {
  display: inline-block;
  padding: 1px 8px;
  border: 1px dashed var(--tb-border-hover);
  border-radius: 999px;
  color: var(--tb-slate);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.abt-cond-pill + .abt-cond-pill {
  margin-left: 4px;
}

.abt-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--tb-border);
  border-radius: 6px;
  background: transparent;
  color: var(--tb-slate);
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
}
.abt-icon-btn i {
  font-size: 0.8rem;
}
.abt-icon-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}
.abt-icon-btn:hover {
  background: var(--tb-surface-hover);
  border-color: var(--tb-border-hover);
  color: var(--tb-ink);
}
.abt-icon-btn:focus-visible {
  outline: 2px solid var(--tb-focus);
  outline-offset: 2px;
}
.abt-icon-btn--pause:hover {
  background: var(--tb-danger-bg);
  border-color: var(--tb-danger);
  color: var(--tb-danger);
}

.abt-builder-tabs {
  --bs-nav-tabs-link-active-bg: #fff;
  --bs-nav-link-color: var(--text-secondary-color);
  --bs-nav-link-hover-color: var(--bs-nav-tabs-link-active-color);
  align-items: flex-end;
  gap: 0.25rem;
}
.abt-builder-tabs .nav-link {
  background-color: #fff;
}
.abt-builder-tabs .nav-link:not(.active) {
  font-size: 0.85em;
}

.abt-builder-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.abt-builder-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.abt-builder-name > label {
  white-space: nowrap;
}
.abt-builder-name > .form-control {
  max-width: 25rem;
}

.abt-builder-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary-color);
}
.abt-builder-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.abt-builder-sw {
  inline-size: 0.6875rem;
  block-size: 0.6875rem;
  border: 1px solid var(--border-color);
  border-radius: 0.1875rem;
}
.abt-builder-sw.is-control {
  background: #f0edf3;
  border-color: #c9c1d6;
}
.abt-builder-sw.is-mixed {
  background: #ffad9b;
}
.abt-builder-sw.is-isolated {
  background: #dfc4f6;
}

.abt-builder-slots {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.abt-builder-slot {
  display: grid;
  grid-template-columns: 7rem 6rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.4375rem;
  background: #fff;
}
.abt-builder-slot > .badge {
  justify-self: start;
}
@media (max-width: 575.98px) {
  .abt-builder-slot {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
  .abt-builder-slot > .abt-builder-chips,
  .abt-builder-slot > .abt-builder-note {
    grid-column: 1/-1;
  }
  .abt-builder-slot > .abt-builder-row-remove {
    grid-row: 1;
    grid-column: 3;
    justify-self: end;
  }
}

.abt-builder-row-remove {
  padding: 0 0.25rem;
  border: 0;
  background: none;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-secondary-color);
  cursor: pointer;
}
.abt-builder-row-remove:hover {
  color: var(--embed-destructive);
}

.abt-builder-pct {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--bs-font-monospace);
  font-size: 0.85rem;
  font-weight: 600;
}
.abt-builder-pct input {
  inline-size: 4rem;
  text-align: right;
  font-family: inherit;
  font-weight: inherit;
}
.abt-builder-pct.is-readonly > span:first-child {
  min-inline-size: 4rem;
  padding: 0.1875rem 1.25rem 0.1875rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.3125rem;
  text-align: right;
}

.abt-builder-note {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-secondary-color);
}

.abt-builder-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.abt-builder-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1875rem 0.5625rem;
  border: 1px solid var(--border-color);
  border-radius: 0.3125rem;
  background: var(--body-bg);
  font-size: 0.8rem;
  white-space: nowrap;
}

.abt-builder-chip-remove {
  padding: 0;
  border: 0;
  background: none;
  line-height: 1;
  color: var(--text-secondary-color);
  cursor: pointer;
}
.abt-builder-chip-remove:hover {
  color: var(--embed-destructive);
}

.abt-builder-chip-add {
  max-inline-size: 17.5rem;
  padding: 0.1875rem 0.5625rem;
  border: 1px dashed #c9c1d6;
  border-radius: 0.3125rem;
  background: transparent;
  font-size: 0.8rem;
  color: var(--text-secondary-color);
  cursor: pointer;
  appearance: none;
}

.abt-builder-addslot {
  padding: 0.125rem 0.75rem 0;
}

.abt-builder-fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 0.4375rem;
  background: #fff;
}

.abt-builder-fieldset-legend {
  font-family: var(--bs-font-monospace);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary-color);
}

.abt-breakdown-card {
  border-color: #ccc;
  background-color: transparent;
  box-shadow: none;
}

ul.abt-alloc-mixed-labels {
  margin: 0;
}
ul.abt-alloc-mixed-labels li::marker {
  color: #ffad9b;
  font-size: 1.25rem;
}

.abt-results-test {
  display: flex;
  margin-bottom: var(--dashboard-gap-500);
}
.abt-results-test .tb-filter {
  flex: 0 1 22.5rem;
}

.abt-stop-btn {
  --button-danger-bg: var(--tb-danger);
  --button-danger-color: #fff;
  --button-danger-border-color: var(--tb-danger);
  --button-danger-hover-bg: var(--tb-danger);
  --button-danger-hover-color: #fff;
  --button-danger-hover-border-color: var(--tb-danger);
  background-image: none;
}

.tb-table--dim-inactive tr.tb-row-inactive > td:not(:last-child) .abt-cond-pill {
  opacity: 0.6;
}

.cursor-pointer {
  cursor: pointer;
}

/* Lets a flex child shrink below its content's width, so a long store name or URL truncates
   or wraps inside its card instead of widening the row (embed launch). */
.min-w-0 {
  min-width: 0;
}

/* PPFraktionSans */
@font-face {
  font-family: "PPFraktionSans";
  src: url("../fonts/PPFraktionSans-Regular-mrCGj5X.woff2") format("woff2"), url("../fonts/PPFraktionSans-Regular-jdAHGDG.woff") format("woff"), url("../fonts/PPFraktionSans-Regular-BotzsWm.ttf") format("truetype"), url("../fonts/PPFraktionSans-Regular-xanzJAS.otf") format("opentype"), url("../fonts/PPFraktionSans-Regular-a45ckyQ.eot") format("embedded-opentype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "PPFraktionSans";
  src: url("../fonts/PPFraktionSans-Medium-mDLb4Uw.woff2") format("woff2"), url("../fonts/PPFraktionSans-Medium-Ux1lij_.woff") format("woff"), url("../fonts/PPFraktionSans-Medium-c7zWnlf.ttf") format("truetype"), url("../fonts/PPFraktionSans-Medium-i6TIFyf.otf") format("opentype"), url("../fonts/PPFraktionSans-Medium-UgMb9s9.eot") format("embedded-opentype");
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "PPFraktionSans";
  src: url("../fonts/PPFraktionSans-Bold-enYtWdR.woff2") format("woff2"), url("../fonts/PPFraktionSans-Bold-zMimhOR.woff") format("woff"), url("../fonts/PPFraktionSans-Bold-3zV5lWx.ttf") format("truetype"), url("../fonts/PPFraktionSans-Bold-0UEdAVq.otf") format("opentype"), url("../fonts/PPFraktionSans-Bold-m-I32Ls.eot") format("embedded-opentype");
  font-weight: 700;
  font-style: normal;
}
/* PPNeueMontreal */
@font-face {
  font-family: "PPNeueMontreal";
  src: url("../fonts/PPNeueMontreal-Regular-JcJbhxd.woff2") format("woff2"), url("../fonts/PPNeueMontreal-Regular-yS7ZVlJ.woff") format("woff"), url("../fonts/PPNeueMontreal-Regular-BtGdIyp.ttf") format("truetype"), url("../fonts/PPNeueMontreal-Regular-MeNRIbw.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}
body {
  font-family: var(--body-font-family);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading-font-family);
}

input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  background-color: #ffeacb !important;
  color: #000 !important;
  box-shadow: 0 0 0 1000px #ffeacb inset !important;
  -webkit-text-fill-color: #000 !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ============================================================
 * App entrypoint — the merchant and internal consoles (not login).
 *
 * `global` brings tokens, components and utilities, shared with login. What follows styles the
 * chrome only the consoles have, in four sections:
 *   1. App header
 *   2. Responsive header
 *   3. Layout tweaks
 *   4. Slide-from-right modal
 * ============================================================ */
.layout-top-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Row 1: the title (or, on a form page, the back link) and the search box. */
@media (min-width: 992px) {
  .content-top {
    gap: 0.75rem;
    block-size: auto;
    /* The frame pads 24px top and bottom. The previous 32/16 split sat the title lower than the
       design and left the row beneath it tight. */
    padding-top: var(--app-header-padding-block);
    padding-bottom: var(--app-header-padding-block);
    box-shadow: none;
  }
}
.content-top .title {
  margin: 0.5rem 0;
  font-size: 1.5rem;
  color: var(--app-header-title-color);
  line-height: 1.2;
}
@media (min-width: 992px) {
  .content-top .title {
    margin: 0;
    font-size: var(--app-header-title-size);
  }
}
.content-top .content-search {
  flex: initial;
  margin-left: auto;
}
.content-top .content-search .form-widget {
  display: inline-flex;
  min-height: 2.75rem;
  background-color: var(--content-search-bg);
  border: solid 0.0625rem var(--content-search-border-color);
  border-radius: var(--input-border-radius);
}
.content-top .content-search .form-control {
  padding-left: 0;
  min-inline-size: 250px !important;
}
@media (max-width: 991.98px) {
  .content-top .content-search .form-control {
    min-inline-size: 200px !important;
  }
}
.content-top .content-search .icon {
  width: 2.25rem;
}
.content-top .content-search .content-search-reset {
  background: none;
}
.content-top .content-search .content-search-reset:hover {
  background: none;
}

/* The frame's right-hand cluster. */
.header-custom-menu {
  display: flex;
  gap: var(--app-header-gap);
  align-items: center;
  justify-content: end;
}
.header-custom-menu .tb-breakdown {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--app-header-title-color);
  white-space: nowrap;
}
.header-custom-menu .app-header__help {
  font-size: 1.375rem;
  color: var(--app-header-help-color);
}
.header-custom-menu .app-header__help:hover {
  color: var(--dashboard-brand-orange);
}
.header-custom-menu .user-avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--app-header-avatar);
  block-size: var(--app-header-avatar);
  border: 0;
  border-radius: var(--dashboard-radius-control);
  background-color: var(--app-header-avatar-bg);
  color: var(--app-header-avatar-color);
  font-family: var(--heading-font-family);
  font-size: var(--app-header-avatar-size);
  font-weight: 500;
  line-height: 1.4;
}
.header-custom-menu .context-selector {
  inline-size: var(--app-header-store-w);
}
.header-custom-menu .context-selector > .form-select:not(.ts-hidden-accessible),
.header-custom-menu .context-selector > .ts-wrapper {
  min-block-size: var(--app-header-control-h);
  background-color: var(--dashboard-control-bg);
  border: 0;
  border-radius: var(--dashboard-radius-control);
  font-size: 1rem;
}
.header-custom-menu .context-selector .ts-control {
  display: flex;
  align-items: center;
  min-block-size: var(--app-header-control-h);
  padding-block: 0;
  padding-inline: 0.75rem;
  background-color: transparent;
  line-height: 1.4;
}

/* Row 2: shown only when the page has actions. The title already sits in row 1. */
.content-header:not(:has(.page-actions:not(:empty))) {
  display: none;
}
.content-header .content-header-title .title {
  display: none;
}

/* ============================================================
 * The phone header. It follows the dark shell, like the sidebar it opens — EasyAdmin's default
 * is a light grey bar, which read as a different product from the menu under it.
 * ============================================================ */
.responsive-header {
  --responsive-header-bg: var(--sidebar-bg);
  --responsive-header-border-color: var(--sidebar-menu-active-item-bg);
  --responsive-header-logo-color: #fff;
  z-index: 1020;
  position: sticky;
  top: 0;
  flex-wrap: wrap;
  row-gap: 0.625rem;
  column-gap: 0.625rem;
  padding: 0.625rem;
  color: #fff;
  /* The burger sits on the right, in the slot help holds on desktop (help moves into the
     drawer), beside the avatar, and is drawn at 28px rather than EasyAdmin's 16px
     (`1667:35377`). */
}
.responsive-header .ts-dropdown {
  max-inline-size: none;
}
.responsive-header #navigation-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  color: #fff;
}
.responsive-header #navigation-toggler > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 1.75rem;
  block-size: 1.75rem;
  font-size: 1.5rem;
  color: #fff;
}

/* The logo and the page title share one grid cell; scrolling swaps them. */
#responsive-header-logo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1 1 0;
  align-items: center;
  overflow: hidden;
  padding: 0 !important;
  /* On the dark bar, the white wordmark — the colour one is for light backgrounds. */
}
#responsive-header-logo img {
  max-height: 1.75rem !important;
}
#responsive-header-logo .logo-mobile {
  display: none;
}
#responsive-header-logo .responsive-logo,
#responsive-header-logo .responsive-page-title {
  grid-area: 1/1;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
#responsive-header-logo .responsive-logo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  max-inline-size: 100%;
}
#responsive-header-logo .responsive-page-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-size: 1.125rem;
  line-height: 1.2;
  transform: translateY(100%);
  opacity: 0;
}
#responsive-header-logo .responsive-page-title-icon {
  flex: none;
  height: 1.5rem;
  width: auto;
}

.responsive-header.is-scrolled #responsive-header-logo .responsive-logo {
  transform: translateY(-100%);
  opacity: 0;
}
.responsive-header.is-scrolled #responsive-header-logo .responsive-page-title {
  transform: translateY(0);
  opacity: 1;
}

/* ============================================================
 * Page-level tweaks to EasyAdmin's layout.
 * ============================================================ */
/*
 * Hidden for now: we don't use EasyAdmin's sidebar resize handle, and it causes
 * an overscroll issue. Its min-height is computed from EasyAdmin's default
 * header height (56px), which doesn't reflect our customized header.
 */
#content-resizer-handler {
  display: none;
}

.main-content,
article.content {
  min-inline-size: 0;
}

/* ============================================================
 * Slide-from-right modal — applied to EasyAdmin filter modal so it docks
 * on the right edge and slides in instead of centering as a popup. Triggered
 * by adding the `modal-slide-end` class to the `.modal` root element (see
 * `templates/bundles/EasyAdminBundle/crud/includes/_filters_modal.html.twig`).
 * ============================================================ */
.modal.modal-slide-end {
  padding-right: 0 !important;
}
.modal.modal-slide-end .modal-dialog {
  position: fixed;
  top: 0;
  right: 0;
  margin: 0;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
}
.modal.modal-slide-end.show .modal-dialog {
  transform: translateX(0);
}
.modal.modal-slide-end .modal-content {
  height: 100vh;
  border-radius: 0;
  border: 0;
  border-left: 1px solid rgba(var(--bs-dark-rgb), 0.12);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
}
.modal.modal-slide-end .modal-body {
  overflow-y: auto;
}

/*# sourceMappingURL=app.output.css.map */
