/* hejuo 管理工作区：一致的导航、操作、表格、编辑弹窗。 */
:root{--brand:#127568;--brand-dark:#0c5e55;--text:#173747;--muted:#607681;--line:#e1e9ed;--soft:#f4f7f8;--ok:#147d63;--danger:#bc4047;font-size:14px}
.admin-shell{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;overflow:auto;padding:24px 16px;background:#fff;border-right:1px solid var(--line)}
.brand{padding:4px 12px 22px;font-size:29px;letter-spacing:-1px;font-weight:800;color:#173747}.brand span:last-child{color:#14a68f}
.side-nav{display:flex;flex-direction:column;gap:18px}.admin-nav-section{display:grid;gap:4px}.admin-group-label{margin:0 12px 6px;font-size:11px;font-weight:600;color:#788b94;letter-spacing:1px}
.side-nav button{width:100%;text-align:left;display:flex;align-items:center;min-height:42px;border:0;border-radius:9px;background:transparent;color:#506873;font-weight:500;padding:10px 14px;transition:background .15s,color .15s}
.side-nav button:hover{background:#f0f6f5;color:#125e55}.side-nav button.active{color:#09695c;background:#e8f5f0;font-weight:700;box-shadow:inset 3px 0 #189f88}
.workspace{padding:26px 32px 48px;min-width:0}.topbar{position:relative;padding:0 0 22px;margin-bottom:22px;border-bottom:1px solid var(--line);background:transparent;gap:16px}.topbar h1{font-size:25px;line-height:1.3;letter-spacing:-.5px}.topbar p{font-size:13px;color:#607681;line-height:1.7;margin-top:8px}.top-actions{gap:8px}
button{line-height:1.3;transition:background .15s,border-color .15s}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,a:focus-visible{outline:3px solid #55b9a7;outline-offset:3px}
.top-actions button,.toolbar button,.modal-actions button,.admin-project-tabs button,.admin-provider button,.settings-tabs button,.report-export button,.report-filter>button,.report-card-head button{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 14px;border:1px solid #dbe5e8;border-radius:8px;background:#fff;color:#214551;font-size:13px;white-space:nowrap}
button.primary,.admin-provider button.primary{background:#127568;border-color:#127568;color:#fff}button.primary:hover{background:#0d6257}.danger,.danger-lite{color:#b23840!important}
.toolbar{gap:10px;align-items:center;margin:0 0 16px}.toolbar input[type=search],.toolbar select{height:40px;max-width:100%;min-width:130px;border:1px solid #dbe5e8;border-radius:8px;padding:8px 12px;background:#fff;color:#214551}.toolbar input[type=search]{flex:1;max-width:380px}
.admin-project-tabs{position:relative;display:flex;gap:6px;padding:6px;border:1px solid #dfe9e8;border-radius:11px;background:#eaf1f1;margin-bottom:20px;width:fit-content;max-width:100%}.admin-project-tabs button{border:0;background:transparent;color:#57717a;min-height:38px}.admin-project-tabs button.active{background:#fff;color:#0c6b5e;border:0;box-shadow:0 2px 6px #153e3e0c}
.panel,.report-card,.admin-provider>.card{border:1px solid #e1e9ed;border-radius:12px;box-shadow:0 2px 4px #17374702;background:#fff}.table-panel{overflow-x:auto}.table-panel table{width:100%;min-width:720px;border-collapse:collapse}.table-panel th,.report-card th{background:#f7fafb;color:#677e88;font-weight:600;font-size:12px;white-space:nowrap}.table-panel td,.table-panel th,.report-card td,.report-card th{padding:14px 16px;border-bottom:1px solid #edf1f3;line-height:1.6;text-align:left}.table-panel td{font-size:13px;color:#264653}.table-panel tbody tr:hover{background:#fbfdfd}.table-panel tr:last-child td{border-bottom:0}.row-actions{display:flex;flex-wrap:wrap;gap:7px}.row-actions button{min-height:32px;padding:6px 10px;white-space:nowrap}
.upstream-balance-band{padding:16px;border:1px solid #e0eae8;background:#f8fcfa;border-radius:11px;gap:12px;margin-bottom:18px}.upstream-balance-summary{margin-right:auto}.upstream-balance-summary strong{color:#0d6b5d}.upstream-balance-toggle,.upstream-balance-limit{font-size:12px}
.settings-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0!important;margin:0 0 24px;border:0!important;background:transparent!important}.admin-settings-section{display:flex;align-content:flex-start;gap:6px;flex-wrap:wrap;padding:14px;background:#edf3f4;border:1px solid #e0e8eb;border-radius:11px}.admin-settings-section>.admin-group-label{flex:0 0 100%;margin:0 0 4px;color:#576d76}.settings-tabs button{font-size:12px;padding:8px 11px;min-height:34px;border-color:transparent;background:transparent}.settings-tabs button.active{background:#fff;color:#086c5b;border-color:#cfe6df;font-weight:600}.settings-head{align-items:center;gap:16px}.settings-card{border-radius:12px}.settings-card-head h2{font-size:17px}.settings-card-head span,.settings-head p{line-height:1.8;color:#617984}
.modal,.uniform-product-dialog,.maie-admin dialog,.trx-admin dialog{color:#173747;border:1px solid #dbe6e9;border-radius:16px;padding:25px;max-width:min(640px,calc(100vw - 40px));max-height:calc(100dvh - 48px);overflow:auto;box-shadow:0 25px 80px #153b4324}.modal::backdrop{background:#14323d66;backdrop-filter:blur(2px)}.modal h2{font-size:21px;margin:0 0 18px}.modal label{font-size:13px;color:#425f6c}.modal input:not([type=checkbox]):not([type=radio]),.modal select,.modal textarea{border:1px solid #d9e4e8;border-radius:8px;color:#173747;padding:10px 12px;width:100%;background:#fff}.modal .modal-actions{position:sticky;bottom:-25px;margin:22px -25px -25px;padding:16px 25px;background:#fff;border-top:1px solid #e3ebee;display:flex;align-items:center;justify-content:flex-end;gap:10px}.modal .modal-actions button{min-width:88px;flex:none;transform:none;position:static;margin:0}.modal .check-line{display:flex;align-items:center;gap:8px}.modal .check-line input{margin:0;width:16px;height:16px}
.admin-login-overlay{background:linear-gradient(135deg,#123342f5,#0f7567d9)}.admin-login-brand{font-style:normal;color:#147568}.admin-login-card button{border-radius:9px}.admin-login-card input:focus{border-color:#38a18d;box-shadow:0 0 0 3px #e1f2ed}
.section-kicker{color:#188471;font-size:11px;letter-spacing:1px;font-weight:700}.report-heading,.report-card-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.report-heading h2{font-size:23px;margin:7px 0;color:#173747;letter-spacing:-.5px}.report-heading p{font-size:13px;color:#6b7f88;margin:0}.report-export{display:flex;align-items:center;gap:14px}.report-export span{font-size:12px;color:#708590}.report-filter{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:22px 0}.report-period-tabs{display:flex;gap:4px;background:#e8eff1;border-radius:9px;padding:4px}.report-period-tabs button{border:0;border-radius:6px;background:transparent;padding:9px 15px;color:#607985;font-size:13px}.report-period-tabs button.active{background:#fff;color:#0b705f;box-shadow:0 1px 4px #183a4310;font-weight:600}.report-filter label{display:flex;align-items:center;gap:8px;color:#617985;font-size:12px}.report-filter input{height:38px;border:1px solid #dce6e9;border-radius:8px;background:#fff;padding:7px 10px;color:#284b58}.report-timezone{font-size:11px;color:#7b8e97;margin-left:auto}.report-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.report-metric{padding:19px 20px;background:#fff;border:1px solid #e0e9ed;border-radius:12px;min-width:0}.report-metric>span{font-size:12px;color:#617984;font-weight:500}.report-metric>strong{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;font-size:29px;letter-spacing:-.7px;color:#173747;margin:13px 0 9px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.report-metric small{font-size:11px;font-weight:500;letter-spacing:0;color:#748993}.report-metric p{font-size:11px;color:#85969f;line-height:1.6;margin:0}.report-metric.is-primary{background:#143b47;border-color:#143b47}.report-metric.is-primary>strong{color:#fff}.report-metric.is-primary>span,.report-metric.is-primary p,.report-metric.is-primary small{color:#add8d1}.report-lower{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr);gap:18px;margin:20px 0}.report-card{min-width:0;padding:20px}.report-card-head{margin-bottom:16px}.report-card-head h3{font-size:17px;margin:6px 0 0}.report-card-head>span{font-size:11px;color:#81959d}.report-queue{display:grid;gap:2px}.report-queue button{display:flex;align-items:center;gap:12px;background:transparent;border:0;border-bottom:1px solid #edf2f3;padding:14px 0;color:#4c6975;text-align:left}.report-queue button strong{margin-left:auto;font-size:21px;color:#126e60;font-variant-numeric:tabular-nums}.report-queue button:last-child{border-bottom:0}.report-table-wrap{overflow:auto}.report-table-wrap table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}.report-table-wrap td{font-variant-numeric:tabular-nums}.report-card td,.report-card th{padding:11px 12px}.report-basis{margin:16px 0 0;color:#7c909b;font-size:11px;line-height:1.9}#adminReportError{padding:13px 16px;border-radius:8px;border:1px solid #f2d8cc;background:#fff6f1;color:#9c5034}.report-loading{grid-column:1/-1;padding:24px;text-align:center;color:#6c858d}
@media(min-width:1600px){.workspace{padding-left:42px;padding-right:42px}.report-metrics{gap:18px}}
@media(max-width:1150px){.admin-shell{grid-template-columns:190px minmax(0,1fr)}.workspace{padding:24px}.report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-tabs{grid-template-columns:1fr!important}.report-timezone{margin-left:0}}
@media(max-width:760px){.admin-shell{display:block}.sidebar{position:relative;height:auto;padding:14px}.brand{padding:0 8px 12px}.side-nav{display:flex;flex-direction:row;overflow:auto;gap:12px}.admin-nav-section{display:flex;flex-shrink:0;gap:4px}.admin-nav-section>.admin-group-label{display:none}.side-nav button{width:auto;white-space:nowrap;min-height:36px;padding:8px 10px}.workspace{padding:18px 14px}.topbar{align-items:flex-start}.topbar h1{font-size:22px}.topbar p{max-width:280px}.report-heading{align-items:flex-start}.report-export{flex-direction:column;align-items:flex-end;gap:8px}.report-heading h2{font-size:20px}.report-metrics{gap:10px}.report-metric{padding:15px 13px}.report-metric>strong{font-size:24px}.report-lower{grid-template-columns:1fr}.report-card{padding:15px}.admin-project-tabs{width:100%;flex-wrap:wrap}.report-filter{gap:10px}.report-period-tabs button{padding:8px 12px}}

.report-profit-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.report-profit-metrics .profit-usd{background:#123c45;border-color:#123c45}.report-profit-metrics .profit-trx{background:#22485e;border-color:#22485e}.profit-usd>strong,.profit-trx>strong{color:#fff}.profit-usd>span,.profit-usd p,.profit-usd small,.profit-trx>span,.profit-trx p,.profit-trx small{color:#b9dcd5}.report-trends{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:20px}.report-trends svg{display:block;width:100%;height:auto;min-height:140px}.report-trends svg text{fill:#82949e;font-size:10px}.profit-chart-legend{display:flex;align-items:center;gap:14px;margin-bottom:10px;font-size:11px;color:#637e88}.profit-chart-legend span{display:flex;align-items:center;gap:5px}.profit-chart-legend span:last-child{margin-left:auto}.profit-chart-legend i{width:8px;height:8px;border-radius:50%;display:inline-block}.chart-empty{padding:50px 0;text-align:center;color:#8b9ca4;font-size:12px}
@media(max-width:1150px){.report-profit-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.report-trends{grid-template-columns:1fr}}
@media(max-width:760px){.report-profit-metrics{gap:10px}}

.brand{font-style:normal;margin:0;line-height:1}.side-nav button.active,.side-nav button:hover{color:#09695c;background:#e8f5f0}.admin-report{min-width:0}.report-card table{min-width:0}

.report-profit-metrics .report-metric p{white-space:pre-line;line-height:1.8}.table-panel .select-col{width:42px;min-width:42px}

button.order-number-copy{display:inline-flex;align-items:center;justify-content:flex-start;border:0;background:transparent;padding:3px 0;min-height:28px;color:#336d7b;font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:nowrap;cursor:pointer}button.order-number-copy:hover{color:#08715f;text-decoration:underline;text-underline-offset:3px}
/* 设置页采用整行分组导航，解除旧版窄侧栏网格限制。 */
[data-panel="settings"].active{display:block;min-width:0}
[data-panel="settings"] .settings-tabs{position:static;width:100%;min-width:0;max-width:none;grid-template-columns:repeat(3,minmax(0,1fr));margin:18px 0 24px!important;box-sizing:border-box}
[data-panel="settings"] .admin-settings-section{min-width:0;align-items:flex-start;align-content:flex-start}
[data-panel="settings"] .admin-group-label{white-space:nowrap;word-break:normal;letter-spacing:1px}
[data-panel="settings"] .settings-tabs button{flex:0 0 auto;min-width:0;max-width:100%;padding:8px 11px;white-space:nowrap;text-align:center;height:auto;line-height:1.4}
[data-panel="settings"] .settings-header{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%}
[data-panel="settings"] .settings-grid{width:100%;min-width:0}
@media(max-width:1150px){[data-panel="settings"] .settings-tabs{grid-template-columns:1fr}}

.report-admin-funds{margin-top:20px}.report-fund-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.report-fund-summary>div{display:grid;gap:9px;padding:15px;background:#f6faf9;border-radius:9px}.report-fund-summary span{color:#617984;font-size:12px}.report-fund-summary strong{font-variant-numeric:tabular-nums;font-size:18px}.report-fund-summary small{font-size:10px;color:#7b919a;font-weight:400}#userEditDialog .form-hint{grid-column:1/-1;line-height:1.8;color:#667f89;font-size:12px}.side-nav #supportAdminUnread{margin-left:auto}
@media(max-width:760px){.report-fund-summary{grid-template-columns:1fr}}

.payment-qr-upload{margin-top:12px}.payment-qr-upload button{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:9px 14px;border:1px solid #c9ded9;border-radius:8px;background:#edf7f3;color:#0c6b5e;font-size:13px;font-weight:600;cursor:pointer}.payment-qr-upload [role="status"]{font-size:12px;color:#506873;line-height:1.7}
