:root {
  --ink: #161616;
  --muted: #6f7375;
  --line: #dfe2e3;
  --line-strong: #c7cbcd;
  --surface: #ffffff;
  --canvas: #f3f5f4;
  --canvas-warm: #f8f7f3;
  --lime: #c8ff3d;
  --lime-dark: #547600;
  --pink: #e92a87;
  --pink-soft: #fff0f7;
  --green: #15835e;
  --green-soft: #e9f7f1;
  --amber: #9a6500;
  --amber-soft: #fff5da;
  --red: #bb2d3b;
  --red-soft: #fff0f1;
  --blue: #1d65a6;
  --blue-soft: #edf6ff;
  --sidebar: 236px;
  --topbar: 72px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-width: 320px; background: var(--canvas); font-size: 14px; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
input, select { height: 40px; padding: 0 12px; }
textarea { min-height: 92px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #759f0c; box-shadow: 0 0 0 3px rgba(171, 222, 45, .2); }
[hidden] { display: none !important; }

.button {
  min-height: 40px;
  margin: 0;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 750;
  color: var(--ink);
  background: #fff;
  transition: filter .15s ease, transform .15s ease, background .15s ease;
}
.button:hover { filter: brightness(.97); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--lime); border-color: #acd92f; color: #111900; }
.button.secondary { background: var(--ink); border-color: var(--ink); color: #fff; }
.button.ghost { border-color: var(--line-strong); background: #fff; }
.button.danger { border-color: #e6aab0; background: var(--red-soft); color: var(--red); }
.button.compact { min-height: 34px; padding: 0 12px; font-size: 13px; }
.button.wide { width: 100%; }
.icon-button {
  width: 38px;
  height: 38px;
  flex: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  line-height: 36px;
  text-align: center;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background: #111;
}
.login-view::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, transparent 0 62%, rgba(200, 255, 61, .12) 62% 63%, transparent 63% 100%);
  pointer-events: none;
}
.login-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 42px 40px 38px;
  border-top: 5px solid var(--lime);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}
.login-brand, .brand-word { font-size: 28px; font-weight: 950; line-height: 1; }
.login-brand span, .brand-word span { color: #91bd18; }
.login-kicker { margin: 12px 0 30px; color: var(--pink); font-size: 11px; font-weight: 800; letter-spacing: 1.6px; }
.login-panel h1 { margin: 0 0 28px; font-size: 24px; }
.login-form label, .field-label { display: block; margin: 0 0 7px; color: #3f4243; font-size: 13px; font-weight: 700; }
.password-row { display: flex; gap: 8px; }
.password-row input { flex: 1; }
.password-toggle { border-radius: 6px; font-size: 17px; }
.login-form .button { margin-top: 8px; }
.form-error { min-height: 20px; margin: 7px 0 0; color: var(--red); font-size: 12px; line-height: 1.5; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 25px 17px 18px;
  color: #fff;
  background: #111;
  border-right: 1px solid #252525;
}
.sidebar-brand { min-height: 72px; padding: 4px 10px 20px; border-bottom: 1px solid #292929; }
.brand-word span { color: var(--lime); }
.brand-meta { margin-top: 11px; color: #8e9292; font-size: 10px; font-weight: 750; letter-spacing: 1.3px; }
.brand-meta i, .provider-state i, .provider-pill i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #8f9495;
}
.nav-list { display: grid; gap: 5px; margin-top: 22px; }
.nav-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #c7caca;
  background: transparent;
  text-align: left;
  font-weight: 650;
}
.nav-item:hover { color: #fff; background: #202020; }
.nav-item.active { color: #101500; background: var(--lime); }
.nav-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.nav-badge { min-width: 21px; height: 21px; margin-left: auto; padding: 0 6px; border-radius: 11px; background: var(--pink); color: #fff; font-size: 11px; line-height: 21px; text-align: center; }
.nav-item.active .nav-badge { color: #fff; background: #111; }
.sidebar-bottom { margin-top: auto; }
.provider-state { margin: 0 8px 12px; padding: 11px 0; border-bottom: 1px solid #292929; color: #999; font-size: 11px; }
.provider-state.ready, .provider-pill.ready { color: var(--green); }
.provider-state.ready i, .provider-pill.ready i { background: #28b47f; }
.provider-state.error, .provider-pill.error { color: var(--red); }
.provider-state.error i, .provider-pill.error i { background: #dc4c5a; }
.nav-item.logout { color: #aaa; }

.main-area { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
  position: sticky;
  z-index: 25;
  top: 0;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}
.menu-button { display: none; }
.topbar-title { min-width: 0; }
.topbar-title h1 { margin: 0; font-size: 20px; }
.topbar-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.provider-pill { display: flex; align-items: center; height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 16px; background: var(--canvas-warm); color: var(--muted); font-size: 11px; white-space: nowrap; }
.content-area { width: 100%; max-width: 1540px; margin: 0 auto; padding: 25px 28px 48px; }
.page-section { display: none; }
.page-section.active { display: block; }

.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(125px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card {
  min-height: 112px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.stat-card.accent { border-top: 4px solid var(--lime); padding-top: 14px; }
.stat-card.warn { border-top: 4px solid #f0b52c; padding-top: 14px; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 650; }
.stat-value { margin-top: 13px; font-size: 28px; font-weight: 850; line-height: 1; }
.stat-note { margin-top: 10px; color: #909596; font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.panel-head { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 19px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.queue-summary, .service-summary { min-height: 205px; padding: 12px 19px 18px; }
.summary-row { min-height: 47px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #eceeee; }
.summary-row:last-child { border-bottom: 0; }
.summary-row strong { font-size: 13px; }
.summary-row span { margin-left: auto; color: var(--muted); font-size: 12px; }
.summary-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--line-strong); }
.summary-dot.warn { background: #e7a313; }
.summary-dot.good { background: #1ba573; }
.summary-dot.bad { background: #da4050; }
.skeleton-block { background: linear-gradient(90deg, #fff, #fafafa, #fff); }

.filters-head { align-items: flex-end; }
.filter-form { display: grid; grid-template-columns: minmax(180px, 280px) 145px auto; gap: 8px; }
.filter-form.posts-filter { grid-template-columns: minmax(180px, 280px) 120px 145px auto; }
.filter-form.short { grid-template-columns: 170px auto; }
.table-wrap { position: relative; width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 980px; border-collapse: collapse; }
th, td { padding: 13px 15px; border-bottom: 1px solid #e9ebeb; text-align: left; vertical-align: middle; }
th { color: #5e6364; background: #fafbfa; font-size: 11px; font-weight: 800; white-space: nowrap; }
td { color: #353839; font-size: 12px; }
tbody tr:hover { background: #fcfcfa; }
.primary-cell { min-width: 250px; max-width: 390px; }
.cell-title { color: var(--ink); font-size: 13px; font-weight: 800; line-height: 1.45; }
.cell-copy { max-width: 390px; margin-top: 5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cell-meta { margin-top: 4px; color: #8c9192; font-size: 11px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 12px; background: #f7f8f8; color: #626768; font-size: 10px; font-weight: 750; white-space: nowrap; }
.badge.approved, .badge.online, .badge.paid, .badge.provided, .badge.ready { border-color: #bce5d2; background: var(--green-soft); color: var(--green); }
.badge.pending, .badge.checking, .badge.manual_review, .badge.created { border-color: #efdaa2; background: var(--amber-soft); color: var(--amber); }
.badge.rejected, .badge.deleted, .badge.error, .badge.failed { border-color: #edbfc4; background: var(--red-soft); color: var(--red); }
.badge.offline, .badge.cancelled, .badge.expired { border-color: #d7dada; background: #f0f2f2; color: #686d6e; }
.badge.pinned { border-color: #bddd69; background: #efffc6; color: #4b6800; }
.badge.post { border-color: #cfd3d4; background: #f5f6f6; color: #555a5b; }
.badge.activity { border-color: #bddd69; background: #efffc6; color: #4b6800; }
.badge.capsule { border-color: #c9df87; background: #efffc6; color: #4b6800; }
.badge.reply { border-color: #e8bed7; background: #fff0f8; color: #b62879; }
.actions-cell { min-width: 235px; }
.action-group { display: flex; flex-wrap: wrap; gap: 5px; }
.table-action { min-height: 29px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: #303334; font-size: 11px; font-weight: 700; }
.table-action:hover { background: #f2f5f3; }
.table-action.approve { border-color: #9dd9bf; color: var(--green); }
.table-action.reject, .table-action.delete { border-color: #edb6bc; color: var(--red); }
.table-action.pin { border-color: #c9df87; color: var(--lime-dark); }
.thumb-strip { display: flex; gap: 4px; }
.thumb-button { width: 38px; height: 38px; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #eee; }
.thumb-button img, .thumb-button video { width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none; }
.thumb-more { align-self: center; color: var(--muted); font-size: 10px; }
.empty-state { padding: 54px 20px; color: #969b9c; text-align: center; }
.empty-state.small { padding: 28px 12px; }

.topic-admin-panel { max-width: 860px; }
.topic-admin-form { padding: 18px; }
.topic-add-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 8px; max-width: 520px; }
.topic-column-head, .topic-admin-row { display: grid; grid-template-columns: minmax(170px, 1fr) 90px 90px 180px; gap: 10px; align-items: center; }
.topic-column-head { margin-top: 22px; padding: 0 12px 8px; color: var(--muted); font-size: 11px; font-weight: 800; }
.topic-admin-editor { display: grid; gap: 8px; }
.topic-admin-row { min-height: 58px; padding: 8px 12px; border-radius: 6px; background: #f7f8f7; }
.topic-admin-row input[type="text"], .topic-admin-row > input { height: 36px; }
.topic-check { display: flex; align-items: center; gap: 7px; color: #4d5152; font-size: 12px; }
.topic-check input { width: auto; height: auto; }
.topic-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.topic-row-actions .table-action { min-width: 36px; }
.topic-admin-help { margin: 13px 0 16px; color: var(--muted); font-size: 11px; }


.media-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 13px; padding: 17px; }
.media-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--canvas-warm); }
.media-preview { width: 100%; aspect-ratio: 4 / 3; display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: #e4e7e5; overflow: hidden; }
.media-preview img, .media-preview video { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-copy { padding: 12px; }
.media-top { display: flex; justify-content: space-between; gap: 8px; }
.media-name { min-width: 0; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.media-details { min-height: 48px; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.media-post-context { margin-top: 10px; padding: 10px; border-left: 3px solid var(--lime); background: #f2f5ed; color: var(--ink); font-size: 11px; line-height: 1.5; }
.media-post-context strong, .media-post-context span { display: block; }
.media-post-context p { margin: 5px 0; color: #555b58; white-space: pre-wrap; }
.media-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }

.security-grid { display: grid; grid-template-columns: minmax(480px, 1.25fr) minmax(330px, .75fr); gap: 18px; align-items: start; }
.config-panel form, .security-side .panel > form { padding: 18px; }
.config-panel .field-label:not(:first-child) { margin-top: 15px; }
.switch-control { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.switch-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-control span { position: relative; width: 38px; height: 21px; border-radius: 12px; background: #bfc4c4; transition: background .15s ease; }
.switch-control span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch-control input:checked + span { background: #77a600; }
.switch-control input:checked + span::after { transform: translateX(17px); }
.switch-control b { font-size: 12px; }
.normalization-box { display: flex; flex-wrap: wrap; gap: 9px 18px; margin: 16px 0 0; padding: 13px; border: 1px solid var(--line); border-radius: 6px; }
.normalization-box legend { padding: 0 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.normalization-box label { color: #4e5354; font-size: 12px; }
.normalization-box input { width: auto; height: auto; margin: 0 5px 0 0; }
.subsection-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 9px; }
.subsection-head h3 { margin: 0; font-size: 14px; }
.category-editor { display: grid; gap: 10px; margin-bottom: 17px; }
.category-row { padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfa; }
.category-row-head { display: grid; grid-template-columns: 120px minmax(140px, 1fr) 110px auto auto; gap: 8px; align-items: center; }
.category-row-head input, .category-row-head select { height: 34px; }
.category-toggle { width: auto; height: auto; }
.category-row textarea { min-height: 78px; margin-top: 9px; background: #fff; }
.security-side { display: grid; gap: 18px; }
.security-side textarea { margin-bottom: 10px; }
.test-result { margin: 0 18px 18px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.test-result.neutral { color: var(--muted); background: #f7f8f8; }
.test-result.safe { color: var(--green); border-color: #acd9c5; background: var(--green-soft); }
.test-result.blocked { color: var(--red); border-color: #e7b3b9; background: var(--red-soft); }
.compact-log-list { max-height: 510px; overflow: auto; padding: 6px 18px 15px; }
.compact-log { padding: 12px 0; border-bottom: 1px solid var(--line); }
.compact-log:last-child { border-bottom: 0; }
.compact-log-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.compact-log-head strong { font-size: 12px; }
.compact-log-head time { color: #919596; font-size: 10px; }
.compact-log p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.readonly-note { padding: 7px 10px; border: 1px solid #c7dce9; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 700; }

.modal-dialog, .image-dialog {
  width: min(500px, calc(100vw - 30px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
}
.modal-dialog::backdrop, .image-dialog::backdrop { background: rgba(10, 12, 12, .68); }
.modal-dialog form { padding: 22px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-kicker { margin: 0 0 5px; color: var(--pink); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.dialog-head h2 { margin: 0; font-size: 19px; }
.dialog-head .icon-button { border: 0; background: #f1f3f2; font-size: 25px; }
.dialog-description { margin: 15px 0 19px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.modal-dialog .field-label:not(:first-of-type) { margin-top: 13px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 19px; }
.password-dialog input { margin-bottom: 2px; }
.image-dialog { width: min(920px, calc(100vw - 28px)); background: #111; }
.image-dialog img { display: block; max-width: 100%; max-height: 82vh; margin: auto; object-fit: contain; }
.image-close { position: absolute; z-index: 2; top: 10px; right: 10px; border: 0; background: rgba(255, 255, 255, .9); }

.toast-region { position: fixed; z-index: 100; top: 18px; right: 18px; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); pointer-events: none; }
.membership-admin-grid { display: grid; gap: 18px; }
.membership-form { padding: 22px; }
.membership-copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.membership-form label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.membership-form textarea { margin-bottom: 18px; }
.membership-plan-head, .membership-plan-row { display: grid; grid-template-columns: minmax(130px,1fr) 85px 100px 100px minmax(160px,1.2fr) 100px 145px; gap: 10px; align-items: center; }
.membership-plan-head { padding: 9px 0; color: var(--muted); font-size: 11px; font-weight: 800; }
.membership-plan-row { padding: 12px 0; border-top: 1px solid var(--line); }
.membership-plan-row input { min-width: 0; }
.membership-plan-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.positive { color: #138a58; font-weight: 700; }
.negative { color: #d23b4b; font-weight: 700; }
.wallet-adjust-form { display: grid; grid-template-columns: 1.2fr 180px 1.5fr auto; gap: 12px; align-items: end; padding: 20px; }
.wallet-adjust-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.section-intro { margin-bottom: 18px; }.section-intro h2 { margin: 0; font-size: 21px; }.section-intro p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }.user-edit-panel { margin-top: 18px; }.user-edit-form { display: grid; grid-template-columns: 1.1fr 1fr 2fr 130px 130px auto; gap: 12px; align-items: end; padding: 20px; }.user-edit-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.user-cell { display: flex; align-items: center; gap: 9px; }.user-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #e8ece8; }
.field-help { margin: 14px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.toast { padding: 12px 14px; border-left: 4px solid var(--ink); border-radius: 5px; background: #fff; box-shadow: 0 10px 35px rgba(0, 0, 0, .17); color: #303334; font-size: 12px; line-height: 1.45; animation: toast-in .18s ease-out; }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } }

.loading-row td { height: 110px; color: var(--muted); text-align: center; }
.spin { display: inline-block; width: 14px; height: 14px; margin-right: 7px; border: 2px solid #d6dada; border-top-color: #687000; border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .media-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
  .security-grid { grid-template-columns: 1fr; }
  .security-side { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  :root { --topbar: 64px; }
  .sidebar { width: min(280px, 82vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(0, 0, 0, .22); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 35; inset: 0; background: rgba(0, 0, 0, .5); }
  .main-area { margin-left: 0; }
  .menu-button { display: block; }
  .topbar { padding: 0 16px; }
  .provider-pill { display: none; }
  .content-area { padding: 18px 15px 40px; }
  .overview-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: repeat(2, minmax(145px, 1fr)); padding: 13px; }
  .filters-head { align-items: flex-start; flex-direction: column; }
  .filter-form { width: 100%; grid-template-columns: minmax(150px, 1fr) 135px auto; }
  .filter-form.posts-filter { grid-template-columns: minmax(140px, 1fr) 110px 135px auto; }
  .membership-plan-head { display: none; }
  .membership-plan-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .membership-plan-row input:nth-child(5), .membership-plan-actions { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 13px; }
  .login-panel { padding: 34px 24px 30px; }
  .topbar-title p { display: none; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .button { width: 38px; overflow: hidden; padding: 0; color: transparent; position: relative; }
  .topbar-actions .button::after { content: "密"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .stat-card { min-height: 99px; padding: 14px; }
  .stat-card.accent, .stat-card.warn { padding-top: 11px; }
  .stat-value { font-size: 24px; }
  .panel-head { min-height: 65px; padding: 14px; }
  .filter-form, .filter-form.short { grid-template-columns: 1fr 112px; }
  .filter-form input { grid-column: 1 / -1; }
  .filter-form.posts-filter { grid-template-columns: 1fr 1fr auto; }
  .media-grid { grid-template-columns: 1fr; }
  .security-side { grid-template-columns: 1fr; }
  .category-row-head { grid-template-columns: 1fr 1fr; }
  .category-row-head .category-action { grid-column: 1; }
  .category-row-head .category-enabled, .category-row-head .category-remove { justify-self: end; }
  .normalization-box { display: grid; grid-template-columns: 1fr 1fr; }
  .readonly-note { max-width: 165px; text-align: right; }
  .topic-column-head { display: none; }
  .topic-admin-row { grid-template-columns: 1fr 1fr; }
  .topic-admin-row > input { grid-column: 1 / -1; }
  .topic-row-actions { justify-content: flex-start; }
  .dialog-actions .button { flex: 1; }
  .membership-copy-grid, .membership-plan-row { grid-template-columns: 1fr; }
  .membership-plan-row input:nth-child(5), .membership-plan-actions { grid-column: auto; }
  .wallet-adjust-form { grid-template-columns: 1fr 1fr; }
  .wallet-adjust-form label:first-child, .wallet-adjust-form label:nth-child(3), .wallet-adjust-form button { grid-column: 1 / -1; }
  .user-edit-form { grid-template-columns: 1fr 1fr; }.user-edit-form label:nth-child(1), .user-edit-form label:nth-child(3), .user-edit-form button { grid-column: 1 / -1; }
}
