:root {
  --ink: #18211d;
  --muted: #66736c;
  --faint: #89958d;
  --line: #d9dfd8;
  --paper: #fffdf8;
  --surface: #f4f6f2;
  --panel: #ffffff;
  --nav: #111b17;
  --nav-2: #17241f;
  --green: #13804f;
  --green-dark: #0d5f3a;
  --mint: #e7f5ec;
  --gold: #b4832d;
  --red: #b9413d;
  --shadow: 0 16px 36px rgba(25, 34, 29, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

button:active,
a:active {
  transform: translateY(1px);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.12);
}

.brand-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.login-logo {
  width: min(100%, 360px);
  margin: -4px 0 12px;
}

.side-logo {
  width: 238px;
  max-width: 100%;
}

.public-logo {
  width: min(100%, 320px);
  margin: -2px auto 12px;
}

.admin-alert-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 24, 20, 0.58);
  backdrop-filter: blur(7px);
}

.admin-alert-backdrop.hidden {
  display: none;
}

.admin-alert-dialog {
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid #efc7c4;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 28px 78px rgba(15, 24, 20, 0.28);
}

.admin-alert-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--red);
  font-size: 26px;
  font-weight: 900;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.16);
}

.admin-alert-copy h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.admin-alert-copy p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.65;
}

.admin-alert-list {
  display: grid;
  gap: 10px;
  max-height: 280px;
  margin: 18px 0;
  overflow: auto;
}

.admin-alert-list article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #efd5d2;
  border-radius: 8px;
  background: #fff8f7;
}

.admin-alert-list strong {
  color: var(--red);
  font-size: 15px;
}

.admin-alert-list span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  word-break: break-all;
}

.admin-alert-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.admin-alert-list em {
  color: var(--faint);
  font-size: 12px;
  font-style: normal;
}

.admin-alert-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.alert-ack {
  grid-column: auto;
  justify-self: auto;
  min-width: 124px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(19, 128, 79, 0.10), rgba(244, 246, 242, 0) 42%),
    var(--surface);
}

.login-card {
  width: min(460px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 6px 0 24px;
  font-size: 30px;
  line-height: 1.15;
}

.login-card label,
.code-form label,
.domain-add-form label,
.domain-edit-form label,
.user-add-form label,
.user-edit-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-card input,
.code-form input,
.code-form textarea,
.domain-add-form input,
.domain-edit-form input,
.user-add-form input,
.user-edit-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.code-form textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}

.login-card input:focus,
.code-form input:focus,
.code-form textarea:focus,
.domain-add-form input:focus,
.domain-edit-form input:focus,
.user-add-form input:focus,
.user-edit-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(19, 128, 79, 0.12);
}

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

.login-card button,
.save,
.new-link,
.public-button {
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
  font-weight: 800;
}

.login-card button:hover,
.save:hover,
.new-link:hover,
.public-button:hover {
  background: var(--green-dark);
}

.login-card button,
.save {
  min-height: 44px;
}

.form-error,
.flash.error {
  color: var(--red);
}

.admin-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  background: #eef2ed;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--nav);
  padding: 20px;
}

.brand {
  margin-bottom: 20px;
  padding: 2px 0 6px;
}

.new-link {
  display: block;
  text-align: center;
  padding: 12px;
  margin-bottom: 10px;
  background: #1a8c5a;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.side-menu {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.side-menu a {
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 800;
}

.side-menu a:hover,
.side-menu a.active {
  color: #fff;
  border-color: rgba(231, 245, 236, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.code-nav {
  display: grid;
  gap: 8px;
}

.code-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  background: var(--nav-2);
}

.code-pill:hover,
.code-pill.active {
  border-color: rgba(90, 211, 142, 0.55);
  background: #1d312a;
}

.code-pill b,
.code-pill small {
  display: block;
}

.code-pill small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.5);
}

.code-pill em {
  color: #9be6bc;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.side .empty {
  color: rgba(255, 255, 255, 0.56);
}

.logout {
  width: 100%;
  margin-top: 20px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  cursor: pointer;
}

.logout:hover {
  background: rgba(255, 255, 255, 0.08);
}

.admin-main {
  padding: 28px;
}

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

.admin-header h1,
.section-title h2 {
  margin: 0;
  letter-spacing: 0;
}

.admin-header h1 {
  font-size: clamp(25px, 3vw, 36px);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 10px;
}

.metrics div,
.editor,
.logs,
.domains-panel,
.users-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metrics div {
  padding: 15px 16px;
}

.metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metrics strong {
  display: block;
  margin-top: 7px;
  color: #10251a;
  font-size: 26px;
  line-height: 1;
}

.flash {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #bfdfc9;
  border-radius: 8px;
  background: var(--mint);
  color: var(--green-dark);
  font-weight: 700;
}

.editor,
.logs,
.domains-panel,
.users-panel {
  margin-bottom: 18px;
  padding: 20px;
}

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

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

.danger {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e6b8b6;
  border-radius: 8px;
  color: var(--red);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.danger:hover {
  background: #fff4f3;
}

.ghost-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #cbd7ce;
  border-radius: 8px;
  color: var(--green-dark);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.ghost-btn:hover {
  background: #f3f8f0;
}

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

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

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

.code-form select,
.domain-edit-form select,
.user-add-form select,
.user-edit-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.radio-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 18px;
}

.radio-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 700;
}

.radio-row input {
  width: auto;
  min-height: 0;
}

.save {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 160px;
  padding: 0 18px;
}

.small-save {
  grid-column: auto;
  min-width: 84px;
}

.domain-add-form,
.domain-edit-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(220px, 1.4fr) 120px auto;
  gap: 12px;
  align-items: end;
}

.user-add-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(130px, 0.9fr) minmax(130px, 0.9fr) 120px 110px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid #dce5dc;
  border-radius: 8px;
  background: #f8faf6;
}

.user-add-form .domain-checks,
.user-add-form .save {
  grid-column: 1 / -1;
}

.domain-add-form {
  padding: 14px;
  border: 1px solid #dce5dc;
  border-radius: 8px;
  background: #f8faf6;
}

.domain-list,
.user-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.domain-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.35fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e3e9e1;
  border-radius: 8px;
  background: #fff;
}

.domain-edit-form {
  grid-template-columns: minmax(130px, 0.9fr) minmax(220px, 1.4fr) 120px 94px auto;
}

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

.user-edit-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(130px, 0.8fr) minmax(120px, 0.8fr) 112px 112px minmax(130px, 0.6fr) auto;
  gap: 10px;
  align-items: end;
}

.domain-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  min-height: 44px;
}

.domain-checks-edit {
  grid-column: 1 / -1;
}

.domain-checks label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid #e3e9e1;
  border-radius: 8px;
  background: #fff;
}

.domain-checks input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.domain-checks span {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.domain-checks small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 44px;
}

.user-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr)) minmax(180px, 1.1fr);
  gap: 8px;
}

.user-stats span,
.user-stats a,
.user-stats em {
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #edf1ea;
  border-radius: 8px;
  background: #f8fbf6;
}

.user-stats b {
  display: block;
  color: #10251a;
  font-size: 18px;
  line-height: 1;
}

.user-stats small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.user-stats a {
  display: grid;
  place-items: center;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.user-stats em {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

.role-badge.super {
  color: #7a5a0b;
  background: #fff3c7;
}

.role-badge.paused {
  color: var(--red);
  background: #fff0ef;
}

.user-pause-form,
.self-note {
  align-self: end;
}

.self-note {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #dce5dc;
  border-radius: 8px;
  color: var(--muted);
  background: #f8faf6;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.domain-deploy-status {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #dce5dc;
  border-radius: 8px;
  background: #f8faf6;
}

.domain-deploy-status span,
.domain-deploy-status small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.domain-deploy-status strong {
  display: block;
  margin-top: 3px;
  color: var(--green-dark);
  font-size: 14px;
}

.domain-deploy-status small {
  max-width: 240px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-deploy-status.failed {
  border-color: #efc7c4;
  background: #fff7f6;
}

.domain-deploy-status.failed strong {
  color: var(--red);
}

.domain-deploy-status.pending strong {
  color: #8a6812;
}

.qr-pool {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #dce5dc;
  border-radius: 8px;
  background: #f8faf6;
}

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

.pool-head h3 {
  margin: 0;
  font-size: 20px;
}

.pool-head span,
.section-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--mint);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pool-note {
  margin: -2px 0 2px;
  color: var(--muted);
  line-height: 1.65;
}

.pool-row {
  display: grid;
  grid-template-columns: 74px minmax(120px, 1fr) 130px minmax(160px, 1.2fr) minmax(140px, 0.9fr) 76px 74px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e3e9e1;
  border-radius: 8px;
  background: #fff;
}

.pool-row-new {
  grid-template-columns: 74px minmax(140px, 1fr) minmax(180px, 1.1fr) minmax(150px, 0.9fr);
}

.pool-thumb {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.pool-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pool-thumb-empty {
  color: var(--green);
  background: var(--mint);
  font-size: 26px;
  font-weight: 900;
}

.pool-url {
  min-width: 0;
}

.pool-stat {
  display: grid;
  align-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #edf1ea;
  border-radius: 8px;
  background: #f8fbf6;
}

.pool-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pool-stat strong {
  font-size: 18px;
}

.pool-delete {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #f0d2d2;
  border-radius: 8px;
  background: #fff8f7;
  color: #9f1d1d;
  font-size: 13px;
  font-weight: 900;
}

.pool-delete input {
  width: 16px;
  height: 16px;
  accent-color: #b3261e;
}

.new-pool-title {
  margin-top: 6px;
  color: var(--ink);
  font-weight: 900;
}

.qr-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5e9e2;
  border-radius: 8px;
  background: #f9fbf7;
}

.qr-preview {
  display: grid;
  place-items: center;
  min-height: 270px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.qr-preview-img {
  max-width: 100%;
  max-height: 308px;
  object-fit: contain;
}

.pool-preview-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 10px;
}

.pool-preview-stack .qr-preview-img {
  width: 100%;
  aspect-ratio: 1;
  max-height: none;
  padding: 8px;
  border: 1px solid #edf1ea;
  border-radius: 8px;
  background: #fff;
}

.qr-empty {
  padding: 20px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.public-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.public-link span {
  padding: 11px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-link button {
  min-width: 82px;
  border: 0;
  border-left: 1px solid var(--line);
  background: #edf4ee;
  cursor: pointer;
  font-weight: 800;
}

.public-link button:hover {
  background: #dceee2;
}

.link-label {
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.qr-card dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
}

.qr-card dl div {
  padding: 12px;
  border: 1px solid #edf1ea;
  border-radius: 8px;
  background: #fff;
}

.qr-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.qr-card dd {
  margin: 6px 0 0;
  font-weight: 800;
}

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

.log-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 18px;
}

.log-filter-label {
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #dce4d8;
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.filter-chip:hover,
.filter-chip.active {
  color: var(--green-dark);
  border-color: #b9d8c3;
  background: var(--mint);
}

.log-list div {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 72px 92px 144px 146px 150px minmax(120px, 0.75fr);
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #edf1ea;
  border-radius: 8px;
  background: #fff;
}

.log-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-list span small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-list b {
  color: var(--green-dark);
}

.log-list em {
  color: var(--muted);
  font-style: normal;
}

.log-list code {
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 6px;
  color: #506057;
  background: #f4f7f1;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.public-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(19, 128, 79, 0.12), rgba(244, 246, 242, 0) 36%),
    var(--surface);
}

.wechat-card {
  width: min(440px, 100%);
  padding: 24px 20px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.public-brand {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--mint);
  font-size: 13px;
  font-weight: 900;
}

.assigned-label {
  display: inline-block;
  margin: 11px 0 0;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #eef8f1;
  font-size: 13px;
  font-weight: 900;
}

.wechat-card h1 {
  margin: 0;
  font-size: clamp(23px, 6vw, 31px);
  line-height: 1.22;
}

.public-desc {
  margin: 13px auto 17px;
  color: var(--muted);
  line-height: 1.75;
}

.wechat-qr-box {
  margin: 16px auto 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wechat-qr-img {
  display: block;
  width: 100%;
  max-width: 330px;
  max-height: 68vh;
  margin: 0 auto;
  object-fit: contain;
  -webkit-touch-callout: default;
  user-select: auto;
}

.wechat-hint {
  margin: 13px 0 0;
  color: #000;
  font-weight: 900;
  line-height: 1.55;
}

.loading-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(19, 128, 79, 0.12), rgba(244, 246, 242, 0) 48%),
    var(--surface);
}

.loading-card {
  width: min(420px, 100%);
  padding: 30px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.loading-logo {
  display: block;
  width: min(280px, 100%);
  margin: 0 auto 22px;
}

.loading-ring {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border: 4px solid #dce8df;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: loading-spin 0.9s linear infinite;
}

.loading-card h1 {
  margin: 0;
  font-size: 26px;
}

.loading-card p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.loading-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eee7;
}

.loading-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transform-origin: left center;
  animation: loading-bar 0.01s ease forwards;
}

.loading-fallback {
  display: inline-flex;
  margin-top: 18px;
  color: var(--green-dark);
  font-weight: 900;
}

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

@keyframes loading-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.public-button {
  display: block;
  margin-top: 16px;
  padding: 13px 16px;
}

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

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

  .user-meta,
  .user-stats,
  .user-edit-form .save {
    grid-column: 1 / -1;
  }

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

  .user-pause-form {
    justify-self: start;
  }
}

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

  .side {
    position: static;
    height: auto;
  }

  .admin-header,
  .edit-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .login-card,
  .wechat-card {
    padding: 22px 16px;
  }

  .admin-main {
    padding: 14px;
  }

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

  .domain-add-form,
  .domain-edit-form,
  .domain-row,
  .user-add-form,
  .user-edit-form {
    grid-template-columns: 1fr;
  }

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

  .user-stats {
    grid-template-columns: 1fr 1fr;
  }

  .log-list div {
    grid-template-columns: 1fr;
  }

  .pool-row,
  .pool-row-new {
    grid-template-columns: 1fr;
  }

  .pool-head {
    display: grid;
  }

  .public-link {
    grid-template-columns: 1fr;
  }

  .public-link button {
    min-height: 40px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
