:root {
  --bg: #f4f6f5;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --ink: #17211d;
  --muted: #62706a;
  --line: #dbe2de;
  --accent: #16734a;
  --accent-deep: #0f5738;
  --accent-soft: #e7f3ec;
  --success: #17633f;
  --shadow: 0 10px 30px rgba(27, 45, 37, 0.08);
  --font-body: "Segoe UI Variable", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

/* hidden 属性必须压过下面这些带 display 的类，否则 UA 的
   [hidden]{display:none} 会被作者样式盖掉，弹层和遮罩就藏不住了。 */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  min-height: 100vh;
}

a {
  color: var(--accent-deep);
}

button,
input,
select {
  font: inherit;
}

.auth-shell,
.console-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.auth-shell {
  width: min(420px, calc(100vw - 32px));
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

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

.auth-hero,
.panel {
  padding: 28px;
}

.auth-card {
  width: 100%;
  padding: 30px;
  background: var(--panel-strong);
}

.auth-card-header {
  margin-bottom: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
}

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

h1 {
  font-size: 30px;
}

h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

.lede {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 52ch;
}

.hero-grid,
.stack,
.compact {
  display: grid;
  gap: 14px;
}

.hero-grid article,
.mini-card,
.notice {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  padding: 16px 18px;
}

.hero-grid article span,
.mini-card span,
.mini-card small,
.meta-grid dd,
.panel p,
.panel li {
  color: var(--muted);
}

.stack label {
  display: grid;
  gap: 8px;
}

input,
select {
  width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(42, 27, 18, 0.16);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
}

button,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 12px 18px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:hover,
.ghost:hover {
  transform: translateY(-1px);
}

.primary {
  border: 0;
  color: white;
  background: var(--accent);
  box-shadow: none;
}

.primary:hover {
  background: var(--accent-deep);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.form-note,
.error {
  margin: 0;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.success-message {
  min-height: 1.2em;
  color: var(--success);
}

.error {
  color: #9f1d1d;
  min-height: 1.2em;
}

/* ── 微信登录按钮与扫码弹层（login.html）────────────────────────── */
.wechat-btn {
  border: 1px solid #dcdfe4;
  color: #07c160;
  background: #f2fbf6;
}

.wechat-btn:hover {
  background: #e6f7ee;
}

.wechat-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 25, 20, 0.45);
  z-index: 50;
}

.wechat-modal-card {
  position: relative;
  width: min(320px, calc(100vw - 40px));
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.wechat-modal-card > .wechat-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.wechat-modal-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
}

.wechat-qr-box {
  position: relative;
  display: inline-block;
}

.wechat-qr-box img {
  display: block;
  width: 220px;
  height: 220px;
}

.wechat-qr-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.wechat-qr-mask p {
  margin: 0;
  color: var(--muted);
}

.wechat-qr-mask button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 14px;
  background: white;
  cursor: pointer;
}

.wechat-modal-tip {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

#wechat-mobile-guide .wechat-btn {
  display: inline-block;
  min-width: 96px;
  margin: 12px 4px 0;
}

.wechat-modal-back {
  margin-top: 14px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

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

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

@media (min-width: 940px) {
  .console-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .span-2 {
    grid-column: span 2;
  }

  .span-3 {
    grid-column: span 3;
  }
}

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

.compact-panel {
  padding-top: 22px;
  padding-bottom: 22px;
}

.compact-panel .panel-head {
  margin-bottom: 10px;
}

.compact-panel h2 {
  font-size: 24px;
}

.badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 13px;
}

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

.meta-grid dt {
  color: var(--muted);
  font-size: 13px;
}

.meta-grid dd {
  margin: 6px 0 0;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

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

.subscription-form label {
  display: grid;
  gap: 8px;
}

.subscription-form label span {
  color: var(--muted);
  font-size: 13px;
}

.admin-contact {
  width: min(200px, 100%);
  margin: 16px 0 0;
  text-align: center;
}

.admin-contact img {
  display: block;
  width: 100%;
  height: auto;
}

.admin-contact figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (min-width: 720px) {
  .inline-form {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px) auto;
    align-items: center;
  }

  .gateway-form {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 220px) minmax(140px, 180px) auto;
  }
}

/* Member alert console */
.alert-console {
  width: min(1320px, calc(100vw - 32px));
}

.alert-page-header .lede {
  margin-bottom: 0;
}

.alert-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.alert-summary > div {
  min-width: 0;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.alert-summary > div:last-child {
  border-right: 0;
}

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

.alert-summary span {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.alert-summary strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.membership-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 18px 22px;
  border: 1px solid #e2c47b;
  border-radius: 8px;
  background: #fff9e8;
}

.membership-lock p {
  margin: 5px 0 0;
  color: #6d5b2c;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 12px 18px;
  color: #ffffff;
  text-decoration: none;
}

.alert-message {
  position: fixed;
  z-index: 100;
  top: 20px;
  left: 50%;
  width: min(520px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 13px 18px;
  border: 1px solid #8fc4aa;
  border-radius: 6px;
  color: #0f5738;
  background: #f0faf5;
  box-shadow: 0 10px 30px rgba(23, 33, 29, 0.16);
}

.alert-message.error {
  border-color: #e1a4a4;
  color: #8f2020;
  background: #fff5f5;
}

.alert-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 2fr);
  gap: 18px;
  align-items: start;
}

.alert-rule-panel,
.alert-editor-panel,
.alert-history-panel {
  min-width: 0;
}

.alert-rule-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.section-kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

.panel-head .section-kicker + h2 {
  margin-bottom: 0;
}

.compact-button {
  min-height: 38px;
  padding: 8px 13px;
  white-space: nowrap;
}

.alert-rule-list {
  border-top: 1px solid var(--line);
}

.alert-rule-row {
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
}

.alert-rule-row.paused {
  opacity: 0.72;
}

.rule-row-head,
.rule-row-head > div,
.rule-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rule-row-head {
  justify-content: space-between;
  align-items: flex-start;
}

.rule-row-head > div {
  min-width: 0;
  flex-wrap: wrap;
}

.rule-row-head strong {
  overflow-wrap: anywhere;
}

.rule-type {
  padding: 2px 6px;
  border-radius: 4px;
  color: #60491a;
  background: #fff3cf;
  font-size: 11px;
  white-space: nowrap;
}

.status-dot {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.status-dot::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #9ba7a1;
}

.status-dot.active::before {
  background: #1c8b58;
}

.alert-rule-row p {
  margin: 9px 0 3px;
  font-size: 13px;
}

.alert-rule-row small {
  color: var(--ink);
}

.rule-actions {
  margin-top: 12px;
  flex-wrap: wrap;
}

.text-command {
  min-width: 0;
  padding: 4px 8px;
  border: 0;
  color: var(--accent-deep);
  background: transparent;
  font-size: 13px;
  box-shadow: none;
}

.text-command:hover {
  transform: none;
  background: var(--accent-soft);
}

.danger-command {
  color: #9f1d1d;
}

.danger-command:hover {
  background: #fff0f0;
}

.empty-state,
.empty-cell {
  padding: 32px 12px;
  color: var(--muted);
  text-align: center;
}

.alert-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.alert-steps li {
  min-width: 0;
  padding: 10px 8px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.alert-steps li:last-child {
  border-right: 0;
}

.alert-steps li.active {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.alert-steps li span,
.alert-form-step legend span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 5px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--accent);
  font-weight: 700;
}

.alert-form-step {
  min-width: 0;
  margin: 0;
  padding: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.alert-form-step:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.alert-form-step legend {
  width: 100%;
  margin-bottom: 18px;
  color: var(--ink);
  font-weight: 700;
}

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

.alert-form-grid label,
.station-field,
.region-field,
.delivery-settings label {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.alert-form label > span {
  color: #34423c;
  font-size: 13px;
  font-weight: 600;
}

.region-field > label {
  color: #34423c;
  font-size: 13px;
  font-weight: 600;
}

.region-combobox {
  position: relative;
  min-width: 0;
}

.region-combobox > input {
  width: 100%;
}

.region-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 47, 37, 0.14);
}

.region-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  border-radius: 0;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.region-result:last-child {
  border-bottom: 0;
}

.region-result:hover,
.region-result.active {
  background: #edf8f2;
}

.region-result small,
.field-hint {
  color: var(--muted);
}

.region-result small {
  margin-left: 12px;
}

.field-hint {
  min-height: 17px;
  font-size: 12px;
}

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

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

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

.field-unit {
  color: var(--muted);
  font-weight: 400;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(540px, 100%);
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.segmented-control label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: block;
  padding: 11px 8px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.segmented-control label:last-child span {
  border-right: 0;
}

.segmented-control input:checked + span {
  color: #ffffff;
  background: var(--accent);
}

.station-field {
  width: min(540px, 100%);
}

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

.channel-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #8fc4aa;
  border-radius: 6px;
  background: #f4fbf7;
}

.channel-option input,
.toggle-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.channel-option span {
  font-weight: 700;
}

.channel-option small {
  grid-column: 2;
  color: var(--muted);
}

.channel-option.unavailable {
  border-color: var(--line);
  background: #f7f8f7;
  opacity: 0.66;
}

.delivery-settings {
  margin-top: 2px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.alert-history-panel {
  margin-top: 18px;
}

.alert-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.alert-history-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 13px;
}

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

.alert-history-table th {
  color: var(--muted);
  font-weight: 600;
  background: #f7f9f8;
}

.alert-history-table td strong,
.alert-history-table td small {
  display: block;
}

.alert-history-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.delivery-status {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.delivery-status.sent {
  color: #14613c;
  background: #e7f5ed;
}

.delivery-status.failed {
  color: #962626;
  background: #fff0f0;
}

@media (max-width: 980px) {
  .alert-workspace {
    grid-template-columns: 1fr;
  }

  .alert-rule-panel {
    position: static;
    max-height: none;
  }

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

@media (max-width: 720px) {
  .alert-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-summary > div:nth-child(2) {
    border-right: 0;
  }

  .alert-summary > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .membership-lock,
  .alert-page-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .alert-steps li:nth-child(2) {
    border-right: 0;
  }

  .alert-steps li:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .two-columns,
  .threshold-grid,
  .channel-options {
    grid-template-columns: 1fr;
  }

  .channel-option {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .channel-option small {
    grid-column: 3;
  }
}

.compact {
  gap: 10px;
}

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

.docs-shell code {
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.docs-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.docs-intro p,
.docs-resource p {
  color: var(--muted);
  line-height: 1.65;
  margin: 6px 0 0;
}

.docs-list {
  display: grid;
  gap: 12px;
  padding-top: 24px;
}

.docs-resource {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.docs-resource > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.docs-resource h2 {
  margin: 0;
}

.endpoint-list {
  display: grid;
  gap: 8px;
}

.endpoint-list code {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f8;
}

.admin-inline-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-resource-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

@media (min-width: 920px) {
  .admin-inline-form {
    grid-template-columns: minmax(120px, 180px) minmax(160px, 220px) minmax(180px, 1fr) minmax(190px, 230px) auto;
    align-items: center;
  }

  .admin-resource-form {
    grid-template-columns: minmax(110px, 1fr) minmax(140px, 1.2fr) minmax(90px, 0.7fr) minmax(190px, 1.5fr) minmax(150px, 1fr) minmax(100px, 0.8fr) minmax(140px, 1fr) auto;
    align-items: center;
  }
}

.row-card,
.mini-card {
  display: grid;
  gap: 6px;
}

.resource-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.mini-card code {
  white-space: normal;
  overflow-wrap: anywhere;
}

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

.resource-card .compact-meta {
  grid-template-columns: minmax(0, 1fr);
}

.resource-card .compact-meta > div,
.resource-card .compact-meta dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 720px) {
  .compact-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

.deadline-actions input {
  max-width: 220px;
  padding: 10px 12px;
}

.deadline-actions .compact-number {
  max-width: 96px;
}

.editable-card {
  gap: 14px;
}

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

.edit-grid label {
  display: grid;
  gap: 6px;
}

.edit-grid label span {
  color: var(--muted);
  font-size: 13px;
}

.edit-grid input,
.edit-grid select {
  padding: 10px 12px;
}

.danger-action {
  border-color: rgba(159, 29, 29, 0.28);
  color: #9f1d1d;
}

@media (min-width: 760px) {
  .edit-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .edit-grid .wide-field {
    grid-column: span 2;
  }
}

.error-notice {
  border-color: rgba(159, 29, 29, 0.28);
  background: rgba(159, 29, 29, 0.08);
  color: #9f1d1d;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.compact-table {
  min-width: 760px;
}

.resource-table {
  min-width: 1250px;
}

.permission-table {
  min-width: 1120px;
}

.admin-table th,
.admin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.42);
}

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

.admin-table tr.flash-row td {
  animation: flash-row-bg 1.8s ease;
}

.admin-table input,
.admin-table select {
  min-width: 0;
  border-radius: 10px;
  padding: 8px 9px;
  font-size: 13px;
}

.admin-table .badge {
  padding: 6px 10px;
  white-space: nowrap;
}

.table-actions,
.renew-control {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.table-actions .ghost,
.renew-control .ghost {
  padding: 8px 10px;
  font-size: 13px;
}

.renew-control .compact-number {
  width: 70px;
}

@keyframes flash-row-bg {
  0% {
    background: rgba(33, 92, 62, 0.16);
  }
  100% {
    background: transparent;
  }
}

@media (max-width: 720px) {
  .console-shell {
    width: min(100vw - 18px, 1180px);
    padding-top: 18px;
  }

  .console-header {
    align-items: start;
  }

  .panel {
    padding: 18px;
    border-radius: 20px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px;
    font-size: 13px;
  }

  .admin-inline-form,
  .admin-resource-form {
    gap: 8px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .docs-intro {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .docs-resource > header {
    display: grid;
  }
}

.notice {
  border-color: rgba(33, 92, 62, 0.24);
  background: rgba(33, 92, 62, 0.08);
  color: var(--success);
}

/* 工具类必须压过前面所有带 display 的组件类（如 .profile-form 的 grid），
   否则靠后定义的组件类会把隐藏态盖掉 */
.hidden {
  display: none !important;
}

.center-link {
  width: 100%;
}

.origin-card header {
  align-items: flex-start;
}

.origin-card header small,
.origin-resource-row small {
  display: block;
  margin-top: 4px;
}

.origin-resource-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.origin-resource-row {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 720px) {
  .origin-resource-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (max-width: 720px) {
  .alert-console .panel {
    border-radius: 8px;
  }
}

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

.wechat-avatar {
  border-radius: 50%;
  flex: none;
}

.wechat-openid {
  color: var(--muted);
  font-size: 12px;
}

/* ── 控制台账号资料编辑与会员展示 ─────────────────────────────── */
.profile-edit-toggle {
  margin-left: auto;
}

.profile-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.profile-form label {
  display: grid;
  gap: 8px;
}

.profile-form label span {
  color: var(--muted);
  font-size: 13px;
}

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

.badge.tone-ok {
  background: #e6f7ee;
  color: #16734a;
}

.badge.tone-warn {
  background: #fdf3e0;
  color: #9a6b15;
}

.badge.tone-muted {
  background: #eef1f4;
  color: #62706a;
}

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