:root {
  --m-navy: #061b33;
  --m-blue: #0969da;
  --m-soft: #f3f7fb;
  --m-line: #dbe5ef;
  --m-ink: #102a43;
  --m-muted: #63768a;
  --m-green: #087f5b;
  --m-red: #b42318;
  --m-shadow: 0 18px 48px rgba(20, 43, 70, 0.09);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--m-ink);
  background: var(--m-soft);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
}
.member-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}
.member-topbar {
  padding: 18px 0;
  border-bottom: 1px solid var(--m-line);
  background: #fff;
}
.member-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.member-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.member-brand img {
  height: 42px;
}
.member-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.member-link,
.member-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid var(--m-line);
  border-radius: 11px;
  color: var(--m-blue);
  background: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.member-button.primary {
  color: #fff;
  border-color: var(--m-blue);
  background: var(--m-blue);
}
.member-button.dark {
  color: #fff;
  border-color: var(--m-navy);
  background: var(--m-navy);
}
.member-button.danger {
  color: var(--m-red);
  border-color: #f2c8c5;
  background: #fff;
}
.member-button.small {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}
.member-button.full {
  width: 100%;
}
.member-login-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(21, 122, 239, 0.2),
      transparent 30%
    ),
    linear-gradient(135deg, #06172c, #0a294d 70%, #0b3767);
}
.member-login-wrap {
  min-height: calc(100vh - 79px);
  display: grid;
  place-items: center;
  padding: 50px 20px;
}
.member-login-card {
  width: min(470px, 100%);
  padding: 42px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.24);
  text-align: center;
}
.member-login-card h1 {
  margin: 22px 0 12px;
  font-size: 36px;
  letter-spacing: -0.035em;
}
.member-login-card > p {
  margin: 0 0 26px;
  color: var(--m-muted);
  line-height: 1.8;
}
.wechat-button {
  width: 100%;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: #07c160;
  font-weight: 800;
  text-decoration: none;
}
.wechat-button.fallback {
  min-height: auto;
  margin-top: 12px;
  color: var(--m-blue);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}
.wechat-qr-shell {
  position: relative;
  display: grid;
  width: 304px;
  height: 304px;
  place-items: center;
  margin: 0 auto 8px;
  overflow: hidden;
  border: 1px solid var(--m-line);
  border-radius: 18px;
  background: #fff;
}
.wechat-qr-shell.hidden {
  display: none;
}
.wechat-qr {
  width: 300px;
  height: 300px;
  overflow: hidden;
}
.wechat-qr iframe {
  display: block;
  width: 300px !important;
  height: 400px !important;
  margin-top: -48px;
  border: 0;
}
.wechat-qr-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--m-muted);
  background: #fff;
  font-size: 13px;
}
.wechat-qr-loading.hidden {
  display: none;
}
.wechat-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #d8e5df;
  border-top-color: #07c160;
  border-radius: 50%;
  animation: wechat-spin 0.8s linear infinite;
}
@keyframes wechat-spin {
  to {
    transform: rotate(360deg);
  }
}
.member-note {
  margin-top: 20px;
  padding: 14px;
  border-radius: 12px;
  color: var(--m-muted);
  background: var(--m-soft);
  font-size: 12px;
  line-height: 1.7;
}
.member-error {
  display: none;
  margin: 0 0 18px;
  padding: 12px;
  border-radius: 11px;
  color: var(--m-red);
  background: #fff0ef;
  font-size: 13px;
}
.member-error.show {
  display: block;
}
.member-dev {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--m-line);
}
.member-dev.show {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.member-hero {
  padding: 54px 0 42px;
  color: #fff;
  background: linear-gradient(135deg, #06172c, #0a3768);
}
.member-hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
}
.member-profile {
  display: flex;
  align-items: center;
  gap: 18px;
}
.member-avatar {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: #15558f;
  font-size: 24px;
  font-weight: 800;
}
.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.member-profile h1 {
  margin: 0 0 7px;
  font-size: 34px;
}
.member-profile p {
  margin: 0;
  color: #bed7ef;
}
.member-admin-entry {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
.member-main {
  padding: 38px 0 80px;
}
.member-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.member-stat {
  padding: 22px;
  border: 1px solid var(--m-line);
  border-radius: 18px;
  background: #fff;
}
.member-stat span {
  display: block;
  color: var(--m-muted);
  font-size: 12px;
}
.member-stat strong {
  display: block;
  margin-top: 9px;
  font-size: 28px;
}
.member-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.5fr);
  gap: 22px;
  align-items: start;
}
.member-panel {
  padding: 26px;
  border: 1px solid var(--m-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(20, 43, 70, 0.04);
}
.member-panel + .member-panel {
  margin-top: 20px;
}
.member-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.member-panel h2 {
  margin: 0;
  font-size: 24px;
}
.member-panel-sub {
  margin: 6px 0 0;
  color: var(--m-muted);
  font-size: 13px;
}
.member-empty {
  padding: 28px;
  border: 1px dashed #c6d4e2;
  border-radius: 14px;
  color: var(--m-muted);
  background: #fafcff;
  text-align: center;
  line-height: 1.7;
}
.project-list,
.member-list {
  display: grid;
  gap: 14px;
}
.project-card {
  padding: 20px;
  border: 1px solid var(--m-line);
  border-radius: 16px;
  background: #fbfdff;
}
.project-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
}
.project-card h3 {
  margin: 0;
  font-size: 18px;
}
.project-status {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--m-blue);
  background: #eaf3ff;
  font-size: 11px;
  font-weight: 800;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 10px 0;
  color: var(--m-muted);
  font-size: 12px;
}
.member-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7edf3;
}
.member-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--m-blue);
}
.project-next {
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 11px;
  color: #40576e;
  background: #f1f6fb;
  font-size: 13px;
  line-height: 1.6;
}
.document-row,
.tool-row,
.inquiry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #edf1f5;
}
.document-row:last-child,
.tool-row:last-child,
.inquiry-row:last-child {
  border-bottom: 0;
}
.row-main {
  min-width: 0;
}
.row-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-main p {
  margin: 5px 0 0;
  color: var(--m-muted);
  font-size: 12px;
  line-height: 1.5;
}
.quick-links {
  display: grid;
  gap: 10px;
}
.quick-link {
  padding: 15px;
  border: 1px solid var(--m-line);
  border-radius: 13px;
  text-decoration: none;
}
.quick-link strong {
  display: block;
}
.quick-link span {
  display: block;
  margin-top: 5px;
  color: var(--m-muted);
  font-size: 12px;
}
.admin-hero {
  padding: 38px 0;
  color: #fff;
  background: var(--m-navy);
}
.admin-hero h1 {
  margin: 0;
}
.admin-main {
  padding: 30px 0 80px;
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.admin-tab {
  padding: 9px 14px;
  border: 1px solid var(--m-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.admin-tab.active {
  color: #fff;
  border-color: var(--m-blue);
  background: var(--m-blue);
}
.admin-section {
  display: none;
}
.admin-section.active {
  display: block;
}
.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.6fr);
  gap: 20px;
  align-items: start;
}
.admin-table-wrap {
  overflow: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--m-line);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}
.admin-table th {
  color: var(--m-muted);
  font-size: 11px;
}
.admin-form {
  display: grid;
  gap: 14px;
}
.admin-form label {
  display: grid;
  gap: 7px;
  color: #2f4860;
  font-size: 12px;
  font-weight: 700;
}
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #cbd8e5;
  border-radius: 10px;
  background: #fff;
}
.admin-form textarea {
  min-height: 88px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin-status {
  min-height: 20px;
  color: var(--m-muted);
  font-size: 12px;
}
.admin-status.success {
  color: var(--m-green);
}
.admin-status.error {
  color: var(--m-red);
}
@media (max-width: 900px) {
  .member-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .member-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .member-hero-grid {
    grid-template-columns: 1fr;
  }
  .member-admin-entry {
    width: fit-content;
  }
}
@media (max-width: 620px) {
  .member-shell {
    width: min(100% - 26px, 1180px);
  }
  .member-top-actions .member-link:first-child {
    display: none;
  }
  .member-login-card {
    padding: 30px 22px;
  }
  .member-stats {
    grid-template-columns: 1fr 1fr;
  }
  .member-stat {
    padding: 18px;
  }
  .member-profile h1 {
    font-size: 27px;
  }
  .member-panel {
    padding: 20px 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
