/* 工作台布局和共享交互。页面内业务组件各自维护局部布局。 */
.dash-shell {
  --dash-sidebar-width: 232px;
  --dash-surface: #101a28;
  --dash-muted: #9dadc4;
  --dash-border: #26364b;
  --dash-fill: #131f30;
  display: grid;
  grid-template-columns: var(--dash-sidebar-width) minmax(0, 1fr);
  min-height: 100dvh;
  background: radial-gradient(ellipse at 85% -16%, #162b41 0%, transparent 48%), #090f19;
}
.dash-shell :is(input, select) { color-scheme: dark; }
.dash-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dash-sidebar {
  position: sticky; top: 0; height: 100dvh; z-index: 4; min-width: 0;
  display: flex; flex-direction: column; padding: 22px 12px 15px; overflow: auto;
  border-right: 1px solid #243144; background: linear-gradient(171deg, #121d2b, #0b1421 60%);
}
.dash-brand { display: flex; align-items: center; gap: 11px; padding: 2px 11px 24px; letter-spacing: -.02em; font-weight: 760; font-size: 1.19rem; line-height: 1.15; }
.dash-brand img { width: 37px; height: 37px; flex: none; }
.dash-brand small { display: block; margin-top: 6px; color: var(--dash-muted); letter-spacing: .045em; font-size: .68rem; font-weight: 550; }
.dash-nav { display: grid; gap: 4px; }
.dash-nav-label { margin: 20px 0 6px; padding-inline: 12px; font-size: .72rem; color: #91a3bc; letter-spacing: .022em; font-weight: 650; }
.dash-nav-link {
  position: relative; display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 7px 10px; border: 1px solid transparent;
  font-size: .86rem; font-weight: 620; line-height: 1.18; color: #b6c5d8; border-radius: 9px;
  transition: background .2s, color .2s, border-color .2s;
}
.dash-nav-icon { display: grid; place-items: center; width: 26px; height: 26px; flex: none; color: #a0b4cd; font-weight: 670; font-size: 1.15rem; }
.dash-nav-icon img { width: 25px; height: 25px; object-fit: contain; }
.dash-nav-link:hover { color: var(--ink); background: #18263a; }
.dash-nav-link.is-current { color: #beffeb; border-color: #2e645f; background: linear-gradient(90deg, #16403f, #152a31); }
.dash-nav-link.is-current::before { position: absolute; content: ''; left: -13px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); box-shadow: 0 0 10px #75efca65; }
.dash-nav-link.is-current .dash-nav-icon { color: var(--cyan); }
.dash-site-link { margin-top: auto; }
.dash-frame { min-width: 0; }
.dash-topbar {
  min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px clamp(16px, 2.5vw, 36px);
  background: #0e1724ee; border-bottom: 1px solid #253245; position: sticky; top: 0; z-index: 3; backdrop-filter: blur(16px);
}
.dash-topbar-path, .dash-topbar-tools { display: flex; align-items: center; gap: clamp(7px, 1vw, 14px); min-width: 0; }
.dash-topbar-path { font-size: .82rem; color: var(--dash-muted); }
.dash-topbar-path a { white-space: nowrap; }
.dash-topbar-path a:hover { color: var(--cyan); }
.dash-topbar-path strong { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 690; }
.dash-wallet { display: flex; align-items: center; gap: 7px; flex: none; padding: 7px 8px 7px 10px; border: 1px solid #2a4253; border-radius: 8px; background: #122632; color: #b9cce0; font-size: .77rem; transition: border-color .2s, box-shadow .2s; }
.dash-wallet:hover { border-color: #67bfa9; box-shadow: 0 0 15px #75efca16; }
.dash-wallet strong { color: #e9fcf5; font-variant-numeric: tabular-nums; }
.dash-wallet b { padding-inline: 1px; color: var(--cyan); font-size: .94rem; }
.dash-user { position: relative; min-width: 0; }
.dash-user summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 7px; padding: 4px; border-radius: 8px; }
.dash-user summary::-webkit-details-marker { display: none; }
.dash-user summary:hover { background: #203047; }
.dash-avatar { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(145deg, #4fa3a2, #194b59); border: 1px solid #68b5ae; color: #fff; font-weight: 760; }
.dash-user-name { overflow: hidden; max-width: 165px; white-space: nowrap; text-overflow: ellipsis; font-size: .78rem; }
.dash-user summary i { color: var(--dash-muted); font-style: normal; }
.dash-user-popover { position: absolute; top: calc(100% + 10px); right: 0; min-width: 185px; max-width: min(300px, 78vw); z-index: 2; background: #132033; border: 1px solid #364c63; padding: 8px; border-radius: 11px; box-shadow: 0 15px 35px #0008; }
.dash-user-popover span { display: block; overflow-wrap: anywhere; padding: 8px; color: var(--dash-muted); font-size: .77rem; border-bottom: 1px solid var(--dash-border); }
.dash-user-popover :is(a, button) { display: block; width: 100%; border: 0; background: transparent; color: var(--ink); padding: 10px 8px; text-align: left; border-radius: 6px; font-size: .85rem; }
.dash-user-popover :is(a, button):hover { background: #223449; }
.dash-scrim, .dash-button.dash-menu-button { display: none; }
.dash-main { display: grid; gap: clamp(15px, 1.85vw, 26px); align-content: start; padding: clamp(19px, 2.7vw, 39px); width: min(100%, 1700px); margin-inline: auto; }
.dash-main > * { min-width: 0; }
.dash-card { min-width: 0; border: 1px solid var(--dash-border); border-radius: 15px; background: linear-gradient(148deg, #142033, #101a28 68%); box-shadow: 0 8px 22px #02060c22; }
.dash-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dash-card-heading h2 { font-size: 1.05rem; line-height: 1.35; letter-spacing: -.02em; }
.dash-card-heading p, .dash-overview-heading p { color: var(--dash-muted); line-height: 1.55; margin-top: 5px; }
.dash-card-heading p { font-size: .81rem; }
.dash-section-title, .dash-overview-heading h1 { font-size: clamp(1.65rem, 2.8vw, 2.5rem); letter-spacing: -.035em; line-height: 1.13; }
.dash-overview-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.dash-overview-heading p { font-size: .88rem; }
.dash-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; min-height: 38px; border-radius: 8px; line-height: 1.25;
  border: 1px solid #38506a; color: var(--ink); background: #18283b; padding: 7px 12px; font-size: .82rem; font-weight: 670;
  transition: border-color .2s, transform .16s ease, color .2s, background .2s, box-shadow .2s;
}
.dash-button:hover { border-color: #72b7bb; background: #20364d; box-shadow: 0 4px 17px #01101867; }
.dash-button:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.dash-button.is-primary { color: #031b19; background: linear-gradient(120deg, #8af6d8, #63dcbc); border-color: #8bf6d7; box-shadow: 0 3px 15px #75efca24; }
.dash-button.is-primary:hover { color: #051914; background: #a1fbe4; box-shadow: 0 6px 22px #75efca39; }
.dash-button:disabled { opacity: .5; cursor: default; box-shadow: none; }
.dash-lang { min-height: 33px; padding: 5px 9px; background: #152135; white-space: nowrap; }
.dash-demo-strip { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #2c4a55; background: #122633; border-radius: 9px; font-size: .78rem; color: #b8cdd8; }
.dash-demo-strip strong { color: #c8f3e9; white-space: nowrap; }
.dash-demo-led { width: 7px; height: 7px; border-radius: 50%; background: #75efca; box-shadow: 0 0 12px #75efca77; flex: none; }
.dash-demo-strip .dash-text-link { margin-left: auto; }
.dash-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.3vw, 20px); }
.dash-product-summary { --product-tint: #75efca; position: relative; isolation: isolate; overflow: hidden; padding: clamp(13px, 1.55vw, 21px); display: flex; flex-direction: column; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.dash-product-summary[data-summary-product='mobile'] { --product-tint: #f0ba83; }
.dash-product-summary[data-summary-product='static'] { --product-tint: #b7a4ff; }
.dash-product-summary[data-summary-product='datacenter'] { --product-tint: #8ac7ff; }
.dash-product-summary::before { position: absolute; inset: 0; content: ''; pointer-events: none; background: radial-gradient(circle at var(--hover-x, 18%) var(--hover-y, 16%), color-mix(in srgb, var(--product-tint) 18%, transparent), transparent 67%); z-index: -1; opacity: .69; transition: opacity .2s; }
.dash-product-summary:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--product-tint) 55%, var(--dash-border)); box-shadow: 0 10px 28px #02080d77; }
.dash-product-summary:hover::before { opacity: 1; }
.dash-product-summary:active { transform: translateY(-1px) scale(.99); }
.dash-product-summary-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.dash-product-orb { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--product-tint) 38%, #2b4258); background: color-mix(in srgb, var(--product-tint) 11%, #162335); }
.dash-product-orb img { width: 39px; height: 39px; object-fit: contain; transition: transform .25s ease; }
.dash-product-summary:hover .dash-product-orb img { transform: scale(1.11) rotate(-4deg); }
.dash-state { display: inline-flex; white-space: nowrap; align-items: center; gap: 5px; color: #a7b6cb; font-size: .71rem; font-weight: 670; }
.dash-state i { width: 6px; height: 6px; border-radius: 50%; background: #7d91ab; }
.dash-state.is-active { color: #b4f4e1; }
.dash-state.is-active i { background: #75efca; box-shadow: 0 0 8px #75efca53; }
.dash-summary-name { margin-top: 17px; font-size: .86rem; line-height: 1.22; font-weight: 700; }
.dash-summary-value { padding-top: 6px; display: block; font-variant-numeric: tabular-nums; font-size: clamp(1.85rem, 3.25vw, 2.85rem); line-height: 1.12; letter-spacing: -.045em; font-weight: 740; }
.dash-summary-value small { margin-left: 6px; font-size: .79rem; letter-spacing: 0; color: var(--product-tint); }
.dash-summary-unit, .dash-summary-foot { color: var(--dash-muted); font-size: .73rem; line-height: 1.25; }
.dash-summary-unit { margin-top: 4px; }
.dash-summary-meter { height: 4px; border-radius: 9px; margin: 15px 0 9px; background: #263749; overflow: hidden; }
.dash-summary-meter i { display: block; width: var(--meter); height: 100%; border-radius: inherit; background: var(--product-tint); box-shadow: 0 0 10px var(--product-tint); animation: dash-meter-in .65s ease both; }
.dash-summary-foot { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.dash-summary-foot > :last-child { color: var(--product-tint); font-size: 1rem; transition: transform .2s; }
.dash-product-summary:hover .dash-summary-foot > :last-child { transform: translate(2px, -2px); }
.dash-analysis-grid { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(230px, 1fr); gap: clamp(12px, 1.5vw, 22px); align-items: stretch; }
.dash-usage-card, .dash-expiry-card, .dash-recent { padding: clamp(14px, 1.65vw, 24px); min-width: 0; }
.dash-chart-heading { align-items: start; }
.dash-chart-product select, .dash-date-form input { height: 36px; min-width: 0; max-width: 100%; border: 1px solid #38506a; border-radius: 7px; background: #142135; color: var(--ink); font-size: .78rem; padding: 0 8px; }
.dash-chart-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-block: 15px 12px; }
.dash-segments { display: flex; border: 1px solid #2a3e56; border-radius: 8px; padding: 3px; background: #101b2b; }
.dash-segments button { min-height: 31px; border: 0; border-radius: 5px; background: transparent; padding-inline: 9px; font-size: .75rem; color: #a9bed4; }
.dash-segments button:hover { color: var(--ink); background: #24374d; }
.dash-segments button[aria-pressed='true'] { color: #c9f9ec; background: #23434c; }
.dash-chart-legend { display: flex; gap: 9px; flex-wrap: wrap; }
.dash-legend-item { display: inline-flex; align-items: center; gap: 4px; color: #c0cce0; font-size: .73rem; }
.dash-legend-item i { width: 7px; height: 7px; background: var(--cyan); border-radius: 50%; }
.dash-legend-item.is-mobile i { background: #f1ba83; }
.dash-date-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: 9px; }
.dash-date-form label { display: grid; gap: 4px; font-size: .74rem; color: var(--dash-muted); }
.dash-date-form [data-date-error] { color: #ffb7a9; font-size: .77rem; }
.dash-chart-stage { position: relative; min-width: 0; height: clamp(178px, 20vw, 262px); }
.dash-chart-stage canvas { width: 100%; height: 100%; display: block; }
.dash-chart-empty { position: absolute; display: grid; place-items: center; inset: 0 6px 16px 42px; text-align: center; pointer-events: none; color: #abbfd4; font-size: .86rem; }
.dash-chart-tooltip { position: absolute; inset: 8px auto auto; min-width: min(155px, 100%); padding: 8px 9px; display: grid; gap: 5px; background: #152437fa; border: 1px solid #4d6984; border-radius: 8px; box-shadow: 0 7px 20px #0005; pointer-events: none; font-size: .73rem; }
.dash-chart-tooltip span { display: flex; justify-content: space-between; gap: 10px; color: #b9cadd; }
.dash-chart-tooltip strong { color: var(--cyan); }
.dash-chart-footer { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: var(--dash-muted); font-size: .77rem; }
.dash-chart-breakdown[open] { width: 100%; }
.dash-chart-breakdown summary { cursor: pointer; color: #bcf6e5; }
.dash-chart-breakdown .dash-table-scroll { margin-top: 8px; max-height: 240px; }
.dash-expiry-card { display: flex; flex-direction: column; }
.dash-expiry-dot { color: #eac09b; background: #372c2b; border: 1px solid #63493d; border-radius: 8px; font-size: 1.25rem; width: 32px; height: 32px; display: grid; place-items: center; }
.dash-expiry-empty { flex: 1; display: grid; align-content: center; justify-items: center; text-align: center; min-height: 194px; padding: 12px 0; }
.dash-expiry-empty strong { font-size: .89rem; }
.dash-expiry-empty p { margin-top: 7px; font-size: .76rem; line-height: 1.6; color: var(--dash-muted); max-width: 250px; }
.dash-expiry-orbit { position: relative; width: 96px; height: 96px; margin-bottom: 9px; display: grid; place-items: center; background: radial-gradient(#75efca21, transparent 66%); color: #95ebd1; }
.dash-expiry-orbit :is(i, b) { position: absolute; inset: 9px; border: 1px solid #335663; border-radius: 50%; }
.dash-expiry-orbit b { inset: 22px; border-color: #4f7b82; }
.dash-expiry-orbit i::after { content: ''; position: absolute; top: -2px; left: 33px; background: #75efca; width: 6px; height: 6px; box-shadow: 0 0 12px #75efca; border-radius: 50%; }
.dash-expiry-orbit i { animation: dash-orbit 8s linear infinite; }
.dash-expiry-orbit span { font-size: 1.42rem; }
.dash-expiry-amount { color: var(--dash-muted); margin-block: 20px 8px; font-size: .83rem; }
.dash-expiry-amount strong { font-size: 1.65rem; color: #ffdab8; }
.dash-expiry-list { list-style: none; padding: 0; margin: 0; }
.dash-expiry-list a { display: flex; justify-content: space-between; align-items: center; gap: 7px; min-width: 0; padding: 9px 0; border-top: 1px solid #2a394f; }
.dash-expiry-list a:hover { color: var(--cyan); }
.dash-expiry-list span { display: grid; min-width: 0; gap: 3px; font-size: .8rem; }
.dash-expiry-list small { color: var(--dash-muted); text-overflow: ellipsis; overflow: hidden; }
.dash-expiry-list time { font-size: .73rem; color: #ffd5ab; white-space: nowrap; }
.dash-recent .dash-card-heading { margin-bottom: 13px; }
.dash-recent-empty { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0 2px; border-top: 1px solid #2a394f; }
.dash-recent-empty p { color: var(--dash-muted); margin-top: 5px; font-size: .79rem; line-height: 1.5; }
.dash-text-link { color: #a5f5dd; font-size: .83rem; white-space: nowrap; }
.dash-text-link:hover { color: #d6fff3; text-decoration: underline; }
.dash-table-scroll { overflow: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .82rem; text-align: left; }
.dash-table :is(th, td) { padding: 10px 9px; text-align: left; border-bottom: 1px solid #2a3b51; vertical-align: middle; }
.dash-table th { color: #aec1d9; font-weight: 640; background: #122032; }
.dash-table tbody tr:hover { background: #20334a7c; }
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-table a:hover { color: var(--cyan); }
.dash-order-id { color: #bcd8ee; font-family: ui-monospace, monospace; white-space: nowrap; }
.dash-empty { color: var(--dash-muted); line-height: 1.55; text-align: center; }
.dash-tabbar { display: flex; flex-wrap: wrap; gap: 5px; border-bottom: 1px solid #304258; }
.dash-load { min-height: min(42vh, 350px); display: grid; gap: 14px; place-content: center; justify-items: center; text-align: center; padding: 16px; color: #b8cde0; }
.dash-spinner { border: 2px solid #36566a; border-top-color: var(--cyan); width: 24px; height: 24px; border-radius: 50%; animation: dash-orbit .7s linear infinite; }
.dash-toast { position: fixed; z-index: 8; bottom: 18px; right: 18px; max-width: min(420px, calc(100vw - 36px)); padding: 12px 16px; border: 1px solid #548780; border-radius: 9px; color: #e3fff7; background: #163038; box-shadow: 0 10px 34px #0007; font-size: .85rem; animation: dash-toast-in .22s ease both; }
.account-status.is-error { color: #ffb4aa; }
.account-submit:disabled { opacity: .65; cursor: wait; }
@keyframes dash-orbit { to { transform: rotate(360deg); } }
@keyframes dash-meter-in { from { transform: translateX(-100%); } }
@keyframes dash-toast-in { from { opacity: 0; transform: translateY(7px); } }
@media (max-width: 1150px) {
  .dash-shell { --dash-sidebar-width: 197px; }
  .dash-sidebar { padding-inline: 10px; }
  .dash-nav-link { font-size: .81rem; }
  .dash-nav-link.is-current::before { left: -11px; }
  .dash-product-orb { width: 38px; height: 38px; }
  .dash-product-orb img { width: 34px; height: 34px; }
  .dash-user-name { max-width: 112px; }
}
@media (max-width: 950px) {
  .dash-shell { display: block; --dash-sidebar-width: 231px; }
  .dash-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--dash-sidebar-width); transform: translateX(-105%); visibility: hidden; transition: transform .24s ease, visibility 0s linear .24s; }
  .dash-sidebar.is-open { transform: translateX(0); visibility: visible; transition: transform .24s ease; }
  .dash-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 3; border: 0; border-radius: 0; background: #050a12bb; }
  .dash-button.dash-menu-button { display: inline-grid; place-items: center; width: 37px; min-height: 37px; padding: 7px; }
  .dash-menu-button i { display: block; width: 16px; height: 11px; border-block: 2px solid currentColor; position: relative; }
  .dash-menu-button i::after { content: ''; position: absolute; top: 3px; left: 0; right: 0; border-top: 1px solid currentColor; }
}
@media (max-width: 660px) {
  .dash-topbar { min-height: 56px; gap: 6px; padding: 8px 12px; }
  .dash-topbar-path > :is(a, span), .dash-user-name, .dash-wallet span, .dash-user summary i { display: none; }
  .dash-topbar-path strong { font-size: .76rem; }
  .dash-main { padding: 16px 12px 25px; }
  .dash-overview-heading { flex-wrap: wrap; align-items: center; }
  .dash-sample-button { min-height: 34px; }
  .dash-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-analysis-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-chart-heading { flex-wrap: wrap; }
  .dash-recent-empty { align-items: flex-start; flex-wrap: wrap; }
  .dash-demo-strip { flex-wrap: wrap; }
}
@media (max-width: 350px) {
  .dash-topbar-path strong { display: none; }
  .dash-product-summary { padding: 10px; }
  .dash-state { font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-shell *, .dash-shell *::before, .dash-shell *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .dash-hover:hover, .dash-hover:active, .dash-hover:hover img, .dash-hover:hover .dash-summary-foot > :last-child { transform: none; }
}
