.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.45rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid #e5484d;
  border-radius: 5px;
  background: #e5484d;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.wrapper.dashboard {
  max-width: 1280px;
}

.dashboard-header .theme-toggle,
.dashboard-header .lang-toggle {
  position: static;
  top: auto;
  right: auto;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-heading);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.brand strong {
  color: var(--accent);
  font-weight: 700;
}

.brand:hover {
  color: var(--text-heading);
  text-decoration: none;
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.guild-selector {
  position: relative;
}

.guild-selector-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-modifier);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-normal);
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  max-width: 220px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.guild-selector-button:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-heading);
}

.guild-selector-button img,
.guild-selector-button .guild-fallback {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.guild-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1;
}

.guild-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  opacity: 0.6;
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.guild-selector-button[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.guild-selector-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 260px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.4rem;
  list-style: none;
  margin: 0;
  z-index: 50;
  animation: dash-fade 0.12s ease;
}

.guild-selector-list[hidden] {
  display: none;
}

.guild-selector-list li {
  margin: 0;
}

.guild-selector-list a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  color: var(--text-normal);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.guild-selector-list a:hover,
.guild-selector-list a[aria-current="page"] {
  background: var(--bg-modifier);
  color: var(--text-heading);
  text-decoration: none;
}

.guild-selector-list a[aria-current="page"] {
  box-shadow: inset 2px 0 0 var(--accent);
}

.guild-selector-list img,
.guild-selector-list .guild-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.guild-selector-list span:not(.guild-fallback) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes dash-fade {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-menu {
  position: relative;
}

.user-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-modifier);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  color: var(--text-normal);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.user-menu-button:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-heading);
}

.user-menu-button img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--accent);
}

.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  z-index: 50;
  animation: dash-fade 0.12s ease;
}

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

.user-menu-id {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-panel form {
  margin: 0;
}

.user-menu-panel button,
.user-menu-panel a {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text-normal);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-menu-panel button:hover,
.user-menu-panel a:hover {
  background: var(--bg-modifier);
  color: var(--text-heading);
  text-decoration: none;
}

.user-menu-panel button.danger {
  color: var(--danger);
}

.user-menu-panel button.danger:hover {
  background: rgba(237, 66, 69, 0.12);
  color: var(--danger);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.dashboard-sidebar {
  position: sticky;
  top: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 0.75rem;
  box-shadow: var(--shadow);
}

.dashboard-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-group {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0.9rem 0.5rem 0.25rem;
}

.sidebar-group:first-child {
  margin-top: 0;
}

.sidebar-link {
  display: block;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar-link:hover {
  background: var(--bg-modifier);
  color: var(--text-heading);
  text-decoration: none;
}

.sidebar-link[aria-current="page"],
.sidebar-link.active {
  background: var(--bg-modifier);
  color: var(--text-heading);
  border-left-color: var(--accent);
}

.dashboard-main {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  min-height: 400px;
}

.guild-hero {
  position: relative;
  background: var(--bg-modifier);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.guild-hero-banner {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-tertiary);
  position: relative;
}

.guild-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, var(--bg-modifier));
}

.guild-hero-content {
  padding: 0 1.5rem 1.5rem;
  position: relative;
  margin-top: -40px;
}

.guild-hero-info {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
}

.guild-hero-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 4px solid var(--bg-modifier);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.guild-hero-icon.guild-fallback {
  font-size: 2rem;
  width: 80px;
  height: 80px;
}

.guild-hero h1 {
  font-size: 1.5rem;
  color: var(--text-heading);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.guild-hero .meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.guild-hero .guild-id {
  background: var(--bg-tertiary);
  font-size: 0.75rem;
}

.guild-id {
  display: inline-block;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
}

.guild-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.status-online  { background: var(--success); }
.status-offline { background: var(--danger); }
.status-unknown { background: var(--warning); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.card.interactive {
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.card.interactive:hover {
  border-color: var(--accent);
  background: var(--bg-modifier);
  transform: translateY(-2px);
  text-decoration: none;
}

.card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.card-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  margin-top: auto;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.success {
  background: rgba(87, 242, 135, 0.15);
  color: var(--success);
}

.badge.danger {
  background: rgba(237, 66, 69, 0.15);
  color: var(--danger);
}

.state-empty,
.state-loading,
.state-error {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg-modifier);
}

.state-loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.5rem;
  vertical-align: -2px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dash-spin 0.7s linear infinite;
}

@keyframes dash-spin {
  to { transform: rotate(360deg); }
}

.state-error {
  border-style: solid;
  border-color: var(--danger);
  color: var(--danger);
}

.back-button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.back-button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.notice.error {
  border-left-color: var(--danger);
}

.notice.warning {
  border-left-color: var(--warning);
}

.notice.success {
  border-left-color: var(--success);
}

.dash-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 2.5rem;
}

.dash-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
}

.dash-field .hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

.dash-field input[type="text"],
.dash-field input[type="url"],
.dash-field input[type="number"],
.dash-field select,
.dash-field textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-normal);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
  transition: border-color 0.15s ease;
}

.dash-field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.dash-field input:focus,
.dash-field select:focus,
.dash-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.dash-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.dash-actions .spacer {
  flex: 1;
}

.save-state {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.save-state.saving { color: var(--warning); }
.save-state.saved  { color: var(--success); }
.save-state.error  { color: var(--danger); }

@media (max-width: 900px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dashboard-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 600px) {
  .dashboard-header {
    padding: 0.75rem 1rem;
  }

  .guild-selector-button .guild-name {
    display: none;
  }

  .guild-selector-button {
    max-width: 60px;
    padding: 0.35rem;
  }

  .user-menu-button span {
    display: none;
  }

  .user-menu-button {
    padding: 0.25rem;
  }

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

  .guild-hero-icon,
  .guild-hero-icon.guild-fallback {
    width: 64px;
    height: 64px;
  }

  .guild-hero h1 {
    font-size: 1.25rem;
  }
}

.servers-page {
  box-sizing: border-box;
  max-width: 1080px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.servers-page h1 {
  font-size: 1.5rem;
  color: var(--text-heading);
  margin-bottom: 0.35rem;
  overflow-wrap: anywhere;
}

.servers-page > .meta {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.servers-page h2 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 1.75rem 0 0.85rem;
}

.servers-page h2:first-of-type {
  margin-top: 1.5rem;
}

.server-grid {
  box-sizing: border-box;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.server-grid li {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  margin: 0;
}

.server-tile {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: var(--bg-modifier);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-normal);
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease;
}

.server-tile:not(.is-disabled):hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
}

.server-tile.is-disabled {
  opacity: 0.6;
}

.server-banner {
  position: relative;
  width: 100%;
  height: 96px;
  background: linear-gradient(135deg, #2b2d31, #1e1f22);
}

.server-banner > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}

.server-banner.no-banner {
  background: linear-gradient(135deg, #3f4147, #2b2d31);
}

.server-tile.is-disabled .server-banner.no-banner {
  background: linear-gradient(135deg, #35373c, #26282c);
}

.server-tile-icon {
  position: absolute;
  left: 14px;
  bottom: -28px;
  box-sizing: border-box;
  width: 68px;
  height: 68px;
  padding: 4px;
  border-radius: 50%;
  background: var(--bg-modifier);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.server-tile-icon img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.server-tile-icon .guild-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 1.5rem;
}

.server-tile-body {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 88px;
  padding: 2rem 0.85rem 0.85rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.6rem;
}

.server-tile-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  gap: 0.2rem;
}

.server-tile-name {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.95rem;
}

.server-tile-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.presence-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.presence-dot.is-online {
  background: var(--success);
}

.server-tile-action {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.server-tile:not(.is-disabled):hover .server-tile-action {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.server-tile-action.is-invite {
  background: var(--bg-tertiary);
  color: var(--text-normal);
  border-color: var(--border);
}

.server-tile-action.is-invite:hover {
  background: var(--bg-hover);
  color: var(--text-heading);
  border-color: var(--accent);
}

.servers-others {
  min-width: 0;
  max-width: 100%;
  margin-top: 2rem;
}

.servers-others summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem 0;
  list-style: none;
  user-select: none;
}

.servers-others summary::-webkit-details-marker {
  display: none;
}

.servers-others-count {
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.7;
}

.servers-others-chevron {
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.servers-others:not([open]) .servers-others-chevron {
  transform: rotate(-90deg);
}

.servers-others[open] .server-grid {
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .servers-page {
    padding: 1.25rem 1rem;
  }

  .servers-page h1 {
    font-size: 1.35rem;
  }

  .server-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
  }

  .server-grid li {
    width: 100%;
    min-width: 0;
  }

  .server-tile {
    width: 100%;
    max-width: 100%;
  }

  .server-banner {
    height: 80px;
  }

  .server-tile-icon {
    width: 56px;
    height: 56px;
    bottom: -18px;
  }

  .server-tile-body {
    gap: 0.5rem;
    padding: 1.6rem 0.75rem 0.75rem;
    min-height: 76px;
  }

  .server-tile-name {
    font-size: 0.9rem;
  }

  .server-tile-meta {
    font-size: 0.72rem;
  }

  .server-tile-action {
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 360px) {
  .server-tile-body {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .server-tile-main {
    flex-basis: 100%;
  }

  .server-tile-action {
    align-self: flex-start;
  }
}

.dash-checkbox label {
  color: var(--text-heading);
}

.dash-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.role-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.role-name {
  font-size: 0.85rem;
  color: var(--text-normal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-checkbox label.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-heading);
  user-select: none;
}

.toggle-switch input[type="checkbox"] {
  display: none;
}

.toggle-switch .slider {
  position: relative;
  width: 40px;
  height: 24px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.toggle-switch .slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.toggle-switch input:checked + .slider {
  background-color: var(--success);
  border-color: var(--success);
}

.toggle-switch input:checked + .slider::before {
  transform: translateX(16px);
  background-color: #fff;
}

.btn-save {
  padding: 0.6rem 1.5rem !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius) !important;
}

.roles-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 48px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  margin-bottom: 0.75rem;
}

.roles-selected:empty {
  display: none;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-modifier);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  color: var(--text-normal);
}

.role-chip .role-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.role-chip-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.2rem;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}

.role-chip-remove:hover {
  color: var(--danger);
}

.role-add-select {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-normal);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.role-add-select:focus {
  outline: none;
  border-color: var(--accent);
}

.landing-main {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 3rem 1rem;
}

.landing-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4rem;
}

.landing-logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.landing-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.landing-hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.landing-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-large {
  padding: 0.8rem 1.75rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
}

.btn-login-header {
  padding: 0.4rem 1.25rem !important;
  border-radius: 99px !important;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.landing-features .feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: left;
  box-shadow: var(--shadow);
}

.landing-features .feature-card h3 {
  font-size: 1.1rem;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.landing-features .feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dash-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

main h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 2rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 1.5rem;
}

main h2:first-child,
.dash-form h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.twitter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.twitter-card {
  background: var(--bg-modifier);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.twitter-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0;
}

.twitter-card-header strong {
  font-size: 1.05rem;
  color: var(--text-heading);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-icon:hover {
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.1);
}

.btn-icon.danger:hover {
  color: var(--danger);
  background: rgba(237, 66, 69, 0.1);
}

.twitter-edit-details summary {
  font-size: 0.8rem;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  margin-bottom: 0.5rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pagination .back-button.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.twitter-card-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.dash-dialog {
  margin: auto;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: var(--text-normal);
  max-width: 400px;
  width: 100%;
}

.dash-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.dialog-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-heading);
}

.twitter-card-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.twitter-card-info strong {
  font-size: 1.05rem;
  color: var(--text-heading);
  line-height: 1.2;
}

.twitter-card-channel {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
}

.suggest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.suggest-card {
  background: var(--bg-modifier);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.suggest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.suggest-id {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.suggest-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.status-pending { background: rgba(181, 186, 193, 0.15); color: var(--text-muted); }
.status-reviewing { background: rgba(0, 168, 252, 0.15); color: #00a8fc; }
.status-approved { background: rgba(87, 242, 135, 0.15); color: var(--success); }
.status-rejected { background: rgba(237, 66, 69, 0.15); color: var(--danger); }
.status-implemented { background: rgba(88, 101, 242, 0.15); color: var(--accent); }
.status-closed { background: rgba(250, 166, 26, 0.15); color: var(--warning); }

.suggest-body {
  flex: 1;
  margin-bottom: 1rem;
}

.suggest-body p {
  color: var(--text-normal);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.suggest-image-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}

.suggest-image-link:hover {
  text-decoration: underline;
}

.suggest-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.suggest-votes {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.vote-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.vote-stat svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.vote-stat:hover svg {
  opacity: 1;
}

.vote-stat:first-child:hover {
  color: var(--success);
}

.vote-stat:last-child:hover {
  color: var(--danger);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  background: var(--bg-modifier);
  color: var(--text-heading);
  text-decoration: none;
  transform: translateX(4px);
}

.sidebar-link[aria-current="page"],
.sidebar-link.active {
  background: var(--bg-modifier);
  color: var(--text-heading);
  border-left-color: var(--accent);
}

.sidebar-link svg.icon-ui {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.15s ease, stroke 0.15s ease;
}

.sidebar-link:hover svg.icon-ui,
.sidebar-link[aria-current="page"] svg.icon-ui {
  opacity: 1;
  stroke: var(--accent);
}

.sidebar-link svg.icon-brand {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.15s ease, fill 0.15s ease;
}

.sidebar-link:hover svg.icon-brand,
.sidebar-link[aria-current="page"] svg.icon-brand {
  opacity: 1;
  fill: var(--accent);
}

.status-main {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 3rem 1rem;
}

.status-header {
  text-align: center;
  margin-bottom: 3rem;
}

.status-header h1 {
  font-size: 2rem;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.status-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.status-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-name {
  font-weight: 600;
  color: var(--text-heading);
  font-size: 1.05rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.operational {
  background: rgba(87, 242, 135, 0.15);
  color: var(--success);
}

.status-badge.down {
  background: rgba(237, 66, 69, 0.15);
  color: var(--danger);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-card-body {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.sys-metric {
  background: var(--bg-modifier);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sys-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sys-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
  font-family: ui-monospace, "Cascadia Code", monospace;
}

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

.holy-hosting-credit {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.holy-hosting-credit a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.holy-hosting-credit a:hover {
  text-decoration: underline;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.5rem;
  position: relative;
}

.timeline-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  background: var(--bg-modifier);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease;
}

.timeline-item:hover {
  border-color: var(--accent);
}

.timeline-avatar {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex: 0 0 100px;
  width: 100px;
  min-width: 100px;
  height: auto;
  padding: 0.5rem;
  position: relative;
  z-index: 1;
  background: var(--bg-tertiary);
  border-right: 1px solid var(--border);
}

.timeline-avatar img,
.timeline-avatar .guild-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 64px;
  border: none;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  background: transparent;
  border: none;
  border-radius: 0;
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.timeline-header strong {
  color: var(--text-heading);
  font-size: 0.9rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.timeline-date {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

.timeline-action {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-normal);
  overflow-wrap: anywhere;
}

.timeline-details {
  display: inline-block;
  align-self: flex-start;
  max-width: 100%;
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.timeline-item-last {
  margin-bottom: 0;
}

#logs-filters {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
}

#logs-filters label {
  color: var(--text-heading);
  font-size: 0.85rem;
  font-weight: 600;
}

#logs-filters select {
  min-width: 200px;
  max-width: 100%;
  padding: 0.6rem 0.9rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-normal);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

#logs-filters select:focus {
  outline: none;
  border-color: var(--accent);
}

#logs-filters select option {
  background: var(--bg-secondary);
  color: var(--text-normal);
}

@media (max-width: 600px) {
  .timeline {
    gap: 0.75rem;
  }

  .timeline-avatar {
    flex-basis: 76px;
    width: 76px;
    min-width: 76px;
    padding: 0.4rem;
  }

  .timeline-avatar img,
  .timeline-avatar .guild-fallback {
    min-height: 56px;
  }

  .timeline-content {
    padding: 0.7rem;
  }

  .timeline-header {
    flex-direction: column;
    gap: 0.2rem;
  }

  .timeline-date {
    text-align: left;
  }

  #logs-filters {
    align-items: stretch;
    flex-direction: column;
  }

  #logs-filters select {
    width: 100%;
    min-width: 0;
  }
}

.case-filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 1rem 0 1.25rem;
}

.case-filters input[type="text"],
.case-filters select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-normal);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
  transition: border-color 0.15s ease;
}

.case-filters input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
}

.case-filters input:focus,
.case-filters select:focus {
  outline: none;
  border-color: var(--accent);
}

.case-table-wrap {
  overflow-x: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.case-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.case-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.case-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

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

.case-id {
  font-weight: 700;
  color: var(--text-heading);
  white-space: nowrap;
}

.case-code {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.case-reason {
  max-width: 320px;
  overflow-wrap: anywhere;
}

.case-date {
  white-space: nowrap;
  color: var(--text-muted);
}

.case-muted {
  color: var(--text-muted);
  font-style: italic;
}

.case-duration {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.case-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.case-type-ban { 
  background: rgba(237, 66, 69, 0.15); 
  color: var(--danger); 
}

.case-type-unban { 
  background: rgba(87, 242, 135, 0.15); 
  color: var(--success); 
}

.case-type-kick { 
  background: rgba(250, 166, 26, 0.15); 
  color: var(--warning); 
}

.case-type-timeout { 
  background: rgba(0, 168, 252, 0.15); 
  color: #00a8fc; 
}

.case-type-untimeout { 
  background: rgba(88, 101, 242, 0.15); 
  color: var(--accent); 
}

.landing-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
}

.landing-intro h2 {
  text-align: center;
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
  margin-bottom: 1rem;
}

.landing-intro p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: center;
}

.landing-features .feature-card {
  text-align: center;
}

.landing-cta {
  text-align: center;
  max-width: 760px;
  margin: 5rem auto 1rem;
  padding: 2rem 1.5rem;
}

.landing-cta h2 {
  text-align: center;
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
  margin-bottom: 1rem;
}

.landing-cta p {
  max-width: 640px;
  margin: 0 auto 1.75rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: center;
}

.landing-cta .landing-actions {
  justify-content: center;
}

@media (max-width: 600px) {
  .landing-intro {
    margin-bottom: 2rem;
  }

  .landing-cta {
    margin-top: 3.5rem;
    padding: 1.5rem 1rem;
  }

  .landing-features {
    gap: 1rem;
  }
}

.guild-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  min-width: 0;
  width: 100%;
}

.guild-card {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.guild-card > * {
  min-width: 0;
}

.guild-card h3,
.guild-card p,
.guild-card span {
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .guild-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 12px;
  }

  .guild-card {
    width: 100%;
    min-width: 0;
    padding: 14px;
    gap: 12px;
  }

  .guild-card .guild-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }

  .guild-card img {
    max-width: 100%;
  }
}