/* source: css/variables.css */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Sora:wght@400;500;600;700;800&display=swap");
/* source: css/colors.css */
:root {
  color-scheme: light;

  --simbo-primary-blue: #0b6bff;
  --simbo-primary-violet: #6d35f5;
  --simbo-deep-navy: #020a33;
  --simbo-slate: #667085;
  --simbo-white: #ffffff;
  --simbo-electric-blue: #1e8bff;
  --simbo-indigo: #3448f0;
  --simbo-purple: #7c3aed;
  --simbo-soft-blue: #eaf2ff;
  --simbo-soft-violet: #f1ecff;
  --simbo-success: #12b76a;
  --simbo-warning: #f79009;
  --simbo-danger: #f04438;
  --simbo-info: #2e90fa;

  --color-bg: #ffffff;
  --color-bg-muted: #f7f9fc;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;
  --color-border: #d9e2ef;
  --color-text: #020a33;
  --color-text-muted: #667085;
  --color-heading: #020a33;
  --color-muted: var(--color-text-muted);

  --color-primary: #0b6bff;
  --color-primary-hover: #095de0;
  --color-primary-dark: var(--color-primary-hover);
  --color-primary-soft: #eaf2ff;
  --color-secondary: #6d35f5;
  --color-secondary-hover: #5b2bd6;
  --color-secondary-soft: #f1ecff;
  --color-link: #0b6bff;
  --color-focus-ring: rgba(11, 107, 255, 0.28);

  --color-success: var(--simbo-success);
  --color-warning: var(--simbo-warning);
  --color-danger: var(--simbo-danger);
  --color-info: var(--simbo-info);
  --color-info-bg: var(--color-primary-soft);
  --color-success-bg: #ecfdf3;
  --color-warning-bg: #fff7ed;
  --color-danger-bg: #fef3f2;

  --gradient-brand: linear-gradient(135deg, #0b6bff 0%, #3448f0 48%, #6d35f5 100%);
  --shadow-soft: 0 12px 30px rgba(2, 10, 51, 0.08);
  --shadow-card: 0 8px 24px rgba(2, 10, 51, 0.10);
  --shadow-sm: var(--shadow-soft);
  --shadow-md: var(--shadow-card);
}

[data-theme="dark"] {
  color-scheme: dark;

  --color-bg: #050816;
  --color-bg-muted: #090f24;
  --color-surface: #0d132b;
  --color-surface-alt: #111936;
  --color-border: #26314f;
  --color-text: #f8fafc;
  --color-text-muted: #aab3c5;
  --color-heading: #ffffff;
  --color-muted: var(--color-text-muted);

  --color-primary: #4c9bff;
  --color-primary-hover: #77b6ff;
  --color-primary-dark: var(--color-primary-hover);
  --color-primary-soft: #10294f;
  --color-secondary: #8b5cf6;
  --color-secondary-hover: #a78bfa;
  --color-secondary-soft: #261a4f;
  --color-link: #77b6ff;
  --color-focus-ring: rgba(119, 182, 255, 0.35);
  --color-info-bg: #10294f;
  --color-success-bg: rgba(18, 183, 106, 0.14);
  --color-warning-bg: rgba(247, 144, 9, 0.14);
  --color-danger-bg: rgba(240, 68, 56, 0.14);
  --gradient-brand: linear-gradient(135deg, #1e8bff 0%, #5865f2 48%, #8b5cf6 100%);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.36);
  --shadow-sm: var(--shadow-soft);
  --shadow-md: var(--shadow-card);
}


:root {
  --font-heading: "Sora", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-sans: var(--font-body);
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --leading-tight: 1.1;
  --leading-heading: 1.18;
  --leading-body: 1.55;
  --leading-ui: 1.35;
  --tracking-tight: 0;
  --tracking-normal: 0;
  --tracking-wide: 0;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --top-nav-height: 64px;
  --side-nav-width: 248px;
}

.simbo-gradient {
  background: var(--gradient-brand);
}

.simbo-card {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.simbo-button-primary {
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--simbo-white);
}

.simbo-button-primary:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-hover);
}

.simbo-button-secondary {
  border: 1px solid var(--color-secondary);
  background: var(--color-secondary);
  color: var(--simbo-white);
}

.simbo-button-secondary:hover {
  border-color: var(--color-secondary-hover);
  background: var(--color-secondary-hover);
}

/* source: css/theme.css */
:root {
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: Calibri, "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: var(--font-body);
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 700;
  --tracking-wide: 0.12em;

  --invictus-navy: #253745;
  --invictus-navy-deep: #172a38;
  --invictus-gold: #8b7355;
  --invictus-gold-accessible: #6b4e32;
  --invictus-off-white: #f6f8fa;

  --color-bg: var(--invictus-off-white);
  --color-bg-muted: #eef1f3;
  --color-surface: #ffffff;
  --color-surface-alt: #edf1f3;
  --color-border: #d4d9dd;
  --color-text: #253745;
  --color-text-muted: #596875;
  --color-heading: #1a1a2e;
  --color-muted: var(--color-text-muted);

  --color-primary: var(--invictus-navy);
  --color-primary-hover: var(--invictus-navy-deep);
  --color-primary-dark: var(--color-primary-hover);
  --color-primary-soft: #e3e8eb;
  --color-secondary: var(--invictus-gold-accessible);
  --color-secondary-hover: #563d28;
  --color-secondary-soft: #eee8e1;
  --color-link: var(--invictus-gold-accessible);
  --color-focus-ring: rgba(107, 78, 50, 0.36);

  --color-info: #2e6f95;
  --color-info-bg: #e8f2f7;
  --color-success-bg: #eaf7f0;
  --color-warning-bg: #fff4df;
  --color-danger-bg: #fcecea;

  --gradient-brand: linear-gradient(135deg, #253745 0%, #334c5d 58%, #8b7355 100%);
  --shadow-soft: 0 10px 24px rgba(37, 55, 69, 0.08);
  --shadow-card: 0 8px 20px rgba(37, 55, 69, 0.10);
  --shadow-sm: var(--shadow-soft);
  --shadow-md: var(--shadow-card);
}

[data-theme="dark"] {
  --color-bg: #0d1117;
  --color-bg-muted: #11161d;
  --color-surface: #161b22;
  --color-surface-alt: #1d242d;
  --color-border: #353d47;
  --color-text: #e8ecf0;
  --color-text-muted: #b8c0ca;
  --color-heading: #ffffff;
  --color-muted: var(--color-text-muted);

  --color-primary: #d9c4a0;
  --color-primary-hover: #e8d5b5;
  --color-primary-dark: var(--color-primary-hover);
  --color-primary-soft: #312d27;
  --color-secondary: #bfa47a;
  --color-secondary-hover: #d9c4a0;
  --color-secondary-soft: #29251f;
  --color-link: #e8d5b5;
  --color-focus-ring: rgba(217, 196, 160, 0.48);

  --color-info: #78b8dc;
  --color-info-bg: #152b38;
  --color-success-bg: #142d22;
  --color-warning-bg: #352b18;
  --color-danger-bg: #391f21;

  --gradient-brand: linear-gradient(135deg, #d9c4a0 0%, #bfa47a 55%, #e8d5b5 100%);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.26);
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.34);
  --shadow-sm: var(--shadow-soft);
  --shadow-md: var(--shadow-card);
}

body h1,
body h2 {
  font-weight: var(--font-regular);
}

.simbo-ui-label {
  color: var(--invictus-gold-accessible);
  text-transform: uppercase;
}

[data-theme="dark"] .simbo-ui-label {
  color: #d9c4a0;
}

body .content-panel,
body .simbo-card,
body .card,
body .stat-card {
  border-top-color: var(--invictus-gold);
  border-top-width: 3px;
}

body .top-nav,
body .site-footer,
body .external-header {
  border-color: color-mix(in srgb, var(--color-border) 78%, var(--invictus-gold) 22%);
}

.btn-primary,
.simbo-button-primary {
  color: #ffffff;
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .simbo-button-primary,
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .simbo-button-secondary {
  color: #0d1117;
}

.auth-brand {
  width: min(100%, 440px);
  justify-content: center;
}

.auth-brand-wordmark {
  width: min(100%, 380px);
  height: auto;
}

@media (max-width: 560px) {
  .auth-brand-wordmark {
    width: min(100%, 300px);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-body);
}

a {
  color: var(--color-link);
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
.simbo-heading {
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-heading);
}

h1 {
  margin-bottom: var(--space-4);
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
}

h2 {
  margin-bottom: var(--space-3);
  font-size: var(--text-3xl);
}

h3 {
  margin-bottom: var(--space-3);
  font-size: var(--text-xl);
}

p {
  margin-bottom: var(--space-4);
}

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

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1000;
  transform: translateY(-160%);
  border-radius: var(--radius-md);
  background: var(--color-heading);
  color: var(--simbo-white);
  padding: var(--space-2) var(--space-3);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.simbo-display {
  font-size: var(--text-6xl);
  font-weight: var(--font-extrabold);
}

.simbo-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  line-height: var(--leading-body);
}

.simbo-ui-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
  line-height: var(--leading-ui);
}

code,
pre,
.simbo-code,
.simbo-id {
  font-family: var(--font-mono);
}

.simbo-id {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
}

@media (max-width: 560px) {
  h1,
  .simbo-display {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-lg);
  }
}

/* source: css/layout.css */
.app-shell {
  display: grid;
  grid-template-columns: var(--side-nav-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--top-nav-height));
}

.app-main {
  flex: 1 0 auto;
  width: 100%;
  margin: 0;
  padding: var(--space-8) 4vw;
}

.centered-layout {
  display: grid;
  min-height: calc(100vh - var(--top-nav-height));
  place-items: center;
  padding: var(--space-8);
}

.page-section {
  padding: var(--space-10) 0 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: var(--space-5);
}

.section-heading h2 {
  margin-bottom: var(--space-2);
}

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

.content-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.inline-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

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

.state-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
}

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

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-4);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-6);
}

.site-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  padding: var(--space-5) var(--space-8);
  text-align: center;
}

.footer-logo {
  width: 28px;
  height: 28px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .app-main {
    padding: var(--space-6) 4vw;
  }

  .content-grid,
  .form-grid,
  .state-row {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: var(--space-5) var(--space-4);
  }
}

@media (max-width: 560px) {
  .form-actions,
  .inline-cluster {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .btn,
  .inline-cluster .btn {
    width: 100%;
  }
}

/* source: css/components.css */
/* source: css/components/navbar-top.css */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--top-nav-height);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: 0 1px 0 rgba(2, 10, 51, 0.03);
  backdrop-filter: blur(12px);
}

.top-nav-inner {
  display: flex;
  height: 100%;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-6);
}

.brand {
  display: inline-flex;
  min-height: 42px;
  min-width: 0;
  align-items: center;
  gap: var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-heading);
  font-weight: var(--font-extrabold);
  padding: var(--space-1) var(--space-2);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-mark-dark {
  display: none;
}

[data-theme="dark"] .brand-mark-light {
  display: none;
}

[data-theme="dark"] .brand-mark-dark {
  display: inline-block;
}

.top-nav-links {
  display: flex;
  gap: var(--space-1);
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
}

.top-nav-links a {
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-weight: var(--font-semibold);
  padding: var(--space-2) var(--space-3);
}

.top-nav-links a:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.top-nav-links a.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.top-nav-external-link {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .top-nav-inner {
    padding: 0 var(--space-4);
  }

  .top-nav-links {
    display: none;
  }
}

@media (max-width: 560px) {
  .top-nav-inner {
    gap: var(--space-3);
  }

  .brand-text {
    max-width: 124px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* source: css/components/theme-toggle.css */
.theme-switch {
  position: relative;
  display: inline-flex;
  width: 64px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary-soft), var(--color-secondary-soft));
  color: var(--color-primary);
  padding: 0 8px;
  box-shadow: inset 0 1px 3px rgba(2, 10, 51, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.theme-switch:hover {
  border-color: var(--color-primary);
  box-shadow: inset 0 1px 3px rgba(2, 10, 51, 0.08), 0 8px 18px rgba(11, 107, 255, 0.14);
}

[data-theme="dark"] .theme-switch {
  border-color: rgba(119, 182, 255, 0.54);
  background: var(--gradient-brand);
  color: var(--simbo-white);
}

.theme-switch-icon {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.theme-switch-sun {
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 -5px 0 -3px currentColor, 0 5px 0 -3px currentColor, 5px 0 0 -3px currentColor, -5px 0 0 -3px currentColor;
}

.theme-switch-moon {
  border-radius: 50%;
  box-shadow: inset 5px -3px 0 0 currentColor;
}

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 2;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(2, 10, 51, 0.08);
  border-radius: 50%;
  background: var(--simbo-white);
  box-shadow: 0 5px 12px rgba(2, 10, 51, 0.22);
  transition: transform 180ms ease;
}

.theme-switch-thumb img {
  width: 18px;
  height: 18px;
}

.theme-switch-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gradient-brand);
}

[data-theme="dark"] .theme-switch-thumb {
  transform: translateX(30px);
}

@media (max-width: 560px) {
  .theme-switch {
    width: 58px;
    height: 32px;
    padding: 0 7px;
  }

  .theme-switch-thumb {
    width: 24px;
    height: 24px;
  }

  .theme-switch-thumb img {
    width: 16px;
    height: 16px;
  }

  .theme-switch-mark {
    width: 12px;
    height: 12px;
  }

  [data-theme="dark"] .theme-switch-thumb {
    transform: translateX(28px);
  }
}

/* source: css/components/navbar-side.css */
.side-nav {
  position: sticky;
  top: var(--top-nav-height);
  height: calc(100vh - var(--top-nav-height));
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: var(--space-5);
}

.side-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.side-nav-title {
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--font-extrabold);
  text-transform: uppercase;
}

.side-nav-close {
  display: none;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.4rem;
  line-height: 1;
}

.side-nav-links {
  display: grid;
  gap: var(--space-1);
}

.side-nav-links a {
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-weight: var(--font-semibold);
  padding: var(--space-3);
}

.side-nav-links a:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.side-nav-links a.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

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

@media (max-width: 900px) {
  .side-nav-close {
    display: inline-flex;
  }

  .side-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 600;
    width: min(84vw, var(--side-nav-width));
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: var(--shadow-md);
    transition: transform 180ms ease;
  }

  .side-nav.is-open {
    transform: translateX(0);
  }

  body.nav-open {
    overflow: hidden;
  }
}

/* source: css/components/hamburger-menu.css */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.hamburger:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.hamburger[aria-expanded="true"] {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.hamburger-bars {
  display: flex;
  width: 20px;
  height: 14px;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  flex: 0 0 2px;
  border-radius: 99px;
  background: var(--color-heading);
  transform-origin: center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 900px) {
  .hamburger {
    display: inline-flex;
  }
}

/* source: css/components/footer.css */
.site-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  padding: var(--space-5) var(--space-8);
  text-align: center;
}

.footer-logo {
  width: 28px;
  height: 28px;
}

.footer-logo-mark {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--simbo-white);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  line-height: 1;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .site-footer {
    padding: var(--space-5) var(--space-4);
  }
}

/* source: css/components/button.css */
.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.6rem 0.95rem;
  font-weight: var(--font-bold);
  line-height: 1;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, background-color 160ms ease, filter 160ms ease;
}

.btn-sm {
  min-height: 34px;
  padding: 0.45rem 0.65rem;
  font-size: var(--text-sm);
}

.btn-primary {
  border-color: var(--color-primary);
  background: var(--gradient-brand);
  color: var(--simbo-white);
  box-shadow: 0 8px 18px rgba(11, 107, 255, 0.20);
}

.btn-primary:hover {
  border-color: var(--color-secondary);
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--simbo-indigo) 48%, var(--color-primary) 100%);
  box-shadow: 0 10px 24px rgba(109, 53, 245, 0.26);
}

.btn-secondary {
  border-color: var(--color-secondary);
  background: var(--color-secondary);
  color: var(--simbo-white);
}

.btn-secondary:hover {
  border-color: var(--color-secondary-hover);
  background: var(--color-secondary-hover);
}

.btn-ghost {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.btn-ghost:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-secondary);
}

/* source: css/components/card.css */
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

.card h3 {
  margin-bottom: var(--space-2);
}

.card-body {
  color: var(--color-text-muted);
}

.card-body p:last-child,
.card-footer p:last-child {
  margin-bottom: 0;
}

.card-footer {
  margin-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* source: css/components/page-header.css */
.page-header {
  max-width: 760px;
  padding: var(--space-8) 0 var(--space-6);
}

.eyebrow {
  margin-bottom: var(--space-2);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-extrabold);
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-description {
  max-width: 680px;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

/* source: css/components/alert.css */
.alert {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 260ms ease, transform 260ms ease;
}

.alert.is-dismissing {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.alert strong {
  display: block;
  margin-bottom: var(--space-1);
}

.alert p {
  margin: 0;
  color: var(--color-text-muted);
}

.alert button {
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 1.25rem;
  line-height: 1;
}

.alert-info {
  background: var(--color-info-bg);
}

.alert-success {
  border-color: rgba(19, 121, 91, 0.24);
  background: var(--color-success-bg);
}

.alert-warning {
  border-color: rgba(161, 92, 7, 0.24);
  background: var(--color-warning-bg);
}

.alert-danger {
  border-color: rgba(180, 35, 24, 0.24);
  background: var(--color-danger-bg);
}

@media (prefers-reduced-motion: reduce) {
  .alert {
    transition-duration: 1ms;
  }
}

/* source: css/components/modal.css */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: grid;
  place-items: center;
  padding: var(--space-4);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
}

.modal-panel {
  position: relative;
  width: min(100%, 520px);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-5);
}

.modal-header {
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.modal-body {
  padding: var(--space-5);
  color: var(--color-text-muted);
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-footer {
  border-top: 1px solid var(--color-border);
}

.modal-close {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.35rem;
  line-height: 1;
}

/* source: css/components/loading-spinner.css */
.loading-spinner {
  display: inline-grid;
  min-height: 80px;
  place-items: center;
}

.spinner-ring {
  width: 38px;
  height: 38px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

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

/* source: css/components/page-loading-overlay.css */
.page-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: rgba(247, 249, 252, 0.86);
  cursor: wait;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 120ms ease;
}

.page-loading-overlay[hidden] {
  display: none;
}

.page-loading-overlay.is-active {
  opacity: 1;
}

.page-loading-indicator {
  display: grid;
  width: 140px;
  min-height: 140px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  padding: var(--space-4);
}

.page-loading-indicator .loading-spinner {
  min-height: 0;
}

body.page-loading {
  overflow: hidden;
  cursor: wait;
}

body.page-loading > :not(.page-loading-overlay) {
  pointer-events: none;
}

[data-theme="dark"] .page-loading-overlay {
  background: rgba(5, 8, 22, 0.76);
}

/* source: css/components/empty-state.css */
.empty-state {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
}

.empty-state-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-3);
  place-items: center;
  border-radius: 999px;
  background: var(--color-secondary-soft);
  color: var(--color-secondary);
  font-weight: var(--font-extrabold);
}

.empty-state h3 {
  margin-bottom: var(--space-2);
}

.empty-state p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

/* source: css/components/badge.css */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: 0.25rem 0.6rem;
}

.badge-success {
  border-color: rgba(18, 183, 106, 0.25);
  background: var(--color-success-bg);
  color: var(--color-success);
}

.badge-warning {
  border-color: rgba(247, 144, 9, 0.25);
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.badge-danger {
  border-color: rgba(240, 68, 56, 0.25);
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.badge-info {
  border-color: rgba(11, 107, 255, 0.20);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* source: css/components/toast.css */
.toast-region {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 900;
  display: grid;
  width: min(100% - 2rem, 360px);
  gap: var(--space-3);
}

.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  border: 1px solid rgba(11, 107, 255, 0.20);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 260ms ease, transform 260ms ease;
}

.toast.is-dismissing {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.toast p {
  margin: 0;
  color: var(--color-text-muted);
}

.toast-close {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition-duration: 1ms;
  }
}

/* source: css/components/table.css */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-4);
  text-align: left;
}

.data-table th {
  background: var(--color-bg-muted);
  color: var(--color-heading);
  font-size: var(--text-sm);
}

.data-table td {
  color: var(--color-text-muted);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

/* source: css/components/pagination.css */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.pagination button {
  appearance: none;
  display: inline-grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-weight: var(--font-semibold);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.pagination button:hover,
.pagination .is-current {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

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

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* source: css/components/tabs.css */
.tabs {
  display: grid;
  gap: var(--space-4);
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.tab-button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  font-weight: var(--font-bold);
  padding: var(--space-3) var(--space-2);
}

.tab-button[aria-selected="true"] {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.tab-panel[hidden] {
  display: none;
}

/* source: css/components/breadcrumb.css */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.breadcrumb a {
  color: var(--color-primary);
  font-weight: var(--font-semibold);
}

.breadcrumb-separator {
  color: var(--color-border);
}

/* source: css/components/dropdown-menu.css */
.dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 300;
  display: grid;
  min-width: 190px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-2);
  box-shadow: var(--shadow-card);
}

.dropdown-menu[hidden] {
  display: none;
}

.dropdown-menu a,
.dropdown-menu button {
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  font-weight: var(--font-semibold);
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* source: css/components/search-input.css */
.search-control {
  position: relative;
  display: block;
}

.search-control .input {
  width: 100%;
  padding-left: 2.85rem;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  pointer-events: none;
  transform: translateY(-50%);
}

.search-icon::after {
  position: absolute;
  right: -0.45rem;
  bottom: -0.35rem;
  width: 0.5rem;
  border-top: 2px solid var(--color-primary);
  content: "";
  transform: rotate(45deg);
}

/* source: css/components/searchable-select.css */
.searchable-select {
  position: relative;
  width: 100%;
}

.searchable-select-control {
  position: relative;
}

.searchable-select-control .input {
  width: 100%;
  padding-right: 2.9rem;
}

.searchable-select-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.searchable-select-toggle:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.searchable-select-toggle span {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform 160ms ease;
}

.searchable-select.is-open .searchable-select-toggle span {
  transform: translateY(0.12rem) rotate(225deg);
}

.searchable-select.is-open .input {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.searchable-select-menu {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  z-index: 500;
  width: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-primary) 24%, var(--color-border));
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 18px 38px rgba(2, 10, 51, 0.16);
}

.searchable-select-menu[hidden] {
  display: none;
}

.searchable-select-options {
  display: grid;
  max-height: 17rem;
  gap: 0.15rem;
  overflow-y: auto;
  padding: var(--space-2);
  overscroll-behavior: contain;
}

.searchable-select-option {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.searchable-select-option:hover,
.searchable-select-option.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.searchable-select-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--color-primary-soft) 78%, var(--color-surface));
  color: var(--color-primary);
  font-weight: var(--font-bold);
}

.searchable-select-empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  padding: var(--space-4);
  text-align: center;
}

[data-theme="dark"] .searchable-select-menu {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
}

/* source: css/components/stat-card.css */
.stat-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

.stat-card-label {
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.stat-card-value {
  margin-bottom: var(--space-2);
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
}

.stat-card-trend {
  color: var(--color-success);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
}

/* source: css/components/confirm-dialog.css */
.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* source: css/components/tooltip.css */
.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-content {
  position: absolute;
  bottom: calc(100% + var(--space-2));
  left: 50%;
  z-index: 320;
  width: max-content;
  max-width: 240px;
  border-radius: var(--radius-md);
  background: var(--color-heading);
  color: var(--simbo-white);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  padding: var(--space-2) var(--space-3);
  transform: translateX(-50%);
}

.tooltip-content[hidden] {
  display: none;
}

/* source: css/components/file-upload.css */
.file-upload {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-muted);
  padding: var(--space-5);
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.file-upload.is-dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  box-shadow: 0 0 0 4px var(--color-focus-ring);
}

.file-upload input {
  display: none;
}

.file-upload-label {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  color: var(--color-text-muted);
  cursor: pointer;
  text-align: center;
}

.file-upload-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  color: var(--simbo-white);
  font-weight: var(--font-extrabold);
}

.file-upload-name {
  justify-self: center;
  margin: 0;
  color: var(--color-primary);
  font-weight: var(--font-semibold);
  text-align: center;
}

/* source: css/components/accordion.css */
.accordion {
  display: grid;
  gap: var(--space-3);
}

.accordion-item {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.accordion-heading {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
}

.accordion-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border: 0;
  background: transparent;
  color: var(--color-heading);
  font-weight: var(--font-bold);
  padding: var(--space-4);
  text-align: left;
}

.accordion-trigger:hover,
.accordion-trigger[aria-expanded="true"] {
  background: var(--color-surface-alt);
}

.accordion-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.accordion-icon::before,
.accordion-icon::after {
  position: absolute;
  top: 7px;
  left: 1px;
  width: 14px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  content: "";
}

.accordion-icon::after {
  transform: rotate(90deg);
  transition: transform 160ms ease;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon::after {
  transform: rotate(0deg);
}

.accordion-panel-inner {
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: var(--space-4);
}

.accordion-panel-inner > :last-child {
  margin-bottom: 0;
}

/* source: css/components/feature-tabs.css */
.feature-tabs {
  display: grid;
  gap: var(--space-4);
}

.feature-tabs-list {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-2);
}

.feature-tabs-tab {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-weight: var(--font-bold);
  padding: var(--space-2) var(--space-4);
}

.feature-tabs-tab:hover,
.feature-tabs-tab.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.feature-tabs-panels {
  min-width: 0;
}

.feature-tabs-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.feature-tabs-panel h3 {
  margin-bottom: var(--space-2);
}

.feature-tabs-panel p {
  color: var(--color-text-muted);
}

.feature-tabs-items {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
  padding-left: 1.25rem;
}

.feature-tabs-items li {
  color: var(--color-text);
}

@media (max-width: 560px) {
  .feature-tabs-panel {
    padding: var(--space-4);
  }
}

/* source: css/components/comparison-table.css */
.comparison-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.comparison-table caption {
  color: var(--color-text-muted);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-3);
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4);
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  background: var(--color-surface-alt);
  color: var(--color-heading);
  font-weight: var(--font-extrabold);
}

.comparison-table tbody th {
  color: var(--color-heading);
  font-weight: var(--font-bold);
}

.comparison-table td {
  color: var(--color-text-muted);
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 700px) {
  .comparison-table {
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .comparison-table thead {
    display: none;
  }

  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table th,
  .comparison-table td {
    display: block;
    width: 100%;
  }

  .comparison-table tr {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
  }

  .comparison-table tr + tr {
    margin-top: var(--space-3);
  }

  .comparison-table tbody th {
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-alt);
  }

  .comparison-table td {
    border-bottom: 1px solid var(--color-border);
  }

  .comparison-table td::before {
    display: block;
    color: var(--color-heading);
    content: attr(data-label);
    font-size: var(--text-sm);
    font-weight: var(--font-extrabold);
    margin-bottom: var(--space-1);
  }

  .comparison-table tr:last-child th,
  .comparison-table tr:last-child td,
  .comparison-table td:last-child {
    border-bottom: 0;
  }
}

/* source: css/components/process-timeline.css */
.process-timeline {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--space-4);
}

.process-timeline-step:not(:last-child)::before {
  position: absolute;
  top: 48px;
  bottom: calc(-1 * var(--space-4));
  left: 21px;
  width: 2px;
  background: var(--color-border);
  content: "";
}

.process-timeline-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: var(--font-extrabold);
}

.process-timeline-content {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.process-timeline-content h3 {
  margin-bottom: var(--space-2);
}

.process-timeline-content p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .process-timeline-step {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: var(--space-3);
  }

  .process-timeline-step:not(:last-child)::before {
    top: 40px;
    left: 17px;
  }

  .process-timeline-marker {
    width: 36px;
    height: 36px;
  }

  .process-timeline-content {
    padding: var(--space-4);
  }
}

/* source: css/components/media-feature.css */
.media-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.media-feature-right .media-feature-media {
  order: 2;
}

.media-feature-media {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt);
}

.media-feature-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.media-feature-content {
  min-width: 0;
}

.media-feature-eyebrow {
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-extrabold);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
}

.media-feature-content h2 {
  margin-bottom: var(--space-3);
}

.media-feature-content p {
  color: var(--color-text-muted);
}

.media-feature-content .btn {
  margin-top: var(--space-2);
}

@media (max-width: 760px) {
  .media-feature {
    grid-template-columns: 1fr;
    padding: var(--space-4);
  }

  .media-feature-right .media-feature-media {
    order: 0;
  }
}

/* source: css/components/stat-strip.css */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
}

.stat-strip-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.stat-strip-item dd {
  color: var(--color-heading);
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-heading);
  margin: 0 0 var(--space-2);
}

.stat-strip-item dt {
  color: var(--color-text-muted);
  font-weight: var(--font-semibold);
}

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

@media (max-width: 560px) {
  .stat-strip {
    grid-template-columns: 1fr;
  }
}

/* source: css/forms.css */
/* source: css/components/form-base.css */
.app-form {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}

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

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

.input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0.65rem 0.75rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input::placeholder {
  color: var(--color-text-muted);
}

.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.native-control {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.field-help,
.field-error,
.form-status {
  margin: 0;
  font-size: var(--text-sm);
}

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

.field-error {
  min-height: 1.25rem;
  color: var(--color-danger);
}

.input.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.14);
}

.input.is-valid {
  border-color: var(--color-success);
}

.form-status {
  min-height: 1.25rem;
  margin-top: var(--space-3);
  color: var(--color-success);
  font-weight: var(--font-bold);
}

/* source: css/components/input-text.css */
/* Text input uses shared form-base styles. */

/* source: css/components/input-email.css */
/* Email input uses shared form-base styles. */

/* source: css/components/input-phone.css */
/* Phone input uses shared form-base styles. */

/* source: css/components/input-password.css */
.password-checklist {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding-left: 1.2rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.password-checklist li::marker {
  color: var(--color-text-muted);
}

.password-checklist li.is-met {
  color: var(--color-success);
}

.password-checklist li.is-met::marker {
  color: var(--color-success);
}

/* source: css/components/input-date.css */
.custom-date {
  position: relative;
}

.custom-date-trigger {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, var(--color-bg-muted) 100%);
  color: var(--color-heading);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  padding: 0.7rem 0.85rem;
  text-align: left;
}

.custom-date-trigger:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.custom-date-trigger:focus-visible,
.custom-date.is-open .custom-date-trigger {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.custom-date-icon {
  position: relative;
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  box-shadow: 0 6px 14px rgba(11, 107, 255, 0.18);
}

.custom-date-icon::before,
.custom-date-icon::after {
  position: absolute;
  content: "";
}

.custom-date-icon::before {
  inset: 0.48rem 0.42rem 0.42rem;
  border: 2px solid var(--simbo-white);
  border-radius: 3px;
}

.custom-date-icon::after {
  top: 0.78rem;
  left: 0.55rem;
  width: 0.75rem;
  border-top: 2px solid var(--simbo-white);
}

.custom-date-panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  z-index: 300;
  width: 100%;
  min-width: 320px;
  overflow: hidden;
  border: 1px solid rgba(11, 107, 255, 0.22);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-4);
  box-shadow: 0 22px 44px rgba(2, 10, 51, 0.16);
}

.custom-date-panel[hidden] {
  display: none;
}

.custom-date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.custom-date-title {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 0.05rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  line-height: var(--leading-ui);
  padding: var(--space-2);
  text-align: center;
}

.custom-date-title span:last-child {
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: var(--text-xs);
}

.custom-date-title:hover,
.custom-date-title[aria-expanded="true"] {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.custom-date-nav {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  color: var(--color-primary);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  line-height: 1;
}

.custom-date-nav-wide {
  color: var(--color-secondary);
}

.custom-date-nav:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.custom-date-year-panel {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-muted);
  padding: var(--space-3);
}

.custom-date-year-panel[hidden] {
  display: none;
}

.custom-date-year-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.custom-date-year-controls button {
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: 0.45rem 0.6rem;
}

.custom-date-year-controls button:hover {
  background: var(--color-primary-soft);
}

.custom-date-year-controls span {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

.custom-date-year-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

.custom-date-year-option {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  padding: 0.55rem 0.4rem;
}

.custom-date-year-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.custom-date-year-option.is-selected {
  border-color: var(--color-primary);
  background: var(--gradient-brand);
  color: var(--simbo-white);
}

.custom-date-weekdays,
.custom-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-1);
}

.custom-date-weekdays {
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-align: center;
}

.custom-date-day {
  display: inline-grid;
  min-width: 0;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.custom-date-day:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.custom-date-day.is-muted {
  color: var(--color-text-muted);
}

.custom-date-day.is-today {
  box-shadow: inset 0 0 0 1px var(--color-primary);
}

.custom-date-day.is-selected {
  background: var(--gradient-brand);
  color: var(--simbo-white);
  box-shadow: 0 8px 18px rgba(11, 107, 255, 0.22);
}

.custom-date:has(.native-control.is-invalid) .custom-date-trigger {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.14);
}

@media (max-width: 560px) {
  .custom-date-panel {
    min-width: min(100vw - 2rem, 320px);
  }
}

/* source: css/components/input-select.css */
.custom-select {
  position: relative;
}

.custom-select-trigger {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, var(--color-bg-muted) 100%);
  color: var(--color-heading);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  padding: 0.7rem 0.85rem;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.custom-select-trigger:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.custom-select-trigger:focus-visible,
.custom-select.is-open .custom-select-trigger {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
}

.custom-select-icon {
  position: relative;
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  box-shadow: 0 6px 14px rgba(11, 107, 255, 0.18);
}

.custom-select-icon::after {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--simbo-white);
  border-bottom: 2px solid var(--simbo-white);
  content: "";
  transform: translate(-50%, -55%) rotate(45deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  z-index: 300;
  display: grid;
  width: 100%;
  min-width: 260px;
  overflow: hidden;
  border: 1px solid rgba(11, 107, 255, 0.22);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-2);
  box-shadow: 0 22px 44px rgba(2, 10, 51, 0.16);
}

.custom-select-menu[hidden] {
  display: none;
}

.custom-select-option {
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--font-medium);
  padding: 0.75rem 0.85rem;
  text-align: left;
}

.custom-select-option:hover,
.custom-select-option.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.custom-select-option[aria-selected="true"] {
  background: var(--gradient-brand);
  color: var(--simbo-white);
}

.custom-select:has(.native-control.is-invalid) .custom-select-trigger {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.14);
}

/* source: css/components/input-textarea.css */
.textarea {
  min-height: 120px;
  resize: vertical;
}

/* source: css/components/input-checkbox.css */
.checkbox-field {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.checkbox {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--color-primary);
}

.checkbox-field label {
  font-weight: var(--font-semibold);
}

/* source: css/components/input-radio-toggle.css */
.radio-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  width: fit-content;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}

.radio-toggle label {
  display: grid;
  cursor: pointer;
}

.radio-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-toggle span {
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  text-align: center;
}

.radio-toggle input:checked + span {
  background: var(--color-primary);
  color: var(--simbo-white);
  font-weight: var(--font-bold);
}

.radio-toggle input:focus-visible + span {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: -3px;
}

/* source: css/navigation.css */
/* Navigation component styles live in static/css/components/. */

/* source: css/utilities.css */
.text-muted {
  color: var(--color-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.w-full {
  width: 100%;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

/* source: css/app.css */
.section-header {
  max-width: 760px;
  margin-bottom: var(--space-5);
}

.impersonation-banner {
  position: sticky;
  top: var(--top-nav-height);
  z-index: 490;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid color-mix(in srgb, var(--color-warning) 38%, var(--color-border));
  background: color-mix(in srgb, var(--color-warning-bg) 92%, var(--color-surface));
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
  padding: var(--space-3) 4vw;
}

.impersonation-banner > div {
  display: grid;
  gap: var(--space-1);
}

.impersonation-banner strong {
  color: var(--color-heading);
}

.impersonation-banner span {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Internal user control */
.back-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: 1.25;
}

.back-link .icon {
  flex: 0 0 auto;
}

.internal-user-header,
.internal-user-detail-header,
.internal-user-toolbar,
.internal-user-copy-row,
.internal-user-wizard-actions,
.internal-user-action-list {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.internal-user-header,
.internal-user-detail-header {
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.internal-user-header h1,
.internal-user-detail-header h1,
.internal-user-header p:last-child,
.internal-user-detail-header p:last-child {
  margin-bottom: 0;
}

.internal-user-header > div,
.internal-user-detail-header > div {
  min-width: 0;
}

.internal-user-panel,
.internal-user-wizard,
.internal-user-link-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
}

.internal-user-toolbar {
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.internal-user-toolbar .field {
  min-width: 190px;
  margin: 0;
}

.internal-user-search {
  width: min(440px, 100%);
}

.internal-user-name {
  display: grid;
  gap: 0.15rem;
  color: inherit;
  text-decoration: none;
}

.internal-user-name span {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.account-status {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: 0.35rem 0.65rem;
}

.account-status-active {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.account-status-pending {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.account-status-inactive {
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}

.internal-user-no-results {
  margin: var(--space-5) 0 0;
  color: var(--color-text-muted);
  text-align: center;
}

.internal-user-wizard {
  max-width: 920px;
  margin-inline: auto;
}

.internal-user-wizard-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
}

.internal-user-wizard-progress li {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  padding: var(--space-3);
}

.internal-user-wizard-progress li > span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--color-bg-muted);
  font-weight: var(--font-bold);
}

.internal-user-wizard-progress li.is-active,
.internal-user-wizard-progress li.is-complete {
  border-color: var(--color-primary);
  color: var(--color-heading);
}

.internal-user-wizard-progress li.is-active > span,
.internal-user-wizard-progress li.is-complete > span {
  background: var(--color-primary);
  color: var(--simbo-white);
}

.internal-user-wizard-form [data-user-step] {
  display: grid;
  gap: var(--space-5);
}

.internal-user-wizard-form [data-user-step][hidden] {
  display: none;
}

.internal-user-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.internal-user-email-field {
  grid-column: 1 / -1;
}

.internal-user-permission-list {
  display: grid;
  gap: var(--space-3);
}

.internal-user-permission-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.4fr) auto;
  gap: var(--space-3);
  align-items: end;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  padding: var(--space-4);
}

.internal-user-permission-row .field {
  margin: 0;
}

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

.internal-user-action-list {
  flex-wrap: wrap;
  align-items: stretch;
}

.internal-user-link-card {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  border-color: color-mix(in srgb, var(--color-success) 35%, var(--color-border));
  background: color-mix(in srgb, var(--color-success-bg) 55%, var(--color-surface));
}

.internal-user-link-card h2,
.internal-user-link-card p {
  margin-bottom: 0;
}

.internal-user-copy-row .input {
  min-width: 0;
  flex: 1 1 auto;
  font-family: var(--font-mono);
}

.internal-user-copy-status {
  min-height: 1.25rem;
  margin: 0;
  color: var(--color-success);
  font-weight: var(--font-semibold);
}

.btn-danger {
  border-color: var(--color-danger);
  background: var(--color-danger);
  color: var(--simbo-white);
}

.btn-danger:hover {
  border-color: color-mix(in srgb, var(--color-danger) 82%, black);
  background: color-mix(in srgb, var(--color-danger) 82%, black);
}

@media (max-width: 760px) {
  .impersonation-banner,
  .internal-user-header,
  .internal-user-detail-header,
  .internal-user-toolbar,
  .internal-user-copy-row,
  .internal-user-wizard-actions,
  .internal-user-action-list {
    align-items: stretch;
    flex-direction: column;
  }

  .impersonation-banner {
    align-items: stretch;
  }

  .impersonation-banner .btn {
    width: 100%;
  }

  .internal-user-field-grid,
  .internal-user-detail-grid,
  .internal-user-permission-row {
    grid-template-columns: 1fr;
  }

  .internal-user-email-field {
    grid-column: auto;
  }

  .internal-user-wizard-progress {
    grid-template-columns: 1fr;
  }
}

.section-header h2 {
  margin-bottom: var(--space-2);
}

.auth-panel {
  width: min(100%, 720px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  color: var(--color-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-extrabold);
}

.auth-brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.auth-panel .page-header {
  padding-top: 0;
}

.auth-link,
.auth-switch a {
  color: var(--color-primary);
  font-weight: var(--font-bold);
}

.auth-link:hover,
.auth-switch a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.auth-switch {
  margin: var(--space-4) 0 0;
  color: var(--color-text-muted);
  text-align: center;
}

.auth-qr-panel {
  display: grid;
  gap: var(--space-4);
  justify-items: center;
  margin-bottom: var(--space-5);
}

.auth-qr-code {
  width: min(100%, 220px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--simbo-white);
  padding: var(--space-3);
}

.auth-code-field {
  gap: var(--space-3);
}

.auth-code-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
  width: min(100%, 372px);
}

.auth-code-box {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-heading);
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  line-height: 1;
  text-align: center;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.auth-code-box:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 0;
  transform: translateY(-1px);
}

.auth-recovery-option {
  display: grid;
  gap: var(--space-3);
}

.auth-recovery-toggle {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  padding: 0;
}

.auth-recovery-toggle:hover,
.auth-recovery-toggle:focus {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.auth-recovery-toggle:focus {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 3px;
}

.auth-recovery-panel[hidden] {
  display: none;
}

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

.recovery-code-grid code {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  color: var(--color-heading);
  font-family: var(--font-mono);
  font-weight: var(--font-bold);
  padding: var(--space-3);
  text-align: center;
}

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

.settings-panel {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.settings-detail-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}

.settings-detail-list div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.settings-detail-list div:last-child {
  border-bottom: 0;
}

.settings-detail-list dt {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.settings-detail-list dd {
  margin: 0;
  color: var(--color-heading);
  font-weight: var(--font-semibold);
  overflow-wrap: anywhere;
}

.permission-list {
  text-transform: capitalize;
}

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

.home-action-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.dashboard-action {
  --card-accent: var(--color-primary);
  display: grid;
  position: relative;
  overflow: hidden;
  gap: var(--space-2);
  min-height: 190px;
  align-content: start;
  border: 1px solid color-mix(in srgb, var(--card-accent) 24%, var(--color-border));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 10%, var(--color-surface)) 0%, var(--color-surface) 58%, color-mix(in srgb, var(--card-accent) 5%, var(--color-surface)) 100%);
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
  padding: var(--space-5);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-action::after,
.database-card::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -64px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-accent) 14%, transparent);
  pointer-events: none;
}

.dashboard-action > *,
.database-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-action:hover {
  border-color: color-mix(in srgb, var(--card-accent) 48%, var(--color-border));
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  transform: translateY(-2px);
}

.dashboard-action strong {
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
}

.dashboard-action p {
  margin: 0;
  color: var(--color-text-muted);
}

.dashboard-action-crm,
.tool-grid .dashboard-action:nth-child(4n+1) {
  --card-accent: #0b6bff;
}

.dashboard-action-toolkit,
.tool-grid .dashboard-action:nth-child(4n+2) {
  --card-accent: #12b76a;
}

.tool-grid .dashboard-action:nth-child(4n+3) {
  --card-accent: #f79009;
}

.tool-grid .dashboard-action:nth-child(4n+4) {
  --card-accent: #6d35f5;
}

.hub-card-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  margin-bottom: var(--space-2);
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--card-accent) 22%, transparent);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--card-accent) 14%, var(--color-surface));
  color: var(--card-accent);
}

.hub-card-icon .icon {
  width: 24px;
  height: 24px;
}

.hub-card-eyebrow {
  color: var(--card-accent);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-normal);
  text-transform: uppercase;
}

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

.database-card {
  --card-accent: var(--color-primary);
  display: grid;
  position: relative;
  overflow: hidden;
  gap: var(--space-2);
  min-height: 180px;
  align-content: start;
  border: 1px solid color-mix(in srgb, var(--card-accent) 24%, var(--color-border));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 9%, var(--color-surface)) 0%, var(--color-surface) 60%, color-mix(in srgb, var(--card-accent) 5%, var(--color-surface)) 100%);
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
  padding: var(--space-5);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.database-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 48%, var(--color-border));
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  transform: translateY(-2px);
}

.database-card strong {
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
}

.database-card p {
  margin: 0;
  color: var(--color-text-muted);
}

.database-card-id {
  color: var(--card-accent);
  font-weight: var(--font-semibold);
}

.database-card-label {
  color: var(--card-accent);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
}

.database-query-panel {
  display: grid;
  gap: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
}

.database-query-summary {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
}

.database-query-summary h2 {
  margin: 0;
  font-size: var(--text-xl);
}

.database-query-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.database-query-copy h2 {
  margin-bottom: var(--space-2);
}

.database-query-copy p:last-child {
  color: var(--color-text-muted);
}

.database-filter-builder {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-5);
}

.database-search-form {
  display: grid;
  gap: var(--space-4);
}

.database-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: start;
}

.database-search-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.database-edit-form {
  margin-top: var(--space-5);
}

.external-basic-home {
  max-width: 720px;
}

.icon {
  width: 1rem;
  height: 1rem;
  display: block;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  overflow: hidden;
}

.icon-btn > .icon,
.icon-btn > span {
  position: relative;
  z-index: 1;
}

.icon-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.icon-btn-primary {
  border-color: var(--color-primary);
  background: var(--color-surface);
  color: var(--color-primary);
}

.icon-btn-primary:hover {
  background: var(--color-primary);
  color: var(--simbo-white);
}

.icon-btn-success {
  border-color: var(--color-success);
  background: var(--color-success);
  color: var(--simbo-white);
}

.icon-btn-success:hover {
  background: var(--color-success);
  color: var(--simbo-white);
}

.icon-btn-success:disabled,
.icon-btn-success:disabled:hover {
  border-color: var(--color-success);
  background: var(--color-success-bg);
  color: var(--color-success);
  box-shadow: none;
}

.icon-btn-danger {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.icon-btn-danger:hover,
.crm-delete-form.is-armed .icon-btn-danger {
  color: var(--simbo-white);
}

.icon-btn-danger:hover {
  background: var(--color-danger);
}

.crm-delete-form.is-armed .icon-btn-danger {
  background: var(--color-surface);
  animation: crm-delete-icon-color var(--crm-delete-confirm-ms, 4000ms) linear forwards;
}

.crm-delete-form.is-armed .icon-btn-danger::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--color-danger);
  content: "";
  transform-origin: left center;
  animation: crm-delete-deplete var(--crm-delete-confirm-ms, 4000ms) linear forwards;
}

@keyframes crm-delete-deplete {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@keyframes crm-delete-icon-color {
  0%,
  45% {
    color: var(--simbo-white);
  }

  55%,
  100% {
    color: var(--color-danger);
  }
}

.crm-icon-actions,
.crm-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: flex-end;
}

.crm-object-bar {
  position: sticky;
  top: var(--top-nav-height);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  overflow: visible;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: var(--space-2) var(--space-6);
}

.crm-object-links {
  display: flex;
  min-width: 0;
  gap: var(--space-1);
  overflow: hidden;
}

.crm-object-bar a {
  max-width: 180px;
  flex: 0 1 auto;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  overflow: hidden;
  padding: var(--space-2) var(--space-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-object-bar a:hover,
.crm-object-bar a.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.crm-object-actions {
  display: flex;
  flex: 0 0 auto;
  gap: var(--space-2);
  align-items: center;
}

.crm-object-overflow a.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.crm-nav-editor {
  position: fixed;
  top: calc(var(--top-nav-height) + 58px);
  right: var(--space-5);
  z-index: 450;
  width: min(720px, calc(100vw - (var(--space-5) * 2)));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
}

.crm-nav-editor form,
.crm-nav-editor-header,
.crm-drawer-header {
  display: grid;
  gap: var(--space-3);
}

.crm-nav-editor-header,
.crm-drawer-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.crm-nav-editor h2,
.crm-drawer-header h2 {
  margin: 0;
  font-size: var(--text-xl);
}

.crm-page-header,
.crm-result-summary,
.crm-pagination {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
}

.crm-page-header {
  margin-bottom: var(--space-5);
}

.crm-page-header h1 {
  margin-bottom: 0;
}

.crm-view-switcher {
  display: flex;
  flex: 0 0 auto;
  gap: var(--space-2);
  align-items: center;
}

.crm-view-switcher label,
.crm-fieldset legend {
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.crm-view-switcher label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.crm-view-switcher select,
.crm-list-panel select,
.crm-list-panel input,
.crm-edit-form select,
.field-control {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0.55rem 0.7rem;
}

.crm-view-switcher select {
  flex: 0 0 auto;
  width: clamp(10rem, 14vw, 14rem);
}

.crm-string-control {
  display: block;
  width: 100%;
  min-height: 42px;
  overflow: hidden;
  line-height: 1.45;
  resize: vertical;
  white-space: pre-wrap;
}

.crm-list-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.crm-list-panel {
  display: grid;
  gap: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

.crm-list-panel form,
.crm-list-panel fieldset {
  display: grid;
  gap: var(--space-4);
}

.crm-fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.crm-checkbox-list {
  display: grid;
  gap: var(--space-2);
  max-height: 220px;
  overflow: auto;
  padding-right: var(--space-1);
}

.crm-checkbox-list label {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.crm-list-drawer {
  position: fixed;
  top: var(--top-nav-height);
  right: 0;
  bottom: 0;
  z-index: 500;
  width: min(620px, 100vw);
  border-left: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  overflow: auto;
  padding: var(--space-5);
  transform: translateX(100%);
  transition: transform 160ms ease;
}

.crm-list-drawer.is-open {
  transform: translateX(0);
}

.crm-list-drawer form {
  display: grid;
  gap: var(--space-5);
}

.crm-dual-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
}

.crm-dual-list-box {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
}

.crm-dual-list-box h3 {
  margin: 0;
  color: var(--color-text);
  font-size: var(--text-sm);
}

.crm-dual-list-box ul {
  display: grid;
  min-height: 220px;
  max-height: 300px;
  gap: var(--space-2);
  margin: 0;
  overflow: auto;
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  list-style: none;
}

.crm-dual-list-box li button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  font-weight: var(--font-semibold);
  padding: var(--space-2);
  text-align: left;
}

.crm-dual-list-box li.is-selected button,
.crm-dual-list-box li button:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.crm-dual-list-controls {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
}

.crm-boolean-control {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-weight: var(--font-semibold);
}

.crm-condition-grid {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
}

.crm-condition-number {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  text-align: center;
}

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

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

.crm-list-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--color-primary) 3%, var(--color-surface));
}

.crm-list-table tbody tr:hover td {
  background: color-mix(in srgb, var(--color-primary) 7%, var(--color-surface));
}

[data-theme="dark"] .crm-list-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--color-primary) 7%, var(--color-surface));
}

[data-theme="dark"] .crm-list-table tbody tr:hover td {
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
}

.crm-result-summary {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.crm-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: var(--space-5);
  align-items: start;
}

.crm-detail-layout > * {
  min-width: 0;
}

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

.crm-related-panel-header .simbo-ui-label {
  margin-bottom: var(--space-1);
  color: var(--color-text-muted);
}

.crm-related-panel-header h2 {
  margin: 0;
  font-size: var(--text-xl);
}

.crm-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--space-2);
}

.crm-related-object {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-width: 0;
  gap: var(--space-2);
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--card-accent) 28%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-accent) 6%, var(--color-surface));
  color: var(--color-text);
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

a.crm-related-object:hover {
  border-color: color-mix(in srgb, var(--card-accent) 55%, var(--color-border));
  background: color-mix(in srgb, var(--card-accent) 11%, var(--color-surface));
  color: var(--color-text);
  transform: translateY(-1px);
}

.crm-related-object.is-disabled {
  cursor: default;
  opacity: 0.62;
}

.crm-related-object-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--card-accent) 22%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-accent) 14%, var(--color-surface));
  color: var(--card-accent);
}

.crm-related-object-icon .icon {
  width: 18px;
  height: 18px;
}

.crm-related-object-label {
  min-width: 0;
  color: var(--color-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-related-object-count {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-accent) 14%, var(--color-surface));
  color: var(--color-heading);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.crm-related-empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.crm-related-context {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.crm-related-context a {
  font-weight: var(--font-semibold);
}

.crm-related-list-table .crm-related-open-column {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.crm-pagination .crm-related-next {
  margin-left: auto;
}

.crm-object-accent-blue {
  --card-accent: #0b6bff;
}

.crm-object-accent-green {
  --card-accent: #12b76a;
}

.crm-object-accent-orange {
  --card-accent: #f79009;
}

.crm-object-accent-purple {
  --card-accent: #6d35f5;
}

.crm-detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.crm-detail-list > div {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
}

.crm-detail-list > div:last-child {
  border-bottom: 0;
}

.crm-detail-list dt {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.crm-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.crm-history-table th,
.crm-history-table td {
  vertical-align: top;
}

.crm-history-changed {
  position: relative;
  background: var(--color-warning-bg);
  box-shadow: inset 4px 0 0 var(--color-warning);
  color: var(--color-heading);
  font-weight: var(--font-semibold);
}

.crm-detail-form .crm-edit-value,
.crm-edit-only {
  display: none;
}

.crm-detail-form.is-editing .crm-display-value {
  display: none;
}

.crm-detail-form.is-editing .crm-edit-value,
body.crm-is-editing-record .crm-edit-only {
  display: block;
}

.crm-detail-form .crm-edit-value {
  width: 100%;
}

body.crm-is-editing-record [data-crm-edit-start] {
  display: none;
}

body.crm-is-editing-record::before {
  position: fixed;
  inset: 0;
  z-index: 900;
  border: 6px solid var(--color-success);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72), inset 0 0 48px rgba(18, 183, 106, 0.18);
  content: "";
  pointer-events: none;
}

.crm-detail-form .field-control,
.crm-detail-form .crm-checkbox-list {
  max-width: 520px;
}

.crm-detail-form .crm-string-control {
  max-width: none;
}

.crm-edit-form .crm-document-form-field {
  grid-column: 1 / -1;
}

.crm-detail-form.is-editing .crm-detail-document-row dd {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}

.crm-detail-form.is-editing .crm-detail-document-row .crm-edit-value {
  width: 100%;
  min-width: 0;
}

.crm-document-field {
  display: grid;
  gap: var(--space-2);
  justify-items: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
}

.crm-document-current {
  display: grid;
  gap: var(--space-1);
  justify-items: center;
  width: 100%;
  max-width: min(100%, 520px);
  margin: 0;
  font-size: var(--text-sm);
  text-align: center;
}

.crm-document-current span {
  color: var(--color-text-muted);
  font-weight: var(--font-semibold);
}

.crm-document-current a {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-document-upload {
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-height: 168px;
  align-content: center;
  justify-items: center;
  overflow-wrap: normal;
  word-break: normal;
}

.crm-document-upload > * {
  min-width: 0;
}

.crm-document-upload .file-upload-label {
  width: min(100%, 520px);
  max-width: 100%;
  justify-items: center;
}

.crm-document-upload .file-upload-label strong,
.crm-document-upload .file-upload-label span {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.crm-document-upload .file-upload-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-delete-form {
  margin: 0;
}

.crm-relationship-search {
  position: relative;
  max-width: 520px;
}

.crm-relationship-options {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  right: 0;
  z-index: 550;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  padding: var(--space-2);
}

.crm-relationship-options[hidden] {
  display: none;
}

.crm-relationship-options button[hidden] {
  display: none;
}

.crm-relationship-options button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1);
  align-items: start;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font-weight: var(--font-semibold);
  padding: var(--space-2);
  text-align: left;
}

.crm-relationship-options button:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.crm-relationship-options button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-relationship-options code {
  display: block;
  max-width: 100%;
  min-width: 0;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: var(--space-5);
  align-items: end;
  border: 1px solid rgba(11, 107, 255, 0.18);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(11, 107, 255, 0.12), rgba(18, 183, 106, 0.10) 48%, rgba(247, 144, 9, 0.14)),
    var(--color-surface);
  box-shadow: var(--shadow-soft);
  margin-bottom: var(--space-5);
  padding: var(--space-6);
}

[data-theme="dark"] .permission-hero {
  background:
    linear-gradient(135deg, rgba(11, 107, 255, 0.18), rgba(18, 183, 106, 0.12) 48%, rgba(247, 144, 9, 0.10)),
    var(--color-surface);
}

.permission-hero h1 {
  margin: 0;
}

.permission-hero-copy {
  display: grid;
  gap: var(--space-2);
}

.permission-selected-user {
  width: fit-content;
  border: 1px solid rgba(11, 107, 255, 0.22);
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: var(--font-bold);
  padding: 0.35rem 0.65rem;
}

.permission-user-picker {
  display: grid;
  gap: var(--space-2);
}

.permission-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.permission-stat {
  display: grid;
  min-height: 120px;
  align-content: space-between;
  gap: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-4);
}

.permission-stat span,
.permission-stat small {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
}

.permission-stat strong {
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  line-height: 1;
}

.permission-stat-active {
  border-top: 4px solid var(--color-primary);
}

.permission-stat-super {
  border-top: 4px solid var(--color-success);
  background: linear-gradient(180deg, rgba(18, 183, 106, 0.12), var(--color-surface) 58%);
}

.permission-stat-coverage {
  border-top: 4px solid var(--color-warning);
}

.permission-stat-tools {
  border-top: 4px solid var(--color-secondary);
}

.permission-stat-conflicts {
  border-top: 4px solid var(--color-danger);
}

.permission-conflict-band {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  border: 1px solid rgba(240, 68, 56, 0.24);
  border-radius: var(--radius-md);
  background: var(--color-danger-bg);
  color: var(--color-danger);
  margin-bottom: var(--space-5);
  padding: var(--space-3) var(--space-4);
}

.permission-conflict-band div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.permission-conflict-band span,
.permission-conflict-pill {
  border: 1px solid rgba(240, 68, 56, 0.24);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-danger);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: 0.2rem 0.5rem;
}

.permission-editor-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.permission-add-panel,
.permission-table-panel {
  display: grid;
  gap: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
}

.permission-add-panel {
  border-top: 4px solid var(--color-primary);
}

.permission-add-panel .section-heading {
  margin-bottom: 0;
}

.permission-add-form {
  display: grid;
  gap: var(--space-4);
}

.permission-table-heading {
  display: flex;
  gap: var(--space-3);
  align-items: end;
  justify-content: space-between;
}

.permission-table-heading h2 {
  margin: 0;
  font-size: var(--text-xl);
}

.permission-table td {
  vertical-align: middle;
}

.permission-table td:first-child {
  display: grid;
  gap: var(--space-1);
}

.permission-table code {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.permission-row-inactive {
  opacity: 0.62;
}

.permission-row-form {
  display: grid;
  grid-template-columns: auto minmax(120px, 180px) 42px 42px;
  gap: var(--space-2);
  align-items: center;
}

.permission-level-badge,
.permission-status-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  padding: 0.25rem 0.65rem;
}

.permission-level-read {
  border-color: rgba(11, 107, 255, 0.24);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.permission-level-create {
  border-color: rgba(247, 144, 9, 0.30);
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.permission-level-write {
  border-color: rgba(18, 183, 106, 0.28);
  background: var(--color-success-bg);
  color: var(--color-success);
}

.permission-level-super {
  border-color: rgba(240, 68, 56, 0.24);
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.permission-level-none {
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}

.tool-access-panel {
  margin-bottom: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
}

.tool-access-panel > .section-heading {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-5);
}

.tool-access-panel > .section-heading h2,
.tool-access-panel > .section-heading p:last-child {
  margin: 0;
}

.tool-access-panel > .section-heading > p {
  max-width: 580px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.tool-access-grid {
  display: grid;
  gap: var(--space-4);
}

.tool-access-card {
  display: grid;
  gap: var(--space-4);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-danger);
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  padding: var(--space-4);
}

.tool-access-card.is-available {
  border-left-color: var(--color-success);
  background: color-mix(in srgb, var(--color-success-bg) 45%, var(--color-surface));
}

.tool-access-card-heading,
.tool-access-status-group {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.tool-access-card-heading h3,
.tool-access-card-heading p {
  margin: 0;
}

.tool-access-card-heading p {
  margin-top: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.tool-access-status-group {
  flex: 0 0 auto;
  align-items: center;
}

.tool-access-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: var(--radius-md);
  background: var(--color-danger-bg);
  color: var(--color-danger);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  padding: 0.25rem 0.65rem;
}

.tool-access-status.is-available {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.tool-capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-capability-list li {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: var(--space-1);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: 0.3rem 0.65rem;
}

.tool-capability-list li.is-allowed {
  border-color: color-mix(in srgb, var(--color-success) 28%, var(--color-border));
  color: var(--color-success);
}

.tool-capability-list li.is-missing {
  border-color: color-mix(in srgb, var(--color-danger) 22%, var(--color-border));
  color: var(--color-danger);
}

.tool-capability-list svg {
  width: 14px;
  height: 14px;
}

.tool-access-requirements summary {
  width: fit-content;
  cursor: pointer;
  color: var(--color-primary);
  font-weight: var(--font-bold);
}

.tool-access-requirements[open] summary {
  margin-bottom: var(--space-3);
}

.tool-access-table td {
  vertical-align: middle;
}

.tool-access-table td:nth-child(2) {
  display: grid;
  gap: var(--space-1);
}

.tool-access-table code {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.permission-status-badge.is-active {
  border-color: rgba(18, 183, 106, 0.28);
  background: var(--color-success-bg);
  color: var(--color-success);
}

.permission-status-badge.is-inactive {
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}

.permission-delete-form {
  display: inline-grid;
}

.permission-muted-action {
  color: var(--color-text-muted);
}

.talent-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary-soft) 0%, var(--color-surface) 48%, #ecfdf3 100%);
  box-shadow: var(--shadow-soft);
  padding: var(--space-6);
}

[data-theme="dark"] .talent-hero {
  background: linear-gradient(135deg, #10294f 0%, var(--color-surface) 50%, rgba(18, 183, 106, 0.14) 100%);
}

.talent-hero h1 {
  margin: 0;
}

.talent-hero-score {
  display: grid;
  min-width: 132px;
  gap: var(--space-1);
  border: 1px solid rgba(18, 183, 106, 0.25);
  border-radius: var(--radius-lg);
  background: var(--color-success-bg);
  color: var(--color-success);
  padding: var(--space-4);
  text-align: center;
}

.talent-hero-score span {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
}

.talent-hero-score strong {
  font-size: var(--text-3xl);
  line-height: 1;
}

.talent-run-panel {
  margin-top: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
}

.talent-run-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: end;
}

.talent-run-field {
  flex: 1 1 420px;
  min-width: 280px;
}

.talent-run-button {
  flex: 0 0 auto;
  min-height: 44px;
}

.talent-run-button.is-disabled,
.talent-run-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.52;
  pointer-events: none;
}

.talent-run-empty-message {
  flex: 1 0 100%;
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.talent-run-loading {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
}

.talent-run-loading[hidden] {
  display: none;
}

.talent-run-loading .loading-spinner {
  min-height: 0;
}

.talent-run-loading .spinner-ring {
  width: 20px;
  height: 20px;
  border-width: 3px;
}

.talent-run-form.is-submitting .talent-run-button {
  opacity: 0.72;
}

.talent-empty-run {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}

.talent-wizard-header {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  justify-content: space-between;
  max-width: none;
}

.talent-wizard-header > div {
  max-width: 760px;
}

.talent-wizard-header h1 {
  margin-bottom: var(--space-2);
}

.talent-wizard-header p:last-child {
  margin: 0;
  color: var(--color-text-muted);
}

.talent-wizard-header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: var(--space-2);
  align-items: center;
}

.talent-wizard-shell {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.talent-wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.talent-wizard-progress-item button {
  display: grid;
  width: 100%;
  min-height: 76px;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text-muted);
  padding: var(--space-3);
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.talent-wizard-progress-item button:not(:disabled) {
  cursor: pointer;
}

.talent-wizard-progress-item button:disabled {
  cursor: default;
  opacity: 0.68;
}

.talent-wizard-progress-item button > span:last-child {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.talent-wizard-progress-item small {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
}

.talent-wizard-progress-item strong {
  overflow: hidden;
  color: inherit;
  font-size: var(--text-sm);
  text-overflow: ellipsis;
}

.talent-wizard-progress-number {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
}

.talent-wizard-progress-item.is-active button {
  border-color: color-mix(in srgb, var(--color-primary) 55%, var(--color-border));
  background: var(--color-primary-soft);
  color: var(--color-heading);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.talent-wizard-progress-item.is-active .talent-wizard-progress-number {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--simbo-white);
}

.talent-wizard-progress-item.is-complete button {
  border-color: color-mix(in srgb, var(--color-success) 34%, var(--color-border));
  color: var(--color-heading);
}

.talent-wizard-progress-item.is-complete .talent-wizard-progress-number {
  border-color: color-mix(in srgb, var(--color-success) 45%, var(--color-border));
  background: var(--color-success-bg);
  color: var(--color-success);
}

.talent-wizard-form {
  display: grid;
  gap: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: clamp(var(--space-4), 3vw, var(--space-8));
}

.talent-wizard-form.is-submitting {
  opacity: 0.82;
}

.talent-wizard-draft-notice {
  width: fit-content;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, var(--color-border));
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  padding: 0.4rem 0.75rem;
}

.talent-wizard-form-status {
  min-height: 1.25rem;
  margin: 0;
  color: var(--color-danger);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.talent-wizard-step {
  display: grid;
  gap: var(--space-6);
}

.talent-wizard-step[hidden] {
  display: none;
}

.talent-wizard-step + .talent-wizard-step {
  margin-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-8);
}

.talent-wizard-form.is-enhanced .talent-wizard-step + .talent-wizard-step {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.talent-wizard-step-heading {
  display: grid;
  max-width: 760px;
  gap: var(--space-2);
}

.talent-wizard-step-heading > span {
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
}

.talent-wizard-step-heading h2,
.talent-wizard-step-heading p {
  margin: 0;
}

.talent-wizard-step-heading p {
  color: var(--color-text-muted);
}

.talent-wizard-details-card {
  display: grid;
  gap: var(--space-5);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, var(--color-border));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-primary-soft) 55%, var(--color-surface));
  padding: var(--space-5);
}

.talent-wizard-criteria {
  display: grid;
  gap: var(--space-4);
}

.talent-wizard-criterion-group {
  display: grid;
  gap: var(--space-4);
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-primary-soft) 42%, var(--color-surface));
  padding: var(--space-5);
}

.talent-wizard-criteria-fit .talent-wizard-criterion-group {
  border-color: color-mix(in srgb, var(--color-secondary) 18%, var(--color-border));
  background: color-mix(in srgb, var(--color-secondary-soft) 45%, var(--color-surface));
}

.talent-wizard-group-heading,
.talent-wizard-review-heading,
.talent-wizard-actions,
.talent-wizard-add-actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.talent-wizard-group-heading,
.talent-wizard-review-heading,
.talent-wizard-actions {
  justify-content: space-between;
}

.talent-wizard-group-heading > div:first-child {
  min-width: 0;
}

.talent-wizard-group-heading h3,
.talent-wizard-review-heading h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.talent-wizard-group-heading p {
  margin: var(--space-1) 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.talent-wizard-row-list {
  display: grid;
  gap: var(--space-3);
}

.talent-wizard-row-list:empty {
  display: none;
}

.talent-wizard-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-4);
}

.talent-wizard-row.is-weighted {
  grid-template-columns: minmax(0, 1fr) 104px auto;
}

.talent-wizard-row-paired {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.talent-wizard-row-paired.is-weighted {
  grid-template-columns: repeat(2, minmax(0, 1fr)) 104px auto;
}

.talent-wizard-remove {
  min-height: 44px;
  color: var(--color-danger);
}

.talent-wizard-empty {
  margin: 0;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface) 72%, transparent);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  padding: var(--space-4);
  text-align: center;
}

.talent-wizard-actions {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-5);
}

.talent-wizard-actions-forward {
  justify-content: flex-end;
}

.talent-wizard-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.talent-wizard-review-card {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-muted);
  padding: var(--space-5);
}

.talent-wizard-review-card:first-child {
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary-soft) 46%, var(--color-surface));
}

.talent-wizard-review-requirements {
  background: color-mix(in srgb, var(--color-primary-soft) 35%, var(--color-surface));
}

.talent-wizard-review-fit {
  background: color-mix(in srgb, var(--color-secondary-soft) 40%, var(--color-surface));
}

.talent-wizard-review-card [data-review-details] {
  display: grid;
  gap: var(--space-2);
}

.talent-wizard-review-card [data-review-details] strong {
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
}

.talent-wizard-review-card [data-review-details] p {
  margin: 0;
  color: var(--color-text-muted);
  white-space: pre-wrap;
}

.talent-stat-strip {
  margin-top: var(--space-6);
}

.talent-criteria-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
}

.talent-criteria-summary h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
}

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

.talent-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  padding: 0.3rem 0.7rem;
}

.talent-chip-required {
  border-color: rgba(11, 107, 255, 0.24);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.talent-chip-fit {
  border-color: rgba(247, 144, 9, 0.26);
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.talent-results-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
}

.talent-results-table {
  box-shadow: var(--shadow-card);
}

.talent-rank {
  color: var(--color-heading);
  font-family: var(--font-mono);
}

.talent-score-cell {
  display: grid;
  width: min(100%, 150px);
  gap: var(--space-2);
}

.talent-score-meter {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-surface-alt);
}

.talent-score-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-primary), var(--color-success));
}

.talent-mbti-code {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  color: var(--color-heading);
  font-family: var(--font-mono);
  font-weight: var(--font-bold);
  padding: 0.25rem 0.45rem;
}

@media (max-width: 900px) {
  .settings-detail-list div,
  .dashboard-actions,
  .home-action-grid,
  .tool-grid,
  .database-card-grid,
  .recovery-code-grid,
  .database-query-panel,
  .database-query-summary,
  .database-search-form,
  .database-filter-grid,
  .crm-list-layout,
  .crm-sort-grid,
  .crm-detail-layout,
  .crm-detail-list > div {
    grid-template-columns: 1fr;
  }

  .database-query-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .crm-object-bar {
    padding: var(--space-2) var(--space-4);
  }

  .crm-object-links {
    flex: 1 1 auto;
  }

  .permission-hero,
  .permission-stat-grid,
  .permission-editor-layout {
    grid-template-columns: 1fr;
  }

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

  .tool-access-panel > .section-heading,
  .tool-access-card-heading,
  .tool-access-status-group {
    align-items: flex-start;
    flex-direction: column;
  }

  .permission-row-form {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
  }

  .permission-row-form .permission-level-badge {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .crm-page-header,
  .crm-result-summary,
  .crm-view-switcher {
    align-items: flex-start;
    flex-direction: column;
  }

  .crm-condition-grid {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .crm-dual-list {
    grid-template-columns: 1fr;
  }

  .crm-dual-list-controls {
    grid-template-columns: repeat(4, 42px);
    justify-content: start;
  }

  .crm-list-drawer {
    width: 100vw;
  }

  .crm-nav-editor {
    right: var(--space-3);
    width: calc(100vw - (var(--space-3) * 2));
  }

  .talent-hero,
  .talent-results-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .talent-criteria-summary,
  .talent-wizard-review-grid {
    grid-template-columns: 1fr;
  }

  .talent-wizard-review-card:first-child {
    grid-column: auto;
  }

  .talent-wizard-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .talent-wizard-row,
  .talent-wizard-row.is-weighted,
  .talent-wizard-row-paired,
  .talent-wizard-row-paired.is-weighted {
    grid-template-columns: 1fr;
  }

  .talent-wizard-weight {
    max-width: 160px;
  }

  .talent-wizard-remove {
    justify-self: start;
  }

  .talent-wizard-header,
  .talent-wizard-group-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .talent-wizard-header-actions {
    flex-wrap: wrap;
  }

  .talent-run-form {
    align-items: stretch;
    flex-direction: column;
  }

  .talent-run-field {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .talent-wizard-progress {
    grid-template-columns: 1fr;
  }

  .talent-wizard-progress-item button {
    min-height: 64px;
  }

  .talent-wizard-add-actions,
  .talent-wizard-actions,
  .talent-wizard-header-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .talent-wizard-add-actions .btn,
  .talent-wizard-actions .btn,
  .talent-wizard-header-actions .btn {
    width: 100%;
  }

  .talent-wizard-actions .btn-primary {
    order: -1;
  }

  .talent-wizard-criterion-group,
  .talent-wizard-review-card,
  .talent-wizard-details-card {
    padding: var(--space-4);
  }
}

/* Talent hiring pipeline */
.pipeline-page-header,
.pipeline-panel-heading,
.pipeline-card-heading,
.interview-section-heading,
.interview-criterion-heading,
.interview-save-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.pipeline-page-header {
  margin-bottom: var(--space-5);
}

.pipeline-page-header > div {
  max-width: 760px;
}

.pipeline-page-header h1,
.pipeline-page-header p:last-child,
.pipeline-panel-heading h2,
.interview-section-heading h2,
.interview-criterion-heading h3,
.interview-criterion-heading p:last-child {
  margin-bottom: 0;
}

.pipeline-page-header p:last-child,
.interview-criterion-heading p:last-child {
  color: var(--color-text-muted);
}

.pipeline-stage-badge {
  flex: 0 0 auto;
  font-size: var(--text-sm);
  padding: 0.45rem 0.75rem;
}

.pipeline-feedback {
  margin: 0 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.pipeline-feedback[hidden] {
  display: none;
}

.pipeline-feedback.is-success {
  border-color: color-mix(in srgb, var(--color-success) 30%, var(--color-border));
  background: var(--color-success-bg);
  color: var(--color-success);
}

.pipeline-feedback.is-error {
  border-color: color-mix(in srgb, var(--color-danger) 30%, var(--color-border));
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.pipeline-board-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--color-primary) 12%, var(--color-border));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--color-primary-soft) 72%, transparent), transparent 30%),
    color-mix(in srgb, var(--color-bg-muted) 88%, var(--color-primary-soft));
  padding: var(--space-3);
  scrollbar-gutter: stable;
}

.pipeline-board-header {
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--color-primary-soft) 82%, var(--color-surface)) 0%, var(--color-surface) 58%, color-mix(in srgb, var(--color-secondary-soft) 60%, var(--color-surface)) 100%);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
}

.talent-pipeline-board {
  display: grid;
  min-width: 1680px;
  grid-template-columns: repeat(6, minmax(260px, 1fr));
  gap: var(--space-3);
}

.talent-pipeline-board[aria-busy="true"] {
  cursor: wait;
}

.pipeline-column {
  --pipeline-stage-accent: var(--color-primary);
  --pipeline-stage-soft: var(--color-primary-soft);
  display: grid;
  min-height: 520px;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pipeline-stage-accent) 24%, var(--color-border));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--pipeline-stage-soft) 28%, var(--color-bg-muted));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--pipeline-stage-accent) 7%, transparent);
  scroll-snap-align: start;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.pipeline-column[data-application-stage="new"] {
  --pipeline-stage-accent: var(--color-info);
  --pipeline-stage-soft: var(--color-info-bg);
}

.pipeline-column[data-application-stage="preliminary_interview"] {
  --pipeline-stage-accent: var(--color-secondary);
  --pipeline-stage-soft: var(--color-secondary-soft);
}

.pipeline-column[data-application-stage="interviewing"] {
  --pipeline-stage-accent: var(--color-primary);
  --pipeline-stage-soft: var(--color-primary-soft);
}

.pipeline-column[data-application-stage="decision"] {
  --pipeline-stage-accent: var(--color-warning);
  --pipeline-stage-soft: var(--color-warning-bg);
}

.pipeline-column[data-application-stage="hired"] {
  --pipeline-stage-accent: var(--color-success);
  --pipeline-stage-soft: var(--color-success-bg);
}

.pipeline-column[data-application-stage="closed"] {
  --pipeline-stage-accent: var(--color-text-muted);
  --pipeline-stage-soft: var(--color-surface-alt);
}

.pipeline-column.is-drop-target {
  border-color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger-bg) 65%, var(--color-surface));
}

.pipeline-column.is-drop-allowed {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary-soft) 72%, var(--color-surface));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 14%, transparent);
}

.pipeline-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border-top: 4px solid var(--pipeline-stage-accent);
  border-bottom: 1px solid color-mix(in srgb, var(--pipeline-stage-accent) 22%, var(--color-border));
  background: color-mix(in srgb, var(--pipeline-stage-soft) 66%, var(--color-surface));
  padding: calc(var(--space-4) - 4px) var(--space-4) var(--space-4);
}

.pipeline-column-header h2 {
  margin: 0;
  font-size: var(--text-base);
}

.pipeline-column-count {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--pipeline-stage-accent) 24%, transparent);
  background: color-mix(in srgb, var(--pipeline-stage-accent) 12%, var(--color-surface));
  color: var(--pipeline-stage-accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding-inline: var(--space-2);
}

.pipeline-column-list {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  padding: var(--space-3);
}

.pipeline-application-card {
  display: grid;
  gap: var(--space-4);
  border: 1px solid color-mix(in srgb, var(--pipeline-stage-accent) 22%, var(--color-border));
  border-top: 3px solid color-mix(in srgb, var(--pipeline-stage-accent) 76%, var(--color-border));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-surface) 94%, var(--pipeline-stage-soft));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--pipeline-stage-accent) 10%, transparent);
  padding: var(--space-4);
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.pipeline-application-card[draggable="true"] {
  cursor: grab;
}

.pipeline-application-card[draggable="true"]:active {
  cursor: grabbing;
}

.pipeline-application-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-primary) 38%, transparent);
  outline-offset: 2px;
}

.pipeline-application-card.is-dragging {
  opacity: 0.45;
  transform: rotate(1deg);
}

.pipeline-application-card.is-moving {
  opacity: 0.66;
  pointer-events: none;
}

.pipeline-card-heading {
  align-items: center;
}

.pipeline-card-heading > a {
  min-width: 0;
  overflow: hidden;
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  text-overflow: ellipsis;
}

.pipeline-card-meta,
.pipeline-detail-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

.pipeline-card-meta > div,
.pipeline-detail-list > div {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--space-3);
}

.pipeline-card-meta dt,
.pipeline-detail-list dt {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

.pipeline-card-meta dd,
.pipeline-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--color-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-align: right;
}

.pipeline-card-actions,
.pipeline-stage-actions {
  display: grid;
  gap: var(--space-2);
}

.pipeline-card-actions {
  grid-template-columns: 1fr;
}

.pipeline-card-actions form,
.pipeline-card-actions .btn,
.pipeline-stage-actions form,
.pipeline-stage-actions .btn {
  width: 100%;
}

.pipeline-column-empty {
  margin: 0;
  border: 1px dashed color-mix(in srgb, var(--pipeline-stage-accent) 32%, var(--color-border));
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-surface) 72%, var(--pipeline-stage-soft));
  font-size: var(--text-sm);
  padding: var(--space-5) var(--space-3);
  text-align: center;
}

.pipeline-column-empty[hidden] {
  display: none;
}

.pipeline-board-help,
.pipeline-muted-copy {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.pipeline-board-help {
  width: fit-content;
  margin-top: var(--space-2);
  border-radius: 999px;
  background: var(--color-bg-muted);
  padding: var(--space-2) var(--space-3);
}

.pipeline-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.pipeline-stat-grid .stat-card-trend {
  color: var(--color-text-muted);
}

.pipeline-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.75fr);
  gap: var(--space-5);
  align-items: start;
}

.pipeline-detail-main,
.pipeline-detail-sidebar {
  display: grid;
  gap: var(--space-5);
}

.pipeline-panel,
.interview-rating-guide,
.interview-criteria-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5);
}

.pipeline-panel-heading {
  align-items: center;
  margin-bottom: var(--space-4);
}

.pipeline-panel-heading h2,
.interview-section-heading h2 {
  font-size: var(--text-xl);
}

.pipeline-detail-list {
  margin-bottom: var(--space-4);
}

.pipeline-notes-copy {
  margin: 0;
  color: var(--color-text-muted);
  white-space: pre-wrap;
}

.pipeline-optional-label {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-regular);
}

.interview-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.interview-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: flex-end;
}

.interview-unsaved-status {
  color: var(--color-warning);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
}

.interview-kpi {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--interview-kpi-color) 28%, var(--color-border));
  background: color-mix(in srgb, var(--interview-kpi-background) 56%, var(--color-surface));
}

.interview-kpi .stat-card-value {
  color: var(--interview-kpi-color);
}

.interview-kpi-progress {
  --interview-kpi-color: var(--color-primary);
  --interview-kpi-background: var(--color-primary-soft);
}

.interview-kpi-neutral {
  --interview-kpi-color: var(--color-text-muted);
  --interview-kpi-background: var(--color-bg-muted);
}

.interview-kpi-danger {
  --interview-kpi-color: var(--color-danger);
  --interview-kpi-background: var(--color-danger-bg);
}

.interview-kpi-warning {
  --interview-kpi-color: var(--color-warning);
  --interview-kpi-background: var(--color-warning-bg);
}

.interview-kpi-success {
  --interview-kpi-color: var(--color-success);
  --interview-kpi-background: var(--color-success-bg);
}

.interview-kpi-meter {
  display: block;
  height: 5px;
  overflow: hidden;
  margin-top: var(--space-3);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-primary) 14%, var(--color-border));
}

.interview-kpi-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
}

.interview-rating-guide {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-4);
  border-color: color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary-soft) 42%, var(--color-surface));
}

.interview-rating-guide h2 {
  margin: 0;
  font-size: var(--text-xl);
}

.interview-rating-guide ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.interview-rating-guide li {
  display: grid;
  gap: var(--space-1);
  border: 1px solid color-mix(in srgb, var(--interview-scale-color) 34%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--interview-scale-background) 58%, var(--color-surface));
  padding: var(--space-2);
}

.interview-rating-guide li strong {
  color: var(--interview-scale-color);
  font-family: var(--font-mono);
}

.interview-rating-guide li span {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.interview-scale-item-1,
.interview-rating-option-1 {
  --interview-scale-color: var(--color-danger);
  --interview-scale-background: var(--color-danger-bg);
}

.interview-scale-item-2,
.interview-rating-option-2 {
  --interview-scale-color: color-mix(in srgb, var(--color-danger) 58%, var(--color-warning));
  --interview-scale-background: color-mix(in srgb, var(--color-danger-bg) 52%, var(--color-warning-bg));
}

.interview-scale-item-3,
.interview-rating-option-3 {
  --interview-scale-color: var(--color-warning);
  --interview-scale-background: var(--color-warning-bg);
}

.interview-scale-item-4,
.interview-rating-option-4 {
  --interview-scale-color: #0f8f83;
  --interview-scale-background: color-mix(in srgb, #0f8f83 14%, var(--color-surface));
}

.interview-scale-item-5,
.interview-rating-option-5 {
  --interview-scale-color: var(--color-success);
  --interview-scale-background: var(--color-success-bg);
}

.interview-form,
.interview-criteria-list {
  display: grid;
  gap: var(--space-4);
}

.interview-criteria-section {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}

.interview-section-heading {
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-3);
}

.interview-section-heading > span {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.interview-criterion {
  display: grid;
  gap: var(--space-3);
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-4);
}

.interview-criterion-unrated {
  border-left-color: var(--color-border);
}

.interview-criterion-unsatisfied {
  border-left-color: var(--color-danger);
}

.interview-criterion-review {
  border-left-color: var(--color-warning);
}

.interview-criterion-satisfied {
  border-left-color: var(--color-success);
}

.interview-criterion-heading > div:first-child {
  min-width: 0;
}

.interview-criterion-heading p:last-child {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}

.interview-criterion-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

.interview-rating-fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.interview-rating-fieldset legend {
  margin-bottom: var(--space-2);
  color: var(--color-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
}

.interview-rating-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-2);
}

.interview-rating-option {
  position: relative;
  cursor: pointer;
}

.interview-rating-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.interview-rating-option span {
  display: grid;
  min-height: 58px;
  gap: var(--space-1);
  align-content: center;
  border: 1px solid color-mix(in srgb, var(--interview-scale-color) 24%, var(--color-border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--interview-scale-background) 24%, var(--color-bg-muted));
  color: var(--color-text-muted);
  padding: var(--space-2);
  text-align: center;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.interview-rating-option strong {
  color: var(--interview-scale-color);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
}

.interview-rating-option small {
  font-size: var(--text-xs);
}

.interview-rating-option input:checked + span {
  border-color: var(--interview-scale-color);
  background: var(--interview-scale-background);
  color: var(--interview-scale-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--interview-scale-color) 14%, transparent);
}

.interview-rating-option input:checked + span strong {
  color: var(--interview-scale-color);
}

.interview-rating-option input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--color-primary) 34%, transparent);
  outline-offset: 2px;
}

.interview-rating-option input:disabled + span {
  cursor: default;
  opacity: 0.8;
}

.interview-criterion-notes,
.interview-general-notes .field {
  margin: 0;
}

.interview-criterion-notes textarea {
  min-height: 82px;
}

.interview-general-notes textarea {
  min-height: 96px;
}

[data-theme="dark"] .interview-scale-item-4,
[data-theme="dark"] .interview-rating-option-4 {
  --interview-scale-color: #2dd4bf;
}

.interview-form.is-read-only textarea[readonly] {
  background: var(--color-bg-muted);
}

.interview-save-bar {
  position: sticky;
  bottom: var(--space-3);
  z-index: 20;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--color-primary) 24%, var(--color-border));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-surface) 94%, transparent);
  box-shadow: var(--shadow-card);
  padding: var(--space-3) var(--space-4);
  backdrop-filter: blur(10px);
}

.interview-save-bar p {
  max-width: 720px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

@media (max-width: 900px) {
  .pipeline-page-header,
  .pipeline-detail-header,
  .interview-rating-guide,
  .pipeline-detail-layout {
    grid-template-columns: 1fr;
  }

  .pipeline-page-header,
  .pipeline-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .pipeline-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .talent-pipeline-board {
    min-width: 1590px;
  }
}

@media (max-width: 700px) {
  .pipeline-stat-grid,
  .interview-stat-grid,
  .interview-rating-guide ol,
  .interview-rating-options {
    grid-template-columns: 1fr;
  }

  .interview-rating-guide ol {
    gap: var(--space-3);
  }

  .interview-rating-option span {
    min-height: 54px;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    text-align: left;
  }

  .pipeline-panel,
  .interview-rating-guide,
  .interview-criteria-section,
  .interview-criterion {
    padding: var(--space-4);
  }

  .interview-criterion-heading,
  .interview-save-bar,
  .interview-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .interview-criterion-badges {
    justify-content: flex-start;
  }

  .interview-header-actions {
    width: 100%;
    align-items: stretch;
  }

  .interview-save-bar .btn {
    width: 100%;
  }
}

/* source: css/external.css */
.external-body {
  background: var(--color-bg);
}

.external-header {
  display: flex;
  min-height: var(--top-nav-height);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0 var(--space-6);
}

.external-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.external-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.external-nav a,
.external-nav-trigger {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: var(--space-2);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  font-weight: var(--font-semibold);
  line-height: 1;
  padding: var(--space-2) var(--space-3);
  white-space: nowrap;
}

.external-nav a:hover,
.external-nav-trigger:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.external-nav a.is-active,
.external-nav-trigger.is-active,
.external-nav-dropdown a.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.external-nav-group {
  display: inline-flex;
}

.external-nav-caret {
  width: 0;
  height: 0;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.external-side-nav {
  display: none;
}

.external-mobile-nav-group {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-1) 0;
}

.external-mobile-nav-label {
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--font-extrabold);
  padding: var(--space-2) var(--space-3) var(--space-1);
}

.external-mobile-nav-group.is-active .external-mobile-nav-label {
  color: var(--color-primary);
}

.external-mobile-nav-children {
  display: grid;
  gap: var(--space-1);
  border-left: 2px solid var(--color-border);
  margin-left: var(--space-3);
  padding-left: var(--space-2);
}

.external-mobile-nav-children a {
  padding: var(--space-2) var(--space-3);
}

.external-main {
  flex: 1 0 auto;
  width: 100%;
  margin: 0;
  padding: var(--space-8) 4vw;
}

.external-hero {
  display: grid;
  min-height: 58vh;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.external-hero-content {
  max-width: 760px;
}

.external-hero h1,
.external-page-header h1 {
  max-width: 860px;
  color: var(--color-heading);
  font-size: clamp(2.25rem, 6vw, var(--text-6xl));
}

.external-hero-copy,
.external-page-header p {
  max-width: 720px;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

.external-section,
.external-page-header,
.external-form {
  margin-top: var(--space-8);
}

.talent-intake-main {
  display: grid;
  max-width: 1060px;
  gap: var(--space-6);
  margin: 0 auto;
  padding-right: var(--space-5);
  padding-left: var(--space-5);
}

.talent-intake-main .external-page-header {
  display: grid;
  justify-items: center;
  text-align: center;
}

.talent-intake-main .external-page-header h1,
.talent-intake-main .external-page-header p {
  margin-right: auto;
  margin-left: auto;
}

.talent-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  list-style: none;
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 0;
}

.talent-steps li {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 92px;
  place-items: center;
  gap: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  padding: var(--space-3) var(--space-4);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.talent-steps li span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.talent-steps li strong {
  color: inherit;
}

.talent-steps li.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.talent-steps li.is-active span,
.talent-steps li.is-complete span {
  background: var(--color-primary);
  color: #fff;
}

.talent-steps li.is-complete {
  border-color: var(--color-primary);
  color: var(--color-heading);
}

.talent-intake-form {
  display: grid;
  gap: var(--space-6);
  width: min(920px, 100%);
  max-width: 920px;
  margin: 0 auto;
}

.talent-form-section {
  display: grid;
  gap: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.talent-form-section h2 {
  margin: 0;
  color: var(--color-heading);
  font-size: var(--text-2xl);
}

.two-column-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.talent-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

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

.talent-experience {
  display: grid;
  gap: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  padding: var(--space-4);
}

.talent-experience strong {
  color: var(--color-heading);
}

.talent-experience span,
.talent-experience p {
  margin: 0;
  color: var(--color-text-muted);
}

.talent-created-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-3) var(--space-5);
  margin: 0;
}

.talent-created-details dt {
  color: var(--color-text-muted);
  font-weight: var(--font-semibold);
}

.talent-created-details dd {
  margin: 0;
  color: var(--color-heading);
  overflow-wrap: anywhere;
}

.talent-loading-indicator {
  width: min(360px, calc(100vw - 40px));
  height: auto;
  min-height: 220px;
  gap: var(--space-5);
  padding: var(--space-7);
  text-align: center;
}

.talent-loading-indicator .spinner-ring {
  width: 72px;
  height: 72px;
  border-width: 6px;
}

.talent-loading-indicator strong {
  color: var(--color-heading);
  font-size: var(--text-xl);
}

@media (max-width: 900px) {
  .external-header {
    padding: 0 var(--space-4);
  }

  .external-header-actions {
    gap: var(--space-2);
  }

  .external-nav {
    display: none;
  }

  .external-side-nav {
    display: block;
  }
}

@media (max-width: 560px) {
  .external-header {
    padding: 0 var(--space-3);
  }

  .brand-logo {
    max-width: 46vw;
  }

  .talent-steps,
  .talent-skill-grid,
  .two-column-form-grid,
  .talent-created-details {
    grid-template-columns: 1fr;
  }

  .talent-steps li {
    min-height: 72px;
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
  }
}
