/* AWS Cost Analysis — brand tokens (used when page :root is missing aliases) */
.cost-modal-backdrop,
.cost-section {
  --aws: #FF9900;
  --aws-d: #232F3E;
  --aws-m: #37475A;
  --aws-bg: #FFF8F0;
  --aws-accent: #EC7211;
  --aws-soft: #FFE0B2;
}

.cost-account-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.cost-trend-btn {
  border: 1px solid #FF9900;
  background: #FFF8F0;
  color: #232F3E;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.cost-trend-btn:hover {
  background: #FF9900;
  color: #111;
}

.cost-account-trend-panel {
  margin: 4px 0 8px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ffe0b2;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffaf3 0%, #fff 100%);
  box-sizing: border-box;
}

.cost-account-trend-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.cost-account-trend-chart {
  height: 220px;
  width: 100%;
  position: relative;
}

.cost-account-trend-row > td {
  padding-top: 0 !important;
  border-bottom: 1px solid #e2e8f0;
  background: #fffaf5;
}

.cost-scope-warning {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.45;
}

.cost-stat-period {
  font-size: 0.72rem;
  color: #64748b;
  margin: 2px 0 8px;
}

.cost-section-title {
  margin: 18px 0 10px;
  font-size: 0.95rem;
  color: #232F3E;
}

.cost-year-metrics {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.78rem;
}

.cost-year-metrics span {
  color: #64748b;
  margin-right: 6px;
}

.cost-under-dev {
  border-style: dashed;
  border-color: #ffd8a0;
  background: #FFF8F0;
}

.cost-year-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cost-fx-alt {
  display: block;
  margin-top: 3px;
  font-size: 0.68em;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: #64748b;
  line-height: 1.25;
}

.cost-amount .cost-fx-alt,
.cost-stat-value .cost-fx-alt,
.cost-kpi-value .cost-fx-alt,
.cost-commitment-total .cost-fx-alt,
.cost-year-metrics .cost-fx-alt,
.cost-progress-foot .cost-fx-alt {
  font-weight: 500;
}

.cost-year-metrics strong {
  display: inline-block;
  font-weight: 700;
  color: #0f172a;
}

.cost-year-metrics strong .cost-fx-alt {
  font-size: 0.85em;
}

.cost-exec-charts .cost-chart-wrap-lg {
  height: 280px;
  min-height: 240px;
}

.cost-chart-card-wide {
  grid-column: 1 / -1;
}

.cost-section .cost-hero-card {
  background: linear-gradient(135deg, #0B1220 0%, #232F3E 48%, #3D4F61 100%);
  color: #fff;
  border: 0;
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
}

.cost-section .cost-hero-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.cost-section .cost-hero-card h3 {
  color: #fff;
  font-size: 1.35rem;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-open-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--aws-d, #232F3E);
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cost-open-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.cost-open-btn svg {
  width: 18px;
  height: 18px;
}

.cost-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.cost-modal-backdrop.open {
  display: flex;
}

.cost-modal {
  width: min(1420px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  background: #f8fafc;
  border-radius: 18px;
  border: 1px solid #dbe5f0;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cost-modal-head {
  background: linear-gradient(135deg, #0B1220 0%, #232F3E 48%, #3D4F61 100%);
  color: #fff;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cost-modal-head h2 {
  font-size: 1.2rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.cost-modal-close {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.cost-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cost-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.cost-view-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cost-view-tabs::-webkit-scrollbar {
  display: none;
}

.cost-tab {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  line-height: 1.2;
  min-height: 34px;
}

.cost-tab.active {
  background: var(--aws, #FF9900);
  border-color: var(--aws, #FF9900);
  color: #111827;
}

.cost-toolbar-right {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}

.cost-export-btn,
.cost-refresh-btn,
.cost-theme-btn,
.cost-select {
  flex-shrink: 0;
  white-space: nowrap;
}

.cost-select {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.8rem;
  background: #fff;
  color: #1e293b;
}

.cost-export-btn {
  border: 1px solid #FF9900;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  color: #FF9900;
  background: #fff;
}

.cost-export-btn:hover:not(:disabled) {
  background: #FFF8F0;
}

.cost-export-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cost-refresh-btn {
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  color: #111827;
  background: linear-gradient(135deg, #FF9900, #EC7211);
}

.cost-refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cost-theme-btn {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  color: #334155;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}

.cost-theme-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.cost-theme-btn[aria-pressed="true"] {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

/* Trend indicators */
.cost-amount-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.2;
}

.cost-amount-cell .cost-amount-wrap {
  width: 100%;
}

.cost-kpi-value .cost-amount-wrap {
  align-items: flex-start;
}

.cost-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.cost-trend-up {
  color: #16a34a;
}

.cost-trend-down {
  color: #dc2626;
}

.cost-status-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  padding: 10px 18px;
  background: #eef5fc;
  border-bottom: 1px solid #dbe5f0;
  font-size: 0.78rem;
  color: #475569;
  overflow: hidden;
  white-space: nowrap;
}

.cost-status-row #costNotice,
.cost-status-row #costFetchedAt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cost-refresh-panel {
  padding: 10px 18px 12px;
  border-bottom: 1px solid #dbe5f0;
  background: #f8fafc;
  font-size: 0.76rem;
}

.cost-refresh-panel.ok {
  background: #f0fdf4;
  border-bottom-color: #bbf7d0;
}

.cost-refresh-panel.busy {
  background: #eff6ff;
  border-bottom-color: #bfdbfe;
}

.cost-refresh-panel.warn {
  background: #fffbeb;
  border-bottom-color: #fde68a;
}

.cost-refresh-panel.err {
  background: #fef2f2;
  border-bottom-color: #fecaca;
}

.cost-refresh-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  margin-bottom: 8px;
}

.cost-refresh-state {
  font-weight: 800;
  color: #0f172a;
}

.cost-refresh-panel.ok .cost-refresh-state {
  color: #166534;
}

.cost-refresh-panel.busy .cost-refresh-state {
  color: #B45309;
}

.cost-refresh-panel.warn .cost-refresh-state {
  color: #b45309;
}

.cost-refresh-panel.err .cost-refresh-state {
  color: #b91c1c;
}

.cost-refresh-hint {
  color: #64748b;
}

.cost-refresh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 14px;
}

.cost-refresh-grid .k {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-weight: 700;
}

.cost-refresh-grid .v {
  display: block;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-refresh-error {
  margin-top: 8px;
  color: #b91c1c;
  font-size: 0.72rem;
}

@media (max-width: 720px) {
  .cost-refresh-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.cost-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.cost-pill.live {
  background: #dcfce7;
  color: #166534;
}

.cost-status-row .cost-notice-live {
  color: #166534;
  font-weight: 600;
}

.cost-pill.demo {
  background: #fef3c7;
  color: #92400e;
}

.cost-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.cost-modal-body {
  padding: 16px 18px 18px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.cost-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.cost-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}

.cost-kpi .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-kpi .value {
  margin-top: 6px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.cost-kpi .sub {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.cost-charts .cost-chart-card:not(.wide) {
  min-height: 320px;
}

.cost-chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  min-height: 320px;
}

.cost-chart-card.wide {
  grid-column: 1 / -1;
  min-height: 280px;
}

.cost-chart-card h4 {
  font-size: 0.86rem;
  color: #1e293b;
  margin: 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-chart-wrap {
  position: relative;
  height: 250px;
}

.cost-chart-card.wide .cost-chart-wrap {
  height: 220px;
}

.cost-search-wrap {
  margin: 0 0 14px;
}

.cost-search-input {
  width: 100%;
  max-width: 420px;
  padding: 9px 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  background: #fff;
  color: #1f2328;
}

.cost-search-input:focus {
  outline: 2px solid rgba(0, 120, 212, 0.35);
  border-color: #FF9900;
}

.cost-search-empty {
  margin: 8px 0 0;
  font-size: 13px;
  color: #656d76;
}

.cost-table-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.cost-error-code { color: #b45309; margin: 8px 0; }
.cost-fix-list { margin: 10px 0 10px 18px; text-align: left; font-size: 0.9rem; line-height: 1.5; }

.cost-table-card h4,
.cost-sub-rg-card h4 {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.86rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-table-card h4 .cost-title-main,
.cost-table-card h4 .cost-table-meta {
  display: inline;
  white-space: nowrap;
}

.cost-sub-rg-card h4 {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.cost-table-wrap {
  overflow: auto;
  max-height: 280px;
}

table.cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

table.cost-table th,
table.cost-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
}

table.cost-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

table.cost-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.cost-bar-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cost-bar-track {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.cost-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF9900, #232F3E);
  border-radius: 999px;
}

.cost-loading {
  padding: 36px 28px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.cost-loading-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  white-space: nowrap;
}

.cost-loading-sub {
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.cost-loading-timer {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef5fc;
  color: #232F3E;
  font-size: 0.78rem;
  font-weight: 700;
}

.cost-empty,
.cost-error {
  padding: 28px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.cost-error {
  color: #b91c1c;
}

@media (max-width: 960px) {
  .cost-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .cost-kpis {
    grid-template-columns: 1fr;
  }

  .cost-modal-backdrop {
    padding: 10px;
  }
}

.cost-table-wide {
  min-width: 720px;
}

.cost-table-wide th.num {
  text-align: right;
}

.cost-sub-rg-card {
  margin-bottom: 18px;
}

/* Department tab */
.cost-dept-row td {
  font-weight: 700;
  background: #f1f5f9;
}

.cost-modal.cost-theme-dark .cost-dept-row td {
  background: #1e293b;
}

/* FY outlook vs commitment cards */
.cost-dept-proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.cost-dept-proj-fy {
  margin-bottom: 14px;
}

.cost-dept-proj-fy-title {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.cost-dept-proj-fy.is-closed .cost-dept-proj-fy-title {
  color: #64748b;
}

.cost-dept-proj-card.is-closed {
  background: #f8fafc;
}

.cost-dept-proj-carry {
  margin: -4px 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
}

.cost-dept-proj-carry.plus {
  color: #047857;
}

.cost-dept-proj-carry.minus {
  color: #b45309;
}

.cost-dept-proj-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  background: #ffffff;
}

.cost-dept-proj-card.is-total {
  border-color: #FF9900;
  background: #FFF8F0;
}

.cost-dept-proj-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 10px;
  color: #0f172a;
}

.cost-dept-proj-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.85rem;
}

.cost-dept-proj-row .lbl {
  color: #64748b;
  flex: 0 0 auto;
  min-width: 96px;
}

.cost-dept-proj-row .val {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.cost-dept-proj-row .sub {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.76rem;
  white-space: nowrap;
}

.cost-dept-proj-bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  margin-top: 10px;
  overflow: visible;
}

.cost-dept-proj-fill {
  height: 100%;
  border-radius: 4px;
  background: #FF9900;
}

.cost-dept-proj-bar.over .cost-dept-proj-fill {
  background: #dc2626;
}

.cost-dept-proj-marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: #475569;
}

.cost-dept-proj-foot {
  margin-top: 6px;
  font-size: 0.74rem;
  color: #94a3b8;
}

.cost-dept-proj-na {
  font-size: 0.8rem;
  color: #64748b;
  margin: 6px 2px 0;
}

/* Commitment allocation table */
.cost-alloc-current {
  background: rgba(255, 153, 0, 0.12);
}

.cost-alloc-usd {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Dark theme */
.cost-modal.cost-theme-dark .cost-dept-proj-card {
  background: #0f172a;
  border-color: #334155;
}

.cost-modal.cost-theme-dark .cost-dept-proj-card.is-total {
  border-color: #FF9900;
  background: #2a2114;
}

.cost-modal.cost-theme-dark .cost-dept-proj-card.is-closed {
  background: #131c2b;
}

.cost-modal.cost-theme-dark .cost-dept-proj-fy-title {
  color: #e2e8f0;
}

.cost-modal.cost-theme-dark .cost-dept-proj-fy.is-closed .cost-dept-proj-fy-title {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-dept-proj-carry.plus {
  color: #34d399;
}

.cost-modal.cost-theme-dark .cost-dept-proj-carry.minus {
  color: #fbbf24;
}

.cost-modal.cost-theme-dark .cost-dept-proj-title,
.cost-modal.cost-theme-dark .cost-dept-proj-row .val {
  color: #f1f5f9;
}

.cost-modal.cost-theme-dark .cost-dept-proj-row .lbl {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-dept-proj-bar {
  background: #334155;
}

.cost-modal.cost-theme-dark .cost-dept-proj-fill {
  background: #FF9900;
}

.cost-modal.cost-theme-dark .cost-dept-proj-bar.over .cost-dept-proj-fill {
  background: #f87171;
}

.cost-modal.cost-theme-dark .cost-dept-proj-marker {
  background: #cbd5e1;
}

.cost-modal.cost-theme-dark .cost-alloc-current {
  background: rgba(255, 153, 0, 0.14);
}

.cost-wait-card {
  text-align: left;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
}

.cost-wait-hint {
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 12px;
}

.cost-currency-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  white-space: nowrap;
}

.cost-currency-note {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.cost-stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 4px solid #94a3b8;
}

.cost-stat-card.ok {
  border-left-color: #16a34a;
}

.cost-stat-card.warn {
  border-left-color: #d97706;
  background: #fffbeb;
}

.cost-stat-card.accent {
  border-left-color: #FF9900;
}

.cost-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-stat-value {
  margin-top: 6px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.cost-stat-sub {
  margin-top: 4px;
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-inline-alert {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  line-height: 1.45;
}

.cost-inline-alert.warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.cost-tab.warn:not(.active) {
  border-color: #fdba74;
  color: #9a3412;
}

.cost-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  margin-left: 4px;
}

.cost-tab.active .cost-tab-badge {
  background: rgba(255, 255, 255, 0.25);
}

.cost-table-meta {
  font-weight: 500;
  color: #94a3b8;
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.cost-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cost-badge.no_access {
  background: #ffedd5;
  color: #c2410c;
}

.cost-badge.rate_limit {
  background: #fef3c7;
  color: #92400e;
}

.cost-badge.error {
  background: #fee2e2;
  color: #b91c1c;
}

.cost-sub-id {
  font-size: 0.72rem;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.cost-table-wrap-tall {
  max-height: 420px;
}

table.cost-table.cost-table-access td:nth-child(4) {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
}

.cost-empty-card {
  text-align: center;
  padding: 40px 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.cost-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  font-size: 1.4rem;
  line-height: 48px;
  font-weight: 700;
}

/* Commitment Analysis */
.cost-commitment-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #0B1220 0%, #232F3E 55%, #3D4F61 100%);
  color: #fff;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 153, 0, 0.28);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.cost-commitment-hero h3,
.cost-commitment-title h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-commitment-hero p,
.cost-commitment-title p {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-commitment-total {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cost-progress-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.cost-progress-head,
.cost-progress-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: #475569;
  white-space: nowrap;
}

.cost-progress-head > span,
.cost-progress-foot > span {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cost-progress-head strong {
  color: #232F3E;
  font-size: 1rem;
}

.cost-pace-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.cost-pace-status .cost-pace-label {
  color: inherit;
  opacity: 0.92;
}

.cost-pace-status strong {
  font-size: 0.95rem;
  color: inherit;
}

.cost-pace-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: cost-pace-blink 1.4s ease-in-out infinite;
}

.cost-pace-emoji {
  display: inline-flex;
  font-size: 1.05rem;
  line-height: 1;
  animation: cost-pace-pulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 0 transparent);
}

.cost-pace-status.happy {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-color: #6ee7b7;
  color: #047857;
}

.cost-pace-status.happy .cost-pace-live {
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
}

.cost-pace-status.worry {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-color: #fdba74;
  color: #c2410c;
}

.cost-pace-status.worry .cost-pace-live {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
}

.cost-progress-track {
  position: relative;
  height: 14px;
  background: #e2e8f0;
  border-radius: 999px;
  margin: 18px 0 14px;
  overflow: visible;
}

.cost-progress-fill.used {
  height: 100%;
  background: linear-gradient(90deg, #EC7211, #FF9900);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.cost-progress-marker.time {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 22px;
  background: #f59e0b;
  border-radius: 2px;
  transform: translateX(-50%);
  z-index: 2;
}

.cost-progress-emoji {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cost-progress-emoji-face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 50%;
  background: #fff;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
  animation: cost-pace-pulse 1.6s ease-in-out infinite;
}

.cost-progress-emoji.happy .cost-progress-emoji-face {
  border-color: #34d399;
  box-shadow:
    0 0 0 0 rgba(16, 185, 129, 0.35),
    0 2px 8px rgba(15, 23, 42, 0.12);
  animation: cost-pace-glow-happy 1.6s ease-in-out infinite;
}

.cost-progress-emoji.worry .cost-progress-emoji-face {
  border-color: #fb923c;
  box-shadow:
    0 0 0 0 rgba(245, 158, 11, 0.4),
    0 2px 8px rgba(15, 23, 42, 0.12);
  animation: cost-pace-glow-worry 1.4s ease-in-out infinite;
}

/* Compact variant for the BU outlook cards (8px bars) */
.cost-dept-proj-emoji .cost-progress-emoji-face {
  width: 20px;
  height: 20px;
  font-size: 0.82rem;
  border-width: 1.5px;
}

@keyframes cost-pace-blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.2);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.85);
    box-shadow: 0 0 0 6px transparent;
  }
}

@keyframes cost-pace-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.88;
  }
}

@keyframes cost-pace-glow-happy {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(16, 185, 129, 0.45),
      0 2px 8px rgba(15, 23, 42, 0.12);
  }
  50% {
    transform: scale(1.1);
    box-shadow:
      0 0 0 8px rgba(16, 185, 129, 0),
      0 2px 10px rgba(15, 23, 42, 0.14);
  }
}

@keyframes cost-pace-glow-worry {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(245, 158, 11, 0.5),
      0 2px 8px rgba(15, 23, 42, 0.12);
  }
  50% {
    transform: scale(1.12);
    box-shadow:
      0 0 0 8px rgba(245, 158, 11, 0),
      0 2px 10px rgba(15, 23, 42, 0.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cost-pace-live,
  .cost-pace-emoji,
  .cost-progress-emoji-face {
    animation: none;
  }
}

.cost-commitment-kpis {
  margin-bottom: 12px;
}

.cost-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.cost-pie-section {
  margin: 0 0 16px;
}

.cost-pie-section-head {
  margin: 0 0 12px;
}

.cost-pie-section-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.cost-pie-meta {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  letter-spacing: 0.01em;
}

.cost-pie-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cost-pie-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.cost-pie-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cost-pie-card-head h4 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-pie-card-total {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #EC7211;
}

.cost-pie-wrap {
  position: relative;
  height: 210px;
}

.cost-pie-wrap.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  height: 160px;
}

.cost-pie-empty {
  font-size: 0.82rem;
  color: #94a3b8;
  text-align: center;
  padding: 12px;
}

.cost-pie-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.cost-pie-center-value {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  max-width: 48%;
}

.cost-pie-center-label {
  margin-top: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  color: #64748b;
  max-width: 52%;
  line-height: 1.25;
}

.cost-pie-legend {
  list-style: none;
  margin: 10px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 168px;
  overflow: auto;
}

.cost-pie-legend-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cost-pie-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.cost-pie-legend-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.cost-pie-legend-pct {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}

.cost-chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px 10px;
}

.cost-chart-wrap {
  position: relative;
  height: 240px;
}

.cost-badge.mtd {
  background: #FFF3E0;
  color: #B45309;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .cost-pie-grid {
    grid-template-columns: 1fr;
  }

  .cost-pie-wrap {
    height: 200px;
  }
}

/* Department pie charts — always one row of 4 (double-class selector outranks
   the base grid and the 1100px media query above) */
.cost-pie-grid.cost-dept-pie-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cost-dept-pie-grid .cost-pie-wrap {
  height: 170px;
}

.cost-dept-pie-grid .cost-pie-card-total {
  display: none;
}

@media (max-width: 700px) {
  .cost-pie-grid.cost-dept-pie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .cost-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .cost-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Dark mode ───────────────────────────────────────────── */
.cost-modal-backdrop.cost-theme-dark {
  background: rgba(2, 6, 23, 0.78);
}

.cost-modal.cost-theme-dark {
  background: #0f172a;
  border-color: #1e293b;
  color: #e2e8f0;
}

.cost-modal.cost-theme-dark .cost-toolbar {
  background: #1e293b;
  border-bottom-color: #334155;
}

.cost-modal.cost-theme-dark .cost-tab {
  background: #0f172a;
  border-color: #475569;
  color: #cbd5e1;
}

.cost-modal.cost-theme-dark .cost-tab.active {
  background: #FF9900;
  border-color: #FF9900;
  color: #111827;
}

.cost-modal.cost-theme-dark .cost-select,
.cost-modal.cost-theme-dark .cost-export-btn,
.cost-modal.cost-theme-dark .cost-theme-btn {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

.cost-modal.cost-theme-dark .cost-export-btn {
  color: #FF9900;
  border-color: #FF9900;
}

.cost-modal.cost-theme-dark .cost-export-btn:hover:not(:disabled) {
  background: rgba(255, 153, 0, 0.12);
}

.cost-modal.cost-theme-dark .cost-theme-btn:hover {
  background: #334155;
}

.cost-modal.cost-theme-dark .cost-theme-btn[aria-pressed="true"] {
  background: #FF9900;
  border-color: #FF9900;
  color: #111827;
}

.cost-modal.cost-theme-dark .cost-status-row {
  background: #1e293b;
  border-bottom-color: #334155;
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-pill.live {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.cost-modal.cost-theme-dark .cost-pill.demo {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.cost-modal.cost-theme-dark .cost-status-row .cost-notice-live {
  color: #4ade80;
}

.cost-modal.cost-theme-dark .cost-kpi,
.cost-modal.cost-theme-dark .cost-stat-card,
.cost-modal.cost-theme-dark .cost-table-card,
.cost-modal.cost-theme-dark .cost-chart-card,
.cost-modal.cost-theme-dark .cost-pie-card,
.cost-modal.cost-theme-dark .cost-empty-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: none;
}

.cost-modal.cost-theme-dark .cost-pie-card {
  background: linear-gradient(180deg, #243247 0%, #1a2436 100%);
  border-color: #3d4f66;
}

.cost-modal.cost-theme-dark .cost-pie-section-title {
  color: #f8fafc;
}

.cost-modal.cost-theme-dark .cost-pie-meta,
.cost-modal.cost-theme-dark .cost-pie-empty {
  color: #cbd5e1;
}

.cost-modal.cost-theme-dark .cost-pie-center-label {
  color: #cbd5e1;
}

.cost-modal.cost-theme-dark .cost-pie-card-head h4,
.cost-modal.cost-theme-dark .cost-pie-center-value {
  color: #ffffff;
}

.cost-modal.cost-theme-dark .cost-pie-card-total {
  color: #FFB84D;
}

.cost-modal.cost-theme-dark .cost-pie-legend {
  border-top-color: #3d4f66;
}

.cost-modal.cost-theme-dark .cost-pie-legend-name {
  color: #f1f5f9;
}

.cost-modal.cost-theme-dark .cost-pie-legend-pct {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-kpi .label,
.cost-modal.cost-theme-dark .cost-stat-label,
.cost-modal.cost-theme-dark .cost-table-meta,
.cost-modal.cost-theme-dark .cost-currency-note,
.cost-modal.cost-theme-dark .cost-kpi .sub,
.cost-modal.cost-theme-dark .cost-stat-sub {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-kpi .value,
.cost-modal.cost-theme-dark .cost-stat-value,
.cost-modal.cost-theme-dark .cost-table h4,
.cost-modal.cost-theme-dark .cost-chart-card h4,
.cost-modal.cost-theme-dark .cost-commitment-title h3 {
  color: #f1f5f9;
}

.cost-modal.cost-theme-dark .cost-fx-alt {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-scope-warning {
  background: rgba(185, 28, 28, 0.18);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.cost-modal.cost-theme-dark .cost-account-trend-panel {
  background: linear-gradient(180deg, #1a2332 0%, #0f172a 100%);
  border-color: #3d4f61;
}

.cost-modal.cost-theme-dark .cost-account-trend-row > td {
  background: #111827;
}

.cost-modal.cost-theme-dark .cost-account-trend-status {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-year-metrics strong {
  color: #f1f5f9;
}

.cost-modal.cost-theme-dark .cost-table th {
  background: #0f172a;
  color: #94a3b8;
  border-bottom-color: #334155;
}

.cost-modal.cost-theme-dark .cost-table td {
  border-bottom-color: #334155;
  color: #e2e8f0;
}

.cost-modal.cost-theme-dark .cost-table tbody tr:hover {
  background: rgba(255, 153, 0, 0.06);
}

.cost-modal.cost-theme-dark .cost-empty {
  color: #64748b;
}

.cost-modal.cost-theme-dark .cost-commitment-hero {
  background: linear-gradient(135deg, #0B1220 0%, #1a2433 50%, #2a3544 100%);
  border-color: rgba(255, 153, 0, 0.35);
}

.cost-modal.cost-theme-dark .cost-commitment-title p {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-progress-track {
  background: #334155;
}

.cost-modal.cost-theme-dark .cost-progress-head strong {
  color: #FF9900;
}

.cost-modal.cost-theme-dark .cost-pace-status.happy {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(52, 211, 153, 0.12));
  border-color: rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}

.cost-modal.cost-theme-dark .cost-pace-status.worry {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(251, 146, 60, 0.12));
  border-color: rgba(251, 146, 60, 0.45);
  color: #fdba74;
}

.cost-modal.cost-theme-dark .cost-progress-emoji-face {
  background: #1e293b;
}

.cost-modal.cost-theme-dark .cost-progress-foot {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-stat-card.ok {
  border-color: rgba(74, 222, 128, 0.35);
}

.cost-modal.cost-theme-dark .cost-stat-card.warn {
  border-color: rgba(251, 191, 36, 0.35);
}

.cost-modal.cost-theme-dark .cost-stat-card.accent {
  border-color: rgba(255, 153, 0, 0.35);
}

.cost-modal.cost-theme-dark .cost-badge.mtd {
  background: rgba(255, 153, 0, 0.2);
  color: #FFB84D;
}

.cost-modal.cost-theme-dark .cost-loading-title {
  color: #f1f5f9;
}

.cost-modal.cost-theme-dark .cost-loading-sub {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-trend-up {
  color: #4ade80;
}

.cost-modal.cost-theme-dark .cost-trend-down {
  color: #f87171;
}

.cost-modal.cost-theme-dark .cost-sub-rg-card h4 {
  color: #FF9900;
}

.cost-modal.cost-theme-dark .cost-cumulative {
  color: #FFB84D;
  font-weight: 700;
}

/* Dark mode — text and surfaces that stay dark in light theme */
.cost-modal.cost-theme-dark .cost-modal-body,
.cost-modal.cost-theme-dark .cost-modal-body p {
  color: #cbd5e1;
}

.cost-modal.cost-theme-dark strong,
.cost-modal.cost-theme-dark b {
  color: #f1f5f9;
}

.cost-modal.cost-theme-dark .cost-title-main {
  color: #f1f5f9;
}

.cost-modal.cost-theme-dark .cost-amount {
  color: #f1f5f9;
}

.cost-modal.cost-theme-dark .cost-table-card h4,
.cost-modal.cost-theme-dark .cost-sub-rg-card h4 {
  background: #0f172a;
  border-bottom-color: #334155;
  color: #f1f5f9;
}

.cost-modal.cost-theme-dark .cost-progress-block {
  background: #1e293b;
  border-color: #334155;
}

.cost-modal.cost-theme-dark .cost-progress-head {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-commitment-total {
  color: #f8fafc;
}

.cost-modal.cost-theme-dark .cost-wait-card,
.cost-modal.cost-theme-dark .cost-empty-card {
  color: #cbd5e1;
}

.cost-modal.cost-theme-dark .cost-wait-hint {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-error {
  color: #fca5a5;
}

.cost-modal.cost-theme-dark .cost-error-code {
  color: #fbbf24;
}

.cost-modal.cost-theme-dark .cost-fix-list {
  color: #cbd5e1;
}

.cost-modal.cost-theme-dark .cost-loading {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-loading-timer {
  background: #1e293b;
  color: #FF9900;
}

.cost-modal.cost-theme-dark .cost-stat-card.warn {
  background: rgba(251, 191, 36, 0.08);
}

.cost-modal.cost-theme-dark .cost-inline-alert {
  background: rgba(255, 153, 0, 0.1);
  border-color: rgba(255, 153, 0, 0.35);
  color: #FFB84D;
}

.cost-modal.cost-theme-dark .cost-inline-alert.warn {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fcd34d;
}

.cost-modal.cost-theme-dark .cost-tab.warn:not(.active) {
  border-color: #b45309;
  color: #fdba74;
}

.cost-modal.cost-theme-dark .cost-sub-id {
  background: #334155;
  color: #e2e8f0;
}

.cost-modal.cost-theme-dark .cost-badge.no_access {
  background: rgba(251, 146, 60, 0.2);
  color: #fdba74;
}

.cost-modal.cost-theme-dark .cost-badge.rate_limit {
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}

.cost-modal.cost-theme-dark .cost-badge.error {
  background: rgba(248, 113, 113, 0.2);
  color: #fca5a5;
}

.cost-modal.cost-theme-dark table.cost-table td:first-child {
  color: #e2e8f0;
}

.cost-modal.cost-theme-dark .cost-chart-card {
  background: #1e293b;
}

.cost-modal.cost-theme-dark .cost-refresh-panel {
  background: #1e293b;
  border-bottom-color: #334155;
}

.cost-modal.cost-theme-dark .cost-refresh-panel.ok {
  background: rgba(34, 197, 94, 0.1);
}

.cost-modal.cost-theme-dark .cost-refresh-panel.busy {
  background: rgba(255, 153, 0, 0.1);
}

.cost-modal.cost-theme-dark .cost-refresh-panel.warn {
  background: rgba(251, 191, 36, 0.1);
}

.cost-modal.cost-theme-dark .cost-refresh-grid .v,
.cost-modal.cost-theme-dark .cost-refresh-state {
  color: #e2e8f0;
}

.cost-modal.cost-theme-dark .cost-refresh-hint,
.cost-modal.cost-theme-dark .cost-refresh-grid .k {
  color: #94a3b8;
}

.cost-modal.cost-theme-dark .cost-search-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

.cost-modal.cost-theme-dark .cost-search-input:focus {
  border-color: #FF9900;
  outline-color: rgba(255, 153, 0, 0.35);
}

.cost-modal.cost-theme-dark .cost-search-empty {
  color: #94a3b8;
}
