/* ── Dashboard Colors ── */
:root {
  --dc-analyses: #2e86c1;
  --dc-analyses-bg: #d6eaf8;
  --dc-messages: #27ae60;
  --dc-messages-bg: #d5f5e3;
  --dc-links: #8e44ad;
  --dc-links-bg: #e8daef;
  --dc-decisions: #d35400;
  --dc-decisions-bg: #fadbd8;
  --dc-actions: #16a085;
  --dc-actions-bg: #d1f2eb;
  --dc-tokens: #2c3e50;
  --dc-tokens-bg: #eaecee;
}

/* ── Dashboard Hero ── */
.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.dashboard-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 4px;
}

.dashboard-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: background 0.15s, transform 0.05s;
}

.btn-primary:hover {
  background: #1e4f5c;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── Stat Cards Grid ── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.05s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 22px;
  flex-shrink: 0;
}

.stat-card-body {
  display: flex;
  flex-direction: column;
}

.stat-card-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text);
}

.stat-card-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ── Dashboard Grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-card-wide {
  grid-column: 1 / -1;
}

/* ── Activity Chart ── */
.activity-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  height: 160px;
  padding-top: 20px;
}

.activity-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.activity-bar-track {
  flex: 1;
  width: 100%;
  max-width: 48px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.activity-bar-fill {
  width: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  transition: height 0.3s ease;
  min-height: 4px;
}

.activity-bar-fill.activity-bar-today {
  background: var(--color-accent);
}

.activity-bar-label {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.activity-bar-label.activity-bar-today {
  color: var(--color-accent);
  font-weight: 700;
}

.activity-bar-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text);
}

/* ── Breakdown List ── */
.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breakdown-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.breakdown-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.breakdown-name {
  font-size: 13px;
  font-weight: 500;
  width: 70px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breakdown-bar-track {
  flex: 1;
  height: 8px;
  background: var(--color-bg);
  border-radius: 99px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

.breakdown-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Rooms Grid ── */
.rooms-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.room-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 13px;
}

.room-rank {
  font-weight: 800;
  color: var(--color-accent);
  font-size: 12px;
}

.room-name {
  font-weight: 500;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-count {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* ── Card Title Header ── */
.card-title-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-accent);
}

/* ── Table Extra Columns ── */
.col-model {
  width: 100px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.col-duration {
  width: 80px;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ── Quick Actions ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.15s, transform 0.05s, border-color 0.15s;
}

.quick-action-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-primary);
  text-decoration: none;
}

.quick-action-icon {
  font-size: 28px;
}

.quick-action-label {
  font-size: 14px;
  font-weight: 600;
}

/* ── Button Outline ── */
.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

/* ── Dashboard Empty State ── */
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .dashboard-title {
    font-size: 22px;
  }

  .stat-cards {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .activity-chart {
    height: 120px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card-value {
    font-size: 22px;
  }

  .col-model,
  .col-duration {
    display: none;
  }
}
