﻿:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #111827;
  --muted: #667085;
  --line: #d9e2ec;
  --line-strong: #b8c5d6;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --blue: #2563eb;
  --green: #16803c;
  --amber: #b45309;
  --red: #b42318;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  min-width: 1080px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

.boot-screen {
  padding: 80px;
  color: var(--muted);
}

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

.visitor-readonly [data-action^="save-"],
.visitor-readonly [data-action^="delete-"],
.visitor-readonly [data-action^="create-"],
.visitor-readonly [data-action^="restore-"],
.visitor-readonly [data-action^="start-"],
.visitor-readonly [data-action^="apply-"],
.visitor-readonly [data-action^="send-"],
.visitor-readonly [data-action^="reply-"],
.visitor-readonly [data-action^="rename-"],
.visitor-readonly [data-action^="review-"],
.visitor-readonly [data-action^="remove-"],
.visitor-readonly [data-action^="disband-"],
.visitor-readonly [data-action^="add-"],
.visitor-readonly [data-action^="reset-"],
.visitor-readonly [data-action^="import-"],
.visitor-readonly [data-action^="verify-"],
.visitor-readonly [data-action^="export-"],
.visitor-readonly [data-action="copy-openid"],
.visitor-readonly [data-action="mail-status"],
.visitor-readonly [data-action="pick-color"],
.visitor-readonly [data-action="toggle-style"],
.visitor-readonly [data-action="change-admin-password"],
.visitor-readonly [data-action="begin-totp-enrollment"],
.visitor-readonly [data-action="confirm-totp-enrollment"],
.visitor-readonly [data-action="disable-totp"] {
  display: none !important;
}


.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.subsection-title {
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.app-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.app-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: inherit;
  text-align: left;
}

.app-card.active {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: none;
}

.app-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.app-portal-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #f7f9fc;
}

.app-portal-panel {
  width: min(760px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.app-portal-brand {
  margin-bottom: 22px;
}

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

.app-entry-card {
  display: block;
  min-height: 116px;
  text-decoration: none;
}

.app-entry-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.ok {
  background: #dcfce7;
  color: var(--green);
}

.badge.warn {
  background: #fff7ed;
  color: var(--amber);
}

.badge.err {
  background: #fee4e2;
  color: var(--red);
}

.side-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.side-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 900;
}

.side-nav {
  display: grid;
  gap: 10px;
}

.sidebar .tabs {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.sidebar .tab {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 14px;
  border-color: var(--line);
  background: white;
  text-align: left;
}

.sidebar .tab.active {
  border-color: #99d2cb;
  background: #e6fffb;
  color: var(--primary-dark);
}

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

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

.eyebrow {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

h1 {
  margin: 5px 0 8px;
  font-size: 28px;
  line-height: 1.25;
}

.page-desc {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.top-actions,
.row-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.tab {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
}

.tab.active {
  border-color: #99d2cb;
  background: #e6fffb;
  color: var(--primary-dark);
}

.content {
  margin-top: 18px;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section {
  padding: 18px;
}

.metric {
  min-height: 112px;
  padding: 18px;
}

.metric-value {
  display: block;
  font-size: 30px;
  font-weight: 950;
}

.metric-label {
  display: block;
  margin-top: 8px;
  color: #475467;
  font-weight: 800;
}

.metric-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: 18px;
}

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

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

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

.reading-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-weight: 800;
}

.inline-check input {
  width: 16px;
  height: 16px;
}

.connection-wechat-login-control {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  background: #f8fafc;
}

.connection-wechat-login-control .section-title {
  margin-bottom: 8px;
}

.connection-wechat-login-control .form-actions {
  margin-top: 10px;
}

.server-migration-panel {
  margin-top: 14px;
  border-color: #d9e2ec;
  background: #ffffff;
}

.server-migration-panel .alert.err {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.migration-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.migration-step-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  background: #f8fafc;
  color: #1f2937;
  font-weight: 800;
}

.migration-step-card b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-size: 12px;
  flex: 0 0 auto;
}

.migration-step-card span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.migration-private-key-field {
  grid-column: 1 / -1;
}

.migration-start-toggle {
  align-self: end;
  min-height: 42px;
}

.migration-actions,
.migration-status-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.migration-actions {
  margin-top: 14px;
}

.migration-result-link {
  text-decoration: none;
}

@media (max-width: 768px) {
  .migration-step-grid {
    grid-template-columns: 1fr;
  }
}

.migration-status {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.migration-status-head {
  justify-content: space-between;
  color: #344054;
  font-size: 13px;
}

.migration-log {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
  font-size: 12px;
}

.migration-log div {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 10px;
}

.migration-log time {
  color: #93c5fd;
}

.migration-log span {
  white-space: pre-wrap;
  word-break: break-word;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  color: #344054;
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.button.danger-solid {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.button.danger-solid:hover {
  background: #b91c1c;
}

.button.blue {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.button.ghost {
  background: transparent;
}

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

.alert {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  line-height: 1.55;
}

.alert.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.alert.err {
  border-color: #fecdca;
  background: #fffbfa;
  color: var(--red);
}

.alert.warn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: var(--amber);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

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

th {
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
}

td {
  color: #1f2937;
  font-size: 13px;
  line-height: 1.45;
}

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

.empty {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--muted);
  text-align: center;
}

.import-description {
  margin: 6px 0 0;
}

.example-file-picker {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 24px;
  border: 2px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
  text-align: center;
  cursor: pointer;
}

.example-file-picker:hover {
  border-color: var(--primary);
}

.example-file-picker input {
  display: none;
}

.example-file-picker span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.coverage-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7ed;
  color: var(--amber);
  font-size: 12px;
}

.coverage-item.complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.import-summary {
  display: flex;
  gap: 10px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.import-summary span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.import-progress {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.2s ease;
}

.signup-notice-tools {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin: 10px 0 14px;
  border: 1px solid rgba(15, 139, 124, 0.18);
  border-radius: 16px;
  background: #f8fffd;
}

.signup-toolbar-head,
.signup-toolbar-row,
.signup-style-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.signup-toolbar-head {
  justify-content: space-between;
}

.signup-toolbar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
}

.compact-field {
  margin: 0;
}

.toolbar-label {
  min-width: 72px;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.signup-notice-textarea {
  min-height: 210px;
  overflow: hidden;
  resize: none;
}

.signup-notice-rich-editor {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
  outline: none;
}

.signup-notice-rich-editor * {
  font-size: inherit;
}

.signup-notice-rich-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 139, 124, 0.12);
}

.signup-notice-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.format-painter-button.active {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.format-painter-status {
  min-height: 20px;
}

.signup-notice-multi-selection {
  border-radius: 3px;
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.signup-multi-selection-status.active {
  color: #1d4ed8;
  font-weight: 800;
}

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

.notice-management-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 400px);
  gap: 14px;
  align-items: start;
}

.notice-editor-column,
.notice-sidebar-panel {
  min-width: 0;
}

.notice-sidebar-panel {
  position: sticky;
  top: 18px;
}

.notice-new-button {
  width: 100%;
  margin-bottom: 12px;
}

.notice-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.notice-list-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

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

.notice-list-row.active {
  background: #f0fdfa;
  box-shadow: inset 3px 0 0 var(--primary);
}

.notice-list-meta,
.notice-list-locations,
.notice-list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notice-list-meta {
  justify-content: space-between;
}

.notice-list-copy h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.notice-list-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.notice-list-actions .button {
  flex: 1 1 90px;
}

.notice-list-time {
  color: var(--muted);
  font-size: 12px;
}

.notice-pagination {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.notice-pagination span {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.notice-upload-button {
  position: relative;
  overflow: hidden;
}

.notice-upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.corner-success-image-preview {
  max-width: 360px;
  margin-top: 10px;
}

.corner-payment-qr-preview {
  width: min(240px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.risk-event-image-link {
  display: inline-grid;
  grid-template-columns: 64px auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--blue);
  text-decoration: none;
}

.risk-event-image {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.upload-hint.success {
  color: var(--green);
}

.upload-hint.error {
  color: var(--red);
}

.word-book-grid {
  display: grid;
  gap: 10px;
}

.word-book-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.word-book-item.saving {
  background: #fbfefd;
}

.word-book-status {
  min-width: 54px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.word-book-status.saving {
  color: var(--amber);
}

.word-book-status.saved {
  color: var(--green);
}

.word-book-status.error {
  color: var(--red);
}

.word-book-toggle {
  min-width: 58px;
  justify-content: flex-end;
}

.word-book-toggle input:disabled {
  cursor: wait;
}

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

.ad-config-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.ad-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ad-config-head .muted {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.5;
}

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

.theme-option-card {
  display: grid;
  gap: 0;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.theme-option-card:hover {
  border-color: #99d2cb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.theme-option-card.active {
  border-color: #0f8f83;
  box-shadow: 0 0 0 2px rgba(15, 143, 131, 0.14);
}

.theme-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  background: #fff;
}

.theme-option-head strong,
.theme-option-head .muted {
  display: block;
}

.theme-option-head .muted {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.5;
}

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

.theme-swatch {
  width: 28px;
  height: 28px;
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.theme-preview-card {
  display: grid;
  gap: 8px;
  min-width: 140px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.theme-preview-image-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 10px;
  background: #eef2f7;
}

.theme-preview-image-wrap .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.theme-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.theme-preview-title {
  font-weight: 900;
}

.theme-preview-line {
  width: 72px;
  height: 6px;
  border-radius: 999px;
}

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

.mail-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mail-item.unread {
  border-color: #fed7aa;
  background: #fffaf4;
}

.mail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.mail-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.mail-content {
  color: #344054;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.mail-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

.mail-page-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.email-reminder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.email-reminder-editor textarea {
  min-height: 180px;
  resize: vertical;
}

.email-reminder-compose {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.email-reminder-compose textarea {
  min-height: 110px;
  resize: vertical;
}

.email-reminder-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.email-reminder-summary div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  align-content: center;
  padding: 12px;
  border: 1px solid #e5edf5;
  border-radius: 8px;
  background: #f8fafc;
}

.email-reminder-summary span {
  color: var(--muted);
  font-size: 12px;
}

.email-reminder-summary strong {
  color: #0f766e;
  font-size: 20px;
  font-weight: 950;
}

.email-reminder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  background: #f8fafc;
}

.segmented-control button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475467;
  font-weight: 800;
  cursor: pointer;
}

.segmented-control button.active {
  background: #0f766e;
  color: #fff;
}

.email-reminder-table table {
  min-width: 980px;
}

.email-reminder-table th:first-child,
.email-reminder-table td:first-child {
  width: 56px;
  text-align: center;
}

.email-reminder-table tbody tr.is-unlearned {
  background: #fffaf4;
}

.email-reminder-user {
  display: grid;
  gap: 3px;
}

.email-reminder-user strong {
  color: #1d2939;
}

.email-reminder-user span {
  color: var(--muted);
  font-size: 12px;
}

.warn-text {
  color: #b45309;
}

.email-reminder-side {
  display: grid;
  gap: 14px;
}

.email-reminder-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.email-reminder-stats div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  align-content: center;
  padding: 12px;
  border: 1px solid #e5edf5;
  border-radius: 8px;
  background: #f8fafc;
}

.email-reminder-stats span,
.email-reminder-history span {
  color: var(--muted);
  font-size: 12px;
}

.email-reminder-stats strong {
  color: #0f766e;
  font-size: 18px;
  font-weight: 950;
}

.email-reminder-history {
  display: grid;
  gap: 10px;
}

.email-reminder-history article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.email-reminder-history article.system {
  border-left: 4px solid #2563eb;
}

.email-reminder-history article.captain {
  border-left: 4px solid #f97316;
}

.email-reminder-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.email-reminder-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.email-reminder-source-badge.system {
  background: #dbeafe;
  color: #1d4ed8;
}

.email-reminder-source-badge.captain {
  background: #ffedd5;
  color: #c2410c;
}

.email-reminder-history strong {
  color: #1d2939;
  font-size: 13px;
}

.email-reminder-history small {
  color: #667085;
  line-height: 1.5;
}

.swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch {
  width: 28px;
  height: 28px;
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.swatch.active {
  box-shadow: 0 0 0 3px var(--primary);
}

.stack {
  display: grid;
  gap: 14px;
}

.footer-note {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.login-card {
  width: min(520px, 100%);
  padding: 28px;
}

.login-desc {
  margin: 18px 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

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

.login-form .alert {
  margin: 0;
}

.login-totp-secret-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.login-totp-button {
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.login-totp-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.login-totp-hint.error {
  color: #b42318;
}

.login-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-button {
  width: 100%;
  margin-top: 4px;
}

.login-alt-link {
  display: inline-flex;
  justify-content: center;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.login-alt-link:hover {
  text-decoration: underline;
}

.login-form.hidden {
  display: none;
}

.english-corner-entry-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(460px, 1.3fr) minmax(340px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.english-corner-entry {
  padding: 22px 24px 24px;
}

.english-corner-entry .section-title {
  margin-bottom: 22px;
}

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

.english-corner-metric {
  min-height: 118px;
  padding: 18px;
  border: 1px solid #d7e6f0;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 38%),
    #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.english-corner-metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.english-corner-metric strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

.english-corner-metric p {
  margin: 8px 0 0;
  font-size: 13px;
}

.english-corner-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(460px, 1.34fr) minmax(340px, 0.92fr);
  gap: 22px;
  align-items: start;
}

.english-corner-dashboard-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.english-corner-entry-card {
  display: grid;
  gap: 16px;
  align-content: start;
  min-height: 208px;
  padding: 20px;
  border: 1px solid #d5e3ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.english-corner-entry-card strong {
  color: #0f172a;
  font-size: 17px;
}

.english-corner-entry-card code {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
  word-break: break-all;
}

.english-corner-feature-card {
  grid-column: 1 / -1;
  min-height: 0;
}

.feature-switch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.feature-switch span {
  display: grid;
  gap: 4px;
}

.feature-switch small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

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

.compact-notice-preview {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed #b7c9d9;
  border-radius: 14px;
  background: #fff;
  color: #334155;
  line-height: 1.65;
}

.compact-notice-preview strong {
  color: #0f172a;
}

.english-corner-admin-list {
  display: grid;
  gap: 14px;
}

.invitation-card-head,
.invitation-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.invitation-card-head .muted {
  margin: 6px 0 0;
}

.english-corner-invitation-list {
  display: grid;
  gap: 10px;
  max-height: 330px;
  overflow: auto;
}

.english-corner-invitation-item {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #bbf7d0;
  border-radius: 9px;
  background: #f0fdf4;
}

.english-corner-invitation-item.used {
  border-color: var(--line);
  background: #f8fafc;
  opacity: 0.82;
}

.english-corner-invitation-item code {
  flex: 1;
  padding: 0;
  background: transparent;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
}

.invitation-meta {
  font-size: 12px;
  line-height: 1.5;
}

.english-corner-admin-item {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #cfe0ee;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.10), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.english-corner-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.english-corner-admin-profile {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.english-corner-admin-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  box-shadow: 0 10px 18px rgba(15, 118, 110, 0.22);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  place-items: center;
}

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

.admin-name-row strong {
  color: #0f172a;
  font-size: 19px;
  line-height: 1.2;
}

.admin-status-pill {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.admin-status-pill.ok {
  background: #dcfce7;
  color: #047857;
}

.admin-status-pill.warn {
  background: #fff7ed;
  color: #c2410c;
}

.admin-updated {
  margin-top: 5px;
  font-size: 13px;
}

.admin-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.english-corner-admin-projects {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #e2edf5;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.86);
}

.english-corner-admin-projects.empty-projects {
  border-style: dashed;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.project-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.project-summary b {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  text-align: center;
}

.admin-project-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid #dbe8f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.admin-project-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #0f766e;
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.10);
}

.admin-project-text {
  min-width: 0;
}

.admin-project-item span {
  display: block;
  color: #0f172a;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-project-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.corner-admin-body {
  min-width: 0;
  min-height: 100vh;
  background: #f3f6fb;
}

.corner-admin-shell {
  min-height: 100vh;
}

.corner-admin-dashboard {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.corner-admin-topbar,
.corner-admin-actions,
.section-head,
.form-actions,
.corner-item-actions,
.corner-event-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.corner-admin-topbar,
.section-head {
  justify-content: space-between;
}

.corner-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.corner-admin-panel {
  min-width: 0;
  padding: 22px;
}

.corner-event-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.event-form-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.event-form-chevron {
  font-size: 16px;
  line-height: 1;
}

.corner-event-form .wide {
  grid-column: 1 / -1;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  color: #334155;
  font-weight: 800;
}

.inline-field {
  min-width: 220px;
  margin: 0;
}

.coordinate-helper {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed #9cc8dc;
  border-radius: 14px;
  background: #f8fafc;
}

.coordinate-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.coordinate-row input {
  grid-column: 1 / -1;
  min-height: 42px;
}

.coordinate-row .button {
  min-height: 44px;
  padding: 0 10px;
  white-space: nowrap;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.coordinate-result {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 9px;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
}

.coordinate-result.empty-coordinate {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.coordinate-ok {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  font-weight: 800;
}

.map-link-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.map-link-row input {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.map-link-row .button {
  min-height: 44px;
  padding: 0 10px;
  white-space: nowrap;
}

.map-link-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.modal-open {
  overflow: hidden;
}

.coordinate-picker-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}

.coordinate-picker-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.coordinate-picker-head {
  margin-bottom: 14px;
}

.coordinate-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.coordinate-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 10px;
}

.coordinate-search-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  outline: none;
}

.coordinate-search-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.coordinate-search-alert {
  margin-bottom: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
}

.coordinate-search-alert.success {
  background: #ecfdf5;
  color: #047857;
}

.coordinate-search-alert.error {
  background: #fff1f2;
  color: #be123c;
}

.coordinate-search-results {
  display: grid;
  gap: 7px;
  max-height: 190px;
  margin-bottom: 10px;
  overflow: auto;
}

.coordinate-search-result {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #1e293b;
  text-align: left;
}

.coordinate-search-result:hover {
  border-color: var(--primary);
  background: #f0fdfa;
}

.coordinate-search-result span {
  line-height: 1.45;
}

.coordinate-search-result small {
  color: var(--muted);
}

.coordinate-picker-value {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #eef6f5;
  color: #17685f;
  font-weight: 700;
}

.coordinate-picker-map {
  width: 100%;
  height: min(55vh, 520px);
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #e8eef3;
}

.coordinate-picker-tip {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.coordinate-picker-actions {
  justify-content: flex-end;
}

.corner-event-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.corner-event-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.corner-event-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.corner-event-index,
.corner-event-mobile-meta {
  display: none;
}

.corner-event-copy {
  min-width: 0;
}

.corner-event-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.corner-event-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.corner-event-status.is-active {
  background: #dcfce7;
  color: #15803d;
}

.corner-event-status.is-pending {
  background: #fff7ed;
  color: #c2410c;
}

.corner-event-status.is-ended {
  background: #f1f5f9;
  color: #475569;
}

.corner-event-badges {
  flex-wrap: wrap;
  margin-top: 10px;
}

.corner-event-desktop-meta {
  grid-column: 1;
}

.corner-item-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
}

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

.button.danger,
.badge.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.badge.success {
  background: #ecfdf5;
  color: #047857;
}

.empty-box,
.empty-cell {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.corner-signup-table {
  min-width: 920px;
}

.signup-batch-actions {
  margin: -4px 0 14px;
  align-items: end;
}

.signup-select,
#selectAllSignups {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.corner-analytics-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.corner-analytics-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(4, auto);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.corner-analytics-row span {
  color: var(--muted);
  white-space: nowrap;
}

.corner-ops-list,
.corner-report-list {
  display: grid;
  gap: 8px;
}

.corner-ops-item,
.corner-report-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(5, auto);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.corner-ops-item {
  grid-template-columns: 120px minmax(0, 1fr);
  cursor: pointer;
}

.corner-ops-item.high {
  border-color: #fecdd3;
  background: #fff1f2;
}

.corner-ops-item.medium {
  border-color: #fde68a;
  background: #fffbeb;
}

.corner-ops-item span,
.corner-report-row span {
  color: var(--muted);
  white-space: nowrap;
}

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

.corner-reminder-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.corner-reminder-card input,
.corner-reminder-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

@media (max-width: 720px) {
  .corner-report-row,
  .corner-ops-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .corner-reminder-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.status-select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.signup-review-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.review-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.review-badge.approved {
  background: #ecfdf5;
  color: #047857;
}

.review-badge.rejected {
  background: #fff1f2;
  color: #be123c;
}

.review-badge.pending {
  background: #fff7ed;
  color: #c2410c;
}

.no-show-count {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.no-show-count.has-record {
  background: #fff7ed;
  color: #c2410c;
}

.corner-qr-panel {
  margin-top: 18px;
  padding: 22px;
}

.corner-mobile-only {
  display: none;
}

.corner-mobile-summary,
.corner-mobile-settings-list {
  display: none;
}

.corner-qr-content {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.corner-qr-content img {
  width: 280px;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.corner-qr-content textarea {
  box-sizing: border-box;
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  color: #334155;
  resize: vertical;
}

.checkin-code-content {
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  align-items: center;
}

.checkin-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: #087f75;
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 0;
  word-spacing: 18px;
  font-variant-numeric: tabular-nums;
}

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

/* Reference dashboard templates */
body {
  background: #f7f9fc;
}

.layout {
  grid-template-columns: 236px minmax(0, 1fr);
  background: #f7f9fc;
  transition: grid-template-columns 0.2s ease;
}

.layout.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.main {
  padding: 0;
  background: #f7f9fc;
}

.content {
  margin: 0;
  padding: 24px 20px 28px;
}

.admin-shell-sidebar {
  gap: 0;
  padding: 0;
  background: #fff;
  border-right-color: #e5eaf1;
  box-shadow: 8px 0 24px rgba(15, 23, 42, 0.03);
  transition: width 0.2s ease;
}

.admin-brand {
  min-height: 72px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #08766f 0%, #07575f 100%);
  color: #fff;
}

.layout.sidebar-collapsed .admin-brand {
  justify-content: center;
  padding: 16px 10px;
}

.layout.sidebar-collapsed .admin-brand > div:not(.brand-mark) {
  display: none;
}

.admin-brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fff;
  color: #08766f;
  font-size: 18px;
}

.admin-brand .brand-title {
  color: #fff;
  font-size: 18px;
  letter-spacing: 0;
}

.admin-brand .brand-subtitle {
  display: none;
}

.sidebar-menu,
.english-sidebar-menu {
  display: grid;
  gap: 4px;
  padding: 18px 12px;
  border: 0;
  background: transparent;
}

.sidebar .tab,
.english-sidebar-menu .tab {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 46px;
  width: 100%;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #253043;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.layout.sidebar-collapsed .sidebar-menu {
  padding: 18px 10px;
}

.layout.sidebar-collapsed .sidebar .tab {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 44px;
  padding: 0;
}

.layout.sidebar-collapsed .sidebar .tab > span:not(.tab-icon),
.layout.sidebar-collapsed .sidebar .tab i,
.layout.sidebar-collapsed .sidebar-group-title {
  display: none;
}

.sidebar .tab:hover {
  background: #f1f5f9;
}

.sidebar .system-menu-header {
  grid-template-columns: 24px minmax(0, 1fr) 38px;
  padding-right: 0;
  overflow: hidden;
}

.system-menu-toggle {
  display: grid;
  width: 38px;
  min-height: 46px;
  place-items: center;
  cursor: pointer;
}

.system-menu-toggle:hover {
  background: rgba(15, 118, 110, 0.08);
}

.layout.sidebar-collapsed .sidebar .system-menu-header {
  grid-template-columns: 1fr;
  padding: 0;
}

.layout.sidebar-collapsed .system-menu-toggle {
  display: none;
}

.sidebar .tab.active,
.english-sidebar-menu .tab.active {
  background: linear-gradient(180deg, #eafaf8, #e7f7f5);
  color: #07877c;
}

.sidebar .tab.feedback-alert-tab {
  border: 1px solid transparent;
  background: transparent;
  color: #be123c;
  box-shadow: none;
}

.sidebar .tab.feedback-alert-tab:hover,
.sidebar .tab.feedback-alert-tab.active {
  background: transparent;
  color: #9f1239;
}

.feedback-alert-tab .tab-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-weight: 900;
}

.feedback-tab-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: end;
  padding: 3px 7px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.feedback-tab-badge b,
.feedback-tab-badge span {
  display: inline-block;
  line-height: 1;
}

.layout.sidebar-collapsed .feedback-tab-badge {
  display: block;
  width: 8px;
  height: 8px;
  padding: 0;
  overflow: hidden;
  color: transparent;
}

.english-sidebar-menu .sub-tab,
.sidebar-menu .sub-tab {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 38px;
  padding-left: 30px;
  color: #4b5565;
  font-weight: 700;
}

.sidebar-menu .third-tab {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  min-height: 32px;
  padding-left: 44px;
  border-color: transparent;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
}

.sidebar-menu .third-tab.active {
  border-color: #b7e4dc;
  background: #f0fdfa;
  color: #0f766e;
}

.english-sidebar-menu .sub-tab.is-collapsed,
.sidebar-menu .sub-tab.is-collapsed {
  display: none;
}

.english-sidebar-menu .dropdown-tab i,
.sidebar-menu .dropdown-tab i {
  justify-self: end;
}

.english-sidebar-menu .sub-tab.active,
.sidebar-menu .sub-tab.active {
  background: #eef2f7;
  color: #111827;
}

.sidebar-menu .dropdown-menu-group {
  padding-bottom: 0;
}

.tertiary-tabs {
  margin: 0 0 14px;
  overflow-x: auto;
}

.tertiary-tabs .tab {
  white-space: nowrap;
}

.tab-icon,
.tab-spacer {
  color: currentColor;
  font-size: 17px;
}

.sidebar-group {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
}

.sidebar-group-title {
  margin: 10px 12px 4px;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.sidebar-collapse {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 24px);
  min-height: 44px;
  margin: auto 12px 18px;
  padding: 0 14px;
  border: 1px solid #e5eaf1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-weight: 800;
}

.layout.sidebar-collapsed .sidebar-collapse {
  justify-content: center;
  width: 44px;
  margin: auto 14px 18px;
  padding: 0;
}

.layout.sidebar-collapsed .sidebar-collapse span:last-child {
  display: none;
}

.menu-button[aria-pressed="true"] {
  background: #e6fffb;
  border-color: #99d2cb;
  color: #08766f;
}

.admin-topbar {
  min-height: 70px;
  margin: 0;
  padding: 0 22px;
  align-items: center;
  flex-wrap: nowrap;
  border-bottom: 1px solid #e5eaf1;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.topbar-left {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.admin-topbar h1 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 950;
}

.breadcrumb {
  margin-top: 2px;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb span {
  margin: 0 10px;
  color: #98a2b3;
}

.icon-button {
  position: relative;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font-size: 20px;
}

.menu-button {
  display: inline-flex;
  width: auto;
  min-width: 74px;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 900;
}

.menu-button:hover {
  border-color: #d9e2ec;
  background: #f8fafc;
}

.menu-icon {
  font-size: 20px;
  line-height: 1;
}

.menu-button-label {
  font-size: 13px;
  white-space: nowrap;
}

.icon-button b {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  line-height: 17px;
}

.topbar-utility-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.topbar-utility-button:hover {
  border-color: #99d2cb;
  background: #e6fffb;
  color: #08766f;
}

.search-box,
.inline-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  background: #fff;
  color: #667085;
}

.global-search {
  position: relative;
  flex: 0 1 310px;
  min-width: 190px;
  max-width: 390px;
}

.global-search .search-box {
  width: 100%;
  cursor: text;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.global-search .search-box input {
  width: auto;
  flex: 1;
}

.global-search.is-open .search-box,
.global-search .search-box:focus-within {
  border-color: #67bdb5;
  box-shadow: 0 0 0 3px rgba(15, 157, 144, 0.12);
}

.search-box input,
.inline-search input {
  width: 220px;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #667085;
  box-shadow: none;
}

.search-box kbd {
  padding: 2px 8px;
  border: 1px solid #d9e2ec;
  border-radius: 5px;
  background: #f8fafc;
  color: #98a2b3;
  font-size: 12px;
  white-space: nowrap;
}

.global-search-panel {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 8px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 110px));
  padding: 8px;
  overflow-y: auto;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.global-search-panel[hidden] {
  display: none;
}

.global-search-caption {
  padding: 7px 9px 6px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.global-search-result {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1f2937;
  text-align: left;
}

.global-search-result:hover,
.global-search-result.active {
  background: #e6fffb;
  color: #08766f;
}

.global-search-result-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  color: #08766f;
  font-size: 14px;
  font-weight: 900;
}

.global-search-result-copy {
  min-width: 0;
  flex: 1;
}

.global-search-result-copy b,
.global-search-result-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result-copy b {
  font-size: 14px;
}

.global-search-result-copy small {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
}

.global-search-enter {
  color: #98a2b3;
  font-size: 11px;
  opacity: 0;
}

.global-search-result.active .global-search-enter,
.global-search-result:hover .global-search-enter {
  opacity: 1;
}

.global-search-empty {
  display: grid;
  gap: 5px;
  padding: 26px 18px;
  color: #344054;
  text-align: center;
}

.global-search-empty span {
  color: #667085;
  font-size: 12px;
}

.refresh-button {
  min-height: 40px;
  background: #fff;
  color: #07877c;
}

.user-chip {
  display: flex;
  flex: 0 1 170px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 190px;
  min-height: 42px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #172033;
}

.user-chip .avatar,
.mini-avatar {
  position: relative;
  display: inline-grid;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e0f2fe;
  place-items: center;
  overflow: hidden;
}

.user-chip b,
.user-chip small {
  display: block;
  max-width: 112px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip small {
  color: #667085;
  font-size: 11px;
}

.help-text {
  color: #344054;
  font-weight: 800;
}

.admin-topbar .top-actions {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  overflow: hidden;
}

.admin-topbar .top-actions > .button,
.admin-topbar .top-actions > .topbar-utility-button {
  flex: 0 0 auto;
}

@media (max-width: 1180px) {
  .admin-topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar-left {
    gap: 12px;
  }

  .global-search {
    flex-basis: 260px;
    min-width: 170px;
  }

  .user-chip {
    max-width: 128px;
  }

  .user-chip small,
  .user-chip i {
    display: none;
  }
}

@media (max-width: 1020px) {
  .topbar-utility-button {
    min-width: 42px;
    padding: 0 8px;
  }

  .global-search {
    flex-basis: 220px;
    min-width: 150px;
  }
}

.dashboard-template,
.english-ops-template {
  max-width: 1480px;
  margin: 0 auto;
}

.card {
  border-color: #e1e7ef;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.045);
}

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

.dashboard-metric-card,
.english-stat-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 126px;
  padding: 22px;
}

.metric-icon {
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  place-items: center;
}

.metric-icon.teal { background: linear-gradient(135deg, #0d9488, #0f766e); }
.metric-icon.blue { background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.metric-icon.green { background: linear-gradient(135deg, #16a34a, #0f9f7a); }
.metric-icon.amber { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

.metric-copy,
.english-stat-card span:last-child {
  display: grid;
  gap: 6px;
}

.dashboard-metric-card small,
.english-stat-card small {
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.dashboard-metric-card strong,
.english-stat-card strong {
  color: #080f1f;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.dashboard-metric-card em,
.english-stat-card em {
  color: #475467;
  font-size: 13px;
  font-style: normal;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr);
  gap: 18px;
  margin-top: 22px;
}

.dashboard-panel {
  padding: 18px;
}

.trend-panel,
.word-panel {
  min-width: 0;
}

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

.panel-head h2 {
  margin: 0;
  color: #111827;
  font-size: 19px;
  font-weight: 950;
}

.panel-actions {
  display: flex;
  gap: 10px;
}

.mini-select {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-weight: 800;
}

.trend-range-select {
  min-width: 106px;
  padding-right: 28px;
}

.link-button,
.table-link {
  border: 0;
  background: transparent;
  color: #1677ff;
  font-weight: 900;
}

.mini-avatar img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #475467;
  font-size: 12px;
}

.legend i,
.teal-dot,
.blue-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.teal-dot { background: #0d9488; }
.blue-dot { background: #1677ff; }

.chart-frame {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 270px;
}

.chart-empty-box {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  width: auto;
  min-width: min(280px, 100%);
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.chart-y-axis {
  display: grid;
  align-content: space-between;
  padding-top: 12px;
  padding-bottom: 45px;
  color: #667085;
  font-size: 12px;
}

.chart-plot {
  min-width: 0;
}

.chart-plot svg {
  width: 100%;
  height: 250px;
}

.grid-line {
  fill: none;
  stroke: #d9e2ec;
  stroke-dasharray: 3 4;
}

.area-fill { fill: url(#visitorsFill); }
.area-line,
.blue-line {
  fill: none;
  stroke-width: 3;
}
.area-line { stroke: #0d9488; }
.blue-line { stroke: #1677ff; }
.chart-points circle {
  fill: #fff;
  stroke-width: 3;
}
.teal-points circle { stroke: #0d9488; }
.blue-points circle { stroke: #1677ff; }

.chart-x-axis text {
  fill: #667085;
  font-size: 12px;
}
.blue-points circle { stroke: #1677ff; }

.chart-x-axis {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  color: #667085;
  font-size: 12px;
}

.notice-feed {
  display: grid;
}

.notice-feed-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid #eef2f7;
}

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

.notice-feed-row strong {
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-feed-row time {
  color: #667085;
}

.notice-tag {
  display: inline-flex;
  justify-content: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 5px;
  color: #1677ff;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 900;
}

.notice-tag.pin { color: #dc2626; background: #fee2e2; }
.notice-tag.ok { color: #059669; background: #dcfce7; }
.notice-tag.update { color: #7c3aed; background: #ede9fe; }
.notice-tag.plain { color: #334155; background: transparent; }

.word-panel {
  grid-column: 1;
}

.user-panel {
  grid-column: 2;
}

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

.stat-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.stat-card b,
.stat-card span,
.stat-card small {
  display: block;
}

.stat-card b {
  font-size: 24px;
  color: #0f172a;
}

.stat-card span {
  margin-top: 2px;
  font-weight: 800;
  color: #334155;
}

.stat-card small {
  margin-top: 4px;
  color: #64748b;
}

.stat-card .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 900;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.info-list p {
  margin: 6px 0;
  color: #475569;
}

.soft-panel {
  padding: 14px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.soft-panel h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.compact-list {
  margin: 0;
  padding-left: 18px;
  color: #475569;
}

.word-tabs {
  display: flex;
  gap: 26px;
  margin: 4px 0 12px;
  color: #475467;
  font-weight: 800;
}

.word-tabs span {
  padding: 0 0 9px;
}

.word-tabs .active {
  color: #07877c;
  border-bottom: 3px solid #0d9488;
}

.template-table {
  border-radius: 7px;
}

.template-table th {
  background: #fbfdff;
  color: #344054;
  white-space: nowrap;
}

.template-table td {
  color: #111827;
  white-space: nowrap;
}

.template-table .badge {
  min-height: 22px;
  border-radius: 5px;
}

.qr-review-thumb-button {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
}

.qr-review-thumb-button:hover,
.qr-review-thumb-button:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: none;
}

.qr-review-thumb-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pagination-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: #344054;
  font-size: 13px;
}

.pagination-row button,
.pagination-row b,
.pagination-row input,
.pagination-row select {
  min-width: 34px;
  height: 32px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.pagination-row b {
  display: inline-grid;
  border-color: #1677ff;
  color: #1677ff;
  place-items: center;
}

.risk-work-items-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: #475569;
  font-size: 13px;
}

.risk-work-items-pagination .pagination-row {
  margin-top: 0;
}

.template-kv-table {
  display: grid;
}

.template-kv-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(64px, auto);
  gap: 12px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid #eef2f7;
}

.template-kv-table div:last-child {
  border-bottom: 0;
}

.template-kv-table span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.template-kv-table span b {
  display: block;
  overflow: hidden;
  color: #344054;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-kv-table strong {
  color: #111827;
  font-size: 18px;
  font-weight: 950;
  text-align: right;
}

.template-kv-table em {
  color: #98a2b3;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.english-ops-template {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 16px;
}

.english-subpage-template {
  grid-template-columns: minmax(0, 1fr);
}

.english-main-column,
.english-side-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.english-subpage-column {
  width: 100%;
}

.english-subpage-column > .ops-side-card {
  max-width: 760px;
}

.english-subpage-column > .switch-side-card {
  max-width: 640px;
}

.invitation-page-grid {
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 1.05fr);
  align-items: start;
}

.invitation-page-grid > .ops-side-card {
  max-width: none;
}

.english-main-column > *,
.english-side-column > * {
  min-width: 0;
  max-width: 100%;
}

.english-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.english-page-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 950;
}

.english-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.english-stat-card {
  min-height: 116px;
  padding: 18px;
}

.english-table-card,
.english-admin-card,
.ops-side-card {
  padding: 16px;
}

.english-table-card,
.english-admin-card {
  overflow: hidden;
}

.english-filter-row {
  display: grid;
  grid-template-columns: 132px 132px minmax(210px, 1fr) minmax(190px, 1.1fr) 70px 70px;
  gap: 12px;
  margin-bottom: 14px;
}

.english-filter-row .wide {
  width: 100%;
}

.english-workbench-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #dbe5f3;
  border-radius: 8px;
  background: #f8fbff;
}

.english-workbench-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.english-workbench-row strong {
  color: #111827;
  font-size: 15px;
}

.english-workbench-row span {
  color: #667085;
  line-height: 1.5;
}

.english-corner-mail-box {
  width: 100%;
  display: grid;
  gap: 8px;
  margin: -4px 0 14px;
  padding: 12px 14px;
  border: 1px solid #dbe5f3;
  border-radius: 8px;
  background: #f8fbff;
}

.english-corner-mail-drawer {
  width: min(560px, 100vw);
}

.english-corner-mail-drawer .english-corner-mail-box {
  margin: 0;
  min-height: calc(100vh - 75px);
  align-content: start;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.english-corner-mail-box .compact-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr);
  gap: 8px;
}

.english-corner-mail-box .form-help {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.english-corner-mail-box .field {
  margin: 0;
}

.english-corner-mail-box input,
.english-corner-mail-box textarea {
  min-height: 40px;
}

.english-corner-mail-box textarea {
  resize: vertical;
}

.english-corner-mail-preview {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #dbe5f3;
  border-radius: 8px;
  background: #f8fbff;
}

.english-corner-mail-preview strong {
  color: #0f172a;
  font-size: 14px;
}

.english-corner-mail-preview pre {
  max-height: 240px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #475467;
  font: inherit;
  line-height: 1.55;
}

.activity-table table {
  min-width: 980px;
}

.activity-name-cell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 220px;
}

.activity-thumb {
  display: grid;
  width: 54px;
  height: 42px;
  border-radius: 5px;
  background: linear-gradient(135deg, #dbeafe, #0f766e);
  color: #fff;
  font-weight: 950;
  place-items: center;
}

.activity-name-cell strong,
.activity-name-cell small {
  display: block;
}

.activity-name-cell small {
  margin-top: 4px;
  color: #667085;
}

.type-pill,
.status-pill,
.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  background: #e0f2fe;
  color: #1677ff;
  font-weight: 900;
}

.status-pill.green { color: #047857; background: #dcfce7; }
.status-pill.blue { color: #1677ff; background: #e0f2fe; }
.status-pill.amber { color: #c2410c; background: #fff7ed; }
.status-pill.gray { color: #475467; background: #eef2f7; }

.user-status-stack {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.ui-toggle {
  display: inline-block;
  width: 25px;
  height: 14px;
  margin: 0 6px;
  border-radius: 999px;
  background: #cbd5e1;
  vertical-align: middle;
}

.ui-toggle::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 2px;
  border-radius: 999px;
  background: #fff;
}

.ui-toggle.on {
  background: #0d9488;
}

.ui-toggle.on::after {
  margin-left: 13px;
}

.admin-form-strip {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) 112px auto auto;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-form-strip input,
.admin-form-strip select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #fff;
}

.admin-form-strip label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #344054;
  font-weight: 800;
}

.admin-mini-profile {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.permission-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -2px 0 12px;
}

.permission-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #fbfdff;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.permission-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 180px;
}

.permission-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  background: #e6fffb;
  color: #07877c;
  font-size: 12px;
  font-weight: 900;
}

.permission-badge.muted-badge {
  background: #eef2f7;
  color: #667085;
}

.mini-avatar {
  width: 28px;
  height: 28px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 900;
}

.table-summary {
  margin: 10px 0 0;
  font-size: 13px;
}

.ops-side-card {
  align-content: start;
}

.big-code {
  margin: 8px 0;
  padding: 16px;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
  color: #07877c;
  font-size: 24px;
  font-weight: 950;
  text-align: center;
  letter-spacing: 1px;
}

.full-button {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
}

.side-help {
  font-size: 12px;
  line-height: 1.75;
}

.invite-counts {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  color: #667085;
  font-size: 12px;
}

.usage-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.usage-summary-grid div {
  padding: 16px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fbfdff;
}

.usage-summary-grid span,
.usage-summary-grid strong {
  display: block;
}

.usage-summary-grid span {
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.usage-summary-grid strong {
  margin-top: 8px;
  color: #111827;
  font-size: 28px;
}

.invitation-usage-list {
  display: grid;
  gap: 10px;
}

.usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  padding: 12px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fff;
}

.usage-row code {
  overflow: hidden;
  color: #07877c;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-row small {
  grid-column: 1 / -1;
  color: #667085;
}

.checkin-code {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0 8px;
  padding: 10px 26px;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
}

.checkin-code span {
  display: grid;
  height: 42px;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
  color: #07877c;
  font-size: 30px;
  font-weight: 950;
  place-items: center;
}

.checkin-qr-guide {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fbfdff;
}

.qr-guide-icon {
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #fff;
  font-size: 30px;
  font-weight: 950;
  place-items: center;
}

.checkin-qr-guide strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-size: 17px;
}

.checkin-qr-guide p {
  margin: 0;
  line-height: 1.65;
}

.timer {
  margin: 0;
  text-align: center;
}

.timer b {
  color: #ef4444;
}

.switch-side-card .feature-switch.compact {
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 54px;
  margin-bottom: 8px;
}

.user-admin-template {
  display: grid;
  gap: 18px;
  max-width: 1480px;
  margin: 0 auto;
}

.user-admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 118, 111, 0.08), rgba(37, 99, 235, 0.04)),
    #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.045);
}

.user-admin-hero h2 {
  margin: 4px 0 8px;
  color: #111827;
  font-size: 26px;
  font-weight: 950;
}

.user-admin-hero p {
  max-width: 720px;
  margin: 0;
  color: #475467;
  line-height: 1.65;
}

.user-admin-hero-actions,
.user-toolbar-actions,
.user-pagination,
.user-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-admin-hero-actions {
  justify-content: flex-end;
}

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

.user-metric-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 18px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.045);
}

button.user-metric-card {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.risk-settings-entry {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.risk-settings-entry:hover,
.risk-settings-entry:focus-visible {
  border-color: #f0a6b8;
  box-shadow: 0 12px 30px rgba(190, 18, 60, 0.12);
  outline: none;
  transform: translateY(-2px);
}

.forum-risk-audit-panel {
  margin-top: 18px;
}

.risk-audit-select-cell {
  width: 44px;
  text-align: center;
}

.risk-audit-select-cell input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #0f8278;
  cursor: pointer;
}

.risk-event-title {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #0f766e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.risk-event-title:hover,
.risk-event-title:focus-visible {
  text-decoration: underline;
}

.risk-event-detail-modal {
  width: min(620px, calc(100vw - 32px));
}

.risk-event-evidence {
  display: flex;
  justify-content: center;
  padding: 16px;
  border: 1px solid #d7e0e8;
  background: #f8fafc;
}

.risk-event-evidence img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.risk-event-detail-list {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  border-top: 1px solid #e2e8f0;
}

.risk-event-detail-list > div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid #e2e8f0;
}

.risk-event-detail-list dt {
  color: #64748b;
  font-weight: 600;
}

.risk-event-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.risk-event-content {
  white-space: pre-wrap;
}

.field-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.user-metric-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 8px;
  background: #0d9488;
  color: #fff;
  font-weight: 950;
}

.user-metric-card.teal .user-metric-icon { background: linear-gradient(135deg, #0d9488, #0f766e); }
.user-metric-card.blue .user-metric-icon { background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.user-metric-card.green .user-metric-icon { background: linear-gradient(135deg, #16a34a, #0f9f7a); }
.user-metric-card.amber .user-metric-icon { background: linear-gradient(135deg, #f59e0b, #b45309); }
.user-metric-card.rose .user-metric-icon { background: linear-gradient(135deg, #e11d48, #be123c); }

.user-metric-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.user-metric-copy small {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.user-metric-copy strong {
  color: #080f1f;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.user-metric-copy em {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.user-list-card,
.user-detail-card {
  min-width: 0;
  padding: 18px;
  border-radius: 8px;
}

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

.user-toolbar h3,
.user-detail-head h3,
.detail-section h4 {
  margin: 0;
  color: #111827;
  font-weight: 950;
}

.user-toolbar h3 {
  font-size: 20px;
}

.user-toolbar p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 13px;
}

.user-search-box {
  height: 38px;
  min-width: 240px;
}

.user-search-box input {
  width: 180px;
}

.compact-select {
  height: 38px;
  max-width: 150px;
  padding: 0 10px;
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-weight: 800;
}

.compact-select.wide {
  max-width: 190px;
}

.managed-user-table {
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #fff;
}

.managed-user-table table {
  min-width: 940px;
}

.managed-user-table th {
  background: #fbfdff;
  color: #475467;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.managed-user-table td {
  color: #111827;
  vertical-align: middle;
  white-space: nowrap;
}

.managed-user-table .user-status-stack {
  flex-direction: column;
  align-items: flex-start;
}

.managed-user-table tbody tr:hover {
  background: #f8fafc;
}

.managed-user-table tbody tr.is-disabled {
  background: #fffbf7;
}

.user-table-profile {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  max-width: 210px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.user-table-profile strong,
.user-table-profile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-table-profile strong {
  color: #111827;
  font-size: 14px;
  font-weight: 950;
}

.user-table-profile small {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
}

.mono-cell {
  font-family: "Segoe UI", Consolas, monospace;
  font-size: 12px;
}

.user-pagination {
  justify-content: flex-end;
  margin-top: 14px;
  color: #475467;
  font-size: 13px;
}

.user-pagination b {
  color: #1677ff;
}

.user-detail-card {
  position: static;
}

.user-detail-drawer {
  width: min(620px, 100vw);
}

.user-detail-drawer-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.user-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-detail-card .user-detail-head {
  margin-bottom: 16px;
}

.user-detail-profile {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #f8fafc;
}

.user-detail-profile .user-status-stack {
  justify-self: end;
}

.user-detail-avatar {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #0d9488, #1677ff);
  color: #fff;
  font-weight: 950;
  overflow: hidden;
}

.user-detail-avatar img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-detail-profile strong,
.user-detail-profile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-detail-profile strong {
  font-size: 17px;
  font-weight: 950;
}

.user-detail-profile small {
  margin-top: 3px;
  color: #667085;
}

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

.detail-kv-grid div {
  display: grid;
  gap: 5px;
  min-height: 66px;
  padding: 12px;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #fff;
}

.detail-kv-grid span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.detail-kv-grid strong {
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-openid-button {
  width: 100%;
  min-height: 36px;
  margin-bottom: 14px;
  border: 1px solid #d9e2ec;
  border-radius: 7px;
  background: #fff;
  color: #1677ff;
  font-weight: 900;
}

.copy-openid-button:disabled {
  color: #98a2b3;
  cursor: not-allowed;
}

.user-detail-card .field,
.user-detail-drawer .field {
  margin-bottom: 12px;
}

.user-detail-card textarea,
.user-detail-drawer textarea {
  min-height: 92px;
  resize: vertical;
}

.detail-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}

.detail-section h4 {
  margin-bottom: 10px;
  font-size: 15px;
}

.user-reminder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.user-reminder-head h4 {
  margin: 0;
}

.user-reminder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: -2px 0 12px;
  color: #667085;
  font-size: 12px;
}

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

.learning-grid span {
  display: grid;
  gap: 3px;
  min-height: 58px;
  place-items: center;
  border-radius: 8px;
  background: #f8fafc;
  color: #667085;
}

.learning-grid b {
  color: #0f766e;
  font-size: 18px;
  font-weight: 950;
}

.learning-grid small {
  font-size: 12px;
}

.login-history-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-history-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f7;
  color: #344054;
  font-size: 12px;
}

.login-history-list li:last-child {
  border-bottom: 0;
}

.login-history-list span,
.login-history-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-activity-list li {
  display: grid;
  grid-template-columns: 54px minmax(130px, 180px) minmax(0, 1fr);
  align-items: center;
}

.activity-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 40px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #1677ff;
  font-weight: 800;
}

.activity-type.open {
  background: #ecfdf3;
  color: #079455;
}

.activity-type.checkin {
  background: #fff7ed;
  color: #f97316;
}

.activity-time {
  color: #667085;
}

.empty-detail {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.user-detail-placeholder {
  max-width: 260px;
  text-align: center;
}

.user-detail-placeholder span {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  color: #0f766e;
  font-weight: 950;
}

.user-detail-placeholder h3 {
  margin: 14px 0 8px;
  font-size: 18px;
}

.user-detail-placeholder p {
  margin: 0;
  color: #667085;
  line-height: 1.6;
}

@media (max-width: 1380px) {
  .user-admin-grid {
    grid-template-columns: 1fr;
  }

  .user-detail-card {
    position: static;
  }

  .english-ops-template {
    grid-template-columns: 1fr;
  }

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

  .english-side-column .switch-side-card {
    grid-column: 1 / -1;
  }

  .english-corner-entry-grid {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 1.12fr);
  }

  .english-corner-dashboard-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  }

  .english-corner-dashboard-column:last-child {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .english-corner-entry-card:nth-child(4) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .notice-management-layout {
    grid-template-columns: 1fr;
  }

  .notice-sidebar-panel {
    position: static;
  }

  .dashboard-metrics,
  .english-stat-grid,
  .english-side-column {
    grid-template-columns: 1fr;
  }

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

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

  .email-reminder-grid {
    grid-template-columns: 1fr;
  }

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

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

  .email-reminder-toolbar .row-actions,
  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
  }

  .word-panel,
  .user-panel {
    grid-column: auto;
  }

  .english-filter-row,
  .admin-form-strip,
  .invitation-page-grid {
    grid-template-columns: 1fr;
  }

  .english-workbench-row {
    align-items: stretch;
    flex-direction: column;
  }

  .english-workbench-row .button {
    width: 100%;
  }

  .english-corner-mail-box {
    max-width: none;
  }

  .english-corner-mail-box .compact-grid {
    grid-template-columns: 1fr;
  }

  .corner-admin-grid,
  .corner-qr-content {
    grid-template-columns: 1fr;
  }

  .english-corner-entry {
    padding: 18px;
  }

  .english-corner-entry-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .english-corner-dashboard-grid,
  .english-corner-dashboard-column:last-child {
    grid-template-columns: 1fr;
  }

  .english-corner-dashboard-column:last-child {
    grid-column: auto;
  }

  .english-corner-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .english-corner-entry-card {
    min-height: 0;
    padding: 18px;
  }

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

  .corner-event-item {
    grid-template-columns: 1fr;
  }

  .coordinate-picker-modal {
    padding: 10px;
  }

  .coordinate-picker-card {
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

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

  .coordinate-search-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .coordinate-search-form input {
    min-width: 0;
    font-size: 16px;
  }

  .coordinate-picker-map {
    height: 52vh;
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .reading-meta-grid {
    grid-template-columns: 1fr;
  }

  .login-shell {
    min-height: 100dvh;
    padding: 16px;
    place-items: center;
  }

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

  .login-card h1 {
    font-size: 26px;
  }

  .login-desc {
    margin: 12px 0 18px;
  }

  .login-form {
    gap: 12px;
  }

  .login-form .field input,
  .login-button {
    min-height: 48px;
    font-size: 16px;
  }

  .login-totp-secret-row {
    grid-template-columns: 1fr;
  }

  .login-totp-button {
    min-height: 44px;
  }

  .corner-admin-dashboard {
    width: 100%;
    padding: 0 12px calc(92px + env(safe-area-inset-bottom));
  }

  .corner-admin-dashboard[data-mobile-section="events"] [data-mobile-panel]:not([data-mobile-panel="events"]),
  .corner-admin-dashboard[data-mobile-section="signups"] [data-mobile-panel]:not([data-mobile-panel="signups"]),
  .corner-admin-dashboard[data-mobile-section="checkin"] [data-mobile-panel]:not([data-mobile-panel="checkin"]),
  .corner-admin-dashboard[data-mobile-section="settings"] [data-mobile-panel]:not([data-mobile-panel="settings"]) {
    display: none !important;
  }

  .corner-mobile-only {
    display: block;
  }

  .corner-mobile-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 12px;
  }

  .corner-mobile-summary article {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    min-height: 104px;
    align-items: center;
    justify-items: center;
    padding: 12px 6px;
    border: 1px solid #dbe5f3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    text-align: center;
  }

  .corner-mobile-summary-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: #0f8b7c;
    color: #fff;
    font-size: 16px;
    font-weight: 950;
  }

  .corner-mobile-summary-icon.blue {
    background: #2f7cf6;
  }

  .corner-mobile-summary-icon.green {
    background: #16a34a;
  }

  .corner-mobile-summary span {
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
  }

  .corner-mobile-summary strong {
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
  }

  .corner-mobile-summary small {
    color: #667085;
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .corner-admin-topbar {
    position: sticky;
    z-index: 500;
    top: 0;
    align-items: flex-start;
    margin: 0 -12px 12px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(243, 246, 251, 0.96);
    backdrop-filter: blur(10px);
  }

  .corner-admin-topbar h1 {
    margin: 2px 0 0;
    font-size: 22px;
  }

  .corner-admin-topbar .muted {
    display: none;
  }

  .corner-admin-actions {
    gap: 8px;
  }

  .corner-admin-actions .button {
    min-height: 40px;
    padding: 0 11px;
  }

  .corner-admin-grid {
    gap: 12px;
    margin-top: 12px;
  }

  .corner-admin-dashboard[data-mobile-section="events"] .corner-admin-grid,
  .corner-admin-dashboard[data-mobile-section="signups"] .corner-admin-grid {
    display: block;
  }

  .corner-admin-panel,
  .corner-qr-panel {
    padding: 16px;
    border-radius: 14px;
  }

  .corner-mobile-bottom-nav {
    position: fixed;
    z-index: 900;
    right: 10px;
    bottom: 0;
    left: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border: 1px solid #dbe5f3;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.11);
    backdrop-filter: blur(12px);
  }

  .corner-mobile-bottom-nav button {
    display: grid;
    place-items: center;
    gap: 3px;
    min-height: 54px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #667085;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
  }

  .corner-mobile-bottom-nav b {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 9px;
    background: #edf2f7;
    color: #475569;
    font-size: 13px;
  }

  .corner-mobile-bottom-nav button.active {
    background: #e6f7f4;
    color: #0f766e;
  }

  .corner-mobile-bottom-nav button.active b {
    background: #0f8b7c;
    color: #fff;
  }

  .corner-mobile-settings-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
  }

  .corner-mobile-setting-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 12px;
    border: 1px solid #dbe5f3;
    border-radius: 12px;
    background: #fff;
  }

  .corner-mobile-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: #0f8b7c;
    color: #fff;
    font-weight: 950;
  }

  .corner-mobile-card-title {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
  }

  .corner-mobile-card-title strong,
  .corner-mobile-setting-card strong,
  .corner-mobile-card-title small,
  .corner-mobile-setting-card small {
    display: block;
    min-width: 0;
  }

  .corner-mobile-card-title strong,
  .corner-mobile-setting-card strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
  }

  .corner-mobile-card-title small,
  .corner-mobile-setting-card small {
    margin-top: 4px;
    color: #667085;
    line-height: 1.45;
  }

  .corner-mobile-setting-card b {
    padding: 5px 8px;
    border-radius: 999px;
    background: #e6f7f4;
    color: #0f766e;
    font-size: 12px;
  }

  .english-corner-admin-item {
    padding: 14px;
    border-radius: 15px;
  }

  .english-corner-metric-grid {
    grid-template-columns: 1fr;
  }

  .english-corner-metric {
    min-height: 0;
  }

  .english-corner-entry .feature-switch {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .english-corner-entry .feature-switch .badge {
    grid-column: 2;
    justify-self: start;
  }

  .english-corner-admin-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

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

  .admin-project-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-project-item .badge {
    grid-column: 2;
    justify-self: start;
  }

  .section-head {
    align-items: flex-start;
    gap: 10px;
  }

  .section-head h2 {
    font-size: 20px;
  }

  .section-head .button {
    flex: 0 0 auto;
  }

  .corner-event-form {
    margin-top: 14px;
    padding-top: 14px;
    overflow: hidden;
  }

  .corner-event-form .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .corner-event-form .wide {
    grid-column: auto;
  }

  .corner-event-form .field,
  .corner-event-form .check-field,
  .corner-event-form .form-grid > div {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .corner-event-form input,
  .corner-event-form select,
  .corner-event-form textarea,
  .status-select {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 46px;
    font-size: 16px;
  }

  .corner-event-form input[type="date"],
  .corner-event-form input[type="time"],
  .corner-event-form input[type="number"],
  .corner-event-form input[type="url"],
  .corner-event-form input[inputmode] {
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
  }

  .coordinate-helper {
    margin: 2px 0 0;
    padding: 12px 10px;
    overflow: hidden;
  }

  .coordinate-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .coordinate-row input {
    grid-column: 1 / -1;
  }

  .coordinate-row .button {
    width: 100%;
    min-height: 44px;
    padding: 0 8px;
  }

  .map-link-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
  }

  .map-link-row input {
    grid-column: 1 / -1;
    min-height: 46px;
    font-size: 16px;
  }

  .map-link-row .button {
    width: 100%;
    min-height: 44px;
    padding: 0 8px;
  }

  .corner-event-form .row-actions,
  .corner-event-form .notice-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .corner-event-form .row-actions .button,
  .corner-event-form .notice-upload-button,
  .corner-event-form .notice-upload-row .button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .corner-event-form .field-help,
  .corner-event-form .notice-upload-row .muted {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .coordinate-result {
    align-items: flex-start;
    gap: 7px 12px;
  }

  .coordinate-result span:not(.coordinate-ok) {
    width: calc(50% - 6px);
  }

  .coordinate-ok {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .corner-event-form > .form-actions {
    position: sticky;
    z-index: 20;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 14px -16px -16px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
  }

  .corner-event-form > .form-actions .button {
    min-width: 0;
    min-height: 46px;
  }

  .corner-event-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px 12px 10px;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  }

  .corner-event-main {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: start;
  }

  .corner-event-index {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(145deg, #0f8b7c, #0b6f65);
    color: #fff;
    font-size: 20px;
    font-weight: 950;
  }

  .corner-event-title {
    font-size: 15px;
  }

  .corner-event-status {
    min-height: 26px;
    padding: 0 9px;
  }

  .corner-event-desktop-meta {
    display: none;
  }

  .corner-event-mobile-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-left: 54px;
    color: #475569;
    font-size: 12px;
  }

  .corner-event-mobile-meta b {
    color: #0f172a;
    font-weight: 900;
  }

  .corner-item-actions {
    display: grid;
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .corner-item-actions .button {
    width: 100%;
    min-height: 42px;
    padding: 0 6px;
  }

  .corner-admin-panel > .section-head .inline-field {
    min-width: 0;
    width: 48%;
  }

  .inline-field select {
    min-height: 42px;
  }

  .corner-signup-table,
  .corner-signup-table tbody,
  .corner-signup-table tr,
  .corner-signup-table td {
    display: block;
    width: 100%;
  }

  .corner-signup-table {
    min-width: 0;
    background: transparent;
  }

  .corner-signup-table thead {
    display: none;
  }

  .corner-signup-table tbody {
    display: grid;
    gap: 12px;
  }

  .corner-signup-table tr {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  }

  .corner-signup-table td {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border-bottom: 0;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .corner-signup-table td:first-child {
    display: flex;
    width: auto;
    padding: 12px 12px 0;
  }

  .corner-signup-table td:first-child::before {
    display: none;
  }

  .corner-signup-table td:nth-child(2) {
    padding: 10px 12px 10px;
    border-bottom: 1px solid #eef2f7;
  }

  .corner-signup-table td:nth-child(2)::before {
    display: none;
  }

  .corner-signup-table td:last-child {
    padding: 8px 12px 12px;
    border-top: 1px solid #eef2f7;
  }

  .corner-signup-table td[data-label]::before {
    display: block;
    margin-bottom: 2px;
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    content: attr(data-label);
  }

  .corner-signup-table td:first-child::before,
  .corner-signup-table td:nth-child(6)::before {
    display: none;
  }

  .corner-signup-table td:nth-child(n+3) {
    padding: 8px 12px;
  }

  .corner-signup-table td:nth-child(4),
  .corner-signup-table td:nth-child(7) {
    display: none;
  }

  .signup-mobile-card-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }

  .signup-mobile-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(145deg, #0f8b7c, #0a756b);
    color: #fff;
    font-size: 17px;
    font-weight: 950;
  }

  .signup-mobile-card-head strong {
    display: block;
    color: #0f172a;
    font-size: 17px;
    font-weight: 950;
    line-height: 1.2;
  }

  .signup-mobile-card-head .review-badge {
    min-height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
  }

  .signup-mobile-card-head small,
  .signup-mobile-clip {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: #667085;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .signup-mobile-label {
    display: none;
  }

  .corner-signup-table td strong {
    font-size: 14px;
  }

  .corner-signup-table .empty-cell {
    padding: 24px 12px;
  }

  .corner-signup-table .empty-cell::before {
    display: none;
  }

  .corner-signup-table .status-select {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
    font-size: 14px;
  }

  .corner-signup-table .signup-review-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .corner-signup-table td:nth-child(6) .muted {
    margin-top: 6px;
    font-size: 12px;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .corner-qr-content {
    gap: 14px;
  }

  .checkin-code-content {
    display: grid;
    text-align: center;
  }

  .checkin-number {
    display: flex;
    justify-content: center;
    gap: 8px;
    color: #0f8b7c;
    letter-spacing: 0;
  }

  .checkin-number span {
    display: grid;
    width: 52px;
    height: 56px;
    place-items: center;
    border: 1px solid #c7eee8;
    border-radius: 8px;
    background: #f0fdfa;
    font-size: 34px;
    font-weight: 950;
  }

  .corner-qr-content img {
    width: min(100%, 280px);
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
  }

  .coordinate-picker-modal {
    align-items: end;
    padding: 0;
  }

  .coordinate-picker-card {
    width: 100%;
    max-height: 94dvh;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }

  .coordinate-picker-head {
    align-items: flex-start;
  }

  .coordinate-picker-head .muted {
    font-size: 13px;
  }

  .coordinate-picker-map {
    height: 48dvh;
    min-height: 280px;
  }

  .coordinate-picker-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .coordinate-picker-actions .button {
    min-height: 46px;
  }
}

.risk-workbench-panel {
  margin-bottom: 18px;
}

.risk-workbench-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.risk-batch-bar {
  position: sticky;
  top: 8px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}

.risk-work-item-row.is-overdue {
  background: #fff1f2;
}

.risk-work-item-row.is-due-soon {
  background: #fffbeb;
}

.risk-priority.p0 {
  color: #991b1b;
  background: #fee2e2;
}

.risk-priority.p1 {
  color: #92400e;
  background: #fef3c7;
}

.risk-priority.p2 {
  color: #1e40af;
  background: #dbeafe;
}

.risk-workflow-record {
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .risk-workbench-filters {
    grid-template-columns: 1fr 1fr;
  }

  .risk-workbench-filters input,
  .risk-workbench-filters select,
  .risk-workbench-filters button {
    width: 100%;
    min-width: 0;
  }

  .risk-work-items-wrap {
    overflow: visible;
  }

  .risk-work-items-table,
  .risk-work-items-table tbody {
    display: block;
    width: 100%;
  }

  .risk-work-items-table thead {
    display: none;
  }

  .risk-work-items-table tr {
    display: grid;
    width: 100%;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
  }

  .risk-work-items-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding: 9px 12px;
    overflow-wrap: anywhere;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .risk-work-items-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
  }

  .risk-batch-bar {
    position: fixed;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    top: auto;
    max-height: 42vh;
    overflow-y: auto;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .22);
  }
}

@media (max-width: 480px) {
  .corner-admin-topbar {
    align-items: center;
  }

  .corner-admin-topbar .eyebrow {
    display: none;
  }

  .corner-admin-actions .button {
    min-width: 0;
    padding: 0 9px;
    font-size: 13px;
  }

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

  .coordinate-row input {
    grid-column: auto;
  }

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

  .map-link-row input {
    grid-column: auto;
  }

  .coordinate-result span:not(.coordinate-ok) {
    width: 100%;
  }

  .section-head {
    flex-wrap: wrap;
  }

  .corner-admin-panel > .section-head .inline-field {
    width: 100%;
  }

  .corner-item-actions {
    grid-template-columns: 1fr;
  }

  .corner-event-badges {
    gap: 7px;
  }

  .corner-signup-table td {
    padding-left: 92px;
  }

  .corner-signup-table td[data-label]::before {
    width: 68px;
  }
}

.forum-admin-template .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.forum-admin-template .filters input {
  flex: 1 1 240px;
  min-width: 0;
}

.forum-admin-template .filters select {
  min-width: 140px;
}

.forum-settings-block {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.forum-settings-block + .forum-settings-block {
  margin-top: 16px;
}

.forum-settings-block-head strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
}

.forum-settings-block-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.forum-maintenance-settings {
  background: #f8fafc;
}

.forum-closed-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 14px;
  align-items: start;
  padding: 0;
}

.forum-closed-preview p {
  margin: 4px 0 0;
  color: var(--muted);
}

.forum-closed-content {
  grid-column: 1 / -1;
}

.forum-closed-modal-demo {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}

.forum-closed-modal-demo strong {
  color: #0f172a;
  font-size: 16px;
}

.forum-closed-modal-demo span {
  justify-self: end;
  padding: 7px 14px;
  border-radius: 7px;
  background: #0f8b7c;
  color: #ffffff;
  font-weight: 800;
}

.forum-keyword-manager {
  grid-column: 1 / -1;
  gap: 12px;
  min-width: 0;
}

.keyword-manager-tools {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: center;
}

.keyword-manager-tools input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
}

.keyword-manager-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.keyword-manager-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-manager-badges span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef6f5;
  color: #0f766e;
  font-weight: 800;
}

.keyword-manager-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: #0f766e;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.keyword-manager-toggle:hover {
  color: #115e59;
}

.keyword-category-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #ffffff;
  scrollbar-width: thin;
}

.keyword-category-tab {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 10px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.keyword-category-tab:last-child {
  border-right: 0;
}

.keyword-category-tab b {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.keyword-category-tab:hover {
  background: #f8fafc;
  color: #0f172a;
}

.keyword-category-tab.is-active {
  box-shadow: inset 0 -3px 0 #0f8b7c;
  background: #f0fdfa;
  color: #0f766e;
}

.keyword-category-tab.is-active b {
  color: #0f766e;
}

.keyword-chip-list {
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 108px;
  max-height: 230px;
  margin-top: -12px;
  padding: 14px 12px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #f8fafc;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}

.keyword-chip-list.is-expanded {
  max-height: 440px;
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.2;
}

.keyword-chip b {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keyword-chip button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  cursor: pointer;
  font-weight: 900;
  line-height: 20px;
}

.keyword-chip button:hover {
  background: #fee2e2;
  color: #b42318;
}

.keyword-manager-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 34px;
  color: #64748b;
  font-size: 13px;
}

.keyword-manager-footer > span {
  grid-column: 1;
  font-variant-numeric: tabular-nums;
}

.keyword-manager-footer > span b {
  color: #0f766e;
}

.keyword-manager-footer .keyword-manager-toggle {
  grid-column: 2;
}

.keyword-manager-textarea {
  display: none;
}

.keyword-manager-textarea.is-compact {
  min-height: 0;
}

.forum-admin-template table small {
  display: inline-block;
  max-width: 360px;
  color: var(--muted);
  line-height: 1.45;
  white-space: normal;
}

.forum-admin-template .table-link + .table-link {
  margin-left: 8px;
}

.global-risk-main-panel tr.is-editing {
  background: #f0fdfa;
}

.risk-rule-enabled-check {
  min-height: 42px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.forum-admin-post-composer {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid #99f6e4;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 68%);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.08);
}

.forum-admin-post-drawer {
  width: min(760px, 100vw);
}

.forum-admin-post-drawer .forum-detail-body {
  padding: 18px;
}

.forum-admin-post-drawer .forum-admin-post-composer {
  border-radius: 18px;
  box-shadow: none;
}

.forum-admin-post-composer .section-title {
  margin-bottom: 0;
}

.forum-admin-post-composer h3 {
  margin: 0 0 4px;
  color: #0f766e;
  font-size: 20px;
}

.forum-admin-post-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.forum-risk-guide {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 8px;
  background: #fff1f2;
  color: #881337;
}

.forum-risk-guide strong {
  display: block;
  margin-bottom: 5px;
  color: #9f1239;
  font-size: 17px;
  font-weight: 950;
}

.forum-risk-guide p,
.forum-risk-guide ul {
  margin: 0;
}

.forum-risk-guide ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.forum-risk-guide li {
  line-height: 1.65;
}

.forum-risk-guide code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #ffe4e6;
  color: #be123c;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
}

.forum-profile-risk-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 0.8fr);
  gap: 14px;
  align-items: start;
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
}

.forum-profile-risk-panel strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
  font-weight: 950;
}

.forum-profile-risk-panel p {
  margin: 0;
  line-height: 1.65;
}

.forum-risk-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.forum-risk-metrics span {
  min-width: 0;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #fff;
}

.forum-risk-metrics b,
.forum-risk-metrics small {
  display: block;
}

.forum-risk-metrics b {
  color: #be123c;
  font-size: 20px;
  font-weight: 950;
}

.forum-risk-metrics small {
  margin-top: 2px;
  color: #475467;
  font-size: 12px;
}

.forum-profile-keywords {
  grid-column: 1 / -1;
}

.forum-profile-risk-panel .button {
  justify-self: start;
}

.forum-user-profile-cell {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 220px;
}

.forum-user-profile-cell strong,
.forum-user-profile-cell small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-user-profile-cell small {
  color: var(--muted);
  font-size: 12px;
}

.forum-user-avatar {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 950;
}

.forum-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forum-user-avatar.is-empty,
.forum-user-avatar.is-broken {
  background: #f8fafc;
  color: #64748b;
}

.forum-user-avatar.is-broken::after {
  content: "澶村儚";
  font-size: 12px;
}

.forum-profile-risk-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}

.forum-user-actions-cell {
  min-width: 96px;
  white-space: nowrap;
}

.forum-user-actions {
  display: grid;
  gap: 10px;
  min-width: 320px;
}

.forum-user-action-group {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.forum-user-action-label {
  padding-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.forum-user-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.forum-user-action {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.forum-user-action:hover:not(:disabled) {
  border-color: #2563eb;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.forum-user-action.is-current,
.forum-user-action.is-active {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.forum-user-action.is-warning {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.forum-user-action.is-subtle {
  border-style: dashed;
  background: #f8fafc;
  color: #475569;
}

.forum-user-action:disabled {
  cursor: default;
  opacity: 1;
}

.forum-category-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.forum-category-strip span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  min-width: 0;
  padding: 13px 14px;
  background: #fff;
}

.forum-category-strip b,
.forum-category-strip strong,
.forum-category-strip small {
  min-width: 0;
}

.forum-category-strip b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-category-strip strong {
  color: var(--primary-dark);
  font-size: 18px;
}

.forum-category-strip small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.forum-detail-backdrop {
  position: fixed;
  z-index: 1100;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
}

.image-preview-backdrop {
  position: fixed;
  z-index: 1300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.image-preview-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.36);
}

.image-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--line);
}

.image-preview-head strong {
  min-width: 0;
  overflow: hidden;
  color: #101828;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview-stage {
  display: grid;
  place-items: center;
  max-height: calc(100vh - 112px);
  padding: 18px;
  overflow: auto;
  background: #f8fafc;
}

.image-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 148px);
  object-fit: contain;
}

.forum-detail-drawer {
  position: fixed;
  z-index: 1101;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100vh;
  overflow-y: auto;
  background: #fff;
  box-shadow: -18px 0 48px rgba(15, 23, 42, 0.2);
}

.forum-user-detail-drawer {
  width: min(680px, 100vw);
}

.forum-user-detail-body {
  padding-bottom: 0;
}

.forum-user-detail-profile {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.forum-user-detail-profile .forum-user-avatar {
  width: 64px;
  height: 64px;
}

.forum-user-detail-profile h4,
.forum-user-detail-profile p,
.forum-user-detail-section h4,
.forum-user-detail-section p {
  margin: 0;
}

.forum-user-detail-profile p,
.forum-user-detail-section p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.forum-user-detail-metrics {
  margin-bottom: 0;
}

.forum-user-detail-metrics small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.forum-user-detail-section {
  margin: 20px -20px 0;
  padding: 20px;
  border-top: 1px solid var(--line);
}

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

.forum-user-status-options,
.forum-user-operation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.forum-user-choice,
.forum-user-operation {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.forum-user-choice:has(input:checked),
.forum-user-operation:has(input:checked) {
  border-color: #34d399;
  background: #ecfdf5;
}

.forum-user-choice input,
.forum-user-operation input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.forum-user-operation span,
.forum-user-operation strong,
.forum-user-operation small {
  display: block;
  min-width: 0;
}

.forum-user-operation small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.forum-user-detail-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 20px -20px 0;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mail-user-id {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid #bfdbfe;
  border-radius: 5px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

@media (max-width: 640px) {
  .forum-user-detail-profile {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .forum-user-detail-profile .forum-detail-status {
    grid-column: 1 / -1;
  }

  .forum-user-status-options,
  .forum-user-operation-grid {
    grid-template-columns: 1fr;
  }
}

.risk-settings-drawer {
  width: min(760px, 100vw);
}

.risk-settings-drawer .forum-detail-body {
  padding-bottom: 40px;
}

.forum-snapshot-modal {
  top: 50%;
  right: auto;
  left: 50%;
  width: min(720px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
  height: auto;
  border-radius: 22px;
  transform: translate(-50%, -50%);
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.28);
}

.forum-detail-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.forum-detail-head small,
.forum-detail-head h3 {
  display: block;
  margin: 0;
}

.forum-detail-head small {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
}

.forum-detail-head h3 {
  font-size: 18px;
}

.forum-detail-head .icon-button {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  font-size: 24px;
}

.forum-detail-body {
  padding: 20px;
}

.forum-detail-status,
.forum-detail-meta,
.forum-detail-tags,
.forum-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.forum-detail-body h4 {
  margin: 14px 0 8px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.4;
}

.forum-detail-meta {
  color: var(--muted);
  font-size: 12px;
}

.forum-detail-meta span + span::before {
  margin-right: 8px;
  content: "路";
}

.forum-detail-tags {
  margin-top: 14px;
}

.forum-detail-tags span {
  padding: 4px 7px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
}

.forum-detail-content {
  margin: 18px 0;
  color: #344054;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.forum-detail-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.forum-detail-images a,
.forum-detail-images span {
  display: grid;
  aspect-ratio: 1;
  min-width: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.forum-detail-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forum-detail-data {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.forum-detail-data div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.forum-detail-data dt {
  color: var(--muted);
  font-size: 11px;
}

.forum-detail-data dd {
  margin: 3px 0 0;
  font-size: 18px;
  font-weight: 900;
}

.forum-moderation-note,
.forum-target-box {
  display: grid;
  gap: 5px;
  margin: 16px 0;
  padding: 12px;
  border-left: 3px solid var(--amber);
  background: #fff7ed;
  color: #7c2d12;
}

.forum-target-box {
  border-left-color: var(--primary);
  background: #f0fdfa;
  color: #134e4a;
}

.forum-target-box p {
  margin: 4px 0 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

.forum-detail-actions {
  position: sticky;
  bottom: 0;
  margin: 24px -20px -20px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.team-admin-template {
  display: grid;
  gap: 18px;
  max-width: 1480px;
  margin: 0 auto;
}

.team-admin-hero {
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(37, 99, 235, 0.05)),
    #fff;
}

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

.team-list-card {
  min-width: 0;
  padding: 18px;
  border-radius: 8px;
}

.team-search-box {
  min-width: 280px;
}

.team-search-box input {
  width: 220px;
}

.team-table-wrap {
  border: 1px solid #e5eaf1;
  border-radius: 8px;
}

.team-table {
  min-width: 1180px;
}

.team-table td strong,
.team-table td small,
.team-detail-table td strong,
.team-detail-table td small {
  display: block;
}

.team-table td small,
.team-detail-table td small {
  max-width: 220px;
  margin-top: 4px;
  overflow: hidden;
  color: #667085;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-table code {
  color: #1d4ed8;
  font-weight: 900;
}

.team-announcement-cell {
  min-width: 160px;
}

.team-announcement-cell small {
  max-width: 180px;
}

.team-detail-drawer {
  width: min(820px, 100vw);
}

.team-detail-loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: #475467;
  font-weight: 800;
}

.team-detail-body {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.team-detail-summary,
.team-owner-line,
.team-rename-row,
.team-request-actions,
.team-danger-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.team-detail-summary {
  color: #475467;
  font-size: 13px;
}

.team-owner-line {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #f8fafc;
}

.team-owner-line b {
  color: #0f766e;
}

.team-owner-line small {
  color: #667085;
}

.team-announcement-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d7efe9;
  border-radius: 8px;
  background: #f0fdfa;
}

.team-announcement-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.team-announcement-panel b {
  color: #0f766e;
}

.team-announcement-panel small {
  color: #667085;
}

.team-announcement-panel p {
  margin: 0;
  color: #1f2937;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.team-action-message {
  margin: 0;
}

.team-rename-row {
  align-items: stretch;
}

.team-rename-row input {
  flex: 1 1 260px;
  min-width: 0;
}

.team-detail-tabs {
  width: 100%;
  overflow-x: auto;
}

.team-detail-tabs button {
  min-width: max-content;
}

.team-detail-content {
  min-height: 220px;
}

.team-detail-table {
  min-width: 760px;
}

.danger-link {
  color: #be123c;
}

.team-request-list,
.team-audit-list {
  display: grid;
  gap: 10px;
}

.team-request-row,
.team-audit-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #fff;
}

.team-request-row small,
.team-audit-list small {
  display: block;
  margin-top: 4px;
  color: #667085;
}

.team-request-actions {
  grid-column: 1 / -1;
}

.team-readonly-note {
  margin: 10px 0 0;
  font-size: 12px;
}

.team-danger-zone {
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #e5eaf1;
}

.team-danger-zone div {
  display: grid;
  gap: 4px;
}

.team-danger-zone small {
  color: #667085;
}

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

@media (max-width: 720px) {
  body {
    min-width: 0;
  }

  .layout,
  .layout.sidebar-collapsed {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .admin-shell-sidebar,
  .sidebar {
    display: none;
  }

  .main,
  .content,
  .user-admin-template,
  .team-admin-template {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .content {
    padding: 16px 12px 22px;
  }

  .user-admin-hero,
  .card.section,
  .stats-grid,
  .user-metric-grid,
  .forum-category-strip {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .forum-profile-risk-panel {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .forum-risk-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .forum-closed-preview {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .keyword-manager-tools {
    grid-template-columns: 1fr;
  }

  .keyword-manager-summary {
    align-items: flex-start;
  }

  .keyword-category-tab {
    min-height: 44px;
    padding: 9px 13px;
  }

  .keyword-chip-list,
  .keyword-chip-list.is-expanded {
    max-height: 280px;
  }

  .keyword-manager-footer {
    grid-template-columns: 1fr auto;
  }

  .keyword-manager-footer .keyword-manager-toggle {
    grid-column: 2;
  }

  .keyword-chip b {
    max-width: min(260px, 68vw);
  }

  .forum-user-profile-cell {
    min-width: 190px;
  }

  .user-admin-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 16px;
  }

  .user-admin-hero h2 {
    font-size: 22px;
  }

  .user-admin-hero-actions {
    justify-content: flex-start;
  }

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

  .user-metric-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    min-height: 92px;
    padding: 12px;
  }

  .user-metric-icon {
    width: 42px;
    height: 42px;
  }

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

  .section-title {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .admin-topbar {
    min-height: 58px;
    padding: 8px 12px;
    gap: 8px;
  }

  .topbar-left {
    gap: 10px;
  }

  .admin-topbar h1 {
    font-size: 18px;
  }

  .top-actions {
    gap: 6px;
    margin-left: auto;
  }

  .global-search,
  .topbar-utility-button,
  .user-chip {
    display: none;
  }

  .forum-admin-template .filters,
  .forum-admin-template .filters input,
  .forum-admin-template .filters select,
  .forum-admin-template .filters .button {
    width: 100%;
  }

  .forum-admin-template .segmented-control {
    width: 100%;
  }

  .forum-admin-template .table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

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

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

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

  .team-toolbar .user-toolbar-actions,
  .team-search-box,
  .team-search-box input,
  .team-toolbar .compact-select,
  .team-toolbar .button {
    width: 100%;
    max-width: none;
  }

  .team-detail-drawer {
    width: 100vw;
  }

  .team-detail-body {
    padding: 14px 12px 22px;
  }

  .team-rename-row .button,
  .team-danger-zone .button {
    width: 100%;
  }
}

@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .layout,
  .layout.sidebar-collapsed {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 100dvh;
  }

  .admin-shell-sidebar,
  .sidebar {
    position: sticky;
    z-index: 800;
    top: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: 46dvh;
    padding: 0;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid #d9e2ec;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  }

  .admin-brand {
    min-height: 56px;
    padding: 10px 12px;
  }

  .admin-brand .brand-mark {
    width: 34px;
    height: 34px;
  }

  .admin-brand .brand-title {
    font-size: 16px;
  }

  .sidebar-menu,
  .english-sidebar-menu {
    display: flex;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    padding: 8px 10px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .sidebar-group {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    padding: 0;
  }

  .sidebar-group-title,
  .sidebar-collapse {
    display: none;
  }

  .sidebar .tab,
  .english-sidebar-menu .tab,
  .layout.sidebar-collapsed .sidebar .tab,
  .sidebar-menu .sub-tab,
  .english-sidebar-menu .sub-tab {
    display: grid;
    grid-template-columns: auto minmax(0, max-content) auto;
    flex: 0 0 auto;
    width: auto;
    max-width: 78vw;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #e5eaf1;
    border-radius: 7px;
    background: #ffffff;
    scroll-snap-align: start;
  }

  .sidebar-menu .third-tab {
    padding: 0 12px;
    background: #f8fafc;
    font-size: 12px;
  }

  .tertiary-tabs {
    margin-bottom: 12px;
    padding: 5px;
  }

  .sidebar .tab > span:not(.tab-icon),
  .english-sidebar-menu .tab > span:not(.tab-icon),
  .layout.sidebar-collapsed .sidebar .tab > span:not(.tab-icon),
  .layout.sidebar-collapsed .sidebar .tab i {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar .system-menu-header,
  .layout.sidebar-collapsed .sidebar .system-menu-header {
    grid-template-columns: auto minmax(0, max-content) 36px;
    padding: 0 0 0 12px;
  }

  .system-menu-toggle {
    display: grid;
    width: 36px;
    min-height: 40px;
  }

  .main,
  .content,
  .dashboard-template,
  .english-ops-template,
  .user-admin-template,
  .team-admin-template,
  .forum-admin-template {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .main {
    padding: 0;
  }

  .content {
    padding: 14px 10px 22px;
  }

  .topbar,
  .admin-topbar,
  .section-title,
  .panel-head,
  .mail-head,
  .ad-config-head,
  .migration-status-head,
  .team-danger-zone {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .admin-topbar {
    position: static;
    min-height: 0;
    padding: 12px 10px;
  }

  .topbar-left {
    width: 100%;
    gap: 10px;
  }

  .admin-topbar h1,
  h1 {
    font-size: 20px;
  }

  .global-search,
  .topbar-utility-button,
  .admin-topbar .user-chip {
    display: none;
  }

  .admin-topbar.mobile-search-open {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: block;
    padding: 14px;
    background: rgba(15, 23, 42, 0.42);
  }

  .admin-topbar.mobile-search-open .topbar-left,
  .admin-topbar.mobile-search-open .top-actions > :not(.global-search) {
    display: none;
  }

  .admin-topbar.mobile-search-open .top-actions,
  .admin-topbar.mobile-search-open .global-search {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .admin-topbar.mobile-search-open .search-box {
    min-height: 46px;
    background: #ffffff;
  }

  .admin-topbar.mobile-search-open .global-search-panel {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-height: calc(100dvh - 86px);
    margin-top: 8px;
  }

  .top-actions,
  .row-actions,
  .form-actions,
  .button-row,
  .migration-actions,
  .panel-actions,
  .team-toolbar,
  .user-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .button,
  .top-actions .button,
  .row-actions .button,
  .form-actions .button,
  .migration-actions .button,
  .filters .button {
    width: 100%;
    min-height: 42px;
  }

  .field input,
  .field textarea,
  .field select,
  .compact-select,
  .mini-select,
  .filters input,
  .filters select {
    min-height: 44px;
    font-size: 16px;
  }

  .grid,
  .dashboard-grid,
  .two-col,
  .form-grid,
  .reading-meta-grid,
  .email-reminder-grid,
  .notice-management-layout,
  .ad-config-grid,
  .theme-option-grid,
  .forum-profile-risk-panel,
  .team-danger-zone {
    grid-template-columns: 1fr;
  }

  .metrics,
  .stats-grid,
  .dashboard-metrics,
  .user-metric-grid,
  .team-metric-grid,
  .email-reminder-summary,
  .coverage-grid,
  .forum-detail-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card.section,
  .section,
  .dashboard-panel,
  .team-list-card {
    padding: 14px;
  }

  .table-wrap,
  .forum-admin-template .table-wrap,
  .corner-admin-shell .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
  }

  table,
  .template-table table,
  .managed-user-table table,
  .team-table,
  .team-detail-table,
  .corner-signup-table {
    min-width: 720px;
  }

  .template-table td,
  .template-table th {
    white-space: normal;
  }

  .pagination,
  .pagination-row,
  .risk-work-items-pagination,
  .mail-pagination {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
  }

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

  .forum-risk-metrics,
  .forum-detail-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forum-detail-drawer {
    width: 100vw;
  }

  .forum-snapshot-modal {
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    transform: none;
  }

  .forum-detail-head,
  .forum-detail-body,
  .team-detail-body {
    padding-right: 12px;
    padding-left: 12px;
  }

  .forum-detail-actions {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .migration-log {
    max-width: 100%;
    overflow: auto;
  }

  .migration-log div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 520px) {
  .metrics,
  .stats-grid,
  .dashboard-metrics,
  .user-metric-grid,
  .team-metric-grid,
  .email-reminder-summary,
  .coverage-grid,
  .forum-risk-metrics,
  .forum-detail-data,
  .forum-detail-images,
  .forum-category-strip {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 12px 8px 20px;
  }

  .admin-brand {
    min-height: 52px;
  }

  .admin-brand .brand-title {
    font-size: 15px;
  }

  .section-title h2,
  .section-title h3,
  .panel-head h2 {
    font-size: 17px;
  }
}

.mobile-command-header,
.mobile-bottom-nav,
.mobile-risk-workbench,
.mobile-settings-page {
  display: none;
}

@media (max-width: 900px) {
  body {
    background: #f5f7fb;
  }

  .admin-shell-sidebar,
  .sidebar,
  .admin-topbar {
    display: none;
  }

  .layout,
  .layout.sidebar-collapsed {
    display: block;
    min-height: 100dvh;
    background: #f5f7fb;
  }

  .main {
    padding: 0 0 calc(84px + env(safe-area-inset-bottom));
  }

  .content {
    padding: 12px 12px 20px;
  }

  .mobile-command-header {
    position: sticky;
    z-index: 700;
    top: 0;
    display: grid;
    gap: 12px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid #dbe3ef;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
  }

  .mobile-command-title {
    min-width: 0;
  }

  .mobile-command-kicker {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-command-title h2 {
    margin: 2px 0 0;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.15;
  }

  .mobile-command-title p {
    margin: 4px 0 0;
    overflow: hidden;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-command-status {
    position: absolute;
    top: 14px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .mobile-status-pill.warning {
    background: #fff7ed;
    color: #b45309;
  }

  .mobile-status-pill.danger {
    background: #fef2f2;
    color: #b42318;
  }

  .mobile-status-pill.info {
    background: #eff6ff;
    color: #1d4ed8;
  }

  .mobile-icon-action {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-command-pills {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-command-pills button {
    display: grid;
    gap: 2px;
    min-width: 0;
    min-height: 58px;
    padding: 8px 6px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
  }

  .mobile-command-pills b {
    overflow: hidden;
    color: #0f172a;
    font-size: 16px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-command-pills span {
    overflow: hidden;
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 900;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid #dbe3ef;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-nav button {
    display: grid;
    gap: 3px;
    min-width: 0;
    min-height: 52px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
  }

  .mobile-bottom-nav b {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 8px;
    background: #eef2f7;
    color: #334155;
    font-size: 12px;
  }

  .mobile-bottom-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav button.active {
    background: #ecfdf5;
    color: #047857;
  }

  .mobile-bottom-nav button.active b {
    background: #0f766e;
    color: #ffffff;
  }

  .desktop-settings-fallback {
    display: none;
  }

  .mobile-settings-page {
    display: grid;
    gap: 12px;
    padding-bottom: 76px;
  }

  .mobile-settings-appbar {
    position: sticky;
    top: 0;
    z-index: 650;
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    min-height: 64px;
    margin: -12px -12px 0;
    padding: 8px 16px;
    border-bottom: 1px solid #e5eaf2;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
  }

  .mobile-settings-appbar h2 {
    margin: 0;
    color: #0f172a;
    font-size: 21px;
    font-weight: 950;
    text-align: center;
  }

  .mobile-settings-back {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #0f172a;
    font-size: 36px;
    line-height: 1;
  }

  .mobile-settings-profile,
  .mobile-settings-group,
  .mobile-settings-operations {
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  }

  .mobile-settings-profile {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 16px;
  }

  .mobile-settings-avatar {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: #e0f2fe;
    font-size: 30px;
  }

  .mobile-settings-profile strong,
  .mobile-settings-profile span,
  .mobile-settings-profile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-settings-profile strong {
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
  }

  .mobile-settings-profile span {
    margin-top: 2px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
  }

  .mobile-settings-profile small {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
  }

  .mobile-settings-profile b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    background: #ecfdf5;
    color: #059669;
    font-size: 13px;
    white-space: nowrap;
  }

  .mobile-settings-group {
    overflow: hidden;
  }

  .mobile-settings-group-head,
  .mobile-settings-row {
    display: grid;
    width: 100%;
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 68px;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid #e5eaf2;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
  }

  .mobile-settings-group-head:last-child,
  .mobile-settings-row:last-child {
    border-bottom: 0;
  }

  .mobile-settings-group-head.static {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .mobile-settings-group-head span,
  .mobile-settings-row-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 8px;
    background: #ecfdf5;
    color: #059669;
    font-size: 15px;
    font-weight: 950;
  }

  .mobile-settings-group-head strong {
    color: #0f172a;
    font-size: 19px;
    font-weight: 950;
  }

  .mobile-settings-group-head small {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-settings-group-head i,
  .mobile-settings-row i {
    color: #64748b;
    font-size: 28px;
    font-style: normal;
    line-height: 1;
  }

  .mobile-settings-row-main {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .mobile-settings-row-main strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-settings-row-main small {
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-settings-value {
    max-width: 82px;
    overflow: hidden;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-settings-badge {
    display: inline-flex;
    min-width: 34px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-style: normal;
    font-weight: 950;
  }

  .mobile-switch {
    position: relative;
    display: inline-flex;
    width: 58px;
    height: 32px;
    align-items: center;
  }

  .mobile-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
  }

  .mobile-switch b {
    display: block;
    width: 58px;
    height: 32px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.18s ease;
  }

  .mobile-switch b::after {
    display: block;
    width: 28px;
    height: 28px;
    margin: 2px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
    content: '';
    transition: transform 0.18s ease;
  }

  .mobile-switch input:checked + b {
    background: #059669;
  }

  .mobile-switch input:checked + b::after {
    transform: translateX(26px);
  }

  .mobile-custom-menu-list {
    display: grid;
  }

  .mobile-custom-menu-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 70px;
    padding: 10px 12px;
    border-bottom: 1px solid #e5eaf2;
  }

  .mobile-custom-menu-item.disabled {
    opacity: 0.55;
  }

  .mobile-custom-menu-item > button {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 10px;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #0f172a;
    text-align: left;
  }

  .mobile-custom-menu-item > button span {
    display: grid;
    width: 32px;
    height: 32px;
    grid-row: 1 / 3;
    place-items: center;
    border-radius: 8px;
    background: #f1f5f9;
    color: #0f766e;
    font-weight: 950;
  }

  .mobile-custom-menu-item b,
  .mobile-custom-menu-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-custom-menu-item b {
    font-size: 15px;
  }

  .mobile-custom-menu-item small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
  }

  .mobile-custom-menu-item > div {
    display: flex;
    gap: 6px;
  }

  .mobile-custom-menu-item > div button {
    min-height: 32px;
    padding: 0 9px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-custom-menu-item > div button.danger {
    border-color: #fecaca;
    color: #dc2626;
  }

  .mobile-custom-menu-form {
    display: grid;
    grid-template-columns: 1fr 82px;
    gap: 10px;
    padding: 14px;
    background: #f8fafc;
  }

  .mobile-custom-menu-form .field {
    margin: 0;
  }

  .mobile-custom-menu-form .field.wide,
  .mobile-custom-menu-form button {
    grid-column: 1 / -1;
  }

  .mobile-custom-menu-form label {
    font-size: 12px;
  }

  .mobile-settings-operations {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-color: #bfdbfe;
    background: #f8fbff;
  }

  .mobile-settings-operations span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid #93c5fd;
    border-radius: 50%;
    color: #1d4ed8;
    font-weight: 950;
  }

  .mobile-settings-operations strong,
  .mobile-settings-operations small {
    display: block;
  }

  .mobile-settings-operations strong {
    color: #1e3a8a;
    font-size: 16px;
  }

  .mobile-settings-operations small {
    overflow: hidden;
    color: #475569;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-settings-operations button {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 950;
    white-space: nowrap;
  }

  .mobile-settings-save {
    position: sticky;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 620;
    padding-top: 2px;
  }

  .mobile-settings-save .button {
    width: 100%;
    min-height: 54px;
    border-radius: 8px;
    font-size: 18px;
  }

  .mobile-risk-workbench {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  }

  .mobile-workbench-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-workbench-head span {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
  }

  .mobile-workbench-head h2 {
    margin: 2px 0 0;
    color: #0f172a;
    font-size: 22px;
  }

  .mobile-workbench-head > div {
    min-width: 0;
  }

  .mobile-workbench-head .button {
    width: auto;
    min-height: 36px;
    flex: 0 0 auto;
  }

  .mobile-risk-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-risk-summary span {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 10px 7px;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
  }

  .mobile-risk-summary b {
    overflow: hidden;
    color: #0f172a;
    font-size: 17px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-risk-summary small {
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-review-queue {
    display: grid;
    gap: 8px;
  }

  .mobile-review-queue button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 64px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
  }

  .mobile-review-queue span {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .mobile-review-queue strong,
  .mobile-review-queue small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-review-queue small {
    color: #64748b;
    font-size: 12px;
  }

  .mobile-review-queue em {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
  }

  .mobile-review-queue em.ok {
    background: #ecfdf5;
    color: #047857;
  }

  .mobile-review-queue em.warn {
    background: #fff7ed;
    color: #b45309;
  }

  .mobile-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-quick-actions button {
    min-width: 0;
    min-height: 42px;
    padding: 0 8px;
    border: 1px solid #ccfbf1;
    border-radius: 8px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 13px;
    font-weight: 900;
  }

  .forum-admin-template .user-admin-hero,
  .user-admin-template .user-admin-hero {
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
  }

  .forum-admin-template .user-admin-hero h2,
  .user-admin-template .user-admin-hero h2 {
    color: #0f172a;
  }

  .forum-admin-template .user-admin-hero p,
  .user-admin-template .user-admin-hero p {
    color: #64748b;
  }
}

@media (max-width: 420px) {
  .mobile-command-pills,
  .mobile-risk-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.security-center {
  width: 100%;
  margin-bottom: 20px;
}

.security-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.security-center-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.security-center-head span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
}

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

.security-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dbe3ed;
  border-radius: 8px;
  background: #fff;
}

.security-panel-title {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}

.security-panel-title strong,
.security-panel-title small {
  display: block;
}

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

.security-panel-title small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.security-panel-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.security-panel-icon.teal { background: #0f766e; }
.security-panel-icon.blue { background: #2563eb; }
.security-panel-icon.amber { background: #b45309; }
.security-panel-icon.green { background: #15803d; }

.security-panel textarea {
  min-height: 92px;
  resize: vertical;
}

.security-secret {
  margin-bottom: 14px;
  padding: 11px;
  border: 1px solid #99f6e4;
  border-radius: 6px;
  background: #f0fdfa;
}

.security-secret label,
.security-secret code {
  display: block;
}

.security-secret label {
  margin-bottom: 6px;
  color: #115e59;
  font-size: 12px;
}

.security-secret code {
  overflow-wrap: anywhere;
  color: #134e4a;
  font-size: 14px;
  font-weight: 700;
}

.security-layer-list {
  display: grid;
  gap: 10px;
}

.security-layer-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #eef2f7;
}

.security-layer-list b {
  font-size: 13px;
}

.security-layer-list em {
  color: #475569;
  font-size: 13px;
  font-style: normal;
}

.security-center-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.security-center-loading {
  padding: 24px;
  border: 1px solid #dbe3ed;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  text-align: center;
}

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

  .security-center-head {
    align-items: flex-start;
  }

  .security-panel {
    padding: 15px;
  }

  .security-panel-title {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .security-panel-icon {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 768px) {
  body.corner-admin-body {
    min-width: 0;
    overflow-x: hidden;
  }

  .corner-admin-shell,
  .corner-admin-dashboard,
  .corner-admin-grid,
  .corner-admin-panel {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
  }

  .corner-admin-dashboard {
    padding-right: 12px;
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
    padding-left: 12px;
  }

  .corner-admin-panel[data-mobile-panel="signups"] {
    padding: 16px 12px;
  }

  .corner-admin-panel[data-mobile-panel="signups"] > .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .corner-admin-panel[data-mobile-panel="signups"] > .section-head .inline-field {
    width: 100%;
    max-width: 100%;
  }

  .corner-admin-panel[data-mobile-panel="signups"] > .section-head select {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }

  .corner-signup-table,
  .corner-signup-table tbody,
  .corner-signup-table tr.signup-card-row,
  .corner-signup-table td {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .corner-signup-table tr.signup-card-row {
    display: grid;
    overflow: hidden;
    border-radius: 14px;
  }

  .corner-signup-table td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 6px 10px;
    align-items: start;
    padding: 10px 12px;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .corner-signup-table td:first-child {
    display: flex;
    width: auto;
    padding: 12px 12px 0;
  }

  .corner-signup-table td:first-child::before {
    display: none !important;
  }

  .corner-signup-table td:nth-child(2) {
    display: block;
    padding: 10px 12px 12px;
    border-bottom: 1px solid #eef2f7;
  }

  .corner-signup-table td:nth-child(2)::before {
    display: none !important;
  }

  .corner-signup-table td:nth-child(4) {
    display: none;
  }

  .corner-signup-table td[data-label]::before {
    margin: 0;
    min-width: 0;
    color: #667085;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.45;
  }

  .corner-signup-table td > * {
    min-width: 0;
    max-width: 100%;
  }

  .signup-mobile-card-head {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
  }

  .signup-mobile-card-head .review-badge {
    grid-column: 2;
    justify-self: start;
    margin-top: 6px;
  }

  .signup-mobile-card-head strong,
  .signup-mobile-card-head small,
  .signup-mobile-clip,
  .corner-signup-table td strong,
  .corner-signup-table td div,
  .corner-signup-table td small {
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .corner-signup-table td:nth-child(2) strong {
    display: block;
    font-size: 17px;
    line-height: 1.3;
  }

  .corner-signup-table td:last-child {
    grid-template-columns: 86px minmax(0, 1fr);
    padding: 10px 12px 14px;
  }

  .corner-signup-table .signup-review-status {
    width: 100%;
    min-width: 0;
  }

  .corner-signup-table .status-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
  }

  .corner-mobile-bottom-nav {
    right: 12px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 12px;
    border-radius: 18px;
  }
}
.site-notification-trigger {
  position: relative;
}

.site-notification-trigger > span {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
}

.site-notification-backdrop,
.site-notification-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(2px);
}

.site-notification-drawer {
  display: flex;
  width: min(680px, 88vw);
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: -18px 0 46px rgba(15, 23, 42, 0.2);
}

.site-notification-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 26px 18px;
  border-bottom: 1px solid #dbe4ee;
  background: #fff;
}

.site-notification-head span,
.site-notification-detail header span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.site-notification-head h2,
.site-notification-detail h2 {
  margin: 4px 0 5px;
  color: #0f172a;
  font-size: 24px;
  letter-spacing: 0;
}

.site-notification-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.site-notification-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #dbe4ee;
  background: #fff;
}

.site-notification-toolbar label {
  display: grid;
  gap: 4px;
  width: 112px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.site-notification-toolbar .site-notification-source-filter {
  width: 148px;
}

.site-notification-toolbar select {
  width: 112px;
  min-width: 0;
  height: 38px;
  padding: 0 30px 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a !important;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  opacity: 1;
  -webkit-text-fill-color: #0f172a;
  color-scheme: light;
}

.site-notification-toolbar .site-notification-source-filter select {
  width: 148px;
}

.site-notification-toolbar select option {
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.site-notification-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 18px;
}

.site-notification-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 13px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.site-notification-row:first-child {
  border-radius: 6px 6px 0 0;
}

.site-notification-row:last-child {
  border-bottom: 0;
  border-radius: 0 0 6px 6px;
}

.site-notification-row.unread {
  background: #f0fdfa;
}

.site-notification-row.read {
  opacity: 0.82;
}

.site-notification-level {
  width: 7px;
  height: 42px;
  border-radius: 4px;
  background: #3b82f6;
}

.site-notification-level.warning { background: #f59e0b; }
.site-notification-level.danger { background: #dc2626; }
.site-notification-level.success { background: #16a34a; }

.site-notification-main {
  min-width: 0;
}

.site-notification-main > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.site-notification-main strong {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-notification-main i {
  padding: 2px 5px;
  border-radius: 4px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-style: normal;
}

.site-notification-main p {
  display: -webkit-box;
  max-width: 100%;
  margin: 5px 0;
  overflow: hidden;
  color: #475569;
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-notification-main small {
  color: #94a3b8;
}

.site-notification-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-top: 1px solid #dbe4ee;
  background: #fff;
  color: #64748b;
  font-size: 13px;
}

.site-notification-pagination > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.site-notification-detail-backdrop {
  z-index: 1900;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.site-notification-detail {
  width: min(620px, 96vw);
  max-height: min(760px, 92vh);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.site-notification-detail header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.site-notification-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  color: #64748b;
  font-size: 13px;
}

.site-notification-detail-body {
  padding: 6px 24px 24px;
}

.site-notification-detail-body h3 {
  margin: 8px 0;
  color: #0f172a;
  font-size: 15px;
}

.site-notification-detail-body p {
  margin: 0 0 18px;
  padding: 15px;
  border-left: 3px solid #0f766e;
  background: #f8fafc;
  color: #334155;
  line-height: 1.75;
}

.site-notification-detail-body dl {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 9px 12px;
  margin: 0;
  font-size: 13px;
}

.site-notification-detail-body dt { color: #64748b; }
.site-notification-detail-body dd { margin: 0; overflow-wrap: anywhere; color: #0f172a; }

.site-notification-detail footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

@media (max-width: 768px) {
  .site-notification-backdrop {
    z-index: 2200;
    background: #f8fafc;
  }

  .site-notification-drawer {
    width: 100vw;
    max-width: none;
    box-shadow: none;
  }

  .site-notification-head {
    padding: 18px 16px 14px;
  }

  .site-notification-head h2 {
    font-size: 21px;
  }

  .site-notification-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 10px 12px;
  }

  .site-notification-toolbar label {
    width: 100%;
  }

  .site-notification-toolbar select {
    width: 100%;
    min-width: 0;
  }

  .site-notification-list {
    padding: 8px 10px;
  }

  .site-notification-row {
    grid-template-columns: 6px minmax(0, 1fr) auto;
    gap: 9px;
    min-height: 102px;
    padding: 12px 10px;
  }

  .site-notification-row > .badge {
    align-self: start;
  }

  .site-notification-row > .table-link {
    grid-column: 2 / 4;
    justify-self: start;
  }

  .site-notification-level {
    height: 56px;
  }

  .site-notification-pagination {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  }

  .site-notification-detail-backdrop {
    z-index: 2300;
    align-items: stretch;
    padding: 0;
  }

  .site-notification-detail {
    width: 100vw;
    max-height: none;
    border-radius: 0;
  }

  .site-notification-detail footer {
    position: sticky;
    bottom: 0;
    flex-wrap: wrap;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}
