:root {
  --bg: #070809;
  --sidebar: #171819;
  --panel: #111214;
  --panel-2: #15171a;
  --line: #2a2d31;
  --line-soft: #202329;
  --text: #f6f7fb;
  --muted: #858b95;
  --soft: #b5bbc6;
  --blue: #4d8dff;
  --green: #22d274;
  --purple: #b06dff;
  --orange: #ff9d1c;
  --red: #ff4444;
  --radius: 8px;
  --shadow: 0 18px 64px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 12%, rgba(77, 141, 255, 0.14), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(176, 109, 255, 0.12), transparent 24%),
    radial-gradient(circle at 58% 92%, rgba(34, 210, 116, 0.09), transparent 26%),
    linear-gradient(135deg, #070809 0%, #0d1014 46%, #0a090d 100%);
  color: var(--text);
}

h1,
h2,
.brand strong,
.banner-caption strong {
  font-family: "Unbounded", "Manrope", "Segoe UI", sans-serif;
  letter-spacing: -0.04em;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 268px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #191a1c, #111214);
  padding: 18px 16px;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #3a404a;
}

.profile-link {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  text-align: left;
}

.profile-link > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-link strong,
.profile-link small {
  display: block;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -16px 14px;
  border-bottom: 1px solid var(--line-soft);
  padding: 0 16px 18px;
}

.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  border: 1px solid #454a52;
  border-radius: 50%;
  background: #24272b;
  object-fit: cover;
}

.faction-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #46546a;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 25%, #34435c, #15181f);
  color: #dce7ff;
  font-size: 13px;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.brand p {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 800;
}

.brand-status {
  color: #5cf0a5;
}

.brand-status.frozen {
  color: #5bdcff;
}

.brand-status.warning {
  color: #ffbc55;
}

.nav {
  display: grid;
  gap: 12px;
}

.nav-group {
  display: grid;
  gap: 8px;
  border-radius: var(--radius);
  padding: 3px 0;
}

.nav-title {
  margin: 6px 0 0;
  border-radius: 6px;
  color: #6d727b;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
}

.nav-group[data-tone="green"] .nav-title {
  background: #0d2d1b;
  color: #5cf0a5;
}

.nav-group[data-tone="purple"] .nav-title {
  background: #29183a;
  color: #d2a8ff;
}

.nav-group[data-tone="orange"] .nav-title {
  background: #351f0d;
  color: #ffbc55;
}

.nav-button {
  display: grid;
  width: 100%;
  min-height: 40px;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 9px 10px;
  text-align: left;
}

.nav-button:hover,
.nav-button.active {
  border-color: #283344;
  background: #162238;
  color: var(--text);
}

.nav-button[data-tone="green"].active {
  border-color: #123e24;
  background: #0d2d1b;
  color: #b8ffd5;
}

.nav-button[data-tone="purple"].active {
  border-color: #3a2453;
  background: #29183a;
  color: #ead7ff;
}

.nav-button[data-tone="orange"].active {
  border-color: #51300f;
  background: #351f0d;
  color: #ffe0aa;
}

.nav-button[data-tone="green"]:hover {
  background: #0f2418;
}

.nav-button[data-tone="purple"]:hover {
  background: #21142f;
}

.nav-button[data-tone="orange"]:hover {
  background: #2a1a0d;
}

.nav-label {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-sub {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #747982;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

.version-card {
  border: 1px solid #383c43;
  border-radius: var(--radius);
  background: #1d1f22;
  padding: 14px;
  text-align: center;
}

.version-card strong,
.version-card span {
  display: block;
}

.version-card strong {
  font-size: 14px;
}

.version-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.main {
  min-width: 0;
  padding: 20px 26px 38px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 8px 10px;
}

.auth-card img,
.auth-card span,
.member-cell img,
.member-cell > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #24272b;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  object-fit: cover;
}

.auth-card strong {
  font-size: 13px;
}

.auth-gate {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  min-height: 100vh;
  padding: 32px;
  text-align: center;
}

.auth-gate h1,
.auth-gate p {
  margin: 0;
}

.auth-logo {
  display: block;
  width: min(220px, 62vw);
  aspect-ratio: 1;
  border: 1px solid rgba(181, 187, 198, 0.26);
  border-radius: 50%;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  object-fit: contain;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.banner {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111214;
  box-shadow: var(--shadow);
}

.banner img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.banner::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 24%, rgba(7, 8, 9, 0.82));
  pointer-events: none;
}

.banner-caption {
  position: absolute;
  right: 22px;
  bottom: 18px;
  left: 22px;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.banner-caption strong,
.banner-caption span {
  display: block;
}

.banner-caption strong {
  font-size: 24px;
}

.banner-caption span {
  color: var(--soft);
  font-size: 13px;
}

.section,
.form-panel,
.stat,
.list-item,
.rank-chart,
.description-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section {
  margin-bottom: 18px;
  padding: 22px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section h3 {
  margin: 0;
  color: #dbe7ff;
  font-size: 18px;
}

.section p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.wide,
.wide {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: #0d0e10;
  color: var(--text);
  padding: 11px 12px;
  font-size: 13px;
}

.field select,
.inline-edit-control select,
.compact-select {
  appearance: none;
  cursor: pointer;
  background-color: #0d0e10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23b5bbc6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 42px;
}

.special-list {
  display: grid;
  gap: 12px;
}

.special-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101216;
  padding: 16px;
}

.special-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.55;
  white-space: pre-wrap;
}

.special-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.special-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.special-card progress {
  width: 100%;
  accent-color: var(--purple);
}

.inline-record-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.inline-record-form .field {
  min-width: 0;
}

select option {
  background: #15171a;
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #4d8dff;
  box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.12);
}

.field select:hover,
.inline-edit-control select:hover,
.compact-select:hover {
  border-color: #4a5567;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #171a1e;
  color: var(--text);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}

.button.primary {
  border-color: #245fcf;
  background: #245fcf;
}

.button.ghost {
  background: transparent;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.content-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
}

.form-panel {
  display: grid;
  gap: 13px;
  align-content: start;
  padding: 18px;
}

.form-panel.compact {
  max-width: 680px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.classification-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.classification-strip span {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #101114;
  color: var(--soft);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
}

.organization-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.create-organization-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.8fr) minmax(140px, 0.7fr) minmax(200px, 1.4fr) max-content;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101216;
  padding: 14px;
}

.organization-card {
  display: grid;
  min-height: 220px;
  align-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #15171b, #101113);
  box-shadow: var(--shadow);
  padding: 18px;
}

.organization-card h4 {
  margin: 0;
  font-size: 16px;
}

.module-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.organization-card p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}

.organization-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.organization-meta span {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #101114;
  color: var(--muted);
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 800;
}

.stat {
  padding: 16px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.rank-chart {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.chart-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
}

.chart-row span,
.chart-row strong {
  font-size: 12px;
}

.chart-row span {
  color: var(--soft);
}

.chart-row strong {
  text-align: right;
}

.chart-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #22262d;
}

.chart-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4d8dff, #24d17e);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.info-line {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 14px;
}

.info-line span,
.info-line strong {
  display: block;
}

.info-line span {
  color: var(--muted);
  font-size: 12px;
}

.info-line strong {
  margin-top: 5px;
  font-size: 14px;
}

.description-box {
  padding: 16px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.6;
}

.description-box strong,
.description-box span {
  display: block;
}

.description-box span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.bot-control {
  display: grid;
  gap: 12px;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  gap: 14px;
  align-items: center;
  padding: 15px;
}

.list-item.read-only {
  grid-template-columns: 1fr;
}

.member-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.participant-list-item {
  grid-template-columns: minmax(0, 1fr) 38px 38px;
}

.participant-edit-item {
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: start;
}

.participant-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.participant-edit-form .row-actions {
  grid-column: 1 / -1;
}

.participant-actions {
  display: flex;
  justify-content: flex-end;
}

.list-item strong,
.list-item span {
  display: block;
}

.list-item strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.list-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.discord-member-actions {
  display: grid;
  grid-template-columns: minmax(130px, 170px) 98px;
  gap: 8px;
  align-items: center;
}

.compact-select {
  min-height: 38px;
  border: 1px solid #2f3745;
  border-radius: 7px;
  background-color: #12161c;
  color: var(--text);
  padding: 0 38px 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.discord-add-button {
  min-width: 98px;
  border-color: #23513a;
  background: #123521;
  color: #caffdd;
  white-space: nowrap;
}

.list-item p {
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #5b1e24;
  border-radius: 7px;
  background: #321114;
  color: #ff737a;
}

.empty-state {
  border: 1px dashed #353941;
  border-radius: var(--radius);
  background: #101113;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 6px;
  background: #102d1a;
  color: #5cf0a5;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.status.frozen {
  background: #1c2738;
  color: #5bdcff;
}

.status.warning {
  background: #33230f;
  color: #ffbc55;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 12px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: #4d8dff;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  border: 1px solid #264d35;
  border-radius: var(--radius);
  background: #0f2b1b;
  color: #b9ffd7;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .sidebar {
    padding: 16px 12px;
  }

  .brand {
    justify-content: center;
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand div:last-child,
  .nav-label,
  .nav-sub,
  .nav-title,
  .version-card {
    display: none;
  }

  .nav-button {
    grid-template-columns: 1fr;
    place-items: center;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .main {
    padding: 16px;
  }

  .topbar,
  .section-header {
    flex-direction: column;
  }

  .settings-grid,
  .summary-grid,
  .create-organization-form,
  .organization-grid,
  .info-grid,
  .banner-caption {
    grid-template-columns: 1fr;
  }

  .banner-caption {
    display: block;
  }

  .chart-row {
    grid-template-columns: 86px minmax(0, 1fr) 30px;
  }
}

.faction-mark.image {
  display: block;
  object-fit: cover;
  background: #24272b;
}

.organization-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.organization-card-head .module-top {
  flex: 1;
  min-width: 0;
}

.media-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.media-upload {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #151821, #101113);
  padding: 12px;
}

.media-upload strong,
.media-upload em {
  display: block;
}

.media-upload strong {
  color: var(--soft);
  font-size: 12px;
}

.media-upload em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.media-preview {
  display: grid;
  min-height: 120px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #3a4351;
  border-radius: 7px;
  background: #0d0e10;
  color: var(--muted);
  font-size: 12px;
}

.media-preview img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.help-button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-left: 8px;
  border: 1px solid #34445f;
  border-radius: 50%;
  background: #132139;
  color: #8db8ff;
  vertical-align: middle;
}

.help-button:hover {
  border-color: #4d8dff;
  color: #dbe7ff;
}

.help-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
  padding: 18px;
}

.help-dialog {
  width: min(560px, 100%);
  border: 1px solid #34445f;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #171b24, #101113);
  box-shadow: var(--shadow);
  padding: 22px;
}

.help-dialog .icon-button {
  float: right;
  width: 32px;
  height: 32px;
  border-color: #394352;
  background: #181d25;
  color: var(--soft);
}

.help-dialog h3 {
  margin: 0 42px 10px 0;
  color: #dbe7ff;
}

.help-dialog p {
  margin: 0;
  color: var(--soft);
  line-height: 1.65;
}

.list-item p {
  white-space: pre-line;
}

.button[data-bot-action="start"] {
  border-color: #177544;
  background: #14804a;
}

.button[data-bot-action="restart"] {
  border-color: #80531a;
  background: #9a5c13;
}

.button[data-bot-action="stop"] {
  border-color: #7c252b;
  background: #321114;
  color: #ff737a;
}

@media (max-width: 760px) {
  .media-upload-grid {
    grid-template-columns: 1fr;
  }

  .participant-edit-form {
    grid-template-columns: 1fr;
  }

  .list-item,
  .discord-member-actions {
    grid-template-columns: 1fr;
  }
}


.nav-button.back-link {
  border-color: #31558d;
  background: linear-gradient(90deg, #172a48, #101827);
  color: #dbe7ff;
  box-shadow: inset 3px 0 0 #4d8dff;
}

.nav-button.back-link:hover {
  border-color: #4d8dff;
  background: #1b3357;
}

.overview-core {
  background: linear-gradient(180deg, #12161d, #0f1012);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.overview-info-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #101216;
  padding: 14px;
}

.editable-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.overview-info-card span,
.discord-server-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-info-card strong,
.discord-server-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 14px;
}

.inline-value-row,
.inline-edit-control {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.inline-value {
  min-height: 38px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #3a4250;
  border-radius: 7px;
  background: #161a20;
  color: var(--text);
  padding: 0 14px;
  overflow-wrap: anywhere;
  text-align: left;
}

.inline-edit-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  background: transparent;
  color: var(--muted);
}

.inline-edit-button:hover {
  color: #dbe7ff;
}

.inline-editing {
  gap: 12px;
}

.inline-edit-control input,
.inline-edit-control select {
  min-width: 0;
  width: 100%;
  height: 38px;
}

.save-inline {
  flex: 0 0 auto;
  border-color: #23513a;
  background: #123521;
  color: #caffdd;
}

.discord-overview-card {
  display: grid;
  gap: 10px;
  border: 1px solid #2b3545;
  border-radius: var(--radius);
  background: #0d0f13;
  padding: 14px;
}

.discord-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.discord-server-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) max-content 42px;
  gap: 12px;
  align-items: center;
  border: 1px solid #222832;
  border-radius: 7px;
  background: #08090b;
  padding: 10px;
}

.discord-server-logo {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #111b31;
  color: #6f8cff;
}

.discord-server-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-server-copy strong,
.discord-server-copy span {
  display: block;
}

.discord-server-copy strong {
  color: var(--text);
  font-size: 14px;
}

.discord-server-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.copy-square {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #303844;
  border-radius: 7px;
  background: #1a1d22;
  color: var(--muted);
}

.copy-square:hover {
  border-color: #56657a;
  color: var(--text);
}

.discord-overview-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: end;
}

.compact-field {
  gap: 6px;
}

.discord-server-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #2b3545;
  border-radius: var(--radius);
  background: #0d0f13;
  padding: 12px;
}

.discord-server-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #172344;
  color: #8db8ff;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.person-card {
  display: grid;
  justify-items: center;
  min-height: 166px;
  border: 1px solid #373b43;
  border-radius: var(--radius);
  background: #121416;
  padding: 18px;
  text-align: center;
}

.person-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid #46546a;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #34435c, #161a20);
  color: #dbe7ff;
  font-weight: 900;
}

.person-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.person-card strong,
.person-card span,
.person-card p {
  display: block;
}

.person-card strong {
  font-size: 14px;
}

.person-card span {
  margin-top: 6px;
  color: var(--soft);
  font-size: 12px;
}

.person-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.people-section[data-tone="watcher"] .person-avatar {
  background: radial-gradient(circle at 35% 25%, #3b244d, #17121e);
  color: #e6d2ff;
}

.danger-section {
  border-color: #6d1c22;
  background: linear-gradient(180deg, #190608, #0f0506);
}

.danger-section h3 {
  color: #ff4444;
}

.danger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-top: 1px solid rgba(255, 68, 68, 0.22);
  padding: 16px 0;
}

.danger-row:first-of-type {
  border-top: 0;
}

.danger-row strong,
.danger-row span {
  display: block;
}

.danger-row strong {
  font-size: 13px;
}

.danger-row span {
  margin-top: 6px;
  color: #c9979b;
  font-size: 12px;
}

.button.danger {
  border-color: #92272f;
  background: #9a2029;
  color: #fff;
}

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

.discord-error {
  border: 1px solid #7c252b;
  border-radius: var(--radius);
  background: #22090c;
  color: #ff9ea4;
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .overview-grid,
  .people-grid {
    grid-template-columns: 1fr;
  }

  .discord-server-card,
  .discord-server-row,
  .discord-overview-edit-grid,
  .danger-row {
    grid-template-columns: 1fr;
  }
}
