/* public/css/components.css — Reusable component styles for Qorva AI */

/* ---- Toast animation ---- */
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ---- Stat cards ---- */
.stat-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card .stat-label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: #e2e8f0; }
.stat-card .stat-sub   { font-size: 12px; color: #94a3b8; }

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-teal    { background: rgba(20,184,166,0.15); color: #14b8a6; }
.badge-green   { background: rgba(34,197,94,0.15);  color: #22c55e; }
.badge-orange  { background: rgba(249,115,22,0.15); color: #f97316; }
.badge-red     { background: rgba(239,68,68,0.15);  color: #ef4444; }
.badge-slate   { background: rgba(100,116,139,0.15);color: #94a3b8; }

/* ---- Score pill ---- */
.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid currentColor;
}
.score-pill.excellent { color: #22c55e; }
.score-pill.good      { color: #14b8a6; }
.score-pill.average   { color: #f97316; }
.score-pill.poor      { color: #ef4444; }

/* ---- Progress bar ---- */
.progress-bar-track {
  background: #1e293b;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #14b8a6;
  transition: width 0.4s ease;
}

/* ---- Table ---- */
.qorva-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.qorva-table th {
  text-align: left;
  padding: 10px 14px;
  background: #1e293b;
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #334155;
}
.qorva-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #1e293b;
  color: #cbd5e1;
}
.qorva-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #64748b;
}
.empty-state h3 { color: #94a3b8; margin-bottom: 8px; }

/* ---- Loading spinner ---- */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid #334155;
  border-top-color: #14b8a6;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Alert boxes ---- */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid transparent;
  margin-bottom: 12px;
}
.alert-error   { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.3);  color: #86efac; }
.alert-warning { background: rgba(249,115,22,0.1); border-color: rgba(249,115,22,0.3); color: #fdba74; }
.alert-info    { background: rgba(20,184,166,0.1); border-color: rgba(20,184,166,0.3); color: #5eead4; }
