:root {
  --ink: #0e0e10;
  --ink-2: #282a2f;
  --muted: #6b6f78;
  --faint: #9aa0aa;
  --orange: #ff6a13;
  --orange-dark: #e95b06;
  --orange-soft: #fff1e8;
  --orange-line: #ffd9bf;
  --paper: #f4f2ed;
  --white: #fff;
  --soft: #f7f7f9;
  --soft-2: #eef0f3;
  --line: #e5e5e9;
  --green: #16865b;
  --green-soft: #eaf7f0;
  --red: #c94b43;
  --red-soft: #fff0ee;
  --blue: #246bd7;
  --shadow: 0 2px 6px rgba(16, 17, 20, .05), 0 18px 44px rgba(16, 17, 20, .08);
  --shadow-small: 0 1px 2px rgba(16, 17, 20, .04), 0 8px 20px rgba(16, 17, 20, .05);
  --radius: 18px;
  --radius-small: 12px;
  --sans: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
svg { display: block; }

.eyebrow { display: block; color: var(--orange); font: 700 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.eyebrow-light { color: var(--orange-line); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 10px;
  color: var(--ink); background: var(--soft-2); text-decoration: none; font-weight: 700;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.btn-primary { color: #fff; background: var(--orange); box-shadow: 0 8px 22px rgba(255, 106, 19, .25); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-secondary { background: var(--white); border: 1px solid var(--line); }
.btn-danger { color: var(--red); background: var(--red-soft); }
.btn-small { min-height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-large { min-height: 50px; border-radius: 12px; }
.text-button { color: var(--orange); background: none; border: 0; font-size: 13px; font-weight: 700; padding: 4px; }
.icon-button {
  width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink);
}
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.spinner { width: 17px; height: 17px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 8px rgba(255,106,19,0); } }

.brand-lockup { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-lockup strong { display: block; font-size: 17px; line-height: 1.1; letter-spacing: -.2px; }
.brand-lockup small { display: block; color: var(--faint); font: 700 8px/1 var(--mono); letter-spacing: .14em; margin-top: 5px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 6px 16px rgba(255,106,19,.18); }

/* Login */
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 12%, rgba(255,106,19,.10), transparent 30%),
    var(--paper);
}
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(460px, 1.1fr) minmax(420px, .9fr); }
.auth-brand {
  position: relative; overflow: hidden; padding: clamp(34px, 5vw, 70px);
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    linear-gradient(150deg, rgba(255,106,19,.20), transparent 40%),
    radial-gradient(circle at 76% 88%, rgba(255,106,19,.16), transparent 34%),
    #111216;
  color: #fff;
}
.auth-brand::after {
  content: ""; position: absolute; width: 460px; height: 460px; right: -190px; bottom: -190px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018);
}
.brand-lockup-light strong { color: #fff; }
.brand-lockup-light small { color: rgba(255,255,255,.42); }
.auth-message { position: relative; z-index: 1; max-width: 650px; }
.auth-message h1 { margin: 20px 0 20px; font-size: clamp(35px, 4.1vw, 62px); line-height: 1.12; letter-spacing: -.045em; }
.auth-message p { max-width: 540px; color: rgba(255,255,255,.58); font-size: 15px; line-height: 1.9; }
.auth-grid { width: 220px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; opacity: .7; }
.auth-grid span { height: 42px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; }
.auth-grid span:nth-child(2), .auth-grid span:nth-child(6) { background: var(--orange); border-color: var(--orange); }
.auth-foot { position: relative; z-index: 1; color: rgba(255,255,255,.34); font: 600 11px var(--mono); letter-spacing: .08em; }
.auth-panel { display: grid; place-items: center; padding: 30px; }
.login-card { width: min(420px, 100%); background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 34px; box-shadow: var(--shadow); }
.login-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.login-mark { width: 48px; height: 48px; border-radius: 14px; }
.login-head h2 { margin: 7px 0 3px; font-size: 25px; letter-spacing: -.03em; }
.login-head p { margin: 0; color: var(--muted); font-size: 13px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 7px; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea, .search-input, .select-input {
  width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line);
  border-radius: 10px; outline: none; background: var(--white); color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { padding-top: 12px; min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus, .select-input:focus {
  border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,106,19,.11);
}
.password-field { position: relative; }
.password-field input { padding-right: 62px; }
.field-action { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--orange); font-size: 12px; font-weight: 700; }
.form-error { padding: 10px 12px; margin: 0 0 14px; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 12.5px; }
.login-trust { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; color: var(--faint); font-size: 10.5px; }
.trust-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); }

/* App shell */
.app-body { min-height: 100vh; background: var(--paper); }
.app-loading { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 15px; color: var(--muted); font-size: 13px; }
.app-loading img { width: 54px; height: 54px; border-radius: 15px; }
.loading-line { width: 150px; height: 3px; overflow: hidden; border-radius: 3px; background: var(--orange-soft); }
.loading-line i { display: block; width: 45%; height: 100%; background: var(--orange); animation: loading 1.2s ease-in-out infinite alternate; }
@keyframes loading { to { transform: translateX(120%); } }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 24px 16px 18px;
  display: flex; flex-direction: column; color: var(--ink); background: rgba(255,255,255,.88);
  border-right: 1px solid var(--line); backdrop-filter: blur(18px); z-index: 20;
}
.sidebar .brand-lockup { padding: 0 7px 22px; }
.tenant-chip { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); }
.tenant-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 10px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; }
.tenant-chip strong { display: block; font-size: 12.5px; }
.tenant-chip small { display: block; color: var(--muted); font-size: 10.5px; }
.side-nav { display: grid; gap: 4px; margin-top: 20px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; font-weight: 600; }
.nav-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--soft); color: var(--ink); }
.nav-item.active { background: var(--orange-soft); color: var(--orange-dark); }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; padding: 16px 8px 0; border-top: 1px solid var(--line); }
.sidebar-foot a, .sidebar-foot button { border: 0; background: none; padding: 4px 0; color: var(--muted); font-size: 12px; text-align: left; text-decoration: none; }
.sidebar-foot a:hover, .sidebar-foot button:hover { color: var(--orange); }
.workspace { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 15; min-height: 84px; padding: 16px 34px;
  display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line);
  background: rgba(244,242,237,.86); backdrop-filter: blur(18px);
}
.topbar-title h1 { margin: 3px 0 0; font-size: 24px; line-height: 1.2; letter-spacing: -.035em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.clock { color: var(--muted); font: 600 11px var(--mono); }
.mobile-brand { display: none; align-items: center; gap: 9px; }
.mobile-brand img { width: 32px; height: 32px; border-radius: 9px; }
.page-content { padding: 28px 34px 60px; }
.view { display: none; animation: rise .35s ease; }
.view.active { display: block; }
.hero-card { position: relative; overflow: hidden; min-height: 220px; display: flex; align-items: center; justify-content: space-between; padding: 34px; border-radius: 22px; color: #fff; background: #111216; box-shadow: var(--shadow); }
.hero-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 75% 25%, rgba(255,106,19,.3), transparent 30%), linear-gradient(130deg, rgba(255,106,19,.10), transparent 45%); }
.hero-card > div { position: relative; z-index: 1; }
.hero-card h2 { max-width: 620px; margin: 13px 0 12px; font-size: clamp(28px, 3vw, 44px); line-height: 1.15; letter-spacing: -.045em; }
.hero-card p { max-width: 630px; margin: 0; color: rgba(255,255,255,.57); font-size: 13.5px; }
.hero-mark img { width: 132px; height: 132px; border-radius: 34px; opacity: .95; transform: rotate(8deg); box-shadow: 0 30px 80px rgba(255,106,19,.25); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.kpi-card, .panel, .account-card, .project-card, .channel-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-small); }
.kpi-card { padding: 20px; }
.kpi-card .kpi-label { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.kpi-card .kpi-value { margin: 8px 0 3px; font-size: 30px; line-height: 1.1; letter-spacing: -.04em; font-weight: 750; }
.kpi-card .kpi-meta { color: var(--faint); font-size: 10.5px; }
.kpi-card.highlight { color: #fff; background: var(--orange); border-color: var(--orange); }
.kpi-card.highlight .kpi-label, .kpi-card.highlight .kpi-meta { color: rgba(255,255,255,.7); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(300px,.8fr); gap: 16px; margin-top: 16px; }
.panel { padding: 22px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel h3 { margin: 3px 0 0; font-size: 18px; letter-spacing: -.02em; }
.stack-list { display: grid; gap: 10px; }
.stack-list.wide { gap: 12px; }
.capacity-list { display: grid; gap: 14px; }
.capacity-item .capacity-top { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; }
.capacity-bar { height: 8px; margin-top: 8px; overflow: hidden; border-radius: 8px; background: var(--soft-2); }
.capacity-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), #ff9f63); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 4px 0 22px; }
.section-heading h2 { margin: 6px 0 4px; font-size: 30px; line-height: 1.2; letter-spacing: -.04em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.account-card, .project-card { padding: 20px; }
.account-card .card-top { display: flex; justify-content: space-between; gap: 10px; }
.account-name { font-size: 16px; font-weight: 750; }
.account-meta { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.account-stats { display: flex; gap: 20px; margin: 20px 0; }
.account-stats strong { display: block; font-size: 22px; line-height: 1; }
.account-stats span { color: var(--faint); font-size: 10.5px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 750; white-space: nowrap; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-success { color: var(--green); background: var(--green-soft); }
.status-pending { color: var(--orange-dark); background: var(--orange-soft); }
.status-error { color: var(--red); background: var(--red-soft); }
.status-muted { color: var(--muted); background: var(--soft-2); }
.filter-bar { display: flex; gap: 10px; margin-bottom: 14px; }
.search-input { flex: 1; min-width: 0; }
.select-input { width: 160px; flex: none; }
.project-card { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; gap: 15px; align-items: center; }
.project-icon { width: 56px; height: 56px; border-radius: 15px; object-fit: cover; background: var(--orange-soft); }
.project-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 750; }
.project-url { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-key { display: flex; gap: 8px; align-items: center; margin-top: 7px; font: 11px var(--mono); color: var(--faint); }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.progress-inline { min-width: 150px; }
.progress-inline .between { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.progress-inline .bar { height: 5px; margin-top: 6px; overflow: hidden; border-radius: 5px; background: var(--soft-2); }
.progress-inline .bar i { display: block; height: 100%; background: var(--orange); }
.notice-box { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--orange-line); border-radius: 12px; background: var(--orange-soft); color: #7d3b10; font-size: 11.5px; }
.notice-box strong { white-space: nowrap; }
.data-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-small); }
.data-row { display: grid; grid-template-columns: 1.3fr 1fr .8fr .7fr .8fr; gap: 14px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 12px; }
.data-row:last-child { border-bottom: 0; }
.data-row.data-head { background: var(--soft); color: var(--muted); font-size: 10.5px; font-weight: 750; letter-spacing: .03em; }
.row-main { min-width: 0; }
.row-main strong { display: block; font-size: 12.5px; }
.row-main small { display: block; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 10.5px var(--mono); }
.money { font-weight: 750; }
.empty-state { padding: 36px 20px; text-align: center; color: var(--muted); background: var(--white); border: 1px dashed #d6d6dc; border-radius: var(--radius); font-size: 12.5px; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 15px; }
.channel-card { padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.channel-card h3 { margin: 0; font-size: 16px; }
.channel-meta { display: flex; flex-wrap: wrap; gap: 9px 16px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.channel-meta code { color: var(--faint); font: 10.5px var(--mono); }
.channel-actions { display: flex; align-items: center; gap: 8px; }
.switch { position: relative; width: 42px; height: 24px; border: 0; border-radius: 24px; background: #d9dbe0; transition: background .16s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .16s ease; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.switch.on { background: var(--orange); }
.switch.on::after { transform: translateX(18px); }
.timeline { position: relative; display: grid; gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px; box-shadow: var(--shadow-small); }
.timeline-item { position: relative; display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; padding: 15px 0 15px 18px; border-bottom: 1px solid var(--line); font-size: 12px; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 0; top: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.timeline-item time { color: var(--faint); font: 10.5px var(--mono); }
.timeline-item strong { display: block; margin-bottom: 2px; }
.timeline-item small { color: var(--muted); }
.mobile-nav { display: none; }

/* Modals and overlays */
.modal { width: min(560px, calc(100vw - 28px)); max-height: min(86vh, 780px); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--white); color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.22); overflow: auto; }
.modal::backdrop { background: rgba(14,14,16,.48); backdrop-filter: blur(4px); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 22px 24px 14px; background: var(--white); border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.03em; }
.modal-head .icon-button { border: 0; background: var(--soft); font-size: 22px; }
.modal-body { padding: 20px 24px 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.qr-card { text-align: center; padding: 16px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); }
.qr-card img { width: min(270px, 80vw); height: auto; border-radius: 10px; background: #fff; }
.qr-card .business-no { margin-top: 10px; color: var(--muted); font: 10.5px var(--mono); word-break: break-all; }
.timeline-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 11px; color: #fff; background: var(--ink); font-size: 12.5px; box-shadow: 0 15px 45px rgba(0,0,0,.2); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--red); }

/* Public payment */
.pay-body {
  min-height: 100vh; color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(255,106,19,.13), transparent 26%),
    radial-gradient(circle at 86% 26%, rgba(36,107,215,.07), transparent 25%),
    var(--paper);
}
.pay-shell { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 24px 0 42px; }
.pay-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.pay-header .brand-mark { width: 42px; height: 42px; }
.pay-header .secure-label { color: var(--muted); font: 600 10.5px var(--mono); letter-spacing: .05em; }
.pay-main { display: grid; grid-template-columns: minmax(0,1fr) minmax(340px,.78fr); gap: 18px; align-items: start; }
.pay-card { padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.pay-title { margin: 10px 0 8px; font-size: clamp(32px, 4vw, 50px); line-height: 1.1; letter-spacing: -.05em; }
.pay-subtitle { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0; }
.choice-label { display: block; margin: 28px 0 9px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .05em; }
.channel-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.channel-option, .method-option { position: relative; min-height: 78px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); color: var(--ink); text-align: left; }
.channel-option strong, .method-option strong { display: block; font-size: 13px; }
.channel-option small, .method-option small { display: block; margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.channel-option.is-selected, .method-option.is-selected { border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 0 0 2px rgba(255,106,19,.08); }
.choice-dot { position: absolute; top: 13px; right: 13px; width: 14px; height: 14px; border: 1.5px solid #c8c9ce; border-radius: 50%; }
.is-selected .choice-dot { border: 4px solid var(--orange); }
.method-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product-panel { margin-top: 18px; display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.product-icon { width: 64px; height: 64px; border-radius: 17px; background: var(--orange); display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 800; overflow: hidden; }
.product-icon img { width: 100%; height: 100%; object-fit: cover; }
.product-name { font-weight: 750; }
.product-desc { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.price { font-size: 26px; line-height: 1; font-weight: 800; white-space: nowrap; letter-spacing: -.04em; }
.price small { font-size: 14px; }
.pay-action { margin-top: 18px; min-height: 52px; font-size: 14px; }
.pay-guide { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 18px; }
.pay-guide span { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); text-align: center; font-size: 10.5px; }
.payment-side { position: sticky; top: 24px; overflow: hidden; min-height: 460px; background: #111216; color: #fff; }
.payment-side::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 60% 18%, rgba(255,106,19,.22), transparent 30%); pointer-events: none; }
.payment-side > * { position: relative; z-index: 1; }
.side-brand { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.65); font-size: 11px; }
.side-brand img { width: 28px; height: 28px; border-radius: 8px; }
.side-state { min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 0; }
.side-state h2 { margin: 18px 0 8px; font-size: 24px; letter-spacing: -.04em; }
.side-state p { max-width: 270px; margin: 0; color: rgba(255,255,255,.48); font-size: 11.5px; line-height: 1.8; }
.phone-outline { width: 72px; height: 112px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.18); border-radius: 17px; color: var(--orange); font-size: 26px; }
.qr-frame { width: min(238px, 70vw); aspect-ratio: 1; padding: 13px; border-radius: 16px; background: #fff; }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.poll-state { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: rgba(255,255,255,.56); font-size: 10.5px; }
.poll-state .spinner { width: 13px; height: 13px; border-color: rgba(255,255,255,.2); border-top-color: var(--orange); }
.success-ring { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 35px; box-shadow: 0 0 0 14px rgba(22,134,91,.13); }
.pay-error { padding: 13px; margin-top: 16px; border-radius: 10px; color: var(--red); background: var(--red-soft); font-size: 11.5px; }
.pay-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; color: var(--faint); font-size: 10.5px; }
.pay-loading { min-height: 400px; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; color: var(--muted); }
.pay-loading .spinner { width: 28px; height: 28px; border-color: var(--orange-soft); border-top-color: var(--orange); }
.result-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--paper); }
.result-card { width: min(480px,100%); padding: 38px; text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.result-logo { width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 16px; }
.result-card h1 { margin: 16px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.result-card p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.result-number { margin: 18px 0 22px; padding: 12px; border-radius: 10px; background: var(--soft); font: 11px var(--mono); }
.result-number span { display: block; color: var(--faint); margin-bottom: 3px; }
.result-number strong { word-break: break-all; }

@media (max-width: 1100px) {
  .auth-shell { grid-template-columns: 1fr 1fr; }
  .app-shell { grid-template-columns: 210px minmax(0,1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pay-main { grid-template-columns: minmax(0,1fr) 360px; }
}

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 280px; padding: 28px; }
  .auth-message h1 { font-size: clamp(30px,8vw,44px); }
  .auth-grid, .auth-foot { display: none; }
  .auth-panel { padding: 22px 16px 40px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { min-height: 70px; padding: 12px 16px; }
  .mobile-brand { display: flex; }
  .topbar-title { display: none; }
  .clock { display: none; }
  .page-content { padding: 18px 16px 92px; }
  .hero-card { min-height: 240px; padding: 24px; align-items: flex-end; }
  .hero-card h2 { font-size: 32px; }
  .hero-card p { max-width: 90%; }
  .hero-mark { position: absolute; right: 20px; top: 20px; }
  .hero-mark img { width: 82px; height: 82px; border-radius: 22px; opacity: .7; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .mobile-nav {
    position: fixed; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 30; display: grid; grid-template-columns: repeat(5,1fr); padding: 7px;
    border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(17,18,22,.94);
    box-shadow: 0 18px 50px rgba(0,0,0,.25); backdrop-filter: blur(18px);
  }
  .mobile-nav button { height: 45px; border: 0; border-radius: 11px; color: rgba(255,255,255,.48); background: transparent; font-size: 10px; font-weight: 700; }
  .mobile-nav button.active { color: #fff; background: var(--orange); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading h2 { font-size: 26px; }
  .filter-bar { flex-direction: column; }
  .select-input { width: 100%; }
  .project-card { grid-template-columns: 48px minmax(0,1fr); }
  .project-icon { width: 48px; height: 48px; border-radius: 13px; }
  .project-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .progress-inline { width: 100%; }
  .data-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .data-row.data-head { display: none; }
  .data-row > :nth-child(n+3) { color: var(--muted); font-size: 10.5px; }
  .channel-card { grid-template-columns: 1fr; }
  .channel-actions { justify-content: space-between; }
  .timeline-item { grid-template-columns: 1fr auto; }
  .timeline-item time { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .pay-shell { width: min(100% - 24px, 1120px); padding-top: 16px; }
  .pay-header { margin-bottom: 18px; }
  .pay-main { grid-template-columns: 1fr; }
  .payment-side { position: static; min-height: 390px; grid-row: 1; }
  .side-state { min-height: 300px; }
  .channel-options { grid-template-columns: 1fr; }
  .pay-footer { flex-direction: column; gap: 4px; }
  .result-card { padding: 28px 22px; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi-card { padding: 16px; }
  .kpi-card .kpi-value { font-size: 25px; }
  .hero-card h2 { font-size: 28px; }
  .panel { padding: 17px; }
  .login-card { padding: 25px 20px; border-radius: 19px; }
  .login-trust { flex-direction: column; gap: 4px; }
  .method-options { grid-template-columns: 1fr; }
  .product-panel { grid-template-columns: 54px 1fr; }
  .product-icon { width: 54px; height: 54px; border-radius: 14px; }
  .product-panel .price { grid-column: 1 / -1; }
  .pay-guide { grid-template-columns: 1fr; }
  .section-heading .btn { width: 100%; }
}
