﻿:root {
    --bg: #0a1018;
    --bg-soft: #0f1826;
    --panel: #121d2e;
    --panel-2: #172437;
    --line: #223149;
    --text: #e8eef7;
    --muted: #8b9bb4;
    --accent: #16b8a6;
    --accent-2: #f5b942;
    --danger: #f2545b;
    --ok: #37c98b;
    --radius: 16px;
    --shadow: 0 18px 40px rgba(2, 8, 18, .45);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: radial-gradient(1200px 600px at 15% -10%, #14293b 0%, transparent 60%),
                radial-gradient(900px 500px at 95% 10%, #1a2a26 0%, transparent 55%),
                var(--bg);
    color: var(--text);
    font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .85; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; }

.site-wrap { max-width: 1180px; margin: 0 auto; padding: 20px 20px 60px; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: .02em; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #0b7f76 60%, var(--accent-2)); display: inline-block; }
.brand-name { font-size: 17px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-current { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.lang-select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 13px; }

.site-main { display: block; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.35fr .9fr; align-items: start; gap: 28px; padding: 26px 0 40px; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -.01em; }
.lead { color: var(--muted); font-size: 16px; max-width: 46ch; margin: 0 0 20px; }
.hero-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-note { color: var(--muted); font-size: 13px; }
.hero-stats { display: flex; gap: 34px; margin: 32px 0 0; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats dt { font-size: 22px; font-weight: 650; color: var(--text); }
.hero-stats dd { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.hero-card { background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.hero-card h2 { font-size: 16px; margin: 0 0 14px; }
.hero-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.dot { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); display: inline-block; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); font-size: 14px; }
.steps li span { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px; background: rgba(22, 184, 166, .14); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.steps-lg li { font-size: 15px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 11px 18px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 14px; font-weight: 550; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #0d9488); border-color: transparent; color: #04211f; font-weight: 650; box-shadow: 0 10px 24px rgba(22, 184, 166, .28); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-small { padding: 6px 12px; font-size: 13px; border-radius: 9px; }

/* ---------- sections ---------- */
.section { padding: 34px 0 6px; }
.section-head h2 { font-size: 20px; margin: 0 0 4px; }
.section-head p { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.wallet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.wallet-grid-sm { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.wallet-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.wallet-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wallet-name { font-weight: 600; font-size: 14px; }
.wallet-chains { color: var(--muted); font-size: 11px; letter-spacing: .06em; margin: 0; }
.wallet-foot { color: var(--muted); font-size: 11px; margin: 0; }
.badge { font-size: 10px; letter-spacing: .05em; padding: 3px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; }
.badge-parse { color: var(--ok); border-color: rgba(55, 201, 139, .4); }
.badge-collect { color: var(--accent-2); border-color: rgba(245, 185, 66, .4); }
.badge-label { color: var(--muted); }
.wallet-card-btn { cursor: pointer; text-align: start; color: var(--text); background: var(--panel); }

.section-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h2 { font-size: 16px; margin: 0 0 12px; }
.check-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.check-list li { color: var(--muted); font-size: 14px; padding-inline-start: 18px; position: relative; }
.check-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--accent); }

.cta-band { margin-top: 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border-radius: var(--radius); border: 1px solid rgba(22, 184, 166, .3); background: linear-gradient(120deg, rgba(22, 184, 166, .12), rgba(245, 185, 66, .06)); }
.cta-band h2 { margin: 0 0 4px; font-size: 18px; }
.cta-band p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- notices ---------- */
.notice { border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--panel-2); font-size: 14px; margin: 14px 0; }
.notice-warn { border-color: rgba(245, 185, 66, .45); color: #ffe3a8; background: rgba(245, 185, 66, .08); }
.notice-danger { border-color: rgba(242, 84, 91, .45); color: #ffc9cc; background: rgba(242, 84, 91, .08); }
.notice-ok { border-color: rgba(55, 201, 139, .4); color: #c3f3dc; background: rgba(55, 201, 139, .08); }
.notice-info { border-color: rgba(22, 184, 166, .35); color: #cbf3ee; background: rgba(22, 184, 166, .08); }

/* ---------- apply entry ---------- */
.entry { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; padding: 26px 0 20px; }
.entry h1 { font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 12px; }
.link-box { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 16px 0; }
.link-box code { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.entry-steps { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.entry-steps h2 { font-size: 16px; margin: 0 0 14px; }
.entry-illustration { display: flex; justify-content: center; margin-top: 18px; }
.phone { width: 190px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel-2); padding: 10px; }
.phone-bar { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; padding: 4px 6px 10px; }
.phone-body { border-radius: 14px; background: rgba(22, 184, 166, .08); padding: 14px; font-size: 12px; color: var(--muted); }

/* ---------- apply form ---------- */
.apply { padding: 20px 0 10px; }
.apply-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 22px; }
.apply h1 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; }
.credit-badge { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; text-align: end; min-width: 190px; }
.credit-badge .label { color: var(--muted); font-size: 12px; display: block; }
.credit-badge strong { font-size: 22px; }
.credit-badge small { color: var(--muted); font-size: 12px; }
.credit-badge .sub { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

.apply-form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 22px; }
.field { display: grid; gap: 10px; }
.field > label { color: var(--muted); font-size: 13px; }
.amount-row { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; }
.amount-row input { flex: 1; background: transparent; border: 0; color: var(--text); font-size: 22px; font-weight: 600; padding: 8px 0; outline: none; }
.unit { color: var(--muted); font-size: 13px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.term-row { display: flex; gap: 10px; flex-wrap: wrap; }
.term-chip { border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; cursor: pointer; font-size: 14px; color: var(--muted); }
.term-chip input { display: none; }
.term-chip.is-active { border-color: var(--accent); color: var(--text); background: rgba(22, 184, 166, .1); }
.wallet-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.wallet-chip { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 170px; }
.wallet-chip input { display: none; }
.wallet-chip.is-active { border-color: var(--accent); background: rgba(22, 184, 166, .08); }
.wallet-chip code { color: var(--muted); font-size: 11px; }
.wallet-chip em { font-style: normal; color: var(--accent-2); font-size: 10px; letter-spacing: .08em; }
.wallet-chip-add { text-decoration: none; color: var(--muted); justify-content: center; align-items: center; text-align: center; }
.summary { display: flex; gap: 26px; padding: 16px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.summary div { display: flex; flex-direction: column; gap: 2px; }
.summary span { color: var(--muted); font-size: 12px; }
.summary strong { font-size: 16px; }

/* ---------- blocked / result / sign ---------- */
.blocked, .result, .sign { max-width: 720px; margin: 40px auto 20px; text-align: center; }
.blocked-icon { width: 54px; height: 54px; border-radius: 16px; background: rgba(242, 84, 91, .12); color: var(--danger); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin-bottom: 14px; }
.blocked h1, .result h1, .sign h1 { font-size: 26px; margin: 0 0 10px; }
.blocked-steps { text-align: start; margin: 20px 0; }
.meta-row { display: flex; gap: 8px; justify-content: center; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.result-head { display: flex; gap: 16px; align-items: center; justify-content: center; margin-bottom: 24px; text-align: start; }
.result-check { width: 48px; height: 48px; border-radius: 14px; background: rgba(55, 201, 139, .14); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; text-align: start; margin: 0 0 20px; }
.result-grid > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.result-grid dt { color: var(--muted); font-size: 12px; }
.result-grid dd { margin: 4px 0 0; font-weight: 600; }
.message-box { direction: ltr; text-align: left; unicode-bidi: isolate; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--muted); white-space: pre-wrap; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sign-actions { margin: 18px 0; display: flex; justify-content: center; }

.status { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); }
.status-pending_review, .status-approved, .status-paying { color: var(--accent-2); border-color: rgba(245, 185, 66, .4); }
.status-paid, .status-repaying, .status-closed { color: var(--ok); border-color: rgba(55, 201, 139, .4); }
.status-overdue, .status-failed, .status-rejected { color: var(--danger); border-color: rgba(242, 84, 91, .45); }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.tag-ok { color: var(--ok); border-color: rgba(55, 201, 139, .4); }
.tag-warn { color: var(--accent-2); border-color: rgba(245, 185, 66, .4); }
.tag-danger { color: var(--danger); border-color: rgba(242, 84, 91, .45); }

.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 18px; }
.disclaimer { color: var(--muted); font-size: 12px; max-width: 70ch; }
.copyright { color: var(--muted); font-size: 12px; }

.page-center { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; text-align: center; max-width: 420px; }

/* ---------- admin ---------- */
.admin-body { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; background: var(--bg-soft); }
.admin-side { border-inline-end: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 22px; background: #0c1420; position: sticky; top: 0; height: 100vh; }
.admin-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 14px; }
.admin-nav { display: grid; gap: 4px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.nav-item.is-active { background: rgba(22, 184, 166, .1); color: var(--text); }
.nav-dot { width: 5px; height: 5px; border-radius: 99px; background: var(--line); }
.nav-item.is-active .nav-dot { background: var(--accent); }
.admin-side-foot { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.admin-user { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.role-tag { font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 1px 6px; border-radius: 99px; text-transform: uppercase; }

.admin-main { padding: 26px 30px 60px; max-width: 1400px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.admin-head h1 { font-size: 22px; margin: 0; }
.admin-head-meta { color: var(--muted); font-size: 12px; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi span { color: var(--muted); font-size: 12px; }
.kpi strong { font-size: 24px; }
.kpi em { color: var(--muted); font-size: 12px; font-style: normal; }

.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head h2 { font-size: 16px; margin: 0; }
.panel-head.standalone { margin: 24px 0 10px; }
.link { color: var(--accent); font-size: 13px; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: start; color: var(--muted); font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid rgba(34, 49, 73, .6); vertical-align: middle; }
.table tr:hover td { background: rgba(22, 184, 166, .03); }
.table .wrap { word-break: break-all; }
.ua-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar input, .filter-bar select { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; color: var(--text); padding: 8px 10px; font-size: 13px; }
.input-sm { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 5px 8px; font-size: 13px; width: 110px; }
.input-full { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 6px 9px; font-size: 13px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.action-grid { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0; }
.kv > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 4px 0 0; font-size: 14px; word-break: break-all; }
.pager { display: flex; gap: 6px; margin-top: 14px; }
.pager a { padding: 5px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; }
.pager a.is-active { border-color: var(--accent); color: var(--text); }
.sticky-actions { position: sticky; bottom: 0; display: flex; gap: 14px; align-items: center; padding: 14px; margin-top: 16px; background: rgba(12, 20, 32, .92); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(6px); }
.config-table .input-sm { width: 160px; }
.locale-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.locale-tab { padding: 6px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 13px; }
.locale-tab.is-active { border-color: var(--accent); color: var(--text); background: rgba(22, 184, 166, .08); }
.wl-table input[type="checkbox"] { accent-color: var(--accent); }

.admin-login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: min(420px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.login-head h1 { font-size: 19px; margin: 10px 0 6px; }
.login-head p { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.login-foot { color: var(--muted); font-size: 12px; margin: 14px 0 0; text-align: center; }
.login-card .field { margin-bottom: 14px; }
.login-card input[type="text"], .login-card input[type="password"] { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 10px 12px; font-size: 14px; }

/* RTL 适配 */
[dir="rtl"] .hero, [dir="rtl"] .entry, [dir="rtl"] .apply-head { direction: rtl; }
[dir="rtl"] .table th, [dir="rtl"] .table td { text-align: right; }
[dir="rtl"] .check-list li::before { content: "✓"; }

@media (max-width: 960px) {
    .hero, .entry, .section-split, .two-col, .admin-body { grid-template-columns: 1fr; }
    .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
    .admin-nav { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
    .hero-stats { gap: 20px; }
    .apply-head { flex-direction: column; }
    .credit-badge { width: 100%; text-align: start; }
    .result-grid { grid-template-columns: 1fr; }
    .admin-main { padding: 18px 16px 50px; }
    .table { font-size: 12px; }
}
