/* ============================================================
   CCW Portal — Dashboard View
   ============================================================ */

.ccw-dashboard {}

/* ── Welcome Banner ───────────────────────────────────────── */
.ccw-dashboard__welcome {
  background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-primary-dark) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  color: white;
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  overflow: hidden;
  position: relative;
}

.ccw-dashboard__welcome::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
}

.ccw-dashboard__welcome-text {}

.ccw-dashboard__welcome-greeting {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-1);
}

.ccw-dashboard__welcome-sub {
  font-size: var(--text-sm);
  opacity: 0.85;
}

.ccw-dashboard__welcome-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* ── Stats Grid ───────────────────────────────────────────── */
.ccw-dashboard__stats {
  margin-bottom: var(--space-6);
}

/* ── Quick Actions ────────────────────────────────────────── */
.ccw-dashboard__quick-actions {
  margin-bottom: var(--space-6);
}

.ccw-dashboard__section-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

/* ── Two Column Layout ────────────────────────────────────── */
.ccw-dashboard__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

/* ── Recent Activity ──────────────────────────────────────── */
.ccw-dashboard__activity {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ccw-dashboard__activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.ccw-dashboard__activity-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.ccw-dashboard__activity-body {
  padding: var(--space-4);
}

/* ── SLA Summary sidebar widget ───────────────────────────── */
.ccw-sla-widget {
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: fit-content;
}

.ccw-sla-widget__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.ccw-sla-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-3);
}

.ccw-sla-item:last-child {
  border-bottom: none;
}

.ccw-sla-item__info {
  min-width: 0;
}

.ccw-sla-item__id {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--color-text-tertiary);
}

.ccw-sla-item__subject {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ccw-sla-item__deadline {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  flex-shrink: 0;
}

.ccw-sla-item--breached .ccw-sla-item__deadline {
  color: var(--color-error);
}

.ccw-sla-item--warning .ccw-sla-item__deadline {
  color: var(--color-warning);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ccw-dashboard__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ccw-dashboard__welcome {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-5) var(--space-6);
  }

  .ccw-dashboard__welcome-actions {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .ccw-dashboard__welcome {
    padding: var(--space-4);
  }

  .ccw-dashboard__welcome-greeting {
    font-size: var(--text-xl);
  }
}
