/* ── Company Dashboard ───────────────────────────────────────────────────── */

.company-dashboard {
  animation: dashboard-fadeInUp 0.4s ease-out;
  margin-bottom: 20px;
}

@keyframes dashboard-fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero Banner ─────────────────────────────────────────────────────────── */

.dashboard-hero {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
}

.dashboard-hero-description {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.dashboard-hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* ── Metrics Row ─────────────────────────────────────────────────────────── */

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.dashboard-metric-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.dashboard-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 10px 10px 0 0;
  opacity: 0.7;
}

.dashboard-metric-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* Color coding per metric type */
.metric--active::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.metric--completed::before { background: linear-gradient(90deg, #22c55e, #4ade80); }
.metric--review::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.metric--conversations::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.metric--automations::before { background: linear-gradient(90deg, #ec4899, #f472b6); }
.metric--tools::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }

.dashboard-metric-icon {
  font-size: 0.85rem;
  opacity: 0.5;
  display: block;
  margin-bottom: 2px;
}

.dashboard-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dashboard-metric-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: dashboard-pulse-anim 2s ease-in-out infinite;
}

.dashboard-pulse--review {
  background: #f59e0b;
}

@keyframes dashboard-pulse-anim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}

/* ── Two-Column Layout ───────────────────────────────────────────────────── */

.dashboard-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  align-items: stretch;
}

.dashboard-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
}

.dashboard-panel--compact {
  align-self: start;
}

.dashboard-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dashboard-panel-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.dashboard-view-all {
  background: none;
  border: none;
  color: rgba(99, 102, 241, 0.8);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.dashboard-view-all:hover {
  color: rgba(129, 140, 248, 1);
  background: rgba(99, 102, 241, 0.1);
}

/* ── Activity Timeline ───────────────────────────────────────────────────── */

.dashboard-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.dashboard-activity-list::-webkit-scrollbar {
  width: 4px;
}

.dashboard-activity-list::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-activity-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.dashboard-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.dashboard-activity-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Left border color coding by state */
.dashboard-activity-item--COMPLETED,
.dashboard-activity-item--CLOSED { border-left-color: rgba(34, 197, 94, 0.4); }
.dashboard-activity-item--FAILED { border-left-color: rgba(239, 68, 68, 0.4); }
.dashboard-activity-item--CANCELLED { border-left-color: rgba(107, 114, 128, 0.4); }
.dashboard-activity-item--STOPPED { border-left-color: rgba(245, 158, 11, 0.4); }
.dashboard-activity-item--RUNNING { border-left-color: rgba(59, 130, 246, 0.4); }
.dashboard-activity-item--PENDING { border-left-color: rgba(139, 92, 246, 0.3); }
.dashboard-activity-item--AWAITING_HUMAN { border-left-color: rgba(245, 158, 11, 0.5); }
.dashboard-activity-item--WAITING_FOR_TRIGGER { border-left-color: rgba(236, 72, 153, 0.4); }

.dashboard-activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.dashboard-activity-dot--COMPLETED,
.dashboard-activity-dot--CLOSED { background: #22c55e; }
.dashboard-activity-dot--FAILED { background: #ef4444; }
.dashboard-activity-dot--CANCELLED { background: #6b7280; }
.dashboard-activity-dot--STOPPED { background: #f59e0b; }
.dashboard-activity-dot--RUNNING { background: #3b82f6; }
.dashboard-activity-dot--PENDING { background: #8b5cf6; }
.dashboard-activity-dot--AWAITING_HUMAN { background: #f59e0b; }
.dashboard-activity-dot--WAITING_FOR_TRIGGER { background: #ec4899; }

.dashboard-activity-body {
  flex: 1;
  min-width: 0;
}

.dashboard-activity-title {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-activity-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 1px;
}

/* ── Panel Actions (integrated quick actions) ────────────────────────────── */

.dashboard-panel-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Team Activity ───────────────────────────────────────────────────────── */

.dashboard-team-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.dashboard-team-list::-webkit-scrollbar {
  width: 4px;
}

.dashboard-team-list::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-team-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.dashboard-team-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.dashboard-team-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-team-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-team-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.dashboard-team-info {
  flex: 1;
  min-width: 0;
}

.dashboard-team-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dashboard-team-name {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
}

.dashboard-team-role {
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(139, 92, 246, 0.8);
  background: rgba(139, 92, 246, 0.12);
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: capitalize;
  white-space: nowrap;
}

.dashboard-team-meta {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 1px;
}

/* ── Quick Actions ───────────────────────────────────────────────────────── */

.dashboard-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dashboard-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.dashboard-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.dashboard-action-btn--primary {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.12);
  color: rgba(165, 180, 252, 0.9);
}

.dashboard-action-btn--primary:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.5);
}

.dashboard-action-icon {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.dashboard-empty-hint {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  padding: 12px 0;
}

/* ── Getting Started ─────────────────────────────────────────────────────── */

.dashboard-getting-started {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(99, 102, 241, 0.5);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
  animation: dashboard-fadeInUp 0.4s ease-out;
}

.dashboard-gs-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 16px 0;
}

.dashboard-setup-checklist {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dashboard-setup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: color 0.2s;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-setup-item:hover {
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-setup-item--done {
  color: rgba(34, 197, 94, 0.8);
}

.dashboard-setup-item--done:hover {
  color: rgba(34, 197, 94, 0.9);
}

.dashboard-setup-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.dashboard-suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.dashboard-suggestion-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s;
}

.dashboard-suggestion-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.dashboard-suggestion-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-suggestion-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.dashboard-suggestion-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.dashboard-suggestion-reason {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

.dashboard-suggestion-btn {
  align-self: flex-start;
  margin-top: auto;
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.15);
  color: rgba(165, 180, 252, 0.9);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.dashboard-suggestion-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.6);
}

.dashboard-suggestion-btn--created {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.15);
  color: rgba(134, 239, 172, 0.9);
  cursor: default;
}

.dashboard-suggestion-btn--created:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
}

/* Shimmer loading placeholders */
.dashboard-shimmer {
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: dashboard-shimmer-anim 1.5s ease-in-out infinite;
  border-radius: 10px;
  min-height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@keyframes dashboard-shimmer-anim {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Resource Tiles ─────────────────────────────────────────────────────── */

.dashboard-resource-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .dashboard-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-hero {
    padding: 16px;
  }
}
