/* ==========================================================================
   NEO Backup & NEO Disaster Recovery — Biznet Gio portal prototype
   Consolidated stylesheet (v5)

   1.  Fonts
   2.  Design tokens
   3.  Base & accessibility
   4.  Portal shell (header, sidebar, workspace)
   5.  Page headers, breadcrumbs, tabs, steps
   6.  Buttons, badges, form controls
   7.  Panels, cards, metrics, notices
   8.  Tables, pagination, progress, empty states
   9.  Subscription lists
   10. Order & configuration (NEO Backup + NEO DR)
   11. Subscription detail (overview, workloads, activity)
   12. Workload detail drawer
   13. Upgrade pages
   14. Review pages
   15. Responsive
   ========================================================================== */

/* 1. Fonts — Source Sans 3 (SIL OFL 1.1), bundled locally so the portal
   typeface renders without a network dependency. */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Design tokens ========================================================= */
:root {
  /* ── BGN 2025 design tokens (Figma "Portal BGN 2024" / BGN Portal Template library) ── */
  --bgn-neutral-0: #ffffff;
  --bgn-neutral-300: #bcc2c9;      /* Placeholder, disabled font with BG */
  --bgn-neutral-400: #939eab;      /* Font (secondary) */
  --bgn-neutral-900: #222222;
  --bgn-primary-500: #46e1b4;      /* Button */
  --bgn-primary-900: #07c28c;      /* Font */
  --bgn-secondary-25: #f9fbfd;     /* Row hover */
  --bgn-secondary-50: #f2f7fa;     /* BG, BG disabled */
  --bgn-secondary-100: #e9f1f4;    /* Divider */
  --bgn-secondary-200: #dbe9ee;    /* Border, disabled font */
  --bgn-secondary-300: #d3e3ea;    /* Stroke, divider */
  --bgn-secondary-400: #b8d0da;    /* Icon */
  --bgn-success-50: #e6fff8;
  --bgn-success-900: #07c28c;
  --bgn-warning-50: #fff9e7;
  --bgn-warning-500: #e6b518;
  --bgn-warning-900: #e6b518;
  --bgn-error-50: #fff5f5;
  --bgn-error-500: #f25c4f;
  --bgn-error-900: #f03727;
  --bgn-shadow-xs-tables: 0 10px 20px rgba(0, 0, 0, 0.05);

  /* Typography — Figma text styles (Source Sans Pro; Source Sans 3 is its renamed successor) */
  --font: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --tracking: -0.02em;             /* Figma letterSpacing -2 (%) on p14 / H6 / H4 */
  --text-xs: 13px;                 /* Body/p13 13/18 */
  --text-sm: 13px;                 /* Body/p13 */
  --text-md: 14px;                 /* Body/p14 14/21 */
  --text-lg: 16px;                 /* Heading/H6 16/24 */
  --text-xl: 16px;                 /* Heading/H6 — card titles */
  --text-2xl: 20px;                /* Heading/H4 20/30 */
  --text-3xl: 20px;                /* Heading/H4 — page titles, key figures */

  /* Semantic aliases used by the components */
  --ink: var(--bgn-neutral-900);
  --ink-2: var(--bgn-neutral-900);
  --muted: var(--bgn-neutral-400);
  --subtle: var(--bgn-neutral-300);
  --mint: var(--bgn-primary-900);
  --mint-text: var(--bgn-primary-900);
  --mint-button: var(--bgn-primary-500);
  --mint-button-hover: #31d8a7;    /* not defined in the library (Primary/300 unresolved) */
  --mint-button-active: #22c997;
  --on-mint: var(--bgn-neutral-900);
  --mint-soft: var(--bgn-success-50);
  --mint-tint: var(--bgn-success-50);
  --mint-line: var(--bgn-secondary-300);

  /* Status — BGN 2025 has no info/blue or violet ramp; those map to the Secondary ramp */
  --info: var(--bgn-neutral-900);
  --info-soft: var(--bgn-secondary-50);
  --info-line: var(--bgn-secondary-300);
  --attention: var(--bgn-warning-900);
  --attention-fill: var(--bgn-warning-500);
  --attention-soft: var(--bgn-warning-50);
  --attention-line: var(--bgn-warning-500);
  --danger: var(--bgn-error-900);
  --danger-soft: var(--bgn-error-50);
  --violet: var(--bgn-neutral-900);
  --violet-soft: var(--bgn-secondary-50);

  /* Surfaces & lines */
  --bg: var(--bgn-neutral-0);
  --surface: var(--bgn-neutral-0);
  --surface-2: var(--bgn-secondary-25);
  --table-head: var(--bgn-secondary-50);
  --border: var(--bgn-secondary-100);
  --divider: var(--bgn-secondary-100);
  --control-border: var(--bgn-secondary-300);
  --control-border-hover: var(--bgn-secondary-400);
  --sidebar-border: #e6eaee;       /* Figma sidebar rectangle stroke (raw value) */

  /* Shape, depth, motion */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-pill: 999px;
  --shadow-sm: var(--bgn-shadow-xs-tables);   /* Shadow/XSmall - Tables */
  --shadow-md: var(--bgn-shadow-xs-tables);
  --shadow-drawer: -16px 0 48px rgba(20, 40, 34, 0.16);
  --ease: 0.15s ease;

  /* Layout */
  --sidebar-w: 270px;
  --brand-h: 110px;          /* logo slot: 40px top + 45px logo + 25px */
  --header-h: 76px;          /* 20px top + 45px action row + 10px + 1px divider */
  --gutter-l: 40px;
  --gutter-r: 80px;
  --content-max: 1200px;
  --card-pad: 30px;          /* inner gutter shared by list cards */
  --control-h: 40px;
}

/* ── Optional: WCAG AA text-contrast override ──────────────────────────────
   The BGN 2025 text colours fail WCAG AA on white: Neutral/400 #939eab is 2.7:1,
   Primary/900 #07c28c is 2.3:1, and Warning/900 #e6b518 is 1.9:1. Remove the
   comment markers below to swap in darker shades of the same hues. Each reaches
   at least 4.5:1, and the backgrounds, icons and buttons stay on-brand.
:root {
  --muted: #646d79;
  --mint-text: #037f5a;
  --attention: #9a6110;
  --danger: #c23c3c;
}
*/

/* 3. Base & accessibility ================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.5;                 /* 14/21 */
  letter-spacing: var(--tracking);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,
h2,
h3 {
  line-height: 1.5;                 /* H4 20/30, H6 16/24 */
  font-weight: 600;
  letter-spacing: var(--tracking);
  color: var(--ink);
}
/* Body/p13 13/18 carries no tracking in the BGN styles */
small,
.badge,
.fineprint {
  letter-spacing: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: var(--mint-text);
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}
::placeholder {
  color: var(--subtle);
  opacity: 1;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--ease);
}
.skip-link:focus {
  transform: none;
}
/* Material Symbols (Outlined) — rendered from the inline sprite in index.html.
   Icons size with font-size (1em) and take the text colour. */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ms {
  width: 1em;
  height: 1em;
  flex: none;
  display: inline-block;
  fill: currentColor;
  vertical-align: -0.2em;
  pointer-events: none;
}
/* Material Symbols line weight, matched to the sidebar BGN icons (~0.85px outlines/strokes).
   On-screen thickness = weight stroke × size ÷ 960, so the weight follows the rendered size:
   w400 for 14px (0.88px), w300 for 16–22px (default, 0.76–1.0px), w200 for 24–28px (0.77–0.9px). */
.badge .ms,
.attention-copy .ms,
.fineprint .ms {
  --ms-w300: none;
  --ms-w400: inline;
}
.metric-grid .metric-icon .ms,
.portal-header-actions .ms {
  --ms-w300: none;
  --ms-w200: inline;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 4. Portal shell ==========================================================
   Layout follows Portal BGN 2024 (Figma "NEO Wordpress", 4595:13063):
   full-height 270px sidebar holding the logo and an edge toggle; the header
   lives inside the content column; content sits 40px from the sidebar with
   an 80px right gutter (1050px content at a 1440px viewport). */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}
@media (prefers-reduced-motion: reduce) {
  .app-shell { transition: none !important; }
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  background: var(--surface);
}
.sidebar-brand {
  position: relative;
  flex: none;
  height: var(--brand-h);
  padding: 40px 0 0 40px;
}
.portal-brand {
  display: inline-flex;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
/* Official Biznet GioCloud logo (assets/biznet-giocloud-logo.svg), scaled
   proportionally from its 70 × 32 artboard to the 45px logo slot. */
.portal-logo {
  display: block;
  width: auto;
  height: 45px;
}
/* Edge toggle: 30px circle centred on the sidebar's right edge, aligned to the logo. */
.burger-button {
  position: absolute;
  top: 47px;
  right: -15px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 30px;                  /* Figma side-menu toggle, 30×30 */
  transition: filter var(--ease);
}
.burger-button:hover {
  filter: brightness(0.96);
}
.toggle-icon-mobile {
  display: none;
}

/* Collapsed sidebar — Figma 1262:770: 120px rail, B mark only, icons at x 40,
   category chevrons at x 75, 80px hairlines; the edge toggle flips to "expand". */
.portal-mark {
  display: none;
  width: 37px;
  height: 45px;
}
@media (min-width: 901px) {
  .app-shell {
    transition: grid-template-columns 0.2s ease;
  }
  .app-shell.sidebar-collapsed {
    --sidebar-w: 120px;
  }
  .sidebar-collapsed .portal-logo {
    display: none;
  }
  .sidebar-collapsed .portal-mark {
    display: block;
  }
  .sidebar-collapsed .toggle-icon-desktop {
    transform: scaleX(-1);
  }
  .sidebar-collapsed .side-nav > a {
    gap: 0;
    padding-right: 0;
    font-size: 0;                   /* label stays in the accessibility tree */
    letter-spacing: 0;
  }
  .sidebar-collapsed .side-nav .nav-chevron {
    margin-left: 15px;
  }
  .sidebar-collapsed .side-subnav {
    display: none;
  }
  /* Content takes back the 150px the rail frees (1050 → 1200 at 1440px) */
  .sidebar-collapsed .portal-header,
  .sidebar-collapsed main {
    max-width: calc(var(--content-max) + 150px);
  }
}

.side-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 24px;
}
.side-nav > a {
  position: relative;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 20px 0 40px;
  color: var(--ink);
  font-size: var(--text-md);
  letter-spacing: 0.3px;            /* Figma menu labels: 14 Regular, +0.3px */
  text-decoration: none;
  transition: background-color var(--ease), color var(--ease);
}
/* Hairline dividers between top-level rows, inset 20px each side */
.side-nav > a:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: var(--border);
}
.side-nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.side-nav a:focus-visible {
  outline-offset: -2px;
}
.side-nav .icon {
  width: 20px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 20px;                  /* BGN 2025 menu icons are 20×20 two-tone */
  line-height: 1;
  --icon-ink: var(--bgn-neutral-900);
  --icon-paper: var(--bgn-neutral-0);
  --icon-accent: var(--bgn-secondary-400);
  transition: color var(--ease);
}
.side-nav a:hover .icon {
  --icon-accent: var(--bgn-primary-500);
}
.nav-chevron {
  display: grid;
  margin-left: auto;
  width: 9px;
  color: var(--ink);
  font-size: 9px;                   /* Icon Black/Dropdown Down|Up 9×6 */
  line-height: 1;
}
.side-nav a.category.active {
  color: var(--mint-text);
  font-weight: 400;
}
.side-nav a.category.active .icon {
  --icon-accent: var(--bgn-primary-500);
}
.side-subnav {
  display: grid;
  padding: 0 0 8px;
}
.side-subnav a {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 20px 0 75px; /* aligns with the parent label column */
  color: var(--ink-2);
  font-size: var(--text-md);
  text-decoration: none;
  transition: background-color var(--ease), color var(--ease);
}
.side-subnav a {
  letter-spacing: 0.3px;
}
.side-subnav a.active {
  background: var(--bgn-secondary-25);
  box-shadow: inset 3px 0 0 var(--bgn-primary-500);
  color: var(--mint-text);
  font-weight: 400;
}

/* Content column */
.workspace {
  min-width: 0;
  padding: 0 var(--gutter-r) 0 var(--gutter-l);
  background: var(--bg);
}
.portal-header,
main {
  max-width: var(--content-max);
}
/* In-column header: actions right-aligned in a 45px row, divider beneath (76px total). */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: var(--header-h);
  padding-top: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bgn-secondary-300);   /* Figma header rule */
  background: var(--bg);
}
/* Mask the gutters beside the sticky header so card shadows (which bleed 20px past the
   content column) cannot peek out on either side while content scrolls underneath. */
.portal-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: calc(-1 * var(--gutter-r));
  bottom: -1px;
  left: calc(-1 * var(--gutter-l));
  z-index: -1;
  background: var(--bg);
  pointer-events: none;
}
.portal-header::after {              /* keep the divider at content width, above the mask */
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--bgn-secondary-300);
  pointer-events: none;
}
.portal-header-actions {
  display: flex;
  align-items: center;
  gap: 30px;
}
.portal-header-actions button {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  transition: background-color var(--ease);
}
.portal-header-actions button:hover {
  background: var(--bgn-secondary-50);
}
/* 45px vertical divider between header actions */
.portal-header-actions button + button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -15px;
  width: 1px;
  height: 45px;
  background: var(--bgn-secondary-100);    /* Secondary/100 (Divider) */
  transform: translateY(-50%);
}
.portal-header-actions button:first-child {
  width: 30px;
  height: 30px;
  border-radius: 5px;               /* Figma header button: 30px, radius 5 */
  background: var(--bgn-primary-500);
  color: var(--bgn-neutral-900);
  font-size: 18px;
}
.portal-header-actions button:first-child .ms {
  stroke-width: 0.6;                /* 12-unit glyph at 18px → 0.9px, as the sidebar icon strokes */
}
.portal-header-actions button:first-child:hover {
  background: var(--mint-button-hover);
}
main {
  padding: 20px 0 80px;
}

/* 5. Page headers, breadcrumbs, tabs, steps ================================
   Breadcrumb row with its own full-width divider → 30px → title row with
   actions inline on the right → 20px → content. The inner wrapper uses
   display: contents so breadcrumb, title and actions share one grid. */
.page-head,
.detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}
.page-head > div,
.detail-head > div:first-child {
  display: contents;
}
.page-head > div > *,
.detail-head > div:first-child > * {
  grid-column: 1;
}
.page-head > div > .breadcrumb,
.detail-head > div:first-child > .breadcrumb {
  grid-column: 1 / -1;
}
.page-head > .btn {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: center;
}
/* Detail pages: actions share the title row; the meta line runs full width beneath. */
.detail-head > .head-actions {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
}
.detail-head > div:first-child > .detail-meta {
  grid-column: 1 / -1;
}
.head-actions .btn {
  padding: 0 16px;
}
.page-head.compact {
  margin-bottom: 20px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 0 0 30px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);              /* trail items muted; only the current page is ink */
  font-size: var(--text-md);
  line-height: 21px;
}
.breadcrumb span:not(.breadcrumb-current) {
  display: inline-flex;
  margin: 0 8px;
  color: var(--muted);
  font-size: 5px;                   /* Icon Black/Breadcrumbs Arrow renders 4×5 */
}
.breadcrumb button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: inherit;
  font-weight: 400;
  letter-spacing: inherit;
}
.breadcrumb .breadcrumb-current {
  color: var(--ink);
}
.breadcrumb button:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-head h1,
.detail-head h1 {
  margin: 0;
  font-size: var(--text-3xl);       /* Heading/H4 Semibold 20/30 */
  font-weight: 600;
  line-height: 30px;
  letter-spacing: var(--tracking);
}
.page-head > div > p:last-child,
.detail-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--text-md);
}
.page-head .btn {
  flex: none;
}
.title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.title-line h1 {
  margin: 0;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 4px;
  margin-top: 10px;
  font-size: var(--text-sm);
  line-height: 20px;
}
/* Each item = muted label + ink value; items separated by a 12px hairline with 14px either side */
.detail-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.detail-meta > span + span::before {
  content: "";
  width: 1px;
  height: 12px;
  margin: 0 10px 0 14px;            /* +4px item gap = 14px each side */
  background: var(--control-border);
}
.detail-meta b {
  color: var(--ink);
  font-weight: 600;
}
/* Title-row actions sit inline (Figma: buttons side by side, 10px apart). */
.head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs button {
  margin-bottom: -1px;
  padding: 12px 20px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: var(--text-md);
  white-space: nowrap;
  transition: color var(--ease), border-color var(--ease);
}
.tabs button:hover {
  color: var(--ink);
}
.tabs button.active {
  border-bottom-color: var(--mint);
  color: var(--mint-text);
  font-weight: 600;
}
.tabs button:focus-visible {
  outline-offset: -2px;
}

.steps {
  display: flex;
  align-items: center;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.steps li {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.2;
}
.steps li:last-child {
  flex: none;
}
.steps li:not(:last-child)::after {
  content: "";
  flex: 1;
  min-width: 16px;
  height: 2px;
  margin: 0 16px;
  border-radius: 2px;
  background: var(--border);
}
.steps b {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bgn-secondary-50);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 600;
}
.steps li.active {
  color: var(--ink);
}
.steps li.active b {
  background: var(--mint-button);
  color: var(--on-mint);
}
.steps li.active::after {
  background: var(--mint);
}

/* 6. Buttons, badges, form controls ======================================= */
.btn {
  min-height: var(--control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--text-md);       /* Body/p14 Regular, as on Figma Button/Primary */
  font-weight: 400;
  letter-spacing: var(--tracking);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}
.btn.primary {
  background: var(--mint-button);
  color: var(--on-mint);
}
.btn.primary:hover {
  background: var(--mint-button-hover);
}
.btn.primary:active {
  background: var(--mint-button-active);
}
.btn.secondary {
  border-color: var(--bgn-neutral-900);
  background: var(--bgn-neutral-900);
  color: var(--bgn-neutral-0);
}
.btn.secondary:hover {
  border-color: #3a3a3a;
  background: #3a3a3a;
}
.btn.secondary:active {
  background: #000;
}
.btn.tertiary {
  border-color: var(--control-border);
  background: var(--surface);
  color: var(--ink);
}
.btn.tertiary:hover {
  border-color: var(--control-border-hover);
  background: var(--surface-2);
}
.btn.tertiary:active {
  background: var(--bgn-secondary-50);
}
.btn:disabled,
.btn:disabled:hover {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}
.btn.primary:disabled {
  background: var(--mint-button);
}
.btn.wide {
  width: 100%;
  margin-top: 20px;
}
.btn.wide + .btn.wide {
  margin-top: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;                 /* Body/p13 Semibold */
  line-height: 1.4;
  white-space: nowrap;
}
.badge .ms {
  font-size: 14px;
}
.badge.success {
  background: var(--mint-soft);
  color: var(--mint-text);
}
.badge.attention {
  background: var(--attention-soft);
  color: var(--attention);
}
.badge.info {
  background: var(--info-soft);
  color: var(--info);
}
.badge.neutral {
  background: var(--bgn-secondary-50);
  color: var(--muted);
}
.badge.danger {
  background: var(--danger-soft);   /* Error/50 */
  color: var(--danger);             /* Error/900 */
}

/* Text inputs and selects share one control spec */
input[type="text"],
input[type="number"],
input[type="email"],
select {
  height: var(--control-h);
  padding: 0 12px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--ink);
  font-size: var(--text-md);
  transition: border-color var(--ease), box-shadow var(--ease);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6' fill='none'%3E%3Cpath d='M0.353516 0.353577L4.35352 4.35358L8.35352 0.353577' stroke='%23222222'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 9px 6px;         /* Icon Black/Dropdown Down */
  cursor: pointer;
}
input[type="text"]:hover,
input[type="number"]:hover,
input[type="email"]:hover,
select:hover {
  border-color: var(--control-border-hover);
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus {
  border-color: var(--mint);
  outline: none;
}

.search {
  height: var(--control-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.search:hover {
  border-color: var(--control-border-hover);
}
.search:focus-within {
  border-color: var(--mint);
}
.search > .ms {
  font-size: 20px;
}
.search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: var(--text-md);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px var(--card-pad);
  border-bottom: 1px solid var(--border);
}
.toolbar .search {
  flex: 1;
  min-width: 220px;
}
.toolbar select {
  min-width: 180px;
}

/* Labelled form fields */
.form-grid {
  display: grid;
  gap: 16px 20px;
}
.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-grid label,
.service-fields label,
.sku-select {
  display: block;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
}
.form-grid input,
.form-grid select,
.service-fields input,
.sku-select select {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-weight: 400;
}
.form-grid small,
.service-fields small,
.sku-select small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.45;
}
.service-fields {
  display: grid;
  gap: 16px;
}
.service-fields.single,
.sku-select {
  width: 100%;
  max-width: none;                  /* fill the card, as the other form fields */
}

.toggle {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  margin: 0;
  border-radius: var(--radius-pill);
  background: var(--bgn-secondary-300);
  vertical-align: middle;
  cursor: pointer;
  transition: background-color var(--ease);
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 40, 34, 0.2);
  transition: transform var(--ease);
}
.toggle:hover {
  background: var(--bgn-secondary-400);
}
.toggle:checked {
  background: var(--mint-button);
}
.toggle:checked::after {
  transform: translateX(18px);
}

input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--bgn-secondary-200);
}
input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--bgn-secondary-200);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 3px solid var(--bgn-neutral-0);
  border-radius: 50%;
  background: var(--bgn-primary-500);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid var(--bgn-neutral-0);
  border-radius: 50%;
  background: var(--bgn-primary-500);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--mint);
}

.stepper {
  display: inline-grid;
  grid-template-columns: 32px minmax(40px, auto) 32px;   /* equal − / + targets */
  justify-self: start;
  height: 32px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.stepper button,
.stepper span {
  display: grid;
  place-items: center;
}
.stepper button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mint-text);
  font-size: 12px;                  /* BGN Add / Remove 12×12, 1px stroke */
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease);
}
.stepper button:hover:not(:disabled) {
  background: var(--mint-soft);
}
.stepper button:active:not(:disabled) {
  background: var(--bgn-success-50);
}
.stepper button:disabled {
  color: var(--bgn-neutral-300);
  cursor: not-allowed;
}
.stepper button:focus-visible {
  outline-offset: -2px;
}
.stepper span {
  padding: 0 6px;
  border-left: 1px solid var(--control-border);
  border-right: 1px solid var(--control-border);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Stepper as a form field: full width, control height, editable value */
.stepper.stepper-field {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  width: 100%;
  height: var(--control-h);
  margin-top: 6px;
  transition: border-color var(--ease);
}
.stepper.stepper-field:hover {
  border-color: var(--control-border-hover);
}
.stepper.stepper-field:focus-within {
  border-color: var(--mint);
}
.form-grid .stepper-field input,
.stepper-field input[type="number"] {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-right: 1px solid var(--control-border);
  border-left: 1px solid var(--control-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper-field input::-webkit-outer-spin-button,
.stepper-field input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
.stepper-field input:focus {
  outline: none;
}

/* 7. Panels, cards, metrics, notices ====================================== */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.section-card,
.summary-card {
  padding: var(--card-pad);
}
.section-card {
  container-type: inline-size;
}
.section-card h2,
.summary-card h2,
.overview-grid h2,
.placeholder-pane h2,
.activity-head h2,
.review-card h2,
.payment-card h2,
.review-summary h2 {
  margin: 0 0 4px;
  font-size: var(--text-xl);
  font-weight: 600;
}
.section-card > p,
.section-title-row p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: var(--text-md);
}
.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.placeholder-pane .panel {
  padding: var(--card-pad);
}
.placeholder-pane p {
  margin: 0;
  color: var(--muted);
}

.metric-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.metric-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metric {
  min-height: 100px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.metric > div {
  min-width: 0;
}
.metric strong {
  display: block;
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.metric > div > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.metric-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  font-size: 24px;
  line-height: 1;
}
.metric-icon.mint {
  background: var(--mint-soft);
  color: var(--mint-text);
}
.metric-icon.blue {
  background: var(--info-soft);
  color: var(--info);
}
.metric-icon.amber {
  background: var(--attention-soft);
  color: var(--attention);
}
.metric-icon.violet {
  background: var(--violet-soft);
  color: var(--violet);
}
/* BGN-style metric tiles: neutral icon well (Info soft), icons in the sidebar default
   accent; the tile's tone colour is carried by the card's top rule. */
.bgn-metrics .metric-icon,
.bgn-metrics .metric-icon.mint,
.bgn-metrics .metric-icon.blue,
.bgn-metrics .metric-icon.violet,
.bgn-metrics .metric-icon.amber,
.bgn-metrics .metric-icon.red,
.bgn-metrics .metric-icon.neutral {
  background: var(--info-soft);
  color: var(--ink);
  --icon-ink: var(--bgn-neutral-900);
  --icon-paper: var(--bgn-neutral-0);
  --icon-accent: var(--bgn-secondary-400);
}
/* Tone moves from the label to a 4px top rule on the card; labels return to muted. */
.bgn-metrics .metric {
  border-top-width: 4px;
}
.bgn-metrics .metric:has(.metric-icon.mint) {
  border-top-color: var(--mint-text);
}
.bgn-metrics .metric:has(.metric-icon.blue) {
  border-top-color: var(--info);
}
.bgn-metrics .metric:has(.metric-icon.violet) {
  border-top-color: var(--violet);
}
.bgn-metrics .metric:has(.metric-icon.amber) {
  border-top-color: var(--attention);
}
.bgn-metrics .metric:has(.metric-icon.red) {
  border-top-color: var(--danger);
}
.bgn-metrics .metric:has(.metric-icon.neutral) {
  border-top-color: var(--bgn-secondary-400);
}
.metric-icon.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  line-height: 1.45;
}
.alert > .ms {
  margin-top: 1px;
  font-size: 18px;
}
.alert.info-banner {
  align-items: center;
  gap: 0;
  margin: 16px 0 0;
  padding: 12px 14px;               /* same as .activity-sync-note */
  border: 0;
  border-radius: 0;
  background: var(--bgn-success-50); /* Figma Alert · Success */
  color: var(--bgn-neutral-900);
  font-size: var(--text-md);        /* Body/p14/Regular 14/21 */
  line-height: 21px;
  letter-spacing: var(--tracking);
}
.alert.info-banner > .ms {
  display: none;                    /* Figma Alert has no leading icon */
}

/* 8. Tables, pagination, progress, empty states =========================== */
.table-wrap {
  position: relative; /* contains the .sr-only header label so it cannot widen the page */
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-md);
}
th {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-lg);        /* Heading/H6 Semibold 16/24 */
  font-weight: 600;
  line-height: 24px;
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--divider);
  vertical-align: middle;
}
td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.4;
}
td strong,
td b {
  font-weight: 600;
}
/* List tables: tinted header band (Figma "Main Table") and the 30px card gutter */
.table-wrap th {
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 0;
  background: var(--table-head);
}
.table-wrap th:first-child,
.table-wrap td:first-child {
  padding-left: var(--card-pad);
}
.table-wrap th:last-child,
.table-wrap td:last-child {
  padding-right: var(--card-pad);
}
.table-wrap tbody tr {
  transition: background-color var(--ease);
}
.table-wrap tbody tr:hover {
  background: var(--surface-2);
}
.table-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mint-text);
  font-weight: 600;
  text-align: left;
}
.table-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.row-menu {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--bgn-secondary-200);  /* Icon S/Deactive/Three Dot */
  font-size: 20px;
  line-height: 1;
  transition: background-color var(--ease), color var(--ease);
}
.row-menu:hover,
.row-menu:focus-visible {
  background: var(--bgn-secondary-50);
  color: var(--bgn-primary-500);    /* Icon S/Active/Three Dot */
}
.row-menu > .ms > use[href="#bgn-dropdown_right"] {
  color: var(--ink);
}
.row-menu:has(use[href="#bgn-dropdown_right"]) {
  color: var(--ink);
  font-size: 9px;                   /* Icon Black/Dropdown Right 6×9 */
}
td:last-child > .row-menu {
  float: right;
}

/* Pagination — Figma "Pagination" (Main Table): prev card · page-number card · next card */
.table-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 24px var(--card-pad) 30px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.table-footer div {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 20px;                        /* Figma: 20px between the three cards */
}
.page-arrow,
.page-numbers {
  height: 45px;
  border-radius: 5px;
  background: var(--bgn-neutral-0);
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);   /* Figma drop-shadow on pagination cards */
}
.page-arrow {
  width: 60px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-size: 17px;                  /* Icon Black/M/Arrow Left|Right, 17×13 */
  transition: background-color var(--ease), box-shadow var(--ease);
}
.page-arrow:hover:not(:disabled) {
  background: var(--bgn-secondary-25);
  box-shadow: 0 10px 14px rgba(0, 0, 0, 0.08);
}
.page-arrow:disabled {
  cursor: not-allowed;
  color: var(--bgn-neutral-300);
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 40px;                        /* Figma: 40px between page numbers */
  padding: 0 40px;
}
.page-numbers button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: var(--text-lg);        /* Heading/H6 Regular 16/24 */
  line-height: 24px;
  transition: color var(--ease);
}
.page-numbers button:hover {
  color: var(--mint-text);
}
.page-numbers button.selected {
  color: var(--bgn-primary-900);    /* current page: Primary/900 (Font) */
}
.page-numbers button:focus-visible,
.page-arrow:focus-visible {
  outline: 2px solid var(--bgn-primary-500);
  outline-offset: 2px;
}
.progress,
.large-progress {
  display: block;
  height: 6px;
  margin-top: 8px;
  border-radius: var(--radius-pill);
  background: var(--bgn-secondary-100);
  overflow: hidden;
}
.large-progress {
  height: 10px;
}
.progress b,
.large-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
}
.progress.warning-progress b {
  background: var(--attention-fill);
}
.progress.bluebar b {
  background: var(--bgn-secondary-400);
}

.empty-state {
  padding: 48px 20px;
  color: var(--muted);
  text-align: center;
}
.empty-state strong,
.empty-state span {
  display: block;
}
.empty-state strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: var(--text-lg);
}

/* 9. Subscription lists ==================================================== */
.subscription-list,
.table-panel,
.activity-panel {
  overflow: hidden;
}
.subscription-list table th:nth-child(1) {
  width: 27%;
}
.subscription-list table th:nth-child(2) {
  width: 25%;
}
.subscription-list table th:nth-child(3) {
  width: 19%;
}
.subscription-list table th:nth-child(4) {
  width: 14%;
}
.subscription-list td {
  height: 76px;
}
.service-name {
  font-size: var(--text-md);
}
.subscription-list .progress {
  max-width: 170px;
  height: 5px;
}
.attention-copy {
  color: var(--attention) !important;
}
.attention-copy .ms {
  margin-right: 4px;
  font-size: 14px;
}
.select-check {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--bgn-secondary-400);
  border-radius: 3px;
  background: var(--bgn-neutral-0) center / 10px no-repeat;
  cursor: pointer;
  transition: border-color var(--ease), background-color var(--ease);
}
.select-check:hover {
  border-color: var(--bgn-primary-500);
}
.select-check:checked {
  border-color: var(--bgn-primary-500);
  background-color: var(--bgn-primary-500);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.6 5.2 4 7.4 8.4 2.8' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.select-check:indeterminate {
  border-color: var(--bgn-primary-500);
  background-color: var(--bgn-primary-500);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.2 5h5.6' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
.select-check:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
#workloads-table tbody tr.is-selected td {
  background: var(--bgn-secondary-25);
}
.copy-icon {
  font-size: 12px;                  /* BGN Copy 12×12 */
  --icon-accent: var(--bgn-primary-500);
  --icon-paper: var(--bgn-neutral-0);
}
/* Copy-to-clipboard control wrapping the icon */
.copy-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: -3px -5px -3px 1px;       /* 12px glyph, 22px hit area, no row height change */
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  vertical-align: middle;
  cursor: pointer;
  transition: background-color var(--ease);
}
.copy-btn:hover {
  background: var(--bgn-secondary-50);
}
.copy-btn:active .copy-icon {
  transform: scale(0.9);
}
.copy-btn[data-state="copied"] {
  --icon-accent: var(--bgn-primary-900);
}
.copy-btn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 5;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bgn-neutral-900);
  color: var(--bgn-neutral-0);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 2px);
  transition: opacity var(--ease), transform var(--ease);
  pointer-events: none;
}
.copy-btn:hover::after,
.copy-btn:focus-visible::after,
.copy-btn[data-state]::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 10. Order & configuration ================================================ */
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.sticky {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

/* Package card */
.sku-detail:not(:empty) {
  margin-top: 20px;
}
.sku-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
/* Head: Secondary/50 band, as the summary-card headers */
.sku-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bgn-secondary-50);
}
.sku-card h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 21px;
}
.sku-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 18px;
}
/* SKU code reads as a neutral badge */
.sku-code {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bgn-neutral-0);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
/* Components: one row of figures with hairline separators (as the current-plan figures) */
.component-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}
.component {
  min-width: 0;
  padding: 16px 20px;
  border-left: 1px solid var(--divider);
}
.component:first-child {
  border-left: 0;
}
.component strong,
.component small {
  display: block;
}
.component > .badge {
  margin-bottom: 10px;
}
.component strong {
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 18px;
}
.component small {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 18px;
}
.component.muted strong {
  color: var(--muted);
}
.component.muted small {
  color: var(--subtle);
}

/* Custom workload rows */
.workload-list {
  display: grid;
}
.workload-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}
.workload-row:first-child {
  padding-top: 0;
}
.workload-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.workload-row strong {
  font-weight: 600;
}
.workload-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* Summary aside */
.summary-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.summary-title h2 {
  margin: 0;
}
.summary-title button,
.card-heading button,
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mint-text);
  font-size: var(--text-md);
  font-weight: 600;
}
.summary-title button:hover,
.card-heading button:hover,
.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.summary-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  font-size: var(--text-md);
}
.summary-item b {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.summary-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.summary-item > strong {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.summary-icon,
.workload-symbol {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--mint-soft);
  color: var(--mint-text);
  font-size: 20px;
  line-height: 1;
}
.workload-symbol {
  width: 40px;
  height: 40px;
  flex: none;
  background: var(--info-soft);     /* BGN icon well, as the metric tiles and add-ons */
  font-size: 22px;
  --icon-ink: var(--bgn-neutral-900);
  --icon-paper: var(--bgn-neutral-0);
  --icon-accent: var(--bgn-secondary-400);
}
.totals {
  margin-top: 8px;
}
.totals p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 6px 0;
  font-size: var(--text-md);
}
.totals p span {
  color: var(--muted);
}
.totals p strong {
  font-weight: 600;
}
.totals .grand {
  align-items: baseline;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.totals .grand span {
  color: var(--ink);
  font-size: var(--text-lg);
  font-weight: 600;
}
.totals .grand strong {
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.fineprint .ms {
  margin-right: 4px;
  font-size: 14px;
  vertical-align: -0.18em;
}
.fineprint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}

/* NEO DR configuration */
.working-label {
  flex: none;                       /* look comes from .badge.attention */
}
.bundle-callout {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border);  /* white tile, as .metric / .current-plan */
  border-radius: var(--radius-md);
  background: var(--surface);
}
.bundle-callout > span {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--info-soft);     /* BGN icon well, as the metric tiles */
  font-size: 24px;
  line-height: 1;
  --icon-ink: var(--bgn-neutral-900);
  --icon-paper: var(--bgn-neutral-0);
  --icon-accent: var(--bgn-secondary-400);
}
.bundle-callout small,
.bundle-callout strong {
  display: block;
}
.bundle-callout small {
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 16px;
}
.bundle-callout strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: var(--text-2xl);       /* Heading/H4 20 — key figure */
  font-weight: 600;
  line-height: 1.25;
}
.bundle-callout p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 18px;
}
/* Inclusion note — same structure and style as .activity-sync-note (Figma Alert · Success) */
.security-rmm {
  margin-top: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: var(--bgn-success-50);
  color: var(--bgn-neutral-900);
}
.security-rmm p {
  margin: 0;
  font-size: var(--text-md);        /* Body/p14/Regular 14/21, -2% */
  line-height: 21px;
  letter-spacing: var(--tracking);
}
.security-rmm strong {
  font-weight: 600;
}
.security-rmm small {
  color: inherit;
  font-size: var(--text-sm);
}
.dr-total {
  margin: 16px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: right;
}
.dr-total small,
.dr-total strong,
.dr-total span {
  display: block;
}
.dr-total small {
  color: var(--muted);
  font-size: var(--text-sm);
}
.dr-total strong {
  margin: 2px 0;
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.dr-total span {
  color: var(--muted);
  font-size: var(--text-xs);
}

/* 11. Subscription detail ================================================= */
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
}
.overview-grid > .panel {
  min-width: 0;
  padding: var(--card-pad);
}
.overview-grid h2 {
  margin-bottom: 0;
}
.chart-card h2 span {
  color: var(--subtle);
  font-size: 18px;
  font-weight: 400;
}
.card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.donut-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 48px;
  padding: 24px 0 8px;
}
.donut {
  position: relative;
  width: 168px;
  height: 168px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--mint) 0 100%);
}
.donut::after {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: var(--surface);
}
.donut span {
  z-index: 1;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.35;
  text-align: center;
}
.donut b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: var(--text-2xl);
  line-height: 1.1;
}
.legend {
  flex: 1;
  min-width: 180px;
  max-width: 240px;
}
.legend p {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}
.legend p:last-child {
  border-bottom: 0;
}
.legend b {
  font-weight: 600;
}
.dot {
  width: 10px;
  height: 10px;
  flex: none;
  display: inline-block;
  border-radius: 50%;
}
.mint-bg {
  background: var(--mint);
}
.red-bg {
  background: var(--danger);
}
.gray-bg {
  background: var(--bgn-secondary-300);
}

.details-card dl,
.storage-card dl {
  margin: 16px 0 0;
}
.details-card dl div,
.storage-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}
.details-card dl div:last-child,
.storage-card dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.storage-card dt {
  display: flex;
  align-items: center;
  gap: 8px;
}
.storage-card h2 {
  margin-bottom: 0;
}
.usage-number {
  margin: 20px 0 8px;
  color: var(--muted);
  text-align: right;
}
.usage-number strong {
  color: var(--ink);
  font-size: var(--text-2xl);
  font-weight: 600;
}
.storage-card > p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

/* Flush tables inside padded cards align to the card heading */
.recent-card table th:first-child,
.recent-card table td:first-child,
.review-card table th:first-child,
.review-card table td:first-child {
  padding-left: 0;
}
.recent-card table th:last-child,
.recent-card table td:last-child,
.review-card table th:last-child,
.review-card table td:last-child {
  padding-right: 0;
}
.recent-card tbody tr:last-child td,
.review-card tbody tr:last-child td {
  border-bottom: 0;
}
.recent-card tbody tr:hover,
.review-card tbody tr:hover {
  background: transparent;
}
.review-card .table-wrap th {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.recent-card table td:first-child b,
.recent-card table small {
  display: block;
}

/* Activity */
.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px var(--card-pad) 20px;
}
.activity-head h2 {
  margin: 0;
}
.activity-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.activity-head .btn {
  flex: none;
}
.activity-head + .toolbar {
  border-top: 1px solid var(--divider);
}
/* Figma "Alert" (Version=Desktop, State=Success, Align=Left; node 3478:9158) with its
   optional Button (Secondary · Small). Full-bleed bar, no icon, no radius. */
.activity-sync-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px var(--card-pad);     /* size, padding and margin as the previous inset note */
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: var(--bgn-success-50);
  color: var(--bgn-neutral-900);
}
.activity-sync-note p {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: var(--text-md);        /* Body/p14/Regular 14/21, -2% */
  line-height: 21px;
  letter-spacing: var(--tracking);
}
.activity-sync-note strong {
  font-weight: 600;
}
.activity-sync-note small {
  color: inherit;
  font-size: var(--text-sm);
}
.activity-sync-note button {
  flex: none;
  min-height: 24px;
  padding: 3px 20px;                /* Button · Secondary · Small */
  border: 0;
  border-radius: 5px;
  background: var(--bgn-neutral-900);
  color: var(--bgn-neutral-0);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0;
  transition: background-color var(--ease);
}
.activity-sync-note button:hover {
  background: #3a3a3a;
}
.activity-sync-note button:active {
  background: #000;
}
.activity-sync-note + .table-wrap {
  border-top: 1px solid var(--divider);
}

/* 12. Workload detail drawer =============================================== */
.workload-dialog {
  width: min(720px, 100vw);
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-drawer);
  overflow-y: auto;
}
.workload-dialog[open] {
  animation: drawer-in 0.22s ease-out;
}
.workload-dialog::backdrop {
  background: rgba(11, 28, 22, 0.36);
}
@keyframes drawer-in {
  from {
    transform: translateX(32px);
    opacity: 0;
  }
}
.dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 30px;               /* Secondary/50 header band, as the summary cards */
  border-bottom: 0;
  background: var(--bgn-secondary-50);
}
.dialog-header p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.26px;
}
.dialog-header h2 {
  margin: 0;
  font-size: var(--text-2xl);       /* Heading/H4 20 */
  font-weight: 600;
  line-height: 30px;
  letter-spacing: var(--tracking);
}
.dialog-header span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.dialog-header button {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  margin: -2px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 14px;                  /* Icon/Delete Text */
  line-height: 1;
  transition: background-color var(--ease);
}
.dialog-header button:hover {
  background: var(--bgn-neutral-0);
}
#workload-dialog-content {
  padding: 0 30px 30px;
}
/* Status line — badge + sync time, as the detail-meta row */
.detail-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -30px 24px;
  padding: 14px 30px;
  border-bottom: 1px solid var(--border);
  background: none;
}
.detail-status > span:last-child {
  color: var(--muted);
  font-size: var(--text-sm);
}
/* Each block is a card: Secondary/50 head band + hairline figure grid (as .sku-card) */
.detail-block {
  margin: 0 0 16px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.detail-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bgn-secondary-50);
}
.detail-block-head h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 21px;
}
.detail-block-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 18px;
}
.detail-block-head .btn {
  flex: none;
  min-height: 32px;
  padding: 0 16px;
  font-size: var(--text-sm);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}
.detail-grid div {
  min-width: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--divider);
}
.detail-grid div:nth-child(even) {
  border-left: 1px solid var(--divider);
}
.detail-grid dt {
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 18px;
}
.detail-grid dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 18px;
  text-align: left;
  overflow-wrap: anywhere;
}
.detail-grid code {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bgn-secondary-50);
  font-size: var(--text-xs);
  font-weight: 600;
}
/* Latest backup row — BGN icon well + title + status badge */
.latest-backup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 16px 20px;
  border: 0;
  border-top: 1px solid var(--divider);
  border-radius: 0;
  background: none;
}
.latest-backup .metric-icon {
  width: 40px;
  height: 40px;
  background: var(--info-soft);
  font-size: 22px;
  --icon-ink: var(--bgn-neutral-900);
  --icon-paper: var(--bgn-neutral-0);
  --icon-accent: var(--bgn-secondary-400);
}
.latest-backup strong,
.latest-backup small {
  display: block;
}
.latest-backup strong {
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 18px;
}
.latest-backup small {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 18px;
}
/* Source note — Figma Alert · Success, as .activity-sync-note */
.source-note {
  margin: 8px 0 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: var(--bgn-success-50);
  color: var(--bgn-neutral-900);
  font-size: var(--text-sm);
  line-height: 21px;
  letter-spacing: var(--tracking);
}

/* 13. Upgrade pages ======================================================== */
/* Current plan summary — one label-over-value rhythm, BGN icon well */
.current-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));   /* row 1: plan + status · row 2: three figures */
  align-items: center;
  padding: 20px 24px;
}
.current-plan > div {
  min-width: 0;
  padding: 0 20px;
  border-left: 1px solid var(--divider);
}
.current-plan > div:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 0;
  border-left: 0;
}
.current-plan > div:first-child > div,
.current-plan > div:not(:first-child) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.current-plan > div:not(:first-child) {
  flex-direction: column-reverse;   /* label above value, matching the plan block */
}
.current-plan strong,
.current-plan small {
  display: block;
  margin: 0;
}
.current-plan strong {
  color: var(--ink);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
}
.current-plan > div:not(:first-child) strong {
  white-space: nowrap;
}
.current-plan small {
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 16px;
  white-space: nowrap;
}
.current-plan .metric-icon,
.current-plan .metric-icon.mint {
  width: 44px;
  height: 44px;
  background: var(--info-soft);     /* as the .bgn-metrics wells */
  font-size: 24px;
  --icon-ink: var(--bgn-neutral-900);
  --icon-paper: var(--bgn-neutral-0);
  --icon-accent: var(--bgn-secondary-400);
}
.current-plan > div:first-child {
  grid-column: 1 / 3;
  grid-row: 1;
  padding-bottom: 16px;
}
.current-plan > .badge {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  justify-self: end;
}
.current-plan > div:not(:first-child) {
  grid-row: 2;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}
.current-plan > div:nth-child(2) {
  padding-left: 0;
  border-left: 0;
}

.upgrade-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.upgrade-table-head,
.upgrade-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 72px 124px 64px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.upgrade-table-head {
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
}
.upgrade-row {
  font-size: var(--text-md);
  border-bottom: 1px solid var(--divider);
}
.upgrade-row:last-child {
  border-bottom: 0;
}
.upgrade-row > span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
}
.upgrade-row > span:first-child .ms {
  flex: none;
  font-size: 20px;                  /* BGN 20×20, as the sidebar */
  --icon-ink: var(--bgn-neutral-900);
  --icon-paper: var(--bgn-neutral-0);
  --icon-accent: var(--bgn-secondary-400);
}
.upgrade-row b {
  color: var(--ink);
  font-weight: 600;
}
/* Current · New · Change share one centred numeric axis */
.upgrade-table-head > span:not(:first-child),
.upgrade-row > :not(:first-child) {
  justify-self: center;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.change-positive {
  color: var(--mint-text);
  font-weight: 600;
}

/* Storage picker — no boxes: Current (left) · New (right, accent) over a full-width slider */
.storage-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "current next"
    "range   range";
  align-items: end;
  gap: 14px 20px;
  margin-top: 4px;
}
.storage-picker > div {
  display: flex;
  flex-direction: column-reverse;   /* label above value, as the plan summary */
  gap: 4px;
  min-width: 0;
}
.storage-picker > div:first-child {
  grid-area: current;
}
.storage-picker > div:last-child {
  grid-area: next;
  align-items: flex-end;
  text-align: right;
}
.storage-picker > input[type="range"] {
  grid-area: range;
}
.storage-picker strong,
.storage-picker small {
  display: block;
}
.storage-picker strong {
  color: var(--ink);
  font-size: var(--text-2xl);       /* Heading/H4 20 — key figures */
  font-weight: 600;
  line-height: 1.25;
}
.storage-picker > div:last-child strong {
  color: var(--mint-text);          /* the value being changed */
}
.storage-picker small {
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 16px;
}
/* Tick labels sit under the slider stops (thumb 18px → stops inset 9px) */
.range-labels {
  position: relative;
  height: 16px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 16px;
}
.range-labels span {
  position: absolute;
  top: 0;
  white-space: nowrap;
  transform: translateX(-50%);
}
.range-labels span:nth-child(1) { left: 0; transform: none; }
.range-labels span:nth-child(2) { left: calc(9px + (100% - 18px) / 3); }
.range-labels span:nth-child(3) { left: calc(9px + (100% - 18px) * 2 / 3); }
.range-labels span:nth-child(4) { right: 0; transform: none; }

.addon-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.addon-list label:first-child {
  padding-top: 0;
}
.addon-list label:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.addon-list label > span {
  display: flex;
  align-items: center;
  gap: 12px;
}
.addon-list label > span:first-child {
  min-width: 0;
}
.addon-list label > span:last-child {
  flex: none;
  gap: 16px;
  font-weight: 600;
  white-space: nowrap;
}
.addon-list label > span > b {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--info-soft);     /* as the .bgn-metrics icon wells */
  font-size: 22px;
  --icon-ink: var(--bgn-neutral-900);
  --icon-paper: var(--bgn-neutral-0);
  --icon-accent: var(--bgn-secondary-400);
  line-height: 1;
}
.addon-list strong,
.addon-list small {
  display: block;
}
.addon-list strong {
  font-weight: 600;
}
.addon-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* Upgrade summary — Figma "Order Summary" (node 1262:352); existing radius kept.
   Header band · line items with └ detail · divider · cost rows · divider · total · actions. */
.upgrade-summary {
  padding: 0 var(--card-pad) 30px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);   /* Shadow/XSmall - Tables */
  overflow: hidden;                               /* clip the header band to the radius */
}
.upgrade-summary > h2,
.upgrade-summary > .summary-title {
  margin: 0 calc(-1 * var(--card-pad)) 20px;
  padding: 22px var(--card-pad);                  /* 65px band */
  border: 0;
  background: var(--bgn-secondary-50);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 21px;
}
.upgrade-summary > .summary-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.upgrade-summary > .summary-title h2 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 21px;
}
.upgrade-summary h3 {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0.26px;
  text-transform: none;
}
.upgrade-summary h3 ~ h3 {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--bgn-secondary-200);  /* Figma divider #DBE9EE */
}
/* Line items: 14/18 semibold name, regular value, 20px apart */
.upgrade-summary > p {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
  padding: 0;
  color: var(--ink);
  font-size: var(--text-md);
  line-height: 18px;
  letter-spacing: 0.3px;
}
.upgrade-summary > p > span {
  min-width: 0;
  font-weight: 600;
}
.upgrade-summary > p strong,
.upgrade-summary > p b {
  flex: none;
  color: var(--ink);
  font-weight: 400;
  white-space: nowrap;
}
/* Detail line with the Figma └ connector (Vector 50: 8×4, Neutral/400) */
.upgrade-summary > p span small {
  position: relative;
  display: block;
  margin-top: 5px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0.26px;
}
.upgrade-summary > p span small::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 5px;
  width: 8px;
  height: 4px;
  border-bottom: 1px solid var(--muted);
  border-left: 1px solid var(--muted);
}
/* Rows without a detail line read as Subtotal / VAT: regular, muted */
.upgrade-summary > p:not(.grand):not(:has(small)) {
  margin-bottom: 10px;
  color: var(--muted);
}
.upgrade-summary > p:not(.grand):not(:has(small)) > span,
.upgrade-summary > p:not(.grand):not(:has(small)) b {
  color: var(--muted);
  font-weight: 400;
}
/* Total — divider, then 18px semibold label and amount */
.upgrade-summary .grand,
.upgrade-summary .highlight {
  align-items: center;
  margin: 20px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--bgn-secondary-200);
  border-radius: 0;
  background: none;
  font-size: 18px;
  line-height: 23px;
}
.upgrade-summary .grand > span,
.upgrade-summary .grand strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}
.upgrade-summary .grand > span {
  font-size: var(--text-lg);        /* same as the card's h2 (16px semibold) */
  line-height: 21px;
}
/* JS-rendered rows (NEO DR upgrade) follow the same line-item pattern */
.upgrade-summary .summary-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  line-height: 18px;
  letter-spacing: 0.3px;
}
.upgrade-summary .summary-icon {
  display: none;                    /* Figma line items carry no icon */
}
.upgrade-summary .summary-item small {
  position: relative;
  margin-top: 5px;
  padding-left: 18px;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.26px;
}
.upgrade-summary .summary-item small::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 5px;
  width: 8px;
  height: 4px;
  border-bottom: 1px solid var(--muted);
  border-left: 1px solid var(--muted);
}
.upgrade-summary .summary-item > strong {
  font-weight: 400;
}
/* Order summaries: Subtotal / PPN rows muted (Figma Subtotal · VAT), Total as Total Due */
.upgrade-summary .totals {
  margin: 30px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--bgn-secondary-200);
}
.upgrade-summary .totals p:not(.grand) {
  margin: 0 0 10px;
  padding: 0;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 18px;
  letter-spacing: 0.3px;
}
.upgrade-summary .totals p:not(.grand) span,
.upgrade-summary .totals p:not(.grand) strong {
  color: var(--muted);
  font-weight: 400;
}
.upgrade-summary .totals .grand {
  margin-top: 20px;
}
/* NEO DR order: total recovery storage reads as the Total row */
.upgrade-summary .dr-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  margin: 10px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--bgn-secondary-200);
  border-bottom: 0;
  text-align: left;
}
.upgrade-summary .dr-total small {
  grid-column: 1;
  grid-row: 1;
  color: var(--ink);
  font-size: var(--text-lg);        /* as the card h2 */
  font-weight: 600;
  line-height: 21px;
}
.upgrade-summary .dr-total strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}
.upgrade-summary .dr-total span {
  grid-column: 1;
  grid-row: 2;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.26px;
}
.upgrade-summary .fineprint {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.26px;
}
.upgrade-summary .fineprint .ms {
  display: none;                    /* notes carry no leading icon, as the info banner */
}
.upgrade-summary .alert.info-banner {
  margin-top: 30px;
}
/* Actions — Figma Checkout button: 45px, 5px radius, 16px label */
.upgrade-summary .btn.wide {
  min-height: 45px;
  margin-top: 20px;
  border-radius: 5px;
  font-size: var(--text-lg);
  letter-spacing: 0.5px;
}
.upgrade-summary .btn.wide + .btn.wide {
  margin-top: 10px;
}

/* 14. Review pages ========================================================= */
.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}
.review-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.review-card,
.payment-card {
  padding: var(--card-pad);
}
.review-card h2,
.payment-card h2 {
  margin-bottom: 12px;
}
.review-card td strong,
.review-card td small {
  display: block;
}
.promo-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 20px var(--card-pad);
}
.promo-card strong {
  font-weight: 600;
}
.promo-card > button,
.promo-form .promo-cancel {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mint-text);
  font-weight: 600;
}
.promo-card > button:hover,
.promo-form .promo-cancel:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.promo-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  width: 100%;
}
.promo-form label {
  flex: 1 1 240px;
  min-width: 0;
}
.promo-form input {
  width: 100%;
  text-transform: uppercase;
}
.promo-form input::placeholder {
  text-transform: none;
}
.promo-form .btn {
  min-height: var(--control-h);
  padding: 0 24px;
}
.promo-form .promo-cancel {
  color: var(--muted);
  font-weight: 400;
}
.promo-error {
  flex-basis: 100%;
  margin: 0;
  color: var(--danger);
  font-size: var(--text-sm);
}
.promo-applied {
  flex: 1;
}
.promo-applied ~ button {
  margin-left: 12px;
}

/* Payment options — Figma radio list (node 4785:32025) */
.payment-card label {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.payment-card label + label {
  margin-top: 15px;
}
.payment-card input[type="radio"] {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 50%;
  background: #eeeeee;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);   /* Figma drop shadow */
  cursor: pointer;
  transition: background var(--ease);
}
.payment-card input[type="radio"]:checked {
  background:
    radial-gradient(circle, var(--bgn-neutral-0) 0 3px, transparent 3.5px),
    linear-gradient(0deg, var(--bgn-primary-900), var(--bgn-primary-500));
}
.payment-card strong,
.payment-card small {
  display: block;
}
.payment-card strong {
  color: var(--bgn-neutral-900);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0.5px;
}
.payment-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.5px;
}
.payment-card p {
  margin: 20px 0 0;
  color: #80a2b6;                   /* Figma footnote */
  font-size: 12px;
  line-height: 22px;
  letter-spacing: 0.5px;
}
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 2px;
  color: var(--ink-2);
  cursor: pointer;
}
.terms-check input {
  flex: none;
  margin: 2px 0 0;                  /* look comes from .select-check */
}
.terms-check a {
  color: var(--mint-text);
  font-weight: 600;
  text-decoration: none;
}
.terms-check a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.review-summary {
  padding: 0 var(--card-pad) var(--card-pad);
  overflow: hidden;
}
.review-summary h2 {
  margin: 0 calc(var(--card-pad) * -1) 8px;
  padding: 20px var(--card-pad);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.review-summary p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}
.review-summary p span {
  color: var(--muted);
}
.review-summary p b {
  font-weight: 600;
  text-align: right;
}
.review-summary .review-total {
  align-items: baseline;
  margin-top: 4px;
  padding-top: 16px;
  border-bottom: 0;
}
.review-summary .review-total span {
  color: var(--ink);
  font-size: var(--text-lg);
  font-weight: 600;
}
.review-summary .review-total b {
  font-size: var(--text-xl);
  font-weight: 600;
}
.review-notice {
  padding: 12px 14px;               /* structure and type as .activity-sync-note */
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bgn-warning-50);  /* existing warning background kept */
  color: var(--bgn-neutral-900);
}
.review-notice p {
  margin: 0;
  font-size: var(--text-md);
  line-height: 21px;
  letter-spacing: var(--tracking);
}
.review-notice strong {
  font-weight: 600;
}
.review-notice small {
  color: inherit;
  font-size: var(--text-sm);
}

/* 15. Responsive =========================================================== */
@container (max-width: 520px) {
  .form-grid.three {
    grid-template-columns: minmax(0, 1fr);
  }
}
@container (max-width: 600px) {
  .component-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .component:nth-child(odd) {
    border-left: 0;
  }
  .component:nth-child(n + 3) {
    border-top: 1px solid var(--divider);
  }
}
@container (max-width: 480px) {
  .upgrade-table-head,
  .upgrade-row {
    grid-template-columns: minmax(0, 1fr) 42px 98px 42px;
    gap: 4px;
    padding: 10px 12px;
  }
}
@container (max-width: 380px) {
  .form-grid.two {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1280px) {
  :root {
    --gutter-r: 40px;
  }
  /* Narrower content: detail actions drop below the title block instead of squeezing it. */
  .detail-head > .head-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-content: flex-start;
    margin-top: 20px;
  }
  /* With the 270px sidebar the form column would drop under ~470px: stack the summary below. */
  .split-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .split-layout > .sticky {
    position: static;
  }
  .review-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 1100px) {
  .split-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sticky {
    position: static;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .metric-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  /* Below 900px the sidebar collapses to a 56px top bar (toggle + logo);
     the header actions sit on the same bar, top right. */
  :root {
    --gutter-l: 32px;
    --gutter-r: 32px;
    --header-h: 56px;
  }
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .sidebar {
    height: var(--header-h);
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-brand {
    height: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 0 calc(var(--gutter-l) - 8px);
  }
  .burger-button {
    position: static;
    order: -1;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-2);
    font-size: 24px;
    box-shadow: none;
  }
  .burger-button:hover {
    background: var(--surface-2);
  }
  .toggle-icon-desktop {
    display: none;
  }
  .toggle-icon-mobile {
    display: block;
  }
  .portal-logo {
    height: 36px;
  }
  .side-nav {
    display: none;
  }
  .portal-header::before,
  .portal-header::after {
    display: none;                  /* fixed, transparent header over the top bar */
  }
  .portal-header {
    position: fixed;
    top: 0;
    right: var(--gutter-r);
    z-index: 50;
    height: var(--header-h);
    padding: 0;
    border-bottom: 0;
    background: transparent;
  }
  .portal-header-actions {
    gap: 24px;
  }
  .portal-header-actions button + button::before {
    left: -12px;
    height: 28px;
  }
  main {
    padding-top: 24px;
    padding-bottom: 72px;
  }
  .review-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .review-summary.sticky {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-head,
  .detail-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-head > .btn,
  .detail-head > .head-actions {
    grid-column: 1;
    grid-row: auto;
    margin-top: 20px;
  }
  .detail-head > .head-actions {
    order: 1;
  }
  .page-head .btn {
    width: 100%;
  }
  .head-actions,
  .detail-head > .head-actions {
    display: grid;
    justify-content: stretch;
    gap: 8px;
  }
  .breadcrumb {
    margin-bottom: 20px;
  }
  .detail-meta {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 2px;
  }
  .detail-meta > span + span::before {
    display: none;
  }
  .toolbar,
  .activity-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .toolbar .search {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .toolbar select {
    width: 100%;
    min-width: 0;
  }
  .toolbar .btn {
    grid-column: 1 / -1;
  }
  .subscription-list table {
    min-width: 820px;
  }
  #workloads-table {
    min-width: 900px;
  }
  #activity-table,
  #dr-activity-table,
  #dr-workloads-table {
    min-width: 820px;
  }
  .subscription-list .table-wrap,
  .table-panel .table-wrap,
  .activity-panel .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
  .section-title-row {
    flex-direction: column;
    gap: 0;
  }
  .section-title-row .working-label {
    order: -1;
    margin-bottom: 12px;
  }
  .steps li {
    gap: 8px;
    font-size: var(--text-sm);
  }
  .steps li:not(:last-child)::after {
    margin: 0 10px;
  }
  .steps b {
    width: 28px;
    height: 28px;
    font-size: var(--text-xs);
  }
  .activity-head {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .activity-head .btn {
    align-self: flex-start;
  }
  .recent-card {
    overflow-x: auto;
  }
  .recent-card table {
    min-width: 520px;
  }
  .review-card .table-wrap table {
    min-width: 560px;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter-l: 16px;
    --gutter-r: 12px;
    --card-pad: 20px;
  }
  .portal-logo {
    height: 32px;
  }
  .portal-header-actions {
    gap: 16px;
  }
  .portal-header-actions button + button::before {
    left: -8px;
  }
  main {
    padding-top: 20px;
    padding-bottom: 56px;
  }
  .page-head h1,
  .detail-head h1 {
    font-size: var(--text-2xl);
  }
  /* Card gutters follow --card-pad (20px here). */
  .toolbar {
    padding: 16px var(--card-pad);
  }
  .table-footer {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 14px;
    padding: 18px var(--card-pad) 24px;
  }
  .table-footer div {
    grid-column: 1;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .page-arrow {
    width: 48px;
  }
  .page-numbers {
    gap: 24px;
    padding: 0 22px;
  }
  .activity-sync-note {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 16px var(--card-pad);
  }

  /* Metrics: compact two-up tiles with stacked icon */
  .metric-grid {
    gap: 12px;
  }
  .metric {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }
  .metric-icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .metric-grid .metric-icon .ms {
    --ms-w200: none;
    --ms-w300: inline;
  }
  .metric strong {
    font-size: var(--text-2xl);
  }

  .donut-wrap {
    flex-direction: column;
    padding-top: 20px;
  }
  .legend {
    width: 100%;
    max-width: none;
  }

  .sku-card-head {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
  }
  .component {
    padding: 14px 16px;
  }
  .bundle-callout {
    align-items: flex-start;
    padding: 16px;
  }

  .current-plan {
    padding: 16px;
  }
  .current-plan > div:not(:first-child) {
    padding-right: 10px;
    padding-left: 10px;
  }
  .current-plan > div:nth-child(2) {
    padding-left: 0;
  }
  .current-plan strong {
    font-size: var(--text-md);
  }
  .current-plan .metric-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .upgrade-table-head,
  .upgrade-row {
    grid-template-columns: minmax(0, 1fr) 42px 98px 42px;
    gap: 4px;
    padding: 10px 12px;
  }
  .upgrade-row > span:first-child {
    gap: 6px;
    font-size: var(--text-sm);
  }
  .upgrade-row > span:first-child .ms {
    font-size: 20px;
  }
  .upgrade-row b {
    overflow-wrap: anywhere;
  }
  .stepper {
    grid-template-columns: 28px minmax(34px, auto) 28px;
  }
  .stepper span {
    min-width: 36px;
  }
  .table-footer > span,
  .table-footer div > span {
    white-space: nowrap;
  }

  .storage-picker strong {
    font-size: var(--text-lg);
  }

  .addon-list label {
    align-items: flex-start;
  }
  .addon-list label > span:last-child {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 8px;
    font-size: var(--text-sm);
  }

  .details-card dl div,
  .storage-card dl div {
    align-items: flex-start;
  }

  .workload-dialog {
    width: 100vw;
    height: auto;
    max-height: 92vh;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 12px 12px 0 0;
  }
  .workload-dialog[open] {
    animation-name: sheet-in;
  }
  .dialog-header {
    padding: 18px 20px;
  }
  #workload-dialog-content {
    padding: 0 20px 20px;
  }
  .detail-status {
    margin: 0 -20px 20px;
    padding: 12px 20px;
  }
  .detail-block-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-grid div {
    padding: 12px 16px;
  }
  .detail-grid div:nth-child(even) {
    border-left: 0;
  }
  .latest-backup {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 14px 16px;
  }
  .latest-backup > .badge {
    grid-column: 2;
    justify-self: start;
  }
}
@keyframes sheet-in {
  from {
    transform: translateY(32px);
    opacity: 0;
  }
}

@media (max-width: 400px) {
  .current-plan small {
    white-space: normal;
  }
}

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

/* ==========================================================================
   Dropdown — Figma "Dropdown" (Portal BGN 2024, node 2019:2573)
   Panel: Secondary/50, 2px inset, 5px radius, 0 2px 40px rgba(0,0,0,.15)
   Item:  Neutral/0, 30px, 4px radius, 2px gap, 10px icon + 10px gap,
          13/20 Regular, +0.3px tracking.
   Shared by row action menus and select option lists.
   ========================================================================== */
.dd-panel {
  position: fixed;
  z-index: 60;
  min-width: 167px;
  max-height: min(320px, calc(100vh - 24px));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 2px;
  border-radius: 5px;
  background: var(--bgn-secondary-50);
  box-shadow: 0 2px 40px rgba(0, 0, 0, 0.15);
  list-style: none;
  overscroll-behavior: contain;
  animation: dd-in 120ms ease-out;
}
.dd-panel[hidden] {
  display: none;
}
@keyframes dd-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dd-panel { animation: none; }
}
.dd-item {
  flex: none;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 5px 12px 5px 10px;
  border: 0;
  border-radius: 4px;
  background: var(--bgn-neutral-0);
  color: var(--bgn-neutral-900);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.3px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease);
}
.dd-item .ms {
  flex: none;
  width: 10px;
  height: 10px;
  color: var(--bgn-primary-500);
}
.dd-item:hover,
.dd-item.is-active {
  background: var(--bgn-secondary-25);
  color: var(--bgn-primary-900);
}
.dd-item:focus-visible {
  outline: 2px solid var(--bgn-primary-500);
  outline-offset: -2px;
}
.dd-item[aria-selected="true"] {
  color: var(--bgn-primary-900);
  font-weight: 600;
}
/* Trigger states while open */
.row-menu[aria-expanded="true"] {
  background: var(--bgn-secondary-50);
  color: var(--bgn-primary-500);
}
select.is-open {
  border-color: var(--mint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6' fill='none'%3E%3Cpath d='M8.35352 5.35358L4.35352 1.35358L0.353516 5.35358' stroke='%23222222'/%3E%3C/svg%3E");
}
