Files

888 lines
18 KiB
CSS

/* 账户中心 · 对齐设计稿 billing-page 结构(.billing-*),作用域落在 .account-page */
.account-page {
--klein: #002fa7;
--klein-hover: #002680;
--muted: #6f747c;
--text: #17181a;
--st-muted: #6f747c;
--st-text: #17181a;
--st-line: rgba(34, 42, 54, 0.10);
--st-wash: rgba(34, 42, 54, 0.045);
--st-shadow: 0 8px 20px rgba(20, 27, 38, 0.09);
--shadow-card: 0 8px 20px rgba(20, 27, 38, 0.09);
width: 100%;
max-width: none;
box-sizing: border-box;
margin: -24px -28px -60px;
padding: 52px clamp(40px, 3.2vw, 68px) 54px;
.ac-inner {
width: min(1560px, 100%);
margin: 0 auto;
}
.page-header {
min-height: 76px;
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 30px;
margin-bottom: 34px;
}
.page-heading h1 {
margin: 0 0 10px;
font-size: 32px;
line-height: 1.2;
font-weight: 600;
letter-spacing: -.02em;
color: var(--accent-black, #17181a);
}
.page-heading p {
margin: 7px 0 0;
color: var(--muted);
font-size: 15px;
}
.tag {
display: inline-flex;
align-items: center;
height: 25px;
padding: 0 9px;
border-radius: 7px;
color: #4c5360;
background: rgba(34, 42, 54, 0.08);
font-size: 11px;
}
.data-panel {
border: 1px solid rgba(34, 42, 54, 0.10);
border-radius: 14px;
background: rgba(34, 42, 54, 0.045);
box-shadow: var(--shadow-card);
}
.panel-head {
min-height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
padding: 0 20px;
border-bottom: 1px solid rgba(34, 42, 54, 0.08);
}
.panel-head h2 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: var(--text);
}
.panel-head > div:first-child {
display: grid;
gap: 4px;
}
/* === 设计稿 HTML 原样: stage / usage-line(高度 5px) === */
.stage-list {
padding: 15px 20px 20px;
}
.stage-usage {
display: grid;
grid-template-columns: 150px 1fr 86px;
align-items: center;
gap: 14px;
min-height: 48px;
}
.billing-usage-line {
display: block;
padding: 0;
margin: 0;
font-size: 0;
line-height: 0;
height: 5px;
overflow: hidden;
border-radius: 99px;
background: #dfe2e7;
}
.billing-usage-line .usage-fill {
display: block;
height: 100%;
border-radius: inherit;
background: #002fa7;
}
.compact-action {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 9px;
border-radius: 11px;
cursor: pointer;
border: 1px solid rgba(28, 34, 43, 0.12);
background: rgba(34, 42, 54, 0.05);
color: var(--text);
transition: transform 180ms ease, background-color 180ms ease;
}
.compact-action:hover {
background: rgba(34, 42, 54, 0.10);
}
.billing-overview {
display: grid;
grid-template-columns: minmax(280px, 0.82fr) minmax(390px, 1.22fr) minmax(300px, 0.96fr);
gap: 18px;
align-items: stretch;
width: calc(100% + 12px);
margin-left: -6px;
}
.billing-account-card {
position: relative;
min-height: 286px;
display: flex;
flex-direction: column;
padding: 22px;
overflow: visible;
border-radius: 14px;
color: #fff;
background:
radial-gradient(circle at 88% 9%, rgba(49, 102, 255, 0.34), transparent 31%),
linear-gradient(145deg, #18191c 0%, #22252b 100%);
box-shadow: 0 14px 30px rgba(16, 16, 18, 0.16);
}
.billing-card-kicker,
.billing-card-actions,
.billing-threshold-row,
.billing-month-control {
display: flex;
align-items: center;
}
.billing-card-kicker {
justify-content: space-between;
gap: 12px;
color: rgba(255, 255, 255, 0.62);
font-size: 13px;
}
.billing-card-kicker span:first-child {
color: #fff;
font-weight: 650;
}
.billing-balance-number {
display: block;
margin-top: 14px;
font-size: 34px;
line-height: 1.08;
letter-spacing: -0.02em;
font-weight: 650;
font-variant-numeric: tabular-nums;
}
.billing-balance-number small {
margin-left: 5px;
color: rgba(255, 255, 255, 0.62);
font-size: 13px;
font-weight: 500;
}
.billing-month-control {
justify-content: space-between;
gap: 12px;
margin-top: 22px;
padding: 14px 0;
border-top: 1px solid rgba(255, 255, 255, 0.12);
border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.billing-month-copy span,
.billing-month-copy strong {
display: block;
}
.billing-month-copy span {
color: rgba(255, 255, 255, 0.56);
font-size: 12px;
}
.billing-month-copy strong {
margin-top: 5px;
font-size: 19px;
font-weight: 650;
font-variant-numeric: tabular-nums;
}
.billing-month-picker {
position: relative;
width: 142px;
display: block;
flex: 0 0 auto;
}
.billing-month-picker .rs-select,
.billing-month-picker .rs-select-btn {
width: 100%;
}
.billing-month-picker .rs-select-btn {
height: 36px;
padding: 0 10px 0 12px;
border-color: rgba(255, 255, 255, 0.2) !important;
border-radius: 9px;
color: #fff !important;
background: #2a2d33 !important;
font-size: 12px;
font-weight: 600;
}
.billing-month-picker .rs-select-btn:hover,
.billing-month-picker .rs-select.open .rs-select-btn {
border-color: rgba(138, 171, 255, 0.72) !important;
color: #fff !important;
background: #323743 !important;
}
.billing-threshold-row {
justify-content: space-between;
gap: 12px;
margin-top: 14px;
color: rgba(255, 255, 255, 0.66);
font-size: 12px;
}
.billing-threshold-row label {
display: flex;
align-items: center;
gap: 7px;
}
.billing-threshold-row svg {
width: 15px;
height: 15px;
color: #8aabff;
}
.billing-threshold-input {
height: 34px;
display: flex;
align-items: center;
gap: 6px;
padding: 0 9px;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 8px;
color: rgba(255, 255, 255, 0.66);
background: rgba(255, 255, 255, 0.07);
transition: border-color .18s ease, background .18s ease;
}
.billing-threshold-input:focus-within {
border-color: rgba(138, 171, 255, 0.72);
background: rgba(86, 126, 226, 0.14);
}
.billing-threshold-input input {
width: 72px;
padding: 0;
border: 0;
outline: 0;
color: #fff;
background: transparent;
text-align: right;
font-size: 12px;
font-variant-numeric: tabular-nums;
}
.billing-threshold-input input::-webkit-outer-spin-button,
.billing-threshold-input input::-webkit-inner-spin-button {
margin: 0;
appearance: none;
}
.billing-card-actions {
justify-content: space-between;
gap: 10px;
margin-top: auto;
padding-top: 16px;
}
.billing-balance-state {
display: inline-flex;
align-items: center;
gap: 6px;
color: #b7c9ff;
font-size: 12px;
}
.billing-balance-state::before {
content: '';
width: 6px;
height: 6px;
border-radius: 50%;
background: #74a0ff;
box-shadow: 0 0 0 4px rgba(116, 160, 255, 0.12);
}
.billing-balance-state.is-low {
color: #ffc9a8;
}
.billing-balance-state.is-low::before {
background: #ff8a4c;
box-shadow: 0 0 0 4px rgba(255, 138, 76, 0.14);
}
.billing-contact-trigger {
min-width: 112px;
height: 36px;
padding: 0 22px;
border: 0;
border-radius: 9px;
color: #0b1d4c;
background: #fff;
font-weight: 650;
cursor: pointer;
transition: color .18s ease, background .18s ease, transform .18s ease;
}
.billing-contact-trigger:hover {
color: var(--klein);
background: #eef4ff;
transform: translateY(-1px);
}
.billing-chart-panel,
.billing-distribution {
position: relative;
min-height: 286px;
display: grid;
grid-template-rows: auto 1fr;
overflow: hidden;
}
.billing-distribution {
/* 有数据的任务类型可能多达十余项,允许卡片变高,列表可滚动,避免裁切 */
overflow: visible;
min-height: 286px;
height: auto;
align-content: start;
}
.billing-chart-panel .panel-head,
.billing-distribution .panel-head {
width: 100%;
align-items: center;
padding-top: 18px;
padding-bottom: 15px;
border-bottom: 0;
}
.billing-panel-meta {
color: var(--muted);
font-size: 12px;
}
.billing-chart-summary {
display: flex;
align-items: center;
gap: 8px;
}
.billing-trend-positive {
color: var(--klein);
font-size: 11px;
font-weight: 650;
white-space: nowrap;
}
.billing-trend-negative {
color: #c2410c;
font-size: 11px;
font-weight: 650;
white-space: nowrap;
}
.billing-seven-day-chart {
position: relative;
height: 208px;
display: grid;
grid-template-columns: repeat(7, minmax(32px, 1fr));
align-items: end;
justify-content: center;
gap: 12px;
padding: 18px 22px 16px;
border-top: 1px solid rgba(34, 42, 54, 0.065);
background: linear-gradient(180deg, rgba(0, 47, 167, 0.018), transparent 48%);
}
.billing-seven-day-chart::after {
content: '';
position: absolute;
left: 22px;
right: 22px;
bottom: 37px;
height: 1px;
background: rgba(34, 42, 54, 0.16);
}
.billing-chart-empty,
.billing-dist-empty {
grid-column: 1 / -1;
display: grid;
place-items: center;
color: var(--muted);
font-size: 13px;
min-height: 140px;
}
.billing-day-bar {
position: relative;
z-index: 1;
height: 100%;
display: grid;
grid-template-rows: 22px minmax(92px, 1fr) 22px;
align-items: end;
justify-items: center;
min-width: 0;
}
.billing-day-value {
color: #232936;
font-size: 11px;
font-weight: 650;
font-variant-numeric: tabular-nums;
}
.billing-day-track {
width: 22px;
height: 100%;
display: flex;
align-items: flex-end;
overflow: hidden;
border-radius: 7px 7px 3px 3px;
background: rgba(0, 47, 167, 0.055);
}
.billing-day-track span {
width: 100%;
min-height: 8px;
border-radius: inherit;
background: linear-gradient(180deg, #416fe4 0%, var(--klein) 100%);
transition: height .45s cubic-bezier(.2, .75, .25, 1);
}
.billing-day-label {
color: var(--muted);
font-size: 11px;
white-space: nowrap;
}
.billing-distribution .panel-head {
padding-bottom: 11px;
}
/* === 设计稿 .billing-distribution 内 stage 覆盖(原样) === */
.billing-distribution .stage-list {
display: grid;
grid-template-columns: 1fr;
align-content: center;
row-gap: 2px;
width: 100%;
padding: 4px 20px 13px;
max-height: min(480px, 58vh);
overflow-y: auto;
scrollbar-width: thin;
}
.billing-distribution .stage-usage {
display: grid;
grid-template-columns: 88px minmax(72px, 1fr) 64px;
align-items: center;
min-height: 34px;
gap: 9px;
font-size: 12px;
}
.billing-distribution .stage-usage > span:first-child {
color: var(--text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.billing-distribution .stage-usage strong {
justify-self: end;
font-variant-numeric: tabular-nums;
font-weight: 650;
}
.billing-ledger {
width: calc(100% + 12px);
margin-top: 20px;
margin-left: -6px;
overflow: visible;
}
.billing-ledger .panel-head {
padding-top: 12px;
padding-bottom: 12px;
align-items: center;
}
.billing-ledger-toolbar {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
justify-content: flex-end;
}
.billing-ledger-toolbar .billing-ledger-filter,
.billing-ledger-toolbar .rs-select {
width: 136px;
flex: 0 0 136px;
}
.billing-ledger-toolbar .rs-select-btn {
height: 38px;
padding: 0 11px;
border-radius: 9px;
font-size: 12px;
}
.billing-ledger-export {
width: 136px;
height: 38px;
justify-content: center !important;
border-color: var(--klein) !important;
color: #fff !important;
background: var(--klein) !important;
font-size: 11px;
font-weight: 650;
}
.billing-ledger-export:hover {
border-color: var(--klein-hover) !important;
background: var(--klein-hover) !important;
}
.billing-ledger-export svg {
width: 15px;
height: 15px;
}
.billing-ledger-list {
display: grid;
}
.billing-ledger-row {
display: grid;
grid-template-columns: 162px minmax(320px, 1fr) 150px 118px;
align-items: center;
gap: 18px;
min-height: 74px;
padding: 12px 20px;
border-top: 1px solid rgba(34, 42, 54, 0.075);
background: rgba(255, 255, 255, 0.5);
}
.billing-ledger-row:hover {
background: rgba(0, 47, 167, 0.035);
}
.billing-ledger-row.header {
min-height: 42px;
padding-top: 8px;
padding-bottom: 8px;
color: var(--muted);
font-size: 11px;
background: rgba(34, 42, 54, 0.025);
}
.billing-ledger-feature {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.billing-ledger-icon {
width: 34px;
height: 34px;
display: grid;
place-items: center;
flex: 0 0 auto;
border-radius: 9px;
color: var(--klein);
background: rgba(0, 47, 167, 0.08);
}
.billing-ledger-icon svg {
width: 17px;
height: 17px;
}
.billing-ledger-copy,
.billing-ledger-meta {
min-width: 0;
}
.billing-ledger-copy strong,
.billing-ledger-copy span,
.billing-ledger-meta strong,
.billing-ledger-meta span {
display: block;
}
.billing-ledger-copy strong,
.billing-ledger-meta strong {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
}
.billing-ledger-copy span,
.billing-ledger-meta span {
margin-top: 5px;
color: var(--muted);
font-size: 11px;
}
.billing-ledger-cost {
justify-self: end;
color: #111827;
font-size: 15px;
font-variant-numeric: tabular-nums;
}
.billing-ledger-cost.is-credit {
color: #138d3f;
}
.billing-ledger-empty {
min-height: 210px;
display: grid;
place-items: center;
align-content: center;
gap: 8px;
border-top: 1px solid rgba(34, 42, 54, 0.075);
color: var(--muted);
text-align: center;
}
.billing-ledger-empty svg {
width: 28px;
height: 28px;
color: rgba(0, 47, 167, 0.42);
}
.billing-ledger-empty strong {
color: var(--text);
font-size: 14px;
}
.billing-ledger-empty span {
font-size: 12px;
}
.bill-pager {
display: flex;
align-items: center;
gap: 14px;
flex-wrap: wrap;
padding: 14px 20px 18px;
border-top: 1px solid rgba(34, 42, 54, 0.075);
}
.bill-pager .total {
color: var(--muted);
font-size: 12px;
}
.bill-pager .pages {
display: flex;
align-items: center;
gap: 6px;
}
.bill-pager .pages button {
min-width: 32px;
height: 32px;
padding: 0 8px;
border: 1px solid rgba(34, 42, 54, 0.12);
border-radius: 8px;
background: #fff;
color: var(--text);
font-size: 12px;
cursor: pointer;
}
.bill-pager .pages button.active {
border-color: var(--klein);
color: #fff;
background: var(--klein);
}
.bill-pager .pages button:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.bill-pager .ellipsis {
color: var(--muted);
padding: 0 2px;
}
.bill-jump {
display: inline-flex;
align-items: center;
gap: 6px;
margin-left: auto;
color: var(--muted);
font-size: 12px;
}
.bill-jump input {
width: 56px;
height: 32px;
padding: 0 8px;
border: 1px solid rgba(34, 42, 54, 0.12);
border-radius: 8px;
text-align: center;
}
.bill-jump button {
height: 32px;
padding: 0 12px;
border: 1px solid rgba(34, 42, 54, 0.12);
border-radius: 8px;
background: #fff;
cursor: pointer;
}
.bill-jump button:disabled {
opacity: 0.4;
cursor: not-allowed;
}
@media (max-width: 1200px) {
.billing-overview {
grid-template-columns: 1fr;
}
.billing-ledger-row {
grid-template-columns: 140px minmax(200px, 1fr) 120px 90px;
}
}
@media (max-width: 860px) {
.billing-ledger-row {
grid-template-columns: 1fr;
gap: 8px;
padding: 14px 16px;
}
.billing-ledger-row.header { display: none; }
.billing-ledger-cost { justify-self: start; }
.billing-ledger-toolbar { width: 100%; }
}
}
/* 充值弹窗(portal 到 body) */
.billing-contact-backdrop {
position: fixed;
inset: 0;
z-index: 900;
display: grid;
place-items: center;
padding: 24px;
opacity: 0;
visibility: hidden;
background: rgba(15, 18, 24, 0.28);
backdrop-filter: blur(5px);
transition: opacity .2s ease, visibility .2s ease;
}
.billing-contact-backdrop.active {
opacity: 1;
visibility: visible;
}
.billing-contact-dialog {
width: min(420px, 100%);
padding: 24px;
border: 1px solid rgba(34, 42, 54, 0.11);
border-radius: 16px;
background: #fff;
box-shadow: 0 24px 70px rgba(18, 25, 38, 0.18);
transform: translateY(10px) scale(.985);
transition: transform .2s ease;
}
.billing-contact-backdrop.active .billing-contact-dialog {
transform: translateY(0) scale(1);
}
.billing-contact-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
}
.billing-contact-head h2 {
margin: 0;
font-size: 20px;
}
.billing-contact-head p {
margin: 7px 0 0;
color: #6f747c;
font-size: 13px;
line-height: 1.6;
}
.billing-contact-close {
width: 34px;
height: 34px;
display: grid;
place-items: center;
flex: 0 0 auto;
border: 1px solid rgba(34, 42, 54, 0.1);
border-radius: 9px;
color: #20242c;
background: #fff;
cursor: pointer;
}
.billing-contact-close:hover {
color: #002fa7;
background: #eef4ff;
}
.billing-contact-card {
display: grid;
gap: 11px;
margin-top: 20px;
padding: 16px;
border: 1px solid rgba(0, 47, 167, 0.12);
border-radius: 12px;
background: rgba(0, 47, 167, 0.045);
}
.billing-contact-line {
display: grid;
grid-template-columns: 92px 1fr;
gap: 12px;
font-size: 13px;
}
.billing-contact-line span {
color: #6f747c;
}
.billing-contact-line strong {
color: #161a22;
font-weight: 650;
}
/* 月份下拉选中态:门户菜单在 body,用全局覆盖热区里误显成黑色的选中项 */
body .rs-select-menu-portal .rs-select-option.selected {
background: rgba(0, 47, 167, 0.08) !important;
color: #002fa7 !important;
font-weight: 600 !important;
}
body .rs-select-menu-portal .rs-select-option.selected .rs-select-option-label {
color: #002fa7 !important;
}
.billing-month-picker .rs-select-btn .rs-select-label {
color: #fff !important;
}
.billing-month-picker .rs-select-btn svg {
color: rgba(255, 255, 255, 0.72);
}