:root {
  color-scheme: light;
  --ink: #0c1713;
  --muted: #63736d;
  --line: rgba(12, 23, 19, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: #ffffff;
  --bg: #f5f1e6;
  --brand: #0e7b60;
  --brand-dark: #08130f;
  --warm: #e0a64d;
  --danger: #c73d35;
  --shadow: 0 28px 80px rgba(8, 19, 15, 0.13);
  --radius: 20px;
  font-family: "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
}

.account-public-shell {
  min-height: 100vh;
}

.checkout-layout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  align-items: start;
}

.payment-result {
  display: grid;
  gap: 14px;
}

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

.pay-summary > * {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(16, 23, 19, 0.06);
  font-weight: 850;
}

.pill {
  white-space: nowrap;
}

.pay-summary strong {
  background: #101713;
  color: #fff;
}

.pay-qr {
  width: min(320px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  justify-self: center;
  padding: 12px;
  border: 1px solid rgba(16, 23, 19, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(16, 23, 19, 0.1);
}

.credential-card {
  overflow: hidden;
}

.credential-grid {
  display: grid;
  gap: 10px;
}

.credential-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(16, 23, 19, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.credential-grid span {
  color: #62716b;
  font-size: 12px;
  font-weight: 800;
}

.credential-grid strong {
  overflow-wrap: anywhere;
}

.login-inline {
  max-width: 760px;
}

@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

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

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(14, 123, 96, 0.16), transparent 30%),
    radial-gradient(circle at 86% 6%, rgba(224, 166, 77, 0.14), transparent 28%),
    linear-gradient(135deg, #fbf8ed 0%, #ebe7d8 100%);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 900;
}

.mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: conic-gradient(from 180deg, #0e7b60, #e0a64d, #456b86, #0e7b60);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 123, 95, 0.24);
}

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

.nav button,
.ghost-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  font-weight: 760;
}

.nav button.active,
.ghost-link:hover {
  border-color: var(--line);
  background: var(--brand-dark);
  color: #fff;
  box-shadow: 0 16px 34px rgba(8, 19, 15, 0.16);
}

.side-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

#adminIdentity,
#accountIdentity {
  min-width: 0;
  overflow: hidden;
  color: #5c6b65;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  min-width: 0;
  padding: 26px;
}

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

.hero-top {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 0, rgba(14, 123, 96, 0.13), transparent 32%),
    rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(15, 123, 95, 0.22);
  border-radius: 999px;
  background: rgba(15, 123, 95, 0.08);
  color: #075f49;
  font-size: 12px;
  font-weight: 850;
}

h1 {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.account-public-shell .hero-top h1,
.admin-login ~ .shell .hero-top h1 {
  max-width: 100%;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.1;
}

.top p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 840;
}

.btn.primary {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;
  box-shadow: 0 18px 38px rgba(8, 19, 15, 0.18);
}

.btn.danger {
  color: var(--danger);
}

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

.metric,
.card,
.table-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.metric {
  min-height: 104px;
  padding: 16px;
}

.metric strong {
  display: block;
  font-size: 28px;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
}

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

.site-config {
  display: grid;
  gap: 14px;
}

.card {
  padding: 20px;
}

.card h2,
.card h3 {
  margin: 0 0 12px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.card-title-row h2 {
  margin-bottom: 6px;
}

.card-title-row p,
.table-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: #41504a;
  font-size: 12px;
  font-weight: 820;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: none;
}

input[type="file"] {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 123, 95, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 123, 95, 0.09);
}

.table-card {
  overflow: hidden;
}

.table-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.release-table-card .table-head {
  align-items: flex-start;
}

.table-scroll {
  overflow: auto;
}

.orders-card {
  display: grid;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(112px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
}

.filter-bar .field {
  min-width: 0;
}

.filter-bar .search-field {
  min-width: 220px;
}

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  justify-content: flex-end;
}

.filter-summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(22, 33, 29, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.table-empty {
  margin: 6px;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(22, 33, 29, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

td a {
  color: #075f49;
  overflow-wrap: anywhere;
  font-weight: 760;
}

th {
  color: #43514c;
  font-size: 12px;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15, 123, 95, 0.09);
  color: #075f49;
  font-size: 12px;
  font-weight: 840;
}

.pill.off {
  background: rgba(199, 61, 53, 0.09);
  color: var(--danger);
}

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

.mini {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.mini:disabled,
.btn:disabled {
  cursor: default;
  opacity: 0.54;
  box-shadow: none;
}

.code-box {
  min-height: 96px;
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #08130f;
  color: #f5f2df;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.55 "Cascadia Mono", Consolas, monospace;
}

.upload-drop {
  min-height: 158px;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(15, 123, 95, 0.35);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(15, 123, 95, 0.08), rgba(217, 149, 47, 0.06)),
    rgba(255, 255, 255, 0.7);
  text-align: center;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.upload-drop:hover,
.upload-drop:focus-within {
  border-color: rgba(15, 123, 95, 0.72);
  background:
    linear-gradient(135deg, rgba(15, 123, 95, 0.12), rgba(217, 149, 47, 0.08)),
    #fff;
  transform: translateY(-1px);
}

.upload-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(22, 33, 29, 0.18);
}

.upload-drop strong {
  margin-top: 10px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.upload-drop small {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.6;
}

.inline-check label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-check input {
  width: 16px;
  min-height: 16px;
}

.switch-line {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  white-space: nowrap;
}

.switch-line input {
  width: 16px;
  min-height: 16px;
}

.ad-config-card {
  overflow: hidden;
}

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

.ad-slot-editor {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(16, 23, 19, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.66)),
    radial-gradient(circle at 100% 0, rgba(14, 123, 96, 0.12), transparent 34%);
}

.ad-slot-editor:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.68)),
    radial-gradient(circle at 100% 0, rgba(224, 166, 77, 0.16), transparent 36%);
}

.ad-slot-editor:nth-child(3) {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.68)),
    radial-gradient(circle at 100% 0, rgba(16, 23, 19, 0.12), transparent 38%);
}

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

.ad-slot-head strong {
  font-size: 15px;
}

.ad-slot-editor textarea {
  min-height: 86px;
}

.upload-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.upload-status {
  color: var(--muted);
  font-size: 13px;
}

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

.release-upload-card {
  align-self: stretch;
  display: grid;
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(16, 23, 19, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.62)),
    radial-gradient(circle at 100% 0, rgba(14, 123, 96, 0.12), transparent 34%);
  box-shadow: 0 16px 34px rgba(16, 23, 19, 0.07);
}

.release-publisher-wide {
  margin-bottom: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.72)),
    radial-gradient(circle at 88% 0, rgba(14, 123, 96, 0.14), transparent 34%);
}

.release-publisher-wide .card-title-row {
  align-items: center;
}

.release-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
}

.release-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #e4f1ec;
  color: #075f49;
  font-weight: 950;
}

.release-badge.pro {
  background: #101713;
  color: #fff5d8;
}

.release-upload-card.lite {
  border-color: rgba(14, 123, 96, 0.2);
}

.release-upload-card.pro {
  border-color: rgba(224, 166, 77, 0.34);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.68)),
    radial-gradient(circle at 100% 0, rgba(224, 166, 77, 0.16), transparent 38%);
}

.admin-release-hint {
  display: grid;
  align-content: center;
}

.release-plan-title {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 16px;
}

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

.flow-chip {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(16, 23, 19, 0.06);
}

.flow-chip b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(16, 23, 19, 0.08);
  color: var(--ink);
}

.flow-chip.active {
  border-color: rgba(14, 123, 96, 0.28);
  background: #101713;
  color: #fff5d8;
}

.flow-chip.active b,
.flow-chip.done b {
  background: #fff5d8;
  color: #101713;
}

.flow-chip.done {
  background: rgba(14, 123, 96, 0.09);
  color: #075f49;
}

.order-card {
  display: grid;
  gap: 14px;
}

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

.plan-option {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 16px;
  border: 1px solid rgba(16, 23, 19, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.plan-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(16, 23, 19, 0.1);
}

.plan-option.active {
  border-color: rgba(14, 123, 96, 0.38);
  background:
    radial-gradient(circle at 92% 0, rgba(14, 123, 96, 0.15), transparent 36%),
    #ffffff;
  box-shadow: inset 0 0 0 1px rgba(14, 123, 96, 0.08), 0 18px 38px rgba(16, 23, 19, 0.1);
}

.plan-option span {
  color: #075f49;
  font-size: 13px;
  font-weight: 900;
}

.plan-option strong {
  font-size: 28px;
  line-height: 1;
}

.plan-option small {
  color: var(--muted);
  line-height: 1.55;
}

.download-auth-card {
  position: relative;
  overflow: hidden;
}

.download-auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--warm));
}

.qr-upload-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.qr-preview {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 6px;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(460px, 100%);
  padding: 24px;
}

.notice {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 123, 95, 0.16);
  border-radius: 14px;
  background: rgba(15, 123, 95, 0.07);
  color: #315c51;
  font-size: 13px;
  line-height: 1.65;
}

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

.release-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.release-row span {
  flex: 0 0 auto;
  color: var(--muted);
}

.release-row strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 13px;
}

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

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

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

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

  .workspace,
  .settings-grid,
  .release-upload-grid,
  .ad-slot-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .filter-actions,
  .pager {
    justify-content: stretch;
  }

  .filter-actions .btn,
  .pager .row-actions,
  .pager .mini {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 16px;
  }

  .top,
  .actions {
    display: grid;
    justify-content: stretch;
  }

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