:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f9fbff;
  --text: #111827;
  --muted: #667085;
  --line: #e5eaf2;
  --brand: #2f6fed;
  --brand-strong: #1f5fd5;
  --brand-soft: #eef5ff;
  --green: #139b66;
  --green-soft: #e9f8f1;
  --amber: #b46b00;
  --amber-soft: #fff4df;
  --red: #c33a3a;
  --shadow: 0 16px 40px rgba(25, 36, 61, 0.08);
  --control-bg: #ffffff;
  --sidebar-bg: #ffffff;
  --row-hover: #fbfdff;
  --red-soft: #fff1f1;
  --media-bg: #0f172a;
  --code-text: #e5eefc;
  --backdrop: rgba(17, 24, 39, 0.35);
  --brand-border: rgba(47, 111, 237, 0.28);
  --radius: 8px;
}


html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e131b;
  --panel: #171d27;
  --panel-soft: #1d2531;
  --text: #f1f5f9;
  --muted: #a5afbf;
  --line: #2c3645;
  --brand: #79a4ff;
  --brand-strong: #95b7ff;
  --brand-soft: #1b2d4b;
  --green: #52d6a0;
  --green-soft: #15372b;
  --amber: #f1b75d;
  --amber-soft: #3b2b14;
  --red: #ff8585;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.36);
  --control-bg: #111720;
  --sidebar-bg: #121923;
  --row-hover: #1a2330;
  --red-soft: #3b2025;
  --media-bg: #080c12;
  --code-text: #e5eefc;
  --backdrop: rgba(0, 0, 0, 0.68);
  --brand-border: rgba(121, 164, 255, 0.36);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}


.auth-boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.auth-boot-card {
  position: relative;
  width: min(360px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.auth-boot-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.auth-boot-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.auth-boot-copy strong {
  font-size: 15px;
}

.auth-boot-copy span {
  color: var(--muted);
  font-size: 13px;
}

.auth-boot-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: auth-boot-spin 0.75s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .auth-boot-spinner { animation: none; }
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(320px, 1fr);
  align-items: center;
  gap: 64px;
  padding: 48px clamp(20px, 6vw, 96px);
}

.auth-panel,
.security-window,
.panel,
.stat-card,
.sidebar-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-panel {
  padding: 32px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.eyebrow {
  margin: 24px 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

.auth-copy,
.panel-heading p,
.stat-card p,
.sidebar-card p {
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

label {
  display: grid;
  gap: 7px;
}

label span,
.top-search span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-bg);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 700;
}

.primary-btn {
  background: var(--brand);
  color: #fff;
}

.primary-btn:hover {
  background: var(--brand-strong);
}

.secondary-btn,
.ghost-btn {
  background: var(--control-bg);
  color: var(--text);
  border-color: var(--line);
}

.ghost-btn {
  color: var(--muted);
}

.bot-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--brand-soft);
}

.bot-note span {
  color: var(--brand);
  font-weight: 800;
}

.bot-note p {
  margin: 0;
  color: var(--muted);
}

.auth-preview {
  display: grid;
  place-items: center;
}

.security-window {
  width: min(100%, 520px);
  padding: 24px;
}

.window-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
}

.security-head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--panel-soft), var(--brand-soft));
}

.security-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.security-head strong {
  display: block;
  font-size: 18px;
}

.security-head p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

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

.security-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.security-item strong {
  font-size: 15px;
}

.security-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--green-soft);
  border: 1px solid rgba(19, 155, 102, 0.18);
}

.security-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(19, 155, 102, 0.12);
  flex: 0 0 auto;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
}

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

.sidebar-brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.sidebar-card {
  margin-top: 30px;
  padding: 16px;
  box-shadow: none;
}

.sidebar-card span,
.badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-card strong {
  display: block;
  margin-top: 12px;
}

.main-area {
  min-width: 0;
  padding: 28px;
}

.topbar,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.topbar {
  margin-bottom: 24px;
}

.topbar .eyebrow {
  margin-top: 0;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: end;
}

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

.top-search {
  min-width: 280px;
}

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

.stat-card {
  padding: 18px;
  box-shadow: none;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.stat-card p {
  margin: 8px 0 0;
  font-size: 13px;
}

.panel {
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: none;
}

.activity-bars {
  display: grid;
  grid-template-columns: repeat(10, minmax(22px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 130px;
  margin-top: 20px;
  padding-top: 10px;
}

.bar {
  display: grid;
  align-content: end;
  gap: 8px;
  min-width: 0;
}

.bar-fill {
  min-height: 10px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #5d8ff2 0%, var(--brand) 100%);
}

.bar-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

th button {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
  padding: 0;
}

tbody tr:hover {
  background: var(--row-hover);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.user-cell strong,
.nick-cell strong {
  display: block;
}

.user-cell span,
.log-line,
.date-cell span {
  color: var(--muted);
  font-size: 13px;
}

.log-line {
  max-width: 430px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.chip.auth {
  background: var(--green-soft);
  color: var(--green);
}

.chip.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.open-log {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-bg);
  color: var(--brand);
  padding: 8px 10px;
  font-weight: 800;
}

.empty-row {
  padding: 30px !important;
  color: var(--muted);
  text-align: center;
}

.log-dialog {
  width: min(760px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.log-dialog::backdrop {
  background: var(--backdrop);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-bg);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.dialog-inner {
  padding: 24px;
}

.dialog-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.meta-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.meta-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.meta-box strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.full-log {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--media-bg);
  color: var(--code-text);
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .sidebar-card {
    display: none;
  }

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

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


.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 240px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand);
  padding: 0 11px;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-chip:hover {
  border-color: var(--brand);
  background: var(--control-bg);
}

.member-chip.is-fallback {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.member-chip-compact {
  min-height: 30px;
  max-width: 190px;
  font-size: 12px;
}

.member-detail-button {
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
}

.member-dialog {
  width: min(620px, calc(100vw - 28px));
}

.member-dialog-inner {
  padding: 28px;
}

.member-dialog-inner h2 {
  margin: 4px 42px 8px 0;
  font-size: 26px;
  overflow-wrap: anywhere;
}

.member-source-note {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

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

.member-copy-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 16px;
}

.member-copy-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.member-copy-card strong,
.member-copy-card code {
  min-height: 38px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}

.member-copy-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 760px) {
  .auth-screen {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .auth-preview {
    display: none;
  }

  .main-area,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .panel-heading,
  .topbar-actions {
    display: grid;
    width: 100%;
  }

  .top-search {
    min-width: 0;
  }

  .sidebar-nav,
  .stats-grid,
  .filters,
  .dialog-meta {
    grid-template-columns: 1fr;
  }

  .activity-bars {
    grid-template-columns: repeat(5, minmax(22px, 1fr));
  }
}

.auth-error {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(195, 58, 58, 0.22);
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--red);
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.pagination {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.page-size {
  width: 140px;
}

.page-size select {
  height: 42px;
}

@media (max-width: 760px) {
  .pagination {
    display: grid;
    justify-content: stretch;
  }

  .page-size {
    width: 100%;
  }
}


.security-item-wide {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .security-item-wide {
    grid-column: span 1;
  }
}


.session-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.session-pill.admin {
  background: var(--brand-soft);
  color: var(--brand);
}

.admin-panel code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
}

.access-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 240px;
  gap: 12px;
  align-items: end;
  margin: 18px 0;
}

.generated-code {
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) 150px;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(19, 155, 102, 0.18);
  border-radius: var(--radius);
  background: var(--green-soft);
}

.generated-code span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.generated-code strong {
  font-size: 22px;
  letter-spacing: 0.06em;
}

.generated-code p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.access-table-wrap table {
  min-width: 980px;
}

.inline-select {
  width: 110px;
  height: 34px;
  padding: 0 8px;
}

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

.danger-btn,
.small-btn {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 10px;
  font-weight: 800;
}

.danger-btn {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(195, 58, 58, 0.22);
}

.small-btn {
  background: var(--control-bg);
  color: var(--text);
  border-color: var(--line);
}

@media (max-width: 760px) {
  .access-form,
  .generated-code {
    grid-template-columns: 1fr;
  }

  .generated-code p {
    grid-column: auto;
  }

  .session-pill {
    width: fit-content;
  }
}

/* Events archive */
.stat-date {
  font-size: 20px !important;
  line-height: 1.25;
}

.event-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px));
  gap: 12px;
  margin: 18px 0;
}

.event-table-wrap table {
  min-width: 1120px;
}

.event-name-cell strong {
  display: block;
  max-width: 280px;
}

.event-name-cell span,
.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.compact-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 150px;
}

.event-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--panel-soft);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.discord-id-code {
  display: inline-block;
  max-width: 190px;
  overflow: hidden;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
}

.event-dialog-inner {
  padding: 28px;
}

.event-dialog-title {
  padding-right: 42px;
  font-size: 25px;
}

.event-photo-link {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--media-bg);
  color: #fff;
  text-decoration: none;
}

.event-photo-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 18px;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.event-photo-status.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.event-cover {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  background: var(--media-bg);
}

.event-photo-action {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  padding: 9px 12px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.event-photo-empty,
.event-photo-fallback {
  margin: 22px 0;
  padding: 34px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  text-align: center;
}

.event-photo-fallback p {
  margin: 0 0 10px;
}

.event-photo-fallback a {
  color: var(--brand);
  font-weight: 800;
}

.event-photo-empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.event-photo-empty p {
  margin: 0 0 14px;
}

.event-photo-retry {
  display: inline-flex;
  margin: 14px auto 0;
}

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

.event-message-box {
  grid-column: span 2;
}

.copy-value {
  display: block;
  width: 100%;
  margin-top: 5px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-info-section {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

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

.event-section-heading h3 {
  margin: 0;
  font-size: 16px;
}

.event-section-heading span {
  min-width: 30px;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.id-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.id-chip {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-bg);
  color: var(--text);
  padding: 0 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.id-chip:hover,
.copy-value:hover {
  color: var(--brand);
}

.empty-inline {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .event-filters,
  .event-details-grid {
    grid-template-columns: 1fr;
  }

  .event-message-box {
    grid-column: auto;
  }

  .event-dialog-inner {
    padding: 22px 18px;
  }

  .event-cover {
    max-height: 320px;
  }

  .event-photo-action {
    position: static;
    display: block;
    border: 0;
    border-radius: 0;
    background: var(--media-bg);
  }

  .panel-heading-actions {
    display: grid;
    width: 100%;
  }

  .member-copy-grid {
    grid-template-columns: 1fr;
  }

  .member-dialog-inner {
    padding: 22px 18px;
  }
}


/* Access table Discord member presentation */
.access-user-cell {
  min-width: 260px;
}

.access-member-name {
  width: fit-content;
  max-width: 250px;
}

.access-discord-id {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-discord-id:hover {
  color: var(--brand);
  text-decoration: underline;
}

.access-created-by {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.access-created-by .member-chip {
  vertical-align: middle;
}

/* Active users */
.users-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.users-tab {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.users-tab.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.users-tab:disabled {
  opacity: 0.5;
}

.users-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 260px));
  gap: 12px;
  margin: 18px 0;
}

.users-table-wrap table {
  min-width: 1420px;
}

.user-id-button {
  min-height: 34px;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 850;
  cursor: pointer;
}

.user-id-button:hover,
.user-id-button:focus-visible {
  border-color: var(--brand);
  filter: brightness(0.98);
}

.user-name-text,
.users-discord-name {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.users-discord-name {
  max-width: 220px;
}

.users-discord-name.is-fallback {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.user-access-chip {
  min-height: 30px;
  white-space: nowrap;
  border: 1px solid var(--access-role-border, transparent);
  background: var(--access-role-background, var(--brand-soft)) !important;
  color: var(--access-role-color, var(--brand)) !important;
}

.user-access-chip-large {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.user-detail-card-access strong {
  display: block;
  margin-top: 4px;
}

/* Цвета должностей Discord */
.user-access-chip.access-role-1 {
  background: rgba(75, 173, 208, 0.16);
  color: #4badd0;
  border-color: rgba(75, 173, 208, 0.34);
}

.user-access-chip.access-role-2 {
  background: rgba(69, 78, 245, 0.13);
  color: #454ef5;
  border-color: rgba(69, 78, 245, 0.30);
}

.user-access-chip.access-role-3 {
  background: rgba(70, 184, 143, 0.15);
  color: #46b88f;
  border-color: rgba(70, 184, 143, 0.32);
}

.user-access-chip.access-role-4 {
  background: rgba(43, 29, 91, 0.12);
  color: #2b1d5b;
  border-color: rgba(43, 29, 91, 0.28);
}

.user-access-chip.access-role-5 {
  background: #bdf7ff;
  color: #244b59;
  border-color: #9cecf7;
}

.user-access-chip.access-role-6 {
  background: rgba(115, 148, 114, 0.17);
  color: #739472;
  border-color: rgba(115, 148, 114, 0.34);
}

.user-access-chip.access-role-default {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: rgba(31, 78, 255, 0.18);
}

.inactive-chip {
  min-height: 30px;
  max-width: 250px;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
}

.count-value,
.monthly-active-value {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.monthly-active-value {
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

.user-profile-dialog {
  width: min(940px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
}

.user-profile-inner {
  padding: 28px;
}

.user-profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-right: 44px;
}

.user-profile-head .eyebrow {
  margin: 0 0 7px;
}

.user-profile-head h2 {
  margin: 0 0 10px;
  font-size: 28px;
  overflow-wrap: anywhere;
}

.discord-avatar {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-soft);
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
}

.user-dialog-discord {
  width: fit-content;
  max-width: min(360px, 100%);
}

.user-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.user-detail-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.user-detail-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-detail-card > strong {
  min-height: 24px;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.user-copy-btn {
  min-height: 34px;
  margin-top: auto;
  padding: 0 10px;
  font-size: 12px;
}

.user-detail-card-wide {
  grid-column: span 3;
}

.user-detail-card.inactive-decision-approved {
  border-color: rgba(19, 155, 102, 0.28);
  background: var(--green-soft);
}

.user-detail-card.inactive-decision-approved > strong {
  color: var(--green);
}

.user-detail-card.inactive-decision-rejected {
  border-color: rgba(195, 58, 58, 0.24);
  background: var(--red-soft);
}

.user-detail-card.inactive-decision-rejected > strong {
  color: var(--red);
}

.inactive-period {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 1080px) {
  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 760px) {
  .users-tabs,
  .users-filters,
  .user-details-grid {
    grid-template-columns: 1fr;
  }

  .users-tabs {
    display: grid;
  }

  .user-profile-head {
    align-items: flex-start;
  }

  .discord-avatar {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }

  .user-detail-card-wide {
    grid-column: auto;
  }
}


/* Theme settings */
.settings-panel {
  max-width: 980px;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.theme-option {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 18px;
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 18px;
  background: var(--panel-soft);
  color: var(--text);
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.theme-option:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
}

.theme-option.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.theme-preview {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: 22px 1fr;
  width: 132px;
  height: 92px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.theme-preview::before {
  content: '';
  grid-row: 1 / 3;
  background: #dfe7f3;
}

.theme-preview::after {
  content: '';
  grid-column: 2;
  background: #edf2f8;
}

.theme-preview i {
  position: absolute;
  left: 44px;
  right: 12px;
  height: 12px;
  border-radius: 5px;
  background: #ffffff;
  border: 1px solid #dfe6ef;
}

.theme-preview i:nth-child(1) { top: 34px; }
.theme-preview i:nth-child(2) { top: 52px; right: 34px; }
.theme-preview i:nth-child(3) { top: 70px; right: 20px; }

.theme-preview-dark {
  border-color: #344050;
  background: #111720;
}

.theme-preview-dark::before { background: #121923; }
.theme-preview-dark::after { background: #1d2531; }
.theme-preview-dark i {
  border-color: #344050;
  background: #171d27;
}

.theme-option-copy {
  display: grid;
  gap: 7px;
}

.theme-option-copy strong {
  font-size: 18px;
}

.theme-option-copy small,
.settings-note {
  color: var(--muted);
  line-height: 1.5;
}

.theme-option-check {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
  font-weight: 900;
}

.theme-option.is-selected .theme-option-check {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.settings-note {
  margin: 18px 0 0;
  font-size: 13px;
}

.theme-status-dark {
  background: #202a38;
  color: #d9e5f7;
}

html[data-theme="dark"] .theme-option.is-selected {
  box-shadow: 0 0 0 3px rgba(121, 164, 255, 0.18);
}

html[data-theme="dark"] .user-access-chip.access-role-4 {
  background: #2b1d5b !important;
  color: #ffffff !important;
  border-color: #56458c !important;
}

html[data-theme="dark"] .user-access-chip.access-role-5 {
  color: #173945 !important;
}

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

  .theme-option {
    grid-template-columns: 96px minmax(0, 1fr) 28px;
  }

  .theme-preview {
    width: 96px;
  }
}

/* Users archive */
.users-table-wrap.is-archive table {
  min-width: 1180px;
}

.archive-date-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.archive-reason-cell {
  min-width: 240px;
  max-width: 420px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.archive-columns-note {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--warning-border, rgba(194, 126, 24, 0.28));
  border-radius: var(--radius);
  background: var(--warning-soft, rgba(244, 173, 58, 0.10));
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.archive-columns-note strong {
  color: var(--text);
}

/* Events tabs and catalog */
.event-tabs {
  margin-bottom: 16px;
}

.event-table-wrap.is-list table {
  min-width: 780px;
}

.event-table-wrap.is-list .event-name-cell strong {
  max-width: 520px;
}

/* Events catalog from majestic.events */
.event-table-wrap.is-list table {
  min-width: 1540px;
}

.event-table-wrap.is-list th:nth-child(1),
.event-table-wrap.is-list td:nth-child(1) {
  width: 78px;
}

.event-table-wrap.is-list th:nth-child(2),
.event-table-wrap.is-list td:nth-child(2) {
  min-width: 190px;
}

.event-table-wrap.is-list th:nth-child(3),
.event-table-wrap.is-list td:nth-child(3),
.event-table-wrap.is-list th:nth-child(4),
.event-table-wrap.is-list td:nth-child(4) {
  min-width: 280px;
}

.event-table-wrap.is-list th:nth-child(5),
.event-table-wrap.is-list td:nth-child(5),
.event-table-wrap.is-list th:nth-child(7),
.event-table-wrap.is-list td:nth-child(7),
.event-table-wrap.is-list th:nth-child(8),
.event-table-wrap.is-list td:nth-child(8) {
  text-align: center;
}

.event-table-wrap.is-list th:nth-child(6),
.event-table-wrap.is-list td:nth-child(6) {
  min-width: 190px;
}

.event-table-wrap.is-list th:nth-child(8),
.event-table-wrap.is-list td:nth-child(8) {
  min-width: 170px;
}

.event-catalog-id {
  display: inline-block;
  min-width: 54px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
}

.event-card-open {
  min-width: 138px;
  justify-content: center;
  white-space: nowrap;
}

.event-catalog-text {
  display: -webkit-box;
  max-width: 380px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.event-type-cell {
  width: 92px;
}

.event-type-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.08);
}

.event-type-logo img,
.event-type-logo svg {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
}

.event-type-logo-majestic,
.event-type-logo-discord {
  background: transparent;
}

.event-type-unknown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 800;
}

.event-frozen-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
}

.event-frozen-badge.is-frozen {
  background: var(--red-soft, rgba(239, 68, 68, 0.12));
  color: var(--red, #dc2626);
}

.event-frozen-badge.is-active {
  background: var(--green-soft);
  color: var(--green);
}

.event-list-photo {
  position: relative;
  display: inline-flex;
  width: 94px;
  height: 58px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0;
  background: var(--media-bg);
  cursor: pointer;
}

.event-list-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 160ms ease;
}

.event-list-photo span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  border-radius: 6px;
  padding: 3px 6px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 160ms ease;
}

.event-list-photo:hover img {
  transform: scale(1.05);
}

.event-list-photo:hover span,
.event-list-photo:focus-visible span {
  opacity: 1;
}

.event-list-photo:focus-visible {
  outline: 3px solid var(--brand-soft);
  outline-offset: 2px;
}

.event-catalog-meta .meta-box {
  min-height: 104px;
}

.event-dialog-type {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.event-dialog-type .event-type-logo {
  width: 36px;
  height: 36px;
}

.event-dialog-type .event-type-logo img,
.event-dialog-type .event-type-logo svg {
  width: 30px;
  height: 30px;
}

.event-catalog-section p {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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


/* Event catalog status alignment and compact columns — v34 */
.event-table-wrap.is-list table {
  min-width: 940px;
}

.event-table-wrap.is-list th,
.event-table-wrap.is-list td {
  vertical-align: middle;
}

.event-table-wrap.is-list th:nth-child(1),
.event-table-wrap.is-list td:nth-child(1) {
  width: 78px;
}

.event-table-wrap.is-list th:nth-child(2),
.event-table-wrap.is-list td:nth-child(2) {
  min-width: 250px;
}

.event-table-wrap.is-list th:nth-child(3),
.event-table-wrap.is-list td:nth-child(3) {
  width: 96px;
  min-width: 96px;
  text-align: center;
}

.event-table-wrap.is-list th:nth-child(4),
.event-table-wrap.is-list td:nth-child(4) {
  width: 210px;
  min-width: 210px;
  text-align: center;
}

.event-table-wrap.is-list th:nth-child(5),
.event-table-wrap.is-list td:nth-child(5) {
  width: 168px;
  min-width: 168px;
  text-align: center;
}

.event-table-wrap.is-list th:nth-child(6),
.event-table-wrap.is-list td:nth-child(6) {
  width: 130px;
  min-width: 130px;
  text-align: center;
}

.event-frozen-cell .event-frozen-badge {
  margin-inline: auto;
}

.event-frozen-badge {
  box-sizing: border-box;
  width: 136px;
  min-width: 136px;
  min-height: 34px;
  padding: 0 12px;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.event-catalog-meta .meta-box .event-frozen-badge {
  margin-top: 7px;
}


/* Event catalog card status alignment — v36 */
.event-catalog-frozen-box {
  display: block;
  text-align: left;
}

.event-catalog-frozen-box > span:first-child {
  width: auto;
  text-align: left;
}

.event-catalog-frozen-box .event-frozen-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 7px 0 0;
  text-align: center;
}

/* Archive users blacklist and date filters */
.users-filters.is-archive {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.blacklist-chip {
  min-width: 92px;
  min-height: 30px;
  justify-content: center;
  border: 1px solid transparent;
  text-align: center;
  white-space: nowrap;
}

.blacklist-chip.is-blacklisted {
  border-color: rgba(195, 58, 58, 0.35);
  background: var(--red-soft);
  color: var(--red);
}

.blacklist-chip.is-clear {
  border-color: rgba(19, 155, 102, 0.35);
  background: var(--green-soft);
  color: var(--green);
}

@media (max-width: 1180px) {
  .users-filters.is-archive {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 620px) {
  .users-filters.is-archive {
    grid-template-columns: 1fr;
  }
}


/* Blacklisted archived user profile — v39 */
.user-profile-labels {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 7px;
}

.user-profile-labels .eyebrow {
  margin: 0;
}

.user-blacklist-warning {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(220, 68, 68, 0.5);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.user-profile-dialog.is-blacklisted-profile-dialog {
  border-color: rgba(220, 68, 68, 0.65);
  box-shadow: 0 24px 80px rgba(93, 16, 16, 0.35);
}

.user-profile-inner.is-blacklisted-profile {
  border-radius: calc(var(--radius) - 1px);
  background:
    linear-gradient(rgba(150, 24, 24, 0.10), rgba(150, 24, 24, 0.10)),
    var(--panel);
  box-shadow: inset 0 0 0 1px rgba(220, 68, 68, 0.2);
}

.user-profile-inner.is-blacklisted-profile .user-profile-head h2 {
  color: var(--red);
}

.user-profile-inner.is-blacklisted-profile .discord-avatar {
  border-color: rgba(220, 68, 68, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 68, 68, 0.10);
}

.user-profile-inner.is-blacklisted-profile .user-detail-card {
  border-color: rgba(220, 68, 68, 0.24);
}

/* Profile frame by position and neutral archive style — v40 */
.user-profile-dialog.is-role-profile-dialog {
  border-color: var(--profile-accent-border, rgba(126, 138, 154, 0.62));
  box-shadow:
    0 24px 80px rgba(8, 15, 28, 0.30),
    0 0 0 1px var(--profile-accent-faint, rgba(126, 138, 154, 0.24));
}

.user-profile-inner.is-role-profile {
  border-radius: calc(var(--radius) - 1px);
  background:
    linear-gradient(var(--profile-accent-soft, rgba(126, 138, 154, 0.10)), var(--profile-accent-soft, rgba(126, 138, 154, 0.10))),
    var(--panel);
  box-shadow: inset 0 0 0 1px var(--profile-accent-faint, rgba(126, 138, 154, 0.24));
}

.user-profile-inner.is-role-profile .discord-avatar {
  border-color: var(--profile-accent-border, rgba(126, 138, 154, 0.62));
  box-shadow: 0 0 0 4px var(--profile-accent-soft, rgba(126, 138, 154, 0.10));
}

.user-profile-inner.is-role-profile .user-detail-card {
  border-color: var(--profile-accent-faint, rgba(126, 138, 154, 0.24));
}

.user-profile-dialog.is-archived-profile-dialog {
  border-color: rgba(142, 153, 170, 0.62);
  box-shadow:
    0 24px 80px rgba(8, 15, 28, 0.30),
    0 0 0 1px rgba(142, 153, 170, 0.20);
}

.user-profile-inner.is-archived-profile {
  border-radius: calc(var(--radius) - 1px);
  background:
    linear-gradient(rgba(126, 138, 154, 0.09), rgba(126, 138, 154, 0.09)),
    var(--panel);
  box-shadow: inset 0 0 0 1px rgba(142, 153, 170, 0.18);
}

.user-profile-inner.is-archived-profile .discord-avatar {
  border-color: rgba(142, 153, 170, 0.58);
  box-shadow: 0 0 0 4px rgba(142, 153, 170, 0.09);
}

.user-profile-inner.is-archived-profile .user-detail-card {
  border-color: rgba(142, 153, 170, 0.22);
}

/* Blacklist must always override position/archive colors. */
.user-profile-dialog.is-blacklisted-profile-dialog {
  border-color: rgba(220, 68, 68, 0.65);
  box-shadow: 0 24px 80px rgba(93, 16, 16, 0.35);
}

/* v42: кликабельные Discord-пользователи окрашиваются по должности из users.access. */
.member-chip.is-position-colored,
.member-chip.is-fallback.is-position-colored {
  border-color: var(--member-role-border, var(--brand-border));
  background: var(--member-role-background, var(--brand-soft));
  color: var(--member-role-color, var(--brand));
  font-family: inherit;
}

.member-chip.is-position-colored:hover,
.member-chip.is-position-colored:focus-visible {
  border-color: var(--member-role-color, var(--brand));
  background: var(--member-role-background, var(--brand-soft));
  color: var(--member-role-color, var(--brand));
  filter: brightness(1.08);
}
