:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --line: #e5e7eb;
  --text: #111111;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --accent: #111111;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "SF Pro Text",
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Helvetica Neue",
    sans-serif;
  min-height: 100vh;
}

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

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 max(6px, env(safe-area-inset-bottom));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.locale-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  opacity: 0;
  background: linear-gradient(90deg, #111111, #6b7280);
  transition: width 220ms ease, opacity 180ms ease;
  z-index: 80;
}

body.locale-loading .locale-progress {
  width: 100%;
  opacity: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.brand {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
}

.brand strong {
  font-size: 1.02rem;
  font-weight: 700;
}

.locale-switcher span,
.section-label,
.hero-kicker,
.post-channel,
.post-time,
.post-author,
.post-stats,
.feed-subtitle,
.feed-list-header {
  color: var(--muted);
  font-size: 0.9rem;
}

.topbar-right,
.locale-switcher {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-status {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  cursor: default;
}

.auth-status[data-role='user'] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.auth-status[data-role='user']::before {
  content: '用户';
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

html:lang(en) .auth-status[data-role='user']::before {
  content: 'User';
}

.auth-status:disabled {
  cursor: default;
  opacity: 1;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.locale-switcher {
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.locale-button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.locale-button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.08);
}

body.locale-loading .locale-button {
  pointer-events: none;
  opacity: 0.72;
}

.topbar-right {
  gap: 10px;
}

.section-label,
.post-channel,
.post-time {
  margin: 0 0 8px;
}

.forum-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.forum-header,
.sidebar,
.main-column {
  transition: opacity 180ms ease, transform 180ms ease;
}

body.locale-loading .forum-header,
body.locale-loading .sidebar,
body.locale-loading .main-column {
  opacity: 0.55;
  transform: translateY(2px);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.sidebar .panel {
  position: sticky;
  top: 20px;
  padding: 18px;
}

.main-column {
  display: grid;
  gap: 0;
}

.feed-panel {
  padding: 22px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding: 28px 0 0;
  border-top: 0;
  color: #666;
  font-size: 0.84rem;
  text-align: center;
}

.site-footer-copy {
  margin: 0;
}

.site-footer-link {
  color: inherit;
  text-decoration: none;
}

.site-footer-link:hover {
  color: var(--text);
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.feed-channel-description {
  margin: 0;
  padding: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--line);
}

.panel-heading-row,
.post-header,
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 140px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #d1d5db;
}

.stack-form {
  display: grid;
  gap: 10px;
}

.field-block {
  display: grid;
  gap: 6px;
}

.password-field {
  position: relative;
}

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

.password-toggle {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #b8c0cc;
  cursor: pointer;
  opacity: 0.95;
  transition: color 160ms ease, opacity 160ms ease;
}

.password-toggle:hover {
  color: #98a2b3;
  background: transparent;
}

.password-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.password-toggle .eye-open {
  display: none;
}

.password-toggle.is-visible .eye-open {
  display: block;
}

.password-toggle.is-visible .eye-closed {
  display: none;
}

.auth-card .stack-form .password-toggle {
  margin-top: 0;
  background: transparent;
  color: #b8c0cc;
}

.field-block span {
  color: #667085;
  font-size: 0.82rem;
  font-weight: 600;
}

.stack-form button:not(.password-toggle),
.token-box button,
.admin-action,
.admin-toolbar button {
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.auth-panel,
.admin-panel {
  width: min(760px, calc(100% - 24px));
  padding: 24px;
}

.modal-panel.auth-panel {
  width: min(520px, calc(100% - 88px));
  max-height: min(92vh, 900px);
  position: relative;
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(240, 244, 255, 0.95), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 251, 252, 0.98));
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.12),
    0 4px 12px rgba(15, 23, 42, 0.05);
  overflow: auto;
}

.modal-panel.auth-panel.is-profile-mode {
  width: min(920px, calc(100% - 56px));
}

.auth-toast {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 70;
  width: fit-content;
  max-width: min(420px, calc(100vw - 40px));
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(180, 35, 24, 0.14);
  border-radius: 14px;
  background: rgba(255, 244, 242, 0.98);
  color: #b42318;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-toast[data-tone='success'] {
  border-color: rgba(2, 122, 72, 0.14);
  background: rgba(236, 253, 243, 0.98);
  color: #027a48;
}

.auth-card {
  padding: 18px 18px 14px;
  border: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
}

#profile-panel.auth-card {
  padding: 24px 22px 20px;
}

.auth-head {
  margin-bottom: 14px;
}

.auth-card h2 {
  margin: 0;
  font-size: 1.62rem;
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 700;
}

.auth-eyebrow {
  margin: 0 0 8px;
  color: #98a2b3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-subtitle {
  margin: 8px 0 0;
  color: #667085;
  font-size: 0.84rem;
  line-height: 1.5;
}

.auth-feedback {
  min-height: 22px;
  margin: 12px 18px 0;
  color: #b42318;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
}

.auth-feedback:empty {
  display: none;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 0;
  color: #98a2b3;
  font-size: 0.84rem;
  text-align: center;
}

.auth-switch-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #111827;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.96rem;
}

.auth-card input {
  height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: #f8fafc;
  font-size: 1rem;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.auth-card input::placeholder {
  color: #98a2b3;
}

.auth-card input:focus {
  border-color: rgba(17, 24, 39, 0.14);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.03);
}

.auth-card input[readonly] {
  color: #667085;
  background: #f2f4f7;
  cursor: not-allowed;
}

.auth-card .stack-form button:not(.password-toggle) {
  margin-top: 2px;
  padding-left: 18px;
  padding-right: 18px;
  font-size: 1rem;
  background: #111111;
  box-shadow: none;
}

.auth-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 24, 39, 0.06);
}

.profile-hero {
  margin: -2px -2px 20px;
  padding: 20px 20px 18px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 252, 0.98));
}

.profile-hero-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.profile-head {
  margin: 0;
  max-width: 460px;
}

.profile-identity-card {
  min-width: 280px;
  padding: 14px 16px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 18px;
  background: rgba(250, 251, 252, 0.95);
  text-align: left;
}

.profile-identity-card span,
.profile-meta-card span,
.profile-section-head p {
  display: block;
  color: #667085;
  font-size: 0.8rem;
}

.profile-identity-card strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 1rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-identity-card p {
  margin: 6px 0 0;
  color: #98a2b3;
  font-size: 0.8rem;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.profile-meta-card,
.profile-section {
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.profile-meta-card {
  padding: 13px 15px;
}

.profile-meta-card strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 0.96rem;
  line-height: 1.35;
  white-space: nowrap;
}

.profile-section {
  padding: 18px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  gap: 16px;
}

.profile-section-wide {
  grid-column: 1 / -1;
}

.profile-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-section-head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.profile-section-head p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.admin-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.88), transparent 38%),
    linear-gradient(180deg, #f7f7f6 0%, #efefee 100%);
}

.admin-login-card {
  position: relative;
  width: min(480px, calc(100% - 24px));
  padding: 28px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 24px 72px rgba(15, 23, 42, 0.1),
    0 6px 18px rgba(15, 23, 42, 0.05);
}

.admin-login-card .locale-switcher {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 1;
}

.admin-login-card .auth-head {
  padding-right: 116px;
}

.admin-login-form-card {
  padding: 18px;
}

.token-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 10px 14px 10px 16px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 8px;
  background: #f4f5f8;
}

.token-preview {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: #111827;
  font-size: 0.88rem;
  font-weight: 500;
  font-family:
    "SFMono-Regular",
    "SF Mono",
    "JetBrains Mono",
    "Menlo",
    monospace;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-output {
  display: none;
}

.token-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.secondary-action {
  height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.secondary-action:hover {
  border-color: rgba(17, 24, 39, 0.16);
  background: #ffffff;
  color: #111111;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.035);
}

.token-primary-action {
  height: 28px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.token-primary-action:hover {
  background: #161616;
  color: #ffffff;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.1);
}

.token-primary-action:active {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

@media (max-width: 720px) {
  .auth-card {
    padding: 22px 16px 18px;
  }

  .profile-hero-main,
  .token-box {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .token-actions {
    width: 100%;
    flex-direction: column;
  }

  .token-actions button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .profile-layout,
  .profile-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-identity-card {
    width: 100%;
    min-width: 0;
  }
}

.admin-page {
  --admin-bg: #f5f7fa;
  --admin-surface: #ffffff;
  --admin-surface-strong: #ffffff;
  --admin-line: #d9e0ea;
  --admin-ink: #111827;
  --admin-muted: #667085;
  --admin-accent: #2563eb;
  --admin-accent-soft: #dbeafe;
  --admin-danger-soft: #fee2e2;
  background: var(--admin-bg);
  color: var(--admin-ink);
  padding-bottom: 48px;
}

.admin-page .app-shell {
  width: min(1400px, calc(100% - 32px));
}

.admin-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
}

.admin-page .topbar {
  padding: 14px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  background: var(--admin-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.admin-page .brand strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-page .topbar-right {
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-topbar-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-page .panel {
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  background: var(--admin-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.admin-page .feed-panel {
  padding: 20px;
}

.admin-page h2 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.admin-filter-meta {
  margin: 8px 0 0;
  color: var(--admin-muted);
  font-size: 0.79rem;
  line-height: 1.4;
}

.admin-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-page select {
  width: auto;
  min-width: 132px;
  height: 38px;
  padding: 0 40px 0 14px;
  border-radius: 10px;
  border-color: var(--admin-line);
  background-color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--admin-ink);
}

.admin-page .locale-switcher {
  gap: 4px;
  padding: 3px;
  border-color: var(--admin-line);
  border-radius: 999px;
  background: #eef2f6;
}

.admin-page .locale-button,
.admin-page .admin-link,
.admin-toolbar button,
.admin-topbar-tabs > button,
.admin-page .primary-button,
.admin-page .text-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.admin-page .admin-link,
.admin-page .locale-button,
.admin-toolbar button,
.admin-topbar-tabs > button {
  border: 1px solid var(--admin-line);
  background: #ffffff;
  color: #344054;
  box-shadow: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.admin-page .admin-link:hover,
.admin-page .locale-button:hover,
.admin-toolbar button:hover,
.admin-topbar-tabs > button:hover {
  border-color: #b8c3d1;
  background: #f8fafc;
  color: #111827;
  transform: none;
}

.admin-page .locale-button {
  min-width: 42px;
  padding-inline: 10px;
}

.admin-page .locale-button.active {
  background: var(--admin-accent);
  color: #fff;
  box-shadow: none;
}

.admin-toolbar button {
  height: 38px;
}

#role-save {
  background: var(--admin-accent);
  color: #fff;
  border-color: var(--admin-accent);
  box-shadow: none;
}

#role-save:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

#ban-toggle {
  background: #fff5f5;
  color: #b42318;
  border-color: #fecaca;
}

#ban-toggle:hover {
  background: #fee2e2;
  color: #912018;
  border-color: #fca5a5;
}

.admin-user-list,
.admin-detail-list,
.admin-tool-list {
  display: grid;
  gap: 12px;
}

.admin-user-card,
.admin-detail-card {
  padding: 18px 18px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.admin-user-card.active {
  border-color: #93c5fd;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.admin-user-card h3,
.admin-detail-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.admin-user-card p,
.admin-detail-card p {
  margin: 4px 0;
  color: var(--admin-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.admin-section-dashboard {
  grid-column: 1 / -1;
}

.admin-tab-panel {
  display: none;
  grid-column: 1 / -1;
}

.admin-tab-panel.active {
  display: block;
}

.admin-tab-panel.active[data-admin-tab-panel='users'] {
  display: grid;
}

.admin-tab-panel.active[data-admin-tab-panel='users'] {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(520px, 1.28fr);
  gap: 22px;
}

.admin-section-users,
.admin-section-detail,
.admin-section-audit,
.admin-section-security {
  min-width: 0;
}

.admin-risk-shell {
  display: grid;
  gap: 20px;
}

.admin-risk-panel[hidden] {
  display: none;
}

.admin-section-kicker,
.admin-section-label,
.admin-card-kicker {
  margin: 0 0 10px;
  color: var(--admin-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-tab-list,
.admin-subtab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-tab-button,
.admin-subtab-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d0d7e2;
  border-radius: 999px;
  background: #fff;
  color: #475467;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.admin-tab-button:hover,
.admin-subtab-button:hover {
  border-color: #b8c3d1;
  color: #111827;
}

.admin-tab-button.active,
.admin-subtab-button.active {
  border-color: #bfd4ff;
  background: #eef4ff;
  color: #1d4ed8;
  box-shadow: none;
}

.admin-subtab-button {
  min-height: 36px;
  padding-inline: 12px;
  font-size: 0.8rem;
}

.admin-risk-toolbar {
  margin-bottom: 0;
}

.admin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.admin-card-header-tight {
  margin-bottom: 18px;
}

.admin-detail-card-hero {
  background: #fff;
}

.admin-overview-card {
  display: grid;
  gap: 22px;
}

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

.admin-dashboard-summary-grid h4,
.admin-alert-stack h4 {
  margin: 0 0 10px;
  color: #344054;
  font-size: 0.83rem;
  letter-spacing: 0.02em;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.admin-metric-card {
  min-width: 0;
  padding: 14px 14px 12px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
}

.admin-metric-card span {
  display: block;
  color: #717669;
  font-size: 0.76rem;
  line-height: 1.4;
}

.admin-metric-card strong {
  display: block;
  margin-top: 8px;
  color: #1f241d;
  font-size: 1.1rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-metric-grid.is-risk .admin-metric-card {
  background: #fff;
  border-color: #fecaca;
}

.admin-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.admin-badge {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 0.75rem;
  font-weight: 600;
}

.admin-badge.is-banned {
  background: #fee2e2;
  color: #991b1b;
}

.admin-record-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(52, 52, 40, 0.08);
}

.admin-record-row:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.admin-inline-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: #fff;
  color: #475467;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-inline-action:hover {
  border-color: #b8c3d1;
  color: #111827;
}

.admin-permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475467;
  font-size: 0.82rem;
}

.admin-alert-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
}

.admin-alert-card strong {
  display: block;
  color: #111827;
  font-size: 0.82rem;
  letter-spacing: -0.02em;
}

.admin-alert-card.severity-high {
  border-color: rgba(185, 28, 28, 0.16);
  background: rgba(254, 242, 242, 0.95);
}

.admin-alert-card.severity-medium {
  border-color: rgba(217, 119, 6, 0.16);
  background: rgba(255, 251, 235, 0.95);
}

.admin-dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 22px;
}

.admin-dashboard-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr) minmax(280px, 0.9fr);
  gap: 22px;
}

.admin-chart-card,
.admin-signal-card {
  min-width: 0;
}

.admin-chart-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.7fr);
  gap: 18px;
  align-items: stretch;
}

.admin-chart-canvas {
  position: relative;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
}

.admin-chart-interactive {
  position: relative;
}

.admin-trend-svg {
  display: block;
  width: 100%;
  height: auto;
}

.admin-chart-hover-grid {
  position: absolute;
  inset: 0 14px 36px 18px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
}

.admin-chart-hover-col {
  position: relative;
  border: 0;
  background: transparent;
  cursor: crosshair;
}

.admin-chart-hover-col::after {
  content: "";
  position: absolute;
  inset: 4px 45% 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  opacity: 0;
  transition: opacity 120ms ease;
}

.admin-chart-hover-col:hover::after,
.admin-chart-hover-col:focus-visible::after {
  opacity: 1;
}

.admin-chart-tooltip {
  position: absolute;
  top: 6px;
  left: 50%;
  display: grid;
  gap: 4px;
  min-width: 132px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.96);
  color: #f8fafc;
  font-size: 0.75rem;
  line-height: 1.4;
  transform: translate(-50%, -6px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  z-index: 2;
}

.admin-chart-tooltip strong {
  font-size: 0.76rem;
  font-weight: 700;
}

.admin-chart-hover-col:hover .admin-chart-tooltip,
.admin-chart-hover-col:focus-visible .admin-chart-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-chart-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #7b7f76;
  font-size: 0.9rem;
}

.admin-chart-grid-line {
  stroke: #e4e7ec;
  stroke-dasharray: 3 6;
}

.admin-chart-grid-label,
.admin-chart-axis-label {
  fill: #98a2b3;
  font-size: 11px;
  font-family:
    "SF Pro Text",
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Helvetica Neue",
    sans-serif;
}

.admin-chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-chart-legend {
  display: grid;
  gap: 12px;
}

.admin-chart-legend-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
}

.admin-chart-legend-item p {
  margin: 6px 0 0;
}

.admin-chart-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--series-color);
  box-shadow: 0 0 0 2px #fff;
}

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

.admin-signal-row {
  display: grid;
  gap: 8px;
}

.admin-signal-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-signal-label-row span {
  color: #60665c;
  font-size: 0.8rem;
}

.admin-signal-label-row strong {
  color: #162018;
  font-size: 0.88rem;
}

.admin-signal-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaecf0;
}

.admin-signal-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #264653, #567a7a);
}

.admin-signal-fill.tone-high {
  background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.admin-signal-fill.tone-warn {
  background: linear-gradient(90deg, #b45309, #f59e0b);
}

.admin-alert-stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--admin-line);
}

.admin-breakdown-list {
  display: grid;
  gap: 10px;
}

.admin-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
}

.admin-breakdown-main strong {
  display: block;
  color: #1f2937;
  font-size: 0.9rem;
}

.admin-breakdown-main p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 0.8rem;
}

.admin-breakdown-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-breakdown-stats span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475467;
  font-size: 0.76rem;
  white-space: nowrap;
}

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

.admin-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--admin-line);
}

.admin-list-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.admin-list-row strong {
  color: #20261f;
  font-size: 0.81rem;
}

.admin-list-row span {
  color: var(--admin-muted);
  font-size: 0.8rem;
  text-align: right;
}

.admin-event-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
}

.admin-event-strip strong {
  display: block;
  color: #1f241d;
  font-size: 0.84rem;
}

.admin-event-strip span {
  display: inline-block;
  margin-top: 6px;
  color: #8b5e34;
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-event-strip p {
  margin: 6px 0 0;
}

.admin-badge.is-severity-high {
  background: #fee2e2;
  color: #991b1b;
}

.admin-badge.is-severity-warn,
.admin-badge.is-severity-medium {
  background: #fef3c7;
  color: #92400e;
}

.admin-badge.is-severity-low,
.admin-badge.is-severity-info {
  background: #e0f2fe;
  color: #075985;
}

.admin-event-card.severity-high {
  border-color: rgba(154, 63, 49, 0.18);
  background: linear-gradient(180deg, rgba(255, 250, 248, 0.96), rgba(248, 231, 226, 0.98));
}

.admin-event-card.severity-warn,
.admin-event-card.severity-medium {
  border-color: rgba(196, 124, 50, 0.18);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(248, 239, 222, 0.98));
}

.primary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.text-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.channel-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.channel-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.channel-chip:hover,
.channel-chip.active {
  background: var(--soft);
}

.channel-chip strong {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.posts {
  display: grid;
  margin-top: 2px;
}

.post-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 20px;
  width: 100%;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  outline: none;
  text-align: left;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.post-row:hover {
  background: rgba(0, 0, 0, 0.015);
}

.post-row:focus-visible {
  background: rgba(17, 24, 39, 0.022);
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.09);
}

.post-row:active {
  background: rgba(17, 24, 39, 0.035);
}

.post-row-main {
  display: grid;
  gap: 8px;
  align-content: center;
}

.post-title {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.post-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.post-author,
.post-stats {
  margin: 0;
}

.post-time {
  margin: 0;
  font-size: 0.82rem;
}

.post-author {
  font-size: 0.84rem;
  line-height: 1.4;
}

.post-author::after {
  content: "·";
  margin-left: 10px;
  color: var(--line);
}

.post-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  text-align: right;
}

.post-channel {
  margin: 0;
  padding: 4px 9px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 8px;
  background: rgba(120, 120, 128, 0.08);
  color: rgba(60, 60, 67, 0.82);
  font-size: 0.74rem;
  font-weight: 590;
  letter-spacing: -0.01em;
  line-height: 1;
}

.post-time,
.post-stats {
  font-size: 0.86rem;
  line-height: 1.4;
}

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

.reply-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}

.reply-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.reply-item strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.reply-time {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.reply-body,
.reply-body p {
  margin: 0;
}

.reply-body {
  color: #3f3f46;
  line-height: 1.65;
}

.empty-state {
  padding: 24px 0;
  color: var(--muted);
}

.feed-pagination {
  width: 100%;
  height: 1px;
  margin-top: 16px;
  opacity: 0;
  pointer-events: none;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 36%),
    rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
}

.modal-panel {
  position: relative;
  width: min(760px, calc(100% - 24px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  margin: 0;
  padding: 22px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.detail-panel {
  width: min(920px, calc(100% - 24px));
}

.confirm-modal {
  z-index: 70;
}

.confirm-panel {
  width: min(440px, calc(100% - 32px));
  padding: 28px 24px 22px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(240, 244, 255, 0.96), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.99));
  box-shadow:
    0 28px 80px rgba(15, 23, 42, 0.18),
    0 8px 24px rgba(15, 23, 42, 0.08);
}

.confirm-eyebrow {
  margin: 0 0 12px;
  color: #98a2b3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.confirm-panel h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.confirm-description {
  margin: 14px 0 0;
  color: #667085;
  font-size: 0.95rem;
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.confirm-actions .secondary-action,
.confirm-actions .primary-button {
  min-width: 108px;
  height: 52px;
  padding: 0 24px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  box-shadow: none;
  transform: none;
}

.confirm-actions .secondary-action {
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #ffffff;
  color: #111827;
}

.confirm-actions .secondary-action:hover {
  border-color: rgba(17, 24, 39, 0.14);
  background: #ffffff;
  color: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transform: none;
}

.confirm-actions .primary-button {
  background: #111111;
  color: #ffffff;
}

.confirm-actions .primary-button:hover {
  background: #111111;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  transform: none;
}

.confirm-actions .primary-button:active,
.confirm-actions .secondary-action:active {
  transform: none;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: rgba(55, 65, 81, 0.82);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.94);
  color: rgba(17, 24, 39, 0.96);
}

.detail-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-channel-badge {
  margin: 0;
  padding: 4px 8px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 8px;
  background: rgba(120, 120, 128, 0.08);
  color: rgba(60, 60, 67, 0.82);
  font-size: 0.74rem;
  font-weight: 590;
  letter-spacing: -0.01em;
  line-height: 1;
}

.detail-meta-row .post-author,
.detail-meta-row .post-time {
  margin: 0;
}

.detail-meta-row .post-author::after {
  content: "·";
  margin-left: 10px;
  color: var(--line);
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.detail-side-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-tags {
  margin-top: 0;
  margin-bottom: 18px;
}

.detail-content {
  margin: 18px 0;
  color: #27272a;
  line-height: 1.8;
}

.detail-content h1,
.detail-content h2,
.detail-content h3,
.detail-content h4,
.reply-body h1,
.reply-body h2,
.reply-body h3,
.reply-body h4 {
  margin: 1.1em 0 0.45em;
  line-height: 1.35;
}

.detail-content p,
.detail-content ul,
.detail-content ol,
.detail-content pre,
.detail-content blockquote,
.reply-body p,
.reply-body ul,
.reply-body ol,
.reply-body pre,
.reply-body blockquote {
  margin: 0.7em 0;
}

.detail-content ul,
.detail-content ol,
.reply-body ul,
.reply-body ol {
  padding-left: 1.35rem;
}

.detail-content code,
.reply-body code {
  padding: 0.14em 0.38em;
  border-radius: 6px;
  background: rgba(120, 120, 128, 0.1);
  font-family:
    "SF Mono",
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  font-size: 0.92em;
}

.detail-content pre,
.reply-body pre {
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}

.detail-content pre code,
.reply-body pre code {
  padding: 0;
  background: transparent;
}

.detail-content blockquote,
.reply-body blockquote {
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.detail-content a,
.reply-body a {
  color: inherit;
  text-decoration-color: rgba(60, 60, 67, 0.28);
  text-underline-offset: 0.14em;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.post-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .topbar,
  .forum-layout,
  .panel-heading-row,
  .feed-toolbar,
  .post-header,
  .post-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .forum-layout {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    gap: 6px;
    padding-top: 24px;
  }

  .sidebar .panel {
    position: static;
  }

  .post-row {
    grid-template-columns: 1fr;
  }

  .post-row-meta {
    gap: 8px;
  }

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

  .post-author::after {
    margin-left: 8px;
  }

  .post-row-side {
    align-items: flex-start;
    gap: 10px;
    text-align: left;
  }

  .post-row-side,
  .detail-actions {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }

  .detail-side-meta {
    gap: 10px;
    flex-wrap: wrap;
  }

  .detail-meta-row .post-author::after {
    margin-left: 8px;
  }

  .modal-panel {
    width: 100%;
    max-height: calc(100vh - 16px);
  }

  .modal-panel.auth-panel {
    width: min(100%, 360px);
    border-radius: 22px;
  }

  .modal-panel.auth-panel.is-profile-mode {
    width: 100%;
  }

  .auth-toast {
    top: 14px;
    right: 14px;
    left: 14px;
    max-width: none;
  }

  .auth-card {
    padding: 18px 14px 16px;
    border-radius: 22px;
  }

  .auth-card h2 {
    font-size: 1.55rem;
  }

  .auth-feedback {
    margin-left: 14px;
    margin-right: 14px;
  }

  .admin-login-card {
    width: min(100%, 420px);
    padding: 22px;
  }

  .admin-login-card .locale-switcher {
    top: 22px;
    right: 22px;
  }

  .admin-login-card .auth-head {
    padding-right: 108px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-tab-panel[data-admin-tab-panel='users'],
  .admin-dashboard-main-grid,
  .admin-dashboard-lower-grid,
  .admin-chart-shell,
  .admin-dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-page .topbar-right,
  .admin-topbar-tabs,
  .admin-risk-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-section-dashboard,
  .admin-section-users,
  .admin-section-detail,
  .admin-section-audit,
  .admin-section-security {
    grid-column: auto;
  }

  .admin-tab-panel {
    grid-column: auto;
  }

  .admin-card-header,
  .admin-list-row,
  .admin-record-row,
  .admin-event-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-toolbar-actions {
    width: 100%;
  }

  .admin-tab-list,
  .admin-subtab-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-tab-button,
  .admin-subtab-button {
    width: 100%;
  }

  .admin-page select,
  .admin-toolbar button,
  .admin-topbar-tabs > button {
    width: 100%;
  }

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

}
