:root {
  color-scheme: light;
  --page: #f3f7f4;
  --forest: #0d2a1b;
  --forest-2: #174c33;
  --green: #168347;
  --mint: #baf0cf;
  --khaki: #dbeadf;
  --khaki-deep: #8fc79f;
  --surface: #ffffff;
  --surface-soft: #f7fbf8;
  --ink: #0e1d14;
  --muted: #62706a;
  --line: #dce7df;
  --danger: #d83b2d;
  --shadow: 0 20px 52px rgba(18, 52, 32, 0.1);
}

* {
  box-sizing: border-box;
}

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

button,
input {
  font: inherit;
}

.member-shell {
  display: grid;
  min-height: 100vh;
  padding: 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(420px, 1.1fr);
  width: min(1060px, 100%);
  min-height: 640px;
  margin: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-brand-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 34px;
  padding: clamp(42px, 5vw, 68px) clamp(28px, 4vw, 54px);
  background:
    linear-gradient(145deg, #0b3327 0%, #174c36 100%);
  color: #fff9eb;
}

.auth-card {
  display: grid;
  align-content: center;
  gap: 24px;
  padding: clamp(30px, 6vw, 76px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: inherit;
  text-decoration: none;
  font-size: 20px;
  font-weight: 900;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.auth-brand-logo {
  width: min(270px, 72%);
  height: auto;
  justify-self: center;
  object-fit: contain;
  filter: drop-shadow(0 18px 14px rgba(0, 0, 0, 0.34));
}

.auth-brand-copy {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.auth-product-title {
  color: #fff8e7;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1.16;
  text-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
}

.config-text-pending {
  visibility: hidden;
}

.eyebrow,
h1,
h2,
p {
  margin: 0;
}

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

.auth-brand-panel .eyebrow {
  color: #ffd680;
}

h1 {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.auth-brand-panel p {
  color: rgba(255, 249, 235, 0.86);
  font-size: 17px;
  max-width: 360px;
}

.auth-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.auth-benefits span,
.soft-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 213, 126, 0.22);
  color: #ffe09a;
  font-size: 13px;
  font-weight: 900;
}

.soft-pill {
  background: #e9f7ed;
  color: var(--green);
}

.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ecf8f0;
  color: var(--forest);
  box-shadow: 0 12px 26px rgba(78, 59, 33, 0.12);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

.home-link:hover {
  background: #ffd98d;
}

.home-link-light {
  border-color: rgba(255, 225, 161, 0.78);
  background: #f2c879;
  color: #163725;
  box-shadow: 0 16px 34px rgba(17, 45, 31, 0.24), inset 0 1px rgba(255, 255, 255, 0.42);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.auth-tabs button.active {
  background: var(--forest);
  color: #fff9eb;
  box-shadow: 0 12px 26px rgba(13, 42, 27, 0.18);
}

.member-form,
.password-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: #5d5447;
  font-size: 13px;
  font-weight: 900;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  font-weight: 800;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 131, 71, 0.14);
}

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

.button-row .primary-button:first-child:last-child {
  grid-column: 1 / -1;
}

.primary-button,
.ghost-button {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

.primary-button {
  border: 0;
  background: var(--forest);
  color: #fff;
}

.primary-button.secondary {
  background: var(--green);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.72);
  color: var(--forest);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.form-hint {
  color: #8b5a20;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-shell {
  display: grid;
  width: 100%;
  margin: 0;
  min-height: 100vh;
  grid-template-columns: 236px minmax(0, 1fr);
  background: var(--page);
}

.member-side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.member-side-brand {
  display: grid;
  gap: 10px;
  justify-items: start;
  color: var(--forest);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

.member-side-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.member-side-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: #3d4b43;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.member-side-nav a:hover {
  background: #eef8f1;
  color: var(--green);
}

.member-side-logout {
  width: 100%;
}

.member-dashboard-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
}

.dashboard-hero,
.overview-card,
.dashboard-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
}

.dashboard-hero h1 {
  font-size: 30px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) repeat(3, minmax(170px, 1fr));
  gap: 16px;
}

.overview-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 18px;
  background: #ffffff;
}

.overview-card span,
.overview-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.overview-card strong {
  color: var(--forest);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.12;
  word-break: break-word;
}

.account-card {
  grid-column: auto;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(420px, 1fr));
  align-items: start;
  gap: 18px;
}

.license-center-card {
  grid-column: 1 / -1;
}

.image-storage-card {
  grid-column: 1 / -1;
}

.dashboard-card {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.dashboard-card.is-collapsed > :not(.card-head) {
  display: none !important;
}

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

.collapse-toggle {
  min-width: 58px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--forest);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.collapse-toggle:hover {
  border-color: var(--green);
}

.card-head p {
  font-size: 14px;
}

.storage-card-head {
  align-items: center;
}

.storage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.compact-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  white-space: nowrap;
}

.storage-summary-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.storage-summary-grid > div {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 110px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.storage-summary-grid span,
.image-list-head p,
.image-file-cell span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.storage-summary-grid strong {
  color: var(--forest);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1;
}

.storage-summary-grid strong b {
  font: inherit;
}

.storage-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(13, 42, 27, 0.1);
}

.storage-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #61bd7f);
  transition: width 0.2s ease;
}

#storageStateText[data-state="normal"] {
  color: var(--green);
}

#storageStateText[data-state="over"],
#storageStateText[data-state="frozen"] {
  color: var(--danger);
}

.storage-notice {
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.storage-notice[data-type="warning"] {
  padding: 12px 14px;
  border: 1px solid #efc0a5;
  border-radius: 8px;
  background: #fff1e8;
  color: #a44724;
}

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

.image-list-head h3 {
  margin: 0;
  color: var(--forest);
  font-size: 18px;
}

.image-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.image-list-toolbar label:not(.image-select-all) {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.image-list-toolbar select,
.usage-filter-bar select,
.usage-filter-bar input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--forest);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.image-select-all {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 900;
}

.image-select-all input,
.member-image-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.danger-button {
  border-color: rgba(216, 59, 45, 0.36) !important;
  color: var(--danger) !important;
}

.member-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(13, 42, 27, 0.48);
  backdrop-filter: blur(5px);
}

.member-dialog {
  width: min(540px, 100%);
  max-height: min(720px, calc(100vh - 44px));
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(13, 42, 27, 0.3);
}

.member-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fcf9 0%, #ffffff 100%);
}

.member-dialog-head h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 22px;
}

.member-dialog-message {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.7;
  white-space: pre-line;
}

.member-dialog-close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--forest);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.member-dialog-body {
  display: grid;
  gap: 14px;
  padding: 20px 24px;
}

.member-dialog-field {
  display: grid;
  gap: 8px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 900;
}

.member-dialog-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.member-dialog-field input:focus {
  outline: 3px solid rgba(22, 131, 71, 0.16);
  border-color: var(--green);
  background: #ffffff;
}

.member-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.member-dialog-backdrop.is-danger .member-dialog {
  border-color: #f1b8b1;
}

.member-dialog-backdrop.is-danger .member-dialog-head {
  background: linear-gradient(180deg, #fff7f6 0%, #ffffff 100%);
}

.member-storage-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.member-storage-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.member-storage-table th,
.member-storage-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.member-storage-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  background: var(--surface-soft);
}

.member-storage-table td {
  color: var(--forest);
  font-size: 13px;
  font-weight: 900;
}

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

.member-image-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.image-thumb-button {
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7f4;
  cursor: pointer;
}

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

.image-file-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.image-file-cell strong {
  color: var(--forest);
  font-size: 14px;
  word-break: break-word;
}

.image-file-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-badge,
.url-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 2px 4px 2px 0;
  padding: 0 10px;
  border-radius: 999px;
  background: #e9f7ed;
  color: var(--green) !important;
}

.storage-ok {
  background: #e9f7ed;
  color: var(--green) !important;
}

.storage-pending {
  background: #eef4ff;
  color: #2860b6 !important;
}

.storage-protected {
  background: #fff1df;
  color: #a76100 !important;
}

.storage-danger {
  background: #fff0ed;
  color: var(--danger) !important;
}

.storage-thumb,
.storage-thumb-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 8px;
}

.storage-thumb {
  object-fit: cover;
  border: 1px solid var(--line);
}

.storage-thumb-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.storage-folder-select-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--forest);
}

.storage-folder-select-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.prefix-note,
.muted-action {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.image-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.image-row-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--forest);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.image-row-actions button:hover,
.compact-button:hover,
.image-thumb-button:hover {
  border-color: var(--green);
  box-shadow: 0 8px 20px rgba(22, 131, 71, 0.12);
}

.plan-table,
.service-list,
.member-license-list {
  display: grid;
  gap: 10px;
}

.member-usage-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.member-usage-summary div,
.member-log-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.member-usage-summary div {
  display: grid;
  gap: 6px;
  min-height: 72px;
  padding: 12px;
}

.member-usage-summary span,
.member-log-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-usage-summary strong {
  color: var(--forest);
  font-size: 20px;
}

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

.member-log-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.member-log-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.usage-filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) minmax(150px, 0.8fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.usage-filter-bar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.plan-rights-current > div,
.plan-rights-list > div,
.plan-cost-grid > div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.plan-rights-current span,
.plan-cost-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plan-rights-current strong,
.plan-cost-grid b,
.plan-rights-list b {
  color: var(--forest);
  font-size: 18px;
}

.plan-rights-current p,
.plan-rights-section p,
.plan-rights-list p,
.plan-cost-grid small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.plan-rights-section {
  display: grid;
  gap: 10px;
}

.plan-rights-section h3 {
  margin: 0;
  color: var(--forest);
  font-size: 16px;
}

.plan-rights-list,
.plan-cost-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.plan-rights-list .is-current {
  border-color: rgba(22, 131, 71, 0.36);
  box-shadow: inset 4px 0 0 var(--green);
}

.member-log-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.license-reveal-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.license-reveal-form label {
  min-width: 0;
}

.license-reveal-form input {
  min-height: 46px;
}

.license-reveal-form button {
  min-height: 46px;
  white-space: nowrap;
}

.license-reveal-status {
  grid-column: 1 / -1;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.license-reveal-status[data-type="error"] {
  color: var(--danger);
}

.plan-table > div,
.service-list > div,
.member-license-item {
  display: grid;
  grid-template-columns: 96px 96px 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

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

.plan-table .plan-table-head {
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.plan-table .plan-table-loading {
  grid-template-columns: 1fr;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.member-license-item {
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(120px, .8fr));
}

.member-license-item span,
.member-license-item b,
.plan-table i,
.member-license-item code {
  display: block;
}

.member-license-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.member-license-item code {
  margin-top: 4px;
  color: var(--forest);
  font-size: 15px;
  font-weight: 900;
  word-break: break-word;
}

.member-license-item b {
  margin-top: 4px;
  color: var(--ink);
}

.empty-license-note {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--khaki-deep);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 14px;
  font-weight: 800;
}

.empty-license-note.error-note {
  border-color: #f0b5ac;
  background: #fff0ee;
  color: #b74333;
}

.plan-table span,
.service-list b {
  color: var(--forest);
  font-weight: 900;
}

.plan-table b,
.plan-table i,
.service-list span {
  color: var(--muted);
}

.plan-table i {
  font-style: normal;
}

.plan-table em {
  color: #b36a04;
  font-style: normal;
  font-weight: 900;
  text-align: left;
}

.plan-table.plan-table-markdown {
  min-height: 0;
}

.plan-table.plan-table-markdown .plan-markdown-box {
  display: block;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 15px;
  line-height: 1.75;
}

.plan-markdown-box h3,
.plan-markdown-box h4,
.plan-markdown-box p,
.plan-markdown-box ul,
.plan-markdown-box ol,
.plan-markdown-box blockquote,
.plan-markdown-box pre,
.plan-markdown-box table {
  margin: 0;
}

.plan-markdown-box h3 {
  color: var(--forest);
  font-size: 18px;
}

.plan-markdown-box h4 {
  color: var(--forest);
  font-size: 15px;
}

.plan-markdown-box strong {
  color: #b36a04;
}

.plan-markdown-box a {
  color: var(--forest);
  font-weight: 900;
  text-decoration: underline;
}

.plan-markdown-box code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #e8f2eb;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.plan-markdown-box pre {
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  background: #e8f2eb;
}

.plan-markdown-box blockquote {
  padding: 8px 10px;
  border-left: 4px solid var(--green);
  background: rgba(22, 131, 71, 0.08);
}

.plan-markdown-box ul,
.plan-markdown-box ol {
  padding-left: 22px;
}

.plan-markdown-box table {
  width: 100%;
  border-collapse: collapse;
}

.plan-markdown-box th,
.plan-markdown-box td {
  padding: 7px 8px;
  border: 1px solid var(--line);
  text-align: left;
}

.plan-markdown-list {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 6px;
}

.plan-markdown-list > span {
  color: var(--green);
  font-weight: 900;
}

.plan-markdown-gap {
  height: 8px;
}

.plan-markdown-empty {
  color: var(--muted);
  font-weight: 900;
}

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

.topup-grid button {
  display: grid;
  gap: 6px;
  min-height: 94px;
  padding: 14px;
  border: 1px dashed var(--khaki-deep);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--forest);
  text-align: left;
}

.topup-grid b {
  font-size: 18px;
}

.topup-grid span {
  color: var(--muted);
  font-weight: 800;
}

.status-text {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.status-text[data-type="error"] {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .auth-layout,
  .dashboard-hero,
  .dashboard-shell,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .member-side {
    position: static;
    height: auto;
    grid-template-rows: auto;
    padding: 16px;
  }

  .member-side-nav {
    display: flex;
    flex-wrap: wrap;
  }

  .member-side-logout {
    width: auto;
    justify-self: start;
  }

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

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

  .storage-card-head,
  .image-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .storage-actions {
    justify-content: flex-start;
  }

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

  .usage-filter-bar,
  .plan-rights-current,
  .plan-rights-list,
  .plan-cost-grid {
    grid-template-columns: 1fr;
  }

  .image-row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .member-shell {
    padding: 0;
  }

  .auth-layout {
    min-height: auto;
  }

  .auth-card,
  .auth-brand-panel {
    padding: 24px;
  }

  .button-row,
  .overview-grid,
  .topup-grid,
  .member-usage-summary,
  .member-log-row,
  .storage-summary-grid,
  .plan-table > div,
  .service-list > div,
  .member-license-item {
    grid-template-columns: 1fr;
  }

  .member-dashboard-main {
    padding: 14px;
  }

  .dashboard-hero,
  .card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-card {
    grid-column: span 1;
  }

  .storage-actions {
    width: 100%;
  }

  .storage-actions .compact-button {
    flex: 1 1 100%;
  }

  .member-storage-table {
    min-width: 900px;
  }

  .image-thumb-button {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .image-row-actions {
    justify-content: stretch;
  }

  .image-list-toolbar {
    justify-content: stretch;
  }

  .image-list-toolbar .compact-button,
  .image-select-all {
    flex: 1 1 100%;
  }

  .image-row-actions button {
    flex: 1 1 100%;
  }
}

/* 2026-07 会员中心视觉整理：只调整呈现层，不改变现有业务结构与交互。 */
:root {
  --page: #f2f6f3;
  --forest: #123527;
  --forest-2: #1f5640;
  --green: #147a46;
  --green-hover: #0f663a;
  --mint: #dff2e7;
  --khaki: #d9e7de;
  --khaki-deep: #9ab8a5;
  --surface: #ffffff;
  --surface-soft: #f6f9f7;
  --surface-strong: #edf4ef;
  --ink: #15261e;
  --muted: #5d6c64;
  --line: #dbe5df;
  --line-strong: #c8d7ce;
  --danger: #bd3b32;
  --focus: rgba(20, 122, 70, 0.18);
  --shadow: 0 4px 12px rgba(18, 53, 39, 0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--page);
  font-family: Inter, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  transition:
    color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

p {
  line-height: 1.6;
}

.dashboard-shell {
  grid-template-columns: 224px minmax(0, 1fr);
}

.member-side {
  gap: 28px;
  padding: 24px 14px 16px;
  border-right-color: var(--line);
  background: #fbfdfb;
}

.member-side-brand {
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 10px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.member-side-brand .brand-logo {
  grid-row: 1;
}

.member-side-nav {
  gap: 4px;
}

.member-side-nav a {
  position: relative;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: #43544b;
  font-size: 13px;
  font-weight: 650;
}

.member-side-nav a::after {
  position: absolute;
  right: 12px;
  content: "›";
  color: #9aaba1;
  font-size: 18px;
  font-weight: 400;
  opacity: 0;
  transform: translateX(-4px);
  transition: inherit;
}

.member-side-nav a:hover,
.member-side-nav a:focus-visible {
  background: var(--surface-strong);
  color: var(--forest);
}

.member-side-nav a:hover::after,
.member-side-nav a:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.member-side-logout {
  min-height: 40px;
  background: transparent;
  color: #58675f;
  font-size: 13px;
}

.member-dashboard-main {
  gap: 16px;
  max-width: 1920px;
  width: 100%;
  margin: 0 auto;
  padding: 20px clamp(18px, 2vw, 32px) 40px;
}

.dashboard-hero,
.overview-card,
.dashboard-card {
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.dashboard-hero {
  min-height: 104px;
  padding: 20px 24px;
  border: 0;
  background:
    linear-gradient(90deg, rgba(20, 122, 70, 0.06), transparent 42%),
    var(--surface);
}

.dashboard-hero .eyebrow {
  margin-bottom: 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-hero h1 {
  color: var(--ink);
  font-size: 28px;
  font-weight: 760;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.dashboard-hero p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.home-link {
  min-height: 38px;
  padding: 0 15px;
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: none;
  font-size: 13px;
  font-weight: 650;
}

.home-link:hover {
  border-color: var(--green);
  background: var(--surface-strong);
  color: var(--green-hover);
}

.overview-grid {
  grid-template-columns: minmax(300px, 1.35fr) repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.overview-card {
  position: relative;
  gap: 6px;
  min-height: 108px;
  padding: 17px 18px;
  overflow: hidden;
  border: 0;
}

.overview-card::after {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a9b9b0;
  content: "";
}

.overview-card:nth-child(2)::after,
.overview-card:nth-child(4)::after {
  background: var(--green);
}

.overview-card span,
.overview-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.overview-card strong {
  color: var(--forest);
  font-size: 24px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.overview-card.account-card {
  background: var(--forest);
}

.overview-card.account-card span,
.overview-card.account-card small {
  color: rgba(255, 255, 255, 0.72);
}

.overview-card.account-card strong {
  color: #ffffff;
}

.overview-card.account-card::after {
  background: #72d59b;
  box-shadow: 0 0 0 5px rgba(114, 213, 155, 0.12);
}

.dashboard-grid {
  gap: 16px;
}

.dashboard-card {
  gap: 18px;
  padding: 20px 22px 22px;
  border: 0;
}

.card-head {
  align-items: center;
  gap: 20px;
}

.card-head > div:first-child {
  min-width: 0;
}

.card-head h2 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 740;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.card-head p {
  max-width: 76ch;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 450;
}

.soft-pill {
  min-height: 28px;
  padding: 0 10px;
  background: var(--mint);
  color: #11693d;
  font-size: 12px;
  font-weight: 650;
}

.collapse-toggle {
  min-width: 56px;
  min-height: 34px;
  border-color: var(--line-strong);
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
}

.collapse-toggle:hover {
  border-color: var(--green);
  background: var(--surface-strong);
  color: var(--green-hover);
}

.primary-button,
.ghost-button {
  border-radius: 7px;
  font-weight: 650;
}

.primary-button {
  background: var(--forest);
  box-shadow: 0 2px 4px rgba(18, 53, 39, 0.14);
}

.primary-button:hover {
  background: var(--forest-2);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(0);
}

.ghost-button {
  border-color: var(--line-strong);
  background: var(--surface);
}

.ghost-button:hover {
  border-color: #a9c5b3;
  background: var(--surface-strong);
  color: var(--green-hover);
}

.compact-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.storage-actions {
  gap: 8px;
}

.storage-actions .primary-button {
  min-width: 92px;
}

.storage-summary-grid {
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(140px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.storage-summary-grid > div {
  min-height: 92px;
  padding: 15px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

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

.storage-summary-grid span,
.image-list-head p,
.image-file-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.storage-summary-grid strong {
  font-size: 23px;
  font-weight: 740;
  letter-spacing: -0.02em;
}

.storage-progress {
  height: 6px;
  background: #dfe8e2;
}

.storage-progress i {
  background: var(--green);
  transition: width 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.storage-notice {
  min-height: 0;
  font-size: 13px;
  font-weight: 550;
}

.image-list-head {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.image-list-head h3 {
  font-size: 16px;
  font-weight: 720;
}

.image-list-toolbar {
  justify-content: flex-start;
  gap: 7px;
  padding: 9px;
  border-color: var(--line);
  background: var(--surface-soft);
}

.image-list-toolbar label:not(.image-select-all) {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-weight: 600;
}

.image-list-toolbar select,
.usage-filter-bar select,
.usage-filter-bar input {
  min-height: 34px;
  padding: 0 28px 0 10px;
  border-color: var(--line-strong);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}

.image-select-all {
  min-height: 34px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
}

.member-storage-table-wrap {
  border-color: var(--line);
  border-radius: 9px;
}

.member-storage-table {
  min-width: 1050px;
}

.member-storage-table th,
.member-storage-table td {
  padding: 11px 12px;
}

.member-storage-table th {
  height: 40px;
  color: #65736b;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  background: #f5f8f6;
}

.member-storage-table td {
  color: #2b3d34;
  font-size: 12px;
  font-weight: 500;
}

.member-storage-table tbody tr {
  transition: background-color 150ms ease-out;
}

.member-storage-table tbody tr:hover {
  background: #f8fbf9;
}

.member-storage-table code {
  color: var(--forest);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  font-weight: 650;
}

.image-thumb-button,
.storage-thumb,
.storage-thumb-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 7px;
}

.image-file-cell strong {
  font-size: 12px;
  font-weight: 680;
}

.storage-badge,
.url-status-pill {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 650;
}

.prefix-note,
.muted-action {
  color: #718078;
  font-size: 11px;
  font-weight: 500;
}

.image-row-actions {
  gap: 5px;
}

.image-row-actions button {
  min-height: 30px;
  padding: 0 9px;
  border-color: var(--line-strong);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 620;
}

.image-row-actions button:hover,
.compact-button:hover,
.image-thumb-button:hover {
  border-color: var(--green);
  box-shadow: none;
}

.danger-button {
  border-color: #edc3bf !important;
  background: #fffafa;
  color: var(--danger) !important;
}

.danger-button:hover {
  border-color: #d99b95 !important;
  background: #fff2f1;
}

.empty-license-note {
  border-color: var(--line-strong);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}

.status-text {
  font-size: 13px;
  font-weight: 600;
}

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

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

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

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

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

  .member-side {
    position: relative;
    z-index: 10;
    gap: 12px;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .member-side-brand {
    min-height: 40px;
    padding: 0;
  }

  .member-side-nav {
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .member-side-nav a {
    flex: 0 0 auto;
    min-height: 36px;
  }

  .member-side-nav a::after {
    display: none;
  }

  .member-side-logout {
    position: absolute;
    top: 15px;
    right: 16px;
    width: auto;
    min-height: 34px;
  }

  .member-dashboard-main {
    padding-top: 16px;
  }
}

@media (max-width: 700px) {
  .member-side-brand {
    padding-right: 116px;
  }

  .member-dashboard-main {
    gap: 12px;
    padding: 12px 12px 28px;
  }

  .dashboard-hero,
  .dashboard-card {
    padding: 16px;
  }

  .dashboard-hero {
    min-height: auto;
  }

  .dashboard-hero h1 {
    font-size: 24px;
  }

  .overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .overview-card {
    min-height: 96px;
    padding: 14px;
  }

  .overview-card.account-card {
    grid-column: 1 / -1;
  }

  .overview-card strong {
    font-size: 21px;
  }

  .card-head,
  .storage-card-head {
    align-items: flex-start;
  }

  .storage-actions {
    width: 100%;
  }

  .storage-actions .compact-button {
    flex: 1 1 auto;
  }

  .storage-summary-grid {
    grid-template-columns: 1fr;
  }

  .storage-summary-grid > div {
    min-height: 76px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .storage-summary-grid > div:last-child {
    border-bottom: 0;
  }

  .image-list-toolbar label:not(.image-select-all) {
    width: 100%;
    margin-left: 0;
  }

  .image-list-toolbar .compact-button,
  .image-select-all {
    flex: 1 1 calc(50% - 7px);
  }
}

@media (max-width: 440px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .overview-card.account-card {
    grid-column: auto;
  }

  .storage-actions .compact-button,
  .image-list-toolbar .compact-button,
  .image-select-all {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
