:root {
  color-scheme: light;
  --background: #f5f6f7;
  --surface: #ffffff;
  --surface-subtle: #f7f8f9;
  --ink: #161a1e;
  --muted: #66707a;
  --quiet: #8d969f;
  --line: #e5e8eb;
  --line-strong: #cfd5da;
  --accent: #169b74;
  --accent-dark: #0d7f5e;
  --accent-soft: #edf8f4;
  --danger: #c73636;
  --danger-soft: #fff4f3;
  --warning: #a96900;
  --warning-soft: #fff8e8;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(18, 25, 32, .06);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--ink);
  font: 14px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: #cdeee3; }
.hidden { display: none !important; }

/* Shared brand and controls */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.mark, .token-icon {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}
.mark { width: 32px; height: 32px; font-size: 17px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; font-size: 13px; letter-spacing: .06em; }
.brand-copy small { margin-top: 4px; color: var(--quiet); font-size: 9px; letter-spacing: .12em; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card h2 { margin: 0; font-size: 18px; }
label { display: block; margin: 20px 0 8px; color: #343a40; font-size: 13px; font-weight: 600; }
input, select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
input::placeholder { color: #a1a8af; }
input:hover, select:hover { border-color: #abb3ba; }
input:focus, select:focus { border-color: #252b31; box-shadow: 0 0 0 3px rgba(22, 26, 30, .08); }
.primary, .secondary {
  height: 46px;
  padding: 0 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}
.primary { border: 1px solid #171b1f; background: #171b1f; color: #fff; }
.primary:hover { border-color: #2c3339; background: #2c3339; }
.secondary { border: 1px solid var(--line-strong); background: #fff; color: #2d343a; }
.secondary:hover { border-color: #9ba4ac; background: var(--surface-subtle); }
.primary:disabled, .secondary:disabled { opacity: .5; cursor: wait; }
.error {
  margin: 18px 28px 28px;
  padding: 11px 13px;
  border: 1px solid #efcccc;
  border-radius: 7px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
}

/* Public claim page */
.claim-page { background: #f4f5f6; }
.site-header { height: 64px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); }
.site-header-inner { display: flex; width: min(1160px, calc(100% - 40px)); height: 100%; margin: 0 auto; align-items: center; }
.brand-name { font-size: 15px; letter-spacing: -.01em; }
.header-divider { width: 1px; height: 20px; margin: 0 18px; background: var(--line); }
.header-section { color: var(--muted); font-size: 13px; }
.header-status { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.network-status { display: inline-flex; align-items: center; gap: 7px; color: #566069; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.network-name { padding-left: 18px; border-left: 1px solid var(--line); color: #31383e; font-size: 12px; font-weight: 600; }
.claim-shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 64px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; color: #929aa2; font-size: 12px; }
.breadcrumb i { color: #c4c9ce; font-style: normal; }
.breadcrumb strong { color: #626b74; font-weight: 500; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -.035em; line-height: 1.25; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.secure-label { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 2px; color: #6d767e; font-size: 12px; }
.secure-label i { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 10px; font-style: normal; font-weight: 800; }
.claim-workspace { display: grid; grid-template-columns: minmax(0, 700px) minmax(280px, 1fr); gap: 20px; align-items: start; }
.claim-panel, .info-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.claim-panel { min-width: 0; overflow: hidden; box-shadow: var(--shadow); }
.asset-summary { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: #fbfbfc; }
.asset-identity { display: flex; align-items: center; gap: 12px; }
.token-icon { width: 38px; height: 38px; font-size: 20px; }
.asset-identity > span:last-child { display: flex; flex-direction: column; }
.asset-identity strong { font-size: 15px; line-height: 1.3; }
.asset-identity small, .asset-network small { color: var(--quiet); font-size: 11px; }
.asset-network { text-align: right; }
.asset-network > * { display: block; }
.asset-network strong { margin-top: 4px; color: #3c444b; font-size: 12px; font-weight: 600; }
.asset-network strong span { color: var(--quiet); font-weight: 500; }
.chain-icon { display: inline-grid; width: 17px; height: 17px; margin-right: 6px; place-items: center; border-radius: 4px; background: #f3ba2f; color: #1d2023; font-size: 9px; font-style: normal; vertical-align: -1px; }
.form-section { padding: 28px; }
.address-section { border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.step-number { display: grid; width: 28px; height: 28px; place-items: center; flex: none; border-radius: 6px; background: #20252a; color: #fff; font-size: 12px; font-weight: 700; }
.section-heading h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.section-heading p { margin: 2px 0 0; color: var(--quiet); font-size: 11px; }
.form-section > label:first-of-type { margin-top: 0; }
.input-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; }
.input-row .action-button { height: 48px; background: #f8f9fa; }
.field-hint { margin: 7px 0 0; color: var(--quiet); font-size: 11px; }
.key-result { margin-top: 20px; border: 1px solid #bfe3d7; border-radius: 8px; background: #f5fbf9; overflow: hidden; }
.verified-title { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #d7eee7; color: #176b51; font-size: 12px; }
.check-icon { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; }
.verified-data { display: grid; grid-template-columns: 1.1fr .9fr 1.3fr; padding: 14px; }
.verified-data > span { min-width: 0; padding: 0 14px; border-right: 1px solid #dceae5; }
.verified-data > span:first-child { padding-left: 0; }
.verified-data > span:last-child { padding-right: 0; border: 0; }
.verified-data small, .verified-data strong { display: block; }
.verified-data small { margin-bottom: 4px; color: #718078; font-size: 10px; }
.verified-data strong { overflow: hidden; color: #26322d; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.verified-data b { color: #126b4e; font-size: 18px; font-variant-numeric: tabular-nums; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; top: 50%; right: 17px; width: 6px; height: 6px; border-right: 1.5px solid #616970; border-bottom: 1.5px solid #616970; pointer-events: none; transform: translateY(-65%) rotate(45deg); }
.select-wrap select { appearance: none; padding-right: 42px; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.label-row label { margin-bottom: 8px; }
.label-row span { margin-top: 20px; padding: 2px 7px; border: 1px solid #ead89e; border-radius: 4px; background: var(--warning-soft); color: #8a630e; font-size: 9px; font-weight: 700; }
.warning-hint { display: flex; align-items: flex-start; gap: 6px; color: #86631d; line-height: 1.5; }
.warning-hint i { display: grid; width: 14px; height: 14px; margin-top: 1px; place-items: center; flex: none; border-radius: 50%; background: #f4dfac; color: #7d5908; font-size: 9px; font-style: normal; font-weight: 800; }
.confirm { display: flex; align-items: flex-start; gap: 10px; margin: 22px 0 0; padding: 17px 0 0; border-top: 1px solid var(--line); cursor: pointer; }
.confirm input { width: 16px; height: 16px; margin: 3px 0 0; flex: none; accent-color: #171b1f; }
.confirm span { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.6; }
.confirm strong { color: #343a40; font-weight: 600; }
.form-section .primary { display: flex; width: 100%; height: 48px; margin-top: 20px; align-items: center; justify-content: center; gap: 10px; }
.form-section .primary i { font-size: 17px; font-style: normal; font-weight: 400; }
.claim-sidebar { display: grid; gap: 14px; }
.info-card { padding: 20px; }
.info-card h2 { margin: 0; font-size: 14px; font-weight: 650; }
.receipt-card dl { margin: 18px 0 0; }
.receipt-card dl div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid #eef0f2; }
.receipt-card dt { color: var(--quiet); font-size: 11px; }
.receipt-card dd { margin: 0; color: #40474e; font-size: 12px; text-align: right; }
.receipt-card dd strong { color: var(--accent-dark); font-weight: 650; }
.receipt-card > p { margin: 15px 0 0; padding: 10px 11px; border-radius: 6px; background: var(--surface-subtle); color: #747d85; font-size: 10px; line-height: 1.55; }
.info-title { display: flex; align-items: center; gap: 9px; }
.shield-icon { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.safety-card ul { margin: 17px 0 0; padding: 0; list-style: none; }
.safety-card li { position: relative; margin-top: 10px; padding-left: 14px; color: #6e777f; font-size: 11px; line-height: 1.55; }
.safety-card li::before { content: ""; position: absolute; top: .65em; left: 0; width: 4px; height: 4px; border-radius: 50%; background: #9ba3aa; }
.safety-card code { padding: 1px 4px; border-radius: 3px; background: #f0f2f3; color: #30363b; font: 10px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.side-note { margin: 2px 0 0; color: #9aa1a8; font-size: 10px; text-align: center; }
.order-result { padding: 34px 28px 30px; }
.result-heading { display: flex; align-items: center; gap: 14px; }
.result-icon { display: grid; width: 40px; height: 40px; place-items: center; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 18px; font-weight: 800; }
.result-heading h2 { margin: 0; font-size: 18px; }
.result-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.status-progress { display: grid; grid-template-columns: repeat(4, 1fr); margin: 32px 0; }
.status-progress span { position: relative; padding-top: 18px; color: #a0a7ae; font-size: 10px; text-align: center; }
.status-progress span::before { content: ""; position: absolute; top: 4px; right: 50%; left: -50%; height: 2px; background: #e4e7e9; }
.status-progress span:first-child::before { display: none; }
.status-progress i { position: absolute; z-index: 1; top: 0; left: 50%; width: 10px; height: 10px; border: 2px solid #d9dde0; border-radius: 50%; background: #fff; transform: translateX(-50%); }
.status-progress span.done { color: #34423c; }
.status-progress span.done::before { background: var(--accent); }
.status-progress span.done i { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.status-progress[data-status="failed"] span.done, .status-progress[data-status="manual_review"] span.done { color: var(--danger); }
.result-details { margin: 0; border: 1px solid var(--line); border-radius: 8px; }
.result-details > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); padding: 13px 15px; border-bottom: 1px solid var(--line); }
.result-details > div:last-child { border-bottom: 0; }
.result-details dt { color: var(--quiet); font-size: 11px; }
.result-details dd { min-width: 0; margin: 0; text-align: right; }
.result-details code { display: block; overflow: hidden; color: #3b434a; font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.result-note { margin-top: 14px; padding: 11px 13px; border-radius: 6px; background: var(--surface-subtle); color: #788088; font-size: 10px; }
.site-footer { display: flex; width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 20px 0 30px; justify-content: space-between; border-top: 1px solid var(--line); color: #9aa1a8; font-size: 10px; }

/* Admin login uses the shared controls */
.narrow { width: min(440px, calc(100% - 36px)); margin: 0 auto; padding: 7vh 0 64px; }
.auth-brand { justify-content: center; margin-bottom: 34px; }
.auth-card { padding: 32px; box-shadow: var(--shadow); }
.card-heading { margin-bottom: 24px; }
.card-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.card-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.auth-card .card-heading { text-align: center; margin-bottom: 26px; }
.auth-card .primary { width: 100%; margin-top: 26px; }
.auth-note { margin: 22px 0 0; color: var(--quiet); font-size: 11px; text-align: center; }

@media (max-width: 820px) {
  .claim-workspace { grid-template-columns: 1fr; }
  .claim-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-note { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .site-header { height: 58px; }
  .site-header-inner, .claim-shell, .site-footer { width: calc(100% - 28px); }
  .header-divider, .header-section, .network-status { display: none; }
  .network-name { padding-left: 0; border: 0; }
  .claim-shell { padding-top: 20px; padding-bottom: 40px; }
  .breadcrumb { margin-bottom: 18px; }
  .page-heading { align-items: flex-start; margin-bottom: 18px; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p { max-width: 280px; }
  .secure-label { display: none; }
  .asset-summary { min-height: 76px; padding: 16px 18px; }
  .asset-network strong span { display: none; }
  .form-section { padding: 22px 18px; }
  .section-heading { margin-bottom: 20px; }
  .input-row { grid-template-columns: 1fr; }
  .input-row .action-button { width: 100%; }
  .verified-data { grid-template-columns: 1fr 1fr; gap: 13px 0; }
  .verified-data > span { padding: 0 12px; }
  .verified-data > span:nth-child(2) { border: 0; }
  .verified-data > span:last-child { grid-column: 1 / -1; padding: 11px 0 0; border-top: 1px solid #dceae5; }
  .claim-sidebar { grid-template-columns: 1fr; }
  .side-note { grid-column: auto; }
  .order-result { padding: 28px 18px 24px; }
  .status-progress { margin: 28px 0; }
  .result-details > div { grid-template-columns: 74px minmax(0, 1fr); }
  .error { margin: 16px 18px 22px; }
  .site-footer span:last-child { display: none; }
  .auth-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
