.ops-accounting {
  padding: 24px;
}

.tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.tabs a {
  text-decoration: none;
  color: #666;
}

.tabs a.active {
  font-weight: 600;
  color: #000;
}

.section-title {
  margin: 32px 0 12px;
  font-size: 1.1rem;
  color: #444;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.kpi-card {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.kpi-card span {
  font-size: 0.85rem;
  color: #666;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.4rem;
}

.kpi-card.highlight strong {
  color: #0a7cff;
}

.kpi-card.danger strong {
  color: #d93025;
}


.status-pill.success {
  background-color: #e6f4ea;
  color: #137333;
}

.status-pill.warning {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #F59E0B;
}


.status-pill.danger {
  background-color: #fce8e6;
  color: #c5221f;
}

.status-pill.success {
  color: #137333 !important;
}

.status-pill.danger {
  color: #c5221f !important;
}


.status-pill.neutral {
  background-color: #eee;
  color: #666;
}


.card-subtext {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
}

/*.card-subtext div {
  display: flex;
  justify-content: space-between;
}
*/
.card-subtext strong {
  font-weight: 600;
}


.card-alerts {
  margin-top: 8px;
  padding-left: 16px;
  font-size: 0.8rem;
  color: #555;
}

.card-alerts li {
  margin-bottom: 4px;
}


.progress-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.progress-row label {
  font-size: 0.9rem;
}

.progress-row progress {
  width: 100%;
  height: 14px;
}

.progress-row span {
  font-size: 0.85rem;
  text-align: right;
}

/* Status coloring */
.progress-row.healthy progress::-webkit-progress-value {
  background-color: #4caf50;
}
.progress-row.tight progress::-webkit-progress-value {
  background-color: #ff9800;
}
.progress-row.overrun progress::-webkit-progress-value {
  background-color: #f44336;
}
.progress-row.no-budget progress::-webkit-progress-value {
  background-color: #9e9e9e;
}


.kpi-info {
  margin-left: 6px;
  font-size: 0.85em;
  cursor: help;
  opacity: 0.7;
}

.kpi-info:hover {
  opacity: 1;
}


.kpi-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  cursor: pointer;
  font-size: 0.85em;
}

.tooltip-content {
  position: absolute;
  bottom: 120%;
  left: 50%;
transform: translateX(-50%);
max-width: 220px;
  background: #111827; /* dark slate */
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.3;
  width: max-content;
  max-width: 220px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 1000;
}

/* little arrow */
.tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #111827 transparent transparent transparent;
}


.kpi-tooltip:hover .tooltip-content {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.kpi-tooltip.active .tooltip-content {
  opacity: 1;
  pointer-events: auto;
}

/* Prevent tooltip from overflowing screen */
.kpi-tooltip {
  max-width: 100%;
}

.kpi-tooltip .tooltip-content {
  box-sizing: border-box;
  margin-inline: 8px; /* breathing room from screen edge */
}

@media (max-width: 640px) {
  .tooltip-content {
    left: 0;
    right: 0;
    transform: none;
    margin: 0 auto;
  }

  .tooltip-content::after {
    left: 16px;
    transform: none;
  }
}


.pressure-row {
  margin-bottom: 12px;
}

.pressure-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.pressure-bar {
  background: #e5e7eb;
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}

.pressure-fill {
  height: 100%;
  border-radius: 6px;
}

.pressure-fill.success {
  background: #16a34a;
}

.pressure-fill.warning {
  background: #f59e0b;
}

.pressure-fill.danger {
  background: #dc2626;
}


/* =========================================================
   OPS DASHBOARD – EXECUTIVE TYPOGRAPHY & HIERARCHY
   Scoped safely to #ops-dashboard
   ========================================================= */

#ops-dashboard {
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ------------------------------
   Card container (no background change)
------------------------------- */
#ops-dashboard .card {
  border-radius: 14px;
}

/* ------------------------------
   Card titles / labels
------------------------------- */
#ops-dashboard .card-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ------------------------------
   Primary KPI value (pill)
------------------------------- */
#ops-dashboard .card-value.status-pill {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 10px;
}

/* ------------------------------
   Subtext / context numbers
------------------------------- */
#ops-dashboard .card-subtext {
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.5;
}

#ops-dashboard .card-subtext strong {
  font-weight: 600;
  color: #111827;
}

/* ------------------------------
   Tooltips (subtle, professional)
------------------------------- */
#ops-dashboard .kpi-tooltip {
  font-size: 0.8rem;
  color: #3b82f6;
  cursor: pointer;
}

#ops-dashboard .tooltip-content {
  font-size: 0.75rem;
  line-height: 1.4;
}

/* ------------------------------
   Panels (OPEX Budget Pressure)
------------------------------- */
#ops-dashboard .panel {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Panel heading */
#ops-dashboard .panel h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

/* ------------------------------
   Budget pressure rows
------------------------------- */
#ops-dashboard .pressure-row {
  margin-bottom: 12px;
}

#ops-dashboard .pressure-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 4px;
}

#ops-dashboard .pressure-label span {
  font-weight: 600;
  color: #374151;
}

/* Pressure bar */
#ops-dashboard .pressure-bar {
  background: #e5e7eb;
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}

#ops-dashboard .pressure-fill {
  height: 100%;
  border-radius: 6px;
}

/* Status colors (scoped) */
#ops-dashboard .pressure-fill.success {
  background-color: #16a34a;
}

#ops-dashboard .pressure-fill.warning {
  background-color: #f59e0b;
}

#ops-dashboard .pressure-fill.danger {
  background-color: #dc2626;
}

/* ------------------------------
   Alerts list (spending headroom)
------------------------------- */
#ops-dashboard .card-alerts {
  margin-top: 8px;
  padding-left: 18px;
  font-size: 0.8rem;
  color: #92400e;
}

/* ------------------------------
   Grid spacing rhythm
------------------------------- */
#ops-dashboard .summary-grid {
  gap: 18px;
}


/* =========================================
   TAB BAR – ACTIVE UNDERLINE INDICATOR
   ========================================= */

.tab-bar {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #e5e7eb; /* subtle divider */
  padding-bottom: 6px;
}

.tab-bar .tab-btn5 {
  background: none;
  border: none;
  padding: 10px 2px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #6b7280; /* inactive gray */
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

/* Hover (optional but nice) */
.tab-bar .tab-btn5:hover {
  color: #374151;
}

/* Active tab */
.tab-bar .tab-btn5.active {
  color: #0f172a; /* near-black */
  font-weight: 600;
}

/* Underline indicator */
.tab-bar .tab-btn5.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 3px;
  background-color: #2563eb; /* blue underline */
  border-radius: 2px;
}


.tab-bar .tab-btn5::after {
  transform: scaleX(0);
  transition: transform 0.25s ease;
  transform-origin: left;
}

.tab-bar .tab-btn5.active::after {
  transform: scaleX(1);
}


.tab-content5 {
  display: none;
}

.tab-content5.active {
  display: block;
}
