.bv2-page {
  --bv2-ink: #172033;
  --bv2-muted: #637083;
  --bv2-subtle: #8792a2;
  --bv2-line: #dfe4eb;
  --bv2-soft-line: #edf0f4;
  --bv2-blue: #1769d2;
  --bv2-blue-soft: #eef5ff;
  --bv2-blue-deep: #0f4f9c;
  --bv2-attention: #a96300;
  --bv2-attention-soft: #fff7e8;
  --bv2-risk: #c43e48;
  --bv2-risk-soft: #fff1f2;
  color: var(--bv2-ink);
}

.bv2-page * { box-sizing: border-box; }

.bv2-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.bv2-toolbar h3,
.bv2-panel h3,
.bv2-alert-head h3 {
  margin: 0;
  color: var(--bv2-ink);
  letter-spacing: 0;
}

.bv2-toolbar h3 { margin-top: 3px; font-size: 22px; font-weight: 760; }
.bv2-toolbar p,
.bv2-panel header p,
.bv2-alert-head p { margin: 4px 0 0; color: var(--bv2-muted); font-size: 12px; line-height: 1.6; }
.bv2-eyebrow { color: var(--bv2-subtle); font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.bv2-toolbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.bv2-subnav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 42px;
  margin-bottom: 14px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--bv2-line);
  border-radius: 7px;
  background: #fff;
}

.bv2-subnav button,
.bv2-subnav a {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--bv2-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 32px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.bv2-subnav button:hover,
.bv2-subnav a:hover { color: var(--bv2-blue-deep); background: var(--bv2-blue-soft); }
.bv2-subnav .active { color: #fff; background: var(--bv2-blue); }

.bv2-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--bv2-line);
  border-radius: 7px;
  background: #fff;
}

.bv2-summary article {
  min-width: 0;
  min-height: 94px;
  padding: 15px 16px;
  border-right: 1px solid var(--bv2-soft-line);
}

.bv2-summary article:last-child { border-right: 0; }
.bv2-summary article.is-risk { background: var(--bv2-risk-soft); }
.bv2-summary span { display: block; color: var(--bv2-muted); font-size: 11px; font-weight: 650; }
.bv2-summary strong { display: block; margin-top: 7px; overflow: hidden; color: var(--bv2-ink); font-size: 20px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.bv2-summary small { display: block; margin-top: 5px; overflow: hidden; color: var(--bv2-subtle); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.bv2-summary .is-risk strong,
.bv2-summary .is-risk small { color: var(--bv2-risk); }

.bv2-alerts {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--bv2-line);
  border-radius: 7px;
  background: #fff;
}

.bv2-alert-head { padding: 3px 4px; }
.bv2-alert-head h3 { margin-top: 4px; font-size: 15px; font-weight: 740; }
.bv2-alert-list { display: grid; gap: 7px; }
.bv2-alert {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid var(--bv2-soft-line);
  border-radius: 6px;
  background: #fafbfc;
}

.bv2-alert > span { width: 7px; height: 7px; border-radius: 50%; background: var(--bv2-blue); }
.bv2-alert.attention > span { background: var(--bv2-attention); }
.bv2-alert.risk > span { background: var(--bv2-risk); }
.bv2-alert b { display: block; color: var(--bv2-ink); font-size: 12px; }
.bv2-alert p { margin: 2px 0 0; color: var(--bv2-muted); font-size: 10px; line-height: 1.5; }
.bv2-alert a,
.bv2-alert button { border: 0; background: transparent; color: var(--bv2-blue-deep); font: inherit; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.bv2-alert.risk a,
.bv2-alert.risk button { color: var(--bv2-risk); }

.bv2-clear {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.bv2-clear > span { width: 9px; height: 9px; border: 2px solid var(--bv2-blue); border-radius: 50%; }
.bv2-clear b { display: block; font-size: 13px; }
.bv2-clear p { margin: 2px 0 0; color: var(--bv2-muted); font-size: 11px; }
.bv2-clear a { color: var(--bv2-blue-deep); font-size: 11px; font-weight: 700; text-decoration: none; }

.bv2-primary-grid,
.bv2-secondary-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.bv2-primary-grid { grid-template-columns: minmax(0, 1.65fr) minmax(270px, .65fr); }
.bv2-secondary-grid { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }

.bv2-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--bv2-line);
  border-radius: 7px;
  background: #fff;
}

.bv2-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--bv2-line);
}

.bv2-panel > header h3 { margin-top: 3px; font-size: 14px; font-weight: 740; }
.bv2-panel-body { padding: 15px 16px; }
.bv2-range { display: inline-flex; align-items: center; padding: 2px; border: 1px solid var(--bv2-line); border-radius: 6px; background: #f7f8fa; }
.bv2-range button { min-width: 42px; height: 28px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: var(--bv2-muted); font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.bv2-range button.active { color: #fff; background: var(--bv2-blue); }

.bv2-chart-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 4px; }
.bv2-chart-summary div { padding: 0 10px; border-right: 1px solid var(--bv2-soft-line); }
.bv2-chart-summary div:first-child { padding-left: 0; }
.bv2-chart-summary div:last-child { border-right: 0; }
.bv2-chart-summary span { display: block; color: var(--bv2-muted); font-size: 10px; }
.bv2-chart-summary b { display: block; margin-top: 3px; font-size: 15px; }
.bv2-line-chart { display: block; width: 100%; min-height: 220px; overflow: visible; }
.bv2-line-chart line { stroke: #e9edf2; stroke-width: 1; }
.bv2-line-chart text { fill: var(--bv2-subtle); font-size: 10px; text-anchor: end; }
.bv2-line-chart .bv2-axis-date { text-anchor: middle; }
.bv2-line-chart .bv2-area { fill: rgba(23, 105, 210, .08); stroke: none; }
.bv2-line-chart .bv2-line { fill: none; stroke: var(--bv2-blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1200; animation: bv2-line-enter .7s ease-out both; }
.bv2-line-chart circle { fill: #fff; stroke: var(--bv2-blue); stroke-width: 2; }
@keyframes bv2-line-enter { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }

.bv2-forecast-state { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 8px 10px; border-radius: 6px; background: var(--bv2-blue-soft); color: var(--bv2-blue-deep); font-size: 11px; }
.bv2-forecast-state span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bv2-forecast-state.attention { color: var(--bv2-attention); background: var(--bv2-attention-soft); }
.bv2-forecast-state.risk { color: var(--bv2-risk); background: var(--bv2-risk-soft); }
.bv2-quota-ring { display: grid; place-items: center; width: 124px; aspect-ratio: 1; margin: 18px auto 14px; border-radius: 50%; background: conic-gradient(var(--bv2-blue) var(--bv2-progress), #e8edf3 0); }
.bv2-quota-ring::before { content: ''; grid-area: 1 / 1; width: 92px; aspect-ratio: 1; border-radius: 50%; background: #fff; }
.bv2-quota-ring > div { z-index: 1; grid-area: 1 / 1; text-align: center; }
.bv2-quota-ring strong { display: block; font-size: 22px; }
.bv2-quota-ring span { color: var(--bv2-muted); font-size: 10px; }
.bv2-forecast-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.bv2-forecast-facts div { min-width: 0; padding: 0 7px; border-right: 1px solid var(--bv2-soft-line); text-align: center; }
.bv2-forecast-facts div:last-child { border-right: 0; }
.bv2-forecast-facts span { display: block; color: var(--bv2-muted); font-size: 9px; }
.bv2-forecast-facts b { display: block; margin-top: 4px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.bv2-quota-bar { margin-bottom: 14px; }
.bv2-quota-bar > div { display: flex; justify-content: space-between; color: var(--bv2-subtle); font-size: 9px; }
.bv2-quota-bar > i { display: block; height: 6px; margin-top: 5px; overflow: hidden; border-radius: 3px; background: #e8edf3; }
.bv2-quota-bar b { display: block; height: 100%; border-radius: inherit; background: var(--bv2-blue); }
.bv2-forecast .btn { width: 100%; }

.bv2-usage { margin-bottom: 14px; scroll-margin-top: 70px; }
.bv2-usage-table,
.bv2-orders { overflow-x: auto; }
.bv2-usage-head,
.bv2-usage-row { display: grid; grid-template-columns: minmax(190px, 1.4fr) repeat(2, minmax(70px, .55fr)) minmax(92px, .75fr) minmax(115px, .85fr) minmax(62px, .45fr) minmax(70px, .55fr) 44px; align-items: center; gap: 10px; min-width: 880px; }
.bv2-usage-head { min-height: 36px; padding: 0 16px; border-bottom: 1px solid var(--bv2-line); background: #fafbfc; color: var(--bv2-muted); font-size: 10px; font-weight: 700; }
.bv2-usage-row { min-height: 62px; padding: 8px 16px; border-bottom: 1px solid var(--bv2-soft-line); color: var(--bv2-muted); font-size: 11px; }
.bv2-usage-row:last-child { border-bottom: 0; }
.bv2-usage-row:hover { background: #fafcff; }
.bv2-app { display: flex; align-items: center; gap: 9px; min-width: 0; }
.bv2-app > span { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 6px; background: var(--bv2-blue-soft); color: var(--bv2-blue-deep); font-size: 11px; font-weight: 750; }
.bv2-app div { min-width: 0; }
.bv2-app b { display: block; overflow: hidden; color: var(--bv2-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.bv2-app code { display: block; margin-top: 3px; overflow: hidden; color: var(--bv2-subtle); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.bv2-share { display: flex; align-items: center; gap: 7px; }
.bv2-share > span { flex: 1; height: 5px; overflow: hidden; border-radius: 3px; background: #e8edf3; }
.bv2-share i { display: block; height: 100%; background: var(--bv2-blue); }
.bv2-share b { min-width: 30px; color: var(--bv2-ink); font-size: 10px; }
.bv2-usage-row .is-risk { color: var(--bv2-risk); font-weight: 700; }
.bv2-usage-row > a { color: var(--bv2-blue-deep); font-size: 10px; font-weight: 700; text-decoration: none; }

.bv2-history-bars { display: flex; align-items: flex-end; justify-content: space-around; gap: 10px; min-height: 210px; padding: 12px 6px 0; }
.bv2-history-item { display: grid; grid-template-rows: 18px 138px 18px 18px; flex: 1; min-width: 42px; max-width: 70px; text-align: center; }
.bv2-history-value { color: var(--bv2-muted); font-size: 9px; }
.bv2-history-track { display: flex; align-items: flex-end; justify-content: center; height: 138px; border-bottom: 1px solid var(--bv2-line); }
.bv2-history-track i { width: min(28px, 70%); min-height: 4px; border-radius: 4px 4px 0 0; background: var(--bv2-blue); }
.bv2-history-item b { margin-top: 5px; color: var(--bv2-ink); font-size: 10px; }
.bv2-history-item span { color: var(--bv2-subtle); font-size: 9px; }
.bv2-history-legend { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--bv2-soft-line); color: var(--bv2-subtle); font-size: 9px; }
.bv2-history-legend span:first-child { display: flex; align-items: center; gap: 5px; }
.bv2-history-legend i { width: 7px; height: 7px; border-radius: 2px; background: var(--bv2-blue); }

#bv2Orders { scroll-margin-top: 70px; }
.bv2-order-head,
.bv2-order-row { display: grid; grid-template-columns: minmax(200px, 1fr) 90px 74px 112px; align-items: center; gap: 12px; min-width: 520px; }
.bv2-order-head { min-height: 36px; padding: 0 16px; border-bottom: 1px solid var(--bv2-line); background: #fafbfc; color: var(--bv2-muted); font-size: 10px; font-weight: 700; }
.bv2-order-row { min-height: 66px; padding: 9px 16px; border-bottom: 1px solid var(--bv2-soft-line); }
.bv2-order-row:last-child { border-bottom: 0; }
.bv2-order-row > div { min-width: 0; }
.bv2-order-row b { display: block; color: var(--bv2-ink); font-size: 11px; }
.bv2-order-row code { display: block; margin-top: 3px; overflow: hidden; color: var(--bv2-subtle); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.bv2-order-row small { display: block; margin-top: 2px; color: var(--bv2-muted); font-size: 9px; }
.bv2-order-row > strong { font-size: 12px; }
.bv2-order-row time { color: var(--bv2-muted); font-size: 9px; }
.bv2-order-status { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 24px; border-radius: 5px; background: var(--bv2-blue-soft); color: var(--bv2-blue-deep); font-size: 9px; font-weight: 700; }
.bv2-order-status.pending { background: var(--bv2-attention-soft); color: var(--bv2-attention); }
.bv2-order-status.closed { background: #f1f3f5; color: #737d8b; }

.bv2-loading { display: grid; place-items: center; min-height: 120px; color: var(--bv2-muted); font-size: 11px; }
.bv2-alerts > .bv2-loading { grid-column: 1 / -1; min-height: 48px; }
.bv2-empty { display: grid; place-items: center; min-height: 150px; padding: 20px; text-align: center; }
.bv2-empty b { color: var(--bv2-ink); font-size: 12px; }
.bv2-empty p { margin: 5px 0 0; color: var(--bv2-muted); font-size: 10px; }
.bv2-empty-actions { display: flex; justify-content: center; gap: 8px; padding: 0 16px 18px; }

@media (max-width: 1180px) {
  .bv2-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bv2-summary article:nth-child(3) { border-right: 0; }
  .bv2-summary article:nth-child(n+4) { border-top: 1px solid var(--bv2-soft-line); }
  .bv2-primary-grid { grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); }
}

@media (max-width: 900px) {
  .bv2-toolbar { align-items: flex-start; }
  .bv2-primary-grid,
  .bv2-secondary-grid { grid-template-columns: 1fr; }
  .bv2-alerts { grid-template-columns: 1fr; }
  .bv2-alert-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
}

@media (max-width: 640px) {
  .bv2-toolbar { display: block; }
  .bv2-toolbar-actions { margin-top: 12px; }
  .bv2-toolbar-actions .btn { flex: 1 1 auto; }
  .bv2-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bv2-summary article,
  .bv2-summary article:nth-child(3) { border-right: 1px solid var(--bv2-soft-line); }
  .bv2-summary article:nth-child(2n) { border-right: 0; }
  .bv2-summary article:nth-child(n+3) { border-top: 1px solid var(--bv2-soft-line); }
  .bv2-summary article:last-child { grid-column: 1 / -1; border-right: 0; }
  .bv2-alert { grid-template-columns: 7px minmax(0, 1fr); }
  .bv2-alert a,
  .bv2-alert button { grid-column: 2; justify-self: start; padding: 2px 0; }
  .bv2-panel > header { align-items: flex-start; }
  .bv2-chart-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bv2-line-chart { min-height: 190px; }
  .bv2-forecast-facts { gap: 0; }
  .bv2-forecast-facts div { padding: 0 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .bv2-line-chart .bv2-line { animation: none; }
  .bv2-subnav *,
  .bv2-page * { scroll-behavior: auto !important; }
}
