/* ==========================================================================
   NEO Lite & NEO Lite Pro — Biznet Gio portal prototype
   Consolidated stylesheet (v3 · aligned with the NEO Backup / NEO DR system)

   Sections 1–14 are the shared Biznet Gio portal design system, carried over
   from the NEO Backup / NEO Disaster Recovery stylesheet unchanged so both
   products render from the same tokens and component rules. Section 15 holds
   the NEO Lite-specific components, written only with those tokens.

   1.  Fonts
   2.  Design tokens (verbatim from NEO Backup / DR)
   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.  Lists, selection, copy
   10. Order & configuration
   11. Detail overview (details, usage, recent tables)
   12. Dialog
   13. Order summary
   14. Review pages
   15. NEO Lite components
   16. Dropdown
   17. 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 */
}


input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--mint);
}

/* 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. Lists, selection, copy ============================================== */
.subscription-list,
.table-panel,
.activity-panel {
  overflow: hidden;
}
.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;
}
.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;
}

/* 11. Detail overview ==================================================== */
.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;
}

.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. Dialog header band (reference drawer) ============================== */
.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);
}

/* 13. Order summary ====================================================== */
/* 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;
}
.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. NEO Lite components ==================================================
   Product-specific pieces that have no direct NEO Backup / DR equivalent.
   Each is composed from the shared tokens and mirrors the closest reference
   component (noted per block). */

/* Main is a programmatic focus target after route changes; it needs no ring */
#main-content:focus {
  outline: none;
}
.upgrade-summary .alert.info-banner b {
  font-weight: 600;
}

/* Header note — muted p13, left of the header actions */
.portal-header-note {
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  letter-spacing: 0;
}

/* Breadcrumb trail rendered as links (reference uses buttons; same look) */
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Route-driven tabs: anchors styled exactly as .tabs button */
.tabs a {
  flex: none;
  margin-bottom: -1px;
  padding: 12px 20px;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font-size: var(--text-md);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease), border-color var(--ease);
}
.tabs a:hover {
  color: var(--ink);
}
.tabs a.active {
  border-bottom-color: var(--mint);
  color: var(--mint-text);
  font-weight: 600;
}
.tabs a:focus-visible {
  outline-offset: -2px;
}
a.table-link {
  display: inline-block;
  letter-spacing: normal;           /* as the reference <button class="table-link"> */
  text-decoration: none;
}

/* Form additions: full-width cell, textarea, validation */
.form-grid .full {
  grid-column: 1 / -1;
}
.form-grid textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  resize: vertical;
  transition: border-color var(--ease);
}
.form-grid textarea:hover {
  border-color: var(--control-border-hover);
}
.form-grid textarea:focus {
  border-color: var(--mint);
  outline: none;
}
.form-grid [aria-invalid="true"] {
  border-color: var(--danger);
}
.form-grid .field-error {
  color: var(--danger);
  font-weight: 600;
}

/* Billing cycle choice — the same anatomy as the package card directly above it
   (.sku-card frame + .component columns): one Secondary/100 frame, equal columns
   split by hairlines, 16px 20px padding, every line flush to the column edge.
     Row 1 (22px, the badge row in .component): radio + 14px semibold label
     Row 2 (10px below): price, 16px semibold, with a 13px muted unit
     Row 3 (4px below):  13px muted note
   Selected column: Success/50 fill (the portal's selected surface); the filled
   Primary radio carries the state. */
.cycle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.cycle-card {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  grid-template-rows: 22px auto 1fr;
  column-gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 16px 20px;
  border-left: 1px solid var(--divider);
  background: var(--surface);
  cursor: pointer;
  transition: background-color var(--ease);
}
.cycle-card:first-child {
  border-left: 0;
}
.cycle-card:hover {
  background: var(--surface-2);
}
.cycle-card:has(input:checked) {
  background: var(--mint-soft);
}
.cycle-card:has(input:focus-visible) {
  outline: 2px solid var(--mint);
  outline-offset: -2px;
}
.cycle-card input[type="radio"] {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 16px;
  height: 16px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 50%;
  background: #eeeeee;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.cycle-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));
}
.cycle-card input[type="radio"]:focus-visible {
  outline: none;
}
.cycle-card > span {
  display: contents;
}
.cycle-card strong,
.cycle-card b,
.cycle-card small {
  display: block;
  min-width: 0;
}
.cycle-card strong {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 18px;
}
.cycle-card b {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 10px;
  color: var(--ink);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 24px;
  white-space: nowrap;
}
.cycle-card .cycle-unit {
  margin-left: 2px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0;
}
.cycle-card small {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 18px;
}

/* Notices inside cards share the Alert rhythm (12px 14px, p14 21) */
.section-card .review-notice,
.section-card .activity-sync-note {
  margin: 20px 0 0;
}
.page-note {
  margin: 0 0 16px;
}
.page-note .sku-code {
  background: var(--bgn-neutral-0);
}
.review-main > .review-notice,
.review-main > .terms-check {
  margin: 0;
}

/* Inline actions inside cards — as .head-actions, left aligned */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.details-card > p,
.storage-card > p.card-copy {
  margin: 4px 0 0;
  color: var(--muted);
}
.details-card dd .badge {
  vertical-align: middle;
}

/* Outlined button — the NEO Backup / DR reference tertiary (e.g. "Manage tenant
   connection"); identical to .btn.tertiary outside .server-actions. Used for every
   non-server-action secondary choice (Cancel, Change billing cycle). */
.btn.outline {
  border-color: var(--control-border);
  background: var(--surface);
  color: var(--ink);
}
.btn.outline:hover {
  border-color: var(--control-border-hover);
  background: var(--surface-2);
}
.btn.outline:active {
  background: var(--bgn-secondary-50);
}

/* Danger button — Error/50 + Error/900 (as .badge.danger) */
.btn.danger {
  border-color: var(--danger);
  background: var(--surface);
  color: var(--danger);
}
.btn.danger:hover {
  background: var(--danger-soft);
}

/* Button rows keep mixed-height buttons on one centre line */
.head-actions,
.card-actions,
.form-actions,
.dialog-actions {
  align-items: center;
}

/* Server actions — the More actions options shown as a visible row (Portal BGN
   2024, Figma 597:1513, Group 481). This 24px tertiary look applies ONLY inside
   .server-actions; everywhere else .btn.tertiary / .btn.outline is the reference
   40px outlined button. 80 × 24 tiles, 10px apart, 1px Primary/500 stroke, 4px
   radius, 11px black label, 10px Primary/500 icon. "Start" is the filled variant
   (Primary/500 fill, 5px radius, black icon). Unavailable actions stay visible and
   focusable (aria-disabled) at the portal's 45% disabled opacity. */
.server-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.server-actions .btn.tertiary {
  min-width: 80px;
  min-height: 24px;
  height: 24px;
  gap: 5px;
  padding: 0 10px;
  border-color: var(--bgn-primary-500);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: #000000;
  font-size: 11px;
  letter-spacing: 0;
  line-height: 1;
}
.server-actions .btn.tertiary .ms {
  width: 10px;
  height: 10px;
  font-size: 10px;
  color: var(--bgn-primary-500);
  vertical-align: 0;
}
.server-actions .btn.tertiary .ms:has(use[href="#bgn-act-resume"]) {
  width: 12px;
}
.server-actions .btn.tertiary:hover {
  border-color: var(--bgn-primary-500);
  background: var(--bgn-success-50);
}
.server-actions .btn.tertiary:active {
  border-color: var(--bgn-primary-900);
  background: var(--bgn-success-50);
}
.server-actions .btn.tertiary.filled {
  border-radius: 5px;
  background: var(--bgn-primary-500);
}
.server-actions .btn.tertiary.filled .ms {
  color: #000000;
}
.server-actions .btn.tertiary.filled:hover {
  border-color: var(--mint-button-hover);
  background: var(--mint-button-hover);
}
.server-actions .btn[aria-disabled="true"],
.server-actions .btn[aria-disabled="true"]:hover {
  cursor: not-allowed;
  opacity: 0.45;
  border-color: var(--bgn-primary-500);
  background: var(--surface);
}
.server-actions .btn.tertiary.filled[aria-disabled="true"],
.server-actions .btn.tertiary.filled[aria-disabled="true"]:hover {
  background: var(--bgn-primary-500);
}

/* Resource list rows (network attachments, attached disks) reuse .workload-row */
.resource-list .workload-row {
  grid-template-columns: 40px minmax(0, 1fr) auto;
}
.resource-list .workload-row > .badge {
  justify-self: end;
}
.component-list.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Metering table: flush table inside a padded card, as .recent-card */
.recent-card .table-wrap th {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.recent-card .table-wrap {
  margin-top: 4px;
}
.overview-grid .span-2 {
  grid-column: 1 / -1;
}

/* Usage chart — Primary/500 bars on a Secondary/100 baseline */
.metric-chart {
  height: 220px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 8px;
  border-bottom: 1px solid var(--border);
}
.metric-chart i {
  flex: 1;
  min-width: 4px;
  border-radius: 2px 2px 0 0;
  background: var(--bgn-primary-500);
}
.card-heading select {
  min-width: 160px;
}
.card-heading > div p {
  margin: 4px 0 0;
  color: var(--muted);
}

/* Empty state with an action */
.empty-state .btn {
  margin-top: 16px;
}

/* Private network create panel */
.create-panel .section-title-row {
  margin-bottom: 20px;
}
.create-panel .section-title-row p {
  margin: 4px 0 0;
}
.icon-button {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  transition: background-color var(--ease);
}
.icon-button:hover {
  background: var(--bgn-secondary-50);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Review page tables keep row text stacked */
.review-card td small {
  display: block;
}
.review-card .details-list {
  margin: 0;
}

/* Toast — Neutral/900 surface, 4px radius; fully hidden when idle */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bgn-neutral-900);
  color: var(--bgn-neutral-0);
  box-shadow: 0 2px 40px rgba(0, 0, 0, 0.15);   /* reference overlay elevation (Dropdown) */
  font-size: var(--text-md);
  line-height: 21px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--ease), transform var(--ease), visibility 0s linear 0.15s;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--ease), transform var(--ease);
}

/* Mobile navigation scrim (drawer itself lives in 17. Responsive) */
.nav-scrim {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 35;
  background: rgba(11, 28, 22, 0.36);
}

/* 12b. Dialog — centred modal built from the reference drawer header band */
.portal-dialog {
  width: min(600px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 48px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 40px rgba(0, 0, 0, 0.15);   /* reference overlay elevation (Dropdown) */
  overflow-y: auto;
}
.portal-dialog[open] {
  animation: dialog-in 0.18s ease-out;
}
.portal-dialog::backdrop {
  background: rgba(11, 28, 22, 0.36);
}
@keyframes dialog-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}
.dialog-body {
  padding: 24px 30px 0;
}
.dialog-body > p {
  margin: 0 0 16px;
  color: var(--muted);
}
.dialog-body .details-list {
  margin: 0;
}
.dialog-body .review-notice,
.dialog-body .activity-sync-note {
  margin: 16px 0 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px 30px 30px;
}

/* ==========================================================================
   16. 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");
}

/* 17. Responsive ===========================================================
   Breakpoints follow the reference: 1280 · 1100 · 900 · 760 · 600 · 400. */
@container (max-width: 600px) {
  .component-list,
  .component-list.three {
    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);
  }
  /* Billing cycles stack into rows (as .component rows): radio + label left,
     price right on the same 22px row, note beneath — all flush to the 20px edge */
  .cycle-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cycle-card {
    grid-template-columns: 16px minmax(0, 1fr) auto;
    grid-template-rows: 22px auto;
    border-left: 0;
  }
  .cycle-card + .cycle-card {
    border-top: 1px solid var(--divider);
  }
  .cycle-card b {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    margin-top: 0;
    text-align: right;
  }
  .cycle-card small {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@container (max-width: 380px) {
  .form-grid.two {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1280px) {
  :root {
    --gutter-r: 40px;
  }
  .detail-head > .head-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-content: flex-start;
    margin-top: 20px;
  }
  .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) {
  .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 becomes a 56px top bar (toggle + logo); the header
     actions sit on the same bar. The toggle opens the navigation as a drawer. */
  :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;
  }
  /* Drawer: the same side-nav rows, under the top bar */
  .app-shell.nav-open .side-nav {
    position: fixed;
    top: var(--header-h);
    bottom: 0;
    left: 0;
    z-index: 45;
    display: block;
    width: min(300px, 100vw);
    padding-top: 8px;
    border-right: 1px solid var(--sidebar-border);
    background: var(--surface);
    box-shadow: var(--shadow-drawer);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .portal-header::before,
  .portal-header::after {
    display: none;
  }
  .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-note {
    display: none;
  }
  .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 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .toolbar .search {
    min-width: 0;
  }
  .toolbar select {
    width: 100%;
    min-width: 0;
  }
  .table-panel table {
    min-width: 760px;
  }
  .table-panel .table-wrap,
  .recent-card .table-wrap,
  .review-card .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
  .recent-card table,
  .review-card .table-wrap table {
    min-width: 520px;
  }
  .section-title-row {
    flex-direction: column;
    gap: 0;
  }
  .create-panel .section-title-row {
    position: relative;
    padding-right: 40px;
  }
  .create-panel .section-title-row .icon-button {
    position: absolute;
    top: -6px;
    right: -6px;
  }
  .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;
  }
  .card-heading {
    flex-wrap: wrap;
  }
  .form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@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);
  }
  .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;
  }
  .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);
    overflow-wrap: anywhere;
  }
  .sku-card-head {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
  }
  .component {
    padding: 14px 16px;
  }
  .details-card dl div,
  .storage-card dl div {
    align-items: flex-start;
  }
  .workload-row,
  .resource-list .workload-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .workload-row > .badge,
  .workload-row > .btn {
    grid-column: 2;
    justify-self: start;
  }
  .table-footer > span {
    white-space: nowrap;
  }
  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }
  /* Dialog becomes a bottom sheet, as the reference drawer does at this width */
  .portal-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 12px 12px 0 0;
  }
  .portal-dialog[open] {
    animation-name: sheet-in;
  }
  .dialog-header {
    padding: 18px 20px;
  }
  .dialog-body {
    padding: 20px 20px 0;
  }
  .dialog-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 20px;
  }
  .dialog-actions > .btn:only-child {
    grid-column: 1 / -1;
  }
}
@keyframes sheet-in {
  from {
    transform: translateY(32px);
    opacity: 0;
  }
}

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