:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --ink: #1f2b29;
  --muted: #687773;
  --line: #dbe4df;
  --primary: #25615b;
  --primary-strong: #184b46;
  --blue: #2d6f9f;
  --yellow: #b97917;
  --orange: #b85423;
  --red: #b8453f;
  --shadow: 0 14px 36px rgba(31, 43, 41, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(37, 97, 91, 0.11), transparent 270px),
    var(--bg);
  color: var(--ink);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 14px 36px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 30px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 6px;
  font-size: 22px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

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

.headline {
  max-width: 720px;
  margin-bottom: 0;
  color: #4d5d59;
}

.top-actions,
.install-actions,
.card-actions,
.action-row,
.inline-controls,
.module-head,
.row-title,
.item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.top-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-row {
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inline-controls {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.inline-controls select {
  width: auto;
  min-width: 150px;
}

.license-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(185, 121, 23, 0.28);
  border-radius: var(--radius);
  background: rgba(185, 121, 23, 0.07);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  padding: 13px 14px;
}

.license-banner.active {
  border-color: rgba(37, 97, 91, 0.24);
  background: rgba(37, 97, 91, 0.07);
}

.license-banner strong {
  display: block;
  margin: 2px 0 3px;
  font-size: 18px;
}

.license-banner p {
  margin: 0;
  font-size: 13px;
}

.banner-kicker {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
}

.license-banner.active .banner-kicker {
  color: var(--primary-strong);
}

.activation-form {
  min-width: 310px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.primary-btn,
.ghost-btn,
.tab-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 14px;
  font-weight: 850;
}

.primary-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.ghost-btn {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.ghost-btn.small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.danger-text {
  color: var(--red);
}

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

.status-grid article,
.panel,
.module {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.status-grid article {
  min-height: 100px;
  padding: 14px;
}

.status-grid span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.status-grid strong {
  display: block;
  margin: 4px 0 5px;
  font-size: 18px;
}

.status-grid p {
  margin-bottom: 0;
  font-size: 14px;
}

.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-btn {
  background: #fff;
  border-color: var(--line);
  color: var(--muted);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.module {
  display: none;
  padding: 16px;
}

.module.active {
  display: block;
}

.module-head {
  margin-bottom: 14px;
}

.module-head p {
  margin-bottom: 0;
}

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

.summary-grid article {
  min-height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.summary-grid span {
  color: var(--primary-strong);
  font-size: 25px;
  font-weight: 950;
}

.summary-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.panel {
  padding: 14px;
}

.todo-panel {
  margin-bottom: 12px;
}

.feedback-panel {
  grid-column: 1 / -1;
}

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

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

.price-card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 15px;
}

.price-card.featured {
  border-color: rgba(37, 97, 91, 0.34);
  background: rgba(37, 97, 91, 0.05);
}

.price-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.price-card h3 {
  margin: 6px 0 8px;
  font-size: 17px;
}

.price-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-strong);
  font-size: 24px;
}

.price-card p {
  margin-bottom: 0;
  font-size: 14px;
}

.membership-panel {
  margin-bottom: 12px;
}

.product-pricing {
  margin-bottom: 12px;
}

.product-pricing .pricing-grid {
  margin-bottom: 0;
}

.product-pricing .price-card {
  min-height: 238px;
}

.benefit-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.benefit-strip > div {
  min-height: 112px;
  padding: 12px 12px 0 0;
}

.benefit-strip > div + div {
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.benefit-strip strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
}

.benefit-strip p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.55;
}

.contact-line {
  flex: 0 0 auto;
  border: 1px solid rgba(37, 97, 91, 0.18);
  border-radius: var(--radius);
  background: rgba(37, 97, 91, 0.06);
  color: var(--primary-strong);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.panel-title {
  margin-bottom: 12px;
}

.panel-title p {
  margin-bottom: 0;
  font-size: 13px;
}

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

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

label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 86px;
  resize: vertical;
  padding: 11px;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 97, 91, 0.58);
  box-shadow: 0 0 0 3px rgba(37, 97, 91, 0.12);
}

.item-list,
.node-list,
.plan-grid,
.todo-list {
  display: grid;
  gap: 10px;
}

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

.todo-item {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 11px 12px;
}

.todo-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.todo-item p {
  margin: 0;
  color: #52625e;
  font-size: 13px;
  line-height: 1.55;
}

.todo-item.ok {
  border-color: rgba(37, 97, 91, 0.22);
  background: rgba(37, 97, 91, 0.05);
}

.todo-item.warning,
.todo-item.unknown {
  border-color: rgba(185, 121, 23, 0.28);
  background: rgba(185, 121, 23, 0.07);
}

.todo-item.danger {
  border-color: rgba(184, 84, 35, 0.28);
  background: rgba(184, 84, 35, 0.07);
}

.todo-item.expired {
  border-color: rgba(184, 69, 63, 0.3);
  background: rgba(184, 69, 63, 0.07);
}

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

.item-card,
.node-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.item-card.ok,
.node-card.pass {
  border-color: rgba(37, 97, 91, 0.22);
  background: rgba(37, 97, 91, 0.05);
}

.item-card.warning,
.node-card.doing {
  border-color: rgba(185, 121, 23, 0.28);
  background: rgba(185, 121, 23, 0.07);
}

.item-card.danger,
.node-card.problem {
  border-color: rgba(184, 84, 35, 0.28);
  background: rgba(184, 84, 35, 0.07);
}

.item-card.expired {
  border-color: rgba(184, 69, 63, 0.3);
  background: rgba(184, 69, 63, 0.07);
}

.item-head {
  align-items: center;
  margin-bottom: 10px;
}

.item-head strong {
  display: block;
  margin-bottom: 4px;
}

.item-head p {
  margin: 0;
  font-size: 13px;
}

.pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.pill.ok {
  background: rgba(37, 97, 91, 0.1);
  color: var(--primary-strong);
}

.pill.warning {
  background: rgba(185, 121, 23, 0.12);
  color: #76500f;
}

.pill.danger {
  background: rgba(184, 84, 35, 0.12);
  color: #843a18;
}

.pill.expired {
  background: rgba(184, 69, 63, 0.12);
  color: #8a2f2a;
}

.pill.unknown {
  background: #eef1ef;
  color: var(--muted);
}

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

.meta-grid div {
  min-width: 0;
  border: 1px solid rgba(219, 228, 223, 0.78);
  border-radius: var(--radius);
  background: #fafbfa;
  padding: 8px;
}

.meta-grid dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meta-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.45;
}

.card-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}

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

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

.order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.order-card.ok {
  border-color: rgba(37, 97, 91, 0.22);
  background: rgba(37, 97, 91, 0.05);
}

.order-card.warning {
  border-color: rgba(185, 121, 23, 0.28);
  background: rgba(185, 121, 23, 0.07);
}

.order-card.danger {
  border-color: rgba(184, 84, 35, 0.28);
  background: rgba(184, 84, 35, 0.07);
}

.order-card.expired {
  border-color: rgba(184, 69, 63, 0.3);
  background: rgba(184, 69, 63, 0.07);
}

.code-text {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-weight: 800;
}

.order-note {
  margin: 9px 0 0;
  font-size: 13px;
}

.empty-state {
  min-height: 120px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
  padding: 16px;
  text-align: center;
}

.empty-state p {
  margin-bottom: 0;
}

.plain-list {
  margin: 0;
  padding-left: 20px;
}

.plain-list li {
  margin-bottom: 8px;
  color: #31413f;
  line-height: 1.65;
}

.site-record {
  display: flex;
  justify-content: center;
  margin-top: 22px;
  padding: 14px 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.site-record a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.site-record a:hover {
  color: var(--brand);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 20;
  min-width: 180px;
  max-width: calc(100vw - 28px);
  transform: translate(-50%, 18px);
  border-radius: var(--radius);
  background: rgba(31, 43, 41, 0.93);
  color: #fff;
  padding: 10px 14px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .topbar,
  .license-banner,
  .module-head,
  .row-title {
    flex-direction: column;
  }

  .status-grid,
  .two-column,
  .node-list,
  .plan-grid,
  .pricing-grid,
  .guide-grid,
  .benefit-strip,
  .todo-list {
    grid-template-columns: 1fr;
  }

  .benefit-strip > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }

  .activation-form {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px 10px 28px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 19px;
  }

  .module,
  .panel {
    padding: 12px;
  }

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

  .item-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .license-banner {
    align-items: stretch;
  }

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

  .action-row,
  .inline-controls,
  .split-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .contact-line {
    width: 100%;
  }

  .site-record {
    padding-bottom: 8px;
    text-align: center;
  }

  .inline-controls select,
  .action-row button,
  .split-actions button,
  .top-actions button {
    width: 100%;
  }

  .split-actions {
    flex-direction: column;
  }
}
