/* ============================================================
   dashboard-hub.css — PrepWithTee Student Productivity Hub
   ============================================================ */

/* ── Page shell ─────────────────────────────────────────────── */
.hub-page { padding: 0; }

/* ── Hero welcome strip ─────────────────────────────────────── */
.hub-hero {
  background: linear-gradient(135deg, #160f30 0%, #2a1f5c 45%, #1e3260 100%);
  padding: 32px 32px 36px;
  display: flex; align-items: flex-end;
  justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.hub-hero::before {
  content: ''; position: absolute; top: -90px; right: -90px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,145,58,.22) 0%, transparent 65%);
  pointer-events: none;
}
.hub-hero::after {
  content: ''; position: absolute; bottom: -70px; left: 28%;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108,59,255,.18) 0%, transparent 65%);
  pointer-events: none;
}
.hub-hero-left {
  flex: 1; min-width: 260px;
  position: relative; z-index: 1;
}
.hub-greeting-time {
  display: block;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.45); margin-bottom: 5px;
}
.hub-greeting-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  font-weight: 900; line-height: 1.08; color: #fff;
}
.hub-greeting-name em { font-style: normal; color: var(--gold); }
.hub-quote {
  font-size: .87rem; color: rgba(255,255,255,.58);
  margin: 10px 0 20px; max-width: 460px;
  font-style: italic; line-height: 1.55;
}
/* XP level bar */
.hub-xp-row {
  display: flex; align-items: center; gap: 10px;
}
.hub-level-chip {
  font-family: "Archivo", sans-serif; font-weight: 800;
  font-size: .72rem;
  background: linear-gradient(135deg, var(--gold) 0%, #f7d94c 100%);
  color: var(--navy-deep); border-radius: 999px;
  padding: 4px 13px; white-space: nowrap; flex-shrink: 0;
  letter-spacing: .02em;
}
.hub-xp-bar-wrap {
  flex: 1; max-width: 200px;
  display: flex; flex-direction: column; gap: 4px;
}
.hub-xp-bar-track {
  height: 5px; background: rgba(255,255,255,.14);
  border-radius: 999px; overflow: hidden;
}
.hub-xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, #f7d94c 100%);
  border-radius: 999px; min-width: 3px;
  transition: width .7s cubic-bezier(.22,.61,.36,1);
}
.hub-xp-text {
  font-size: .67rem; color: rgba(255,255,255,.45);
  font-family: "Archivo", sans-serif; font-weight: 600;
  letter-spacing: .02em;
}
/* Hero stat pills */
.hub-hero-right {
  display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center; position: relative; z-index: 1;
}
.hub-stat-pill {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.09);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 16px; padding: 12px 16px;
  backdrop-filter: blur(10px); min-width: 86px;
  transition: background .2s, transform .2s; cursor: default;
}
.hub-stat-pill:hover {
  background: rgba(255,255,255,.15); transform: translateY(-2px);
}
.hub-stat-ico { font-size: 1.45rem; line-height: 1; flex-shrink: 0; }
.hub-stat-pill b {
  display: block;
  font-family: "Archivo", sans-serif; font-weight: 800;
  font-size: 1.2rem; color: #fff; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hub-stat-pill small {
  font-size: .67rem; color: rgba(255,255,255,.5);
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}

/* ── Banner zone ─────────────────────────────────────────────── */
.hub-banners { padding: 0 28px; margin-top: 20px; }

/* ── Main 3-col grid ─────────────────────────────────────────── */
.hub-grid {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
  gap: 20px; padding: 20px 28px 0;
  max-width: 1360px; margin: 0 auto;
}
.hub-col {
  display: flex; flex-direction: column;
  gap: 20px; min-width: 0;
}

/* ── Full-width zone below grid ──────────────────────────────── */
.hub-wide {
  padding: 0 28px 80px;
  max-width: 1360px; margin: 20px auto 0;
  display: flex; flex-direction: column; gap: 20px;
}

/* ── Hub cards ───────────────────────────────────────────────── */
.hub-card {
  background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px 24px 24px;
  transition: box-shadow .25s ease;
}
.hub-card:hover { box-shadow: 0 8px 32px rgba(26,26,46,.065); }
.hub-card-head {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.hub-card-head h2 {
  font-family: "Archivo", sans-serif; font-weight: 800;
  font-size: .82rem; color: var(--grey);
  text-transform: uppercase; letter-spacing: .08em; margin: 0;
}
.hub-card-link {
  font-size: .78rem; color: var(--gold); text-decoration: none;
  font-weight: 700; white-space: nowrap; transition: color .2s;
}
.hub-card-link:hover { color: var(--navy); }
.hub-mini-btn {
  font-size: .74rem; background: none;
  border: 1.5px solid var(--gold); border-radius: 999px;
  padding: 3px 10px; color: var(--gold); cursor: pointer;
  font-weight: 700; transition: background .2s, color .2s;
  font-family: inherit;
}
.hub-mini-btn:hover { background: var(--gold); color: #fff; }

/* ── Today's Mission ─────────────────────────────────────────── */
.hub-mission-card { border-top: 4px solid var(--gold); }
.hub-missions { display: flex; flex-direction: column; gap: 8px; }
.hub-mission-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--page);
  border: 1.5px solid var(--line); border-radius: 12px;
  cursor: pointer; user-select: none;
  transition: background .15s, border-color .15s, transform .15s;
}
.hub-mission-item:hover { border-color: var(--gold); transform: translateX(3px); }
.hub-mission-item.done { opacity: .65; }
.hub-mission-item.done .hub-mission-text { text-decoration: line-through; color: var(--grey); }
.hub-mission-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #ccc; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: transparent; background: #fff;
  transition: all .2s;
}
.hub-mission-item.done .hub-mission-check {
  background: var(--green-ink); border-color: var(--green-ink); color: #fff;
}
.hub-mission-body { flex: 1; min-width: 0; }
.hub-mission-text {
  font-size: .88rem; font-weight: 600; color: var(--ink);
  display: block; transition: color .15s;
}
.hub-mission-sub {
  font-size: .74rem; color: var(--grey);
  display: block; margin-top: 2px;
}
.hub-mission-xp {
  font-family: "Archivo", sans-serif; font-weight: 800;
  font-size: .7rem; color: var(--yellow-ink); background: var(--yellow);
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
  flex-shrink: 0; transition: background .15s, color .15s;
}
.hub-mission-item.done .hub-mission-xp { background: var(--green); color: var(--green-ink); }
.hub-mission-footer {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.hub-mission-bar {
  flex: 1; height: 4px; background: var(--line);
  border-radius: 999px; overflow: hidden;
}
.hub-mission-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, #f7d94c 100%);
  border-radius: 999px; transition: width .4s ease;
}
.hub-mission-bar-label {
  font-size: .73rem; color: var(--grey);
  font-weight: 600; white-space: nowrap;
}

/* ── Focus Timer ─────────────────────────────────────────────── */
.hub-focus-card { border-top: 4px solid var(--lav-ink); }
.hub-focus-body {
  display: flex; flex-direction: column;
  align-items: center; gap: 16px; padding-top: 4px;
}
.hub-focus-ring-wrap { position: relative; width: 138px; height: 138px; }
.hub-focus-svg { width: 138px; height: 138px; transform: rotate(-90deg); }
.hub-focus-track { fill: none; stroke: var(--line); stroke-width: 7; }
.hub-focus-arc {
  fill: none; stroke: var(--lav-ink); stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset .8s ease, stroke .3s;
}
.hub-focus-arc.is-break { stroke: var(--green-ink); }
.hub-focus-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.hub-focus-time {
  font-family: "Archivo", sans-serif; font-weight: 800;
  font-size: 1.9rem; color: var(--navy); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hub-focus-phase {
  font-size: .67rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--grey); margin-top: 4px;
}
.hub-focus-btns { display: flex; gap: 10px; }
.hub-focus-btns .btn { padding: 9px 20px; font-size: .84rem; }
.hub-focus-meta {
  text-align: center; font-size: .77rem;
  color: var(--grey); line-height: 1.55;
}

/* ── Exam Countdown ──────────────────────────────────────────── */
.hub-countdown-card { border-top: 4px solid #e74c3c; }
.hub-countdowns { display: flex; flex-direction: column; gap: 10px; }
.hub-countdown-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; background: var(--page);
  border: 1.5px solid var(--line); border-radius: 13px;
  transition: border-color .2s, transform .15s;
}
.hub-countdown-item:hover { border-color: #e74c3c; transform: translateX(2px); }
.hub-countdown-ring-wrap { position: relative; width: 54px; height: 54px; flex-shrink: 0; }
.hub-countdown-svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.hub-countdown-track { fill: none; stroke: var(--line); stroke-width: 5; }
.hub-countdown-fill { fill: none; stroke-width: 5; stroke-linecap: round; }
.hub-countdown-number {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "Archivo", sans-serif; font-weight: 800;
  font-size: .88rem; color: var(--navy);
}
.hub-countdown-meta { flex: 1; min-width: 0; }
.hub-countdown-subj { display: block; font-weight: 700; font-size: .9rem; color: var(--navy); }
.hub-countdown-until { display: block; font-size: .76rem; color: var(--grey); margin-top: 2px; }
.hub-countdown-del {
  font-size: .8rem; background: none; border: none;
  cursor: pointer; color: var(--grey); padding: 4px 6px;
  border-radius: 6px; transition: color .2s;
}
.hub-countdown-del:hover { color: #e74c3c; }
.hub-countdown-empty {
  text-align: center; color: var(--grey);
  font-size: .86rem; padding: 12px 0 4px; line-height: 1.6;
}
.hub-exam-form {
  margin-top: 12px; padding: 14px;
  background: var(--page); border: 1.5px solid var(--line);
  border-radius: 13px; display: flex; flex-direction: column; gap: 8px;
}
.hub-exam-form input {
  width: 100%; border: 1.5px solid var(--line);
  border-radius: 10px; padding: 8px 12px;
  font: .84rem "Hanken Grotesk", sans-serif;
  color: var(--ink); background: #fff;
  transition: border-color .2s;
}
.hub-exam-form input:focus { outline: none; border-color: var(--gold); }
.hub-exam-form-btns { display: flex; gap: 8px; }
.hub-exam-form-btns .btn { flex: 1; padding: 8px 12px; font-size: .82rem; text-align: center; }

/* ── Activity Heatmap ────────────────────────────────────────── */
.hub-heatmap-scroll { overflow-x: auto; padding-bottom: 4px; }
.hub-heatmap-grid { display: flex; gap: 3px; min-width: max-content; }
.hub-heatmap-col { display: flex; flex-direction: column; gap: 3px; }
.hub-heatmap-cell {
  width: 11px; height: 11px; border-radius: 2px;
  background: #e8e3d8; position: relative;
  transition: transform .1s;
}
.hub-heatmap-cell:hover { transform: scale(1.5); z-index: 2; }
.hub-heatmap-cell[data-level="1"] { background: #b6e8cd; }
.hub-heatmap-cell[data-level="2"] { background: #6fd4a5; }
.hub-heatmap-cell[data-level="3"] { background: #3cb87a; }
.hub-heatmap-cell[data-level="4"] { background: var(--green-ink); }
.hub-heatmap-legend {
  display: flex; align-items: center; gap: 5px;
  margin-top: 10px; font-size: .7rem; color: var(--grey);
}
.hub-heatmap-swatch {
  width: 10px; height: 10px; border-radius: 2px;
  background: #e8e3d8; display: inline-block;
}
.hub-heatmap-swatch[data-level="1"] { background: #b6e8cd; }
.hub-heatmap-swatch[data-level="2"] { background: #6fd4a5; }
.hub-heatmap-swatch[data-level="3"] { background: #3cb87a; }
.hub-heatmap-swatch[data-level="4"] { background: var(--green-ink); }

/* ── Achievement Badges ──────────────────────────────────────── */
.hub-badges-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.hub-badge {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 5px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--page);
  text-align: center; transition: transform .2s, border-color .2s;
  cursor: default; position: relative;
}
.hub-badge:hover { transform: scale(1.08); z-index: 2; }
.hub-badge.earned { background: var(--lav); border-color: var(--lav-line); }
.hub-badge-ico {
  font-size: 1.4rem; line-height: 1;
  filter: grayscale(1) opacity(.28); transition: filter .3s;
}
.hub-badge.earned .hub-badge-ico { filter: none; }
.hub-badge-name {
  font-size: .59rem; font-weight: 700;
  color: var(--grey); text-transform: uppercase;
  letter-spacing: .04em; line-height: 1.2;
}
.hub-badge.earned .hub-badge-name { color: var(--lav-ink); }
@keyframes badge-pop {
  0%  { transform: scale(.5); opacity: 0; }
  70% { transform: scale(1.2); }
  100%{ transform: scale(1);   opacity: 1; }
}
.hub-badge.just-earned { animation: badge-pop .45s cubic-bezier(.22,.61,.36,1) both; }

/* ── Quick Actions — action card grid ───────────────────────── */
.hub-action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.hub-action-card {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 7px; padding: 14px 6px 12px;
  background: var(--page); border: 1.5px solid var(--line);
  border-radius: 13px; text-decoration: none; color: var(--navy);
  text-align: center; position: relative; overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s, background .15s;
}
.hub-action-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--qa-tint, var(--gold)); border-radius: 13px 13px 0 0;
  opacity: 0; transition: opacity .2s;
}
.hub-action-card:hover {
  border-color: var(--qa-tint, var(--gold));
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.hub-action-card:hover::before { opacity: 1; }
.hub-action-ico {
  font-size: 1.25rem; line-height: 1;
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--qa-tint, var(--gold)) 12%, transparent);
  flex-shrink: 0; transition: background .15s;
}
.hub-action-card:hover .hub-action-ico {
  background: color-mix(in srgb, var(--qa-tint, var(--gold)) 20%, transparent);
}
.hub-action-label {
  font-size: .64rem; font-weight: 800;
  font-family: "Archivo", sans-serif;
  color: var(--navy); line-height: 1.25;
  text-transform: uppercase; letter-spacing: .03em;
}

/* Legacy list style kept for any code still using hub-quick-list/item */
.hub-quick-list { display: flex; flex-direction: column; gap: 7px; }
.hub-quick-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 12px; text-decoration: none;
  color: var(--ink); background: var(--page);
  border: 1.5px solid var(--line); cursor: pointer; font: inherit;
  transition: background .15s, border-color .15s, transform .15s;
}
.hub-quick-item:hover {
  background: var(--cream); border-color: var(--gold);
  transform: translateX(4px); color: var(--navy);
}
.hub-quick-ico { font-size: 1.1rem; width: 26px; text-align: center; flex-shrink: 0; }
.hub-quick-text { flex: 1; min-width: 0; }
.hub-quick-label { display: block; font-weight: 700; font-size: .87rem; }
.hub-quick-sub { display: block; font-size: .72rem; color: var(--grey); font-weight: 400; }
.hub-quick-arrow { color: var(--line); font-size: .85rem; flex-shrink: 0; }

/* ── Continue Learning ───────────────────────────────────────── */
.hub-continue-list { display: flex; flex-direction: column; gap: 8px; }
.hub-continue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--page);
  border: 1.5px solid var(--line); border-radius: 13px;
  text-decoration: none; color: var(--ink);
  transition: background .15s, border-color .15s, transform .15s;
}
.hub-continue-item:hover {
  background: var(--lav); border-color: var(--lav-line); transform: translateX(3px);
}
.hub-continue-ico { font-size: 1.35rem; flex-shrink: 0; }
.hub-continue-meta { flex: 1; min-width: 0; }
.hub-continue-subj { display: block; font-weight: 700; font-size: .88rem; color: var(--navy); }
.hub-continue-chapter {
  display: block; font-size: .75rem; color: var(--grey);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 2px;
}
.hub-continue-arrow { color: var(--grey); font-size: .85rem; flex-shrink: 0; }

/* ── Insights ────────────────────────────────────────────────── */
.hub-insights-list { display: flex; flex-direction: column; gap: 8px; }
.hub-insight {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; background: var(--blue);
  border: 1.5px solid var(--blue-line); border-radius: 11px;
  font-size: .84rem; color: var(--blue-ink); line-height: 1.45;
}
.hub-insight-ico { font-size: .95rem; margin-top: 1px; flex-shrink: 0; }

/* ── XP toast ────────────────────────────────────────────────── */
.hub-toast {
  position: fixed; bottom: 88px; right: 24px;
  background: linear-gradient(135deg, var(--gold) 0%, #f7d94c 100%);
  color: var(--navy-deep); border-radius: 14px;
  padding: 12px 18px;
  font-family: "Archivo", sans-serif; font-weight: 800; font-size: .92rem;
  box-shadow: 0 8px 32px rgba(232,145,58,.5);
  transform: translateY(16px); opacity: 0;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .35s;
  pointer-events: none; z-index: 9999;
  display: flex; align-items: center; gap: 7px;
}
.hub-toast.show { opacity: 1; transform: translateY(0); }

/* Keep the old dash-streak element invisible (dashboard.js still writes to it) */
#dash-streak { display: none !important; }
/* Keep hidden greeting elements */
#dash-hello, #dash-date, #dash-sub, #dash-board { display: none !important; }

/* ── Per-card colour accents ─────────────────────────────────── */
/* Calendar already has its own card border */
.hub-bigcal-section { border-top: 4px solid #00b8a9; }
/* Left column */
.hub-subjects-card   { border-top: 4px solid #00b8a9; }
.hub-heatmap-card    { border-top: 4px solid #43a047; }
.hub-continue-card   { border-top: 4px solid #7c4dff; }
/* Center column */
.hub-insights-card      { border-top: 4px solid #2196f3; }
.hub-achievements-card  { border-top: 4px solid var(--gold); }

/* ── Achievements widget ─────────────────────────────────────── */
.dash-ach-level-row { display:flex; align-items:center; gap:.85rem; margin-bottom:.9rem; }
.dash-ach-badge { width:46px;height:46px;border-radius:50%;background:linear-gradient(135deg,#E8913A,#f9c260);display:flex;align-items:center;justify-content:center;font-size:1.3rem;box-shadow:0 3px 12px rgba(232,145,58,.35);flex-shrink:0; }
.dash-ach-level-info { flex:1;min-width:0; }
.dash-ach-level-num { font-family:"Archivo",sans-serif;font-weight:900;font-size:1.05rem;color:var(--text);line-height:1.2; }
.dash-ach-xp-track { width:100%;height:7px;background:var(--line);border-radius:99px;overflow:hidden;margin:.3rem 0 .2rem; }
.dash-ach-xp-fill { height:100%;border-radius:99px;background:linear-gradient(90deg,#E8913A,#f9c260);transition:width .5s ease; }
.dash-ach-xp-label { font-size:.7rem;color:var(--muted);font-weight:600; }
.dash-ach-streak-pill { background:linear-gradient(135deg,#fff3e0,#ffe0b2);border:1.5px solid #fcd34d;border-radius:14px;padding:.4rem .75rem;display:flex;align-items:center;gap:.35rem;font-size:1rem;font-weight:800;color:#d97706;flex-shrink:0;font-family:"Archivo",sans-serif; }
html[data-theme="dark"] .dash-ach-streak-pill { background:linear-gradient(135deg,#2e1d05,#3a2200);border-color:rgba(245,158,11,.25); }
.dash-ach-badges-row { display:flex;flex-wrap:wrap;gap:6px; }
.dash-ach-b { width:34px;height:34px;border-radius:50%;background:var(--page);border:1.5px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:1.05rem;title-attr:attr(title); }
.dash-ach-b.earned { background:color-mix(in srgb,var(--gold) 15%,transparent);border-color:color-mix(in srgb,var(--gold) 40%,transparent); }
.dash-ach-b.locked { opacity:.3;filter:grayscale(.9); }
.hub-practice-card   { border-top: 4px solid #E8913A; }
.hub-homework-card   { border-top: 4px solid #e74c3c; }
.hub-messages-card   { border-top: 4px solid #2a1f5c; }
/* Right column */
.hub-quick-card      { border-top: 4px solid var(--gold); }

/* ── Quick-actions coloured icon chips ───────────────────────── */
.hub-quick-item .hub-quick-ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; flex-shrink: 0;
  background: color-mix(in srgb, var(--qa-tint, #E8913A) 14%, transparent);
}
.hub-quick-item:hover .hub-quick-ico {
  background: color-mix(in srgb, var(--qa-tint, #E8913A) 22%, transparent);
}

/* ── Done calendar pill — strikethrough ──────────────────────── */
.hub-bigcal-pill.bc-pill-done {
  text-decoration: line-through;
  opacity: .5;
}

/* ── Big Calendar + Tasks section ───────────────────────────── */
.hub-bigcal-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  width: calc(100% - 56px);
  max-width: 1360px;
  margin: 20px auto 0;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,.05);
}

/* Left: calendar */
.hub-bigcal-left {
  padding: 20px 20px 0;
  border-right: 1px solid #f0ede8;
  min-width: 0;
}
.hub-bigcal-topbar {
  display: flex; align-items: center; justify-content: flex-start;
  margin-bottom: 14px;
}
.hub-bigcal-nav {
  display: flex; align-items: center; gap: 6px;
}
#hub-cal-month-label {
  font-family: "Playfair Display", serif;
  font-size: 1rem; font-weight: 700; color: var(--navy-deep);
  min-width: 130px; text-align: center;
}

/* DOW header */
.hub-bigcal-dow {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #f0ede8;
  margin-bottom: 0;
}
.hub-bigcal-dow span {
  text-align: center; font-size: .68rem; font-weight: 700;
  color: #bbb; font-family: "Archivo", sans-serif;
  letter-spacing: .08em; text-transform: uppercase; padding: 6px 0 8px;
}

/* Date grid */
.hub-bigcal-dates {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid #f0ede8;
}
.hub-bigcal-cell {
  border-right: 1px solid #f0ede8;
  border-bottom: 1px solid #f0ede8;
  padding: 6px 5px 5px;
  min-height: 86px;
  position: relative;
  vertical-align: top;
  transition: background .1s;
  cursor: default;
  overflow: hidden;
}
.hub-bigcal-cell:not(.bc-empty):hover { background: rgba(0,0,0,.018); }
.hub-bigcal-cell.bc-empty { background: rgba(0,0,0,.012); }
.hub-bigcal-cell.bc-past { opacity: .55; }

/* Day number */
.hub-bigcal-daynum {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: .77rem; font-weight: 600;
  font-family: "Archivo", sans-serif;
  color: #555; line-height: 1; margin-bottom: 3px;
}
.hub-bigcal-cell.bc-today .hub-bigcal-daynum {
  background: #160f30; color: #fff; font-weight: 800;
}
.hub-bigcal-cell.bc-other .hub-bigcal-daynum { color: #d0cec8; }

/* Event pills */
.hub-bigcal-pills {
  display: flex; flex-direction: column; gap: 2px;
}
.hub-bigcal-pill {
  display: flex; align-items: center; gap: 3px;
  padding: 2px 5px; border-radius: 4px;
  font-size: .64rem; font-family: "Hanken Grotesk", sans-serif;
  font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.hub-bigcal-pill.pill-hw     { background: rgba(67,160,71,.13);  color: #276329; }
.hub-bigcal-pill.pill-exam   { background: rgba(229,57,53,.12);  color: #c62828; }
.hub-bigcal-pill.pill-rem    { background: rgba(232,145,58,.15); color: #a05500; }
.hub-bigcal-pill.pill-task-0 { background: rgba(229,57,53,.12);  color: #c62828; }
.hub-bigcal-pill.pill-task-1 { background: rgba(67,160,71,.13);  color: #276329; }
.hub-bigcal-pill.pill-task-2 { background: rgba(124,77,255,.11); color: #5b2cbf; }
.hub-bigcal-pill.pill-task-3 { background: rgba(232,145,58,.15); color: #a05500; }
.hub-bigcal-pill.pill-task-4 { background: rgba(74,144,226,.13); color: #1a5fa8; }
.hub-bigcal-pill-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.pill-hw     .hub-bigcal-pill-dot { background: #43a047; }
.pill-exam   .hub-bigcal-pill-dot { background: #e53935; }
.pill-rem    .hub-bigcal-pill-dot { background: #E8913A; }
.pill-task-0 .hub-bigcal-pill-dot { background: #e53935; }
.pill-task-1 .hub-bigcal-pill-dot { background: #43a047; }
.pill-task-2 .hub-bigcal-pill-dot { background: #7c4dff; }
.pill-task-3 .hub-bigcal-pill-dot { background: #E8913A; }
.pill-task-4 .hub-bigcal-pill-dot { background: #4a90e2; }
.hub-bigcal-pill-more {
  font-size: .61rem; color: #aaa;
  font-family: "Hanken Grotesk", sans-serif;
  padding-left: 1px;
}

/* Right: tasks panel */
.hub-bigcal-right {
  display: flex; flex-direction: column;
  padding: 20px 18px 18px;
  background: #fdfcf9;
  min-height: 420px;
}
.hub-tasks-head {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 14px;
}
.hub-tasks-title {
  font-family: "Playfair Display", serif;
  font-size: .97rem; font-weight: 700; color: #1a1a2e;
}
.hub-btn-addtask {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: .76rem; font-weight: 700;
  background: #160f30; color: #fff;
  border: none; border-radius: 999px;
  padding: 5px 13px; cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.hub-btn-addtask:hover { background: var(--gold); color: #160f30; transform: translateY(-1px); }

.hub-tasks-list {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 7px;
}
.hub-task-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 12px;
  background: #fff; border-radius: 10px;
  border: 1px dashed rgba(0,0,0,.1);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.hub-task-item:hover { border-color: rgba(0,0,0,.22); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.hub-task-item.task-done .hub-task-title { text-decoration: line-through; color: #bbb; }
.hub-task-item.task-done { opacity: .7; }

.hub-task-cb {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid #ccc; flex-shrink: 0; margin-top: 2px;
  transition: border-color .15s, background .15s;
}
.hub-task-item.task-done .hub-task-cb { background: #43a047; border-color: #43a047; }

.hub-task-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; margin-top: 5px;
}
.tdot-0 { background: #e53935; }
.tdot-1 { background: #43a047; }
.tdot-2 { background: #7c4dff; }
.tdot-3 { background: #E8913A; }
.tdot-4 { background: #4a90e2; }

.hub-task-body { flex: 1; min-width: 0; }
.hub-task-title {
  font-family: "Archivo", sans-serif; font-size: .81rem; font-weight: 700;
  color: #1a1a2e; margin-bottom: 2px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.hub-task-badge {
  font-size: .61rem; font-weight: 700;
  font-family: "Hanken Grotesk", sans-serif;
  background: rgba(232,145,58,.14); color: #a05500;
  border-radius: 4px; padding: 1px 5px;
  letter-spacing: .04em; text-transform: uppercase; flex-shrink: 0;
}
.hub-task-meta {
  font-size: .71rem; color: #aaa;
  font-family: "Hanken Grotesk", sans-serif;
}
.hub-tasks-empty {
  font-size: .82rem; color: #bbb;
  text-align: center; padding: 24px 0;
  font-family: "Hanken Grotesk", sans-serif;
}

/* Add-task inline form */
.hub-add-task-form {
  display: flex; flex-direction: column; gap: 7px;
  padding: 12px 14px; background: #fff; border-radius: 10px;
  border: 1.5px dashed var(--gold);
}
.hub-add-task-form input,
.hub-add-task-form select {
  font-family: "Hanken Grotesk", sans-serif; font-size: .8rem;
  border: 1px solid #e0ddd8; border-radius: 6px;
  padding: 6px 9px; outline: none; color: #333; width: 100%; box-sizing: border-box;
}
.hub-add-task-form input:focus,
.hub-add-task-form select:focus { border-color: var(--gold); }
.hub-add-task-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hub-add-task-actions { display: flex; gap: 7px; justify-content: flex-end; margin-top: 2px; }
.hub-add-task-save {
  font-family: "Hanken Grotesk", sans-serif; font-size: .76rem; font-weight: 700;
  background: #160f30; color: #fff; border: none; border-radius: 6px;
  padding: 6px 13px; cursor: pointer;
}
.hub-add-task-save:hover { background: var(--gold); color: #160f30; }
.hub-add-task-cancel {
  font-family: "Hanken Grotesk", sans-serif; font-size: .76rem; font-weight: 600;
  background: transparent; color: #aaa; border: 1px solid #e0ddd8;
  border-radius: 6px; padding: 6px 11px; cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
  .hub-bigcal-section { grid-template-columns: 1fr; width: calc(100% - 40px); }
  .hub-bigcal-right { border-top: 1px solid #f0ede8; border-right: none; min-height: unset; }
  .hub-bigcal-cell { min-height: 66px; }
}
@media (max-width: 600px) {
  .hub-bigcal-section { width: calc(100% - 32px); }
  .hub-bigcal-cell { min-height: 48px; padding: 4px 2px 2px; }
  .hub-bigcal-pill { font-size: .58rem; }
}

/* ── Sticky notes — hub context override ─────────────────────── */
.hub-card #sticky-board {
  flex-direction: column; flex-wrap: nowrap;
  min-height: unset; gap: 8px;
}
.hub-card .sticky-note {
  width: 100% !important;
  transform: none !important;
  border-radius: 10px; margin: 0; padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.hub-card .sticky-input {
  min-height: 52px; font-size: .85rem;
  background: transparent; resize: none;
}
.hub-card [data-sticky-add] {
  margin-top: 10px; width: 100%;
  font-size: .83rem; padding: 8px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hub-grid { padding: 20px 20px 0; }
  .hub-wide { padding: 0 20px 80px; }
  .hub-banners { padding: 0 20px; }
}
@media (max-width: 820px) {
  .hub-grid { grid-template-columns: 1fr; padding: 16px 16px 0; }
  .hub-action-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 740px) {
  .hub-hero { padding: 24px 18px 28px; }
  .hub-stat-pill { padding: 10px 12px; min-width: 76px; }
  .hub-stat-pill b { font-size: 1rem; }
  .hub-stat-ico { font-size: 1.2rem; }
  .hub-wide { padding: 0 16px 80px; }
  .hub-banners { padding: 0 16px; }
  .hub-action-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
  .hub-action-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .hub-action-card { padding: 11px 4px 9px; gap: 5px; }
  .hub-action-ico { width: 32px; height: 32px; font-size: 1.05rem; }
  .hub-action-label { font-size: .58rem; }
}

/* ── Mega-menu Dashboard dropdown ────────────────────────────── */
.nav-mega > .nav-group-panel {
  /* left-align panel to the nav-group edge so a wide panel stays on screen */
  min-width: 660px;
  max-width: 720px;
  left: 0;
  transform: translateX(0) translateY(-6px);
  padding: 14px 14px 14px;
}
.nav-mega:hover > .nav-group-panel,
.nav-mega > .nav-group-panel.open {
  transform: translateX(0) translateY(0);
}
/* Overview row at top of mega */
.nav-mega-overview {
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-radius: 10px 10px 0 0;
}
.nav-mega-check {
  margin-left: auto;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 800;
  padding-right: 4px;
}
/* 3-column grid inside the mega panel */
.nav-mega-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 8px;
}
.nav-mega-col {}
.nav-mega-head {
  font-size: .62rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--grey);
  padding: 6px 12px 8px;
}
/* compact items inside mega */
.nav-mega-cols .nav-drop-item { padding: 7px 10px; border-radius: 9px; }
.nav-mega-cols .ndi { font-size: .9rem; width: 26px; height: 26px; border-radius: 7px; }

/* ── Notes dropdown — 2-column variant ──────────────────────── */
.nav-mega-notes > .nav-group-panel {
  min-width: 480px;
  max-width: 540px;
}
.nav-mega-notes .nav-mega-cols {
  grid-template-columns: repeat(2, 1fr);
}

/* ── Back-to-dashboard bar (on sub-pages) ────────────────────── */
.page-back-bar {
  background: var(--page);
  border-bottom: 1.5px solid var(--line);
  padding: 7px 28px;
}
.page-back-link {
  font-size: .78rem; font-weight: 700; color: var(--grey);
  text-decoration: none; font-family: "Archivo", sans-serif;
  display: inline-flex; align-items: center; gap: 5px;
  transition: color .15s;
}
.page-back-link:hover { color: var(--navy); }
.page-back-link::before { content: '←'; }

/* ── Mobile: mega-menu collapses ─────────────────────────────── */
@media (max-width: 1200px) {
  .nav-mega > .nav-group-panel {
    min-width: unset; max-width: unset; left: 0;
    position: static; transform: none;
    box-shadow: none; border: none; padding: 0 0 0 16px;
    margin-top: 0;
  }
  .nav-mega-cols { grid-template-columns: 1fr; gap: 0; }
  .nav-mega-overview { margin-bottom: 0; border-bottom: none; }
  .nav-mega-check { display: none; }
  /* Mega panel expands to ~19 items in a single column (~1000px); the global
     max-height:500px from styles.css would clip it. Include the :hover variant
     so sticky-hover on touch doesn't suppress the height via a more-specific rule. */
  .nav-mega > .nav-group-panel.open,
  .nav-mega:hover > .nav-group-panel.open {
    max-height: 1300px;
  }
  .nav-mega-notes > .nav-group-panel {
    min-width: unset; max-width: unset;
  }
  .page-back-bar { padding: 7px 16px; }
}
