@layer legacy {
  /* Original VM workspace, restored for the component-based JavaScript UI. */
  .record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(275px, 100%), 1fr));
    gap: 24px;
  }
  .record-card {
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: 30px;
    padding: 24px;
    box-shadow: 0 2px 4px #11182706;
    min-width: 0;
  }
  .record-card header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
  }

  .record-title {
    font-size: 17px;
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  .record-title small {
    display: block;
    font-size: 13px;
    color: var(--ui-muted);
    font-weight: 400;
    margin-top: 3px;
  }
  .record-card dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
  }
  .record-card dt {
    color: var(--ui-muted);
  }
  .record-card dd {
    margin: 0;
    color: var(--ui-ink);
    overflow-wrap: anywhere;
  }
  .record-card footer {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-top: 16px;
    margin-top: 20px;
    border-top: 1px solid var(--ui-line);
  }

  .employee-directory > .directory-toolbar,
  .company-directory > .module-toolbar {
    padding: 16px;
    margin-bottom: 24px;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    border-radius: 14px;
  }
  .employee-directory > .directory-filters {
    background: var(--ui-surface);
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 14px;
    border: 1px solid var(--ui-line);
  }

  .view-switch {
    display: flex;
    padding: 4px;
    gap: 4px;
    background: var(--ui-soft);
    border-radius: 12px;
  }

  @font-face {
    font-family: Inter;
    src: url("../../fonts/Inter.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
  }
  .app-shell {
    --canvas: var(--ui-canvas);
    --surface: var(--ui-surface);
    --line: var(--ui-line);
    --ink: var(--ui-ink);
    --muted: var(--ui-muted);
    --brand: var(--ui-brand);
    display: flex;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--ui-font);
    letter-spacing: -0.011em;
  }
  .app-shell .sidebar {
    position: relative;
    flex: 0 0 auto;
    width: 80px;
    height: calc(100% - 20px);
    margin: 10px 0 10px 10px;
    padding: 28px 0 12px 8px;
    border: 0;
    border-radius: 16px;
    background: #000;
    overflow: visible;
    box-shadow: none;
    transition: width 0.25s;
  }
  .app-shell .sidebar:hover,
  .app-shell .sidebar:focus-within {
    width: 230px;
  }
  .sidebar-brand {
    position: relative;
    display: block;
    flex: 0 0 70px;
    height: 70px;
    width: 65px;
    overflow: hidden;
    margin-bottom: 24px;
  }
  .sidebar-brand img {
    position: absolute;
    top: -25px;
    left: -4px;
    width: 220px;
    max-width: none;
    height: auto;
  }
  .app-shell .sidebar nav {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 16px;
    padding: 20px 0 20px 8px;
    margin-top: -20px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }
  .app-shell .sidebar nav::-webkit-scrollbar {
    display: none;
  }
  .app-shell .sidebar:hover .sidebar-brand,
  .app-shell .sidebar:focus-within .sidebar-brand {
    width: 220px;
  }
  .app-shell .sidebar nav a,
  .app-shell .sidebar-bottom button {
    position: relative;
    flex: 0 0 48px;
    height: 48px;
    min-height: 48px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 8px;
    border: 0;
    border-radius: 12px;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    background: transparent;
  }
  .app-shell .sidebar .nav-icon {
    flex: 0 0 35px;
    width: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .app-shell .sidebar .nav-text {
    display: none;
    width: auto;
    font-size: inherit;
    text-align: left;
    opacity: 0;
    transform: translateX(-4px);
    transition:
      opacity 0.2s,
      transform 0.2s;
  }
  .app-shell .sidebar:hover .nav-text,
  .app-shell .sidebar:focus-within .nav-text {
    display: block;
    opacity: 1;
    transform: none;
  }
  .app-shell .sidebar nav a:hover,
  .app-shell .sidebar-bottom button:hover {
    color: var(--ui-on-brand);
    background: #ffffff1a;
  }
  .app-shell .sidebar nav a[aria-current="page"] {
    color: var(--ui-ink-strong);
    background: var(--canvas);
    border-radius: 20px 0 0 20px;
    margin-right: 0;
    font-weight: 700;
    box-shadow: none;
  }
  .app-shell .sidebar nav a[aria-current="page"]::before,
  .app-shell .sidebar nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    right: 0;
    width: 20px;
    height: 20px;
    background: transparent;
    pointer-events: none;
  }
  .app-shell .sidebar nav a[aria-current="page"]::before {
    top: -20px;
    border-bottom-right-radius: 20px;
    box-shadow: 10px 10px 0 10px var(--canvas);
  }
  .app-shell .sidebar nav a[aria-current="page"]::after {
    bottom: -20px;
    border-top-right-radius: 20px;
    box-shadow: 10px -10px 0 10px var(--canvas);
  }
  .sidebar-bottom {
    margin-top: auto;
    padding: 12px 0 0 8px;
    border: 0;
  }
  .app-shell .sidebar-bottom button {
    width: calc(100% - 8px);
  }
  .app-shell .sidebar-bottom .nav-logout {
    color: var(--ui-on-brand);
  }
  .app-shell .workspace {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    margin-left: 20px;
  }
  .app-shell .topbar {
    display: none;
    background: transparent;
    border: 0;
    height: 54px;
    padding: 12px 32px 0;
  }
  .app-shell.has-company-picker .topbar {
    display: flex;
  }
  .app-shell .menu-backdrop {
    display: none;
  }
  .app-shell .company-select {
    color: var(--muted);
    font-size: 12px;
  }
  .app-shell .company-select select {
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 12px;
  }
  .app-shell #page-content {
    padding: 48px 32px 40px;
    min-height: 100%;
  }
  .app-shell.has-company-picker #page-content {
    padding-top: 24px;
    min-height: calc(100% - 54px);
  }
  .app-shell .page-stack {
    gap: 32px;
  }
  .app-shell .page-heading > .eyebrow {
    display: none;
  }
  .app-shell .page-heading h1 {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 700;
    color: var(--ui-ink-strong);
    letter-spacing: -0.025em;
  }
  .app-shell .page-heading p {
    color: var(--ui-muted);
    font-size: 14px;
  }

  .app-shell input,
  .app-shell select,
  .app-shell textarea {
    color: var(--ui-ink);
    background: var(--ui-soft);
    border-color: var(--ui-line);
    border-radius: 12px;
  }
  .app-shell .field > span {
    color: var(--ui-muted);
    font-weight: 500;
  }

  .app-shell .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }

  .app-shell :where(a, button, input, select, textarea):focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
  }
  @media (max-width: 1000px) {
    .app-shell .stats-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 760px) {
    .app-shell {
      display: flex;
    }
    .app-shell .sidebar {
      position: fixed;
      inset: 0 auto 0 0;
      width: 64px;
      margin: 8px 0 8px 4px;
      height: calc(100% - 16px);
      padding-left: 0;
      visibility: visible;
      transition: width 0.2s;
      z-index: 60;
    }
    .app-shell .sidebar:hover,
    .app-shell .sidebar:focus-within {
      width: 64px;
    }
    .app-shell.menu-open .sidebar {
      left: 0;
      width: min(230px, calc(100vw - 60px));
      visibility: visible;
    }
    .app-shell .sidebar nav {
      padding-left: 6px;
    }
    .app-shell .sidebar nav a {
      padding-left: 4px;
    }
    .app-shell .sidebar .sidebar-brand,
    .app-shell .sidebar:hover .sidebar-brand,
    .app-shell .sidebar:focus-within .sidebar-brand {
      width: 64px;
    }
    .app-shell .sidebar .nav-text,
    .app-shell .sidebar:hover .nav-text,
    .app-shell .sidebar:focus-within .nav-text {
      display: none;
    }
    .app-shell.menu-open .sidebar .nav-text,
    .app-shell.menu-open .sidebar:hover .nav-text,
    .app-shell.menu-open .sidebar:focus-within .nav-text {
      display: block;
      opacity: 1;
      transform: none;
    }
    .app-shell.menu-open .sidebar .sidebar-brand {
      width: 220px;
    }
    .app-shell .workspace {
      margin-left: 76px;
      width: calc(100% - 76px);
    }
    .app-shell .menu-backdrop:not([hidden]) {
      display: block;
      position: fixed;
      inset: 0;
      border: 0;
      background: #0d12304d;
      z-index: 55;
    }
    .app-shell .topbar {
      display: flex;
      height: 56px;
      padding: 8px 12px;
      gap: 8px;
    }
    .app-shell .menu-toggle {
      color: var(--ink);
      display: block;
      flex: 0 0 36px;
      min-height: 36px;
      margin: 0;
      padding: 4px;
      border-radius: 10px;
      background: var(--ui-surface);
      border: 1px solid var(--line);
    }
    .app-shell .company-picker {
      min-width: 0;
      max-width: calc(100% - 44px);
    }
    .app-shell .company-select {
      min-width: 0;
    }
    .app-shell .company-select select {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      text-overflow: ellipsis;
    }
    .app-shell #page-content,
    .app-shell.has-company-picker #page-content {
      padding: 8px 12px 32px;
      min-height: calc(100% - 56px);
    }
    .app-shell .page-stack {
      gap: 24px;
    }

    .app-shell .panel-heading {
      flex-wrap: wrap;
      gap: 12px;
    }
    .app-shell .record-card {
      padding: 20px;
    }
    .app-shell .record-card dl {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .app-shell .directory-toolbar,
    .app-shell .module-toolbar {
      gap: 10px;
    }
    .app-shell .directory-toolbar > *,
    .app-shell .module-toolbar > * {
      max-width: 100%;
    }
    .app-shell .field {
      min-width: 0;
    }
    .app-shell input,
    .app-shell select,
    .app-shell textarea {
      max-width: 100%;
    }
    .app-shell .button {
      white-space: normal;
    }

    .app-shell .empty-state {
      padding: 24px 16px;
    }

    .app-shell .stats-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-shell .sidebar-bottom {
      padding-left: 6px;
    }
    .app-shell .sidebar-bottom .nav-logout {
      padding-left: 4px;
    }
    .app-shell .sidebar nav a[aria-current="page"] {
      border-radius: 20px 0 0 20px;
    }
    .app-shell .page-heading {
      min-width: 0;
    }
    .app-shell .page-heading p {
      overflow-wrap: anywhere;
    }
    .app-shell .record-title {
      min-width: 0;
    }
    .app-shell .record-card header {
      gap: 12px;
    }
    .app-shell .record-grid {
      gap: 16px;
    }
    .app-shell .page-heading h1 {
      overflow-wrap: anywhere;
    }
    .app-shell .page-heading h1 {
      font-size: 24px;
    }
    .app-shell .stats-grid {
      gap: 12px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .app-shell .sidebar,
    .app-shell .sidebar .nav-text {
      transition: none;
    }
  }
}
