:root {
  --brand: #0072ce;
  --ink: #0c1114;
  --muted: #525e6d;
  --page: #f0f1f5;
  --white: #ffffff;
  --hairline: rgba(12, 17, 20, 0.1);
  --border: rgba(12, 17, 20, 0.2);
  --input: rgba(12, 17, 20, 0.02);
  --grey-200: #edeff2;
  --brand-100: #f0f6ff;
  --brand-soft: #d6ecff;
  --nav-w: 300px;
  --nav-icon-inset: 24px;
  --nav-label-inset: 64px;
  --header-h: 64px;
  --font: Inter, "Helvetica Neue", Arial, sans-serif;
}

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

html,
body,
#root {
  margin: 0;
  min-height: 100%;
  height: 100%;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

img[hidden] {
  display: none !important;
}

.app {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  min-height: 100vh;
  height: 100%;
}

.app.is-collapsed {
  --nav-w: 72px;
}

.sidenav {
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: var(--nav-w);
  background: var(--white);
  border-right: 1px solid var(--hairline);
  position: relative;
  z-index: 2;
}

.sidenav__top {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidenav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 64px;
  margin: 0;
  padding: 16px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.sidenav__brand:hover {
  background: var(--brand-100);
}

.sidenav__brand:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.sidenav__brand img {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  flex-shrink: 0;
  object-fit: contain;
  aspect-ratio: 1;
}

.sidenav__product {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.16px;
  line-height: 1;
  color: #000;
  white-space: nowrap;
}

.app.is-collapsed .sidenav__brand {
  justify-content: center;
  padding: 16px 20px;
}

.app.is-collapsed .sidenav__product,
.app.is-collapsed .sidenav__label,
.app.is-collapsed .org-btn span:not(.org-btn__icon),
.app.is-collapsed .org-btn__chevron,
.app.is-collapsed .nav-link__chevron,
.app.is-collapsed .feedback span,
.app.is-collapsed .demo-reset span {
  display: none;
}

.scope {
  position: relative;
}

.org-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 56px;
  padding: 12px 24px 12px 20px;
  border: none;
  background: transparent;
  text-align: left;
}

.org-btn:hover {
  background: var(--brand-100);
}

.org-btn.is-open .org-btn__chevron {
  transform: rotate(180deg);
}

.org-btn__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--grey-200);
  flex-shrink: 0;
}

.org-btn__icon img {
  width: 20px;
  height: 20px;
}

.org-btn span:not(.org-btn__icon) {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.org-btn__chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.app.is-collapsed .org-btn {
  justify-content: center;
  padding: 12px 8px;
}

.sidenav__rule {
  height: 1px;
  background: var(--hairline);
}

.sidenav__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 16px 24px;
  border: none;
  background: transparent;
  text-align: left;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  position: relative;
}

.nav-link:hover {
  background: var(--brand-100);
}

.nav-link__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  overflow: clip;
}

.nav-link__icon img {
  width: 24px;
  height: 24px;
}

.nav-link__chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-link.is-selected {
  color: var(--brand);
}

.nav-link.is-selected .nav-link__icon img,
.nav-link.is-selected .nav-link__chevron {
  filter: brightness(0) saturate(100%) invert(37%) sepia(89%) saturate(2476%) hue-rotate(186deg)
    brightness(91%) contrast(101%);
}

.nav-link:not(.is-selected)[aria-label="Home"] .nav-link__icon img {
  filter: brightness(0);
}

.nav-link__bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 56px;
  background: var(--brand);
}

.app.is-collapsed .nav-link {
  justify-content: center;
  padding: 10px;
  gap: 0;
}

.nav-link__chevron.is-up {
  transform: rotate(180deg);
}

.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 24px 8px var(--nav-label-inset);
}

.nav-sub__item {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  padding: 10px 10px 10px 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.nav-sub__item::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  bottom: 0;
  left: calc(var(--nav-icon-inset) - var(--nav-label-inset));
  border-radius: 8px;
  background: transparent;
}

.nav-sub__item:hover::before {
  background: var(--brand-100);
}

.nav-sub__item.is-active {
  color: var(--brand);
}

.nav-sub__item.is-active::before {
  background: var(--brand-soft);
}

.nav-sub__item.is-active:hover::before {
  background: var(--brand-100);
}

.app.is-collapsed .nav-sub {
  display: none;
}

/* Account navigation — Figma 5803:27041 */
.app.is-account .sidenav__top,
.app.is-account .sidenav__foot {
  display: none;
}

.account-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
  overflow-y: auto;
}

.account-nav[hidden] {
  display: none;
}

.account-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin: 0 0 0 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}

.account-nav__back img {
  transform: rotate(180deg);
}

.account-nav__back:hover {
  text-decoration: underline;
}

.account-nav__title {
  margin: 0;
  padding-left: 24px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.account-nav__sections {
  display: flex;
  flex-direction: column;
  margin-top: -8px;
  padding-bottom: 8px;
}

.account-nav .nav-sub {
  gap: 0;
  padding-bottom: 0;
}

.account-nav .nav-sub__item {
  padding-top: 12px;
  padding-bottom: 12px;
}

.account-nav .nav-sub__item.is-active {
  font-weight: 500;
}

.menu[hidden],
.flyout[hidden] {
  display: none !important;
}

.menu,
.flyout {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--hairline);
}

.menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 12px;
  right: 12px;
  z-index: 4;
}

.menu__item,
.flyout__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  color: #000;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.menu__hint {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.menu__item:hover,
.flyout__item:hover {
  background: var(--brand-100);
}

.menu__item.is-active,
.flyout__item.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}

.menu__item.is-active:hover,
.flyout__item.is-active:hover {
  background: var(--brand-100);
}

.flyout {
  position: fixed;
  left: 72px;
  z-index: 5;
  width: 174px;
}

.page {
  padding: 32px;
}

.page__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page__actions:empty {
  display: none;
}

.page__heading {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page__titleblock {
  display: flex;
  flex-direction: column;
}

.page__breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.page__breadcrumb-link {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}

.page__breadcrumb-link:hover {
  text-decoration: underline;
}

.page__breadcrumb-current {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.page__breadcrumb-sep {
  flex-shrink: 0;
}

.page__title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.page__scope {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.page__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.app.is-account .page-body {
  margin-top: 16px;
}

.sidenav__foot {
  display: flex;
  flex-direction: column;
}

.sidenav__foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 16px 24px;
}

.demo-reset {
  display: flex;
  align-items: center;
  gap: 16px;
  width: calc(100% - 48px);
  margin: 12px 24px 0;
  padding: 4px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.demo-reset:hover {
  background: var(--brand-100);
}

.demo-reset:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.demo-reset img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.app.is-collapsed .demo-reset {
  justify-content: center;
  width: auto;
  margin: 12px auto 0;
}

.feedback {
  display: flex;
  align-items: center;
  gap: 16px;
  border: none;
  background: transparent;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.feedback:hover {
  background: var(--brand-100);
}

.feedback img,
.collapse-btn img {
  width: 24px;
  height: 24px;
}

.collapse-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
}

.collapse-btn:hover {
  background: var(--brand-100);
}

.collapse-btn img {
  transform: rotate(90deg);
}

.app.is-collapsed .sidenav__foot-row {
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 20px 0;
}

.app.is-collapsed .collapse-btn img {
  transform: rotate(-90deg);
}

.app.is-nav-locked .sidenav__nav,
.app.is-nav-locked .scope,
.app.is-nav-locked .demo-reset,
.app.is-nav-locked .feedback,
.app.is-nav-locked .collapse-btn {
  pointer-events: none;
  opacity: 0.45;
}

.app.is-nav-locked .account {
  pointer-events: auto;
  opacity: 1;
}

.app.is-nav-locked .account-menu__item:not(.account-menu__item--signout) {
  pointer-events: none;
  opacity: 0.45;
}

.main.is-empty-home {
  background: #f0f1f5;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: var(--header-h);
  padding: 0 32px 0 24px;
  background: var(--white);
  border-bottom: 1px solid var(--hairline);
}

.topbar__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

/* Top nav search — hidden for now; remove rule to restore */
.topbar .search {
  display: none;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 250px;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--input);
}

.search img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

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

.bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50px;
  background: transparent;
}

.bell:hover {
  background: var(--brand-100);
}

.bell img {
  width: 24px;
  height: 24px;
}

.bell__dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cc0300;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50px;
  border: 1px solid var(--hairline);
  background: var(--page);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}

.avatar:hover {
  background: var(--brand-100);
}

button.avatar {
  padding: 0;
  color: var(--ink);
  font-family: inherit;
}

.avatar[aria-expanded="true"] {
  background: var(--brand-100);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.account {
  position: relative;
}

/* Profile navigation — Figma 5803:27009 */
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 305px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 4px 12px var(--hairline);
}

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

.account-menu__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--hairline);
}

.account-menu__avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.account-menu__meta {
  min-width: 0;
  font-size: 14px;
}

.account-menu__meta p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu__name {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.6;
}

.account-menu__email {
  color: var(--muted);
  line-height: 1.4;
}

.account-menu__role {
  color: var(--muted);
  line-height: 1.6;
}

.account-menu__items {
  display: flex;
  flex-direction: column;
}

.account-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 20px 12px 16px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.account-menu__item:hover,
.account-menu__item:focus-visible {
  background: var(--brand-100);
  outline: none;
}

.account-menu__item--signout {
  padding-bottom: 16px;
  border-top: 1px solid var(--hairline);
}

.main {
  min-height: 0;
  background: var(--page);
}

.slot {
  min-height: 100%;
}

/* Checkbox — Figma 4946:73152 (checked / unchecked / indeterminate / disabled) */
.ui-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.ui-checkbox__text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
}

.ui-checkbox__input {
  appearance: none;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 3.2px;
  background: var(--input);
  cursor: pointer;
}

.ui-checkbox__input:checked {
  border-color: var(--brand);
  background: var(--brand) url("./assets/checkbox-check.svg") center / 12px 12px no-repeat;
}

.ui-checkbox__input:indeterminate {
  border-color: var(--brand);
  background: var(--brand) url("./assets/checkbox-minus.svg") center / 12px 12px no-repeat;
}

.ui-checkbox__input:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ui-checkbox__input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.ui-checkbox:has(.ui-checkbox__input:disabled) {
  cursor: not-allowed;
}

.filter-menu .ui-checkbox,
.columns-menu .ui-checkbox {
  padding: 8px 16px;
}

/* Table bulk selection bar — Figma 5671:18331 */
.table-bulk-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 16px;
  background: #404c59;
  color: var(--white);
}

.table-bulk-bar__count {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.table-bulk-bar__select-all {
  padding: 0;
  border: none;
  background: transparent;
  color: #a9d6ff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
}

.table-bulk-bar__select-all:focus-visible,
.table-bulk-bar__btn:focus-visible,
.table-bulk-bar__close:focus-visible {
  outline: 2px solid #a9d6ff;
  outline-offset: 2px;
}

.table-bulk-bar__divider {
  display: flex;
  flex-shrink: 0;
  align-self: stretch;
  align-items: stretch;
}

.table-bulk-bar__divider img {
  display: block;
  width: 1px;
  height: 100%;
  min-height: 40px;
}

.table-bulk-bar__main {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.table-bulk-bar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.table-bulk-bar__btn {
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
}

.table-bulk-bar__btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.table-bulk-bar__close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.table-bulk-bar__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.table-bulk-bar__close img {
  width: 16px;
  height: 16px;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 40;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 300px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 12px;
  background: #1b232a;
  box-shadow: 0 1px 12px rgba(29, 42, 52, 0.06);
}

.app-toast[hidden] {
  display: none !important;
}

.app-toast__message {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.app-toast__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.app-toast__icon[hidden] {
  display: none;
}

.app-toast__close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.app-toast__close img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}
