/* Custom styles bổ sung Tailwind */

.nav-tab {
  color: #64748b;
}
.nav-tab:hover {
  background: #f1f5f9;
}
.nav-tab.active {
  background: #fee2e2;
  color: #dc2626;
}

/* Mobile bottom nav */
.nav-tab-mobile {
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.nav-tab-mobile.active {
  color: #dc2626;
}
.nav-tab-mobile:active {
  background: #f1f5f9;
}

/* iOS safe area for notch & home indicator */
.safe-top {
  padding-top: env(safe-area-inset-top);
}
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

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

.kpi-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  width: 100%;
  font-family: inherit;
}
.kpi-clickable {
  cursor: pointer;
  transition: all 0.15s;
}
.kpi-clickable:hover {
  border-color: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
  transform: translateY(-1px);
}
.kpi-clickable:active {
  transform: translateY(0);
}
.kpi-hint {
  font-size: 10px;
  color: #cbd5e1;
  margin-top: 6px;
  font-weight: 500;
}
.kpi-clickable:hover .kpi-hint {
  color: #dc2626;
}

.chart-wrap {
  position: relative;
  height: 280px;
}
.kpi-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.kpi-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1.2;
}

.view-toggle {
  color: #64748b;
  background: white;
}
.view-toggle.active {
  background: #1e293b;
  color: white;
  border-color: #1e293b;
}

.modal-tab {
  color: #64748b;
  border-bottom: 2px solid transparent;
}
.modal-tab:hover {
  background: #f8fafc;
}
.modal-tab.active {
  color: #dc2626;
  border-bottom-color: #dc2626;
}

.stage-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-weight: 500;
  white-space: nowrap;
}
.stage-tiep-can   { background: #f1f5f9; color: #475569; }
.stage-khao-sat   { background: #dbeafe; color: #1e40af; }
.stage-bao-gia    { background: #e0e7ff; color: #4338ca; }
.stage-dam-phan   { background: #fef3c7; color: #92400e; }
.stage-ky-hd      { background: #fed7aa; color: #9a3412; }
.stage-trien-khai { background: #d9f99d; color: #3f6212; }
.stage-nghiem-thu { background: #bbf7d0; color: #166534; }
.stage-van-hanh   { background: #a7f3d0; color: #065f46; }

.status-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-weight: 500;
}
.status-active { background: #dbeafe; color: #1e40af; }
.status-won    { background: #bbf7d0; color: #166534; }
.status-lost   { background: #fecaca; color: #991b1b; }

.sentiment-champion { color: #16a34a; }
.sentiment-neutral  { color: #64748b; }
.sentiment-opposed  { color: #dc2626; }

.deal-row {
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}
.deal-row:hover { background: #f8fafc; }

.kanban-col {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: 280px;
  padding: 10px;
  flex-shrink: 0;
}
.kanban-col h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #475569;
  display: flex;
  justify-content: space-between;
}
.kanban-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 13px;
}
.kanban-card:hover {
  border-color: #dc2626;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.product-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.activity-item, .task-item {
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
}
.activity-item .meta, .task-item .meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
.task-item.overdue { border-left-color: #dc2626; background: #fef2f2; }
.task-item.today { border-left-color: #f59e0b; background: #fffbeb; }
.task-item.done { opacity: 0.5; text-decoration: line-through; }

.empty-state {
  text-align: center;
  padding: 24px;
  color: #94a3b8;
  font-size: 13px;
}
