* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.participants-page {
  min-height: 100vh;
  font-family: "Montserrat", sans-serif;
  color: #f8fafc;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top center, rgba(66, 95, 149, 0.2), transparent 26%),
    linear-gradient(180deg, #0f111c 0%, #11131e 48%, #0d0f18 100%);
}

.participants-shell {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.participants-header {
  margin-bottom: 24px;
}

.participants-header__shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 28px;
  background: rgba(22, 24, 37, 0.88);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.participants-brand {
  display: inline-flex;
  align-items: center;
}

.participants-brand__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(44, 48, 73, 0.96), rgba(25, 27, 42, 0.96));
}

.participants-brand__logo {
  display: block;
  width: 38px;
  height: auto;
}

.participants-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.participants-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(30, 33, 50, 0.92);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.participants-theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(37, 41, 61, 0.96);
}

.participants-theme-toggle__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.participants-theme-toggle__icon-image {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition:
    filter 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.participants-theme-toggle__icon-image--light {
  opacity: 1;
  transform: scale(1);
}

.participants-theme-toggle__icon-image--dark {
  opacity: 0;
  transform: scale(0.82);
}

.participants-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(30, 33, 50, 0.92);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.participants-link__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.participants-link__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.participants-link__icon img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: filter 0.2s ease;
}

.participants-link:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(37, 41, 61, 0.96);
}

.participants-link--accent {
  background: linear-gradient(135deg, #f7d46b, #f3bf3f);
  border-color: rgba(243, 191, 63, 0.4);
  color: #141826;
}

.participants-link--accent .participants-link__icon img {
  filter: brightness(0) saturate(100%);
}

.participants-link--accent:hover {
  transform: translateY(-1px);
  border-color: rgba(243, 191, 63, 0.52);
  background: linear-gradient(135deg, #f8dd88, #f4c753);
  color: #141826;
  box-shadow: 0 10px 24px rgba(243, 191, 63, 0.18);
}

.participants-main {
  display: flex;
  justify-content: center;
}

.participants-board {
  width: min(100%, 1040px);
}

.participants-board__shell {
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 34px;
  background:
    radial-gradient(circle at top center, rgba(77, 91, 146, 0.12), transparent 34%),
    rgba(24, 22, 39, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 34px 80px rgba(0, 0, 0, 0.24);
}

.participants-board__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.participants-board__title {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.participants-board__count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 12px 0 0;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  background: rgba(21, 23, 36, 0.72);
  color: rgba(226, 232, 240, 0.84);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.participants-search {
  flex: 0 0 360px;
  display: block;
}

.participants-search__input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(17, 18, 31, 0.84);
  color: #f8fafc;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.participants-search__input::placeholder {
  color: rgba(148, 163, 184, 0.72);
}

.participants-search__input:focus {
  border-color: rgba(243, 191, 63, 0.7);
  box-shadow: 0 0 0 3px rgba(243, 191, 63, 0.15);
  background: rgba(19, 22, 36, 0.96);
}

.participants-status {
  margin: 0 0 18px;
  min-height: 24px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 14px;
  line-height: 1.6;
}

.participants-status[data-state="error"] {
  color: #fca5a5;
}

.participants-status[data-state="pending"] {
  color: #f7d46b;
}

.participants-list {
  display: grid;
  gap: 10px;
}

.participants-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 18px;
  background: rgba(22, 24, 37, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  min-width: 0;
  overflow: hidden;
}

.participants-row__position {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: transparent;
  color: rgba(226, 232, 240, 0.54);
  font-size: 12px;
  font-weight: 800;
}

.participants-row__name {
  min-width: 0;
  overflow: hidden;
}

.participants-name-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.participants-name-inline strong,
.participants-name-inline span:last-child {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.participants-verified-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #3b82f6;
}

.participants-verified-badge svg {
  display: block;
  width: 18px;
  height: 18px;
}

.participants-row__chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(243, 191, 63, 0.16);
  border-radius: 999px;
  background: rgba(243, 191, 63, 0.1);
  color: #f7d46b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.participants-sentinel {
  width: 100%;
  height: 1px;
}

.participants-empty {
  padding: 34px 20px 12px;
  color: rgba(226, 232, 240, 0.68);
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
}

.participants-modal[hidden] {
  display: none;
}

.participants-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.participants-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 15, 0.74);
  backdrop-filter: blur(8px);
}

.participants-modal__dialog {
  position: relative;
  width: min(92vw, 540px);
  margin: min(12vh, 120px) auto 0;
  padding: 28px 28px 30px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(28, 31, 49, 0.98), rgba(18, 20, 31, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.participants-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.12);
  color: #f8fafc;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.participants-modal__eyebrow {
  margin: 0;
  color: rgba(243, 191, 63, 0.88);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.participants-modal__title {
  margin: 10px 0 0;
  color: #f8fafc;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.15;
  font-weight: 800;
}

.participants-modal__contacts {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.participants-contact-card {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(17, 19, 31, 0.8);
}

.participants-contact-card__label {
  color: rgba(226, 232, 240, 0.66);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.participants-contact-card strong {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 700;
}

.participants-contact-card__meta {
  color: rgba(226, 232, 240, 0.62);
  font-size: 13px;
  line-height: 1.6;
}

.participants-page.is-light {
  color: #0f172a;
  background:
    radial-gradient(circle at top center, rgba(143, 170, 255, 0.22), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 52%, #e8eef8 100%);
}

.participants-page.is-light .participants-header__shell {
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 60px rgba(148, 163, 184, 0.16);
}

.participants-page.is-light .participants-brand__badge {
  border-color: rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 242, 251, 0.98));
}

.participants-page.is-light .participants-brand__logo {
  filter: brightness(0) saturate(100%);
}

.participants-page.is-light .participants-theme-toggle {
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
}

.participants-page.is-light .participants-theme-toggle:hover {
  background: rgba(248, 250, 252, 1);
  border-color: rgba(100, 116, 139, 0.34);
}

.participants-page.is-light .participants-theme-toggle__icon-image--light {
  filter: brightness(0) saturate(100%);
  opacity: 0;
  transform: scale(0.82);
}

.participants-page.is-light .participants-theme-toggle__icon-image--dark {
  filter: brightness(0) saturate(100%);
  opacity: 1;
  transform: scale(1);
}

.participants-page.is-light .participants-link__icon img {
  filter: brightness(0) saturate(100%);
}

.participants-page.is-light .participants-link {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
}

.participants-page.is-light .participants-link:hover {
  background: rgba(248, 250, 252, 1);
  border-color: rgba(100, 116, 139, 0.34);
}

.participants-page.is-light .participants-link--accent {
  background: linear-gradient(135deg, #f8d978, #f3bf3f);
  border-color: rgba(243, 191, 63, 0.42);
  color: #141826;
}

.participants-page.is-light .participants-board__shell {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top center, rgba(133, 159, 255, 0.1), transparent 34%),
    rgba(255, 255, 255, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 30px 70px rgba(148, 163, 184, 0.18);
}

.participants-page.is-light .participants-board__count {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(248, 250, 252, 0.92);
  color: #334155;
}

.participants-page.is-light .participants-search__input {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.96);
  color: #0f172a;
}

.participants-page.is-light .participants-search__input::placeholder {
  color: rgba(100, 116, 139, 0.78);
}

.participants-page.is-light .participants-search__input:focus {
  background: rgba(255, 255, 255, 1);
}

.participants-page.is-light .participants-status {
  color: rgba(71, 85, 105, 0.9);
}

.participants-page.is-light .participants-status[data-state="pending"] {
  color: #b45309;
}

.participants-page.is-light .participants-status[data-state="error"] {
  color: #dc2626;
}

.participants-page.is-light .participants-row {
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 24px rgba(148, 163, 184, 0.08);
}

.participants-page.is-light .participants-row__position {
  background: transparent;
  color: rgba(100, 116, 139, 0.82);
}

.participants-page.is-light .participants-name-inline strong,
.participants-page.is-light .participants-name-inline span:last-child {
  color: #0f172a;
}

.participants-page.is-light .participants-row__chip {
  border-color: rgba(243, 191, 63, 0.24);
  background: rgba(243, 191, 63, 0.12);
  color: #b45309;
}

.participants-page.is-light .participants-empty {
  color: rgba(71, 85, 105, 0.9);
}

.participants-page.is-light .participants-modal__backdrop {
  background: rgba(148, 163, 184, 0.32);
}

.participants-page.is-light .participants-modal__dialog {
  border-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 252, 0.98));
  box-shadow: 0 30px 80px rgba(148, 163, 184, 0.26);
}

.participants-page.is-light .participants-modal__close {
  background: rgba(148, 163, 184, 0.12);
  color: #0f172a;
}

.participants-page.is-light .participants-modal__title {
  color: #0f172a;
}

.participants-page.is-light .participants-contact-card {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.92);
}

.participants-page.is-light .participants-contact-card__label,
.participants-page.is-light .participants-contact-card__meta {
  color: rgba(71, 85, 105, 0.86);
}

.participants-page.is-light .participants-contact-card strong {
  color: #0f172a;
}

@media (max-width: 960px) {
  .participants-board__top {
    flex-direction: column;
    align-items: stretch;
  }

  .participants-search {
    flex-basis: auto;
  }
}

@media (max-width: 720px) {
  .participants-shell {
    padding: 18px 14px 36px;
  }

  .participants-header__shell,
  .participants-board__shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .participants-header__shell {
    border-radius: 24px;
  }

  .participants-header__actions {
    gap: 8px;
  }

  .participants-theme-toggle,
  .participants-link {
    width: 48px;
    min-width: 48px;
    padding: 0;
    border-radius: 16px;
  }

  .participants-theme-toggle {
    gap: 0;
  }

  .participants-theme-toggle span:last-child,
  .participants-link__label {
    display: none;
  }

  .participants-board__shell {
    border-radius: 28px;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .participants-row {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .participants-row__position {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .participants-row__chip {
    grid-column: auto;
    justify-self: end;
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
    margin-top: 0;
  }

  .participants-name-inline strong,
  .participants-name-inline span:last-child {
    font-size: 14px;
  }

  .participants-modal__dialog {
    width: min(94vw, 540px);
    margin-top: 72px;
    padding-left: 20px;
    padding-right: 20px;
  }
}
