:root {
  color-scheme: light;
  --bg: #eff4ea;
  --panel: rgba(255, 255, 255, 0.92);
  --text: #193225;
  --muted: #5f7466;
  --border: #d1ddd2;
  --primary: #1f7a4c;
  --primary-dark: #185d3a;
  --secondary: #edf4ef;
  --warning: #a85c16;
  --danger: #c84343;
  --shadow: 0 20px 50px rgba(31, 69, 43, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(132, 195, 132, 0.18), transparent 25%),
    linear-gradient(180deg, #eef4ea 0%, var(--bg) 100%);
}

.license-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.license-hero,
.license-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.license-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  margin-bottom: 18px;
}

.license-page__eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
}

.license-hero h1,
.license-card h2 {
  margin: 0;
}

.license-page__desc {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.license-card {
  padding: 22px;
  margin-bottom: 18px;
}

.license-card__text {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.license-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #edf4ef;
  font-size: 12px;
  font-weight: 700;
}

.license-chip[data-state="active"] {
  background: rgba(31, 122, 76, 0.14);
  color: var(--primary);
}

.license-chip[data-state="expired"],
.license-chip[data-state="disabled"],
.license-chip[data-state="invalid"] {
  background: rgba(200, 67, 67, 0.14);
  color: var(--danger);
}

.license-chip[data-state="warning"] {
  background: rgba(168, 92, 22, 0.14);
  color: var(--warning);
}

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

.license-meta div {
  padding: 14px;
  border-radius: 18px;
  background: #f7fbf7;
  border: 1px solid var(--border);
}

.license-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.license-meta strong {
  display: block;
  margin-top: 6px;
  word-break: break-word;
}

.license-reminder {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(168, 92, 22, 0.1);
  border: 1px solid rgba(168, 92, 22, 0.18);
  color: #8a5119;
}

.license-label {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
}

.license-input {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  font: inherit;
  outline: none;
}

.license-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 122, 76, 0.14);
}

.license-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

button {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
}

button:hover {
  background: var(--primary-dark);
}

button.secondary {
  background: var(--secondary);
  color: var(--text);
}

button.secondary:hover {
  background: #dfe9e2;
}

.license-list {
  margin: 14px 0 0;
  padding-left: 18px;
  line-height: 1.7;
  color: var(--muted);
}

.page-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.page-status[data-tone="success"] {
  color: var(--primary);
}

@media (max-width: 760px) {
  .license-hero {
    flex-direction: column;
  }

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

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