/* style.css — bổ sung cho Tailwind, tông executive navy/teal */

.tab-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.tab-btn:hover { color: rgba(255,255,255,0.9); }
.tab-btn.active {
  color: #fff;
  border-bottom-color: #2dd4bf;
}

.screen { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: translateY(0);} }

/* ===== KPI cards ===== */
.kpi-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.kpi-card:hover { box-shadow: 0 6px 18px rgba(15,23,42,0.08); transform: translateY(-2px); }
.kpi-tone-ok { border-left: 4px solid #16a34a; }
.kpi-tone-warning { border-left: 4px solid #d97706; }
.kpi-tone-danger { border-left: 4px solid #dc2626; }

/* ===== Scenario / Decision cards ===== */
.scenario-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  width: fit-content;
}
.risk-high { background: #fee2e2; color: #b91c1c; }
.risk-medium { background: #ffedd5; color: #c2410c; }
.risk-low { background: #dcfce7; color: #15803d; }

/* ===== Source system badges ===== */
.src-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.src-ERP { background: #dbeafe; color: #1d4ed8; }
.src-MES { background: #ccfbf1; color: #0f766e; }
.src-Excel { background: #fef3c7; color: #b45309; }
.src-Zalo { background: #fee2e2; color: #b91c1c; }

/* ===== Ontology graph ===== */
.graph-col {
  display: flex;
  flex-direction: column;
  min-width: 168px;
  max-width: 168px;
}
.graph-col-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 8px;
}
.graph-node {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.graph-node:hover { border-color: #0d9488; box-shadow: 0 2px 8px rgba(13,148,136,0.15); }
.graph-node .gn-name { font-weight: 700; color: #1e293b; display:block; margin-bottom:2px; }
.graph-node .gn-sub { color: #64748b; font-size: 10px; }
.graph-node .gn-dot {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
}
.dot-ok { background: #16a34a; }
.dot-watch, .dot-warning, .dot-quality_watch, .dot-quality_hold, .dot-running_short, .dot-running_slow, .dot-running_degraded, .dot-shortfall, .dot-waiting_fabric, .dot-at_risk, .dot-pending { background: #d97706; }
.dot-risk, .dot-danger, .dot-degraded { background: #dc2626; }
.dot-done, .dot-ready, .dot-on_track, .dot-running { background: #16a34a; }
.dot-in_progress { background: #0ea5e9; }

.graph-node.is-selected { border-color: #0b1e33; box-shadow: 0 0 0 3px rgba(11,30,51,0.15); background: #eef2ff; }
.graph-node.is-linked { border-color: #2dd4bf; background: #f0fdfa; }
.graph-node.is-dimmed { opacity: 0.35; }

/* ===== Toast ===== */
.toast-box {
  background: #0b1e33;
  color: #fff;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  font-size: 13px;
  max-width: 340px;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { opacity:0; transform: translateY(8px);} to {opacity:1; transform: translateY(0);} }

/* ===== Drill-through ===== */
.chain-step {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 210px;
  flex: 1;
}
.chain-arrow { color: #94a3b8; font-size: 20px; align-self: center; }
.option-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}
.option-card.is-approved { border-color: #16a34a; background: #f0fdf4; }
.option-card.is-recommended { border-color: #0d9488; }

.chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}
.chip:hover { background: #e2e8f0; }

.scenario-nav-item {
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  border: 1px solid transparent;
}
.scenario-nav-item:hover { background: #f1f5f9; }
.scenario-nav-item.active { background: #0b1e33; color: #fff; }

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
