:root {
  --bg: #f4f5f9;
  --card: #ffffff;
  --text: #14181f;
  --muted: #6b7280;
  --muted-soft: #9aa2b1;
  --line: #e8eaf0;
  --primary: #16523f;
  --primary-soft: #1f6f55;
  --primary-dark: #0e3c2e;
  --accent-a: #1f6f55;
  --accent-b: #2f9d78;
  --danger: #b42318;
  --warn: #b54708;
  --success: #027a48;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 48px rgba(16, 24, 40, .12);
  --radius: 18px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--primary-soft); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-b); outline-offset: 2px; border-radius: 4px; }
.topbar { min-height: 64px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; background: #0d1f1b; color: #fff; border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar a { color: rgba(255,255,255,.72); transition: color .15s var(--ease); }
.topbar a:hover { color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.brand a { display: flex; align-items: center; gap: 10px; color: #fff !important; }
.brand-mark { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 8px rgba(31,111,85,.4); }
.brand-mark svg { width: 15px; height: 15px; stroke: #fff; }
.topbar nav { display: flex; gap: 22px; align-items: center; font-size: 13.5px; }
.topbar nav a { position: relative; padding: 4px 0; font-weight: 600; }
.topbar nav a:not(.link-button):hover { color: #fff; }
.topbar nav span { color: rgba(255,255,255,.55); font-weight: 500; }
.container { width: min(1120px, 92vw); margin: 40px auto 64px; }
footer { text-align: center; color: var(--muted-soft); font-size: 13px; padding: 28px; border-top: 1px solid var(--line); }
h1 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; letter-spacing: -.01em; margin: 8px 0 12px; font-weight: 700; }
h2 { margin: 0 0 18px; font-size: 20px; font-weight: 700; letter-spacing: -.005em; }
.eyebrow { color: var(--primary); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.hero { display: flex; gap: 24px; align-items: stretch; justify-content: space-between; margin-bottom: 24px; }
.hero > div:first-child { padding: 10px 0; }
.metric-card { min-width: 260px; border-radius: 18px; background: #102a24; color: #fff; padding: 26px; display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow); }
.metric-card span { opacity: .72; }
.metric-card strong { font-size: 34px; margin-top: 6px; }
.card, .login-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin-bottom: 24px; }
.login-card { width: min(420px, 100%); margin: 12vh auto; padding: 40px 36px; text-align: center; border-radius: 22px; }
.login-card h1 { font-size: 22px; margin-bottom: 22px; }
.login-card .primary-button { width: 100%; }
.login-card .demo-box { text-align: left; }
.login-card .demo-box .button-row { flex-direction: column; gap: 10px; }
.login-card .demo-box .secondary-button { width: 100%; }
.grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.details { margin: 0; }
.details div { display: grid; grid-template-columns: 150px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
.details div:last-child { border-bottom: 0; }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
.primary-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 44px; border-radius: 999px; padding: 0 20px; border: 0; font-weight: 650; font-size: 14px; cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.primary-button { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 0 0 1px rgba(255,255,255,.02) inset; }
.primary-button:hover { background: var(--primary-dark); box-shadow: 0 6px 16px rgba(20,82,63,.28); transform: translateY(-1px); }
.primary-button:active { transform: translateY(0); }
.secondary-button { border: 1px solid var(--line); background: #fff; color: var(--text); }
.secondary-button:hover { border-color: #c9cfdb; background: #fafbfd; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.disabled, .disabled:hover { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.cta-arrow { width: 14px; height: 14px; transition: transform .15s var(--ease); }
.primary-button:hover .cta-arrow, .cta-link:hover .cta-arrow { transform: translateX(2px); }
.demo-box { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.inline-form { display: inline; }
.link-button { border: 0; padding: 0; background: transparent; color: #fff; cursor: pointer; font: inherit; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.product-card { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.product-card:has(input:checked) { border: 2px solid var(--primary); padding: 17px; background: #f0faf6; }
.product-card input { position: absolute; right: 16px; top: 17px; }
.product-name { font-weight: 750; }
.product-price { font-size: 25px; font-weight: 800; }
.stack-form { display: grid; gap: 18px; }
.stack-form label:not(.checkbox-row) { display: grid; gap: 7px; font-weight: 650; }
input, textarea, select { width: 100%; padding: 12px 13px; border: 1px solid #cfd6e3; border-radius: 10px; background: #fff; color: var(--text); font: inherit; }
input:focus, textarea:focus { outline: 3px solid rgba(31,111,85,.14); border-color: var(--primary); }
textarea { resize: vertical; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 13px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); }
.checkbox-row input { width: auto; margin-top: 5px; }
.quote-box { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.quote-box div { display: flex; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.quote-box div:last-child { border-bottom: 0; }
.quote-total { background: #f0faf6; font-size: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.status, .status-large { display: inline-flex; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 750; background: #eef1f6; }
.status-large { font-size: 16px; padding: 8px 14px; margin: 8px 0 22px; }
.status.succeeded, .status-large.succeeded, .status.success { color: var(--success); background: #ecfdf3; }
.status.failed, .status-large.failed { color: var(--danger); background: #fef3f2; }
.status.pending, .status.processing, .status-large.pending, .status-large.processing { color: var(--warn); background: #fffaeb; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.muted { color: var(--muted); }
.empty { padding: 30px; text-align: center; color: var(--muted); background: #f8fafc; border-radius: 12px; }
code { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; background: #f2f4f7; padding: 2px 5px; border-radius: 5px; }
.small-code { display: block; max-width: 420px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .topbar { padding: 12px 4vw; align-items: flex-start; gap: 12px; }
  .topbar nav { align-items: flex-end; flex-direction: column; gap: 4px; }
  .hero { flex-direction: column; }
  .metric-card { min-width: 0; }
  .grid.two, .product-grid { grid-template-columns: 1fr; }
  .details div { grid-template-columns: 1fr; gap: 3px; }
  .login-card { padding: 26px; }
}
.redeem-heading{text-align:center;margin:32px 0}.redeem-guide{padding-left:24px}.redeem-guide li{padding:12px 0 20px;border-bottom:1px solid var(--line)}.redeem-guide li::marker{color:var(--primary);font-weight:800}.redeem-guide p{color:var(--muted);margin:6px 0}.card td{max-width:360px;white-space:normal;overflow-wrap:anywhere}.card form select{min-width:140px}.card form input[name=userid]{min-width:150px}[hidden]{display:none!important}

.page-intro { max-width: 640px; margin-bottom: 28px; }
.page-intro h1 { margin-bottom: 4px; }
.page-intro .primary-button { margin-top: 8px; }
.page-meta { margin: 0; color: var(--muted); font-size: 14px; }

.product-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 4px 12px rgba(31,111,85,.22);
}
.product-icon svg { width: 21px; height: 21px; stroke: #fff; }
.product-icon.sm { width: 34px; height: 34px; border-radius: 10px; }
.product-icon.sm svg { width: 16px; height: 16px; }

.entitlement-list { display: grid; gap: 12px; }
.entitlement-list.compact .entitlement-card { padding: 16px 20px; }
.entitlement-list.compact .entitlement-copy h2 { font-size: 16px; margin: 2px 0 3px; }
.entitlement-list.compact .account-line { font-size: 13.5px; }

.entitlement-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.entitlement-card:hover { box-shadow: var(--shadow); border-color: #dde1ea; transform: translateY(-1px); }
.entitlement-card.tone-ready { border-color: #bfe0d1; background: linear-gradient(180deg, #f6fbf8, #fff); }
.entitlement-row { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.entitlement-copy { min-width: 0; flex: 1; }
.entitlement-copy h2 { margin: 8px 0 4px; font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: -.005em; }
.entitlement-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 8px; align-items: center; }
.account-line { margin: 0; font-size: 13.5px; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef1f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-pill.tone-ready { background: #ecfdf3; color: var(--success); }
.status-pill.tone-progress { background: #fffaeb; color: var(--warn); }
.status-pill.tone-done { background: #ecfdf3; color: var(--success); }
.status-pill.tone-failed { background: #fef3f2; color: var(--danger); }
.status-pill.tone-wait { background: #eef6ff; color: #175cd3; }

.focus-card {
  width: min(480px, 100%);
  margin: 9vh auto 48px;
  padding: 40px 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.focus-card .product-icon { margin: 0 auto 18px; }
.focus-card .status-pill { margin-bottom: 4px; }
.focus-card h1 { margin: 6px 0 8px; }
.focus-card .account-line { margin-bottom: 20px; font-size: 15px; }
.focus-card form { margin: 22px 0 8px; }
.focus-card > .secondary-button, .focus-card > .primary-button, .focus-card > .text-link { margin-top: 6px; }
.wide-button { width: 100%; }
.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.text-link:hover { color: var(--text); }
.empty-panel {
  padding: 56px 32px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.empty-panel .product-icon { margin: 0 auto 16px; opacity: .9; }
.empty-panel h2 { margin-bottom: 6px; font-size: 17px; }
.empty-panel p { margin: 0; color: var(--muted); font-size: 14px; }
.catalog-grid { margin-bottom: 8px; }
.catalog-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (max-width: 760px) {
  .entitlement-card { flex-wrap: wrap; padding: 18px; }
  .entitlement-actions { width: 100%; }
  .entitlement-actions .primary-button, .entitlement-actions .secondary-button { width: 100%; }
  .focus-card { padding: 32px 22px; margin-top: 20px; width: 100%; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container:has(.ops-page) { width: min(1180px, 94vw); }
.ops-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.ops-kpi {
  display: flex; flex-direction: column; gap: 4px;
  min-height: 118px; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  color: inherit; box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.ops-kpi:hover { border-color: #cfd8d3; box-shadow: var(--shadow); transform: translateY(-1px); }
.ops-kpi strong { font-size: 28px; line-height: 1.1; letter-spacing: -.02em; }
.ops-kpi-label { color: var(--text); font-size: 13px; font-weight: 700; }
.ops-kpi-hint { color: var(--muted); font-size: 12px; }
.ops-kpi.tone-failed { border-color: #f0c7c3; background: #fff8f7; }
.ops-kpi.tone-progress { border-color: #ead7a8; background: #fffdf6; }
.ops-kpi.tone-done { border-color: #c6e4d6; background: #f6fbf8; }
.ops-kpi.tone-wait { border-color: #c9d8f0; background: #f7faff; }
.ops-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; }
.ops-panel { margin-bottom: 16px; }
.ops-panel h2 { margin-bottom: 0; font-size: 17px; }
.ops-list, .ops-feed { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.ops-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc;
}
.ops-item strong { display: block; font-size: 14px; }
.ops-item p, .ops-feed p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.ops-item.tone-failed { border-color: #f0c7c3; }
.ops-item.tone-progress { border-color: #ead7a8; }
.ops-item.tone-wait { border-color: #c9d8f0; }
.ops-feed li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ops-feed li:last-child { border-bottom: 0; }
.ops-feed time { display: block; color: var(--muted); font-size: 12px; }
.ops-week { display: flex; align-items: stretch; gap: 8px; height: 148px; margin-top: 16px; }
.ops-week-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ops-week-bars { width: 100%; height: 96px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.ops-week-bars span { width: 10px; min-height: 2px; border-radius: 3px 3px 0 0; }
.ops-week-bars .ok { background: var(--success); }
.ops-week-bars .bad { background: var(--danger); }
.ops-week-col em { font-style: normal; font-size: 11px; color: var(--muted); }
.ops-week-col small { color: var(--muted-soft); font-size: 11px; }
.ops-week-table { width: 100%; margin-top: 12px; font-size: 13px; }
@media (max-width: 960px) {
  .ops-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ops-item { flex-wrap: wrap; }
  .ops-item .secondary-button { width: 100%; }
}
