:root {
  --black: #111111;
  --dark-gray: #555555;
  --gray: #999999;
  --light-gray: #dddddd;
  --ultra-light-gray: #f5f5f5;
  --white: #ffffff;
  --accent: #f8b502;
  --error: #ef0a0a;
  --success: #05ae1e;
  --info: #72c7fb;
  --overlay-white-20: rgba(255, 255, 255, 0.2);
  --focus-ring-accent: color-mix(in srgb, var(--accent) 18%, transparent);

  --font-family-base: "Inter", sans-serif;

  --type-h1-size: 32px;
  --type-h1-line: 44px;
  --type-h1-weight: 700;

  --type-h2-size: 24px;
  --type-h2-line: 32px;
  --type-h2-weight: 600;

  --type-h3-size: 20px;
  --type-h3-line: 28px;
  --type-h3-weight: 600;

  --type-h4-size: 16px;
  --type-h4-line: 24px;
  --type-h4-weight: 600;

  --type-body-l-size: 16px;
  --type-body-l-line: 24px;
  --type-body-l-weight: 400;

  --type-body-m-size: 14px;
  --type-body-m-line: 20px;
  --type-body-m-weight: 400;

  --type-body-m-strong-size: 14px;
  --type-body-m-strong-line: 20px;
  --type-body-m-strong-weight: 600;

  --type-caption-size: 12px;
  --type-caption-line: 16px;
  --type-caption-weight: 400;

  --type-label-size: 14px;
  --type-label-line: 20px;
  --type-label-weight: 500;

  --type-table-head-size: 13px;
  --type-table-head-line: 18px;
  --type-table-head-weight: 600;

  --sidebar-width: 132px;
}

* {
  scrollbar-color: var(--gray) var(--light-gray);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

*::-webkit-scrollbar-track {
  background: var(--light-gray);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: var(--gray);
  border-radius: 999px;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

.ui-selectbox-list,
.multi-select-menu {
  scrollbar-width: thin;
}

.ui-selectbox-list::-webkit-scrollbar,
.multi-select-menu::-webkit-scrollbar {
  width: 2px;
  height: 2px;
}

.ui-selectbox-list::-webkit-scrollbar-track,
.multi-select-menu::-webkit-scrollbar-track {
  background: var(--light-gray);
  border-radius: 999px;
}

.ui-selectbox-list::-webkit-scrollbar-thumb,
.multi-select-menu::-webkit-scrollbar-thumb {
  background: var(--gray);
  border-radius: 999px;
}

.t-h1 {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--type-h1-size);
  line-height: var(--type-h1-line);
  font-weight: var(--type-h1-weight);
}

.t-h2 {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--type-h2-size);
  line-height: var(--type-h2-line);
  font-weight: var(--type-h2-weight);
}

.t-h3 {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-line);
  font-weight: var(--type-h3-weight);
}

.t-h4 {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--type-h4-size);
  line-height: var(--type-h4-line);
  font-weight: var(--type-h4-weight);
}

.t-body-l {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--type-body-l-size);
  line-height: var(--type-body-l-line);
  font-weight: var(--type-body-l-weight);
}

.t-body-m {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  font-weight: var(--type-body-m-weight);
}

.t-body-m-strong {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-strong-size);
  line-height: var(--type-body-m-strong-line);
  font-weight: var(--type-body-m-strong-weight);
}

.t-caption {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-caption-weight);
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 60;
  height: 100vh;
  padding: 24px 12px;
  overflow: visible;
}

.sidebar-shell {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  text-decoration: none;
  color: var(--black);
  font-family: var(--font-family-base);
  font-size: var(--type-h2-size);
  line-height: var(--type-h2-line);
  font-weight: var(--type-h2-weight);
}

.brand-accent {
  color: var(--accent);
}

.menu {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.menu-primary {
  margin-top: 4px;
}

.menu-spacer {
  flex: 1 1 auto;
}

.menu-item {
  width: 108px;
  min-height: 96px;
  border: none;
  border-radius: 16px;
  padding: 12px 12px 16px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-decoration: none;
  color: var(--dark-gray);
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  font-weight: var(--type-body-m-weight);
  text-align: center;
  transition: background-color 120ms ease, color 120ms ease;
}

.menu-item:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.menu-item.active {
  background: var(--ultra-light-gray);
  color: var(--black);
}

.menu-trigger {
  cursor: pointer;
}

.menu-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 40px;
  font-size: 32px;
  line-height: 40px;
}

.menu-label {
  display: block;
}

.settings-menu {
  position: relative;
  width: 108px;
  z-index: 70;
}

.settings-dropdown {
  position: absolute;
  left: calc(100% + 12px);
  bottom: 0;
  min-width: 220px;
  max-height: min(360px, calc(100vh - 32px));
  padding: 8px;
  border: 1px solid var(--light-gray);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.12);
  display: none;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 120;
}

.settings-dropdown.open {
  display: flex;
}

.settings-group {
  display: grid;
  gap: 6px;
  padding: 4px 0 8px;
}

.settings-group-title {
  margin: 0;
  padding: 0 12px;
  font-family: var(--font-family-base);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-caption-weight);
  color: var(--gray);
}

.settings-submenu {
  display: grid;
  gap: 4px;
}

.settings-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--dark-gray);
  text-decoration: none;
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  font-weight: var(--type-body-m-weight);
  transition: background-color 120ms ease, color 120ms ease;
}

.settings-link:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--black);
}

.settings-link.active {
  background: var(--ultra-light-gray);
  color: var(--black);
  font-weight: var(--type-body-m-strong-weight);
}

.settings-link--sub {
  padding-left: 24px;
}

@media (max-width: 900px) {
  .settings-dropdown {
    left: 0;
    bottom: calc(100% + 12px);
    max-width: min(280px, calc(100vw - 32px));
  }
}

.btn {
  --btn-height: 44px;
  --btn-radius: 16px;
  --btn-padding-inline: 20px;
  --btn-gap: 4px;
  --btn-font-size: 14px;
  --btn-line-height: 20px;
  --btn-font-weight: 400;
  --btn-icon-slot-width: 16px;
  --btn-icon-size: 20px;
  --btn-spinner-image: url("assets/icons/spinner-20.svg");
  --btn-loading-color: currentColor;
  height: 44px;
  min-width: 44px;
  border: none;
  border-radius: var(--btn-radius);
  padding: 0 var(--btn-padding-inline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-gap);
  font-family: var(--font-family-base);
  font-size: var(--btn-font-size);
  line-height: var(--btn-line-height);
  font-weight: var(--btn-font-weight);
  position: relative;
  cursor: pointer;
  transition: color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
  white-space: nowrap;
}

.btn-sm {
  --btn-height: 32px;
  --btn-radius: 12px;
  --btn-padding-inline: 12px;
  --btn-font-size: 12px;
  --btn-line-height: 16px;
  --btn-icon-slot-width: 12px;
  --btn-icon-size: 16px;
  --btn-spinner-image: url("assets/icons/spinner-16.svg");
}

.btn-lg {
  --btn-height: 52px;
  --btn-radius: 20px;
  --btn-padding-inline: 24px;
  --btn-font-size: 16px;
  --btn-line-height: 24px;
  --btn-icon-slot-width: 20px;
  --btn-icon-size: 24px;
  --btn-spinner-image: url("assets/icons/spinner-24.svg");
}

.btn {
  height: var(--btn-height);
  min-width: var(--btn-height);
}

.btn-icon {
  width: var(--btn-height);
  padding: 0;
  gap: 0;
}

.btn-icon-slot {
  width: var(--btn-icon-slot-width);
  min-width: var(--btn-icon-slot-width);
  height: var(--btn-icon-size);
  display: inline-flex;
  align-items: center;
  overflow: visible;
  flex: 0 0 auto;
}

.btn-icon-slot--start {
  justify-content: flex-end;
}

.btn-icon-slot--end {
  justify-content: flex-start;
}

.btn-icon-slot > img,
.btn-icon-slot > svg,
.btn-icon-slot > .btn-icon-glyph {
  width: var(--btn-icon-size);
  height: var(--btn-icon-size);
  display: block;
  flex: 0 0 auto;
}

.btn-label {
  display: inline-block;
  min-width: 0;
}

.btn.is-loading {
  color: transparent;
  pointer-events: none;
}

.btn.is-loading > * {
  visibility: hidden;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: var(--btn-icon-size);
  height: var(--btn-icon-size);
  background: var(--btn-loading-color);
  -webkit-mask: var(--btn-spinner-image) center / contain no-repeat;
  mask: var(--btn-spinner-image) center / contain no-repeat;
  animation: btn-spinner-rotate 800ms linear infinite;
}

.btn-ghost {
  background: transparent;
  border: none;
  padding-inline: 0;
  min-width: auto;
  height: auto;
  border-radius: 0;
}

.btn.btn-ghost.btn-icon {
  width: auto;
  min-width: auto;
  padding: 0;
}

.btn-ghost .btn-icon-slot--start {
  margin-right: 4px;
}

.btn-ghost .btn-icon-slot--end {
  margin-left: 4px;
}

.primary-filled {
  background: var(--accent);
  color: var(--white);
  --btn-loading-color: var(--white);
}

.primary-filled:hover {
  box-shadow: inset 0 0 0 999px var(--overlay-white-20);
}

.secondary-filled {
  background: var(--white);
  color: var(--black);
  --btn-loading-color: var(--black);
}

.secondary-filled:hover {
  background: var(--light-gray);
  color: var(--black);
}

.primary-filled:disabled,
.secondary-filled:disabled,
.error-filled:disabled {
  background: var(--light-gray);
  color: var(--gray);
  box-shadow: none;
  cursor: not-allowed;
}

.outline {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--light-gray);
}

.outline:hover {
  background: var(--ultra-light-gray);
}

.outline:disabled {
  background: var(--light-gray);
  color: var(--gray);
  border-color: var(--light-gray);
  cursor: not-allowed;
}

.error-filled {
  background: var(--error);
  color: var(--white);
}

.error-filled:hover {
  box-shadow: inset 0 0 0 999px var(--overlay-white-20);
}

.primary-filled .btn-icon-slot > img,
.primary-filled.btn-icon > img,
.error-filled .btn-icon-slot > img,
.error-filled.btn-icon > img {
  filter: brightness(0) invert(1);
}

.error-filled:disabled .btn-icon-slot > img,
.error-filled:disabled.btn-icon > img {
  filter: none;
}

.ghost-primary {
  color: var(--accent);
}

.ghost-secondary {
  color: var(--dark-gray);
}

.ghost-primary .btn-icon-slot > img,
.ghost-primary.btn-icon > img {
  filter: brightness(0) saturate(100%) invert(73%) sepia(94%) saturate(1330%) hue-rotate(360deg) brightness(101%) contrast(95%);
}

.ghost-secondary .btn-icon-slot > img,
.ghost-secondary.btn-icon > img {
  filter: brightness(0) saturate(100%) invert(33%) sepia(0%) saturate(0%) hue-rotate(190deg) brightness(97%) contrast(92%);
}

.btn-ghost:hover {
  opacity: 0.8;
}

.ghost-secondary:hover {
  color: var(--accent);
  opacity: 1;
}

@keyframes btn-spinner-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.ghost-secondary:hover .btn-icon-slot > img,
.ghost-secondary:hover.btn-icon > img {
  filter: brightness(0) saturate(100%) invert(73%) sepia(94%) saturate(1330%) hue-rotate(360deg) brightness(101%) contrast(95%);
}

.btn-ghost:disabled {
  color: var(--gray);
  cursor: not-allowed;
  opacity: 1;
}

.btn-ghost:disabled .btn-icon-slot > img,
.btn-ghost:disabled.btn-icon > img {
  filter: brightness(0) saturate(0%);
  opacity: 0.4;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.checkbox-box {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--light-gray);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex: 0 0 24px;
  box-sizing: border-box;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.checkbox-box::before {
  content: "";
  display: block;
}

.checkbox-label {
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  font-weight: var(--type-body-m-weight);
  color: var(--black);
}

.checkbox-input:checked + .checkbox-box {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-input:checked + .checkbox-box::before {
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg) translate(-1px, -1px);
}

.checkbox:hover .checkbox-box {
  border-color: var(--accent);
}

.checkbox:hover .checkbox-input:checked + .checkbox-box {
  background: color-mix(in srgb, var(--accent) 78%, white);
  border-color: color-mix(in srgb, var(--accent) 78%, white);
}

.checkbox.is-indeterminate .checkbox-box {
  background: var(--white);
  border: 4px solid var(--accent);
}

.checkbox.is-indeterminate .checkbox-box::before {
  width: 0;
  height: 0;
  border: 0;
  transform: none;
}

.checkbox.is-indeterminate:hover .checkbox-box {
  border-color: color-mix(in srgb, var(--accent) 78%, white);
}

.checkbox-input:disabled + .checkbox-box {
  background: var(--ultra-light-gray);
  border-color: var(--light-gray);
  color: var(--gray);
}

.checkbox-input:disabled + .checkbox-box::before {
  background: transparent;
}

.checkbox-input:checked:disabled + .checkbox-box {
  background: var(--light-gray);
  border-color: var(--light-gray);
}

.checkbox-input:checked:disabled + .checkbox-box::before {
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg) translate(-1px, -1px);
}

.checkbox.is-indeterminate .checkbox-input:disabled + .checkbox-box,
.checkbox.is-indeterminate:has(.checkbox-input:disabled) .checkbox-box {
  background: var(--ultra-light-gray);
  border-color: var(--light-gray);
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.radio-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.radio-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--light-gray);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.radio-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background-color 120ms ease;
}

.radio-label {
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  font-weight: var(--type-body-m-weight);
  color: var(--black);
}

.radio-input:checked + .radio-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.radio-input:checked + .radio-dot::before {
  background: var(--white);
}

.radio:hover .radio-dot {
  border-color: var(--accent);
}

.radio:hover .radio-input:checked + .radio-dot {
  background: color-mix(in srgb, var(--accent) 78%, white);
}

.radio-input:not(:checked) + .radio-dot:hover,
.radio:hover .radio-input:not(:checked) + .radio-dot {
  background: var(--white);
}

.radio-input:disabled + .radio-dot {
  border-color: var(--light-gray);
  background: var(--ultra-light-gray);
}

.radio-input:disabled + .radio-dot::before {
  background: transparent;
}

.radio-input:checked:disabled + .radio-dot {
  border-color: var(--light-gray);
  background: var(--light-gray);
}

.radio-input:checked:disabled + .radio-dot::before {
  background: var(--white);
}

.ui-input,
.ui-select,
.ui-textarea {
  width: 100%;
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  font-weight: var(--type-body-m-weight);
}

.ui-input,
.ui-select {
  height: 44px;
  padding: 0 14px;
}

.ui-select-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.ui-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 14px;
  background-image: none;
}

.ui-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gray) 50%),
    linear-gradient(135deg, var(--gray) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.ui-selectbox {
  position: relative;
  width: 100%;
  min-width: 0;
}

.ui-selectbox-trigger,
.multi-select-summary {
  list-style: none;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  background: var(--white);
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  font-weight: var(--type-body-m-weight);
  cursor: pointer;
  text-align: left;
}

.ui-selectbox-trigger:focus-visible,
.multi-select-summary:focus-visible {
  outline: none;
  border-color: var(--gray);
  box-shadow: none;
}

.ui-selectbox-trigger:hover,
.multi-select-summary:hover {
  border-color: var(--accent);
}

.ui-selectbox-value,
.multi-select-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-selectbox-arrow,
.multi-select-summary::after {
  margin-left: auto;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  content: "";
}

.ui-selectbox-arrow img {
  display: block;
  width: 20px;
  height: 20px;
}

.multi-select-summary::after {
  background: center / 20px 20px no-repeat url("assets/icons/arrow-list-down-20.svg");
}

.multi-select-summary::-webkit-details-marker {
  display: none;
}

.ui-selectbox-dropdown,
.multi-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  gap: 12px;
  max-height: min(360px, calc(100vh - 48px));
  padding: 16px 12px 12px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.ui-selectbox.opens-up .ui-selectbox-dropdown,
.ui-select-multi.opens-up .multi-select-menu {
  top: auto;
  bottom: calc(100% + 8px);
}

.ui-selectbox.is-open .ui-selectbox-dropdown,
.ui-select-multi[open] .multi-select-menu {
  display: flex;
}

.ui-selectbox-search {
  position: relative;
  display: block;
  min-height: 44px;
  padding: 0;
}

.ui-selectbox-search-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  opacity: 1;
}

.ui-selectbox-search-icon img {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 1;
}

.ui-selectbox-search-input {
  padding-left: 14px;
  padding-right: 40px;
  color: var(--black);
  min-width: 0;
}

.ui-selectbox-search-input::placeholder {
  color: var(--gray);
}

.ui-selectbox-search-input:focus {
  outline: none;
}

.ui-selectbox-list,
.multi-select-menu {
  overflow-y: auto;
}

.ui-selectbox-option,
.multi-select-option {
  width: 100%;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--white);
  color: var(--black);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  font-weight: var(--type-body-m-weight);
  text-align: left;
  cursor: pointer;
}

.ui-selectbox-option:hover,
.multi-select-option:hover {
  background: color-mix(in srgb, var(--accent) 10%, white);
}

.ui-selectbox-option.is-active,
.multi-select-option.is-active {
  background: var(--ultra-light-gray);
}

.ui-selectbox-option.is-hidden,
.multi-select-option.is-hidden {
  display: none;
}

.multi-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.multi-select-option {
  padding-left: 16px;
  padding-right: 16px;
}

.multi-select-option .checkbox {
  width: 100%;
}

.ui-select option {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
}

.ui-select option:checked {
  background: color-mix(in srgb, var(--accent) 14%, var(--white));
  color: var(--black);
}

.ui-textarea {
  min-height: 112px;
  padding: 12px 14px;
  resize: vertical;
}

.ui-input::placeholder,
.ui-textarea::placeholder {
  color: var(--gray);
}

.ui-input:hover:not(:disabled),
.ui-select:hover:not(:disabled),
.ui-textarea:hover:not(:disabled),
.ui-selectbox-trigger:hover,
.multi-select-summary:hover,
.ui-selectbox-search-input:hover:not(:disabled) {
  outline: none;
  border-color: var(--accent);
  box-shadow: none;
}

.ui-selectbox-search-input:focus,
.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
  outline: none;
  border-color: var(--gray);
  box-shadow: none;
}

.ui-input:disabled,
.ui-select:disabled,
.ui-textarea:disabled {
  background: var(--ultra-light-gray);
  color: var(--gray);
}

.ui-field {
  display: grid;
  gap: 8px;
}

.ui-label {
  font-family: var(--font-family-base);
  font-size: var(--type-label-size);
  line-height: var(--type-label-line);
  font-weight: var(--type-label-weight);
  color: var(--black);
}

.ui-help {
  font-family: var(--font-family-base);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-caption-weight);
  color: var(--gray);
}


.tabs-strip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  border-radius: 16px;
  background: var(--ultra-light-gray);
}

.tab-chip {
  min-height: 36px;
  padding: 8px 16px;
  border: none;
  border-radius: 12px;
  color: var(--gray);
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  font-weight: var(--type-body-m-weight);
  background: transparent;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.tab-chip:hover {
  color: var(--dark-gray);
}

.tab-chip.is-active,
.tab-chip[aria-current="page"] {
  background: var(--white);
  color: var(--black);
  font-weight: var(--type-body-m-strong-weight);
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.08);
}

.ui-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--light-gray);
  color: var(--black);
  font-family: var(--font-family-base);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-caption-weight);
}


.ui-badge {
  --ui-badge-bg: var(--success);
  --ui-badge-color: var(--white);
  --ui-badge-radius: 16px;
  --ui-badge-padding-inline: 12px;
  --ui-badge-padding-block: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: var(--ui-badge-padding-block) var(--ui-badge-padding-inline);
  border: none;
  border-radius: var(--ui-badge-radius);
  background: var(--ui-badge-bg);
  color: var(--ui-badge-color);
  font-family: var(--font-family-base);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-caption-weight);
  white-space: nowrap;
}

.ui-badge--medium {
  --ui-badge-radius: 16px;
  --ui-badge-padding-inline: 12px;
  --ui-badge-padding-block: 4px;
  min-height: 24px;
}

.ui-badge--small {
  --ui-badge-bg: var(--ultra-light-gray);
  --ui-badge-color: var(--gray);
  --ui-badge-radius: 4px;
  --ui-badge-padding-inline: 4px;
  --ui-badge-padding-block: 0;
  min-height: 16px;
}

.ui-tag {
  --ui-tag-bg: var(--ultra-light-gray);
  --ui-tag-border: var(--light-gray);
  --ui-tag-color: var(--black);
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--ui-tag-border);
  border-radius: 999px;
  background: var(--ui-tag-bg);
  color: var(--ui-tag-color);
  font-family: var(--font-family-base);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-body-m-strong-weight);
  white-space: nowrap;
}

.ui-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-family-base);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: var(--type-caption-weight);
  cursor: pointer;
}

.ui-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ui-toggle span {
  position: relative;
  z-index: 1;
}

.ui-toggle:hover {
  background: var(--ultra-light-gray);
}

.ui-toggle:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, white);
}

.ui-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--light-gray) 60%, white);
  padding: 20px;
}

.ui-surface {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
}

.ui-modal-card {
  width: min(760px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
}

.ui-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ui-table-wrap {
  border: 1px solid var(--light-gray);
  border-radius: 14px;
  overflow: auto;
  background: var(--white);
}

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

.ui-table th,
.ui-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--light-gray);
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  color: var(--black);
}

.ui-table th {
  background: color-mix(in srgb, var(--ultra-light-gray) 70%, white);
  font-size: var(--type-table-head-size);
  line-height: var(--type-table-head-line);
  font-weight: var(--type-table-head-weight);
  color: var(--dark-gray);
}

.ui-table tr:last-child td {
  border-bottom: none;
}


.slot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.slot-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  background: var(--white);
  color: var(--black);
  box-sizing: border-box;
  font-family: var(--font-family-base);
  font-size: var(--type-body-m-size);
  line-height: var(--type-body-m-line);
  font-weight: var(--type-body-m-weight);
  text-align: center;
  white-space: nowrap;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.slot-pill:hover,
.slot-pill.slot-pill--hover {
  border-color: var(--accent);
}

.slot-pill.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, white);
}

.slot-pill--lg {
  min-height: 56px;
  padding: 0 20px;
  font-size: var(--type-body-l-size);
  line-height: var(--type-body-l-line);
}
