:root {
  --bg: #090b10;
  --bg-soft: #0f1219;
  --panel: #141821;
  --panel-soft: #191e29;
  --border: #262c39;
  --border-soft: #202632;
  --text: #f5f7fa;
  --text-soft: #a8afbd;
  --text-muted: #707888;
  --accent: #e9a620;
  --accent-bright: #ffc246;
  --accent-soft: rgba(233, 166, 32, 0.12);
  --danger: #ff6464;
  --success: #4bd28f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 16px;
  --radius-small: 10px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(233, 166, 32, 0.07), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

h1,
h2,
p {
  margin-top: 0;
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.portal-logo {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 194, 70, 0.36);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 194, 70, 0.19), rgba(233, 166, 32, 0.05));
  color: var(--accent-bright);
  font-size: 20px;
  font-weight: 900;
  box-shadow: inset 0 0 22px rgba(233, 166, 32, 0.08);
}

.portal-logo-large {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  font-size: 30px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(75, 210, 143, 0.7);
}

.status-dot-large {
  width: 12px;
  height: 12px;
}

/* Login */

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
}

.login-shell {
  display: grid;
  width: min(1050px, 100%);
  min-height: 620px;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 58px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(233, 166, 32, 0.16), transparent 46%),
    linear-gradient(180deg, #141821, #0e1118);
}

.login-brand-panel::after {
  position: absolute;
  right: -100px;
  bottom: -140px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(233, 166, 32, 0.13);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 50px rgba(233, 166, 32, 0.025),
    0 0 0 100px rgba(233, 166, 32, 0.018);
}

.login-brand-content {
  position: relative;
  z-index: 1;
  margin-top: auto;
  margin-bottom: auto;
}

.login-brand-content h1 {
  margin-bottom: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.portal-label {
  margin: 8px 0 28px;
  color: var(--accent);
  font-size: 25px;
  font-weight: 700;
}

.login-description {
  max-width: 420px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.75;
}

.login-brand-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 13px;
}

.login-form-panel {
  display: grid;
  place-items: center;
  padding: 58px;
  border-left: 1px solid var(--border);
  background: rgba(10, 12, 17, 0.7);
}

.login-form-wrapper {
  width: min(380px, 100%);
}

.mobile-brand {
  display: none;
}

.login-heading {
  margin-bottom: 34px;
}

.login-heading h2 {
  margin-bottom: 10px;
  font-size: 31px;
  letter-spacing: -0.035em;
}

.login-heading p {
  color: var(--text-soft);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 20px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  color: #dce1e8;
  font-size: 13px;
  font-weight: 700;
}

.form-group input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  outline: none;
  background: #0d1016;
  color: var(--text);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.form-group input::placeholder {
  color: #596171;
}

.form-group input:focus {
  border-color: rgba(233, 166, 32, 0.75);
  background: #10131a;
  box-shadow: 0 0 0 4px rgba(233, 166, 32, 0.09);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-small);
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.primary-button {
  height: 52px;
  margin-top: 3px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #18130a;
}

.primary-button:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.secondary-button {
  padding: 0 16px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
}

.secondary-button:hover {
  border-color: #3a4252;
  background: #202632;
}

.alert {
  display: grid;
  gap: 4px;
  margin-bottom: 22px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 100, 100, 0.28);
  border-radius: var(--radius-small);
  background: rgba(255, 100, 100, 0.08);
  color: #ffb2b2;
  font-size: 13px;
}

.login-security-note {
  margin: 25px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

/* Portal */

.portal-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 24px 18px;
  border-right: 1px solid var(--border-soft);
  background: rgba(11, 13, 18, 0.94);
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 8px 25px;
  border-bottom: 1px solid var(--border-soft);
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand strong {
  font-size: 15px;
  letter-spacing: 0.06em;
}

.sidebar-brand span {
  margin-top: 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-top: 22px;
}

.nav-section-title {
  margin: 17px 11px 8px;
  color: #555e6d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-section-title:first-child {
  margin-top: 0;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  transition:
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.nav-item:hover {
  border-color: var(--border-soft);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.nav-item.active {
  border-color: rgba(233, 166, 32, 0.2);
  background: var(--accent-soft);
  color: var(--accent-bright);
}

.nav-item-disabled {
  cursor: default;
  opacity: 0.64;
}

.nav-icon {
  display: grid;
  width: 22px;
  place-items: center;
  font-size: 15px;
}

.nav-badge {
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: #222733;
  color: #747d8e;
  font-size: 9px;
  text-transform: uppercase;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 17px 10px 4px;
  border-top: 1px solid var(--border-soft);
}

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}

.sidebar-footer strong {
  font-size: 12px;
}

.sidebar-footer span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.portal-content {
  min-width: 0;
}

.topbar {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 34px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(9, 11, 16, 0.74);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip strong,
.user-chip span {
  display: block;
}

.user-chip strong {
  font-size: 13px;
}

.user-chip span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
}

.user-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(233, 166, 32, 0.25);
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-weight: 900;
}

.dashboard-content {
  display: grid;
  gap: 22px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 32px 34px 50px;
}

.welcome-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(233, 166, 32, 0.1), transparent 48%),
    var(--panel);
}

.welcome-panel h2 {
  margin-bottom: 10px;
  font-size: 26px;
  letter-spacing: -0.035em;
}

.welcome-panel p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.welcome-status {
  display: flex;
  min-width: 235px;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid rgba(75, 210, 143, 0.16);
  border-radius: 12px;
  background: rgba(75, 210, 143, 0.055);
}

.welcome-status strong,
.welcome-status span {
  display: block;
}

.welcome-status strong {
  font-size: 12px;
}

.welcome-status span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card,
.content-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.stat-card {
  padding: 22px;
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.card-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-bright);
}

.card-status {
  padding: 5px 8px;
  border-radius: 999px;
  background: #222733;
  color: #7f8796;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.card-status-ready {
  background: rgba(75, 210, 143, 0.09);
  color: var(--success);
}

.stat-label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.stat-value {
  display: block;
  margin-bottom: 12px;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.stat-card p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.content-panel {
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px;
  border-bottom: 1px solid var(--border-soft);
}

.panel-heading h2 {
  margin: 0;
  font-size: 20px;
}

.module-number {
  color: #2c3340;
  font-size: 38px;
  font-weight: 900;
}

.roadmap-list {
  padding: 8px 26px 18px;
}

.roadmap-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
}

.roadmap-item:last-child {
  border-bottom: 0;
}

.roadmap-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #343b48;
}

.roadmap-item.active .roadmap-marker {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(233, 166, 32, 0.55);
}

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

.roadmap-item strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.roadmap-item div span {
  color: var(--text-muted);
  font-size: 11px;
}

.roadmap-state {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.roadmap-item.active .roadmap-state {
  color: var(--accent);
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .login-page {
    padding: 18px;
  }

  .login-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    padding: 35px 25px;
    border-left: 0;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
  }

  .portal-layout {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .sidebar-nav,
  .sidebar-footer {
    display: none;
  }

  .sidebar-brand {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .topbar {
    align-items: flex-start;
    padding: 20px;
  }

  .user-chip {
    display: none;
  }

  .dashboard-content {
    padding: 22px 20px 40px;
  }
}

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

  .topbar {
    gap: 15px;
  }

  .topbar .eyebrow {
    display: none;
  }

  .secondary-button {
    padding: 0 12px;
  }

  .welcome-panel,
  .stat-card {
    padding: 20px;
  }

  .welcome-status {
    min-width: 100%;
  }

  .roadmap-item {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .roadmap-state {
    display: none;
  }
}

/* Announcements */

.primary-link-button,
.secondary-link-button,
.small-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-small);
  font-weight: 800;
  text-decoration: none;
}

.primary-link-button {
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #18130a;
}

.primary-link-button:hover {
  background: var(--accent-bright);
}

.secondary-link-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
}

.success-message {
  padding: 14px 17px;
  border: 1px solid rgba(75, 210, 143, 0.22);
  border-radius: var(--radius-small);
  background: rgba(75, 210, 143, 0.07);
  color: #91e7bd;
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  display: grid;
  min-height: 330px;
  place-items: center;
  align-content: center;
  padding: 40px;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-size: 22px;
}

.empty-state h3 {
  margin-bottom: 8px;
}

.empty-state p {
  margin-bottom: 22px;
  color: var(--text-muted);
}

.announcement-list {
  padding: 6px 26px 16px;
}

.announcement-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-soft);
}

.announcement-row:last-child {
  border-bottom: 0;
}

.announcement-category {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  font-weight: 900;
}

.category-announcement {
  background: rgba(88, 101, 242, 0.13);
  color: #8d98ff;
}

.category-maintenance {
  background: rgba(233, 166, 32, 0.13);
  color: var(--accent-bright);
}

.category-warning {
  background: rgba(255, 100, 100, 0.12);
  color: #ff8c8c;
}

.category-completed {
  background: rgba(75, 210, 143, 0.12);
  color: #7be1ae;
}

.announcement-summary {
  min-width: 0;
}

.announcement-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.announcement-title-line h3 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-summary p {
  margin: 8px 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.announcement-meta {
  color: var(--text-muted);
  font-size: 10px;
}

.category-label {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: #242a36;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-label-announcement {
  background: rgba(88, 101, 242, 0.13);
  color: #9aa4ff;
}

.category-label-maintenance {
  background: rgba(233, 166, 32, 0.13);
  color: var(--accent-bright);
}

.category-label-warning {
  background: rgba(255, 100, 100, 0.12);
  color: #ff9696;
}

.category-label-completed {
  background: rgba(75, 210, 143, 0.12);
  color: #80e1b1;
}

.announcement-actions {
  display: flex;
  gap: 8px;
}

.small-action-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 11px;
}

.danger-button {
  border-color: rgba(255, 100, 100, 0.2);
  color: #ff9696;
}

.editor-page-content {
  max-width: 1550px;
  margin: 0 auto;
  padding: 32px 34px 50px;
}

.announcement-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 22px;
}

.editor-panel,
.preview-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.editor-fields {
  display: grid;
  gap: 22px;
  padding: 26px;
}

.editor-fields select,
.editor-fields input,
.editor-fields textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  outline: none;
  background: #0d1016;
  color: var(--text);
}

.editor-fields select,
.editor-fields input {
  min-height: 50px;
  padding: 0 15px;
}

.editor-fields textarea {
  min-height: 330px;
  padding: 15px;
  resize: vertical;
  line-height: 1.65;
}

.editor-fields select:focus,
.editor-fields input:focus,
.editor-fields textarea:focus {
  border-color: rgba(233, 166, 32, 0.7);
  box-shadow: 0 0 0 4px rgba(233, 166, 32, 0.08);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-label-row span,
.field-help {
  color: var(--text-muted);
  font-size: 11px;
}

.field-help {
  margin: 0;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 26px;
  border-top: 1px solid var(--border-soft);
}

.editor-save-button {
  width: auto;
  padding: 0 20px;
}

.preview-panel {
  align-self: start;
}

.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px;
  border-bottom: 1px solid var(--border-soft);
}

.preview-heading h2 {
  margin: 0;
  font-size: 20px;
}

.discord-preview {
  display: flex;
  min-height: 500px;
  gap: 14px;
  padding: 30px 24px;
  background: #313338;
}

.discord-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #18191c;
  color: var(--accent-bright);
  font-weight: 900;
}

.discord-message {
  min-width: 0;
  flex: 1;
}

.discord-author {
  margin-bottom: 6px;
  color: #f2f3f5;
  font-size: 14px;
  font-weight: 700;
}

.discord-bot-label {
  margin-left: 5px;
  padding: 2px 4px;
  border-radius: 3px;
  background: #5865f2;
  color: white;
  font-size: 9px;
}

.discord-time {
  margin-left: 5px;
  color: #949ba4;
  font-size: 10px;
  font-weight: 400;
}

.discord-embed {
  max-width: 520px;
  padding: 16px;
  border-left: 4px solid #5865f2;
  border-radius: 4px;
  background: #2b2d31;
  color: #dbdee1;
}

.discord-embed-maintenance {
  border-left-color: var(--accent);
}

.discord-embed-warning {
  border-left-color: #ed4245;
}

.discord-embed-completed {
  border-left-color: #3ba55d;
}

.discord-embed h3 {
  margin-bottom: 10px;
  color: #f2f3f5;
  font-size: 16px;
}

.preview-message {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
}

.preview-message pre {
  overflow: auto;
  padding: 10px;
  border-radius: 4px;
  background: #1e1f22;
}

.preview-message code {
  padding: 2px 4px;
  border-radius: 3px;
  background: #1e1f22;
}

.preview-list-item {
  display: block;
}

.preview-heading-large {
  font-size: 17px;
}

.preview-heading-medium {
  font-size: 15px;
}

.preview-heading-small {
  font-size: 14px;
}

.discord-footer {
  margin-top: 15px;
  color: #949ba4;
  font-size: 10px;
}

@media (max-width: 1050px) {
  .announcement-editor {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .announcement-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .announcement-actions {
    grid-column: 2;
    flex-wrap: wrap;
  }

  .editor-page-content {
    padding: 22px 20px 40px;
  }
}

/* Announcement Editor – Feinschliff */

.editor-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 170px);
}

.editor-fields {
  overflow-y: auto;
  flex: 1;
}

.editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--panel);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.18);
}

.preview-panel {
  position: sticky;
  top: 24px;
}

.discord-preview {
  min-height: 360px;
  height: auto;
}

.editor-fields textarea {
  min-height: 300px;
  max-height: 520px;
}

@media (max-width: 1050px) {
  .editor-panel {
    max-height: none;
  }

  .editor-fields {
    overflow: visible;
  }

  .preview-panel {
    position: static;
  }
}

/* Discord Webhooks */

.settings-form-panel {
  overflow: hidden;
  max-width: 850px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.webhook-list {
  padding: 6px 26px 16px;
}

.webhook-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-soft);
}

.webhook-row:last-child {
  border-bottom: 0;
}

.webhook-status {
  display: flex;
  justify-content: center;
}

.status-dot.inactive {
  background: #626978;
  box-shadow: none;
}

.webhook-details {
  min-width: 0;
}

.webhook-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.webhook-title-row h3 {
  margin: 0;
  font-size: 14px;
}

.webhook-active,
.webhook-inactive {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.webhook-active {
  background: rgba(75, 210, 143, 0.12);
  color: #80e1b1;
}

.webhook-inactive {
  background: rgba(148, 155, 164, 0.12);
  color: #9ca3af;
}

.webhook-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 11px;
}

.webhook-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.webhook-tags span {
  padding: 4px 8px;
  border: 1px solid rgba(233, 166, 32, 0.18);
  border-radius: 999px;
  background: rgba(233, 166, 32, 0.07);
  color: var(--accent-bright);
  font-size: 9px;
  font-weight: 800;
}

.webhook-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.optional-label {
  margin-left: 5px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .webhook-row {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .webhook-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* Settings module */

.settings-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.settings-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 150px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.settings-card:not(.disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(233, 166, 32, 0.38);
  background: var(--panel-hover, var(--panel));
}

.settings-card.disabled {
  opacity: 0.58;
  cursor: default;
}

.settings-card-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(233, 166, 32, 0.2);
  border-radius: 14px;
  background: rgba(233, 166, 32, 0.08);
  color: var(--accent-bright);
  font-size: 20px;
}

.settings-card h2 {
  margin: 4px 0 7px;
  font-size: 16px;
}

.settings-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.settings-card-arrow {
  color: var(--accent-bright);
  font-size: 22px;
}

@media (max-width: 720px) {
  .settings-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .settings-card-arrow,
  .settings-card > .nav-badge {
    grid-column: 2;
    justify-self: start;
  }
}


/* Dashboard V2 */

.topbar-user {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-user > div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.topbar-user span {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topbar-user strong {
  font-size: 13px;
}

.dashboard-section {
  margin-top: 28px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

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

.dashboard-module-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  min-height: 150px;
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.dashboard-module-card:not(.disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(233, 166, 32, 0.4);
  background: var(--panel-hover, var(--panel));
}

.dashboard-module-card.disabled {
  opacity: 0.52;
  cursor: default;
}

.dashboard-module-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(233, 166, 32, 0.22);
  border-radius: 15px;
  background: rgba(233, 166, 32, 0.08);
  color: var(--accent-bright);
  font-size: 21px;
}

.dashboard-module-body h3 {
  margin: 5px 0 8px;
  font-size: 16px;
}

.dashboard-module-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.dashboard-module-arrow {
  color: var(--accent-bright);
  font-size: 22px;
}

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

.status-card {
  display: flex;
  flex-direction: column;
  min-height: 112px;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.status-card-label {
  margin-bottom: 11px;
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-card strong {
  margin-bottom: 7px;
  font-size: 15px;
}

.status-card-detail {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 11px;
}

.button-small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 11px;
}

@media (max-width: 1050px) {
  .status-card-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .dashboard-module-grid {
    grid-template-columns: 1fr;
  }

  .topbar-user > div {
    display: none;
  }
}

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

  .dashboard-module-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .dashboard-module-arrow,
  .dashboard-module-card > .nav-badge {
    grid-column: 2;
    justify-self: start;
  }
}


/* Language switcher */

.language-switcher {
  position: fixed;
  top: 17px;
  right: 22px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    color-mix(
      in srgb,
      var(--panel) 92%,
      transparent
    );
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.language-option {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.language-option:hover,
.language-option.active {
  color: var(--accent-bright);
}

.language-option.active {
  pointer-events: none;
}

@media (max-width: 720px) {
  .language-switcher {
    top: 12px;
    right: 12px;
  }
}

/* Position correction for language switcher */
.language-switcher {
  top: 22px;
  right: 205px;
}


/* Sidebar language dropdown */

.language-switcher {
  display: none !important;
}

.sidebar-language {
  margin: 4px 18px 22px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-language label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-language-icon {
  font-size: 13px;
}

.sidebar-language-select {
  width: 100%;
  min-height: 38px;
  padding: 0 32px 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background-color: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

.sidebar-language-select:hover {
  border-color: rgba(233, 166, 32, 0.45);
}

.sidebar-language-select:focus {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(233, 166, 32, 0.12);
}


/* Compact language selector in topbar */

.sidebar-language {
  display: none !important;
}

.topbar-language {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel);
}

.topbar-language-icon {
  font-size: 13px;
  line-height: 1;
}

.topbar-language-select {
  min-width: 82px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.topbar-language-select option {
  background: var(--panel);
  color: var(--text);
}

.topbar-language:hover {
  border-color: rgba(233, 166, 32, 0.45);
}

.topbar-language:focus-within {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(233, 166, 32, 0.12);
}

@media (max-width: 720px) {
  .topbar-language-icon {
    display: none;
  }

  .topbar-language {
    padding: 0 6px;
  }

  .topbar-language-select {
    min-width: 68px;
  }
}


/* Header actions and user menu */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-language {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.topbar-language:hover,
.topbar-language:focus-within {
  border-color: rgba(233, 166, 32, 0.48);
  background: var(--panel-hover, var(--panel));
}

.topbar-language-select {
  min-width: 82px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.topbar-language-select option {
  background: var(--panel);
  color: var(--text);
}

.user-menu {
  position: relative;
}

.user-menu summary {
  list-style: none;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 4px 10px 4px 5px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.user-menu-trigger:hover,
.user-menu[open] .user-menu-trigger {
  border-color: var(--border);
  background: var(--panel);
}

.user-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(233, 166, 32, 0.35);
  border-radius: 50%;
  background: rgba(233, 166, 32, 0.1);
  color: var(--accent-bright);
  font-size: 12px;
  font-weight: 800;
}

.user-menu-name {
  max-width: 140px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-chevron {
  color: var(--text-muted);
  font-size: 13px;
  transition: transform 150ms ease;
}

.user-menu[open] .user-menu-chevron {
  transform: rotate(180deg);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 1200;
  width: 210px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

.user-menu-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 10px 11px;
}

.user-menu-header span {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.user-menu-header strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-divider {
  height: 1px;
  margin: 3px 0 6px;
  background: var(--border);
}

.user-menu-item {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.045);
}

.user-menu-logout {
  color: var(--text-muted);
}

.user-menu-logout:hover {
  color: var(--text);
}

.sidebar-language,
.language-switcher,
.topbar-user {
  display: none !important;
}

@media (max-width: 720px) {
  .user-menu-name {
    display: none;
  }

  .topbar-language-select {
    min-width: 70px;
  }

  .user-menu-dropdown {
    right: 0;
  }
}


/* Language dropdown */

.language-menu {
  position: relative;
}

.language-menu summary {
  list-style: none;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu-trigger {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
}

.language-menu-trigger:hover,
.language-menu[open] .language-menu-trigger {
  border-color: rgba(233, 166, 32, 0.48);
}

.language-menu-chevron {
  color: var(--text-muted);
  transition: transform 150ms ease;
}

.language-menu[open] .language-menu-chevron {
  transform: rotate(180deg);
}

.language-menu-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 1200;
  width: 150px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

.language-menu-item {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  text-decoration: none;
}

.language-menu-item:hover {
  background: rgba(255, 255, 255, 0.045);
}

.language-menu-item.active {
  color: var(--accent-bright);
}

/* Einheitliches Branding der gemeinsamen Sidebar */

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand .brand-icon {
  display: flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(240, 174, 20, 0.45);
  border-radius: 12px;
  background: rgba(240, 174, 20, 0.11);
  color: var(--accent-bright, #f0ae14);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.sidebar-brand .brand-name {
  color: var(--text, #f4f4f5);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.sidebar-brand .brand-subtitle {
  margin-top: 4px;
  color: var(--accent-bright, #f0ae14);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}


/* =========================================================
   Einstellungsbereiche
   ========================================================= */

.settings-section {
  margin-top: 34px;
}

.settings-section:first-of-type {
  margin-top: 0;
}

.settings-section .section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.settings-section .section-heading h2 {
  margin: 5px 0 0;
  color: var(--text, #f4f4f5);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.25;
}

.settings-section .section-heading p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--text-muted, #a1a1aa);
  font-size: 14px;
  line-height: 1.6;
}

.settings-section + .settings-section {
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

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

.settings-card {
  position: relative;
  display: flex;
  min-height: 160px;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface, rgba(255, 255, 255, 0.025));
  color: inherit;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

a.settings-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 174, 20, 0.42);
  background: rgba(240, 174, 20, 0.045);
}

.settings-card.disabled {
  cursor: default;
  opacity: 0.62;
}

.settings-card-icon {
  display: flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(240, 174, 20, 0.28);
  border-radius: 12px;
  background: rgba(240, 174, 20, 0.08);
  color: var(--accent-bright, #f0ae14);
  font-size: 17px;
  font-weight: 800;
}

.settings-card h2 {
  margin: 5px 0 7px;
  color: var(--text, #f4f4f5);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.3;
}

.settings-card p {
  margin: 0;
  color: var(--text-muted, #a1a1aa);
  font-size: 13px;
  line-height: 1.55;
}

.settings-card-arrow,
.settings-card .nav-badge {
  margin-left: auto;
  flex: 0 0 auto;
}

.settings-card-arrow {
  color: var(--accent-bright, #f0ae14);
  font-size: 19px;
  line-height: 1;
}

@media (max-width: 1100px) {
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .settings-section {
    margin-top: 26px;
  }

  .settings-section + .settings-section {
    padding-top: 24px;
  }

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

  .settings-card {
    min-height: 0;
  }
}


/* =========================================================
   Gemeinsame Sidebar-Navigation
   ========================================================= */

.nav-section {
  margin-top: 26px;
}

.nav-section:first-child {
  margin-top: 0;
}

.nav-section-title {
  margin: 0 12px 9px;
  color: var(--text-muted, #71717a);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-item.disabled {
  cursor: default;
  opacity: 0.48;
  pointer-events: none;
}

.nav-subitems {
  position: relative;
  margin: 3px 0 3px 22px;
  padding: 3px 0 3px 17px;
  border-left: 1px solid var(--border);
}

.nav-subitem {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--text-muted, #a1a1aa);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  transition:
    color 150ms ease,
    background 150ms ease;
}

.nav-subitem:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text, #f4f4f5);
}

.nav-subitem.active {
  background: rgba(240, 174, 20, 0.085);
  color: var(--accent-bright, #f0ae14);
}

.nav-subitem-marker {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 900px) {
  .nav-subitems {
    margin-left: 8px;
    padding-left: 10px;
  }
}


/* =========================================================
   Gemeinsamer Topbar-Aktionsbereich
   ========================================================= */

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar-right {
    flex-wrap: wrap;
  }
}


/* =========================================================
   Discord integration
   ========================================================= */

.discord-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.discord-stat-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  background: var(--panel-background, rgba(255, 255, 255, 0.035));
}

.discord-stat-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.discord-stat-card strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.webhook-channel::before {
  content: '';
}

.webhook-url-hint {
  word-break: break-all;
}

.panel-description {
  max-width: 720px;
  margin: 8px 0 0;
  opacity: 0.72;
}

.input-prefix-wrapper,
.password-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix-wrapper input {
  width: 100%;
  padding-left: 38px;
}

.input-prefix {
  position: absolute;
  left: 15px;
  z-index: 1;
  font-weight: 700;
  opacity: 0.55;
  pointer-events: none;
}

.password-field-wrapper input {
  width: 100%;
  padding-right: 112px;
}

.password-toggle-button {
  position: absolute;
  right: 8px;
  min-width: 88px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.password-toggle-button:hover,
.password-toggle-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.webhook-actions form {
  margin: 0;
}

@media (max-width: 1000px) {
  .discord-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .discord-stat-grid {
    grid-template-columns: 1fr;
  }

  .password-field-wrapper {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .password-field-wrapper input {
    padding-right: 14px;
  }

  .password-toggle-button {
    position: static;
    align-self: flex-end;
  }
}


/* =========================================================
   Server detail
   ========================================================= */

.server-title-link {
  color: inherit;
  text-decoration: none;
}

.server-title-link:hover {
  color: var(--accent-bright);
}

.server-detail-page {
  display: grid;
  gap: 20px;
}

.server-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 26px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #151920;
}

.server-detail-identity,
.server-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.server-detail-identity h2 {
  margin: 4px 0;
  font-size: 22px;
}

.server-detail-identity p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
}

.server-detail-error {
  margin: 0;
}

.server-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 20px;
}

.server-detail-main,
.server-detail-sidebar {
  display: grid;
  gap: 20px;
}

.server-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 24px 24px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--border-soft);
}

.server-detail-metrics article {
  min-width: 0;
  padding: 18px;
  background: #12161d;
}

.server-detail-metrics span,
.server-detail-metrics strong {
  display: block;
}

.server-detail-metrics span,
.server-map-facts span {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.server-detail-metrics strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-map-image-link {
  display: block;
  margin: 0 24px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #0d1015;
}

.server-map-image {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.server-map-placeholder {
  display: grid;
  min-height: 260px;
  margin: 0 24px;
  place-items: center;
  border: 1px dashed var(--border-soft);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 11px;
}

.server-map-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 20px 24px 24px;
}

.server-map-facts > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #12161d;
}

.server-map-facts strong {
  display: block;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-info-list {
  display: grid;
  margin: 0;
  padding: 0 22px 20px;
}

.server-info-list > div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}

.server-info-list > div:last-child {
  border-bottom: 0;
}

.server-info-list dt {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.server-info-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-size: 10px;
  text-align: right;
}

@media (max-width: 1050px) {
  .server-detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .server-detail-hero,
  .server-detail-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-detail-metrics,
  .server-map-facts,
  .server-detail-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .server-detail-metrics,
  .server-map-facts,
  .server-detail-sidebar {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   Announcement delivery targets
   ========================================================= */

.announcement-target-group {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.announcement-target-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

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

.announcement-target-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.announcement-target-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.announcement-target-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.announcement-target-check {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: transparent;
  font-size: 0.8rem;
  font-weight: 800;
}

.announcement-target-card input:checked +
.announcement-target-check {
  border-color: rgba(94, 234, 212, 0.7);
  background: rgba(94, 234, 212, 0.16);
  color: inherit;
}

.announcement-target-card:has(input:checked) {
  border-color: rgba(94, 234, 212, 0.38);
  background: rgba(94, 234, 212, 0.055);
}

.announcement-target-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.announcement-target-content strong {
  line-height: 1.25;
}

.announcement-target-meta {
  font-size: 0.86rem;
  opacity: 0.66;
}

.announcement-target-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.announcement-target-tags span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.72rem;
  font-weight: 700;
}

.announcement-target-empty {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.announcement-target-empty span {
  opacity: 0.72;
}

.announcement-editor-footer {
  gap: 16px;
}

.announcement-submit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.secondary-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.secondary-action-button:hover {
  background: rgba(255, 255, 255, 0.075);
}

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

.announcement-send-warning {
  border-color: rgba(245, 158, 11, 0.4);
}

@media (max-width: 700px) {
  .announcement-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .announcement-submit-actions {
    justify-content: stretch;
    flex-direction: column;
  }

  .announcement-submit-actions button,
  .announcement-editor-footer > a {
    width: 100%;
  }
}


/* =========================================================
   Shared page header and breadcrumb navigation
   ========================================================= */

.page-header {
  align-items: flex-start;
  gap: 24px;
}

.page-header-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.page-header .topbar-heading {
  min-width: 0;
}

.page-header-description {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--text-muted, #9ca3af);
  font-size: 0.95rem;
  line-height: 1.55;
}

.breadcrumbs {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}

.breadcrumb-item:not(:last-child)::after {
  display: inline-block;
  margin: 0 9px;
  color: rgba(255, 255, 255, 0.28);
  content: "›";
}

.breadcrumb-link,
.breadcrumb-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.breadcrumb-link {
  color: rgba(255, 255, 255, 0.55);
  transition:
    color 160ms ease,
    opacity 160ms ease;
}

.breadcrumb-link:hover,
.breadcrumb-link:focus-visible {
  color: var(--accent, #f5b800);
}

.breadcrumb-current {
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumb-home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
}

@media (max-width: 760px) {
  .page-header {
    flex-direction: column;
  }

  .page-header .topbar-right {
    width: 100%;
  }

  .breadcrumb-item {
    font-size: 0.76rem;
  }

  .breadcrumb-item:not(:last-child)::after {
    margin: 0 6px;
  }
}


/* =========================================================
   Server Management
   ========================================================= */

.server-list {
  padding: 6px 26px 16px;
}

.server-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 21px 0;
  border-bottom: 1px solid var(--border-soft);
}

.server-row:last-child {
  border-bottom: 0;
}

.server-status {
  display: flex;
  justify-content: center;
}

.server-details {
  min-width: 0;
}

.server-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.server-title-row h3 {
  margin: 0;
  font-size: 15px;
}

.server-game-badge {
  padding: 4px 8px;
  border: 1px solid rgba(233, 166, 32, 0.18);
  border-radius: 999px;
  background: rgba(233, 166, 32, 0.07);
  color: var(--accent-bright);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.server-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11px;
}

.server-meta strong {
  color: var(--text-soft);
}

.server-manager-meta {
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 10px;
}

.server-manager-meta code {
  padding: 3px 6px;
  border-radius: 5px;
  background: #0d1016;
  color: var(--text-soft);
}

.server-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.server-form-panel {
  max-width: 980px;
}

.server-form-sections {
  display: grid;
}

.server-form-section {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 28px;
  padding: 30px;
  border-bottom: 1px solid var(--border-soft);
}

.server-form-section:last-child {
  border-bottom: 0;
}

.server-form-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.server-form-section-heading > span {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(233, 166, 32, 0.2);
  border-radius: 10px;
  background: rgba(233, 166, 32, 0.07);
  color: var(--accent-bright);
  font-size: 10px;
  font-weight: 900;
}

.server-form-section-heading h3 {
  margin: 1px 0 6px;
  font-size: 15px;
}

.server-form-section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.55;
}

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

@media (max-width: 900px) {
  .server-row {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .server-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .server-form-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .server-form-grid {
    grid-template-columns: 1fr;
  }

  .server-form-section {
    padding: 24px 20px;
  }
}


/* =========================================================
   RCON password field
   ========================================================= */

.password-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: stretch;
}

.password-input-row > input { min-width: 0; }
.password-input-row .password-toggle-button {
  position: static;
  right: auto;
  width: auto;
  margin: 0;
  white-space: nowrap;
}
.password-input-row .password-toggle-button[hidden] { display: none; }
.password-toggle-button:disabled { opacity: .45; cursor: not-allowed; }
.password-saved-state { color: #69d6a0; }
.rcon-password-save { width: auto; margin-top: 10px; }


/* =========================================================
   Cached server live status
   ========================================================= */

.server-panel-heading {
  align-items: center;
}

.server-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
}

.server-status-card {
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #151920;
}

.server-status-card-header,
.server-status-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.server-status-card-header {
  border-bottom: 1px solid var(--border-soft);
}

.server-status-card-header h3 {
  margin: 0;
  font-size: 15px;
}

.server-status-card-header p {
  margin: 7px 0 0 24px;
  color: var(--text-muted);
  font-size: 11px;
}

.live-state-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #75808f;
  box-shadow: 0 0 0 4px rgba(117, 128, 143, 0.12);
}

.state-online .live-state-dot {
  background: #42c77a;
  box-shadow: 0 0 0 4px rgba(66, 199, 122, 0.12);
}

.state-offline .live-state-dot,
.state-error .live-state-dot {
  background: #db5a5a;
  box-shadow: 0 0 0 4px rgba(219, 90, 90, 0.12);
}

.live-state-label {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(117, 128, 143, 0.12);
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.state-online .live-state-label {
  background: rgba(66, 199, 122, 0.12);
  color: #75dda1;
}

.state-offline .live-state-label,
.state-error .live-state-label {
  background: rgba(219, 90, 90, 0.12);
  color: #ef9292;
}

.server-live-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 20px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: var(--border-soft);
}

.server-live-metrics > div {
  min-width: 0;
  padding: 12px;
  background: #12161d;
}

.server-live-metrics span,
.server-live-metrics strong {
  display: block;
}

.server-live-metrics span {
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.server-live-metrics strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-map-info {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 10px;
}

.server-map-info strong {
  color: var(--text-soft);
}

.server-status-error,
.server-status-warning,
.status-security-note {
  margin: 18px 20px;
  padding: 12px 14px;
  border: 1px solid rgba(219, 90, 90, 0.24);
  border-radius: 8px;
  background: rgba(219, 90, 90, 0.08);
  color: #efb0b0;
  font-size: 11px;
  line-height: 1.5;
}

.server-status-error strong,
.server-status-error span {
  display: block;
}

.server-status-error.neutral,
.status-security-note {
  border-color: var(--border-soft);
  background: #12161d;
  color: var(--text-muted);
}

.server-status-warning {
  border-color: rgba(233, 166, 32, 0.22);
  background: rgba(233, 166, 32, 0.07);
  color: var(--accent-bright);
}

.status-security-note {
  margin: 0;
}

.status-security-note code {
  color: var(--accent-bright);
}

.server-status-card-footer {
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 9px;
}

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

@media (max-width: 620px) {
  .server-status-grid {
    padding: 16px;
  }

  .server-status-card-header,
  .server-status-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

.password-toggle-button {
  min-width: 92px;
  padding: 0 15px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #141820;
  color: var(--text-soft);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.password-toggle-button:hover {
  border-color: rgba(233, 166, 32, 0.35);
  color: var(--accent-bright);
}

@media (max-width: 520px) {
  .password-input-row {
    grid-template-columns: 1fr;
  }

  .password-toggle-button {
    min-height: 42px;
  }
}
/* Server actions */
.server-action-confirm { max-width: 760px; }
.server-action-form { padding: 26px 30px 30px; }
.server-action-warning {
  display: grid;
  gap: 7px;
  margin-bottom: 24px;
  padding: 17px;
  border: 1px solid rgba(239, 83, 90, 0.35);
  border-radius: 10px;
  background: rgba(239, 83, 90, 0.08);
}
.server-action-warning span,
.server-control-actions p,
.server-control-actions small { color: var(--text-muted); line-height: 1.55; }
.server-action-submit { min-height: 42px; padding: 0 18px; }
.server-control-actions { display: grid; gap: 10px; padding: 18px 20px 22px; }
.server-control-actions .small-action-button,
.server-control-actions .primary-link-button { justify-content: center; text-align: center; }
.server-action-job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--panel-bg);
}
.server-action-job h3,
.server-action-job p { margin: 4px 0 0; }
.server-action-job pre {
  grid-column: 1 / -1;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 13px;
  border-radius: 8px;
  background: #0b0e13;
  color: var(--text-soft);
  white-space: pre-wrap;
}
.server-action-job.state-failed { border-color: rgba(239, 83, 90, 0.35); }
/* Server console */
.server-console-page { display: grid; gap: 18px; }
.server-console-heading { align-items: end; }
.server-console-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.server-console-tools label { font-size: 10px; color: var(--text-muted); }
.server-console-tools input { min-width: 210px; }
.server-console-output {
  min-height: 520px;
  max-height: 68vh;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: #080b10;
  color: #d8e1ef;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.console-line {
  display: block;
  min-height: 1.55em;
  color: #d8e1ef;
}
.console-timestamp { color: #657084; }
.console-line-success { color: #42d983; }
.console-line-warning { color: #f5b942; }
.console-line-error,
.console-line-danger { color: #ff6b72; }
.console-line-player { color: #58a6ff; }
.console-line-disconnect { color: #8b96a9; }
.console-line-chat { color: #c792ea; }
.console-line-event { color: #52d3de; }
.server-console-footer { display: flex; justify-content: space-between; gap: 14px; padding: 11px 18px; color: var(--text-muted); font-size: 10px; }
.server-console-footer label { display: flex; align-items: center; gap: 7px; }
.server-console-footer input { width: auto; }
.server-console-commandbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 18px 16px;
  border-top: 1px solid var(--border-soft);
  background: #0b0e13;
}
.server-console-commandbar label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.server-console-commandbar > span {
  color: var(--accent-bright);
  font: 800 15px ui-monospace, SFMono-Regular, Consolas, monospace;
}
.server-console-commandbar input {
  border-color: #252b36;
  background: #080b10;
  color: #f4f7fb;
  caret-color: var(--accent-bright);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.server-console-commandbar input::placeholder {
  color: #687386;
  opacity: 1;
}
.server-console-commandbar .primary-button { width: auto; margin: 0; }
.server-command-history { padding: 0 26px 16px; }
.server-command-history article { padding: 17px 0; border-bottom: 1px solid var(--border-soft); }
.server-command-history article:last-child { border-bottom: 0; }
.server-command-history article > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.server-command-history small { display: block; margin-top: 7px; color: var(--text-muted); }
.server-command-history pre { max-height: 160px; overflow: auto; padding: 11px; border-radius: 7px; background: #0b0e13; color: var(--text-soft); white-space: pre-wrap; }
@media (max-width: 760px) {
  .server-console-tools { align-items: stretch; }
  .server-console-tools input { width: 100%; min-width: 0; }
  .server-console-commandbar { grid-template-columns: auto minmax(0, 1fr); }
  .server-console-commandbar .primary-button { grid-column: 1 / -1; width: 100%; }
}
/* Split chat and console */
.server-live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.live-stream-panel { min-width: 0; overflow: hidden; }
.stream-heading { align-items: end; }
.stream-heading input { width: min(220px, 45%); }
.stream-count { display: inline-grid; min-width: 24px; height: 20px; padding: 0 6px; place-items: center; border-radius: 999px; background: rgba(245,168,0,.12); color: var(--accent-bright); font-size: 10px; vertical-align: middle; }
.server-chat-output,
.server-console-output { height: 54vh; min-height: 460px; max-height: 680px; overflow: auto; }
.server-chat-output { padding: 14px 16px; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: #080b10; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.chat-line { display: grid; grid-template-columns: 66px 68px minmax(70px, auto) auto minmax(0, 1fr); gap: 7px; align-items: baseline; }
.chat-time { color: #657084; }
.chat-channel { color: #53d6df; font-weight: 800; }
.chat-channel-team .chat-channel { color: #42d983; }
.chat-channel-server .chat-channel { color: #f5b942; }
.chat-user { overflow: hidden; color: #58a6ff; text-overflow: ellipsis; white-space: nowrap; }
.chat-message { min-width: 0; color: #e8edf5; overflow-wrap: anywhere; }
.chat-empty { padding: 20px; color: var(--text-muted); text-align: center; }
.stream-footer { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; color: var(--text-muted); font-size: 10px; }
.stream-footer label { display: flex; align-items: center; gap: 6px; }
.stream-footer input { width: auto; }
.chat-commandbar > span { font-family: inherit; }
.console-global-tools { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 1100px) {
  .server-live-grid { grid-template-columns: 1fr; }
  .server-chat-output,
  .server-console-output { height: 480px; min-height: 380px; }
}
@media (max-width: 620px) {
  .stream-heading { align-items: stretch; }
  .stream-heading input { width: 100%; }
  .chat-line { grid-template-columns: 60px 62px minmax(0, 1fr); }
  .chat-line > :nth-child(4), .chat-message { grid-column: 3; }
}
.player-toolbar { padding: 24px 26px; }
.player-toolbar form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 9px; }
.player-toolbar .primary-button { width: auto; margin: 0; }
.player-toolbar p { margin: 12px 0 0; font-size: 11px; }
.player-table-wrap { overflow-x: auto; padding: 0 26px 24px; }
.player-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.player-table th, .player-table td { padding: 14px 12px; border-bottom: 1px solid var(--border-soft); text-align: left; white-space: nowrap; }
.player-table th { color: var(--text-muted); font-size: 9px; text-transform: uppercase; }
.player-table td strong, .player-table td small { display: block; }
.player-table td small { margin-top: 4px; color: var(--text-muted); }
.player-table a { color: var(--accent-bright); }
@media (max-width: 620px) { .player-toolbar form > div { grid-template-columns: 1fr; } }
.server-section-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.server-section-nav a { padding: 10px 14px; border: 1px solid var(--border-soft); border-radius: 8px; color: var(--text-soft); font-size: 11px; font-weight: 800; text-decoration: none; }
.server-section-nav a:hover, .server-section-nav a.active { border-color: rgba(233,166,32,.35); background: rgba(233,166,32,.08); color: var(--accent-bright); }
.player-panel-heading { align-items: center; }
.player-action-menu { position: relative; }
.player-action-menu summary { cursor: pointer; list-style: none; padding: 8px 11px; border: 1px solid var(--border-soft); border-radius: 7px; font-weight: 800; }
.player-action-menu summary::-webkit-details-marker { display: none; }
.player-action-dropdown { position: fixed; z-index: 1000; width: 230px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 7px; border: 1px solid var(--border-soft); border-radius: 9px; background: #11151d; box-shadow: 0 18px 45px rgba(0,0,0,.45); }
.player-action-dropdown strong { display: block; padding: 9px 10px; color: var(--accent-bright); }
.player-action-dropdown a, .player-action-dropdown button { display: block; width: 100%; margin: 0; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-soft); font: inherit; font-size: 11px; text-align: left; text-decoration: none; cursor: pointer; }
.player-action-dropdown a:hover, .player-action-dropdown button:hover { background: rgba(255,255,255,.05); color: #fff; }
.player-action-dropdown .danger-link { color: #ff777d; }
.player-action-menu[open] summary { border-color: rgba(233,166,32,.45); background: rgba(233,166,32,.1); color: var(--accent-bright); }
.player-action-dropdown .action-steam { color: #66a9ff; }
.player-action-dropdown .action-copy { color: #b9c2d0; }
.player-action-dropdown .action-warning { color: #f5b942; }
.player-action-dropdown .action-success { color: #48d597; }
.player-action-dropdown .danger-link:hover { background: rgba(255,80,88,.1); color: #ff9297; }
.player-list-panel { overflow: visible; position: relative; z-index: 1; }
.player-list-panel:has(.player-action-menu[open]) { z-index: 1500; }
.player-list-panel .player-table-wrap { overflow: visible; }
@media (max-width: 800px) {
  .player-list-panel .player-table-wrap { overflow-x: auto; }
  .player-action-dropdown { width: 220px; }
}
.player-action-dropdown hr { border: 0; border-top: 1px solid var(--border-soft); }
.moderation-form { max-width: 760px; }
.moderation-confirm { margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--border-soft); }
.moderation-results { padding: 0 26px 18px; }
.moderation-results article { padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.moderation-results article > div { display: flex; justify-content: space-between; gap: 12px; }
.moderation-results small, .moderation-results p { color: var(--text-muted); }
/* Persistent players and manual bulk actions */
.player-bulk-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid var(--border-soft); border-radius: 10px; background: #111620; }
.player-bulk-bar select { width: auto; min-width: 220px; }
.player-bulk-bar .primary-button { width: auto; margin: 0; }
.player-bulk-bar small { color: var(--text-muted); }
.player-table th button { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; }
.player-table td small { display: block; margin-top: 4px; }
.player-table td a { color: #75a7ff; }
.player-page-actions { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.player-banned-row { background: rgba(255, 80, 88, .055); }
.player-banned-row td strong,
.player-banned-row td strong em { color: #ff777d; }
.player-banned-row td strong em { font-weight: 600; }
.offline-search, .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 26px; }
.offline-search input { flex: 1 1 280px; }
.pagination { justify-content: center; }
.player-profile-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 1px; padding: 1px; background: var(--border-soft); }
.player-profile-grid > div { padding: 16px; background: var(--panel); }
.player-profile-grid dt { color: var(--text-muted); font-size: 10px; text-transform: uppercase; }
.player-profile-grid dd { margin: 7px 0 0; }
/* Public and internal ban lists */
.public-bans-page { margin:0; min-height:100vh; background:#090c11; color:#f5f7fb; font-family:Inter,system-ui,sans-serif; }
.public-bans-header,.public-bans-main,.public-bans-footer { width:min(1180px,calc(100% - 32px)); margin:auto; }
.public-bans-header { display:flex; align-items:center; gap:28px; padding:42px 0 28px; border-bottom:1px solid #252b36; }
.public-brand { display:flex; align-items:center; gap:10px; color:#fff; text-decoration:none; }
.public-brand span { display:grid; place-items:center; width:42px; height:42px; border:1px solid #c98b00; border-radius:10px; background:#2b2108; color:#ffba18; font-weight:900; }
.public-bans-header h1 { margin:0 0 6px; }.public-bans-header p { margin:0;color:#929baa; }
.public-ban-search { display:flex; gap:10px; margin:28px 0; }.public-ban-search input { flex:1; }.public-ban-search button { width:auto;margin:0;background:#f2a900; }
.public-ban-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:16px; }
.public-ban-card { padding:22px; border:1px solid #252d39; border-radius:14px; background:#141922; }.public-ban-card h2{margin:14px 0 5px}.public-ban-card>a{color:#78a9ff}.public-ban-status{display:flex;gap:8px}.public-ban-status span{padding:5px 8px;border-radius:999px;background:#242b37;font-size:10px;font-weight:900}.public-ban-status .ban-active{background:#481d24;color:#ff8990}.public-ban-status .ban-expired{background:#18352b;color:#70e3ad}.public-ban-card dl{display:grid;gap:12px;margin:22px 0 0}.public-ban-card dl div{padding-top:10px;border-top:1px solid #252d39}.public-ban-card dt{color:#7f8a9d;font-size:10px;text-transform:uppercase}.public-ban-card dd{margin:5px 0 0}.public-bans-footer{padding:38px 0;color:#778195;text-align:center}
.ban-admin-list>article{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,360px);gap:20px;padding:22px 26px;border-top:1px solid var(--border-soft)}.ban-admin-list small{display:block;margin-top:7px;color:var(--text-muted)}.ban-admin-list form button{width:auto;margin-top:8px}.ban-admin-list form input{margin-top:6px}
@media(max-width:760px){.public-bans-header{align-items:flex-start;flex-direction:column}.ban-admin-list>article{grid-template-columns:1fr}}

/* Compact public ban list */
.public-bans-heading{min-width:0;flex:1}.public-language-switch{display:flex;gap:6px;margin-left:auto}.public-language-switch a{padding:8px 11px;border:1px solid #2a3240;border-radius:8px;color:#9ba6b8;text-decoration:none;font-size:12px;font-weight:800}.public-language-switch a.active{border-color:#aa7600;background:#332708;color:#ffc13b}.public-ban-appeal{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:26px 0 0;padding:17px 20px;border:1px solid rgba(242,169,0,.28);border-radius:11px;background:rgba(242,169,0,.065)}.public-ban-appeal strong{font-size:15px}.public-ban-appeal p{margin:5px 0 0;color:#aab3c1;font-size:13px}.public-ban-appeal a{flex:0 0 auto;padding:10px 14px;border-radius:8px;background:#f2a900;color:#11151c;text-decoration:none;font-size:12px;font-weight:900}.public-ban-count{margin:-12px 0 12px;color:#8994a5;font-size:12px}.public-ban-table-wrap{overflow:hidden;border:1px solid #252d39;border-radius:12px;background:#121720}.public-ban-table{width:100%;border-collapse:collapse;font-size:12px}.public-ban-table th{padding:12px 14px;border-bottom:1px solid #303846;background:#171d27;color:#8c98ac;text-align:left;text-transform:uppercase;font-size:9px;letter-spacing:.06em}.public-ban-table td{padding:13px 14px;border-bottom:1px solid #252d39;vertical-align:top}.public-ban-table tbody tr:last-child td{border-bottom:0}.public-ban-table tbody tr:hover{background:rgba(255,255,255,.018)}.public-ban-table td strong,.public-ban-table td a,.public-ban-table td small{display:block}.public-ban-table td a{margin-top:4px;color:#78a9ff;text-decoration:none}.public-ban-table td small{margin-top:6px;color:#929caf}.public-ban-table code{white-space:nowrap;color:#cbd4e2}.public-ban-active,.public-ban-inactive,.public-ban-scope{display:inline-block;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:900;text-transform:uppercase}.public-ban-active{background:#481d24;color:#ff8990}.public-ban-inactive{background:#18352b;color:#70e3ad}.public-ban-scope{background:#242b37;color:#d7deea}.public-ban-reason{min-width:180px;max-width:310px;line-height:1.45}.public-ban-empty{padding:45px;text-align:center;color:#8f99aa}
@media(max-width:900px){.public-ban-table th:nth-child(6),.public-ban-table td:nth-child(6),.public-ban-table th:nth-child(7),.public-ban-table td:nth-child(7){display:none}}
@media(max-width:680px){.public-bans-header{gap:16px}.public-language-switch{position:absolute;right:16px;top:20px}.public-ban-appeal{align-items:flex-start;flex-direction:column}.public-ban-table th:nth-child(1),.public-ban-table td:nth-child(1),.public-ban-table th:nth-child(4),.public-ban-table td:nth-child(4){display:none}.public-ban-table th,.public-ban-table td{padding:11px 9px}.public-ban-reason{min-width:0}.public-ban-search{gap:7px}.public-ban-search button{padding-inline:13px}}

/* Public ban sorting, scope colors and pagination */
.public-ban-table th>a{color:inherit;text-decoration:none}.public-ban-table th>a:hover{color:#ffc13b}.public-ban-scope-local{border:1px solid #265283;background:#142d4a;color:#78b7ff}.public-ban-scope-global{border:1px solid #854326;background:#4b2415;color:#ffad72}.public-ban-pagination{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:20px 0}.public-ban-pagination a{justify-self:start;padding:9px 13px;border:1px solid #2b3442;border-radius:8px;color:#dce4f1;text-decoration:none;font-size:12px;font-weight:800}.public-ban-pagination a:last-child{justify-self:end}.public-ban-pagination strong{color:#929daf;font-size:12px}
@media(max-width:900px){.public-ban-table th:nth-child(7),.public-ban-table td:nth-child(7),.public-ban-table th:nth-child(8),.public-ban-table td:nth-child(8){display:none}}
@media(max-width:680px){.public-ban-table th:nth-child(1),.public-ban-table td:nth-child(1),.public-ban-table th:nth-child(5),.public-ban-table td:nth-child(5){display:none}.public-ban-table th:nth-child(4),.public-ban-table td:nth-child(4){display:table-cell}}
/* Ban reliability */
.steam-safety-card{margin-bottom:22px;padding:22px}.steam-safety-card>div{display:flex;gap:18px;align-items:center}.steam-safety-card img{width:72px;height:72px;border-radius:10px}.steam-safety-card h2,.steam-safety-card p{margin:4px 0}.steam-safety-card small{color:var(--text-muted)}
.inline-form { display: inline-flex; margin-left: 8px; }
.ban-reliability-panel { margin-top: 22px; }
.ban-status-table > div, .ban-history-list > div { display:grid; grid-template-columns:minmax(150px,1fr) 100px 110px minmax(180px,2fr); gap:12px; padding:14px 24px; border-top:1px solid var(--border-soft); align-items:center; }
.ban-history-list > div { grid-template-columns:minmax(180px,1fr) minmax(120px,1fr) 180px; }
.ban-status-table small { overflow-wrap:anywhere; color:var(--text-muted); }
@media(max-width:720px){.ban-status-table > div,.ban-history-list > div{grid-template-columns:1fr;}}
/* Ban completion: compact filters, reliability and detail views */
.ban-filter-grid { display:grid; grid-template-columns:minmax(220px,2fr) repeat(5,minmax(120px,1fr)) auto; gap:10px; padding:0 24px 24px; }
.panel-actions,.ban-row-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.repeat-offender { display:inline-flex; margin-left:8px; padding:3px 8px; border-radius:999px; background:rgba(239,68,68,.14); color:#ff7b82; font-size:10px; font-weight:800; }
.ban-remaining { display:block; margin-top:8px; color:var(--accent-bright); }
.ban-sync-report { overflow:hidden; }
.public-ban-detail-card { max-width:920px; margin:32px auto; }
.inactive-ban-details { max-width:980px; }
@media (max-width:1100px) { .ban-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .ban-filter-grid { grid-template-columns:1fr; padding:0 16px 20px; } }
