/* ============================================================
   DASHBOARD — scrollable page, no slide panel
   ============================================================ */

.dashboard-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 32px;
}

/* ---- Alert banner ---------------------------------------- */
.dash-alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13.5px;
  color: #92400E;
  font-weight: 500;
}
.dash-alert-banner a {
  color: #92400E;
  text-decoration: underline;
  cursor: pointer;
}

/* ---- KPI cards ------------------------------------------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}
.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.1;
}
.kpi-value.kpi-money {
  font-size: 20px;
}
.kpi-value.kpi-danger { color: var(--danger); }
.kpi-value.kpi-success { color: var(--success); }
.kpi-sub {
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 5px;
}

/* ---- Alert strip (overdue / renewals / follow-ups) ------- */
.dash-alert-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-alert-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}
.dash-alert-chip.danger {
  background: #FEE2E2;
  color: #991B1B;
  border-color: #FECACA;
}
.dash-alert-chip.warning {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FDE68A;
}
.dash-alert-chip.info {
  background: #DBEAFE;
  color: #1E40AF;
  border-color: #BFDBFE;
}
.dash-alert-chip:hover { filter: brightness(0.96); }

/* ---- Main two-column grid -------------------------------- */
.dash-main-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 14px;
  align-items: start;
}

/* ---- Chart card ------------------------------------------ */
.dash-chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.dash-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.dash-chart-canvas-wrap {
  position: relative;
  height: 240px;
}

/* ---- Activity feed --------------------------------------- */
.dash-activity-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.activity-feed-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.activity-feed-item:last-child { border-bottom: none; }
.activity-feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 5px;
}
.activity-feed-text {
  font-size: 12.5px;
  color: var(--text-1);
  line-height: 1.5;
  flex: 1;
}
.activity-feed-time {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  margin-top: 2px;
}

/* ---- Employee dashboard ---------------------------------- */
.employee-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.employee-dash-grid .dash-chart-card {
  grid-column: 1 / -1;
}
.emp-task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.emp-task-item:last-child { border-bottom: none; }
.emp-task-text {
  flex: 1;
}
.emp-task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
}
.emp-task-meta {
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 2px;
}
.emp-task-overdue { color: var(--danger); font-weight: 600; }

/* ---- Empty / loading states ------------------------------ */
.dash-empty {
  font-size: 13px;
  color: var(--text-2);
  padding: 14px 0;
  text-align: center;
}

/* ---- Manager workload bars (audit G16, G19) ---------------
   Used by renderManagerDashboard(). The question on this card is comparative —
   who has more than the others — and a column of numbers makes that arithmetic
   the reader's job. */

.workload-track {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: var(--bg);
  margin-top: 5px;
  overflow: hidden;
  max-width: 260px;
}
.workload-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

/* The right-hand figure on a Manager dashboard row — hours, or a percentage.
   emp-task-item is a flex row, so this just needs to stop being squeezed. */
.dash-row-value {
  margin-left: auto;
  padding-left: 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-1);
  white-space: nowrap;
  flex-shrink: 0;
}
