:root {
  --ink: #14261f;
  --muted: #66736d;
  --line: #dfe7e2;
  --paper: #f7f9f7;
  --white: #fff;
  --green: #0e6b4f;
  --green-2: #15956d;
  --lime: #d9f45d;
  --amber: #b76a13;
  --red: #b53b42;
  --shadow: 0 18px 50px rgba(20, 49, 38, .09);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(420px, .95fr); }
.auth-story { position: relative; overflow: hidden; padding: 64px clamp(36px, 7vw, 110px); color: white; background: #073f31; display: flex; flex-direction: column; justify-content: space-between; }
.auth-story::before, .auth-story::after { content: ""; position: absolute; border-radius: 999px; filter: blur(1px); }
.auth-story::before { width: 540px; height: 540px; right: -250px; top: -180px; border: 92px solid rgba(217, 244, 93, .16); }
.auth-story::after { width: 310px; height: 310px; left: -180px; bottom: -160px; background: rgba(25, 151, 110, .5); }
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; font-weight: 750; letter-spacing: .04em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--lime); color: #063c2e; display: grid; place-items: center; font-weight: 900; }
.story-copy { position: relative; z-index: 1; max-width: 620px; margin: 80px 0; }
.eyebrow { color: #9fd8c3; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.story-copy h1 { margin: 18px 0; font: 500 clamp(42px, 5.8vw, 78px)/1.03 Georgia, "Songti SC", serif; letter-spacing: -.04em; }
.story-copy p { max-width: 530px; font-size: 17px; line-height: 1.8; color: #cfe2da; }
.trust-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 24px; color: #aac9be; font-size: 13px; }
.auth-pane { padding: 48px clamp(30px, 7vw, 96px); display: grid; place-items: center; background: var(--white); }
.auth-card { width: min(440px, 100%); }
.auth-card h2 { margin: 12px 0 8px; font-size: 32px; letter-spacing: -.03em; }
.auth-card .lead { margin: 0 0 32px; color: var(--muted); line-height: 1.6; }
.field { display: grid; gap: 8px; margin: 18px 0; }
.field label { font-size: 13px; font-weight: 750; }
.field input { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 0 15px; outline: none; background: #fbfcfb; }
.field input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(21, 149, 109, .12); }
.primary { border: 0; border-radius: 12px; min-height: 50px; padding: 0 20px; color: white; background: var(--green); font-weight: 800; box-shadow: 0 8px 20px rgba(14, 107, 79, .18); }
.primary:hover { background: #095b43; }
.primary:disabled { opacity: .6; cursor: wait; }
.form-error { min-height: 22px; margin: 14px 0; color: var(--red); font-size: 13px; }
.fine-print { margin-top: 24px; font-size: 12px; color: #88928e; line-height: 1.65; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px; color: #d8e9e2; background: #0b352a; display: flex; flex-direction: column; }
.sidebar .brand { padding: 0 8px 26px; color: white; }
.partner-chip { margin: 4px 8px 24px; padding: 13px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.06); }
.partner-chip strong, .partner-chip span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partner-chip span { margin-top: 4px; color: #91b7a9; font-size: 12px; }
.nav { display: grid; gap: 6px; }
.nav button { border: 0; padding: 12px 13px; text-align: left; border-radius: 10px; color: #a9c3ba; background: transparent; }
.nav button:hover, .nav button.active { color: white; background: rgba(255,255,255,.1); }
.nav button.active::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 10px 1px 1px; border-radius: 50%; background: var(--lime); }
.side-foot { margin-top: auto; padding: 20px 8px 0; border-top: 1px solid rgba(255,255,255,.09); }
.logout { border: 0; padding: 8px 0; color: #a9c3ba; background: transparent; }
.main { min-width: 0; }
.topbar { min-height: 82px; padding: 18px clamp(22px, 4vw, 52px); border-bottom: 1px solid var(--line); background: rgba(247,249,247,.88); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar h1 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.range { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; }
.content { padding: 30px clamp(20px, 4vw, 52px) 60px; max-width: 1600px; margin: 0 auto; }
.notice { margin-bottom: 20px; padding: 12px 15px; border: 1px solid #d8e5ae; border-radius: 11px; color: #586528; background: #f8fce9; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 15px; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 3px 14px rgba(21,48,38,.035); }
.kpi { padding: 19px; }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { margin: 9px 0 4px; font-size: 29px; font-weight: 780; letter-spacing: -.04em; }
.kpi .sub { color: #87918d; font-size: 12px; }
.legacy-panel { margin-top: 18px; padding: 20px; border-color: #ead8bd; background: #fffdf8; }
.legacy-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.legacy-head > div { display: flex; align-items: center; gap: 10px; }
.legacy-head h2 { margin: 0; font-size: 16px; }
.legacy-panel > p { margin: 12px 0 17px; color: #765c3d; font-size: 13px; line-height: 1.65; }
.legacy-kpis { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; }
.legacy-kpi { padding: 14px; border: 1px solid #efe2cf; border-radius: 12px; background: white; }
.legacy-kpi .label { color: #806c54; font-size: 12px; }
.legacy-kpi .value { margin: 7px 0 3px; font-size: 23px; font-weight: 760; letter-spacing: -.03em; }
.legacy-kpi .sub { color: #9a8871; font-size: 11px; }
.grid-two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr); gap: 18px; margin-top: 18px; }
.card-head { padding: 19px 20px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-head h2 { margin: 0; font-size: 16px; }
.card-head span { color: var(--muted); font-size: 12px; }
.chart { min-height: 290px; padding: 14px 18px 18px; }
.chart svg { width: 100%; height: 260px; overflow: visible; }
.chart .grid { stroke: #e8eeea; stroke-width: 1; }
.chart .area { fill: rgba(21,149,109,.11); }
.chart .line { fill: none; stroke: var(--green-2); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart text { fill: #7a8781; font-size: 11px; }
.funnel { padding: 19px 20px 22px; }
.funnel-row { margin-top: 19px; }
.funnel-row header { display: flex; justify-content: space-between; font-size: 13px; }
.track { display: block; width: 100%; height: 9px; margin-top: 8px; overflow: hidden; border: 0; border-radius: 99px; background: #eef2ef; appearance: none; }
.track::-webkit-progress-bar { border-radius: 99px; background: #eef2ef; }
.track::-webkit-progress-value { border-radius: 99px; background: var(--green-2); }
.track::-moz-progress-bar { border-radius: 99px; background: var(--green-2); }
.table-card { margin-top: 18px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; border-top: 1px solid #e8edea; text-align: left; font-size: 13px; white-space: nowrap; }
th { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; background: #fbfcfb; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 99px; color: #0b6e50; background: #e5f6ef; font-size: 11px; font-weight: 750; }
.badge.warn { color: #815019; background: #fff2df; }
.mono { margin-top: 3px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.hash { display: block; max-width: min(68vw, 720px); margin-top: 4px; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.statement-card { scroll-margin-top: 20px; }
.dispute-detail-card { scroll-margin-top: 20px; }
.dispute-form { display: grid; gap: 13px; padding: 18px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.dispute-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.dispute-form input, .dispute-form select, .dispute-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; color: var(--ink); background: white; outline: none; }
.dispute-form textarea { resize: vertical; line-height: 1.55; }
.dispute-form input:focus, .dispute-form select:focus, .dispute-form textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(21,149,109,.1); }
.dispute-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.dispute-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dispute-actions span { color: var(--muted); font-size: 12px; }
.compact-form { border-top: 1px solid var(--line); border-bottom: 0; }
.dispute-thread { display: grid; gap: 10px; padding: 18px; }
.dispute-message { max-width: min(760px, 90%); padding: 12px 14px; border-radius: 10px; background: #eef7f3; }
.dispute-message.admin { margin-left: auto; background: #f3f1ff; }
.dispute-message > div { display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 11px; }
.dispute-message p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.page-actions { display: flex; justify-content: flex-end; padding: 16px 18px; border-top: 1px solid var(--line); }
.secondary { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; }
.secondary:disabled { opacity: .55; cursor: wait; }
.insight-grid { grid-template-columns: minmax(280px, .7fr) minmax(0, 1.55fr); }
.quality-list { padding: 10px 20px 22px; }
.quality-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-top: 15px; }
.quality-row strong { display: block; font-size: 12px; font-weight: 650; }
.quality-row .track { margin-top: 6px; }
.quality-row b { min-width: 30px; text-align: right; font-size: 13px; }
.dimension-card { min-width: 0; overflow: hidden; }
.breakdown-table { margin-top: 17px; }
.empty.compact { padding: 38px 20px; }
.list-toolbar { min-height: 64px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.list-toolbar span { color: var(--muted); font-size: 12px; }
.link-url { display: inline-block; max-width: 520px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; color: var(--green); }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 18px; }
.account-card { padding: 22px; }
.account-notice { margin-top: 18px; }
.account-card h2 { margin-top: 0; }
.definition { display: grid; grid-template-columns: 120px 1fr; gap: 12px; margin: 13px 0; font-size: 13px; }
.definition dt { color: var(--muted); }
.definition dd { margin: 0; }
#toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; transform: translateY(20px); opacity: 0; pointer-events: none; padding: 12px 16px; border-radius: 10px; color: white; background: #173e31; box-shadow: var(--shadow); transition: .2s ease; }
#toast.show { transform: translateY(0); opacity: 1; }
.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; }
.skeleton { min-height: 120px; background: linear-gradient(90deg,#f5f7f5 25%,#edf1ee 38%,#f5f7f5 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (max-width: 1050px) { .kpis, .legacy-kpis { grid-template-columns: repeat(2, 1fr); } .grid-two, .insight-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { min-height: 310px; padding: 32px 28px; }
  .story-copy { margin: 44px 0 10px; } .story-copy h1 { font-size: 42px; } .trust-row { display: none; }
  .auth-pane { padding: 42px 24px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 16px; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .sidebar .brand { padding: 0; } .partner-chip { display: none; }
  .nav { width: 100%; order: 3; grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)); margin-top: 12px; }
  .nav button { padding: 9px 5px; text-align: center; font-size: 12px; }
  .nav button.active::before { display: none; } .side-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
  .topbar { min-height: 70px; } .content { padding-top: 20px; }
  .kpis, .legacy-kpis, .account-grid { grid-template-columns: 1fr; }
  .legacy-head { align-items: flex-start; flex-direction: column; }
  .dispute-grid { grid-template-columns: 1fr; }
  .dispute-actions { align-items: stretch; flex-direction: column; }
  .link-url { max-width: 220px; }
}
