/* ============ Dashboard page (.pg-dashboard) ============ */

/* Cards laid out by grids must not inherit the stacked-card margin. */
.pg-dashboard .grid > .card { margin-top: 0; }
.pg-dashboard .dash-row { margin-top: 16px; }

/* ---------- hero ---------- */
.pg-dashboard .hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(620px 300px at 92% -50%, rgba(242, 202, 80, .30), transparent 62%),
    radial-gradient(540px 340px at -8% 135%, rgba(108, 74, 182, .55), transparent 60%),
    linear-gradient(135deg, var(--brand-700) 0%, var(--brand-800) 52%, var(--brand-900) 100%);
  color: #fff;
  padding: 26px 28px;
  box-shadow: var(--shadow);
}
/* The column-D sits in the hero as a quiet watermark. */
.pg-dashboard .hero::after {
  content: '';
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  width: 190px; height: 184px; opacity: .10; pointer-events: none;
  background: url('/brand/mark-white.png') center/contain no-repeat;
}
.pg-dashboard .hero-body { position: relative; z-index: 1; }
.pg-dashboard .hero-date {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
}
.pg-dashboard .hero-greet { font-size: 26px; font-weight: 800; margin: 6px 0 3px; color: #fff; }
.pg-dashboard .hero-sub { color: rgba(255,255,255,.66); font-size: 13px; font-weight: 600; }
.pg-dashboard .hero-chip {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 15px;
  background: rgba(242, 202, 80, .14); border: 1px solid rgba(242, 202, 80, .42);
  color: var(--gold); padding: 6px 14px; border-radius: 99px;
  font-size: 12px; font-weight: 700;
}
.pg-dashboard a.hero-chip:hover { background: rgba(242, 202, 80, .26); }
.pg-dashboard .hero-chip svg { width: 15px; height: 15px; flex: none; }
.pg-dashboard .hero-chip.is-quiet {
  background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .18); color: rgba(255,255,255,.66);
}

/* ---------- stat cards ---------- */
.pg-dashboard .stats { margin-top: 16px; }
.pg-dashboard a.stat {
  display: block; color: inherit;
  transition: transform .13s ease, box-shadow .13s ease, border-color .13s ease;
}
.pg-dashboard a.stat:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong);
}
.pg-dashboard .stat-value.val-red { color: var(--danger); }
.pg-dashboard .stat-value.val-gold { color: var(--gold-dark); }
.pg-dashboard .stat-sub .badge { margin-left: 4px; vertical-align: 1px; }

/* ---------- list embellishments ---------- */
.pg-dashboard .row-link { color: inherit; }
.pg-dashboard .row-link:hover { background: var(--fill); }
.pg-dashboard .list-row { border-radius: 8px; padding-left: 8px; padding-right: 8px; }

.pg-dashboard .cls-time {
  display: flex; flex-direction: column; align-items: flex-end;
  min-width: 62px; flex: none; font-size: 12.5px; font-weight: 700; line-height: 1.35;
}
.pg-dashboard .cls-end { font-size: 11px; color: var(--muted); font-weight: 600; }
.pg-dashboard .cls-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.pg-dashboard .ev-date {
  width: 44px; height: 46px; border-radius: 10px; flex: none;
  background: var(--accent-tint); color: var(--indigo-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pg-dashboard .ev-day { font-size: 16px; font-weight: 800; line-height: 1.1; }
.pg-dashboard .ev-mon {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}

.pg-dashboard .pin-ic { color: var(--gold-dark); display: inline-flex; vertical-align: -2px; margin-right: 5px; }
.pg-dashboard .pin-ic svg { width: 13px; height: 13px; }
.pg-dashboard .ann-body { margin-top: 2px; }

.pg-dashboard .card-link {
  font-size: 12.5px; font-weight: 700; color: var(--indigo-3);
  display: inline-flex; align-items: center; gap: 2px; white-space: nowrap;
}
.pg-dashboard .card-link:hover { color: var(--indigo); }
.pg-dashboard .card-link svg { width: 14px; height: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .pg-dashboard .hero { padding: 20px; }
  .pg-dashboard .hero-greet { font-size: 21px; }
  .pg-dashboard .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pg-dashboard .stat { padding: 13px 14px; }
  .pg-dashboard .stat .stat-value { font-size: 22px; }
  .pg-dashboard .cls-time { min-width: 56px; }
  .pg-dashboard .list-row { padding-left: 4px; padding-right: 4px; }
}

/* ---------- hero: greeting plus the two facts that matter today ---------- */
.pg-dashboard .hero { padding: 24px 28px 22px; }
.pg-dashboard .hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.pg-dashboard .hero-greet { font-size: 27px; letter-spacing: -.028em; }
.pg-dashboard .hero-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14);
}
.pg-dashboard .hero-fact {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10);
  text-decoration: none; transition: background var(--t), border-color var(--t), transform .12s var(--ease);
}
.pg-dashboard .hero-fact:hover { background: rgba(255, 255, 255, .11); border-color: rgba(242, 202, 80, .45); transform: translateY(-1px); }
.pg-dashboard .hf-label {
  font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--g-400);
}
.pg-dashboard .hf-value { font-size: 14.5px; font-weight: 700; color: #fff; line-height: 1.3; }
.pg-dashboard .hf-meta { font-size: 11.5px; color: rgba(255, 255, 255, .62); }

/* ---------- attendance ring ---------- */
.pg-dashboard .stat-ring-card {
  display: flex; align-items: center; gap: 15px; text-decoration: none; color: inherit;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.pg-dashboard .stat-ring-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.pg-dashboard .ring {
  position: relative; width: 66px; height: 66px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--n-150) 0);
  display: grid; place-items: center;
}
.pg-dashboard .stat-ring-card.is-low .ring { background: conic-gradient(var(--danger) calc(var(--pct) * 1%), var(--n-150) 0); }
.pg-dashboard .ring::before {
  content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--card);
}
.pg-dashboard .ring span { position: relative; font-size: 15px; font-weight: 780; letter-spacing: -.02em; }
.pg-dashboard .stat-ring-card.is-low .ring span { color: var(--danger); }
.pg-dashboard .ring-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pg-dashboard .ring-meta .stat-sub { margin: 0; }
.pg-dashboard .ring-meta .badge { align-self: flex-start; }

/* ---------- today's classes as a timeline ---------- */
.pg-dashboard .tl { list-style: none; margin: 0; padding: 0; }
.pg-dashboard .tl-item { display: grid; grid-template-columns: 58px 22px 1fr auto; align-items: start; gap: 10px; padding: 9px 0; }
.pg-dashboard .tl-time { text-align: right; display: flex; flex-direction: column; line-height: 1.25; padding-top: 1px; }
.pg-dashboard .tl-time b { font-size: 12.5px; font-weight: 750; }
.pg-dashboard .tl-time span { font-size: 11px; color: var(--text-3); }
.pg-dashboard .tl-rail { position: relative; display: flex; justify-content: center; align-self: stretch; }
.pg-dashboard .tl-rail::before {
  content: ''; position: absolute; top: 0; bottom: -18px; width: 2px; background: var(--line);
}
.pg-dashboard .tl-item:last-child .tl-rail::before { display: none; }
.pg-dashboard .tl-dot {
  position: relative; width: 11px; height: 11px; border-radius: 50%; margin-top: 4px;
  background: var(--cc, var(--accent)); box-shadow: 0 0 0 3px var(--card);
}
.pg-dashboard .tl-title { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pg-dashboard .tl-sub { font-size: 12px; color: var(--text-2); }
.pg-dashboard .tl-room { align-self: center; }
.pg-dashboard .tl-live {
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--g-700); background: var(--g-100); padding: 2px 7px; border-radius: var(--r-pill);
}
.pg-dashboard .tl-item.is-done .tl-time, .pg-dashboard .tl-item.is-done .tl-sub { opacity: .6; }
.pg-dashboard .tl-item.is-done .tl-title { color: var(--text-2); font-weight: 650; }
.pg-dashboard .tl-item.is-done .tl-room { opacity: .6; }
.pg-dashboard .tl-item.is-done .tl-dot { background: var(--n-300); }
.pg-dashboard .tl-item.is-now .tl-dot { box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--g-200); }

@media (max-width: 760px) {
  .pg-dashboard .hero { padding: 18px 18px 16px; }
  .pg-dashboard .hero-top { flex-direction: column; gap: 12px; }
  .pg-dashboard .hero-facts { grid-template-columns: 1fr; margin-top: 16px; padding-top: 14px; }
  .pg-dashboard .stat-ring-card { gap: 12px; }
  .pg-dashboard .ring { width: 58px; height: 58px; }
  .pg-dashboard .tl-item { grid-template-columns: 50px 20px 1fr; }
  .pg-dashboard .tl-room { grid-column: 3; justify-self: start; margin-top: 2px; }
}
