: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;
  }
}


/* =========================================================
   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%;
  }
}
