
/* --- responsive polish pass 2026-09-19 --- */
:root{--safe-card-radius:14px}
html{scroll-behavior:smooth}
.page-body{width:100%;box-sizing:border-box}
.full-ledger-view,.full-routing-view,.full-providers-view,.reserve-view{min-width:0}
.ledger-table-card,.rate-board,.company-dashboard,.reserve-pool-card,.consumer-api-panel,.settlement-section,.shared-usage-guide,.node-console{max-width:100%;overflow:hidden}
.ledger-table,.rate-table,.company-pool-table,.reserve-pool-table,.receipt-list,.api-example{overflow:auto;-webkit-overflow-scrolling:touch}
.ledger-table-row,.receipt-row{min-width:760px}
.rate-row{min-width:980px}
.company-pool-row,.reserve-pool-row{min-width:720px}
.api-example code{display:block;min-width:max-content}
.model-grid,.reserve-rule-grid,.company-stats,.reserve-health-summary,.ledger-summary,.plan-catalog,.providers-grid{min-width:0}
.model-grid>*,.reserve-rule-grid>*,.company-stats>*,.reserve-health-summary>*,.ledger-summary>*,.plan-card,.provider-card{min-width:0}
.model-card strong,.plan-card strong,.provider-card strong,.route-model-copy strong,.workspace-copy strong,.user-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--bg) 86%,transparent);backdrop-filter:blur(16px)}
.user-account-trigger{width:100%;border:0;background:transparent;color:inherit;text-align:left;border-radius:10px;padding:6px}
.user-account-trigger:hover{background:rgba(217,248,110,.07)}
.user-avatar,.profile-avatar-edit,#profile-avatar-preview{background:var(--avatar-bg,#314238);background-image:linear-gradient(135deg,var(--avatar-bg,#314238),color-mix(in srgb,var(--avatar-bg,#314238) 62%,#ffffff 38%));color:#fff}
.user-avatar.has-image,#profile-avatar-preview.has-image{background-size:cover;background-position:center;color:transparent}
.profile-backdrop{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:20px;background:rgba(4,8,6,.62);backdrop-filter:blur(18px)}
.profile-backdrop[hidden]{display:none}
.profile-card{position:relative;width:min(560px,100%);max-height:min(720px,calc(100dvh - 34px));overflow:auto;border:1px solid rgba(217,248,110,.2);border-radius:18px;background:linear-gradient(135deg,var(--surface),var(--surface-2));box-shadow:0 30px 90px rgba(0,0,0,.34)}
.profile-hero{display:flex;gap:16px;align-items:center;padding:26px 26px 18px;border-bottom:1px solid var(--line)}
.profile-hero h2{margin:5px 0 4px;font-family:var(--serif);font-size:34px;font-weight:400;letter-spacing:-.045em}
.profile-hero p:last-child{margin:0;color:var(--muted);font:10px var(--mono);overflow-wrap:anywhere}
.profile-avatar-edit{position:relative;display:grid;place-items:center;width:82px;height:82px;flex:none;border:1px solid rgba(217,248,110,.25);border-radius:24px;overflow:hidden;box-shadow:inset 0 1px 0 rgba(255,255,255,.14)}
.profile-avatar-edit span{display:grid;place-items:center;width:100%;height:100%;font:700 26px var(--mono)}
.profile-avatar-edit svg{position:absolute;right:7px;bottom:7px;width:24px;height:24px;padding:5px;border-radius:999px;background:var(--lime);color:#172019}
.profile-form{display:grid;grid-template-columns:1fr 1fr;gap:13px;padding:22px 26px 26px}
.profile-form label{display:flex;flex-direction:column;gap:8px;color:var(--muted);font-size:10px;font-weight:700}
.profile-form input{min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--input-bg);color:var(--ink);padding:10px 12px;outline:none}
.profile-form input:disabled{opacity:.72}
.profile-form label:first-of-type,.profile-color-row,.profile-error,.profile-form button{grid-column:1/-1}
.profile-color-row{display:flex;flex-wrap:wrap;gap:9px;margin:2px 0 4px}
.profile-color-row button{width:32px;height:32px;border:2px solid transparent;border-radius:999px;background:var(--swatch);box-shadow:inset 0 1px 0 rgba(255,255,255,.35);cursor:pointer}
.profile-color-row button.active{border-color:var(--lime);box-shadow:0 0 0 3px rgba(217,248,110,.14)}
.profile-error{margin:0;padding:10px 12px;border:1px solid rgba(244,165,106,.4);border-radius:10px;background:rgba(244,165,106,.08);color:var(--orange);font-size:11px}
.profile-logout-button{grid-column:1/-1;border-color:rgba(244,165,106,.36);color:#f1b38a}
.profile-logout-button:hover{border-color:rgba(244,165,106,.65);background:rgba(244,165,106,.08)}
.workspace-switcher{display:none!important}
html[data-theme="light"] .profile-backdrop{background:rgba(235,238,230,.72)}
html[data-theme="light"] .profile-card{background:linear-gradient(135deg,#fff,#f3f6ec)}
@media(max-width:1180px){.page-body{padding:32px 28px 48px}.hero-grid{grid-template-columns:1fr}.providers-layout{grid-template-columns:1fr}.company-dashboard{grid-template-columns:1fr}.rate-catalog-toolbar,.ledger-toolbar,.plan-catalog-head{align-items:flex-start;flex-direction:column}.plan-catalog-head p{text-align:left}}
@media(min-width:921px){.sidebar{gap:0}.brand-block{padding-bottom:18px}.sidebar-footer{order:1;margin:0 0 14px;padding:12px 10px;border:1px solid rgba(217,248,110,.14);border-radius:12px;background:linear-gradient(135deg,rgba(217,248,110,.07),rgba(141,196,239,.035));box-shadow:0 12px 34px rgba(0,0,0,.12)}.workspace-switcher{order:2;margin-bottom:12px}.sidebar>.nav-group:not(.nav-group-bottom){order:3}.nav-group-bottom{order:4;margin-top:12px;margin-bottom:0;padding-top:12px;border-top:1px solid var(--line)}.sidebar-footer .security-chip{margin-bottom:10px}.sidebar-footer .user-row{padding:8px;border-radius:10px;background:rgba(255,255,255,.025)}.topbar{display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:22px;height:64px;padding:0 28px}.breadcrumb{min-width:0}.breadcrumb strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar-actions{min-width:0;justify-content:flex-end;gap:8px;padding:6px;border:1px solid rgba(255,255,255,.06);border-radius:16px;background:rgba(255,255,255,.025)}.live-indicator{height:32px;padding:0 10px;border-right:1px solid var(--line);white-space:nowrap}.topbar .icon-button,.theme-toggle,.language-picker,.topbar-acu,.auth-topbar-button,.topbar .button{height:34px;min-height:34px}.language-picker{max-width:124px;padding:0 8px}.language-picker select{max-width:86px}.topbar-acu{max-width:158px;min-width:0;padding:6px 9px;gap:6px}.topbar-acu strong{display:block;max-width:84px;overflow:hidden;text-overflow:ellipsis}.auth-topbar-button{max-width:108px;overflow:hidden}.auth-topbar-button span{overflow:hidden;text-overflow:ellipsis}.topbar .button-dark[data-view-target=providers]{max-width:132px;overflow:hidden}.topbar .button-dark[data-view-target=providers] span{overflow:hidden;text-overflow:ellipsis}}@media(min-width:921px) and (max-width:1220px){.topbar{grid-template-columns:minmax(160px,1fr) auto;padding:0 18px}.topbar-actions{gap:6px}.live-indicator span,.topbar .icon-button{display:none}.language-picker{max-width:104px}.language-picker select{max-width:70px}.topbar-acu{max-width:126px}.topbar-acu span{display:none}.topbar-acu strong{max-width:104px}.auth-topbar-button{max-width:88px}.topbar .button-dark[data-view-target=providers]{max-width:106px}}.ledger-table{display:block;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:thin}.ledger-table::-webkit-scrollbar{height:9px}.ledger-table::-webkit-scrollbar-thumb{background:#334139;border-radius:999px}.ledger-table::-webkit-scrollbar-track{background:#151c18}.ledger-table-row{width:max-content;min-width:860px;grid-template-columns:160px 120px 190px 170px 150px 150px!important}.ledger-table-head{display:grid!important;position:sticky;top:0;z-index:2}.ledger-table-row>span{display:block!important}.ledger-table-card{position:relative}.ledger-table-card:after{content:"左右滑动查看更多账目";position:absolute;right:14px;bottom:10px;padding:4px 8px;border:1px solid rgba(217,248,110,.18);border-radius:999px;background:rgba(18,24,20,.86);color:#8fa08f;font:9px var(--mono);pointer-events:none}.ledger-table-empty{min-width:100%}@media(max-width:920px){.app-shell{display:block}.sidebar{position:sticky;top:0;z-index:40;width:100%;min-height:0;padding:14px 14px 10px;border-right:0;border-bottom:1px solid var(--line)}.brand-block{padding:0 4px 12px}.workspace-switcher,.sidebar-footer .security-chip,.nav-label,.nav-item kbd{display:none}.nav-group{display:flex;flex-direction:row;gap:6px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.nav-group::-webkit-scrollbar{display:none}.nav-group-bottom{margin:6px 0 0}.nav-item{width:auto;flex:0 0 auto;padding:9px 10px}.nav-item span{white-space:nowrap}.sidebar-footer{padding:8px 4px 0;border-top:0}.user-row{max-width:260px}.topbar{height:auto;min-height:58px;padding:10px 16px}.breadcrumb{display:none}.topbar-actions{width:100%;justify-content:flex-end;gap:8px}.live-indicator{display:none}.page-body{padding:28px 16px 42px}.intro-row{align-items:flex-start;flex-direction:column}.intro-actions{flex-wrap:wrap}.ledger-table-row,.receipt-row{min-width:680px}.ledger-table-row:not(.ledger-table-head){display:grid!important}.rate-row{min-width:860px}.acu-account-card{grid-template-columns:1fr}.acu-account-card>p,.acu-account-tags{grid-column:1}.reserve-health-summary,.ledger-summary.four,.company-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){body{font-size:13px}.topbar-actions{gap:6px}.language-picker select{max-width:104px}.auth-topbar-button span{display:none}.button{padding:10px 12px}.page-body{padding:22px 12px 36px}.intro-row h1{font-size:40px}.balance-value{font-size:52px}.reserve-health-summary,.ledger-summary.four,.capacity-snapshot{grid-template-columns:1fr 1fr}.model-grid,.providers-grid,.reserve-rule-grid,.plan-catalog{grid-template-columns:1fr}.ledger-table-card,.rate-board,.transfer-panel,.acu-account-card,.consumer-api-panel,.provider-form,.profile-card{border-radius:14px}.profile-hero{align-items:flex-start;flex-direction:column;padding:22px 20px 16px}.profile-form{grid-template-columns:1fr;padding:18px 20px 22px}.profile-avatar-edit{width:76px;height:76px;border-radius:22px}.ledger-table-row,.receipt-row{min-width:620px}.rate-row{min-width:780px}.company-pool-row,.reserve-pool-row{min-width:620px}}

/* Make the audit ledger panel scroll inside the card instead of stretching the whole page. */
.ledger-table{
  max-height:460px;
  overflow:auto!important;
  -webkit-overflow-scrolling:touch;
}
.ledger-table::-webkit-scrollbar{
  width:9px;
  height:9px;
}
.ledger-table-head{
  position:sticky;
  top:0;
  z-index:3;
}
.ledger-table-card:after{
  content:"上下 / 左右滑动查看更多账目";
}
@media(max-width:920px){
  .ledger-table{max-height:420px}
}

/* Keep the verified receipt history within its own scrollable panel. */
.receipt-list{
  max-height:460px;
  overflow:auto!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}
.receipt-list::-webkit-scrollbar{width:9px;height:9px}
.receipt-head{position:sticky;top:0;z-index:2}
@media(max-width:920px){
  .receipt-list{max-height:420px}
}
