:root {
  --lc-usage-bg: #f7f8fa;
  --lc-usage-panel: #fff;
  --lc-usage-text: #181a1d;
  --lc-usage-muted: #70757d;
  --lc-usage-border: #e1e4e8;
  --lc-usage-brand: #0f766e;
  --lc-usage-brand-soft: #e8f5f2;
}

.lc-usage-open {
  overflow: hidden;
}

.lc-user-usage-menu-item {
  width: 100%;
  align-items: center;
  gap: 8px;
}

.lc-user-usage-menu-item:hover,
.lc-user-usage-menu-item:focus-visible,
.lc-user-usage-menu-item[data-active-item] {
  background-color: var(--surface-hover);
  color: var(--text-primary);
}

.lc-user-usage-menu-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: currentColor;
}

.lc-usage-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 4.2vw;
  background: rgb(0 0 0 / 48%);
  color: var(--lc-usage-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.lc-usage-overlay.is-open {
  display: flex;
}

.lc-usage-overlay *,
.lc-usage-overlay *::before,
.lc-usage-overlay *::after {
  box-sizing: border-box;
}

.lc-usage-overlay button,
.lc-usage-overlay input {
  font: inherit;
}

.lc-usage-panel {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 90vh;
  max-height: 90vh;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--lc-usage-panel);
  box-shadow: 0 20px 52px rgb(17 20 24 / 18%);
}

.lc-usage-header {
  position: relative;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 56px 0 24px;
  border-bottom: 1px solid var(--lc-usage-border);
}

.lc-usage-header h1,
.lc-usage-surface h2,
.lc-usage-metric-groups h2 {
  margin: 0;
  color: var(--lc-usage-text);
}

.lc-usage-header h1 {
  font-size: 20px;
  font-weight: 650;
  line-height: 24px;
}

.lc-usage-header p,
.lc-usage-surface-header p {
  margin: 3px 0 0;
  color: var(--lc-usage-muted);
  font-size: 11px;
}

.lc-usage-header-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lc-usage-icon-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--lc-usage-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.lc-usage-icon-button:hover,
.lc-usage-icon-button[aria-expanded="true"] {
  background: #ececef;
  color: var(--lc-usage-text);
}

.lc-usage-close svg {
  width: 18px;
  height: 18px;
}

.lc-usage-help-wrap {
  position: relative;
}

.lc-usage-help {
  position: absolute;
  z-index: 10;
  top: 38px;
  right: 0;
  width: 310px;
  padding: 13px 14px;
  border: 1px solid var(--lc-usage-border);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(17 20 24 / 16%);
  color: #555b63;
  font-size: 11px;
  line-height: 1.55;
}

.lc-usage-help p {
  margin: 6px 0 0;
}

.lc-usage-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 24px 24px;
  background: var(--lc-usage-panel);
}

.lc-usage-settings-layout {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: 220px minmax(0, 1fr);
}

.lc-usage-section-nav {
  min-width: 0;
  padding: 24px 20px 24px 0;
  border-right: 1px solid var(--lc-usage-border);
}

.lc-usage-toolbar[hidden] {
  display: none;
}

.lc-usage-market {
  min-width: 0;
}

.lc-usage-market-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.lc-usage-market-heading h2 {
  margin: 0;
  color: var(--lc-usage-text);
  font-size: 18px;
  font-weight: 650;
}

.lc-usage-market-heading p,
.lc-usage-market-note {
  margin: 5px 0 0;
  color: var(--lc-usage-muted);
  font-size: 12px;
}

.lc-usage-market-heading > span {
  flex: 0 0 auto;
  color: var(--lc-usage-muted);
  font-size: 12px;
}

.lc-usage-market-table-wrap {
  overflow-x: auto;
}

.lc-usage-market-table {
  min-width: 760px;
  table-layout: fixed;
}

.lc-usage-market-col-model {
  width: 26%;
}

.lc-usage-market-col-context {
  width: 10%;
}

.lc-usage-market-col-input {
  width: 19%;
}

.lc-usage-market-col-rate {
  width: 15%;
}

.lc-usage-market-table th,
.lc-usage-market-table td {
  white-space: nowrap;
}

.lc-usage-market-model,
.lc-usage-market-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lc-usage-market-price {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.lc-usage-market-price strong {
  color: var(--lc-usage-text);
  font-weight: 650;
}

.lc-usage-market-price-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.lc-usage-market-official,
.lc-usage-market-benchmark {
  color: var(--lc-usage-muted);
  font-size: 11px;
}

.lc-usage-market-discount {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--lc-usage-accent) 12%, transparent);
  color: var(--lc-usage-accent);
  font-size: 11px;
  font-weight: 600;
}

.lc-usage-market-note {
  margin-top: 12px;
}

.lc-usage-view-tabs {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 4px;
}

.lc-usage-view-tabs button {
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #404247;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.lc-usage-view-tabs button:hover,
.lc-usage-view-tabs button.is-active {
  background: #ececef;
  color: var(--lc-usage-text);
}

.lc-usage-view-tabs button.is-active {
  font-weight: 600;
}

.lc-usage-view-tabs svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.lc-usage-dashboard-content {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 20px 0 0 24px;
}

.lc-usage-dashboard-root {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.lc-usage-overview {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.lc-usage-overview-balance {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--lc-usage-border);
  border-radius: 8px;
  background: #fbfcfd;
}

.lc-usage-overview-balance > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.lc-usage-overview-balance span,
.lc-usage-overview-balance p {
  color: var(--lc-usage-muted);
  font-size: 12px;
}

.lc-usage-overview-balance strong {
  color: var(--lc-usage-text);
  font-size: 20px;
  font-weight: 650;
}

.lc-usage-overview-balance p {
  flex: 1;
  margin: 0;
}

.lc-usage-overview-balance button {
  border: 0;
  background: transparent;
  color: var(--lc-usage-brand);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.lc-usage-account {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  gap: 16px;
}

.lc-usage-balance-hero {
  display: flex;
  min-height: 132px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid var(--lc-usage-border);
  border-radius: 8px;
  background: #fbfcfd;
}

.lc-usage-balance-hero span,
.lc-usage-balance-hero p {
  color: var(--lc-usage-muted);
  font-size: 12px;
}

.lc-usage-balance-hero strong {
  display: block;
  margin-top: 8px;
  color: var(--lc-usage-text);
  font-size: 32px;
  font-weight: 680;
  line-height: 1.1;
}

.lc-usage-balance-hero p {
  margin: 8px 0 0;
}

.lc-usage-balance-hero .lc-usage-balance-badge {
  padding: 5px 8px;
  border-radius: 4px;
  background: #f0f1f3;
  white-space: nowrap;
}

.lc-usage-credit-records {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.lc-usage-credit-records .lc-usage-table-wrap {
  max-height: calc(90vh - 350px);
  overflow: auto;
}

.lc-usage-credit-records td.is-positive {
  color: #087a55;
  font-weight: 650;
}

.lc-usage-credit-records td.is-negative {
  color: #b42318;
  font-weight: 650;
}

.lc-usage-toolbar,
.lc-usage-surface-header,
.lc-usage-log-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lc-usage-toolbar {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.lc-usage-ranges,
.lc-usage-trend-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--lc-usage-border);
  border-radius: 7px;
  background: #eef0f2;
}

.lc-usage-ranges button,
.lc-usage-trend-tabs button {
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--lc-usage-muted);
  cursor: pointer;
  font-size: 11px;
}

.lc-usage-ranges button.is-active,
.lc-usage-trend-tabs button.is-active {
  background: #fff;
  box-shadow: 0 1px 3px rgb(17 20 24 / 12%);
  color: var(--lc-usage-text);
  font-weight: 650;
}

.lc-usage-authority {
  color: var(--lc-usage-muted);
  font-size: 11px;
}

.lc-usage-metric-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.lc-usage-metric-groups h2 {
  margin: 0 0 7px 2px;
  color: var(--lc-usage-muted);
  font-size: 12px;
  font-weight: 600;
}

.lc-usage-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lc-usage-metric,
.lc-usage-surface {
  min-width: 0;
  border: 1px solid var(--lc-usage-border);
  border-radius: 10px;
  background: #fff;
}

.lc-usage-metric {
  padding: 14px;
}

.lc-usage-metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--lc-usage-muted);
  font-size: 12px;
}

.lc-usage-metric-label i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #0f766e;
}

.lc-usage-metric[data-tone="cost"] i { background: #c2410c; }
.lc-usage-metric[data-tone="instance"] i { background: #2563eb; }
.lc-usage-metric[data-tone="turn"] i { background: #a16207; }
.lc-usage-metric[data-tone="context"] i { background: #0891b2; }
.lc-usage-metric[data-tone="average"] i { background: #64748b; }

.lc-usage-metric-value {
  margin-top: 10px;
  overflow-wrap: anywhere;
  color: var(--lc-usage-text);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
}

.lc-usage-cost-note {
  display: block;
  margin-top: 3px;
  color: #a16207;
  font-size: 9px;
  font-weight: 500;
}

.lc-usage-metric-meta {
  margin-top: 6px;
  color: var(--lc-usage-muted);
  font-size: 12px;
}

.lc-usage-main-grid {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, .85fr);
  min-height: 180px;
  gap: 12px;
  margin-top: 12px;
}

.lc-usage-main-grid > .lc-usage-surface {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.lc-usage-surface-header {
  min-height: 50px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--lc-usage-border);
}

.lc-usage-surface-header h2 {
  font-size: 13px;
  font-weight: 680;
}

.lc-usage-chart-wrap,
.lc-usage-model-list {
  flex: 1;
  min-height: 0;
  padding: 14px;
}

.lc-usage-chart-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--lc-usage-muted);
  font-size: 10px;
}

.lc-usage-chart-summary strong {
  color: var(--lc-usage-text);
  font-size: 16px;
}

.lc-usage-chart-plot {
  position: relative;
  height: calc(100% - 25px);
  min-height: 150px;
}

.lc-usage-chart {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.lc-usage-grid-line {
  stroke: #e8eaed;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.lc-usage-axis-label {
  fill: var(--lc-usage-muted);
  font-family: inherit;
  font-size: 9px;
  letter-spacing: 0;
}

.lc-usage-axis-y { text-anchor: end; }
.lc-usage-axis-x { text-anchor: middle; }

.lc-usage-chart-area { fill: rgb(15 118 110 / 9%); }

.lc-usage-chart-line {
  fill: none;
  stroke: var(--lc-usage-brand);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.lc-usage-chart-point {
  pointer-events: none;
  fill: #fff;
  stroke: var(--lc-usage-brand);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.lc-usage-chart-hit {
  cursor: crosshair;
  fill: transparent;
  stroke: transparent;
}

.lc-usage-chart-hit:hover + .lc-usage-chart-point,
.lc-usage-chart-hit:focus + .lc-usage-chart-point {
  fill: var(--lc-usage-brand);
  stroke: #fff;
  stroke-width: 3;
  r: 5px;
}

.lc-usage-chart-tooltip {
  position: fixed;
  z-index: 10002;
  max-width: min(280px, calc(100vw - 24px));
  padding: 7px 9px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 5px;
  background: #1f2329;
  box-shadow: 0 6px 20px rgb(0 0 0 / 18%);
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
  white-space: pre-line;
}

.lc-usage-token-detail {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px dotted var(--lc-usage-muted);
  background: transparent;
  color: inherit;
  cursor: help;
  font-variant-numeric: tabular-nums;
}

.lc-usage-token-detail:hover,
.lc-usage-token-detail:focus-visible {
  border-bottom-color: var(--lc-usage-brand);
  color: var(--lc-usage-brand);
  outline: none;
}

.lc-usage-cost-detail {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px dotted var(--lc-usage-muted);
  background: transparent;
  color: inherit;
  cursor: help;
  font-variant-numeric: tabular-nums;
}

.lc-usage-cost-detail:hover,
.lc-usage-cost-detail:focus-visible {
  border-bottom-color: var(--lc-usage-brand);
  color: var(--lc-usage-brand);
  outline: none;
}

.lc-usage-model-list {
  display: grid;
  align-items: center;
}

.lc-usage-model-chart-layout {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) minmax(150px, 1.15fr);
  align-items: center;
  gap: 10px;
}

.lc-usage-model-chart {
  display: block;
  width: 100%;
  max-width: 170px;
  margin: auto;
  overflow: visible;
}

.lc-usage-model-track { stroke: #edf0f2; }

.lc-usage-model-segment {
  cursor: pointer;
  transition: opacity 120ms ease, stroke-width 120ms ease;
}

.lc-usage-model-segment:hover,
.lc-usage-model-segment:focus {
  opacity: 0.82;
  stroke-width: 24;
}

.lc-usage-model-total,
.lc-usage-model-total-label {
  text-anchor: middle;
  fill: var(--lc-usage-text);
  font-family: inherit;
  letter-spacing: 0;
}

.lc-usage-model-total {
  font-size: 17px;
  font-weight: 700;
}

.lc-usage-model-total-label {
  fill: var(--lc-usage-muted);
  font-size: 9px;
}

.lc-usage-model-legend {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 9px;
}

.lc-usage-model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 3px 4px;
  border-radius: 4px;
  color: var(--lc-usage-muted);
  font-size: 10px;
}

.lc-usage-model-row:hover,
.lc-usage-model-row:focus {
  background: var(--surface-hover, #f4f5f6);
  outline: none;
}

.lc-usage-model-name,
.lc-usage-log-model {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--lc-usage-text);
}

.lc-usage-model-name span,
.lc-usage-log-model span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lc-usage-model-name > i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.lc-usage-provider-logo,
.lc-usage-provider-fallback {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  object-fit: contain;
}

.lc-usage-provider-fallback {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef0f2;
  color: #444a51;
  font-size: 9px;
  font-weight: 700;
}

.lc-usage-logs {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.lc-usage-log-header {
  min-height: 64px;
  align-items: center;
  padding: 10px 16px;
}

.lc-usage-log-header h2 {
  font-size: 15px;
  font-weight: 600;
}

.lc-usage-filters {
  display: flex;
  gap: 8px;
}

.lc-usage-search {
  position: relative;
  width: 190px;
}

.lc-usage-search:last-child {
  width: 230px;
}

.lc-usage-search input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--lc-usage-border);
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: #3f444b;
  font-size: 13px;
}

.lc-usage-search input:focus {
  border-color: #9ccdc7;
  box-shadow: 0 0 0 2px rgb(15 118 110 / 10%);
}

.lc-usage-search > button {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--lc-usage-muted);
  cursor: pointer;
}

.lc-usage-options {
  position: absolute;
  z-index: 20;
  top: 42px;
  right: 0;
  left: 0;
  max-height: 210px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--lc-usage-border);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(17 20 24 / 14%);
}

.lc-usage-options button,
.lc-usage-options span {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #3f444b;
  text-align: left;
  cursor: pointer;
  font-size: 11px;
}

.lc-usage-options button:hover {
  background: var(--lc-usage-brand-soft);
  color: #0b635c;
}

.lc-usage-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.lc-usage-table-wrap table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}

.lc-usage-table-wrap th,
.lc-usage-table-wrap td {
  height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid #eceef1;
  text-align: left;
  vertical-align: middle;
}

.lc-usage-table-wrap th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 48px;
  background: #f6f6f7;
  color: #42454a;
  font-size: 14px;
  font-weight: 600;
}

.lc-usage-table-wrap th:nth-child(1) { width: 100px; }
.lc-usage-table-wrap th:nth-child(2) { width: 160px; }
.lc-usage-table-wrap th:nth-child(4) { width: 64px; }
.lc-usage-table-wrap th:nth-child(5) { width: 110px; }
.lc-usage-table-wrap th:nth-child(6) { width: 110px; }

.lc-usage-conversation-link {
  overflow: hidden;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #185f58;
  cursor: pointer;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lc-usage-conversation-link:hover { text-decoration: underline; }

.lc-usage-log-footer {
  min-height: 58px;
  padding: 0 16px;
  color: #55585e;
  font-size: 13px;
}

.lc-usage-log-footer div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lc-usage-log-footer strong {
  margin-right: 4px;
  color: var(--lc-usage-text);
  font-size: 13px;
  font-weight: 600;
}

.lc-usage-log-footer button {
  width: auto;
  min-width: 66px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--lc-usage-border);
  border-radius: 8px;
  background: #fff;
  color: #50555c;
  cursor: pointer;
}

.lc-usage-log-footer button:disabled { cursor: default; opacity: .4; }

.lc-usage-status,
.lc-usage-empty {
  display: grid;
  min-height: 170px;
  place-items: center;
  color: var(--lc-usage-muted);
  font-size: 12px;
  text-align: center;
}

.lc-usage-status {
  min-height: 360px;
  align-content: center;
  gap: 12px;
}

.lc-usage-status i {
  width: 24px;
  height: 24px;
  border: 2px solid #d9dddf;
  border-top-color: var(--lc-usage-brand);
  border-radius: 50%;
  animation: lc-usage-spin .8s linear infinite;
}

.lc-usage-status button {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--lc-usage-border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.lc-usage-chart-empty { min-height: 205px; }

@keyframes lc-usage-spin { to { transform: rotate(360deg); } }

.dark .lc-usage-overlay {
  --lc-usage-bg: #18191b;
  --lc-usage-panel: #222426;
  --lc-usage-text: #f3f4f5;
  --lc-usage-muted: #a7abb1;
  --lc-usage-border: #3a3d41;
  --lc-usage-brand-soft: #163b37;
}

.dark .lc-usage-panel,
.dark .lc-usage-header,
.dark .lc-usage-icon-button,
.dark .lc-usage-help,
.dark .lc-usage-ranges button.is-active,
.dark .lc-usage-trend-tabs button.is-active,
.dark .lc-usage-metric,
.dark .lc-usage-surface,
.dark .lc-usage-search input,
.dark .lc-usage-options,
.dark .lc-usage-log-footer button,
.dark .lc-usage-status button {
  background: var(--lc-usage-panel);
  color: var(--lc-usage-text);
}

.dark .lc-usage-ranges,
.dark .lc-usage-trend-tabs,
.dark .lc-usage-table-wrap th,
.dark .lc-usage-provider-fallback {
  background: #2b2d30;
}

.dark .lc-usage-grid-line {
  stroke: #373a3e;
}

.dark .lc-usage-chart-point {
  fill: var(--lc-usage-panel);
}

.dark .lc-usage-model-track {
  stroke: #34373b;
}

.dark .lc-usage-model-row:hover,
.dark .lc-usage-model-row:focus {
  background: #303236;
}

.dark .lc-usage-options button,
.dark .lc-usage-options span,
.dark .lc-usage-search input {
  color: var(--lc-usage-text);
}

.dark .lc-usage-view-tabs button {
  color: var(--lc-usage-muted);
}

.dark .lc-usage-view-tabs button:hover,
.dark .lc-usage-view-tabs button.is-active {
  background: #343639;
  color: var(--lc-usage-text);
}

.dark .lc-usage-provider-logo[src*="openai"],
.dark .lc-usage-provider-logo[src*="deepseek"] {
  filter: invert(1);
}

@media (max-width: 980px) {
  .lc-usage-panel { width: calc(100vw - 72px); min-width: 0; }
  .lc-usage-settings-layout { grid-template-columns: 168px minmax(0, 1fr); }
  .lc-usage-section-nav { padding-right: 14px; }
  .lc-usage-dashboard-content { padding-left: 16px; }
  .lc-usage-view-tabs button { padding: 0 10px; font-size: 14px; }
  .lc-usage-overview { overflow: auto; }
  .lc-usage-metric-groups { grid-template-columns: 1fr; }
  .lc-usage-main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .lc-usage-overlay { padding: 0; }
  .lc-usage-panel { width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; }
  .lc-usage-header { padding: 12px 16px; }
  .lc-usage-content { padding: 14px; }
  .lc-usage-settings-layout { display: flex; flex-direction: column; }
  .lc-usage-section-nav { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--lc-usage-border); }
  .lc-usage-view-tabs { flex-direction: row; }
  .lc-usage-view-tabs button { flex: 1; justify-content: center; border-radius: 8px; }
  .lc-usage-dashboard-content { flex: 1; padding: 12px 0 0; }
  .lc-usage-toolbar,
  .lc-usage-log-header { align-items: stretch; flex-direction: column; }
  .lc-usage-ranges { display: grid; grid-template-columns: repeat(3, 1fr); }
  .lc-usage-trend-tabs { display: grid; width: 100%; grid-template-columns: repeat(2, 1fr); }
  .lc-usage-model-chart-layout { grid-template-columns: 1fr; }
  .lc-usage-model-chart { max-width: 150px; }
  .lc-usage-filters { width: 100%; }
  .lc-usage-search,
  .lc-usage-search:last-child { min-width: 0; flex: 1; width: auto; }
  .lc-usage-help { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; }
}
