/* ==========================================================================
   stevennguyen — OCC-04: Bàn Tối ưu Chi phí Bất thường (IROPS Cost & Pax Recovery)
   5-Bucket Disruption Economics · Cost Index Speed-up · FIM · Budget & Pax Gate
   ========================================================================== */

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

.cost-sc-btn {
  text-align: left;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  border: 1px solid #1E3A5F;
  background: #09172B;
  color: #E6F2FF;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
  min-width: 0;
}

.cost-sc-btn:hover {
  border-color: #38BDF8;
  background: #0D213D;
}

.cost-sc-btn.active {
  border-color: #38BDF8;
  background: rgba(56, 189, 248, 0.15);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.cost-sc-code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #7DD3FC;
  margin-bottom: 3px;
}

.cost-sc-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 3px;
}

.cost-sc-sub {
  font-size: 11.5px;
  color: #9BB8D8;
  line-height: 1.4;
}

.cost-reset-btn {
  background: #0F233F;
  color: #7DD3FC;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cost-reset-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38BDF8;
}

.cost-context-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: #09172B;
  border: 1px solid #1B3355;
  margin-bottom: 14px;
  font-size: 12.8px;
  color: #D6E6F7;
  min-width: 0;
}

.cost-context-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cost-tag-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7DD3FC;
}

.cost-tag-pill.amber {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(251, 191, 36, 0.45);
  color: #FCD34D;
}

.cost-tag-pill.purple {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(192, 132, 252, 0.45);
  color: #D8B4FE;
}

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

.cost-kpi-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #9BB8D8;
  margin-top: 4px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Interactive Commercial Assumptions & Budget Governance Panel */
.cost-controls-panel {
  background: #09172B;
  border: 1px solid #1B3355;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  min-width: 0;
}

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

.cost-slider-box {
  background: #06101E;
  border: 1px solid #162E4D;
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  min-width: 0;
}

.cost-slider-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 5px;
}

.cost-slider-head label {
  font-size: 12px;
  font-weight: 700;
  color: #E6F2FF;
}

.cost-slider-val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: #7DD3FC;
}

.cost-slider-box input[type="range"] {
  width: 100%;
  accent-color: #38BDF8;
  cursor: pointer;
}

.cost-slider-scale {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9.8px;
  color: #7FA2C7;
  margin-top: 3px;
}

.cost-escalation-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: #06101E;
  border: 1px solid #1C375B;
  color: #D6E6F7;
  font-size: 12.2px;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-width: 0;
}

.cost-escalation-row:hover {
  border-color: #38BDF8;
}

.cost-escalation-row.checked {
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(245, 158, 11, 0.12);
  color: #FFFFFF;
}

.cost-escalation-row input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #F59E0B;
  flex-shrink: 0;
  cursor: pointer;
}

.cost-escalation-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.18);
  color: #FCD34D;
  margin-right: 6px;
}

/* 4 Recovery Strategy Comparison Matrix */
.cost-section-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #7DD3FC;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

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

.cost-opt-card {
  text-align: left;
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  border: 1.5px solid #1B3355;
  background: #081526;
  color: #E6F2FF;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cost-opt-card:hover {
  border-color: #38BDF8;
  background: #0B1B31;
}

.cost-opt-card.selected {
  border-color: #38BDF8;
  background: #0C1F38;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.cost-opt-card.tone-good.selected {
  border-color: #34D399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.35);
}

.cost-opt-card.tone-alert.selected {
  border-color: #FB7185;
  box-shadow: 0 0 0 2px rgba(251, 113, 133, 0.38);
}

.cost-opt-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.cost-opt-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #7DD3FC;
}

.cost-opt-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  margin-top: 2px;
}

.cost-opt-pill {
  font-family: var(--font-mono);
  font-size: 10.2px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.cost-opt-pill.good {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: #6EE7B7;
}

.cost-opt-pill.warn {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #FCD34D;
}

.cost-opt-pill.alert {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(251, 113, 133, 0.6);
  color: #FDA4AF;
}

.cost-opt-pill.info {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7DD3FC;
}

.cost-opt-desc {
  font-size: 11.8px;
  color: #BFD6EE;
  line-height: 1.44;
}

.cost-bucket-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.8px;
}

.cost-bucket-box {
  background: #050F1D;
  border: 1px solid #152B48;
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  min-width: 0;
}

.cost-bucket-lbl {
  color: #8AB0D6;
  font-size: 9.5px;
  display: block;
}

.cost-bucket-val {
  color: #E6F2FF;
  font-weight: 700;
  font-size: 11px;
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.cost-opt-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  margin-top: auto;
  overflow-wrap: anywhere;
}

.cost-opt-footer.good {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #6EE7B7;
}

.cost-opt-footer.warn {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #FCD34D;
}

.cost-opt-footer.alert {
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(251, 113, 133, 0.6);
  color: #FDA4AF;
}

.cost-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #9BB8D8;
}

.cost-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.occ-wallboard .cost-gate-btn:disabled {
  background: #102038;
  color: #94B2D4;
  border-color: #243E63;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.cost-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: start;
}

.cost-audit-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cost-audit-item {
  background: #09172B;
  border: 1px solid #1B3355;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12.4px;
  color: #D6E6F7;
  line-height: 1.48;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cost-audit-item strong {
  color: #FFFFFF;
}

.cost-memo-pre {
  margin: 0;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: #040B15;
  border: 1px solid #1B3355;
  font-family: var(--font-mono);
  font-size: 11.8px;
  line-height: 1.62;
  color: #7DD3FC;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow-x: auto;
  max-width: 100%;
}

@media (max-width: 980px) {
  .cost-sc-grid,
  .cost-controls-grid,
  .cost-opt-grid,
  .cost-bottom-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cost-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cost-kpi-row,
  .cost-bucket-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
