/* DES-2026-03-26_14-34-09Z-COLOR-001: EinsElf CI palette tokens keep the audited admin shell accessible while replacing the legacy blue accent family. */
/* DES-2026-03-26_14-34-09Z-TYPO-002: deployable enterprise sans and mono stacks follow the CI guidance with PT Sans Caption first, Verdana as the documented fallback, then system fonts. */
/* DES-2026-03-26_14-34-09Z-SPACE-001: 8px grid with 4px sub-steps and sharp 0px corners across the audited page. */
:root {
  --brand-accent-strong: #005962;
  --brand-accent: #007481;
  --brand-accent-hover: #006a75;
  --brand-accent-light: #57a3ab;
  --brand-accent-soft: #e3f0f1;
  --brand-mist: #e3f0f1;
  --brand-surface: #ffffff;
  --brand-surface-soft: #f8fbfb;
  --brand-surface-muted: #e3f0f1;
  --brand-text: #1a1a18;
  --brand-text-soft: #315156;
  --brand-text-muted: #406267;
  --surface-border: #007481;
  --surface-border-soft: #4b8289;

  --color-neutral-0: var(--brand-surface);
  --color-neutral-50: var(--brand-surface-soft);
  --color-neutral-100: var(--brand-surface-muted);
  --color-neutral-200: #c7e0e3;
  --color-neutral-300: #abd1d5;
  --color-neutral-400: var(--surface-border-soft);
  --color-neutral-500: var(--brand-text-muted);
  --color-neutral-600: var(--brand-text-soft);
  --color-neutral-700: #244347;
  --color-neutral-800: var(--brand-text);
  --color-neutral-900: #0d2328;
  --color-neutral-1000: #08191d;

  --grey-50: var(--brand-surface-soft);
  --grey-100: var(--color-neutral-100);
  --grey-200: var(--color-neutral-200);
  --grey-300: var(--color-neutral-300);
  --grey-400: var(--color-neutral-400);
  --grey-500: var(--color-neutral-500);
  --grey-600: var(--color-neutral-600);
  --grey-700: var(--color-neutral-700);
  --grey-800: var(--color-neutral-800);
  --grey-900: var(--color-neutral-900);

  --black: #000000;
  --white: #ffffff;

  --color-surface: var(--brand-surface-soft);
  --color-surface-raised: var(--brand-surface);
  --color-surface-disabled: var(--brand-surface-muted);
  --color-surface-inverse: var(--color-neutral-900);
  --color-text-primary: var(--brand-text);
  --color-text-secondary: var(--brand-text-soft);
  --color-text-tertiary: var(--brand-text-muted);
  --color-text-disabled: #5f7f84;
  --color-text-inverse: #ffffff;
  --color-border-subtle: var(--surface-border-soft);
  --color-border-strong: var(--surface-border);
  --color-focus-ring: var(--brand-accent);

  --color-status-error: #cf222e;
  --color-status-warning: #9a6700;
  --color-status-caution: #bf8700;
  --color-status-success: var(--brand-accent);
  --color-status-info: var(--brand-accent);
  --color-status-error-bg: color-mix(in srgb, var(--color-status-error) 12%, var(--color-surface-raised) 88%);
  --color-status-warning-bg: color-mix(in srgb, var(--color-status-warning) 16%, var(--color-surface-raised) 84%);
  --color-status-caution-bg: color-mix(in srgb, var(--color-status-caution) 16%, var(--color-surface-raised) 84%);
  --color-status-success-bg: color-mix(in srgb, var(--color-status-success) 14%, var(--color-surface-raised) 86%);
  --color-status-info-bg: color-mix(in srgb, var(--color-status-info) 14%, var(--color-surface-raised) 86%);
  --color-on-error: #ffffff;
  --color-on-warning: #1f2328;
  --color-on-caution: #1f2328;
  --color-on-success: #ffffff;
  --color-on-info: #ffffff;

  --status-critical: var(--color-status-error);
  --status-critical-bg: var(--color-status-error-bg);
  --status-warning: var(--color-status-warning);
  --status-warning-bg: var(--color-status-warning-bg);
  --status-caution: var(--color-status-caution);
  --status-caution-bg: var(--color-status-caution-bg);
  --status-success: var(--color-status-success);
  --status-success-bg: var(--color-status-success-bg);
  --status-info: var(--color-status-info);
  --status-info-bg: var(--color-status-info-bg);
  --status-off: var(--color-text-disabled);
  --status-off-bg: var(--color-surface-raised);

  --pm-primary: var(--brand-accent);
  --pm-primary-hover: var(--brand-accent-strong);
  --pm-primary-active: #004a52;
  --pm-primary-container: var(--brand-accent-soft);
  --pm-primary-gradient: var(--pm-primary);
  --pm-primary-gradient-hover: var(--pm-primary-hover);
  --pm-primary-gradient-active: var(--pm-primary-active);
  --pm-surface: var(--color-surface);
  --pm-surface-alt: var(--color-surface-raised);
  --pm-on-surface: var(--color-text-primary);
  --pm-border: var(--color-border-strong);
  --pm-hover: color-mix(in srgb, var(--color-neutral-200) 44%, var(--color-surface) 56%);
  --pm-hover-raised: color-mix(in srgb, var(--color-neutral-200) 58%, var(--color-surface-raised) 42%);
  --pm-active: color-mix(in srgb, var(--color-neutral-300) 42%, var(--color-surface-raised) 58%);
  --table-header-bg: var(--color-neutral-100);
  --table-header-text: var(--color-text-primary);
  --table-row-alt-bg: color-mix(in srgb, var(--color-neutral-50) 78%, var(--color-surface-raised) 22%);
  --table-row-hover-bg: color-mix(in srgb, var(--color-neutral-100) 72%, var(--color-surface-raised) 28%);
  --table-row-selected-bg: color-mix(in srgb, var(--brand-accent-soft) 40%, var(--color-surface-raised) 60%);

  --shell-sidebar-bg: #0d2328;
  --shell-sidebar-bg-strong: #08191d;
  --shell-sidebar-hover: #14373d;
  --shell-sidebar-border: #2f5b61;
  --shell-sidebar-text: #f4fbfb;
  --shell-sidebar-text-muted: #cfe7e9;
  --shell-sidebar-chip-bg: #14373d;
  --shell-sidebar-chip-border: #4b8289;
  --shell-sidebar-button-bg: #e3f0f1;
  --shell-sidebar-button-hover: #ffffff;
  --shell-sidebar-button-text: #08191d;
  --shell-backdrop: rgba(6, 19, 22, 0.58);

  --font-family-sans: "PT Sans Caption", Verdana, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-family-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-family: var(--font-family-sans);

  --font-size-micro: 12px;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 14px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-2xl: 28px;
  --font-size-3xl: 36px;
  --font-size-kpi: 28px;

  --line-height-micro: 16px;
  --line-height-xs: 16px;
  --line-height-sm: 20px;
  --line-height-base: 20px;
  --line-height-lg: 24px;
  --line-height-xl: 28px;
  --line-height-2xl: 36px;
  --line-height-3xl: 44px;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  --icon-size-sm: 16px;
  --icon-size-md: 20px;
  --icon-size-lg: 24px;
  --icon-size-xl: 32px;

  --size-target-min: 24px;
  --size-target-compact: 32px;
  --size-target-standard: 40px;
  --size-target-touch: 48px;
  --table-row-condensed: 32px;
  --table-row-regular: 40px;
  --table-row-relaxed: 48px;

  --radius: 0px;
  --border-width: 1px;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  --content-max-width: 1440px;
  --sidebar-width-expanded: 264px;
  --sidebar-width-collapsed: 60px;
  --topbar-height: 48px;
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[data-color-mode="light"] {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

body[data-color-mode="dark"] {
  background: var(--color-neutral-1000);
  color: #f4fbfb;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

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

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

[hidden] {
  display: none !important;
}

.pm-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  color: var(--color-text-primary);
  background: transparent;
  --density-control-height: var(--size-target-standard);
  --density-row-height: var(--table-row-regular);
  --density-cell-padding-y: var(--space-2);
  --density-cell-padding-x: var(--space-3);
  --density-control-padding-y: var(--space-2);
  --density-control-padding-x: var(--space-3);
}

.pm-layout[data-color-mode="light"],
.pm-theme-scope[data-color-mode="light"] {
  color-scheme: light;
}

.pm-layout[data-color-mode="dark"],
.pm-theme-scope[data-color-mode="dark"] {
  color-scheme: dark;
  --color-surface: #0d2328;
  --color-surface-raised: #153238;
  --color-surface-disabled: #24474d;
  --color-surface-inverse: #f4fbfb;
  --color-text-primary: #f4fbfb;
  --color-text-secondary: #d6eaec;
  --color-text-tertiary: #bdd9dc;
  --color-text-disabled: #84acb1;
  --color-text-inverse: #08191d;
  --color-border-subtle: #4b8289;
  --color-border-strong: #67aab2;
  --color-focus-ring: #abd1d5;
  --color-status-error-bg: rgba(207, 34, 46, 0.24);
  --color-status-warning-bg: rgba(154, 103, 0, 0.28);
  --color-status-caution-bg: rgba(191, 135, 0, 0.24);
  --color-status-success: var(--brand-accent-light);
  --color-status-info: var(--brand-accent-light);
  --color-status-success-bg: rgba(87, 163, 171, 0.26);
  --color-status-info-bg: rgba(87, 163, 171, 0.26);
  --status-critical-bg: var(--color-status-error-bg);
  --status-warning-bg: var(--color-status-warning-bg);
  --status-caution-bg: var(--color-status-caution-bg);
  --status-success: var(--color-status-success);
  --status-success-bg: var(--color-status-success-bg);
  --status-info: var(--color-status-info);
  --status-info-bg: var(--color-status-info-bg);
  --status-off-bg: var(--color-surface-raised);
  --pm-hover: rgba(87, 163, 171, 0.14);
  --pm-hover-raised: rgba(87, 163, 171, 0.2);
  --pm-active: rgba(87, 163, 171, 0.28);
  --pm-primary: var(--brand-accent-light);
  --pm-primary-hover: #abd1d5;
  --pm-primary-active: #67aab2;
  --pm-primary-container: rgba(171, 209, 213, 0.22);
  --table-header-bg: #17353b;
  --table-header-text: #f4fbfb;
  --table-row-alt-bg: #14373d;
  --table-row-hover-bg: #1b4349;
  --table-row-selected-bg: color-mix(in srgb, var(--brand-accent-light) 20%, var(--color-surface-raised) 80%);
}

.pm-skip-link {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-120%);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  border: var(--border-width) solid var(--color-border-strong);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  z-index: 10000;
}

.pm-skip-link:focus-visible {
  transform: translateY(0);
}

.pm-symbol-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.pm-icon {
  fill: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

.pm-sidebar {
  width: var(--sidebar-width-collapsed);
  background: var(--shell-sidebar-bg);
  color: var(--shell-sidebar-text);
  overflow: hidden;
  transition: width 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: var(--border-width) solid var(--shell-sidebar-border);
}

.pm-sidebar-open {
  width: var(--sidebar-width-expanded);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: var(--topbar-height);
  padding: 0 var(--space-4);
  border-bottom: var(--border-width) solid var(--shell-sidebar-border);
  background: var(--shell-sidebar-bg-strong);
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-header:hover {
  background: var(--shell-sidebar-hover);
}

.sidebar-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.sidebar-primary-action {
  padding: var(--space-3);
  border-bottom: var(--border-width) solid var(--shell-sidebar-border);
}

.sidebar-primary-button {
  width: 100%;
  justify-content: flex-start;
  border-color: var(--shell-sidebar-chip-border);
  background: var(--shell-sidebar-button-bg);
  color: var(--shell-sidebar-button-text);
}

.sidebar-primary-button:hover:not(:disabled) {
  background: var(--shell-sidebar-button-hover);
  border-color: var(--shell-sidebar-button-hover);
}

.branding-logo {
  display: block;
  height: auto;
  max-width: 100%;
}

.branding-logo--sidebar {
  width: 96px;
  flex-shrink: 0;
}

.branding-logo--appbar {
  width: 72px;
  flex-shrink: 0;
}

.branding-logo--positive {
  width: min(220px, 54%);
}

.sidebar-icon {
  width: var(--icon-size-lg);
  height: var(--icon-size-lg);
}

.sidebar-icon--collapsed {
  display: none;
}

.sidebar-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-brand-title,
.sidebar-brand-subtitle {
  display: block;
}

.sidebar-brand-title {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--shell-sidebar-text);
}

.sidebar-brand-subtitle {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  color: var(--shell-sidebar-text-muted);
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--space-2) 0;
}

.sidebar-group + .sidebar-group {
  margin-top: var(--space-2);
}

.sidebar-group__title {
  padding: 0 var(--space-4);
  overflow-wrap: anywhere;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: var(--space-1) 0 0;
}

.nav-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  width: 100%;
  min-height: calc(var(--density-control-height) + 8px);
  padding: var(--density-control-padding-y) var(--density-control-padding-x);
  border: 0;
  border-left: calc(var(--border-width) * 3) solid transparent;
  background: transparent;
  color: var(--shell-sidebar-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
  white-space: normal;
  overflow: visible;
}

.nav-item:hover {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-text);
}

.nav-item.active {
  background: var(--shell-sidebar-hover);
  color: var(--shell-sidebar-text);
  border-left-color: var(--brand-accent-light);
  font-weight: var(--font-weight-medium);
  box-shadow: inset 0 0 0 1px var(--shell-sidebar-border);
}

.nav-icon {
  width: var(--icon-size-md);
  height: var(--icon-size-md);
  margin-top: 2px;
}

.nav-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.3;
}

.nav-item__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin-left: auto;
  padding: 0 var(--space-1);
  border: var(--border-width) solid var(--shell-sidebar-chip-border);
  background: var(--shell-sidebar-chip-bg);
  color: inherit;
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  flex-shrink: 0;
  align-self: flex-start;
}

.sidebar-footer {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  border-top: var(--border-width) solid var(--shell-sidebar-border);
}

.sidebar-footer__label,
.sidebar-footer__copy {
  margin: 0;
}

.sidebar-footer__label {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--shell-sidebar-text);
}

.sidebar-footer__copy {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  color: var(--shell-sidebar-text-muted);
  overflow-wrap: anywhere;
}

.pm-sidebar-collapsed .nav-text,
.pm-sidebar-collapsed .sidebar-group__title,
.pm-sidebar-collapsed .sidebar-footer {
  display: none;
}

.pm-sidebar-collapsed .nav-item {
  justify-content: center;
  padding: var(--space-3) 0;
  border-left: 0;
  border-bottom: calc(var(--border-width) * 3) solid transparent;
}

.pm-sidebar-collapsed .nav-item.active {
  border-bottom-color: var(--brand-accent-light);
}

.pm-sidebar-collapsed .nav-item__count {
  display: none;
}

.pm-sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding: 0;
}

.pm-sidebar-collapsed .branding-logo--sidebar {
  display: none;
}

.pm-sidebar-collapsed .sidebar-icon--collapsed {
  display: block;
}

.pm-sidebar-collapsed .sidebar-primary-action {
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}

.pm-sidebar-collapsed .sidebar-primary-button {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.pm-sidebar-collapsed .sidebar-primary-button .nav-text {
  display: none;
}

.pm-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: var(--shell-backdrop);
}

.pm-main-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.pm-main-content {
  flex: 1;
  overflow: auto;
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  background: transparent;
}

.top-appbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--topbar-height);
  padding: var(--space-2) var(--space-6);
  background: var(--color-surface-raised);
  border-bottom: var(--border-width) solid var(--color-border-strong);
  color: var(--color-text-primary);
  flex-wrap: wrap;
  row-gap: var(--space-2);
}

.appbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1 1 240px;
}

.appbar-brand__copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.appbar-page-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  min-width: 0;
  overflow-wrap: anywhere;
}

.appbar-meta {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  color: var(--color-text-secondary);
  min-width: 0;
  overflow-wrap: anywhere;
}

.appbar-context {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
  order: 10;
}

.appbar-menu-btn {
  padding: 0;
}

.pm-btn-icon {
  width: var(--density-control-height);
  min-width: var(--density-control-height);
  padding: 0;
}

.appbar-icon {
  width: var(--icon-size-md);
  height: var(--icon-size-md);
}

.appbar-spacer {
  display: none;
}

.appbar-theme-controls {
  display: flex;
  align-items: center;
}

.appbar-display-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  min-width: 0;
  margin-left: auto;
}

.top-appbar .pm-btn-text,
.top-appbar .appbar-user-menu {
  color: var(--color-text-primary);
}

.top-appbar .pm-btn-text:hover:not(:disabled),
.top-appbar .appbar-user-menu:hover:not(:disabled) {
  background: var(--pm-hover-raised);
}

.top-appbar .context-pill {
  border-color: var(--color-border-subtle);
  background: var(--color-surface);
  color: var(--color-text-primary);
}

.appbar-user-menu {
  min-height: var(--density-control-height);
}

.app-shell {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
}

.page-header,
.card,
.summary-card,
.login-panel {
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-subtle);
  box-shadow: none;
  backdrop-filter: none;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
}

.page-header__copy,
.section-stack,
.stack,
.subsection-block,
.subsection-block__header,
.detail-shell,
.detail-section,
.field,
.field-group,
.table-meta,
.machine-list,
.machine-item,
.audit-item,
.login-panel,
.login-panel__header,
.login-form {
  display: grid;
  gap: var(--space-3);
}

.page-header__copy {
  gap: var(--space-2);
  max-width: 760px;
}

.page-header__copy h1,
.card-header h2,
.summary-card__value,
.login-panel h1,
.detail-title h2,
.form-section__header h3 {
  margin: 0;
}

.page-header__copy h1,
.login-panel h1 {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-2xl);
}

.page-header__lede,
.section-copy,
.summary-card__meta,
.status-strip__label,
.field-help,
.detail-context,
.audit-item__message,
.dropdown-meta,
.login-panel__header p,
.empty-state p {
  color: var(--color-text-secondary);
}

/* DES-2026-03-26_14-34-09Z-TYPO-001: operational labels move to sentence case and readable 14/20 hierarchy for long admin sessions. */
.field-help {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.eyebrow,
.section-label,
.summary-card__label,
.review-summary__label,
.context-card__label,
.status-strip__label {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-tertiary);
}

/* DES-2026-03-26_14-34-09Z-ACCS-001: summary-card labels use the stronger secondary token so dark-mode state cards keep AA contrast. */
.summary-card__label {
  color: var(--color-text-secondary);
}

.page-header__actions,
.button-row,
.inline-actions,
.tag-list,
.remember-row,
.detail-actions,
.table-pagination,
.detail-tabs,
.drawer__footer,
.review-summary,
.review-summary__chips,
.guidance-list {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.page-header__actions {
  justify-content: flex-end;
  align-content: end;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.status-strip__item {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-subtle);
}

.status-strip__value {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: stretch;
}

.summary-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-3);
  min-height: 148px;
  height: 100%;
  padding: var(--space-4);
  border-top: 4px solid var(--status-off);
  border-left: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface-raised);
}

.summary-card.tone-success {
  border-top-color: var(--brand-accent);
}

.summary-card.tone-warning {
  border-top-color: var(--status-warning);
}

.summary-card.tone-error {
  border-top-color: var(--status-critical);
}

.summary-card.tone-info {
  border-top-color: var(--status-info);
}

.summary-card.tone-neutral {
  border-top-color: var(--status-off);
}

.summary-card__value {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-2xl);
}

.workspace-section {
  display: grid;
  gap: var(--space-4);
}

.workspace-primary-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(400px, 440px);
  gap: var(--space-4);
  align-items: stretch;
}

.inventory-panel,
.detail-panel {
  overflow: hidden;
}

.inventory-panel {
  display: flex;
  flex-direction: column;
  min-height: clamp(560px, 68vh, 820px);
}

.detail-panel {
  position: sticky;
  top: var(--space-4);
  min-height: clamp(560px, 68vh, 820px);
  max-height: calc(100vh - var(--topbar-height) - var(--space-10));
  scroll-margin-top: calc(var(--topbar-height) + var(--space-4));
}

.detail-panel__body {
  overflow: auto;
  max-height: calc(100vh - var(--topbar-height) - var(--space-10));
}

.card-header,
.card-body {
  padding: var(--space-4);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: var(--border-width) solid var(--color-border-subtle);
}

.card-header--stack {
  flex-direction: column;
  align-items: stretch;
}

.card-header h2 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-xl);
}

/* DES-2026-03-26_14-34-09Z-COMP-001: first-page controls use a single sharp-edge component spec with explicit default, hover, active, and focus states. */
/* DES-2026-03-26_14-34-09Z-ACCS-001: interactive controls keep visible focus and minimum target sizes across light and dark mode. */
.pm-btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--density-control-height);
  padding: var(--density-control-padding-y) var(--density-control-padding-x);
  border: var(--border-width) solid var(--color-border-strong);
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  text-decoration: none;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pm-btn:hover:not(:disabled),
.button:hover:not(:disabled) {
  background: var(--pm-hover-raised);
}

.pm-btn:active:not(:disabled),
.button:active:not(:disabled) {
  background: var(--pm-active);
}

.pm-btn-text {
  border: none;
  background: transparent;
}

.pm-btn-text:hover:not(:disabled) {
  background: var(--pm-hover-raised);
}

.button-primary {
  background: var(--pm-primary);
  color: var(--color-text-inverse);
  border-color: var(--pm-primary);
}

.button-primary:hover:not(:disabled) {
  background: var(--pm-primary-hover);
  border-color: var(--pm-primary-hover);
}

.button-primary:active:not(:disabled) {
  background: var(--pm-primary-active);
  border-color: var(--pm-primary-active);
}

/* DES-2026-03-26_14-34-09Z-COLOR-002: secondary actions use neutral surfaces and readable borders in both themes to meet WCAG 2.2 contrast. */
.button-secondary {
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}

.button-danger {
  background: color-mix(in srgb, var(--color-status-error) 10%, var(--color-surface-raised) 90%);
  color: var(--status-critical);
  border-color: var(--status-critical);
}

.button-danger:hover:not(:disabled),
.button-danger:active:not(:disabled) {
  color: var(--status-critical);
  border-color: var(--status-critical);
}

.field {
  color: var(--color-text-secondary);
}

.field span,
.field legend,
.field-group legend {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--density-control-height);
  padding: var(--density-control-padding-y) var(--density-control-padding-x);
  border: var(--border-width) solid var(--color-border-strong);
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  border-radius: var(--radius);
  box-shadow: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-focus-ring);
  box-shadow: inset 0 0 0 1px var(--color-focus-ring), 0 0 0 2px color-mix(in srgb, var(--color-focus-ring) 24%, transparent 76%);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-text-disabled);
}

.panel-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
  align-items: end;
}

/* DES-2026-03-26_18-34-45Z-SPACE-001: compact access-page toolbars keep filters attached to their inventory instead of scattering controls across the card header. */
.panel-toolbar--compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
  justify-content: end;
}

.panel-toolbar--compact > .button,
.panel-toolbar--compact > .pm-dropdown,
.panel-toolbar--compact > .field {
  min-width: 0;
}

.applied-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-4);
}

.table-wrap {
  overflow: auto;
  min-width: 0;
}

.table-wrap--fill {
  flex: 1;
  min-height: 420px;
  border-top: var(--border-width) solid var(--color-border-subtle);
  border-bottom: var(--border-width) solid var(--color-border-subtle);
}

.table-wrap--section {
  max-height: 56vh;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
}

.table-footer__summary,
.table-pagination__info {
  color: var(--color-text-secondary);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

th,
td {
  padding: var(--space-3);
  border-bottom: var(--border-width) solid var(--color-border-subtle);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

th {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--table-header-text);
  background: var(--table-header-bg);
  box-shadow: inset 0 -1px 0 var(--color-border-strong);
  white-space: nowrap;
}

tbody tr:nth-child(even) td {
  background: var(--table-row-alt-bg);
}

tbody tr:hover td {
  background: var(--table-row-hover-bg);
}

tbody tr[data-license-select] {
  cursor: pointer;
}

tbody tr.is-selected td {
  background: var(--table-row-selected-bg);
  box-shadow: inset 0 2px 0 var(--brand-accent);
}

.table-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
  text-align: left;
  min-height: var(--size-target-min);
}

.table-action:hover {
  text-decoration: underline;
}

.table-meta {
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  color: var(--color-text-secondary);
  min-width: 0;
}

.table-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.button--table-inline {
  min-height: 28px;
  padding: 0 var(--space-2);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
}

.tag,
.status-pill,
.context-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 24px;
  padding: 0 var(--space-2);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  font-weight: var(--font-weight-medium);
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* DES-2026-03-26_14-34-09Z-COLOR-001: key metadata chips and audited first-page container surfaces use strong neutral borders so hierarchy stays visible in light and dark mode. */
.tag,
.status-pill,
.context-pill,
.status-strip__item,
.detail-grid > div,
.machine-item,
.context-card,
.review-card,
.builder-panel,
.runtime-graph-panel,
.check-option,
.field-group,
.mode-note,
.mode-summary-card {
  border-color: var(--color-border-strong);
}

.status-pill,
.context-pill {
  --status-indicator-accent: var(--status-info);
  border-left: calc(var(--border-width) * 3) solid var(--status-indicator-accent);
}

.tone-success {
  background: var(--status-success-bg);
  --status-indicator-accent: var(--status-success);
}

.tone-warning {
  background: var(--status-warning-bg);
  --status-indicator-accent: var(--status-warning);
}

.tone-error {
  background: var(--status-critical-bg);
  --status-indicator-accent: var(--status-critical);
}

.tone-caution {
  background: var(--status-caution-bg);
  --status-indicator-accent: var(--status-caution);
}

.tone-info {
  background: var(--status-info-bg);
  --status-indicator-accent: var(--status-info);
}

.tone-neutral {
  background: var(--status-off-bg);
  --status-indicator-accent: var(--status-off);
}

.empty-state {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-6);
  align-content: start;
}

.empty-state--error {
  border-left: calc(var(--border-width) * 3) solid var(--status-critical);
  background: var(--color-surface-raised);
}

.empty-state strong {
  font-size: var(--font-size-base);
}

.empty-state .button {
  justify-self: start;
}

.detail-shell {
  padding: var(--space-4);
}

.detail-header,
.machine-item__header,
.audit-item__header,
.section-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.detail-title {
  display: grid;
  gap: var(--space-1);
}

.detail-title h2 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-xl);
}

.detail-context {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.detail-tabs {
  padding-bottom: var(--space-2);
  border-bottom: var(--border-width) solid var(--color-border-subtle);
}

.detail-tab {
  min-height: var(--density-control-height);
  padding: 0 var(--space-3);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface-raised);
  color: var(--color-text-secondary);
}

.detail-tab:hover {
  background: var(--pm-hover);
  color: var(--color-text-primary);
}

.detail-tab.is-active {
  border-color: var(--pm-primary);
  background: color-mix(in srgb, var(--pm-primary-container) 42%, var(--color-surface-raised) 58%);
  color: var(--color-text-primary);
  box-shadow: inset 0 0 0 1px var(--pm-primary);
}

.panel-switcher-shell {
  display: grid;
  gap: var(--space-4);
}

.panel-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.panel-switcher__button {
  flex: 1 1 180px;
  display: grid;
  gap: var(--space-1);
  min-height: var(--density-control-height);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface);
  color: var(--color-text-primary);
  text-align: left;
}

.panel-switcher__button:hover {
  background: var(--pm-hover);
}

.panel-switcher__button.is-active {
  border-color: var(--color-border-strong);
  background: var(--color-surface-raised);
  box-shadow: inset 0 0 0 var(--border-width) var(--color-border-strong);
}

.panel-switcher__label {
  font-weight: var(--font-weight-semibold);
}

.panel-switcher__meta {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  color: var(--color-text-secondary);
}

.catalog-panel {
  display: grid;
  gap: var(--space-4);
}

.detail-content {
  display: grid;
  gap: var(--space-4);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
}

.detail-grid > div,
.machine-item,
.context-card,
.review-card {
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface);
}

.detail-grid dt {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.detail-grid dd {
  margin: 0;
  font-weight: var(--font-weight-medium);
}

.detail-section h3,
.subsection-block h3,
.reference-panel h3 {
  margin: 0;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

.runtime-graph-panel h4 {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
}

.machine-item__meta,
.audit-item__meta {
  display: grid;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  color: var(--color-text-secondary);
}

.audit-list {
  display: grid;
  gap: var(--space-3);
}

.audit-item {
  padding-bottom: var(--space-3);
  border-bottom: var(--border-width) solid var(--color-border-subtle);
}

.audit-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.alert-stack {
  display: grid;
  gap: var(--space-2);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border-subtle);
  border-left: calc(var(--border-width) * 3) solid var(--status-info);
  background: var(--color-surface-raised);
}

.alert--success {
  border-left-color: var(--status-success);
}

.alert--warning {
  border-left-color: var(--status-warning);
}

.alert--error {
  border-left-color: var(--status-critical);
}

.alert__title {
  margin: 0;
  font-weight: var(--font-weight-semibold);
}

.alert__message {
  margin: 0;
  color: var(--color-text-secondary);
}

.pm-dropdown {
  position: relative;
}

.pm-dropdown-menu {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  min-width: 220px;
  padding: var(--space-1) 0;
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-strong);
  box-shadow: none;
  z-index: 30;
}

.pm-dropdown-menu--wide {
  min-width: 280px;
}

.pm-dropdown-divider {
  margin: var(--space-1) 0;
  border: none;
  border-top: var(--border-width) solid var(--color-border-subtle);
}

.pm-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--density-control-height);
  padding: var(--density-control-padding-y) var(--density-control-padding-x);
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  text-align: left;
}

.pm-dropdown-item:hover {
  background: var(--pm-hover-raised);
}

.pm-dropdown-item--danger {
  color: var(--status-critical);
}

.dropdown-section {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
}

.dropdown-title {
  margin: 0;
  font-weight: var(--font-weight-semibold);
}

.dropdown-meta {
  margin: 0;
}

.dropdown-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 0 var(--space-3);
  color: var(--color-text-primary);
}

.context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.context-grid--single {
  grid-template-columns: 1fr;
}

.context-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  min-height: 76px;
  align-content: start;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border-subtle);
}

.context-card__value {
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-sm);
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.context-card--span-2 {
  grid-column: span 2;
}

.subsection-block + .subsection-block {
  padding-top: var(--space-4);
  border-top: var(--border-width) solid var(--color-border-subtle);
}

.subsection-block__header {
  gap: var(--space-1);
}

.form-section {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.form-section--mode {
  gap: var(--space-4);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.form-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-section__header {
  display: grid;
  gap: var(--space-1);
}

.form-section__header p {
  margin: 0;
  color: var(--color-text-secondary);
}

.builder-guide {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface-raised);
}

.builder-guide__header {
  display: grid;
  gap: var(--space-1);
}

.builder-guide__header h3,
.builder-guide__header p {
  margin: 0;
}

.builder-step-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.builder-step-list--stack {
  display: grid;
  grid-template-columns: 1fr;
}

.builder-step-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(var(--density-control-height) - 4px);
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface-raised);
  color: var(--color-text-secondary);
  border-radius: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-align: left;
}

/* DES-2026-03-26_16-43-18Z-ACCS-001: catalog step buttons and template/preset actions keep full-size focusable targets so the staged builder remains keyboard-safe. */
.builder-step-button:hover {
  background: var(--pm-hover-raised);
  color: var(--color-text-primary);
}

.builder-step-button.is-active {
  border-color: var(--pm-primary);
  background: var(--pm-primary);
  color: var(--color-text-inverse);
  box-shadow: none;
}

.builder-stage {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border-strong);
  background: var(--color-surface);
  min-width: 0;
}

.builder-stage[hidden] {
  display: none;
}

.builder-stage__header {
  display: grid;
  gap: var(--space-1);
}

.builder-stage__header h3,
.builder-stage__header p {
  margin: 0;
}

.builder-stage__actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.builder-stage__actions .button:last-child {
  margin-left: auto;
}

.builder-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.builder-profile {
  display: grid;
  gap: var(--space-2);
  min-height: 148px;
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border-strong);
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  text-align: left;
}

.builder-profile:hover {
  background: var(--pm-hover-raised);
}

.builder-profile.is-active {
  border-color: var(--pm-primary);
  box-shadow: inset 0 0 0 1px var(--pm-primary);
}

.builder-profile__eyebrow {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.builder-profile__title {
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  font-weight: var(--font-weight-semibold);
}

.builder-profile__copy {
  color: var(--color-text-secondary);
}

/* DES-2026-03-26_16-43-18Z-COLOR-001: catalog builder stages keep neutral structural surfaces and reserve chroma for active steps and primary actions only. */
.builder-stage,
.builder-profile,
.builder-guide {
  border-color: var(--color-border-strong);
}

.builder-anchor {
  position: relative;
  height: 0;
  scroll-margin-top: calc(var(--topbar-height) + var(--space-8));
}

.field-group {
  margin: 0;
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface);
  min-width: 0;
  min-inline-size: 0;
}

.field-group legend {
  padding: 0 var(--space-2);
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-1);
  padding: var(--space-1);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface);
}

.mode-switch--toolbar {
  min-width: 220px;
}

.mode-switch--compact {
  min-width: 116px;
}

.mode-switch__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(var(--density-control-height) - 6px);
  padding: 0 var(--space-3);
  border: var(--border-width) solid transparent;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.mode-switch__option:hover {
  background: var(--pm-hover-raised);
  color: var(--color-text-primary);
}

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

.mode-switch__option.is-active {
  border-color: var(--pm-primary);
  background: var(--pm-primary);
  color: var(--color-text-inverse);
  box-shadow: none;
}

.mode-note,
.mode-summary-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface-raised);
  min-width: 0;
}

.mode-note__title {
  color: var(--color-text-primary);
}

.mode-note__copy,
.mode-note__meta {
  margin: 0;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  align-items: stretch;
  min-width: 0;
}

.package-card {
  position: relative;
  display: block;
  cursor: pointer;
  min-width: 0;
}

.package-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.package-card__body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: var(--space-3);
  min-height: 100%;
  min-width: 0;
  height: 100%;
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface-raised);
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.package-card:hover .package-card__body {
  background: var(--pm-hover-raised);
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
}

.package-card input:focus-visible + .package-card__body {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.package-card input:checked + .package-card__body {
  border-color: var(--pm-primary);
  background: color-mix(in srgb, var(--pm-primary-container) 34%, var(--color-surface-raised) 66%);
  box-shadow: inset 0 0 0 1px var(--pm-primary);
}

.package-card__eyebrow {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-tertiary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.package-card__title {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.package-card__copy {
  margin: 0;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.package-card__meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: flex-start;
  min-width: 0;
}

.mode-summary-card {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}

.mode-summary-card__item {
  display: grid;
  gap: var(--space-1);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-2);
}

.checklist-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.check-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  min-height: var(--density-control-height);
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
}

.check-option input {
  margin-top: 2px;
  flex-shrink: 0;
}

.check-option__body {
  display: grid;
  gap: var(--space-1);
}

.check-option__title {
  font-weight: var(--font-weight-medium);
}

.check-option__description {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.review-card {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.review-card--drawer {
  gap: var(--space-4);
}

.review-card__body {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.review-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
  min-width: 0;
}

.review-summary__item {
  display: grid;
  gap: var(--space-1);
  min-width: 120px;
}

.review-summary__item strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.review-summary__note {
  margin: 0;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 40;
}

/* DES-2026-03-26_14-34-09Z-SPACE-002: the first-page create builder uses a production-width workspace so fields, review, and guidance remain readable on desktop. */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(980px, calc(100vw - var(--space-4)));
  z-index: 50;
}

/* DES-2026-03-26_14-34-09Z-COMP-001: the audited create builder keeps sharp borders and removes soft elevation. */
.drawer__panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-surface-raised);
  border-left: var(--border-width) solid var(--color-border-strong);
  box-shadow: none;
}

.drawer__header,
.drawer__body {
  padding: var(--space-4);
}

.drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: var(--border-width) solid var(--color-border-subtle);
}

.drawer__header-copy {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.drawer__header-actions {
  display: grid;
  justify-items: end;
  gap: var(--space-3);
  flex: 0 0 auto;
  min-width: 0;
}

.drawer__toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
  min-width: 0;
}

.drawer__mode-group {
  display: grid;
  gap: var(--space-1);
  justify-items: end;
  min-width: 0;
}

.drawer__toolbar-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.drawer__body {
  flex: 1;
  overflow: auto;
  min-width: 0;
  padding: var(--space-5);
}

.drawer-form {
  display: grid;
  gap: var(--space-6);
  min-width: 0;
}

.drawer-form--builder {
  min-height: 100%;
}

.resource-shell {
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

/* DES-2026-03-26_20-08-10Z-SPACE-001: the audit investigation workspace widens the evidence table and keeps the selected-event rail stable beside it. */
.resource-shell--audit {
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
}

.builder-workspace {
  display: grid;
  gap: var(--space-5);
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: var(--space-4);
  align-items: start;
}

.builder-layout--drawer {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.82fr);
  gap: var(--space-5);
}

.builder-main {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
}

.builder-sidebar {
  display: grid;
  gap: var(--space-3);
  align-self: start;
  min-width: 0;
}

.builder-sidebar--drawer {
  position: sticky;
  top: 0;
  gap: var(--space-4);
}

.builder-panel {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface-raised);
  min-width: 0;
}

.builder-panel h3,
.builder-panel p {
  margin: 0;
}

.audit-detail-panel {
  display: grid;
  gap: var(--space-3);
}

.audit-kv-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.audit-kv-item {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface);
  min-width: 0;
}

.audit-kv-item--message,
.audit-kv-item--empty {
  grid-column: 1 / -1;
}

.audit-kv-item__label {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.audit-kv-item__value {
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* DES-2026-03-26_14-34-09Z-COLOR-001: persist strong neutral separators on first-page structural cards after the later builder/card border shorthands are applied. */
.status-strip__item,
.detail-grid > div,
.machine-item,
.context-card,
.review-card,
.builder-panel,
.runtime-graph-panel,
.check-option,
.field-group,
.mode-note,
.mode-summary-card {
  border-color: var(--color-border-strong);
}

.inventory-stack {
  display: grid;
  gap: var(--space-3);
}

.resource-form {
  padding-right: var(--space-4);
  border-right: var(--border-width) solid var(--color-border-subtle);
  min-width: 0;
}

.resource-form--builder {
  padding-right: 0;
  border-right: 0;
}

.resource-shell > * {
  min-width: 0;
}

.resource-form .form-grid {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

.resource-form .form-grid--triple {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

.resource-form .checklist-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.resource-form--builder .builder-guide {
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-4));
  z-index: 1;
}

/* DES-2026-03-26_17-22-23Z-COMP-001: the identity page reuses one shared sharp-edged staged-builder contract for both user and group creation. */
.resource-form--builder[data-builder-flow="policy"],
.resource-form--builder[data-builder-flow="user"],
.resource-form--builder[data-builder-flow="group"],
.resource-form--builder[data-builder-flow="token"],
.resource-form--builder[data-builder-flow="webhook"] {
  display: grid;
  gap: var(--space-4);
}

.resource-form--builder[data-builder-flow="policy"] .builder-step-list,
.resource-form--builder[data-builder-flow="user"] .builder-step-list,
.resource-form--builder[data-builder-flow="group"] .builder-step-list,
.resource-form--builder[data-builder-flow="token"] .builder-step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-form--builder[data-builder-flow="webhook"] .builder-step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.resource-form--builder[data-builder-flow="policy"] .builder-step-button,
.resource-form--builder[data-builder-flow="user"] .builder-step-button,
.resource-form--builder[data-builder-flow="group"] .builder-step-button,
.resource-form--builder[data-builder-flow="token"] .builder-step-button,
.resource-form--builder[data-builder-flow="webhook"] .builder-step-button {
  width: 100%;
}

/* DES-2026-03-26_17-22-23Z-COLOR-001: the identity-directory builders keep neutral stage shells and restrained inline actions so light and dark mode preserve the same hierarchy without color bleed. */
#usersTable .button--table-inline,
#groupsTable .button--table-inline,
#tokensTable .button--table-inline,
#webhookEndpointsTable .button--table-inline,
#webhookEventsTable .button--table-inline {
  min-height: var(--size-target-min);
}

/* DES-2026-03-26_18-34-45Z-ACCS-001: access step controls and inventory actions stay at or above the researched minimum target size while sharing the app-wide focus treatment. */
.resource-form--builder[data-builder-flow="user"] .builder-step-button,
.resource-form--builder[data-builder-flow="group"] .builder-step-button,
.resource-form--builder[data-builder-flow="token"] .builder-step-button,
.resource-form--builder[data-builder-flow="webhook"] .builder-step-button,
#usersTable .button--table-inline,
#groupsTable .button--table-inline,
#tokensTable .button--table-inline,
#webhookEndpointsTable .button--table-inline,
#webhookEventsTable .button--table-inline {
  min-height: var(--size-target-min);
}

/* DES-2026-03-26_18-34-45Z-COLOR-001: token and delivery inventories use the same restrained neutral row-action treatment as the audited sections above. */
#tokensTable .table-action-row,
#webhookEndpointsTable .table-action-row,
#webhookEventsTable .table-action-row {
  align-items: flex-start;
}

#tokensTable .table-action-row .button--table-inline,
#webhookEndpointsTable .table-action-row .button--table-inline,
#webhookEventsTable .table-action-row .button--table-inline {
  flex: 0 0 auto;
}

.runtime-graph-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.runtime-graph-panel {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface);
}

.runtime-record-list {
  display: grid;
  gap: var(--space-2);
}

.runtime-record {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: var(--border-width) solid var(--color-border-subtle);
  background: var(--color-surface-raised);
}

.drawer__footer {
  justify-content: flex-end;
}

.drawer__footer--inline {
  justify-content: flex-start;
}

.drawer__footer--builder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.status-console {
  margin: 0;
  min-height: 280px;
  max-height: 32rem;
  overflow: auto;
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border-subtle);
  border-left: calc(var(--border-width) * 3) solid var(--status-info);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: var(--font-family-mono);
  font-size: 13px;
  line-height: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}

.status-console--success {
  border-left-color: var(--status-success);
}

.status-console--error {
  border-left-color: var(--status-critical);
}

/* DES-2026-03-26_20-08-10Z-COLOR-001: audit evidence cards keep neutral structural contrast so selected-event metadata remains readable in light and dark mode. */
/* DES-2026-03-26_20-08-11Z-COLOR-001: diagnostics keeps the same neutral-first investigation shell and response console treatment instead of introducing extra decorative color blocks. */
.table-wrap--audit,
.audit-kv-item,
#diagnosticsConsoleMeta .context-card,
#diagnosticsWorkspace .context-card,
#diagnosticsWorkspace .runtime-graph-panel {
  border-color: var(--color-border-strong);
}

.table-wrap--audit {
  min-height: 420px;
  border-top: var(--border-width) solid var(--color-border-subtle);
  border-bottom: var(--border-width) solid var(--color-border-subtle);
}

.monospace {
  font-family: var(--font-family-mono);
  overflow-wrap: anywhere;
  word-break: break-word;
}

#productsTable table,
#packagesTable table,
#releasesTable table,
#artifactsTable table,
#enginesTable table,
#channelsTable table,
#usersTable table,
#groupsTable table {
  min-width: 880px;
}

#policiesTable table,
#tokensTable table,
#webhookEndpointsTable table,
#webhookEventsTable table,
#auditFeed table {
  min-width: 1040px;
}

#policiesTable .tag-list,
#tokensTable .tag-list,
#webhookEndpointsTable .tag-list,
#webhookEventsTable .tag-list {
  align-items: flex-start;
}

.detail-skeleton {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}

.skeleton-line {
  display: block;
  width: 100%;
  height: 12px;
  background: linear-gradient(90deg, var(--color-surface) 0%, var(--color-surface-raised) 50%, var(--color-surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

.skeleton-line--title {
  height: 18px;
  width: 60%;
}

.skeleton-line--table {
  height: 10px;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.login-main {
  max-width: none;
}

.login-shell {
  min-height: calc(100vh - var(--topbar-height));
  display: grid;
  place-items: center;
  padding: var(--space-6);
  background:
    radial-gradient(circle at top right, rgba(87, 163, 171, 0.22), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, var(--brand-mist) 58%, #c7e0e3 100%);
}

.login-panel {
  width: min(100%, 540px);
  padding: var(--space-6);
}

.pm-layout[data-color-mode="dark"] .login-shell {
  background:
    radial-gradient(circle at top right, rgba(171, 209, 213, 0.16), transparent 24%),
    linear-gradient(160deg, #08191d 0%, #0d2328 54%, #14373d 100%);
}

@media (max-width: 1180px) {
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-primary-detail,
  .page-header {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
    max-height: none;
  }

  .detail-panel__body {
    max-height: none;
  }

  .page-header__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  .top-appbar {
    flex-wrap: wrap;
    row-gap: var(--space-2);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  .appbar-spacer {
    display: none;
  }

  .appbar-context {
    order: 10;
    width: 100%;
  }

  .appbar-display-controls {
    order: 9;
    width: 100%;
  }
}

@media (max-width: 980px) {
  .form-grid--triple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .package-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: var(--space-4);
  }

  .context-grid {
    grid-template-columns: 1fr;
  }

  .context-card--span-2 {
    grid-column: auto;
  }

  .resource-shell {
    grid-template-columns: 1fr;
  }

  .builder-layout {
    grid-template-columns: 1fr;
  }

  .builder-layout--drawer {
    grid-template-columns: 1fr;
  }

  .builder-sidebar,
  .resource-form--builder .builder-guide {
    position: static;
  }

  .builder-profile-grid,
  .resource-form--builder[data-builder-flow="policy"] .builder-step-list,
  .resource-form--builder[data-builder-flow="user"] .builder-step-list,
  .resource-form--builder[data-builder-flow="group"] .builder-step-list,
  .resource-form--builder[data-builder-flow="token"] .builder-step-list,
  .resource-form--builder[data-builder-flow="webhook"] .builder-step-list {
    grid-template-columns: 1fr;
  }

  .builder-sidebar--drawer {
    position: static;
  }

  .resource-form {
    padding-right: 0;
    padding-bottom: var(--space-4);
    border-right: 0;
    border-bottom: var(--border-width) solid var(--color-border-subtle);
  }

  .resource-form--builder {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .runtime-graph-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-header__copy h1,
  .login-panel h1 {
    font-size: var(--font-size-2xl);
    line-height: var(--line-height-2xl);
  }

  .summary-strip,
  .status-strip,
  .detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .pm-sidebar,
  .pm-sidebar-open,
  .pm-sidebar-collapsed {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width-expanded);
    z-index: 35;
    transform: translateX(-100%);
  }

  .pm-sidebar-open {
    transform: translateX(0);
  }

  .sidebar-footer {
    display: grid;
  }

  .top-appbar {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .panel-toolbar {
    grid-template-columns: 1fr;
  }

  .drawer {
    width: 100vw;
  }

  .drawer__header {
    flex-direction: column;
    align-items: stretch;
  }

  .drawer__header-actions,
  .drawer__mode-group {
    justify-items: stretch;
  }

  .drawer__toolbar {
    justify-content: stretch;
  }

  .drawer__body {
    padding: var(--space-4);
  }

  .mode-switch--toolbar {
    width: 100%;
    min-width: 0;
  }

  .drawer__footer--builder {
    grid-template-columns: 1fr;
  }

  .table-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .app-shell,
  .login-shell {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  #keygenContext {
    display: none;
  }
}
