/* ============================================================
   DASHBOARD CARDS shared by the admin and staff dashboards:
   Productivity, the Agenda (today / coming up) and the staff
   Report Highlights carousel. Token-driven for light and dark.
============================================================ */

/* ---- Productivity ---- */
.prod-sub { font-size: 0.78rem; color: var(--text3); margin: -6px 0 12px; }
/* Three across in a wide card, two in the narrow admin column or on a phone. */
.prod { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
body.pro .pro-card-link, .ud-card-link { white-space: nowrap; }
.prod-tile {
  background: var(--bg2); border-radius: var(--radius-sm, 10px); padding: 12px 14px; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.prod-label { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 600; color: var(--text2); }
.prod-label svg { width: 13px; height: 13px; color: var(--accent); flex-shrink: 0; }
.prod-num { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.prod-num small { font-size: 0.75rem; font-weight: 600; color: var(--text3); }
.prod-share {
  align-self: flex-start; font-size: 0.68rem; font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 999px; padding: 1px 8px;
}
.prod-delta { font-size: 0.7rem; color: var(--text3); }
.prod-delta--up { color: var(--status-submitted, #16a34a); }
.prod-delta--down { color: var(--status-failed, #dc2626); }
.prod-empty { font-size: 0.85rem; color: var(--text3); padding: 10px 0; }

/* ---- Agenda: today, then coming up ---- */
.ag-sec + .ag-sec { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.ag-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text2); margin-bottom: 4px;
}
.ag-head span { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text3); white-space: nowrap; }
.ag-list { display: flex; flex-direction: column; }
.ag-item { display: flex; align-items: center; gap: 11px; padding: 7px 0; min-width: 0; }
.ag-time {
  flex: 0 0 46px; font-size: 0.76rem; font-weight: 700; color: var(--text3); font-variant-numeric: tabular-nums;
}
.ag-bar { width: 3px; align-self: stretch; min-height: 28px; border-radius: 999px; background: var(--accent); flex-shrink: 0; }
.ag-bar--meeting { background: var(--badge-user, #60a5fa); }
.ag-bar--deadline { background: var(--status-draft, #ca8a04); }
.ag-bar--shift { background: var(--status-submitted, #16a34a); }
.ag-date {
  flex: 0 0 40px; display: flex; flex-direction: column; align-items: center;
  background: var(--bg2); border-radius: var(--radius-sm, 8px); padding: 4px 0;
}
.ag-date--deadline { box-shadow: inset 0 0 0 1px var(--status-draft, #ca8a04); }
.ag-mon { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 0.05em; }
.ag-day { font-size: 0.96rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.ag-body { flex: 1; min-width: 0; }
.ag-title { font-size: 0.85rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.ag-meta { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--text3); margin-top: 1px; overflow-wrap: anywhere; }
.ag-meta svg { flex-shrink: 0; }
.ag-left { font-size: 0.7rem; font-weight: 700; color: var(--text3); white-space: nowrap; }
.ag-left--soon { color: var(--status-draft, #ca8a04); }
.ag-left--now { color: var(--status-failed, #dc2626); }
.ag-more { font-size: 0.74rem; color: var(--text3); padding-top: 4px; }
.ag-empty { font-size: 0.82rem; color: var(--text3); padding: 6px 0; }

/* ---- Report highlights carousel (staff dashboard) ---- */
.ud-hl-body { transition: opacity 0.18s ease; }
.ud-hl-body.fading { opacity: 0; }
.ud-hl-slide { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 4px 4px 2px; }
.avatar.ud-hl-avatar { width: 56px; height: 56px; font-size: 1.1rem; margin-bottom: 4px; cursor: default; }
.ud-hl-name { font-weight: 700; font-size: 0.9rem; color: var(--text); overflow-wrap: anywhere; }
.ud-hl-role { font-size: 0.72rem; color: var(--text3); margin-top: -4px; }
.ud-hl-quote {
  font-family: 'DM Serif Display', serif; font-style: italic; font-size: 0.98rem; line-height: 1.5;
  color: var(--text2); margin: 6px 0 2px; overflow-wrap: anywhere;
}
.ud-hl-date { font-size: 0.72rem; color: var(--text3); }
.ud-hl-dots { display: flex; justify-content: center; gap: 4px; margin-top: 12px; }
.ud-hl-dot {
  width: 22px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ud-hl-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); transition: background 0.2s; }
.ud-hl-dot.active::before { background: var(--accent); }
.ud-hl-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 50%; }

/* ---- My Performance (admin Analytics) ---- */
.mp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mp-head select { width: auto; min-width: 180px; }
.mp-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.mp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; min-width: 0; }
.mp-card h3 { font-size: 0.95rem; margin: 0 0 4px; }
.mp-card .mp-note { font-size: 0.76rem; color: var(--text3); margin: 0 0 14px; }
.mp-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: end; height: 170px; }
.mp-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 100%; justify-content: flex-end; }
.mp-bars { display: flex; gap: 3px; align-items: flex-end; height: 120px; }
.mp-bars span { width: 10px; border-radius: 4px 4px 0 0; min-height: 2px; background: var(--accent); }
.mp-bars span.t { background: var(--badge-user, #60a5fa); }
.mp-bars span.g { background: var(--status-submitted, #16a34a); }
.mp-col b { font-size: 0.7rem; color: var(--text2); font-weight: 700; }
.mp-col em { font-style: normal; font-size: 0.68rem; color: var(--text3); white-space: nowrap; }
.mp-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.74rem; color: var(--text2); margin-top: 12px; }
.mp-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; background: var(--accent); vertical-align: -1px; }
.mp-legend i.t { background: var(--badge-user, #60a5fa); }
.mp-legend i.g { background: var(--status-submitted, #16a34a); }
.mp-share { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mp-share li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 0.84rem; }
.mp-share .mp-track { height: 9px; border-radius: 999px; background: var(--bg2); overflow: hidden; }
.mp-share .mp-track span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.mp-share b { font-variant-numeric: tabular-nums; }
.mp-share small { display: block; color: var(--text3); font-size: 0.7rem; }

@media (prefers-reduced-motion: reduce) { .ud-hl-body { transition: none; } }
@media (max-width: 900px) { .mp-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .prod-num { font-size: 1.35rem; }
}
