/* =========================================================
   NexaAI — Cards, Badges, Alerts, Stats
   ========================================================= */

.card-nexa {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.card-nexa-flush { padding: 0; }

.card-nexa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.card-nexa-body { padding: 24px; }

.card-nexa-hover {
  transition: border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard);
}
.card-nexa-hover:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

/* Stat card */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-soft-ink);
}
.stat-delta {
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.stat-delta.up { color: var(--success); }
.stat-delta.down { color: var(--danger); }

/* Badges */
.badge-nexa {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  line-height: 1.6;
}
.badge-nexa::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--surface-2); color: var(--text-muted); }

/* Alerts */
.alert-nexa {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid transparent;
  font-size: 0.88rem;
}
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}
.empty-state-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}

/* Avatar */
.avatar-nexa {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}
.avatar-nexa-sm { width: 28px; height: 28px; }
.avatar-nexa-lg { width: 48px; height: 48px; }

/* Toast */
.toast-stack-nexa {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1600;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}
.toast-nexa {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  animation: nexa-toast-in var(--dur-base) var(--ease-standard);
}
@keyframes nexa-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tabs */
.tabs-nexa {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}
.tabs-nexa .tab-item {
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tabs-nexa .tab-item.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

/* Timeline */
.timeline-nexa { list-style: none; margin: 0; padding: 0; }
.timeline-nexa li {
  position: relative;
  padding-left: 24px;
  padding-bottom: 20px;
  border-left: 1px solid var(--border);
  margin-left: 6px;
}
.timeline-nexa li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline-nexa li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
}

/* Accordion */
.accordion-nexa-item { border-bottom: 1px solid var(--border); }
.accordion-nexa-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.accordion-nexa-btn .chev { transition: transform var(--dur-fast) var(--ease-standard); color: var(--text-faint); }
.accordion-nexa-item.open .chev { transform: rotate(180deg); }
.accordion-nexa-panel {
  display: none;
  padding-bottom: 16px;
  color: var(--text-muted);
}
.accordion-nexa-item.open .accordion-nexa-panel { display: block; }
