/* ==========================================================================
   Dusk — the DigiCloud Portal design system, as plain CSS.
   No framework, no build step. Pair with dusk-tokens.css.

   Everything here is driven by the tokens, so a theme change is one attribute
   on <html> and never a change in here. Hover, focus, active, disabled and
   loading states are all in this file — that is the part a screenshot cannot
   hand over.

   Rules this file enforces, so they survive the conversion:
   - Colour has four jobs: where you are, status, product, data. Everything
     else is grey. There is no decorative colour class in here to reach for.
   - One primary button per view. Read-only views have none.
   - Status is a dot and a word, never a filled colour pill.
   - Tinted backgrounds appear only on banners.
   ========================================================================== */

/* ---------------------------------------------------------------- base */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: "cv11", "tnum";
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 500; letter-spacing: -0.015em; color: var(--foreground); }
h1 { font-size: 24px; letter-spacing: -0.02em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p  { margin: 0; color: inherit; }
strong, b { color: inherit; }

a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Identifiers: slashed zero, tailed l, serifed I — so C0l5ljwja cannot be misread. */
.ident { font-feature-settings: "tnum", "zero", "cv05", "cv08"; }
.tabular { font-variant-numeric: tabular-nums; }

.dusk-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.dusk-muted { color: var(--muted-foreground); }
.dusk-soft  { color: var(--soft-foreground); }
.dusk-row   { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.dusk-stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------------------------------------------------------------- shell */
.dusk-shell { display: flex; min-height: 100vh; background: var(--sidebar); }
.dusk-desktop-shell {
  display: flex;
  min-height: calc(100vh - 65px);
  background: var(--background);
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.dusk-sidebar-col {
  flex: 0 0 240px;
  width: 240px;
  min-width: 240px;
  background: var(--sidebar, #041e42);
  transition: flex-basis 220ms cubic-bezier(0.4, 0, 0.2, 1), width 220ms cubic-bezier(0.4, 0, 0.2, 1), min-width 220ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width, flex-basis;
}
.dusk-panel-main {
  flex: 1;
  min-width: 0;
}
@media (max-width: 767px) {
  .dusk-sidebar-col {
    display: none !important;
  }
}

.dusk-sidebar {
  position: fixed !important;
  top: 64px !important;
  bottom: 0;
  left: 0;
  width: 240px;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 13px 10px 20px;
  color: var(--sidebar-foreground);
  background: var(--sidebar, #041e42);
  border-right: 1px solid var(--sidebar-border, var(--border, #0c3161));
  border-top: none !important;
  margin-top: -1px;
  overflow-y: auto;
  overflow-x: hidden !important;
  z-index: 1025;
  scrollbar-width: thin;
  scrollbar-color: var(--sidebar-border, rgba(255, 255, 255, 0.15)) transparent;
  transition: width 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 767px) {
  .dusk-sidebar {
    display: none !important;
  }
}

.dusk-sidebar::-webkit-scrollbar {
  width: 5px;
  height: 0px !important;
}
.dusk-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.dusk-sidebar::-webkit-scrollbar-thumb {
  background: var(--sidebar-border, rgba(255, 255, 255, 0.15));
  border-radius: 4px;
}

.dusk-sidebar-rail-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 28px;
  padding: 0 4px;
  margin-bottom: 2px;
  box-sizing: border-box;
}

.dusk-sidebar-rail-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--sidebar-border, #E2E8F0);
  background: var(--sidebar-accent, rgba(255, 255, 255, 0.06));
  color: var(--sidebar-foreground, #64748B);
  cursor: pointer;
  opacity: 0.6;
  transition: all 180ms ease;
}
.dusk-sidebar-rail-toggle:hover {
  opacity: 1;
  color: var(--brand, #0072ce);
  background: var(--sidebar-accent, rgba(255, 255, 255, 0.14));
  transform: scale(1.05);
}
.dusk-sidebar-rail-toggle i,
.dusk-sidebar-rail-toggle svg {
  font-size: 11px;
  transition: transform 220ms ease;
  transform-origin: center center;
}

/* ==========================================================================
 * Collapsed Sidebar Mode (Icon Rail Mode)
 * ========================================================================== */
.dusk-sidebar--collapsed .dusk-sidebar-col {
  flex: 0 0 64px !important;
  width: 64px !important;
  min-width: 64px !important;
}

.dusk-sidebar--collapsed .dusk-sidebar {
  width: 64px !important;
  padding: 12px 10px 20px !important;
  gap: 14px !important;
  cursor: pointer;
}

.dusk-sidebar--collapsed .dusk-sidebar-rail-header {
  justify-content: center !important;
  padding: 0 !important;
  height: 28px !important;
  margin-bottom: 2px !important;
}

.dusk-sidebar--collapsed .dusk-sidebar-rail-toggle i,
.dusk-sidebar--collapsed .dusk-sidebar-rail-toggle svg {
  transform: rotate(180deg) !important;
}

.dusk-sidebar--collapsed .dusk-sidebar__label {
  font-size: 0 !important;
  line-height: 20px !important;
  height: 20px !important;
  margin: 4px 0 2px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
}

.dusk-sidebar--collapsed .dusk-sidebar__label::after {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--sidebar-border);
  opacity: 0.45;
}

.dusk-sidebar--collapsed .dusk-nav {
  justify-content: center !important;
  padding: 0 !important;
  width: 44px !important;
  height: 34px !important;
  margin: 0 auto !important;
  border-radius: 8px !important;
  position: relative;
}

.dusk-sidebar--collapsed .dusk-nav span {
  display: none !important;
}

.dusk-sidebar--collapsed .dusk-nav i,
.dusk-sidebar--collapsed .dusk-nav svg {
  margin: 0 !important;
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  font-size: 14px !important;
  text-align: center;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Native title attribute tooltips are used for unclippable, zero-overflow tooltips */
.dusk-sidebar--collapsed .dusk-nav::after {
  display: none !important;
}

.dusk-sidebar__brand { display: flex; flex-direction: column; gap: 4px; padding: 4px 10px 0; }
.dusk-sidebar__group { display: flex; flex-direction: column; gap: 2px; }
.dusk-sidebar__label {
  padding: 0 10px;
  height: 20px;
  line-height: 20px;
  margin: 4px 0 2px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
}

.dusk-nav,
.dusk-sidebar a.dusk-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px;
  margin: 0;
  box-sizing: border-box;
  border-radius: 8px;
  color: var(--sidebar-foreground);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}
.dusk-nav:hover,
.dusk-sidebar a.dusk-nav:hover { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); text-decoration: none; }
.dusk-nav[aria-current="page"],
.dusk-sidebar a.dusk-nav[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); }
.dusk-nav[aria-current="page"] svg,
.dusk-sidebar a.dusk-nav[aria-current="page"] svg { color: var(--brand); }
.dusk-nav svg,
.dusk-nav i,
.dusk-sidebar a.dusk-nav svg,
.dusk-sidebar a.dusk-nav i {
  flex: none;
  width: 16px;
  min-width: 16px;
  height: 16px;
  font-size: 14px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
}
.dusk-nav[aria-current="page"] i,
.dusk-sidebar a.dusk-nav[aria-current="page"] i { color: var(--brand); }

/* The work happens on an inset panel, so the page colour frames it. */
.dusk-panel {
  flex: 1;
  min-width: 0;
  margin: 8px 8px 8px 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.dusk-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px 0 24px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted-foreground);
}
.dusk-topbar__spacer { margin-left: auto; }
.dusk-crumb { color: var(--muted-foreground); }
.dusk-crumb--current { color: var(--foreground); }

.dusk-main { padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 20px; }

/* ---------------------------------------------------------------- buttons */
.dusk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--foreground);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.dusk-btn:hover:not(:disabled) { text-decoration: none; }
.dusk-btn:active:not(:disabled) { transform: scale(0.97); }
.dusk-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.dusk-btn svg { flex: none; width: 16px; height: 16px; }

/* One per view. Lists, forms and flows only — never a read-only view. */
.dusk-btn--primary { background: var(--primary); color: var(--primary-foreground); }
.dusk-btn--primary:hover:not(:disabled) { background: color-mix(in oklab, var(--primary) 88%, var(--foreground)); color: var(--primary-foreground); }

.dusk-btn--secondary {
  background: var(--fill);
  color: var(--foreground);
  border-color: color-mix(in oklab, var(--border) 60%, var(--foreground) 40%);
}
.dusk-btn--secondary:hover:not(:disabled) {
  background: color-mix(in oklab, var(--fill) 82%, var(--foreground) 18%);
  border-color: color-mix(in oklab, var(--border) 40%, var(--foreground) 60%);
  color: var(--foreground);
}
.dusk-btn[data-copied="true"] {
  background: var(--positive-soft);
  color: var(--positive-text);
  border-color: color-mix(in oklab, var(--positive) 40%, var(--border));
}

.dusk-btn--outline,
.dusk-btn--subtle {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}
.dusk-btn--outline:hover:not(:disabled),
.dusk-btn--subtle:hover:not(:disabled) {
  background: var(--fill);
  border-color: color-mix(in oklab, var(--border) 60%, var(--foreground) 40%);
  color: var(--foreground);
}

.dusk-btn--ghost { color: var(--soft-foreground); }
.dusk-btn--ghost:hover:not(:disabled) { background: var(--muted); color: var(--foreground); }

/* Quiet until it is inside a confirmation. */
.dusk-btn--destructive { background: color-mix(in oklab, var(--destructive) 12%, transparent); color: var(--destructive); }
.dusk-btn--destructive:hover:not(:disabled) { background: color-mix(in oklab, var(--destructive) 20%, transparent); }
.dusk-btn--danger { background: var(--destructive); color: var(--primary-foreground); }
.dusk-btn--danger:hover:not(:disabled) { background: color-mix(in oklab, var(--destructive) 88%, var(--foreground)); }

.dusk-btn--link { height: auto; padding: 0; color: var(--brand-text); }
.dusk-btn--link:hover:not(:disabled) { text-decoration: underline; }

.dusk-btn--xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.dusk-btn--sm { height: 28px; padding: 0 10px; font-size: 13px; }
.dusk-btn--lg { height: 36px; padding: 0 16px; }
.dusk-btn--icon { width: 32px; padding: 0; }
.dusk-btn--icon.dusk-btn--sm { width: 28px; }

.dusk-btn.is-loading { pointer-events: none; color: transparent; position: relative; }
.dusk-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid currentcolor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--primary-foreground);
  animation: dusk-spin 700ms linear infinite;
}
.dusk-btn--outline.is-loading::after,
.dusk-btn--ghost.is-loading::after { color: var(--foreground); }

@keyframes dusk-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- filters */
.dusk-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px dashed var(--input);
  border-radius: 8px;
  background: transparent;
  color: var(--soft-foreground);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.dusk-chip i {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.85;
}
.dusk-chip:hover {
  background: var(--muted);
  border-color: var(--soft-foreground);
  color: var(--foreground);
}
/* Applied: solid border and a tint, so "filtered" is never a guess. */
.dusk-chip.is-applied,
.dusk-chip[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), inset 0 0 0 1px color-mix(in oklab, var(--brand) 25%, transparent);
}
.dusk-chip.is-applied i,
.dusk-chip[aria-pressed="true"] i {
  opacity: 1;
  color: var(--brand-text);
}
.dusk-chip__count {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.dusk-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); }
.dusk-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}
.dusk-tab:hover { color: var(--foreground); }
.dusk-tab[aria-selected="true"],
.dusk-tab.is-active,
.dusk-tab.active {
  color: var(--foreground);
  border-bottom-color: var(--brand);
  font-weight: 600;
}
.dusk-tab__count { color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.dusk-tab[aria-selected="true"] .dusk-tab__count,
.dusk-tab.is-active .dusk-tab__count,
.dusk-tab.active .dusk-tab__count { color: var(--brand-text); }

/* Same job as tabs where an underline would be wrong: a contained switch. */
.dusk-segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--muted);
  gap: 2px;
}
.dusk-segmented button,
.dusk-segmented .dusk-segmented__btn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.dusk-segmented button[aria-pressed="true"],
.dusk-segmented button[aria-selected="true"],
.dusk-segmented button.is-active,
.dusk-segmented button.active,
.dusk-segmented .dusk-segmented__btn.is-active,
.dusk-segmented .dusk-segmented__btn.active,
.dusk-segmented .dusk-segmented__btn[aria-pressed="true"],
.dusk-segmented .dusk-segmented__btn[aria-selected="true"],
.dusk-segmented__btn.is-active {
  background: color-mix(in oklab, var(--brand) 16%, var(--card));
  color: var(--foreground);
  font-weight: 600;
  border-color: color-mix(in oklab, var(--brand) 48%, var(--border));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16), inset 0 1px 0 color-mix(in oklab, var(--foreground) 10%, transparent);
}
.dusk-segmented button[aria-pressed="true"] i,
.dusk-segmented button[aria-selected="true"] i,
.dusk-segmented button.is-active i,
.dusk-segmented button.active i,
.dusk-segmented .dusk-segmented__btn.is-active i,
.dusk-segmented .dusk-segmented__btn.active i,
.dusk-segmented button[aria-pressed="true"] svg,
.dusk-segmented button[aria-selected="true"] svg,
.dusk-segmented button.is-active svg,
.dusk-segmented button.active svg {
  color: var(--brand);
}
.dusk-segmented button:hover:not([aria-pressed="true"]):not([aria-selected="true"]):not(.is-active):not(.active) {
  color: var(--foreground);
  background: color-mix(in oklab, var(--card) 55%, transparent);
}

.dusk-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  min-width: 280px;
  padding: 0 10px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--card);
  color: var(--placeholder);
}
.dusk-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--foreground);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.dusk-search input::placeholder { color: var(--placeholder); }
.dusk-kbd {
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 11px;
}

/* ---------------------------------------------------------------- table */
.dusk-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.dusk-table thead th {
  height: 36px;
  padding: 0 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.dusk-table thead th.is-numeric { text-align: right; }

.dusk-table th button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.dusk-table th button:hover { color: var(--foreground); }
.dusk-table th[aria-sort] button { color: var(--foreground); }

/* 48px rows, 14px text, no density toggle. */
.dusk-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 150ms ease;
}
.dusk-table tbody tr:hover { background: var(--muted); }
.dusk-table tbody tr[aria-selected="true"] { background: var(--brand-soft); }
.dusk-table tbody td { height: 48px; padding: 0 12px; color: var(--soft-foreground); }
.dusk-table td.is-numeric { text-align: right; font-variant-numeric: tabular-nums; }
.dusk-table__name { color: var(--foreground); font-weight: 500; }

/* Row actions stay out of the way until the row is under the pointer. */
.dusk-table__actions { opacity: 0.45; transition: opacity 150ms ease; text-align: right; }
.dusk-table tbody tr:hover .dusk-table__actions,
.dusk-table tbody tr:focus-within .dusk-table__actions { opacity: 1; }

.dusk-skeleton,
.dusk-skel {
  display: block;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--fill) 0%,
    color-mix(in oklab, var(--foreground) 7%, var(--fill)) 50%,
    var(--fill) 100%
  );
  background-size: 220% 100%;
  animation: dusk-shimmer 3.8s ease-in-out infinite;
}
@keyframes dusk-shimmer {
  0% { background-position: 180% 0; opacity: 0.92; }
  50% { opacity: 0.78; }
  100% { background-position: -180% 0; opacity: 0.92; }
}
@media (prefers-reduced-motion: reduce) {
  .dusk-skeleton,
  .dusk-skel {
    animation: none;
    opacity: 0.85;
  }
}

.dusk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 32px;
  border: 1px dashed var(--input);
  border-radius: 12px;
  text-align: center;
}
.dusk-empty > svg { margin-bottom: 6px; }
.dusk-empty__title { font-size: 16px; font-weight: 500; color: var(--foreground); }
.dusk-empty__body { max-width: 320px; font-size: 13px; line-height: 1.6; color: var(--muted-foreground); }
/* The action is a separate decision from the explanation, so it gets its own air. */
.dusk-empty > .dusk-btn, .dusk-empty > form { margin-top: 14px; }

/* ---------------------------------------------------------------- status */
/* A dot and a word. Filled = live, hollow ring = ended. Only amber and red
   colour the word, because only they ask for action. */
.dusk-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
  color: var(--soft-foreground);
}
.dusk-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex: none;
}
.dusk-status--positive::before { background: var(--positive); }
.dusk-status--info::before     { background: var(--info); }
.dusk-status--warning::before  { background: var(--warning); }
.dusk-status--warning          { color: var(--warning-text); font-weight: 500; }
.dusk-status--critical::before { background: var(--destructive); }
.dusk-status--critical         { color: var(--critical-text); font-weight: 500; }
.dusk-status--limited::before  { background: var(--muted-foreground); }
.dusk-status--ended            { color: var(--muted-foreground); }
.dusk-status--ended::before    { background: transparent; border: 1.5px solid var(--muted-foreground); }

.dusk-status--badge {
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 12px;
}

.dusk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--soft-foreground);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.dusk-badge--workspace {
  background: color-mix(in oklab, var(--brand) 9%, var(--card));
  border-color: color-mix(in oklab, var(--brand) 24%, var(--border));
  color: color-mix(in oklab, var(--brand-text, var(--brand)) 82%, var(--foreground));
  font-weight: 500;
}

.dusk-badge--gcp {
  background: color-mix(in oklab, var(--positive) 10%, var(--card));
  border-color: color-mix(in oklab, var(--positive) 26%, var(--border));
  color: color-mix(in oklab, var(--positive-text, var(--positive)) 82%, var(--foreground));
  font-weight: 500;
}

.dusk-badge--edu {
  background: color-mix(in oklab, var(--product-education) 10%, var(--card));
  border-color: color-mix(in oklab, var(--product-education) 26%, var(--border));
  color: color-mix(in oklab, var(--product-education) 82%, var(--foreground));
  font-weight: 500;
}

[data-theme="digideepteal"] .dusk-badge--workspace {
  background: color-mix(in oklab, var(--chart-3) 10%, var(--card));
  border-color: color-mix(in oklab, var(--chart-3) 26%, var(--border));
  color: color-mix(in oklab, var(--chart-3) 82%, var(--foreground));
}

/* ---------------------------------------------------------------- cards */
.dusk-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

[data-theme="midnight"] .dusk-card,
[data-theme="aurora"] .dusk-card,
[data-theme="digidark"] .dusk-card,
[data-theme="digideepteal"] .dusk-card,
[data-theme="midnight"] .dusk-plate,
[data-theme="aurora"] .dusk-plate,
[data-theme="digidark"] .dusk-plate,
[data-theme="digideepteal"] .dusk-plate,
[data-theme="midnight"] .dusk-sub,
[data-theme="aurora"] .dusk-sub,
[data-theme="digidark"] .dusk-sub,
[data-theme="digideepteal"] .dusk-sub,
[data-theme="midnight"] .dusk-sku-card,
[data-theme="aurora"] .dusk-sku-card,
[data-theme="digidark"] .dusk-sku-card,
[data-theme="digideepteal"] .dusk-sku-card,
[data-theme="midnight"] .dusk-offer-card,
[data-theme="aurora"] .dusk-offer-card,
[data-theme="digidark"] .dusk-offer-card,
[data-theme="digideepteal"] .dusk-offer-card,
[data-theme="midnight"] .dusk-config-card,
[data-theme="aurora"] .dusk-config-card,
[data-theme="digidark"] .dusk-config-card,
[data-theme="digideepteal"] .dusk-config-card,
[data-theme="midnight"] .dusk-calc-card,
[data-theme="aurora"] .dusk-calc-card,
[data-theme="digidark"] .dusk-calc-card,
[data-theme="digideepteal"] .dusk-calc-card,
[data-theme="midnight"] .dusk-filter-bar-card,
[data-theme="aurora"] .dusk-filter-bar-card,
[data-theme="digidark"] .dusk-filter-bar-card,
[data-theme="digideepteal"] .dusk-filter-bar-card,
[data-theme="midnight"] .dusk-catalog-header-card,
[data-theme="aurora"] .dusk-catalog-header-card,
[data-theme="digidark"] .dusk-catalog-header-card,
[data-theme="digideepteal"] .dusk-catalog-header-card,
[data-theme="midnight"] .dusk-transfer-sku-card,
[data-theme="aurora"] .dusk-transfer-sku-card,
[data-theme="digidark"] .dusk-transfer-sku-card,
[data-theme="digideepteal"] .dusk-transfer-sku-card {
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.045), 0 4px 14px -2px rgba(0, 0, 0, 0.25);
}

.dusk-card .dusk-sub,
.dusk-card .dusk-choice,
.dusk-card .dusk-sku-card,
.dusk-card .dusk-offer-card,
.dusk-card .dusk-card {
  background: var(--card-elevated, var(--card));
  border-color: color-mix(in oklab, var(--border) 82%, var(--foreground) 18%);
}
.dusk-section { display: flex; flex-direction: column; }
.dusk-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
}
.dusk-section__title { font-size: 16px; font-weight: 600; color: var(--foreground); margin: 0; }
.dusk-section__sub,
.dusk-section__desc { margin: 6px 0 0 0; font-size: 13.5px; line-height: 1.5; color: var(--soft-foreground); }
.dusk-section__body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 4px 24px 26px;
}
.dusk-section__body--flush { padding: 0; gap: 0; }
.dusk-section__foot {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-foreground);
}

/* The page's identity block: who this is, what state they are in, what you can do. */
.dusk-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.dusk-hero__id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.dusk-hero__titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dusk-hero__title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dusk-hero__meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted-foreground); }
.dusk-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }

/* One container, hairline dividers, no icons: the numbers do the work. */
.dusk-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.dusk-stat { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; border-left: 1px solid var(--border); }
.dusk-stat:first-child { border-left: 0; }
.dusk-stat__label { font-size: 13px; color: var(--muted-foreground); }
.dusk-stat__value { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dusk-stat__foot { font-size: 12px; color: var(--muted-foreground); }

/* role="meter", never a progress bar: this is a reading, not a task. */
.dusk-meter { height: 6px; border-radius: 999px; background: var(--muted); overflow: hidden; }
.dusk-meter > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.dusk-meter--warning > span { background: var(--warning); }

/* The only tinted backgrounds in the system. One per page, when action is needed. */
.dusk-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--soft-foreground);
}
.dusk-banner strong { font-weight: 600; }
.dusk-banner--info     { border-color: var(--info-border); background: var(--info-soft); }
.dusk-banner--info strong { color: var(--info-text); }
.dusk-banner--warning  { border-color: var(--warning-border); background: var(--warning-soft); }
.dusk-banner--warning strong { color: var(--warning-text); }
.dusk-banner--critical { border-color: var(--critical-border); background: var(--critical-soft); }
.dusk-banner--critical strong { color: var(--critical-text); }
.dusk-banner--positive { border-color: color-mix(in oklab, var(--positive) 30%, transparent); background: var(--positive-soft); }
.dusk-banner--positive strong { color: var(--positive-text); }
.dusk-banner__action { margin-left: auto; }

/* ---------------------------------------------------------------- people */
.dusk-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  background: var(--fill);
  color: var(--soft-foreground);
  font-size: 12px;
  font-weight: 600;
}
.dusk-avatar--org { border-radius: 8px; }      /* organisations are squares */
.dusk-avatar--person { border-radius: 999px; } /* people are circles */
.dusk-avatar--lg { width: 44px; height: 44px; font-size: 15px; border-radius: 10px; }
.dusk-avatar--sm { width: 24px; height: 24px; font-size: 10px; }

.dusk-contact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.dusk-contact:last-child { border-bottom: 0; }
.dusk-contact__who { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 240px; }
.dusk-contact__name { font-weight: 500; color: var(--foreground); }
.dusk-contact__role { font-size: 12px; color: var(--muted-foreground); }
.dusk-contact__perms { display: flex; gap: 20px; }
.dusk-contact__perm { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted-foreground); }
.dusk-contact__perm svg { color: var(--positive); }
.dusk-contact__perm--off { color: var(--placeholder); }
.dusk-contact.is-inactive { opacity: 0.55; }

/* ---------------------------------------------------------------- forms */
.dusk-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 22px;
  align-items: start;
}
@media (max-width: 767px) {
  .dusk-form-grid {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }
}

.dusk-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
}
.dusk-field--wide,
.dusk-field--span2 {
  grid-column: 1 / -1;
}
.dusk-field + .dusk-field {
  margin-top: 18px;
}
.dusk-form-grid > .dusk-field + .dusk-field,
.dusk-grid2 > .dusk-field + .dusk-field {
  margin-top: 0;
}

.dusk-label,
.dusk-field > label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--foreground);
}
.dusk-required,
.dusk-req { color: var(--destructive); }
.dusk-optional {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted-foreground);
  margin-left: 4px;
}

.dusk-input,
.dusk-select,
.dusk-textarea {
  width: 100%;
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--card);
  color: var(--foreground);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.dusk-textarea { min-height: 80px; resize: vertical; }
.dusk-input::placeholder, .dusk-textarea::placeholder { color: var(--placeholder); }
.dusk-input:focus, .dusk-select:focus, .dusk-textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent);
}
.dusk-input[aria-invalid="true"],
.dusk-input.is-invalid {
  border-color: var(--destructive);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--destructive) 20%, transparent);
}
.dusk-input:disabled, .dusk-select:disabled, .dusk-textarea:disabled,
.dusk-input[readonly] {
  background: var(--muted);
  color: var(--muted-foreground);
}
.dusk-input:disabled, .dusk-select:disabled, .dusk-textarea:disabled {
  cursor: not-allowed;
}
.dusk-help {
  margin: 1px 0 0 !important;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted-foreground);
}
.dusk-error {
  margin: 2px 0 0 !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--critical-text);
}

.dusk-affix {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--card);
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.dusk-affix:focus-within {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent);
}
.dusk-affix.is-invalid,
.dusk-affix:has(.dusk-input[aria-invalid="true"]),
.dusk-affix:has(.dusk-input.is-invalid) {
  border-color: var(--destructive);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--destructive) 20%, transparent);
}
.dusk-affix .dusk-input {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1 1 auto;
  min-width: 0;
}
.dusk-affix__part,
.dusk-affix__suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: var(--muted);
  border-left: 1px solid var(--border);
  color: var(--soft-foreground);
  font-size: 13px;
  white-space: nowrap;
  user-select: all;
}

.dusk-quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.dusk-quick-chips__label {
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-right: 2px;
}
.dusk-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--fill);
  color: var(--soft-foreground);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.dusk-quick-chip:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-text);
}
.dusk-quick-chip.is-active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-text);
  font-weight: 500;
}

.dusk-switch {
  appearance: none;
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--fill);
  border: 1px solid var(--input);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.dusk-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  transition: transform 150ms ease;
}
.dusk-switch:checked { background: var(--primary); border-color: var(--primary); }
.dusk-switch:checked::after { transform: translateX(16px); }

.dusk-check {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--input);
  border-radius: 4px;
  background: var(--card);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.dusk-check:checked {
  background: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.5 3.5L13 5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Sticky, one per tab: it counts the changes and can always be discarded. */
.dusk-savebar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-size: 13px;
}
.dusk-savebar__count { color: var(--soft-foreground); display: inline-flex; align-items: center; gap: 8px; }
.dusk-savebar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- sidebar offset & savebar alignment */
:root {
  --dusk-sidebar-offset: 0px;
}

@media (min-width: 768px) {
  body:has(.dusk-sidebar-col),
  .dusk-desktop-shell {
    --dusk-sidebar-offset: 240px;
  }
  html.dusk-sidebar--collapsed,
  .dusk-sidebar--collapsed,
  body.dusk-sidebar--collapsed,
  html.dusk-sidebar--collapsed .dusk-desktop-shell,
  .dusk-sidebar--collapsed .dusk-desktop-shell {
    --dusk-sidebar-offset: 64px;
  }
}

/* Canonical Persistent Floating Rectangular Save Bar (rounded rectangle, never pill) */
.dusk-savebar--floating {
  position: fixed;
  bottom: 20px;
  left: calc(50% + (var(--dusk-sidebar-offset, 0px) / 2));
  transform: translateX(-50%);
  z-index: 1040;
  width: calc(100% - 48px - var(--dusk-sidebar-offset, 0px));
  max-width: 880px;
  min-height: 56px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--radius-lg, 12px) !important;
  background: color-mix(in oklab, var(--card) 92%, var(--fill) 8%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in oklab, var(--border) 72%, var(--foreground) 28%);
  box-shadow:
    0 12px 32px -6px rgba(0, 0, 0, 0.28),
    0 4px 12px -2px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 0 color-mix(in oklab, var(--foreground) 8%, transparent);
  transition:
    left 220ms cubic-bezier(0.4, 0, 0.2, 1),
    width 220ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.dusk-savebar--floating.is-dirty {
  background: color-mix(in oklab, var(--popover, var(--card)) 90%, var(--brand) 6%);
  border-color: color-mix(in oklab, var(--brand) 50%, var(--border));
  box-shadow:
    0 14px 36px -6px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in oklab, var(--brand) 22%, transparent),
    inset 0 1px 0 0 color-mix(in oklab, var(--foreground) 10%, transparent);
}

.dusk-savebar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  background: var(--positive);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.dusk-savebar-dot.is-dirty,
.dusk-savebar--floating.is-dirty .dusk-savebar-dot {
  background: var(--warning);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--warning) 24%, transparent);
  animation: duskSavebarDotPulse 1.6s ease-in-out infinite;
}

@keyframes duskSavebarDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.22); opacity: 0.78; }
}

/* Save button in savebar: greyed out when disabled / clean */
.dusk-savebar .dusk-btn--primary:disabled,
.dusk-savebar--floating:not(.is-dirty) .dusk-btn--primary {
  background: color-mix(in oklab, var(--fill) 85%, var(--card)) !important;
  color: var(--muted-foreground) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* Save button in savebar: lights up when dirty */
.dusk-savebar.is-dirty .dusk-btn--primary,
.dusk-savebar--floating.is-dirty .dusk-btn--primary {
  background: var(--primary) !important;
  color: var(--primary-foreground) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px color-mix(in oklab, var(--brand) 30%, transparent) !important;
  opacity: 1 !important;
  cursor: pointer !important;
  pointer-events: auto;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

body:has(.dusk-savebar--floating) .dusk-main,
body:has(.dusk-savebar--floating) .dusk-panel-main,
.dusk-page:has(.dusk-savebar--floating) {
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
  .dusk-savebar--floating {
    position: fixed !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* ---------------------------------------------------------------- overlays */
.dusk-menu { position: relative; display: inline-block; }
.dusk-menu > summary { list-style: none; cursor: pointer; }
.dusk-menu > summary::-webkit-details-marker { display: none; }
.dusk-menu__list {
  position: absolute;
  right: 0;
  z-index: 20;
  min-width: 200px;
  margin-top: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--popover);
  box-shadow: 0 12px 32px -8px rgb(0 0 0 / 25%);
}
.dusk-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.dusk-menu__item:hover { background: var(--muted); }
.dusk-menu__item--destructive { color: var(--critical-text); }
.dusk-menu__sep { height: 1px; margin: 4px 0; background: var(--border); }

dialog:not([open]) {
  display: none !important;
}

.dusk-modal {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 20px 45px -10px rgb(0 0 0 / 35%);
}
.dusk-modal::backdrop {
  background: rgb(0 0 0 / 55%);
  backdrop-filter: blur(2px);
}
.dusk-modal__head {
  padding: 22px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dusk-modal__head:has(> button),
.dusk-modal__head:has(> .dusk-icon-btn),
.dusk-modal__head:has(> .dusk-modal__close) {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.dusk-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--foreground);
}
.dusk-modal__sub {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--soft-foreground);
}
.dusk-icon-btn,
.dusk-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  margin: -2px -4px 0 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.dusk-icon-btn:hover,
.dusk-modal__close:hover {
  background: var(--muted);
  color: var(--foreground);
}
.dusk-icon-btn:focus-visible,
.dusk-modal__close:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.dusk-modal__body {
  padding: 18px 24px;
  font-size: 13px;
  color: var(--soft-foreground);
  overflow-y: auto;
  max-height: calc(100vh - 210px);
}
.dusk-modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 4px 24px 22px; }

.dusk-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: dusk-spin 0.65s linear infinite;
  flex-shrink: 0;
}

body.is-provisioning-locked {
  cursor: wait !important;
  user-select: none;
}
body.is-provisioning-locked a,
body.is-provisioning-locked nav,
body.is-provisioning-locked header,
body.is-provisioning-locked .dusk-subbar,
body.is-provisioning-locked .dusk-flow-plate a,
body.is-provisioning-locked .dusk-flow-actions {
  pointer-events: none !important;
}
dialog.dusk-modal[data-provisioning="true"] {
  cursor: wait;
}
dialog.dusk-modal[data-provisioning="true"] .dusk-modal__close,
dialog.dusk-modal[data-provisioning="true"] .dusk-icon-btn {
  display: none !important;
  pointer-events: none !important;
}

.dusk-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 320px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--popover);
  font-size: 13px;
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 767px) {
  .dusk-sidebar { display: none; }
  /* Room for the bottom tab bar, plus the home indicator on a notched phone. */
  .dusk-main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .dusk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dusk-stat { border-left: 0; border-top: 1px solid var(--border); }
  .dusk-stat:nth-child(-n+2) { border-top: 0; }
  .dusk-stat:nth-child(even) { border-left: 1px solid var(--border); }
  .dusk-stats > .dusk-stat:last-child:nth-child(odd),
  #gwsStatCardResellerAuth {
    grid-column: 1 / -1 !important;
    border-top: 1px solid var(--border) !important;
    border-left: 0 !important;
  }
  .dusk-kv { grid-template-columns: 1fr; }
  .dusk-split { grid-template-columns: 1fr; }
  .dusk-steps { flex-direction: column; }
  .dusk-hero { gap: 16px; }
  .dusk-hero__meta { gap: 8px 16px; }
  .dusk-event { flex-direction: column; gap: 2px; }
  .dusk-event__when { width: auto; }
  .dusk-contact { flex-wrap: wrap; }
  .dusk-contact__perms { width: 100%; justify-content: space-between; gap: 8px; }
  /* A menu is a popover on a desktop and a sheet on a phone: a 200px dropdown
     anchored to a 28px button is unusable with a thumb. */
  .dusk-menu__list {
    position: fixed;
    inset: auto 0 0 0;
    margin: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
  }
  .dusk-menu__item { padding: 12px 14px; font-size: 15px; }

  /* Center confirmation and action modals on mobile with internal body scroll
     so the modal never hugs the bottom or clips footer buttons. */
  .dusk-modal:not(.dusk-sheet) {
    position: fixed !important;
    inset: 0 !important;
    margin: auto !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    border-radius: var(--radius-lg, 14px) !important;
    border: 1px solid var(--border) !important;
  }
  dialog.dusk-modal:not(.dusk-sheet)[open] {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .dusk-modal:not(.dusk-sheet) .dusk-modal__head {
    padding: 14px 16px 10px;
    flex-shrink: 0;
  }
  .dusk-modal:not(.dusk-sheet) .dusk-modal__body {
    padding: 12px 16px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .dusk-modal:not(.dusk-sheet) .dusk-modal__foot {
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    background: var(--popover);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 8px;
  }
  .dusk-modal:not(.dusk-sheet) .dusk-modal__foot > * {
    flex: 1 1 auto;
    justify-content: center;
  }
  .dusk-modal__close:focus:not(:focus-visible),
  .dusk-icon-btn:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
  }
  .dusk-confirm-summary-plate {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px;
  }
  .dusk-confirm-summary-plate__item,
  .dusk-confirm-summary-plate .ident,
  .dusk-modal__body dd,
  .dusk-modal__body .ident {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Eight tabs do not fit in 390px. They scroll rather than clip or wrap. */
  .dusk-tabs {
    gap: 18px;
    margin: 0 -16px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .dusk-tabs::-webkit-scrollbar { display: none; }
  .dusk-tab { flex: none; }

  /* A twelve-month chart at 390px gives 18px bars and colliding labels. The
     bars keep a legible width and the plot scrolls; the axis stays put. */
  .dusk-plot__area { overflow-x: auto; scrollbar-width: none; }
  .dusk-plot__area::-webkit-scrollbar { display: none; }
  .dusk-plot__target { min-width: 100%; }
  .dusk-bar { flex: 0 0 34px; }
  .dusk-chart__head { flex-direction: column; gap: 10px; }

  /* Line items stack, but the figure stays on the right where it is scanned. */
  .dusk-item { flex-wrap: wrap; gap: 8px 12px; }
  .dusk-item__main { flex: 1 1 100%; }
  .dusk-item__figure { margin-left: auto; }

  /* A save bar sticks on a phone whether or not the author asked for it. */
  .dusk-savebar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); }
  /* ...and the page makes room for it, or it covers the last field on the form. */
  body:has(.dusk-savebar) .dusk-main,
  body:has(.dusk-savebar) .dusk-panel-main,
  .dusk-page:has(.dusk-savebar) {
    padding-bottom: calc(175px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Stack input + long domain suffix (.dusk-affix) on mobile so username has full width */
  .dusk-affix {
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    max-width: 100%;
  }
  .dusk-affix .dusk-input {
    width: 100%;
    min-height: 42px;
  }
  .dusk-affix__part,
  .dusk-affix__suffix {
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 6px 12px;
    font-size: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    height: auto;
  }

  /* Prevent form grids and fields from overflowing horizontally on mobile */
  .dusk-form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .dusk-section,
  .dusk-section__body,
  .dusk-field {
    min-width: 0;
    max-width: 100%;
  }
  .dusk-savebar__count {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .dusk-toast { width: 100%; }
  .dusk-search { min-width: 0; }
  .dusk-verdict { flex-wrap: wrap; }
  .dusk-pager { flex-wrap: wrap; gap: 10px; }
  .dusk-segmented { flex: none; }
  /* A tooltip cannot be hovered on a touch screen. It only ever repeats
     something already on screen, so losing it costs nothing — but it must not
     be triggerable and then stuck open. */
  .dusk-tip__body { display: none; }
  .dusk-panel { margin: 0; border: 0; border-radius: 0; }
  .dusk-main { padding: 16px; }
  /* 16px so iOS never zooms a field on focus */
  .dusk-input, .dusk-select, .dusk-textarea { font-size: 16px; }
  /* Tables become list rows: nothing here depends on hover */
  .dusk-table:not(.dusk-table--scroll) thead { display: none; }
  .dusk-table:not(.dusk-table--scroll) tbody tr { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; }
  .dusk-table:not(.dusk-table--scroll) tbody td { height: auto; padding: 0; }
  .dusk-table:not(.dusk-table--scroll) .dusk-table__actions { opacity: 1; margin-left: auto; }
  .dusk-table.dusk-table--scroll { min-width: 820px; }
  .dusk-btn, .dusk-nav, .dusk-menu__item { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ==========================================================================
   Wave 2 — the rest of the portal.
   Everything above builds the DAR Admin cluster. Everything below is what the
   other areas need: Deal Desk, Cloud Identity check, Certifications, Offers,
   Usage, Invoices, GCP billing, Customers and the partner-facing dashboard.
   Same tokens, same rules.
   ========================================================================== */

/* ---------------------------------------------------------------- detail lists */
/* Label/value pairs. Read-only data is text, never a disabled input. */
.dusk-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 32px; }
.dusk-kv--one { grid-template-columns: 1fr; }
.dusk-kv > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dusk-kv dt, .dusk-kv__label { font-size: 12px; color: var(--muted-foreground); }
.dusk-kv dd, .dusk-kv__value { margin: 0; font-size: 14px; color: var(--foreground); }
.dusk-kv__value--empty { color: var(--placeholder); font-style: italic; }

/* ---------------------------------------------------------------- products */
/* Product colour is the third of colour's four jobs. It tints a line icon and a
   chart series — never a background, never a button. */
.dusk-product { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soft-foreground); white-space: nowrap; }
.dusk-product svg { width: 16px; height: 16px; flex: none; }
.dusk-product--workspace svg { color: var(--product-workspace); }
.dusk-product--gcp svg       { color: var(--product-gcp); }
.dusk-product--chrome svg    { color: var(--product-chrome); }
.dusk-product--maps svg      { color: var(--product-maps); }
.dusk-product--education svg { color: var(--product-education); }
.dusk-product--jumpcloud svg { color: var(--product-jumpcloud); }
.dusk-product--secops svg    { color: var(--product-secops); }
.dusk-product--off svg, .dusk-product--off { color: var(--placeholder); }
.dusk-products { display: inline-flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- figures */
.dusk-figure { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dusk-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.dusk-delta--better { color: var(--positive-text); }
.dusk-delta--worse  { color: var(--warning-text); }
.dusk-na { color: var(--placeholder); font-style: italic; font-size: 13px; }

/* ---------------------------------------------------------------- charts */
/* One series, one axis, a sentence above and a source line below. The axis
   reaches the target so a gap can never be flattered. Colour comes from the
   product tokens or --chart-1..5, never from a chart library's defaults. */
.dusk-chart { display: flex; flex-direction: column; gap: 14px; }
.dusk-chart__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dusk-chart__summary { font-size: 15px; font-weight: 500; }
.dusk-chart__sub { margin-top: 2px; font-size: 13px; color: var(--muted-foreground); }
.dusk-chart__source { font-size: 12px; color: var(--muted-foreground); }
.dusk-chart__legend { display: flex; gap: 16px; font-size: 12px; color: var(--soft-foreground); }
.dusk-chart__key { display: inline-flex; align-items: center; gap: 6px; }
.dusk-chart__key i { width: 10px; height: 10px; border-radius: 3px; background: var(--chart-1); }

.dusk-plot { display: flex; gap: 12px; }
.dusk-plot__axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 22px;
  text-align: right;
  font-size: 11px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.dusk-plot__area { position: relative; flex: 1; display: flex; align-items: flex-end; gap: 6px; height: 200px; }
.dusk-plot__target { position: absolute; left: 0; right: 0; top: 0; border-top: 1px dashed var(--input); }
.dusk-plot__target span { position: absolute; right: 0; top: -9px; padding: 0 4px; background: var(--card); font-size: 11px; color: var(--muted-foreground); }
.dusk-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.dusk-bar > i { width: 60%; background: var(--chart-1); border-radius: 3px 3px 0 0; transition: background-color 150ms ease; }
.dusk-bar:hover > i { background: color-mix(in oklab, var(--chart-1) 80%, var(--foreground)); }
.dusk-bar > span { font-size: 11px; color: var(--muted-foreground); }
.dusk-spark { display: block; width: 100%; height: 34px; overflow: visible; }

/* ---------------------------------------------------------------- steps */
/* Tier ladders, onboarding flows, anything with a current position. */
.dusk-steps { display: flex; gap: 10px; }
.dusk-step {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.dusk-step__name { font-size: 13px; font-weight: 500; }
.dusk-step__sub { font-size: 12px; color: var(--muted-foreground); }
.dusk-step.is-done .dusk-step__name::after { content: " ✓"; color: var(--positive); }
.dusk-step.is-current { border-color: var(--brand-border); background: var(--brand-soft); }
.dusk-step.is-current .dusk-step__name { color: var(--brand-text); }
.dusk-step.is-todo { opacity: 0.7; }

/* ---------------------------------------------------------------- timeline */
/* Audit history, order history, anything that happened in order. */
.dusk-timeline { display: flex; flex-direction: column; }
.dusk-event { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.dusk-event:last-child { border-bottom: 0; }
.dusk-event__when { width: 150px; flex: none; font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.dusk-event__what { min-width: 0; font-size: 13px; color: var(--soft-foreground); }
.dusk-event__what strong { color: var(--foreground); font-weight: 500; }
.dusk-diff { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.dusk-diff__from { color: var(--muted-foreground); text-decoration: line-through; }
.dusk-diff__to { color: var(--foreground); font-weight: 500; }

/* ---------------------------------------------------------------- tooltip */
.dusk-tip { position: relative; display: inline-flex; }
.dusk-tip__body {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: max-content;
  max-width: 260px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--foreground);
  color: var(--background);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}
.dusk-tip:hover .dusk-tip__body,
.dusk-tip:focus-within .dusk-tip__body { opacity: 1; }

/* ---------------------------------------------------------------- tags & upload */
.dusk-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dusk-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 4px 0 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--muted);
  font-size: 12px;
}
.dusk-tag button { border: 0; background: none; color: var(--muted-foreground); cursor: pointer; line-height: 1; padding: 2px; border-radius: 4px; }
.dusk-tag button:hover { background: var(--fill); color: var(--foreground); }

.dusk-upload { display: flex; align-items: center; gap: 16px; }
.dusk-upload__preview {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
}
.dusk-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px;
  border: 1px dashed var(--input);
  border-radius: 12px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 13px;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.dusk-dropzone:hover, .dusk-dropzone.is-dragging { border-color: var(--brand); background: var(--brand-soft); }

/* ---------------------------------------------------------------- layout */
/* A record and its aside: profile + activity, form + help, list + preview. */
.dusk-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .dusk-split { grid-template-columns: 1fr; } }

.dusk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dusk-toolbar__sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }

.dusk-pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted-foreground); }
.dusk-pager__pages { display: flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- whole-page states */
/* Every page needs four: loading, empty, error, and no-permission. */
.dusk-page-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 460px;
  margin: 72px auto;
  text-align: center;
}
.dusk-page-state__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--muted);
  color: var(--muted-foreground);
}
.dusk-page-state__icon { margin-bottom: 6px; }
.dusk-page-state h2 { font-size: 18px; }
.dusk-page-state p { font-size: 14px; color: var(--muted-foreground); line-height: 1.6; }
.dusk-page-state > .dusk-btn { margin-top: 14px; }

/* ---------------------------------------------------------------- auth */
.dusk-auth { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: var(--background); }
.dusk-auth__card {
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

/* ---------------------------------------------------------------- lookup */
/* Cloud Identity check and any other "paste a value, get a verdict" tool. */
.dusk-lookup { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.dusk-verdict {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.dusk-verdict:has(> .dusk-verdict__head),
.dusk-verdict--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 20px 24px;
  background: color-mix(in oklab, var(--muted) 45%, var(--card));
}
.dusk-verdict--positive { border-color: color-mix(in oklab, var(--positive) 40%, var(--border)); }
.dusk-verdict--warning  { border-color: var(--warning-border); }
.dusk-verdict--info     { border-color: var(--info-border); }
.dusk-verdict--critical { border-color: var(--critical-border); }
.dusk-verdict__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.dusk-verdict__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--foreground);
}
.dusk-verdict__body p {
  margin: 0;
  color: var(--foreground);
}
.dusk-verdict__body ul,
.dusk-verdict__body ol {
  margin: 4px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--foreground);
}
.dusk-verdict__facts {
  margin: 0;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  grid-template-columns: minmax(210px, 0.72fr) minmax(340px, 1.28fr);
  gap: 20px 24px;
}
@media (max-width: 767px) {
  .dusk-verdict__facts {
    grid-template-columns: 1fr;
  }
}
.dusk-verdict__facts > div {
  gap: 7px;
  min-width: 0;
}
.dusk-verdict__actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.dusk-verdict__icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--muted); }
.dusk-verdict--found .dusk-verdict__icon { background: var(--positive-soft); color: var(--positive-text); }
.dusk-verdict--none .dusk-verdict__icon  { background: var(--muted); color: var(--muted-foreground); }

/* ---------------------------------------------------------------- line items */
/* Subscriptions, licences, invoice lines: a thing, its state, its number. */
.dusk-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.dusk-item:last-child { border-bottom: 0; }
.dusk-item__main { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dusk-item__name { font-weight: 500; }
.dusk-item__sub { font-size: 12px; color: var(--muted-foreground); }
.dusk-item__figure { text-align: right; font-variant-numeric: tabular-nums; }


/* ==========================================================================
   Phones do real work.
   Staff run this portal from a phone between meetings, so nothing here is a
   cut-down view: the same data, re-laid-out. Everything below is invisible on
   a desktop and takes over under 768px.
   ========================================================================== */

/* A back chevron and where you are — breadcrumbs do not survive 390px. */
.dusk-mobile-head {
  display: none;
  align-items: center;
  gap: 4px;
  height: 52px;
  padding: 0 8px 0 4px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 92%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.dusk-mobile-head__title { font-size: 15px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Role-based bottom bar. Staff: Resellers · Customers · Search · More. */
.dusk-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 96%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 6px);
  transform: translateZ(0);
}
.dusk-tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  border: 0;
  background: none;
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.dusk-tabbar__item svg { width: 20px; height: 20px; }
.dusk-tabbar__item i { font-size: 18px; line-height: 20px; }
.dusk-tabbar__item[aria-current="page"] { color: var(--brand-text); font-weight: 600; }
.dusk-tabbar__item[aria-current="page"] svg { color: var(--brand); }
.dusk-tabbar__item[aria-current="page"] i { color: var(--brand); }

/* Filters, confirmations and long menus arrive from the bottom, within reach. */
.dusk-sheet {
  width: 100%;
  max-width: none;
  margin: 0;
  margin-top: auto;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  background: var(--popover);
  color: var(--foreground);
}
.dusk-sheet::backdrop { background: rgb(0 0 0 / 45%); }
.dusk-sheet__grab { width: 36px; height: 4px; margin: 10px auto 0; border-radius: 999px; background: var(--fill); }
.dusk-sheet__head { padding: 12px 20px 8px; }
.dusk-sheet__body { padding: 8px 20px; max-height: 60vh; overflow-y: auto; }
.dusk-sheet__foot {
  display: flex;
  gap: 10px;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}
.dusk-sheet__foot > * { flex: 1; }

/* Filter chips scroll sideways instead of wrapping into three rows. */
.dusk-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  margin: 0 -16px;
  padding: 0 16px;
}
.dusk-scroller::-webkit-scrollbar { display: none; }
.dusk-scroller > * { scroll-snap-align: start; flex: none; }

/* A table row, re-laid-out. Same data, stacked, with the number kept on the right. */
.dusk-listrow {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.dusk-listrow:last-child { border-bottom: 0; }
.dusk-listrow:active { background: var(--muted); }
.dusk-listrow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dusk-listrow__title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dusk-listrow__meta {
  display: flex;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted-foreground);
}
.dusk-listrow__meta > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dusk-listrow__meta > :not(:first-child) { flex: none; }
.dusk-listrow__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }

/* The save bar stops floating and parks above the tab bar. */
.dusk-savebar--sticky {
  position: fixed;
  inset: auto 8px calc(68px + env(safe-area-inset-bottom)) 8px;
  z-index: 35;
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 35%);
}

@media (max-width: 767px) {
  /* Prevent iOS Safari / mobile browser auto-zoom on input focus (< 16px triggers zoom) */
  input,
  select,
  textarea,
  .dusk-input,
  .dusk-select,
  .dusk-textarea,
  .dusk-search input,
  .dusk-filter-chip {
    font-size: 16px !important;
  }

  /* Prevent side-to-side rubber-band bouncing on mobile without breaking fixed positioning */
  html {
    max-width: 100vw;
    overflow-x: hidden;
  }
  body {
    max-width: 100vw;
    overflow-x: hidden;
    min-height: 100dvh;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Constrain popovers to never push beyond mobile viewport */
  .dusk-popover {
    max-width: calc(100vw - 32px) !important;
    box-sizing: border-box;
  }

  /* Full-width responsive search bar in mobile filter cards */
  .dusk-search {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Mobile head and bottom tab bar */
  .dusk-mobile-head { display: flex; }
  .dusk-tabbar { display: flex !important; }
  .dusk-topbar { display: none; }
}

/* ================================================================
   Records, subscriptions and activity (added 22 Sep 2026).
   Nick's proposals from the dev component lab, redrawn to the rules.
   ================================================================ */

/* ---------------------------------------------------------------- hero, expandable */
/* The hero's second layer: the facts that don't earn a place in the header. */
.dusk-hero__more { margin-top: 16px; border-top: 1px solid var(--border); }
.dusk-hero__more > summary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 0 0; font-size: 13px; color: var(--soft-foreground);
  cursor: pointer; list-style: none;
}
.dusk-hero__more > summary::-webkit-details-marker { display: none; }
.dusk-hero__more > summary::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 150ms ease; }
.dusk-hero__more[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.dusk-hero__more > summary:hover { color: var(--foreground); }
.dusk-hero__more > .dusk-kv { padding-top: 16px; }

/* ---------------------------------------------------------------- plate */
/* A small identity strip at the top of a flow: whose account this change is for. */
.dusk-plate {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card);
}
.dusk-plate__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dusk-plate__name { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.dusk-plate__meta { font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dusk-plate__facts { display: flex; gap: 32px; }
.dusk-plate__facts > div { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.dusk-plate__facts dt { font-size: 12px; color: var(--muted-foreground); }
.dusk-plate__facts dd { margin: 0; font-size: 13px; }

/* ---------------------------------------------------------------- subscription card */
/* One subscription (a SKU): what it is, its state, its plan and renewal, and what you can change. */
.dusk-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.dusk-sub { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.dusk-sub.is-attention { border-color: var(--warning-border); }
.dusk-sub__head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 12px; }
.dusk-sub__icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--border); border-radius: 8px; }
.dusk-sub__icon svg { width: 16px; height: 16px; }
.dusk-sub__titles { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.dusk-sub__product { font-size: 12px; color: var(--muted-foreground); }
.dusk-sub__name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dusk-sub__id { font-size: 12px; color: var(--muted-foreground); }
.dusk-sub__body { display: flex; flex-direction: column; gap: 14px; padding: 0 16px 16px; flex: 1; }
.dusk-sub__body .dusk-kv { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.dusk-sub__seats { display: flex; flex-direction: column; gap: 6px; }
.dusk-sub__seats-row { display: flex; justify-content: space-between; font-size: 13px; }
.dusk-sub__note { font-size: 12px; color: var(--soft-foreground); }
.dusk-sub__foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.dusk-sub__foot > .dusk-menu { margin-left: auto; }

/* ---------------------------------------------------------------- plan choice */
/* Picking one of two to four plans. A radio group dressed as cards — grey until chosen. */
.dusk-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; border: 0; padding: 0; margin: 0; }
.dusk-choice { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); cursor: pointer; transition: border-color 150ms ease; }
@media (min-width: 768px) {
  .dusk-choices:has(.dusk-choice__logos) {
    grid-template-rows: auto auto auto 1fr auto;
  }
  .dusk-choice:has(.dusk-choice__logos) {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 5;
    row-gap: 8px;
  }
}
.dusk-choice:hover { border-color: var(--input); }
.dusk-choice > input { position: absolute; top: 16px; right: 16px; width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.dusk-choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.dusk-choice:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.dusk-choice__name { display: flex; align-items: center; gap: 8px; padding-right: 24px; font-weight: 500; }
.dusk-choice__logos {
  display: flex;
  align-items: center;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  padding-right: 26px;
  margin-bottom: 2px;
}
.dusk-choice__logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 65%, var(--card));
  font-size: 11.5px;
  font-weight: 500;
  color: var(--foreground);
  line-height: 1.2;
  white-space: nowrap;
}
.dusk-choice__logo-pill img,
.dusk-choice__logo-pill svg {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.dusk-choice__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.01em;
  align-self: start;
}
.dusk-choice__sub {
  font-size: 12.5px;
  color: var(--muted-foreground);
  margin-top: -2px;
  align-self: start;
}
.dusk-inline-copy {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 24px;
  max-width: 100%;
  padding: 0;
  margin: 0 3px;
  border-radius: 6px;
  border: 1px solid color-mix(in oklab, var(--border) 60%, var(--foreground) 40%);
  background: var(--fill);
  color: var(--foreground);
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.dusk-copyable .dusk-inline-copy {
  margin: 0;
  height: 28px;
}
.dusk-inline-copy:hover {
  border-color: var(--brand);
  background: color-mix(in oklab, var(--fill) 88%, var(--brand) 12%);
}
.dusk-inline-copy:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.dusk-inline-copy__id {
  padding: 0 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.dusk-inline-copy__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 10px;
  border-left: 1px solid var(--border);
  background: var(--card);
  color: var(--soft-foreground);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.dusk-inline-copy__action:first-child {
  border-left: 0;
  padding: 0 12px;
  font-size: 12px;
  color: var(--foreground);
}
.dusk-inline-copy:hover .dusk-inline-copy__action {
  color: var(--brand-text);
  background: var(--brand-soft);
  border-left-color: color-mix(in oklab, var(--brand) 30%, var(--border));
}
.dusk-inline-copy[data-copied="true"] {
  border-color: color-mix(in oklab, var(--positive) 45%, var(--border));
}
.dusk-inline-copy[data-copied="true"] .dusk-inline-copy__action {
  background: var(--positive-soft);
  color: var(--positive-text);
  border-left-color: color-mix(in oklab, var(--positive) 35%, var(--border));
}
.dusk-choice__price { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dusk-choice__price small { font-size: 12px; font-weight: 400; color: var(--muted-foreground); letter-spacing: 0; }
.dusk-choice ul { margin: 0; padding-left: 16px; font-size: 13px; color: var(--soft-foreground); display: flex; flex-direction: column; gap: 4px; align-self: start; }
.dusk-choice__fit { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted-foreground); }

/* ---------------------------------------------------------------- active filters */
/* Which filters are on, each removable, and one way to clear them all. */
.dusk-filterbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.dusk-filterbar__count { color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.dusk-filterbar .dusk-chip.is-applied { padding-right: 4px; cursor: default; }
.dusk-chip__remove { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; }
.dusk-chip__remove:hover { background: var(--brand-border); }
.dusk-chip__remove svg { width: 12px; height: 12px; }
.dusk-filterbar__clear { margin-left: auto; }

/* ---------------------------------------------------------------- activity */
/* Comments and system events in one stream. People get a circle, the system a square. */
.dusk-composer { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.dusk-composer__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dusk-timeline__item { position: relative; display: flex; gap: 12px; padding: 12px 0; }
.dusk-timeline__item:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 48px; bottom: -12px; width: 1px; background: var(--border); }
.dusk-timeline__dot { flex: none; }
.dusk-timeline__dot--sys { border-radius: 8px; color: var(--muted-foreground); }
.dusk-timeline__dot--sys svg { width: 14px; height: 14px; }
.dusk-timeline__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.dusk-timeline__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.dusk-timeline__who { font-weight: 500; }
.dusk-timeline__who span { font-weight: 400; color: var(--muted-foreground); }
.dusk-timeline__when { flex: none; font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.dusk-timeline__bubble { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; color: var(--foreground); }
.dusk-timeline__text { font-size: 13px; color: var(--soft-foreground); }
.dusk-timeline__text strong { color: var(--foreground); font-weight: 500; }

/* ---------------------------------------------------------------- dialog pieces */
.dusk-modal--wide { width: min(560px, calc(100vw - 32px)); }
/* Direct children only, so fields side by side in a .dusk-grid2 stay level. */
.dusk-modal__body > * + .dusk-field, .dusk-modal__body > * + .dusk-grid2, .dusk-modal__body > * + fieldset { margin-top: 14px; }
.dusk-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
/* Permissions in a form: one row each, name and meaning on the left, the switch on the right. */
.dusk-permlist { margin: 0; padding: 0; border: 0; }
.dusk-permlist legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--foreground); }
.dusk-perm { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); cursor: pointer; }
.dusk-perm__name { font-size: 13px; color: var(--foreground); }
.dusk-perm__desc { font-size: 12px; color: var(--muted-foreground); }
.dusk-modal__facts { margin: 0; padding: 16px 20px; border: 1px solid var(--border); border-radius: 10px; background: color-mix(in oklab, var(--muted) 35%, var(--card)); }
.dusk-modal__facts.dusk-kv { grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.dusk-modal__facts.dusk-kv > div { gap: 4px; }
.dusk-copyable { display: inline-flex; align-items: center; gap: 2px; }

@media (max-width: 767px) {
  .dusk-hero__title h1 { font-size: 20px; }
  .dusk-plate { align-items: flex-start; }
  .dusk-plate__facts { width: 100%; gap: 16px; }
  .dusk-plate__facts > div { flex: 1; min-width: 0; }
  .dusk-subs { grid-template-columns: 1fr; }
  .dusk-sub__foot > .dusk-btn { flex: 1; }
  .dusk-choices { grid-template-columns: 1fr; }
  .dusk-filterbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dusk-filterbar .dusk-chip { flex: none; }
  .dusk-chip__remove { width: 32px; height: 32px; }
  .dusk-grid2 { grid-template-columns: 1fr; }
  .dusk-modal__facts.dusk-kv { grid-template-columns: 1fr; }
  .dusk-timeline__head { flex-direction: column; gap: 0; }
}
.dusk-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ================================================================
   Customer side (added 12 Oct 2026): the record band and the renewal line.
   ================================================================ */

/* The record page's one lift: the identity band (--band / --band-foreground per theme).
   Ink in light; in midnight and aurora a surface one step above the card, dark on dark, never white (a white band on a black
   page was too stark, 13 Oct 2026). A hairline ring and the brand hairline under it carry the lift. Everything inside reads the
   band tokens, so no component needs to know it is on the band. */
.dusk-hero--band {
  --foreground: var(--band-foreground);
  --soft-foreground: color-mix(in oklab, var(--band-foreground) 82%, transparent);
  --muted-foreground: color-mix(in oklab, var(--band-foreground) 68%, transparent);
  --muted: color-mix(in oklab, var(--band-foreground) 12%, transparent);
  --fill: color-mix(in oklab, var(--band-foreground) 16%, transparent);
  --border: color-mix(in oklab, var(--band-foreground) 24%, transparent);
  --card: var(--band);
  --background: var(--band);
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--band);
  color: var(--band-foreground);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--band-foreground) 14%, transparent), inset 0 -2px 0 var(--brand);
}
.dusk-hero--band h1, .dusk-hero--band a { color: var(--foreground); }
.dusk-hero--band .dusk-hero__more { flex-basis: 100%; }

/* The renewal line on a subscription card: first thing in the body, because
   partners keep missing that commitments have renewal settings. Grey, not tinted. */
.dusk-sub__renewal {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; background: var(--muted);
  font-size: 13px; color: var(--soft-foreground);
}
.dusk-sub__renewal > svg { flex: none; color: var(--muted-foreground); }
.dusk-sub__renewal > span { flex: 1; min-width: 0; }
.dusk-sub__renewal strong { color: var(--foreground); font-weight: 500; }
a.dusk-item { color: inherit; text-decoration: none; }
a.dusk-item:hover { background: var(--muted); }

/* ---------------------------------------------------------------- order flow (added 13 Oct 2026) */
/* A choice the customer already has: still shown, so the catalogue reads the same every time, but not selectable. */
.dusk-choice:has(> input:disabled) { cursor: not-allowed; background: var(--muted); opacity: 0.6; }
.dusk-choice:has(> input:disabled):hover { border-color: var(--border); }
.dusk-choice:has(> input:disabled) > input:disabled { cursor: not-allowed; opacity: 0.45; }
.dusk-choice:has(> input:disabled) .dusk-choice__name,
.dusk-choice:has(> input:disabled) .dusk-choice__title,
.dusk-choice:has(> input:disabled) .dusk-choice__sub,
.dusk-choice:has(> input:disabled) .dusk-choice__fit,
.dusk-choice:has(> input:disabled) .dusk-choice__logo-pill,
.dusk-choice:has(> input:disabled) ul { color: var(--muted-foreground); }
.dusk-choice:has(> input:disabled) .dusk-choice__logo-pill img,
.dusk-choice:has(> input:disabled) .dusk-choice__logo-pill svg { filter: grayscale(100%); opacity: 0.6; }
.dusk-choice__flag { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); }
.dusk-choice__flag svg { width: 13px; height: 13px; }
/* A count that is usually typed, sometimes nudged. The input is the control; the buttons are a convenience. */
.dusk-stepper { display: inline-flex; align-self: flex-start; align-items: stretch; height: 40px; border: 1px solid var(--input); border-radius: 10px; overflow: hidden; background: var(--card); }
.dusk-stepper input { width: 96px; border: 0; text-align: center; font: inherit; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; background: transparent; color: var(--foreground); -moz-appearance: textfield; }
.dusk-stepper input::-webkit-outer-spin-button, .dusk-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dusk-stepper input:focus { outline: 0; }
.dusk-stepper button { width: 40px; border: 0; background: transparent; color: var(--muted-foreground); cursor: pointer; display: grid; place-items: center; }
.dusk-stepper button:hover { background: var(--muted); color: var(--foreground); }
.dusk-stepper button svg { width: 14px; height: 14px; }
.dusk-stepper:focus-within { border-color: var(--ring); box-shadow: 0 0 0 1px var(--ring); }
.dusk-stepper[aria-invalid="true"] { border-color: var(--critical-text); box-shadow: 0 0 0 1px var(--critical-text); }
/* A short list of exclusive options with a sentence each. Radios, not cards: the options are too alike for cards. */
.dusk-options { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.dusk-option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--border); cursor: pointer; }
.dusk-option:first-child { border-top: 0; }
.dusk-option > input { flex: none; margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--brand); }
.dusk-option:has(> input:checked) { background: var(--brand-soft); }
.dusk-option__name { font-size: 13px; font-weight: 500; color: var(--foreground); }
.dusk-option__desc { font-size: 12px; color: var(--muted-foreground); }
@media (max-width: 767px) {
  .dusk-stepper { height: 44px; }
  .dusk-stepper button { width: 44px; }
}

/* plan prices and the plan guide (added 13 Oct 2026, from the live walk) */
.dusk-price { display: grid; grid-template-columns: 1fr auto auto; gap: 3px 12px; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 12px; }
.dusk-price__window { grid-column: 1 / -1; margin-top: 4px; font-size: 11px; color: var(--muted-foreground); }
.dusk-price__window:first-child { margin-top: 0; }
.dusk-price__label { color: var(--muted-foreground); }
.dusk-price__value { font-variant-numeric: tabular-nums; color: var(--foreground); text-align: right; white-space: nowrap; }
.dusk-price__margin { font-variant-numeric: tabular-nums; color: var(--positive-text); text-align: right; white-space: nowrap; min-width: 72px; }
.dusk-choice:has(> input:disabled) .dusk-price__value, .dusk-choice:has(> input:disabled) .dusk-price__margin { color: var(--muted-foreground); }
.dusk-choice__more { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; color: var(--brand); text-decoration: none; }
.dusk-choice__more:hover { text-decoration: underline; }
.dusk-guide { border: 1px solid var(--border); border-radius: 12px; padding: 2px 18px; background: var(--card); }
.dusk-guide > summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; padding: 14px 0; font-size: 13.5px; font-weight: 600; color: var(--foreground); cursor: pointer; list-style: none; }
.dusk-guide > summary::-webkit-details-marker { display: none; }
.dusk-guide > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted-foreground); border-bottom: 1.5px solid var(--muted-foreground); transform: rotate(-45deg); margin-right: 4px; transition: transform .15s; flex: none; align-self: center; }
.dusk-guide[open] > summary::before { transform: rotate(45deg); }
.dusk-guide > summary .dusk-muted { font-weight: 400; font-size: 12.5px; }
.dusk-guide > :not(summary) { margin-bottom: 16px; }
.dusk-compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dusk-compare__col { margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.dusk-compare__title { font-size: 13.5px; font-weight: 600; color: var(--foreground); padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.dusk-compare__col > div { display: flex; flex-direction: column; gap: 2px; }
.dusk-compare dt { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-foreground); }
.dusk-compare dd { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--soft-foreground); }
@media (max-width: 767px) { .dusk-guide { padding: 2px 14px; } .dusk-compare { grid-template-columns: 1fr; } .dusk-price { grid-template-columns: 1fr auto; } .dusk-price__margin { grid-column: 2; min-width: 0; } }

/* ==========================================================================
 * Dusk Popover & Actions Dropdown Menu
 * ========================================================================== */
.dusk-popover {
  position: absolute;
  top: calc(100% + 4px);
  z-index: 1060;
  display: none;
  min-width: 200px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
}
.dusk-popover.is-open {
  display: block;
}
.dusk-popover--right {
  right: 0;
  left: auto;
}
.dusk-popover--left {
  left: 0;
  right: auto;
}
.dusk-popover__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 4px 8px 2px;
  letter-spacing: 0.5px;
}
.dusk-popover__divider {
  margin: 6px 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.dusk-popover .dusk-btn {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  gap: 8px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}
.dusk-popover .dusk-btn:hover,
.dusk-popover a.dusk-btn:hover {
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
}
.dusk-popover .dusk-btn:active,
.dusk-popover a.dusk-btn:active {
  transform: scale(0.98);
}

/* Copy Action Button Feedback */
.dusk-btn-copy {
  transition: all 180ms ease;
}
.dusk-btn-copy.is-copied {
  border-color: var(--positive) !important;
  color: var(--positive) !important;
  background: color-mix(in oklab, var(--positive) 12%, transparent) !important;
}

/* Monospace Identifier */
.ident {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

/* ==========================================================================
   Dusk Filter Chips (Theme-Aligned Popover Filter Triggers)
   ========================================================================== */
.dusk-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 140ms ease;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.dusk-filter-chip:hover {
  background: var(--fill);
  border-color: color-mix(in oklab, var(--border) 60%, var(--foreground) 40%);
}
.dusk-filter-chip:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent);
}
.dusk-filter-chip strong {
  color: var(--brand);
  font-weight: 600;
}
.dusk-filter-chip svg.caret-icon,
.dusk-filter-chip i.fa-chevron-down {
  color: var(--muted-foreground);
  font-size: 10px;
  transition: transform 140ms ease;
  flex-shrink: 0;
}
.dusk-filter-chip[aria-expanded="true"] svg.caret-icon,
.dusk-filter-chip[aria-expanded="true"] i.fa-chevron-down {
  transform: rotate(180deg);
}

/* Popover Select List Items */
.dusk-popover-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 6px;
}
.dusk-popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--foreground);
  text-align: left;
  background: transparent;
  border: 0;
  width: 100%;
  transition: background-color 120ms ease;
  user-select: none;
}
.dusk-popover-item:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.dusk-popover-item.is-active {
  font-weight: 600;
  color: var(--brand);
  background: color-mix(in oklab, var(--brand) 10%, transparent);
}
.dusk-popover-item .item-check {
  margin-left: auto;
  color: var(--brand);
  opacity: 0;
  font-size: 11px;
}
.dusk-popover-item.is-active .item-check {
  opacity: 1;
}

/* African Jurisdictions SVG Flag Embed */
.dusk-flag {
  display: inline-block;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  overflow: hidden;
  vertical-align: -1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}
.dusk-flag svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   Phase 2: Reference App (dar-portal-2026) Shared Component Library Sync
   ========================================================================== */

/* Non-hyphenated button modifier aliases & icon button primitives */
.dusk-btn-ghost {
  background: transparent;
  color: var(--foreground);
  border-color: transparent;
}
.dusk-btn-ghost:hover:not(:disabled) {
  background: var(--fill);
  border-color: var(--border);
}
.dusk-btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}
.dusk-btn-icon,
.dusk-btn--icon {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}
.dusk-btn-icon-sm,
.dusk-btn--icon-sm {
  width: 28px;
  height: 28px;
  padding: 0;
  justify-content: center;
  font-size: 12px;
}

/* Inline table action icon buttons */
.dusk-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.dusk-action-btn:hover {
  background: var(--fill);
  color: var(--foreground);
  border-color: var(--border);
}
.dusk-action-btn--danger:hover {
  background: color-mix(in oklab, var(--destructive), transparent 88%);
  color: var(--destructive);
  border-color: color-mix(in oklab, var(--destructive), transparent 70%);
}

/* Structured Filter Bar Primitives */
.dusk-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  margin-bottom: 16px;
}
.dusk-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dusk-filter-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}
.dusk-filter-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
}
.dusk-filter-Search {
  position: relative;
  min-width: 240px;
}
.dusk-filter-select {
  height: 34px;
  padding: 0 28px 0 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font-size: 13px;
}
.dusk-filter-select--compact {
  height: 30px;
  font-size: 12px;
}
.dusk-filter-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
}

/* Partner Selection Card Grid Primitives */
.partner-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.partner-select-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s ease;
}
.partner-select-card:hover,
.partner-select-card.active {
  border-color: var(--brand);
  background: var(--fill);
}
.partner-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--brand), transparent 85%);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.partner-card-info {
  min-width: 0;
  flex: 1;
}
.partner-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.partner-card-meta {
  font-size: 11px;
  color: var(--muted-foreground);
}
.partner-card-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--foreground);
}

/* Collapsible Details Panel Primitives */
.dusk-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 10px);
  background: var(--card);
  overflow: hidden;
}
.dusk-panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--foreground);
  list-style: none;
}
.dusk-panel-summary::-webkit-details-marker {
  display: none;
}
.dusk-panel-chevron {
  transition: transform 0.2s ease;
  color: var(--muted-foreground);
}
.dusk-panel[open] .dusk-panel-chevron {
  transform: rotate(180deg);
}
.dusk-panel-body {
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* Global Viewport-Aware Floating Tooltip */
#dusk-global-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  background: var(--popover, #0f172a);
  color: var(--popover-foreground, #f8fafc);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  white-space: nowrap;
}
#dusk-global-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Order, Licence Increase & Transfer Flows Standardisation
   ========================================================================== */

/* Customer-Safe View: Hides Partner Buy Price, Discount %, and Margin elements */
body.is-customer-safe .partner-margin-only,
.is-customer-safe .partner-margin-only,
body.is-customer-safe .dusk-price__margin,
.is-customer-safe .dusk-price__margin {
  display: none !important;
}

.dusk-customer-safe-btn.is-active,
.dusk-customer-safe-btn[aria-pressed="true"] {
  background: var(--brand-soft);
  color: var(--brand-text);
  border-color: color-mix(in oklab, var(--brand) 45%, var(--border));
}

/* Global Customer & Subscription Breadcrumb & Action Bar */
.dusk-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.dusk-main > .dusk-breadcrumb-bar {
  margin-bottom: 0;
}

.dusk-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  line-height: 1.4;
}

.dusk-breadcrumbs__link {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 140ms ease;
}

.dusk-breadcrumbs__link:hover {
  color: var(--brand-text);
  text-decoration: underline;
}

.dusk-breadcrumbs__sep {
  color: var(--muted-foreground);
  opacity: 0.65;
  user-select: none;
}

.dusk-breadcrumbs__current {
  color: var(--foreground);
  font-weight: 600;
}

.dusk-breadcrumb-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* Top Flow Bar & Company Plate */
#duskOrderFlowMain {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#duskOrderFlowMain .dusk-section {
  gap: 16px;
}

#duskOrderFlowMain .dusk-section > .dusk-section__head {
  padding: 4px 0 0 0;
}

.dusk-skeleton-stack,
.dusk-transfer-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dusk-flow-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dusk-flow-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dusk-flow-plate {
  margin-bottom: 0;
}

.dusk-plate__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dusk-flow-steps {
  margin-bottom: 4px;
}

/* High-Visibility Async Hydration Loading Banner & Shimmer */
.dusk-loading-banner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: color-mix(in oklab, var(--brand-soft) 65%, var(--card));
  border: 1px solid color-mix(in oklab, var(--brand) 45%, var(--border));
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.dusk-loading-banner__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dusk-loading-spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.5px solid color-mix(in oklab, var(--brand) 22%, transparent);
  border-top-color: var(--brand);
  animation: duskSpin 1.8s linear infinite;
  flex-shrink: 0;
}

@keyframes duskSpin {
  to { transform: rotate(360deg); }
}

.dusk-loading-banner__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 2px 0;
}

.dusk-loading-banner__sub {
  font-size: 12.5px;
  color: var(--soft-foreground);
  margin: 0;
}

/* Ensure legacy Bulma/global rules never cause low-contrast text (light-on-light or dark-on-dark) in Dusk order views */
#duskOrderFlowMain strong,
#duskOrderFlowMain b {
  color: var(--foreground);
}

#duskOrderFlowMain h1,
#duskOrderFlowMain h2,
#duskOrderFlowMain h3,
#duskOrderFlowMain h4,
#duskOrderFlowMain h5,
#duskOrderFlowMain h6,
#duskOrderFlowMain .dusk-section__title {
  color: var(--foreground) !important;
}

#duskOrderFlowMain .dusk-section__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0;
}

#duskOrderFlowMain .dusk-section__sub,
#duskOrderFlowMain .dusk-section__desc {
  color: var(--soft-foreground) !important;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 4px 0 0 0;
}

/* Spacious Empty State Card (No Eligible SKUs / No Offers) */
.dusk-empty-state-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warning);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dusk-empty-state-card__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.dusk-empty-state-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--warning-soft);
  color: var(--warning-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dusk-empty-state-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 6px 0;
}

.dusk-empty-state-card__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--soft-foreground);
  margin: 0;
  max-width: 72ch;
}

.dusk-empty-state-card__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  width: 100%;
}

/* Quick-Click Filter Toolbar */
.dusk-filter-bar-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.dusk-filter-row,
.dusk-filter-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.dusk-toolbar__filters,
.dusk-filter-bar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.dusk-filter-row__label,
.dusk-filter-bar-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--soft-foreground);
  width: 100px;
  min-width: 100px;
  flex-shrink: 0;
  margin: 0;
}

.dusk-filter-row__action {
  margin-left: auto;
  flex-shrink: 0;
}

/* Subtle Unavailable Offers Strip */
.dusk-unavailable-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--soft-foreground);
}

.dusk-unavailable-strip__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--soft-foreground);
}

.dusk-unavailable-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--soft-foreground);
}

.dusk-unavailable-pill strong {
  color: var(--foreground);
  font-weight: 600;
}

.dusk-unavailable-strip i {
  font-size: 13px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.dusk-unavailable-strip__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dusk-unavailable-strip__item strong {
  color: var(--foreground);
  font-weight: 600;
}

/* Stage 1 Catalog Header Card & Visual Separator before SKU Categories */
.dusk-catalog-header-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dusk-catalog-header-card > .dusk-section__head {
  padding: 0;
}

.dusk-catalog-header-card__toolbar {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin: 0;
}

.dusk-catalog-categories-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 2px 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--soft-foreground);
}

.dusk-catalog-categories-divider span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.dusk-catalog-categories-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* SKU Catalog Selection Categories & Accordion Containers (Stage 1) */
.dusk-sku-category,
.dusk-sku-category-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dusk-sku-category:hover {
  border-color: color-mix(in oklab, var(--brand) 38%, var(--border));
}

.dusk-sku-category__header,
.dusk-sku-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  background: var(--card);
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.dusk-sku-category__header:hover {
  background: color-mix(in oklab, var(--card) 93%, var(--brand));
}

.dusk-sku-category__header:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--ring) 45%, transparent);
}

.dusk-sku-category__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dusk-sku-category__icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.dusk-sku-category__title,
.dusk-sku-category-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dusk-sku-category__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dusk-sku-category__count {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--soft-foreground);
}

.dusk-sku-category__toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--soft-foreground);
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.dusk-sku-category__header:hover .dusk-sku-category__toggle-pill {
  color: var(--foreground);
  border-color: color-mix(in oklab, var(--brand) 50%, var(--border));
  background: color-mix(in oklab, var(--surface) 88%, var(--brand));
}

.dusk-sku-category__chevron {
  font-size: 11px;
  color: var(--soft-foreground);
  transition: transform 0.2s ease, color 0.15s ease;
}

.dusk-sku-category.is-collapsed .dusk-sku-category__header,
.dusk-sku-category__header.collapsed {
  border-bottom-color: transparent;
  background: var(--surface);
}

.dusk-sku-category.is-collapsed .dusk-sku-category__chevron,
.dusk-sku-category__header.collapsed .dusk-sku-category__chevron {
  transform: rotate(-90deg);
}

.dusk-sku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.dusk-sku-grid.category-content {
  padding: 16px 18px;
  background: color-mix(in oklab, var(--surface) 55%, var(--card));
}

.dusk-sku-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--foreground);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.dusk-sku-card:hover {
  border-color: var(--brand);
  background: color-mix(in oklab, var(--card) 94%, var(--brand));
  transform: translateY(-1px);
  color: var(--foreground);
  text-decoration: none;
}

.dusk-sku-card:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--ring) 30%, transparent);
}

.dusk-sku-card__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dusk-sku-card__icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  overflow: hidden;
  padding: 6px;
}

.dusk-sku-card__icon img,
img.dusk-sku-card__icon {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.dusk-sku-card__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--foreground);
  margin: 0 0 4px 0;
}

.dusk-sku-card__desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--soft-foreground);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dusk-sku-card__id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-foreground);
}

.dusk-sku-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-text);
}

.dusk-sku-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-text);
  text-decoration: none;
  font-weight: 600;
}

.dusk-sku-card__cta:hover {
  text-decoration: underline;
}

/* Stage 2: Dedicated Pricing & Offer Cards + Dynamic N-Phase Matrix */
#duskOffersList {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dusk-offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

.dusk-offer-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.dusk-offer-card:hover {
  border-color: color-mix(in oklab, var(--brand) 55%, var(--border));
}

.dusk-offer-card--recommended,
.dusk-offer-card.is-recommended {
  border-color: color-mix(in oklab, var(--brand) 60%, var(--border));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--brand) 25%, transparent);
}

.dusk-offer-card__head,
.dusk-offer-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.dusk-offer-card__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.dusk-offer-card__sub,
.dusk-offer-card__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--soft-foreground);
  margin: 8px 0 0 0;
  max-width: 82ch;
}

.dusk-offer-card__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Offer & Tier Callout Tags */
.dusk-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--soft-foreground);
  white-space: nowrap;
}

.dusk-pill i {
  font-size: 10px;
  opacity: 0.9;
}

.dusk-pill--neutral {
  background: var(--surface);
  color: var(--soft-foreground);
  border-color: var(--border);
}

.dusk-pill--brand {
  background: var(--brand-soft);
  color: var(--brand-text);
  border-color: var(--brand-border);
}

.dusk-pill--positive {
  background: var(--positive-soft);
  color: var(--positive-text);
  border-color: color-mix(in oklab, var(--positive) 28%, transparent);
}

.dusk-pill--warning {
  background: var(--warning-soft);
  color: var(--warning-text);
  border-color: color-mix(in oklab, var(--warning) 30%, transparent);
}

.dusk-pill--danger {
  background: var(--danger-soft);
  color: var(--danger-text);
  border-color: color-mix(in oklab, var(--danger) 28%, transparent);
}

/* Subtle, distinct promotional & regional discount callout badges */
.dusk-pill--promo {
  background: linear-gradient(135deg, var(--positive-soft) 0%, color-mix(in oklab, var(--positive-soft) 65%, var(--card)) 100%);
  color: var(--positive-text);
  border: 1px solid color-mix(in oklab, var(--positive) 38%, var(--border));
  border-left: 3px solid var(--positive);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dusk-pill--regional {
  background: linear-gradient(135deg, var(--warning-soft) 0%, color-mix(in oklab, var(--warning-soft) 65%, var(--card)) 100%);
  color: var(--warning-text);
  border: 1px solid color-mix(in oklab, var(--warning) 42%, var(--border));
  border-left: 3px solid var(--warning);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dusk-tier-promo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  max-width: 100%;
}

.dusk-tier-promo-tags .dusk-pill {
  white-space: normal;
  text-align: left;
}

.dusk-offer-card__cta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.dusk-offer-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.dusk-phase-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.dusk-phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-bottom: 4px;
}

.dusk-phase-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}

.dusk-phase-grid .dusk-phase-box {
  display: flex;
  flex-direction: column;
}

.dusk-phase-box + .dusk-phase-box {
  margin-top: 14px;
}

.dusk-phase-grid .dusk-phase-box + .dusk-phase-box {
  margin-top: 0;
}

.dusk-phase-box--promo {
  border-left: 3px solid var(--positive);
}

.dusk-phase-box__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--soft-foreground);
}

@media (min-width: 961px) {
  .dusk-phase-grid .dusk-phase-box__header {
    min-height: 50px;
  }
}

.dusk-phase-box__heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dusk-phase-box__title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--foreground);
  line-height: 1.35;
}

.dusk-phase-box__period {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--soft-foreground);
  line-height: 1.35;
}

.dusk-phase-box__dates {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--soft-foreground);
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Override legacy public/css/style.css `thead { background-color: var(--dawn-grey); }` beige header */
.dusk-tier-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
  background: transparent;
}

.dusk-tier-table thead,
.dusk-tier-table thead tr,
.dusk-tier-table thead th {
  background: color-mix(in oklab, var(--card) 75%, var(--surface)) !important;
  background-color: color-mix(in oklab, var(--card) 75%, var(--surface)) !important;
  color: var(--soft-foreground) !important;
}

.dusk-tier-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--soft-foreground);
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

@media (min-width: 961px) {
  .dusk-phase-grid .dusk-tier-table thead th {
    height: 44px;
  }
}

.dusk-tier-table th:nth-child(1),
.dusk-tier-table td:nth-child(1) {
  width: 44%;
}

.dusk-tier-table th:nth-child(2),
.dusk-tier-table td:nth-child(2),
.dusk-tier-table th:nth-child(3),
.dusk-tier-table td:nth-child(3) {
  width: 28%;
}

.dusk-tier-table td {
  padding: 12px;
  color: var(--foreground);
  border-bottom: 1px dashed var(--border);
  font-variant-numeric: tabular-nums;
  vertical-align: top;
  overflow-wrap: break-word;
}

@media (min-width: 961px) {
  .dusk-phase-grid .dusk-tier-table tbody tr {
    height: 74px;
  }
}

.dusk-tier-table tr:last-child td {
  border-bottom: none;
}

.dusk-tier-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
  line-height: 22px;
  min-height: 22px;
  display: flex;
  align-items: center;
}

.dusk-tier-promo-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  min-height: 22px;
}

.dusk-price-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 541px) {
  .dusk-phase-grid .dusk-price-cell {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
  }
}

.dusk-price-val {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 22px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
}

.dusk-price-val.is-partner {
  color: var(--brand-text);
}

.dusk-price-discount {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  min-height: 22px;
  white-space: nowrap;
  background: var(--positive-soft);
  color: var(--positive-text);
  border: 1px solid color-mix(in oklab, var(--positive) 30%, transparent);
}

.dusk-price-margin {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  min-height: 22px;
  white-space: nowrap;
  background: var(--brand-soft);
  color: var(--brand-text);
  border: 1px solid color-mix(in oklab, var(--brand) 30%, transparent);
}

/* Stage 3 & Licence Increase: 2-Column Layout & Live Total Calculator */
.dusk-order-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.dusk-config-card,
.dusk-calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}

.dusk-config-card__title,
.dusk-calc-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--soft-foreground);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.dusk-config-card__title i,
.dusk-calc-card__title i {
  color: var(--brand-text);
  font-size: 13px;
}

.dusk-config-card__sub {
  font-size: 13px;
  color: var(--muted-foreground);
  margin: -6px 0 18px 0;
}

.dusk-form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 18px;
}

.dusk-form-group > label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.dusk-form-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted-foreground);
  line-height: 1.4;
}

.dusk-constraint-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--warning-soft);
  color: var(--warning-text);
  border: 1px solid color-mix(in oklab, var(--warning) 30%, transparent);
}

.dusk-constraint-badge--info {
  background: var(--brand-soft);
  color: var(--brand-text);
  border-color: color-mix(in oklab, var(--brand) 30%, transparent);
}

.dusk-flow-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.dusk-calc-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

#liveOrderCalcBody,
#seatChangeCalcBody {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dusk-calc-phase-group {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

.dusk-calc-phase-group:first-child {
  padding-top: 0;
}

.dusk-calc-phase-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  margin-bottom: 6px;
}

.dusk-calc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  color: var(--soft-foreground);
  border-bottom: 1px dashed color-mix(in oklab, var(--border) 60%, transparent);
  min-width: 0;
}

.dusk-calc-row__label {
  color: var(--soft-foreground);
  min-width: 0;
}

.dusk-calc-row--total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  border-bottom: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
}

.dusk-calc-row__val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--foreground);
  text-align: right;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dusk-calc-row--total .dusk-calc-row__val {
  font-size: 18px;
  color: var(--brand-text);
}

.dusk-calc-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.dusk-calc-total__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dusk-calc-total__label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--foreground);
}

.dusk-calc-tax-note {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted-foreground);
  line-height: 1.35;
}

.dusk-calc-total__amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  text-align: right;
}

.dusk-calc-total__number {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-text);
  line-height: 1.2;
}

.dusk-calc-total__period {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.dusk-tax-note {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-foreground);
  margin-top: 6px;
  text-align: right;
}

/* Conscious Renewal Settings Selector */
.dusk-renewal-panel {
  margin-top: 4px;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.dusk-renewal-panel__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dusk-renewal-panel__sub {
  font-size: 12px;
  color: var(--muted-foreground);
  margin: 0 0 12px 0;
}

.dusk-option__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}

/* Confirmation Modal Breakdown */
.dusk-confirm-summary-plate {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
}

.dusk-confirm-summary-plate__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dusk-confirm-summary-plate__label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.dusk-confirm-summary-plate__val {
  font-size: 13px;
  color: var(--foreground);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dusk-confirm-breakdown {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--card);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.dusk-confirm-breakdown > .dusk-calc-card {
  border: none;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* Transfers Page Card Grid */
.dusk-transfer-sku-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

.dusk-transfer-sku-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.dusk-transfer-option,
.dusk-transfer-offer-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dusk-transfer-offer-label > input.offer-radio {
  flex: none;
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.dusk-transfer-offer-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.dusk-transfer-offer-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
}

.dusk-transfer-offer-price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
}

.dusk-transfer-option:hover,
.dusk-transfer-offer-label:hover {
  border-color: var(--brand);
}

.dusk-transfer-option.is-selected,
.dusk-transfer-offer-label.is-selected {
  border-color: var(--brand);
  background: color-mix(in oklab, var(--brand-soft) 50%, var(--card));
  box-shadow: inset 0 0 0 1px var(--brand);
}

/* Responsive Rules */
@media (max-width: 960px) {
  .dusk-phase-grid,
  .dusk-order-config-grid {
    grid-template-columns: 1fr;
  }

  .dusk-calc-card {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .dusk-flow-plate {
    padding: 16px 14px;
  }

  .dusk-flow-plate__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .dusk-flow-plate__title {
    font-size: 17px;
  }

  .dusk-flow-plate__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dusk-flow-steps {
    grid-auto-flow: row;
  }

  .dusk-catalog-header-card {
    padding: 14px;
  }

  .dusk-catalog-search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .dusk-catalog-results-badge {
    align-self: flex-start;
  }

  .dusk-filter-row,
  .dusk-filter-bar-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
  }

  .dusk-filter-row__label,
  .dusk-filter-bar-label {
    width: auto;
    min-width: 0;
  }

  .dusk-toolbar__filters,
  .dusk-filter-bar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .dusk-filter-row .dusk-chip,
  .dusk-filter-bar-row .dusk-chip {
    height: 32px;
    min-height: 32px;
    padding: 0 11px;
    font-size: 12.5px !important;
  }

  .dusk-filter-row__action {
    margin-left: 0;
    width: 100%;
    padding-top: 4px;
  }

  .dusk-filter-row__action .dusk-btn {
    width: 100%;
    justify-content: center;
  }

  .dusk-sku-category__header,
  .dusk-sku-category-header {
    padding: 12px 14px;
    gap: 8px;
  }

  .dusk-sku-category__title,
  .dusk-sku-category-title {
    font-size: 14px;
  }

  .dusk-sku-category__toggle-pill .js-cat-toggle-label {
    display: none;
  }

  .dusk-sku-grid.category-content {
    padding: 12px;
  }

  .dusk-offer-grid,
  .dusk-sku-grid {
    grid-template-columns: 1fr;
  }

  .dusk-offer-card,
  .dusk-config-card,
  .dusk-calc-card {
    padding: 16px 14px;
  }

  .dusk-offer-card__head,
  .dusk-offer-card__header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .dusk-offer-card__head > .dusk-btn,
  .dusk-offer-card__header > .dusk-btn {
    width: 100%;
    justify-content: center;
  }

  .dusk-phase-box {
    padding: 12px 14px;
  }

  .dusk-phase-box__header,
  .dusk-phase-box-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 12px;
    min-height: 0;
    padding: 0 0 10px 0;
  }

  .dusk-guide {
    padding: 2px 14px;
  }

  .dusk-confirm-breakdown {
    padding: 12px;
  }

  .dusk-confirm-breakdown > .dusk-calc-card {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .dusk-calc-row {
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .dusk-calc-row__label {
    flex-shrink: 0;
  }

  .dusk-calc-row__val {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .dusk-calc-total {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .dusk-calc-total__amount {
    align-items: flex-start;
    text-align: left;
    width: 100%;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
  }

  .dusk-flow-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .dusk-flow-actions .dusk-btn {
    width: 100%;
    justify-content: center;
  }

  .dusk-sticky-mobile-bar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 12px 14px;
    margin: 0 -14px -14px -14px;
  }

  /* Global Breadcrumb & Action Bar Mobile Layout (Sticky Top Bar) */
  .dusk-breadcrumb-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: color-mix(in oklab, var(--background) 92%, var(--card));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 14px 10px;
    margin: -12px -14px 14px -14px;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .dusk-plate,
  .dusk-flow-plate {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .dusk-plate__who {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
  }

  .dusk-plate__who > div:last-child {
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
  }

  .dusk-plate__name {
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
  }

  .dusk-plate__meta,
  .dusk-plate__meta .ident {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .dusk-plate__facts {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .dusk-breadcrumbs {
    font-size: 12px;
    gap: 5px;
    width: 100%;
  }

  .dusk-breadcrumbs__link,
  .dusk-breadcrumbs__current {
    max-width: 165px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: bottom;
  }

  .dusk-breadcrumb-bar__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 6px;
  }

  .dusk-breadcrumb-bar__actions .dusk-btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 34px;
    font-size: 12px;
    padding: 4px 10px;
  }

  /* Savebar & Inline Copy Pills on Mobile */
  .dusk-savebar {
    position: sticky;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    z-index: 35;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .dusk-savebar__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .dusk-savebar__actions {
    margin-left: 0;
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .dusk-savebar__actions .dusk-btn {
    flex: 1 1 50%;
    justify-content: center;
    min-height: 40px;
    text-align: center;
  }

  .dusk-inline-copy {
    max-width: 100%;
  }

  .dusk-inline-copy__id {
    max-width: 180px;
  }

  /* Hero Actions, Section Cards, Verdict & Transfer Offer Cards on Mobile */
  .dusk-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .dusk-hero__actions .dusk-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .dusk-section__head {
    padding: 16px 16px 12px;
  }

  .dusk-section__body {
    padding: 4px 16px 18px;
    gap: 16px;
  }

  .dusk-verdict:has(> .dusk-verdict__head),
  .dusk-verdict--stack {
    padding: 16px;
  }

  .dusk-verdict__actions .dusk-btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    height: auto;
    min-height: 40px;
    padding: 8px 14px;
  }

  .dusk-domain-check-row > .dusk-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .dusk-transfer-sku-card {
    padding: 16px 14px;
  }

  .dusk-transfer-offer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .dusk-transfer-offer-content > div:last-child {
    text-align: left !important;
  }
}

@media (max-width: 540px) {
  .dusk-tier-table,
  .dusk-tier-table tbody,
  .dusk-tier-table tr,
  .dusk-tier-table td {
    display: block;
    width: 100%;
  }

  .dusk-tier-table thead {
    display: none;
  }

  .dusk-phase-grid .dusk-tier-table tbody tr,
  .dusk-tier-table tbody tr {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: auto;
    padding: 12px 0;
    border-top: 1px solid var(--border);
  }

  .dusk-tier-table tbody tr:first-child {
    border-top: none;
    padding-top: 4px;
  }

  .dusk-tier-table td {
    padding: 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .dusk-tier-table td:first-child {
    justify-content: flex-start;
  }

  .dusk-tier-table td[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
  }

  .dusk-phase-grid .dusk-price-cell,
  .dusk-price-cell {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }
}

.dusk-choices--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 767px) {
  .dusk-choices--2col {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- dev / local environment watermark */
.dusk-env-watermark {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 999999;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 0.95));
  color: #ffffff;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
  white-space: nowrap;
  transition:
    bottom 240ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 200ms ease;
}

/* Mobile default position (clear of mobile bottom tab bar) */
@media (max-width: 767px) {
  .dusk-env-watermark {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    right: 12px;
  }
}

/* Automatically elevate watermark out of the way of the floating save bar whenever present and active */
body:has(.dusk-savebar--floating:not([style*="display: none"]):not([style*="display:none"])) .dusk-env-watermark,
body:has(.dusk-savebar.is-visible) .dusk-env-watermark,
body:has(.dusk-savebar--floating.is-dirty) .dusk-env-watermark,
body:has(.dusk-savebar.is-dirty) .dusk-env-watermark,
body.has-active-savebar .dusk-env-watermark {
  bottom: 86px;
}

@media (max-width: 767px) {
  body:has(.dusk-savebar--floating:not([style*="display: none"]):not([style*="display:none"])) .dusk-env-watermark,
  body:has(.dusk-savebar.is-visible) .dusk-env-watermark,
  body:has(.dusk-savebar--floating.is-dirty) .dusk-env-watermark,
  body:has(.dusk-savebar.is-dirty) .dusk-env-watermark,
  body.has-active-savebar .dusk-env-watermark {
    bottom: calc(136px + env(safe-area-inset-bottom, 0px));
  }
}

.dusk-env-watermark__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  display: inline-block;
  flex-shrink: 0;
  animation: pulseDevDot 1.6s infinite ease-in-out;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.dusk-env-watermark__group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dusk-env-watermark__label {
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, sans-serif);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.dusk-env-watermark__pill {
  font-family: var(--font-mono, 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.dusk-env-watermark__divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.24);
  margin: 0 2px;
}

@keyframes pulseDevDot {
  0% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 0.35; transform: scale(0.85); }
}

